tla-ts 0.0.3-dev.fca2ca8 → 0.0.3-dev.fe239f8
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/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +168 -27
- package/dist/index.d.ts +168 -27
- package/dist/index.js +1 -1
- package/dist/parallel-worker.cjs +1 -1
- package/dist/parallel-worker.js +2 -2
- package/dist/parallel.cjs +1 -1
- package/dist/parallel.js +2 -2
- package/dist/run-cli.cjs +1351 -20
- package/dist/run-cli.js +1351 -20
- package/dist/transfer.cjs +83 -28
- package/dist/transfer.js +83 -28
- package/package.json +5 -1
- package/src/ast.ts +55 -6
- package/src/bags.ts +4 -7
- package/src/builtins.ts +29 -11
- package/src/bundled-modules.ts +3 -3
- package/src/canonical.ts +4 -3
- package/src/check.ts +1343 -284
- package/src/cli.ts +8 -1
- package/src/codegen.ts +68 -21
- package/src/config.ts +252 -179
- package/src/environment.ts +431 -120
- package/src/errors.ts +195 -7
- package/src/evaluate.ts +718 -146
- package/src/exit-codes.ts +6 -24
- package/src/index.ts +1 -0
- package/src/instances.ts +4 -2
- package/src/java-overrides.ts +104 -25
- package/src/levels.ts +183 -37
- package/src/lexer.ts +32 -4
- package/src/live-check.ts +204 -148
- package/src/liveness.ts +190 -117
- package/src/obligation-expression.ts +2 -2
- package/src/obligation-source.ts +2 -0
- package/src/parallel-worker.ts +6 -1
- package/src/parallel.ts +57 -6
- package/src/parser.ts +450 -135
- package/src/pcal-ast.ts +770 -0
- package/src/pcal-parse.ts +1523 -0
- package/src/pcal-tokenize.ts +516 -0
- package/src/pcal-translate.ts +1230 -0
- package/src/pcal-validate.ts +454 -0
- package/src/randomization.ts +24 -7
- package/src/resolve.ts +1367 -404
- package/src/run-cli.ts +1167 -155
- package/src/runtime.ts +16 -0
- package/src/sany-builtins.ts +147 -0
- package/src/sany-generator.ts +3112 -0
- package/src/sany-levels.ts +1208 -0
- package/src/sany-lexer.ts +545 -0
- package/src/sany-linter.ts +122 -0
- package/src/sany-modules.ts +1398 -0
- package/src/sany-nodes.ts +463 -0
- package/src/sany-parse-error.ts +2161 -0
- package/src/sany-report.ts +354 -0
- package/src/sany-selectors.ts +738 -0
- package/src/sany-source.ts +248 -0
- package/src/sany-xml.ts +1017 -0
- package/src/spec-description.ts +26 -7
- package/src/standard-modules.ts +203 -146
- package/src/standard-ranges.ts +116 -0
- package/src/state-graph.ts +29 -6
- package/src/subexpressions.ts +221 -161
- package/src/substitution-levels.ts +38 -17
- package/src/successors.ts +158 -120
- package/src/symmetry.ts +168 -50
- package/src/tableau.ts +3 -1
- package/src/tlc-ext.ts +13 -17
- package/src/tlc-messages.ts +329 -0
- package/src/tlc-module.ts +49 -21
- package/src/tlc-modules.ts +0 -4
- package/src/tlc-order.ts +55 -9
- package/src/tlc-random.ts +28 -3
- package/src/tlc-replay.ts +655 -0
- package/src/tlc-version.ts +18 -0
- package/src/transfer.ts +15 -3
- package/src/value-sources.ts +29 -0
- package/src/values.ts +683 -256
package/dist/cli.cjs
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
require("node:module").enableCompileCache?.(),Promise.resolve().then(()=>require("./run-cli.cjs")).then(e=>e.runCli());
|
|
10
|
+
let e=require("node:module"),t=require("node:path");const n=process.argv.find(e=>e.startsWith(`-Djava.io.tmpdir=`))?.slice(17);e.enableCompileCache?.(n&&(0,t.join)(n,`node-compile-cache`)),Promise.resolve().then(()=>require("./run-cli.cjs")).then(e=>e.runCli());
|
package/dist/cli.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
import{enableCompileCache as e}from"node:module";e?.(),import(`./run-cli.js`).then(e=>e.runCli());
|
|
10
|
+
import{enableCompileCache as e}from"node:module";import{join as t}from"node:path";const n=process.argv.find(e=>e.startsWith(`-Djava.io.tmpdir=`))?.slice(17);e?.(n&&t(n,`node-compile-cache`)),import(`./run-cli.js`).then(e=>e.runCli());
|
package/dist/index.cjs
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./transfer.cjs"),t=require("./parallel.cjs");exports.TlaConfigError=e.
|
|
9
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./transfer.cjs"),t=require("./parallel.cjs");exports.TlaConfigError=e.at,exports.TlaError=e.ot,exports.TlaEvaluationError=e.st,exports.TlaSyntaxError=e.ft,exports.TlaUnsupportedError=e.pt,exports.check=t.t,exports.formatValue=e.q,exports.parseConfig=e.Z,exports.parseModule=e.w;
|
package/dist/index.d.cts
CHANGED
|
@@ -38,32 +38,41 @@ interface StringExpression {
|
|
|
38
38
|
interface IdentifierExpression {
|
|
39
39
|
kind: "Identifier";
|
|
40
40
|
name: string;
|
|
41
|
+
selectorRanges?: SourceRange[];
|
|
41
42
|
location: SourceLocation;
|
|
42
43
|
resolution?: LocalResolution;
|
|
43
44
|
}
|
|
44
45
|
interface ApplyExpression {
|
|
45
46
|
kind: "Apply";
|
|
46
47
|
operator: string;
|
|
48
|
+
spelling?: string;
|
|
47
49
|
args: Expression[];
|
|
48
50
|
argumentCounts?: number[];
|
|
51
|
+
argumentsRange?: SourceRange;
|
|
52
|
+
selectorRanges?: SourceRange[];
|
|
53
|
+
argumentRanges?: (SourceRange | undefined)[];
|
|
49
54
|
location: SourceLocation;
|
|
50
55
|
resolution?: LocalResolution;
|
|
51
56
|
}
|
|
52
57
|
interface OperatorReferenceExpression {
|
|
53
58
|
kind: "OperatorReference";
|
|
54
59
|
operator: string;
|
|
60
|
+
spelling?: string;
|
|
55
61
|
location: SourceLocation;
|
|
56
62
|
}
|
|
57
63
|
interface LambdaExpression {
|
|
58
64
|
kind: "Lambda";
|
|
59
65
|
params: string[];
|
|
66
|
+
paramRanges?: SourceRange[];
|
|
60
67
|
body: Expression;
|
|
68
|
+
operator?: string;
|
|
61
69
|
location: SourceLocation;
|
|
62
70
|
}
|
|
63
71
|
interface JunctionExpression {
|
|
64
72
|
kind: "And" | "Or";
|
|
65
73
|
operands: Expression[];
|
|
66
74
|
isBulleted?: boolean;
|
|
75
|
+
prefixEnds?: SourceLocation[];
|
|
67
76
|
location: SourceLocation;
|
|
68
77
|
}
|
|
69
78
|
interface PrimeExpression {
|
|
@@ -108,9 +117,11 @@ interface LetExpression {
|
|
|
108
117
|
type BoundPattern = {
|
|
109
118
|
kind: "Name";
|
|
110
119
|
name: string;
|
|
120
|
+
ranges?: SourceRange[];
|
|
111
121
|
} | {
|
|
112
122
|
kind: "Tuple";
|
|
113
123
|
names: string[];
|
|
124
|
+
ranges?: SourceRange[];
|
|
114
125
|
};
|
|
115
126
|
interface Bound {
|
|
116
127
|
pattern: BoundPattern;
|
|
@@ -126,6 +137,7 @@ interface UnboundedQuantifierExpression {
|
|
|
126
137
|
kind: "UnboundedQuantifier";
|
|
127
138
|
quantifier: "Forall" | "Exists";
|
|
128
139
|
names: string[];
|
|
140
|
+
nameRanges?: SourceRange[];
|
|
129
141
|
isTemporal?: boolean;
|
|
130
142
|
body: Expression;
|
|
131
143
|
location: SourceLocation;
|
|
@@ -175,6 +187,7 @@ interface FunctionSetExpression {
|
|
|
175
187
|
interface RecordField {
|
|
176
188
|
name: string;
|
|
177
189
|
value: Expression;
|
|
190
|
+
location: SourceLocation;
|
|
178
191
|
}
|
|
179
192
|
interface RecordExpression {
|
|
180
193
|
kind: "Record" | "RecordSet";
|
|
@@ -208,6 +221,11 @@ interface FunctionApplicationExpression {
|
|
|
208
221
|
args: Expression[];
|
|
209
222
|
location: SourceLocation;
|
|
210
223
|
}
|
|
224
|
+
interface BracketExpression {
|
|
225
|
+
kind: "Bracket";
|
|
226
|
+
args: Expression[];
|
|
227
|
+
location: SourceLocation;
|
|
228
|
+
}
|
|
211
229
|
interface FieldAccessExpression {
|
|
212
230
|
kind: "FieldAccess";
|
|
213
231
|
record: Expression;
|
|
@@ -241,6 +259,7 @@ interface LabelExpression {
|
|
|
241
259
|
kind: "Label";
|
|
242
260
|
name: string;
|
|
243
261
|
params: string[];
|
|
262
|
+
paramRanges?: SourceRange[];
|
|
244
263
|
body: Expression;
|
|
245
264
|
location: SourceLocation;
|
|
246
265
|
}
|
|
@@ -262,9 +281,11 @@ type Selector = {
|
|
|
262
281
|
interface SubexpressionExpression {
|
|
263
282
|
kind: "Subexpression";
|
|
264
283
|
selectors: Selector[];
|
|
284
|
+
selectorRanges?: SourceRange[];
|
|
285
|
+
argumentRanges?: (SourceRange | undefined)[];
|
|
265
286
|
location: SourceLocation;
|
|
266
287
|
}
|
|
267
|
-
type Expression = NumberExpression | DecimalExpression | StringExpression | IdentifierExpression | ApplyExpression | OperatorReferenceExpression | LambdaExpression | JunctionExpression | PrimeExpression | UnchangedExpression | EnabledExpression | IfExpression | CaseExpression | LetExpression | QuantifierExpression | UnboundedQuantifierExpression | ChooseExpression | SetEnumerationExpression | SetFilterExpression | SetMapExpression | TupleExpression | FunctionConstructionExpression | FunctionSetExpression | RecordExpression | ExceptExpression | ExceptAtExpression | FunctionApplicationExpression | FieldAccessExpression | ProductExpression | TemporalExpression | ActionExpression | FairnessExpression | LabelExpression | SubexpressionExpression;
|
|
288
|
+
type Expression = NumberExpression | DecimalExpression | StringExpression | IdentifierExpression | ApplyExpression | OperatorReferenceExpression | LambdaExpression | JunctionExpression | PrimeExpression | UnchangedExpression | EnabledExpression | IfExpression | CaseExpression | LetExpression | QuantifierExpression | UnboundedQuantifierExpression | ChooseExpression | SetEnumerationExpression | SetFilterExpression | SetMapExpression | TupleExpression | FunctionConstructionExpression | FunctionSetExpression | RecordExpression | ExceptExpression | ExceptAtExpression | FunctionApplicationExpression | BracketExpression | FieldAccessExpression | ProductExpression | TemporalExpression | ActionExpression | FairnessExpression | LabelExpression | SubexpressionExpression;
|
|
268
289
|
interface OperatorParam {
|
|
269
290
|
name: string;
|
|
270
291
|
arity: number;
|
|
@@ -287,6 +308,7 @@ interface FunctionDefinition {
|
|
|
287
308
|
body: Expression;
|
|
288
309
|
isLocal: boolean;
|
|
289
310
|
isRecursive: boolean;
|
|
311
|
+
isSelfReferential?: boolean;
|
|
290
312
|
location: SourceLocation;
|
|
291
313
|
}
|
|
292
314
|
type Definition = OperatorDefinition | FunctionDefinition;
|
|
@@ -303,6 +325,7 @@ interface Assumption {
|
|
|
303
325
|
}
|
|
304
326
|
interface InstanceSubstitution {
|
|
305
327
|
name: string;
|
|
328
|
+
nameRange: SourceRange;
|
|
306
329
|
expression: Expression;
|
|
307
330
|
}
|
|
308
331
|
interface Instance {
|
|
@@ -322,6 +345,7 @@ interface NewSymbol {
|
|
|
322
345
|
arity: number;
|
|
323
346
|
level: "Constant" | "Variable" | "State" | "Action" | "Temporal";
|
|
324
347
|
set: Expression | undefined;
|
|
348
|
+
nameRange?: SourceRange;
|
|
325
349
|
location: SourceLocation;
|
|
326
350
|
}
|
|
327
351
|
interface AssumeProve {
|
|
@@ -371,6 +395,7 @@ type StepBody = UseOrHide | Instance | DefineStep | {
|
|
|
371
395
|
} | {
|
|
372
396
|
kind: "Take";
|
|
373
397
|
names: string[];
|
|
398
|
+
nameRanges?: SourceRange[];
|
|
374
399
|
bounds: Bound[];
|
|
375
400
|
} | {
|
|
376
401
|
kind: "Witness";
|
|
@@ -378,6 +403,7 @@ type StepBody = UseOrHide | Instance | DefineStep | {
|
|
|
378
403
|
} | {
|
|
379
404
|
kind: "Pick";
|
|
380
405
|
names: string[];
|
|
406
|
+
nameRanges?: SourceRange[];
|
|
381
407
|
bounds: Bound[];
|
|
382
408
|
body: Expression;
|
|
383
409
|
} | {
|
|
@@ -395,6 +421,7 @@ interface ProofStep {
|
|
|
395
421
|
token: string;
|
|
396
422
|
body: StepBody;
|
|
397
423
|
head: SourceRange;
|
|
424
|
+
statement: SourceRange;
|
|
398
425
|
proof: Proof | undefined;
|
|
399
426
|
location: SourceLocation;
|
|
400
427
|
}
|
|
@@ -405,11 +432,9 @@ interface Theorem {
|
|
|
405
432
|
location: SourceLocation;
|
|
406
433
|
}
|
|
407
434
|
type ModuleUnit = {
|
|
408
|
-
kind: "Constants";
|
|
409
|
-
declarations: Declaration[];
|
|
410
|
-
} | {
|
|
411
|
-
kind: "Variables";
|
|
435
|
+
kind: "Constants" | "Variables";
|
|
412
436
|
declarations: Declaration[];
|
|
437
|
+
location: SourceLocation;
|
|
413
438
|
} | {
|
|
414
439
|
kind: "Recursive";
|
|
415
440
|
declarations: Declaration[];
|
|
@@ -447,6 +472,7 @@ interface Module {
|
|
|
447
472
|
uses: UseOrHide[];
|
|
448
473
|
units: ModuleUnit[];
|
|
449
474
|
}
|
|
475
|
+
type TlcVersion = "1.7.4" | "master";
|
|
450
476
|
type ConfigValue = {
|
|
451
477
|
kind: "Number";
|
|
452
478
|
value: number;
|
|
@@ -493,7 +519,46 @@ interface ModelConfig {
|
|
|
493
519
|
periodic: string | undefined;
|
|
494
520
|
rlReward: string | undefined;
|
|
495
521
|
}
|
|
496
|
-
export declare const parseConfig: (source: string) => ModelConfig;
|
|
522
|
+
export declare const parseConfig: (source: string, version?: TlcVersion) => ModelConfig;
|
|
523
|
+
interface JavaOverride {
|
|
524
|
+
module: string;
|
|
525
|
+
operator: string;
|
|
526
|
+
signature: string;
|
|
527
|
+
isMatched: boolean;
|
|
528
|
+
}
|
|
529
|
+
export declare class TlaError extends Error {
|
|
530
|
+
constructor(message: string, cause?: unknown);
|
|
531
|
+
}
|
|
532
|
+
interface SyntaxFailure {
|
|
533
|
+
reason: string;
|
|
534
|
+
line: number;
|
|
535
|
+
column: number;
|
|
536
|
+
isEnd: boolean;
|
|
537
|
+
}
|
|
538
|
+
interface SanyError {
|
|
539
|
+
location: string;
|
|
540
|
+
message: string;
|
|
541
|
+
}
|
|
542
|
+
interface SanyReport {
|
|
543
|
+
errors: SanyError[];
|
|
544
|
+
warnings: SanyError[];
|
|
545
|
+
isFatal: boolean;
|
|
546
|
+
parseError?: string;
|
|
547
|
+
}
|
|
548
|
+
export declare class TlaSyntaxError extends TlaError {
|
|
549
|
+
failure: SyntaxFailure | undefined;
|
|
550
|
+
sany: SanyReport | undefined;
|
|
551
|
+
constructor(message: string, cause?: unknown, failure?: SyntaxFailure, sany?: SanyReport);
|
|
552
|
+
}
|
|
553
|
+
export declare class TlaConfigError extends TlaError {
|
|
554
|
+
constructor(message: string, cause?: unknown);
|
|
555
|
+
}
|
|
556
|
+
export declare class TlaEvaluationError extends TlaError {
|
|
557
|
+
constructor(message: string, cause?: unknown);
|
|
558
|
+
}
|
|
559
|
+
export declare class TlaUnsupportedError extends TlaError {
|
|
560
|
+
constructor(message: string, cause?: unknown);
|
|
561
|
+
}
|
|
497
562
|
interface ModelValue {
|
|
498
563
|
kind: "ModelValue";
|
|
499
564
|
name: string;
|
|
@@ -517,6 +582,7 @@ interface FunctionValue {
|
|
|
517
582
|
hash: number;
|
|
518
583
|
fingerprint: number;
|
|
519
584
|
writtenKeys: Value[] | undefined;
|
|
585
|
+
functionClass: FunctionClass | undefined;
|
|
520
586
|
}
|
|
521
587
|
interface IntervalValue {
|
|
522
588
|
kind: "Interval";
|
|
@@ -555,10 +621,15 @@ interface SetOperationValue {
|
|
|
555
621
|
left: Value;
|
|
556
622
|
right: Value;
|
|
557
623
|
}
|
|
624
|
+
interface FilteredSetSource {
|
|
625
|
+
names: string;
|
|
626
|
+
predicate: string;
|
|
627
|
+
}
|
|
558
628
|
interface FilteredSetValue {
|
|
559
629
|
kind: "FilteredSet";
|
|
560
630
|
base: Value;
|
|
561
631
|
test: (element: Value) => boolean;
|
|
632
|
+
source?: FilteredSetSource;
|
|
562
633
|
}
|
|
563
634
|
interface UnionValue {
|
|
564
635
|
kind: "Union";
|
|
@@ -577,30 +648,14 @@ interface LazyFunctionValue {
|
|
|
577
648
|
domain: Value;
|
|
578
649
|
apply: (argument: Value) => Value;
|
|
579
650
|
source?: LazyFunctionSource;
|
|
651
|
+
functionClass?: FunctionClass;
|
|
580
652
|
}
|
|
581
653
|
type Value = boolean | number | string | ModelValue | SetValue | MixedSetValue | FunctionValue | IntervalValue | InfiniteSetValue | SubsetValue | FunctionSetValue | RecordSetValue | ProductSetValue | SequenceSetValue | SetOperationValue | FilteredSetValue | UnionValue | LazyFunctionValue;
|
|
654
|
+
type FunctionClass = "lambda" | "tuple" | "record";
|
|
582
655
|
export declare const formatValue: (value: Value, isStrict?: boolean, isNormalized?: boolean) => string;
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
}
|
|
586
|
-
interface SyntaxFailure {
|
|
656
|
+
interface FingerprintFailure {
|
|
657
|
+
sources: Expression[];
|
|
587
658
|
reason: string;
|
|
588
|
-
line: number;
|
|
589
|
-
column: number;
|
|
590
|
-
isEnd: boolean;
|
|
591
|
-
}
|
|
592
|
-
export declare class TlaSyntaxError extends TlaError {
|
|
593
|
-
failure: SyntaxFailure | undefined;
|
|
594
|
-
constructor(message: string, cause?: unknown, failure?: SyntaxFailure);
|
|
595
|
-
}
|
|
596
|
-
export declare class TlaConfigError extends TlaError {
|
|
597
|
-
constructor(message: string, cause?: unknown);
|
|
598
|
-
}
|
|
599
|
-
export declare class TlaEvaluationError extends TlaError {
|
|
600
|
-
constructor(message: string, cause?: unknown);
|
|
601
|
-
}
|
|
602
|
-
export declare class TlaUnsupportedError extends TlaError {
|
|
603
|
-
constructor(message: string, cause?: unknown);
|
|
604
659
|
}
|
|
605
660
|
interface StateDump {
|
|
606
661
|
path: string;
|
|
@@ -622,33 +677,110 @@ interface CheckOptions {
|
|
|
622
677
|
workers?: number;
|
|
623
678
|
livenessCheck?: "default" | "final";
|
|
624
679
|
dump?: StateDump;
|
|
680
|
+
isTool?: boolean;
|
|
681
|
+
isTraceRecorded?: boolean;
|
|
682
|
+
isSanyReported?: boolean;
|
|
683
|
+
isWarningEnabled?: boolean;
|
|
684
|
+
version?: TlcVersion;
|
|
685
|
+
onProgress?: (progress: CheckProgress) => void;
|
|
686
|
+
}
|
|
687
|
+
interface InitialStatesProgress {
|
|
688
|
+
kind: "initial-states-progress";
|
|
689
|
+
count: number;
|
|
690
|
+
}
|
|
691
|
+
interface InitialStateViolation {
|
|
692
|
+
kind: "initial-state-violation";
|
|
693
|
+
status: "invariant-violation" | "liveness-violation";
|
|
694
|
+
name: string;
|
|
695
|
+
state: Record<string, Value>;
|
|
625
696
|
}
|
|
697
|
+
type OutputLine = string | InitialStatesProgress | InitialStateViolation;
|
|
698
|
+
type CheckProgress = {
|
|
699
|
+
kind: "parsed";
|
|
700
|
+
} | {
|
|
701
|
+
kind: "constant-level-invariant";
|
|
702
|
+
name: string;
|
|
703
|
+
} | {
|
|
704
|
+
kind: "state-level-property";
|
|
705
|
+
name: string;
|
|
706
|
+
} | {
|
|
707
|
+
kind: "liveness-initializing";
|
|
708
|
+
isSymmetric: boolean;
|
|
709
|
+
isConstrained: boolean;
|
|
710
|
+
} | {
|
|
711
|
+
kind: "liveness-prepared";
|
|
712
|
+
branches: number;
|
|
713
|
+
} | {
|
|
714
|
+
kind: "initial-states-started";
|
|
715
|
+
} | InitialStatesProgress | {
|
|
716
|
+
kind: "initial-states-computed";
|
|
717
|
+
initialStates: InitialStates;
|
|
718
|
+
} | {
|
|
719
|
+
kind: "progress";
|
|
720
|
+
statistics: SearchStatistics;
|
|
721
|
+
} | {
|
|
722
|
+
kind: "liveness-started";
|
|
723
|
+
branches: number;
|
|
724
|
+
isComplete: boolean;
|
|
725
|
+
states: number;
|
|
726
|
+
statistics: SearchStatistics;
|
|
727
|
+
} | {
|
|
728
|
+
kind: "liveness-finished";
|
|
729
|
+
} | {
|
|
730
|
+
kind: "warning";
|
|
731
|
+
code: number;
|
|
732
|
+
text: string;
|
|
733
|
+
} | ({
|
|
734
|
+
kind: "java-override";
|
|
735
|
+
} & JavaOverride);
|
|
736
|
+
interface SearchStatistics extends Pick<CheckResult, "generatedStates" | "distinctStates" | "queuedStates" | "depth"> {}
|
|
626
737
|
type CheckStatus = "success" | "assumption-violation" | "invariant-violation" | "property-violation" | "liveness-violation" | "postcondition-violation" | "deadlock" | "error";
|
|
627
738
|
interface TraceStep {
|
|
628
739
|
action: string | undefined;
|
|
629
740
|
label: string | undefined;
|
|
630
741
|
state: Record<string, Value>;
|
|
742
|
+
output?: OutputLine[];
|
|
631
743
|
}
|
|
632
744
|
interface Violation {
|
|
633
745
|
name: string;
|
|
634
746
|
properties?: string[];
|
|
635
747
|
trace: TraceStep[];
|
|
748
|
+
traceOutput?: OutputLine[];
|
|
636
749
|
loopStart: number | undefined;
|
|
637
750
|
loopLabel?: string;
|
|
638
751
|
message?: string;
|
|
639
752
|
counts?: string;
|
|
640
753
|
unwitnessed?: Postcondition;
|
|
754
|
+
postcondition?: Postcondition;
|
|
755
|
+
warning?: {
|
|
756
|
+
code: number;
|
|
757
|
+
text: string;
|
|
758
|
+
};
|
|
641
759
|
}
|
|
642
760
|
interface Postcondition {
|
|
643
761
|
name: string;
|
|
762
|
+
code: number;
|
|
644
763
|
message: string;
|
|
645
764
|
counts?: string;
|
|
646
765
|
}
|
|
647
766
|
interface EvaluationFailure {
|
|
767
|
+
code: number;
|
|
648
768
|
message: string;
|
|
769
|
+
toolMessage: string;
|
|
649
770
|
trace: TraceStep[];
|
|
771
|
+
traceOutput?: OutputLine[];
|
|
650
772
|
initialState: Record<string, Value> | undefined;
|
|
651
773
|
exitCode: number;
|
|
774
|
+
callStack: Expression[] | undefined;
|
|
775
|
+
isCallStackFirst?: boolean;
|
|
776
|
+
fingerprint?: FingerprintFailure;
|
|
777
|
+
traceFailure?: FailureMessage;
|
|
778
|
+
postcondition?: Postcondition;
|
|
779
|
+
isWithoutStatistics?: boolean;
|
|
780
|
+
}
|
|
781
|
+
interface InitialStates {
|
|
782
|
+
generated: number;
|
|
783
|
+
distinct: number;
|
|
652
784
|
}
|
|
653
785
|
interface CheckResult {
|
|
654
786
|
status: CheckStatus;
|
|
@@ -658,9 +790,18 @@ interface CheckResult {
|
|
|
658
790
|
distinctStates: number;
|
|
659
791
|
queuedStates: number;
|
|
660
792
|
depth: number;
|
|
793
|
+
initialStates: InitialStates | undefined;
|
|
661
794
|
outDegrees: number[] | undefined;
|
|
662
795
|
fingerprintDistance: bigint | undefined;
|
|
796
|
+
additionalViolation?: Violation;
|
|
797
|
+
liveCallStack?: Expression[];
|
|
798
|
+
violationOutDegrees?: number[];
|
|
799
|
+
}
|
|
800
|
+
interface FailureMessage {
|
|
801
|
+
code: number;
|
|
802
|
+
message: string;
|
|
803
|
+
toolMessage: string;
|
|
663
804
|
}
|
|
664
805
|
export declare const check: (options: CheckOptions) => Promise<CheckResult>;
|
|
665
806
|
export declare const parseModule: (source: string) => Module;
|
|
666
|
-
export type { CheckOptions, CheckResult, CheckStatus, ConfigValue, ConstantAssignment, EvaluationFailure, ModelConfig, Module, Substitution, TraceStep, Value, Violation };
|
|
807
|
+
export type { CheckOptions, CheckProgress, CheckResult, CheckStatus, ConfigValue, ConstantAssignment, EvaluationFailure, ModelConfig, Module, Substitution, TraceStep, Value, Violation };
|