@ts-model-checker/core 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +732 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.js +730 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -294,6 +294,29 @@ interface TlaOutputFiles {
|
|
|
294
294
|
*/
|
|
295
295
|
declare function transpileToTla(spec: VisualSpecIR): TlaOutputFiles;
|
|
296
296
|
|
|
297
|
+
interface TlaParseOptions {
|
|
298
|
+
readonly cfgContent?: string;
|
|
299
|
+
}
|
|
300
|
+
interface TlaParseResult {
|
|
301
|
+
readonly spec: VisualSpecIR;
|
|
302
|
+
readonly warnings: readonly string[];
|
|
303
|
+
}
|
|
304
|
+
interface JsonParseResult {
|
|
305
|
+
readonly spec: VisualSpecIR;
|
|
306
|
+
readonly issues: readonly ValidationIssue[];
|
|
307
|
+
}
|
|
308
|
+
/** Parses a TLA+ expression string into an AST ExprNode. */
|
|
309
|
+
declare function parseTlaExpr(exprText: string): ExprNode;
|
|
310
|
+
/**
|
|
311
|
+
* Parses a structured TLA+ (.tla) file (and optional .cfg) into a VisualSpecIR.
|
|
312
|
+
* Supports modules generated by `transpileToTla` as well as standard TLA+ specifications.
|
|
313
|
+
*/
|
|
314
|
+
declare function parseTlaToSpec(tlaContent: string, options?: TlaParseOptions): TlaParseResult;
|
|
315
|
+
/**
|
|
316
|
+
* Safely parses and validates a JSON string representing a VisualSpecIR.
|
|
317
|
+
*/
|
|
318
|
+
declare function parseJsonToSpec(jsonContent: string): JsonParseResult;
|
|
319
|
+
|
|
297
320
|
/**
|
|
298
321
|
* Classic concurrency race condition:
|
|
299
322
|
* Two processes check `balance >= 80` before debiting, allowing `balance` to become -60.
|
|
@@ -325,4 +348,4 @@ interface PresetEntry {
|
|
|
325
348
|
}
|
|
326
349
|
declare const PRESET_CATALOG: readonly PresetEntry[];
|
|
327
350
|
|
|
328
|
-
export { type BinaryOperator, type CheckerOptions, type CheckerProgress, type CompiledAction, type CompiledInvariant, type CompiledSpec, type EffectAssignment, type ExprNode, type GraphEdge, type LivenessViolation, type NodePosition, PRESET_CATALOG, type ParentEntry, type PresetEntry, type Primitive, type State, type StateGraph, type StateValue, type TlaOutputFiles, type TraceStep, type TraceValidationOptions, type TraceValidationResult, type UnaryOperator, type ValidationIssue, type VarDecl, type VarType, type VerificationResult, type VisualActionIR, type VisualInvariantIR, type VisualLivenessIR, type VisualSpecIR, applyStateDelta, buildTracePrefix, canonicalHash, checkLivenessProperty, compileAction, compileSpec, concurrentTransferBuggySpec, concurrentTransferFixedSpec, createBlankSpec, deepEqual, evaluateExpr, exprToTla, hasValidationErrors, literalToTla, mutexSpec, normalizeSet, transpileToTla, twoPhaseCommitSpec, validateExecutionTrace, validateSpec, verifyCompiledModel, verifySpec };
|
|
351
|
+
export { type BinaryOperator, type CheckerOptions, type CheckerProgress, type CompiledAction, type CompiledInvariant, type CompiledSpec, type EffectAssignment, type ExprNode, type GraphEdge, type JsonParseResult, type LivenessViolation, type NodePosition, PRESET_CATALOG, type ParentEntry, type PresetEntry, type Primitive, type State, type StateGraph, type StateValue, type TlaOutputFiles, type TlaParseOptions, type TlaParseResult, type TraceStep, type TraceValidationOptions, type TraceValidationResult, type UnaryOperator, type ValidationIssue, type VarDecl, type VarType, type VerificationResult, type VisualActionIR, type VisualInvariantIR, type VisualLivenessIR, type VisualSpecIR, applyStateDelta, buildTracePrefix, canonicalHash, checkLivenessProperty, compileAction, compileSpec, concurrentTransferBuggySpec, concurrentTransferFixedSpec, createBlankSpec, deepEqual, evaluateExpr, exprToTla, hasValidationErrors, literalToTla, mutexSpec, normalizeSet, parseJsonToSpec, parseTlaExpr, parseTlaToSpec, transpileToTla, twoPhaseCommitSpec, validateExecutionTrace, validateSpec, verifyCompiledModel, verifySpec };
|
package/dist/index.d.ts
CHANGED
|
@@ -294,6 +294,29 @@ interface TlaOutputFiles {
|
|
|
294
294
|
*/
|
|
295
295
|
declare function transpileToTla(spec: VisualSpecIR): TlaOutputFiles;
|
|
296
296
|
|
|
297
|
+
interface TlaParseOptions {
|
|
298
|
+
readonly cfgContent?: string;
|
|
299
|
+
}
|
|
300
|
+
interface TlaParseResult {
|
|
301
|
+
readonly spec: VisualSpecIR;
|
|
302
|
+
readonly warnings: readonly string[];
|
|
303
|
+
}
|
|
304
|
+
interface JsonParseResult {
|
|
305
|
+
readonly spec: VisualSpecIR;
|
|
306
|
+
readonly issues: readonly ValidationIssue[];
|
|
307
|
+
}
|
|
308
|
+
/** Parses a TLA+ expression string into an AST ExprNode. */
|
|
309
|
+
declare function parseTlaExpr(exprText: string): ExprNode;
|
|
310
|
+
/**
|
|
311
|
+
* Parses a structured TLA+ (.tla) file (and optional .cfg) into a VisualSpecIR.
|
|
312
|
+
* Supports modules generated by `transpileToTla` as well as standard TLA+ specifications.
|
|
313
|
+
*/
|
|
314
|
+
declare function parseTlaToSpec(tlaContent: string, options?: TlaParseOptions): TlaParseResult;
|
|
315
|
+
/**
|
|
316
|
+
* Safely parses and validates a JSON string representing a VisualSpecIR.
|
|
317
|
+
*/
|
|
318
|
+
declare function parseJsonToSpec(jsonContent: string): JsonParseResult;
|
|
319
|
+
|
|
297
320
|
/**
|
|
298
321
|
* Classic concurrency race condition:
|
|
299
322
|
* Two processes check `balance >= 80` before debiting, allowing `balance` to become -60.
|
|
@@ -325,4 +348,4 @@ interface PresetEntry {
|
|
|
325
348
|
}
|
|
326
349
|
declare const PRESET_CATALOG: readonly PresetEntry[];
|
|
327
350
|
|
|
328
|
-
export { type BinaryOperator, type CheckerOptions, type CheckerProgress, type CompiledAction, type CompiledInvariant, type CompiledSpec, type EffectAssignment, type ExprNode, type GraphEdge, type LivenessViolation, type NodePosition, PRESET_CATALOG, type ParentEntry, type PresetEntry, type Primitive, type State, type StateGraph, type StateValue, type TlaOutputFiles, type TraceStep, type TraceValidationOptions, type TraceValidationResult, type UnaryOperator, type ValidationIssue, type VarDecl, type VarType, type VerificationResult, type VisualActionIR, type VisualInvariantIR, type VisualLivenessIR, type VisualSpecIR, applyStateDelta, buildTracePrefix, canonicalHash, checkLivenessProperty, compileAction, compileSpec, concurrentTransferBuggySpec, concurrentTransferFixedSpec, createBlankSpec, deepEqual, evaluateExpr, exprToTla, hasValidationErrors, literalToTla, mutexSpec, normalizeSet, transpileToTla, twoPhaseCommitSpec, validateExecutionTrace, validateSpec, verifyCompiledModel, verifySpec };
|
|
351
|
+
export { type BinaryOperator, type CheckerOptions, type CheckerProgress, type CompiledAction, type CompiledInvariant, type CompiledSpec, type EffectAssignment, type ExprNode, type GraphEdge, type JsonParseResult, type LivenessViolation, type NodePosition, PRESET_CATALOG, type ParentEntry, type PresetEntry, type Primitive, type State, type StateGraph, type StateValue, type TlaOutputFiles, type TlaParseOptions, type TlaParseResult, type TraceStep, type TraceValidationOptions, type TraceValidationResult, type UnaryOperator, type ValidationIssue, type VarDecl, type VarType, type VerificationResult, type VisualActionIR, type VisualInvariantIR, type VisualLivenessIR, type VisualSpecIR, applyStateDelta, buildTracePrefix, canonicalHash, checkLivenessProperty, compileAction, compileSpec, concurrentTransferBuggySpec, concurrentTransferFixedSpec, createBlankSpec, deepEqual, evaluateExpr, exprToTla, hasValidationErrors, literalToTla, mutexSpec, normalizeSet, parseJsonToSpec, parseTlaExpr, parseTlaToSpec, transpileToTla, twoPhaseCommitSpec, validateExecutionTrace, validateSpec, verifyCompiledModel, verifySpec };
|