tla-ts 0.0.8-dev.d9bffda → 0.0.9-dev.0dd11f695

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.
Files changed (119) hide show
  1. package/README.md +30 -0
  2. package/dist/compile.cjs +23 -0
  3. package/dist/compile.js +23 -0
  4. package/dist/deciders.cjs +15 -15
  5. package/dist/deciders.js +40 -40
  6. package/dist/index.cjs +1 -1
  7. package/dist/index.d.cts +80 -10
  8. package/dist/index.d.ts +80 -10
  9. package/dist/index.js +1 -1
  10. package/dist/parallel-worker.cjs +1 -1
  11. package/dist/parallel-worker.js +1 -1
  12. package/dist/prove-worker.cjs +1 -1
  13. package/dist/prove-worker.js +1 -1
  14. package/dist/prove.cjs +116 -36
  15. package/dist/prove.js +116 -36
  16. package/dist/run.cjs +143 -31
  17. package/dist/run.js +143 -31
  18. package/dist/tlapm.cjs +2 -2
  19. package/dist/tlapm.js +1 -1
  20. package/dist/transfer.cjs +128 -103
  21. package/dist/transfer.js +128 -103
  22. package/dist/worker.cjs +7 -7
  23. package/dist/worker.js +7 -7
  24. package/package.json +3 -1
  25. package/src/ast.ts +7 -21
  26. package/src/bags.ts +99 -99
  27. package/src/builtins.ts +44 -75
  28. package/src/bundled-modules.ts +1 -8
  29. package/src/check.ts +605 -311
  30. package/src/cli/options.ts +12 -3
  31. package/src/cli/run.ts +2 -2
  32. package/src/cli/runtime-invariants.ts +135 -0
  33. package/src/cli/shared.ts +20 -9
  34. package/src/cli/tlc-arguments.ts +646 -0
  35. package/src/cli/tlc-usage.ts +362 -0
  36. package/src/cli/tlc.ts +571 -185
  37. package/src/cli/typescript.ts +26 -0
  38. package/src/cli/xml-exporter.ts +4 -10
  39. package/src/codegen.ts +190 -46
  40. package/src/config.ts +101 -68
  41. package/src/coverage.ts +855 -0
  42. package/src/dependencies.ts +20 -28
  43. package/src/dfid.ts +636 -0
  44. package/src/environment.ts +266 -98
  45. package/src/errors.ts +142 -45
  46. package/src/evaluate.ts +632 -298
  47. package/src/exit-codes.ts +37 -1
  48. package/src/index.ts +3 -0
  49. package/src/instances.ts +85 -9
  50. package/src/java-overrides.ts +2 -12
  51. package/src/json-reader.ts +456 -0
  52. package/src/json.ts +262 -139
  53. package/src/levels.ts +2 -3
  54. package/src/lexer.ts +17 -26
  55. package/src/liveness-checker.ts +10 -18
  56. package/src/liveness.ts +121 -49
  57. package/src/parallel-worker.ts +14 -10
  58. package/src/parallel.ts +41 -17
  59. package/src/parser.ts +436 -90
  60. package/src/pcal/ast.ts +7 -28
  61. package/src/pcal/parse.ts +11 -39
  62. package/src/pcal/tokenize.ts +4 -20
  63. package/src/pcal/translate.ts +10 -42
  64. package/src/pcal/validate.ts +3 -21
  65. package/src/pretty-print.ts +1 -2
  66. package/src/prover/smt/solver/solver.ts +31 -27
  67. package/src/randomization.ts +84 -35
  68. package/src/resolve.ts +18 -60
  69. package/src/runtime.ts +11 -4
  70. package/src/sany/builtins.ts +3 -4
  71. package/src/sany/generator.ts +128 -176
  72. package/src/sany/levels.ts +6 -30
  73. package/src/sany/lexer.ts +7 -23
  74. package/src/sany/linter.ts +31 -29
  75. package/src/sany/modules.ts +1 -5
  76. package/src/sany/nodes.ts +4 -28
  77. package/src/sany/parse-error.ts +44 -100
  78. package/src/sany/report.ts +25 -40
  79. package/src/sany/selectors.ts +8 -22
  80. package/src/sany/source.ts +8 -15
  81. package/src/sany/xml.ts +11 -42
  82. package/src/search.ts +547 -144
  83. package/src/simulate.ts +694 -0
  84. package/src/spec-description.ts +166 -48
  85. package/src/standard-definitions.ts +2 -3
  86. package/src/standard-modules.ts +264 -68
  87. package/src/state-graph.ts +51 -18
  88. package/src/subexpressions.ts +31 -5
  89. package/src/successors.ts +267 -77
  90. package/src/symmetry.ts +31 -8
  91. package/src/tableau.ts +1 -2
  92. package/src/tlc/fingerprint.ts +183 -61
  93. package/src/tlc/jar-data.ts +113 -6
  94. package/src/tlc/messages.ts +122 -37
  95. package/src/tlc/order.ts +33 -38
  96. package/src/tlc/random.ts +16 -16
  97. package/src/tlc/replay.ts +563 -211
  98. package/src/tlc/summary.ts +2 -4
  99. package/src/tlc/tlc-operators.ts +81 -36
  100. package/src/tlc/tlcext-operators.ts +138 -117
  101. package/src/tlc/trace-spec.ts +273 -0
  102. package/src/tlc/value-stream.ts +143 -0
  103. package/src/tlc/version.ts +2 -4
  104. package/src/typescript/actions.ts +494 -0
  105. package/src/typescript/collections.ts +615 -0
  106. package/src/typescript/compile.ts +70 -0
  107. package/src/typescript/context.ts +106 -0
  108. package/src/typescript/emit.ts +122 -0
  109. package/src/typescript/expressions.ts +508 -0
  110. package/src/typescript/formula.ts +160 -0
  111. package/src/typescript/functions.ts +295 -0
  112. package/src/typescript/model.ts +164 -0
  113. package/src/typescript/names.ts +116 -0
  114. package/src/typescript/program.ts +51 -0
  115. package/src/typescript/properties.ts +148 -0
  116. package/src/typescript/scope.ts +117 -0
  117. package/src/typescript/steps.ts +175 -0
  118. package/src/typescript/types.ts +178 -0
  119. package/src/values.ts +832 -255
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("./worker.cjs"),t=require("./transfer.cjs"),n=require("./prove.cjs");exports.TlaConfigError=e.h,exports.TlaError=e.g,exports.TlaEvaluationError=e._,exports.TlaSyntaxError=e.O,exports.TlaUnsupportedError=e.A,exports.check=n.m,exports.formatValue=t.jt,exports.parseConfig=n.h,exports.parseModule=t.V,exports.prove=n.r;
9
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./worker.cjs"),t=require("./transfer.cjs"),n=require("./prove.cjs");exports.TlaConfigError=e._,exports.TlaError=e.y,exports.TlaEvaluationError=e.b,exports.TlaSyntaxError=e.F,exports.TlaUnsupportedError=e.B,exports.check=n.m,exports.formatValue=t.Ot,exports.parseConfig=t.en,exports.parseModule=t.V,exports.prove=n.r;
package/dist/index.d.cts CHANGED
@@ -6,6 +6,7 @@
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
+ import "@typescript/typescript6";
9
10
  interface LocalResolution {
10
11
  kind: "Local";
11
12
  }
@@ -106,6 +107,7 @@ interface CaseExpression {
106
107
  kind: "Case";
107
108
  arms: CaseArm[];
108
109
  other: Expression | undefined;
110
+ otherRange?: SourceRange;
109
111
  location: SourceLocation;
110
112
  }
111
113
  interface LetExpression {
@@ -261,6 +263,7 @@ interface LabelExpression {
261
263
  name: string;
262
264
  params: string[];
263
265
  paramRanges?: SourceRange[];
266
+ head?: SourceRange;
264
267
  body: Expression;
265
268
  location: SourceLocation;
266
269
  }
@@ -298,6 +301,7 @@ interface OperatorDefinition {
298
301
  params: OperatorParam[];
299
302
  body: Expression;
300
303
  bodyRange?: SourceRange;
304
+ head?: SourceRange;
301
305
  isLocal: boolean;
302
306
  isRecursive: boolean;
303
307
  location: SourceLocation;
@@ -439,6 +443,7 @@ type ModuleUnit = {
439
443
  } | {
440
444
  kind: "Recursive";
441
445
  declarations: Declaration[];
446
+ location: SourceLocation;
442
447
  } | {
443
448
  kind: "Definition";
444
449
  definition: Definition;
@@ -511,6 +516,7 @@ interface ModelConfig {
511
516
  actionConstraints: string[];
512
517
  constants: ConstantAssignment[];
513
518
  substitutions: Substitution[];
519
+ rawConstants: string[];
514
520
  checkDeadlock: boolean;
515
521
  symmetry: string | undefined;
516
522
  view: string | undefined;
@@ -529,6 +535,13 @@ interface SyntaxFailure {
529
535
  line: number;
530
536
  column: number;
531
537
  isEnd: boolean;
538
+ proof?: {
539
+ stop: {
540
+ line: number;
541
+ column: number;
542
+ };
543
+ exception: string;
544
+ };
532
545
  }
533
546
  interface SanyError {
534
547
  location: string;
@@ -570,6 +583,8 @@ interface LazySet {
570
583
  interface SetValue {
571
584
  kind: "Set";
572
585
  elements: Value[];
586
+ writtenElements: Value[] | undefined;
587
+ isNormalized: boolean;
573
588
  hash: number;
574
589
  fingerprint: number;
575
590
  isFingerprinted: boolean;
@@ -586,6 +601,7 @@ interface FunctionValue {
586
601
  fingerprint: number;
587
602
  writtenKeys: Value[] | undefined;
588
603
  functionClass: FunctionClass | undefined;
604
+ lambdaDomain: Value | undefined;
589
605
  isFingerprinted: boolean;
590
606
  }
591
607
  interface IntervalValue {
@@ -632,7 +648,7 @@ interface FilteredSetSource {
632
648
  interface FilteredSetValue extends LazySet {
633
649
  kind: "FilteredSet";
634
650
  base: Value;
635
- test: (element: Value) => boolean;
651
+ test: (element: Value, isMember: boolean) => boolean;
636
652
  source?: FilteredSetSource;
637
653
  }
638
654
  interface UnionValue extends LazySet {
@@ -651,6 +667,7 @@ interface LazyFunctionValue {
651
667
  kind: "LazyFunction";
652
668
  domain: Value;
653
669
  apply: (argument: Value) => Value;
670
+ boundTupleLengths?: (number | undefined)[];
654
671
  source?: LazyFunctionSource;
655
672
  functionClass?: FunctionClass;
656
673
  enumerated?: FunctionValue;
@@ -659,22 +676,47 @@ interface LazyFunctionValue {
659
676
  type Value = boolean | number | string | ModelValue | SetValue | MixedSetValue | FunctionValue | IntervalValue | InfiniteSetValue | SubsetValue | FunctionSetValue | RecordSetValue | ProductSetValue | SequenceSetValue | SetOperationValue | FilteredSetValue | UnionValue | LazyFunctionValue;
660
677
  type FunctionClass = "lambda" | "tuple" | "record";
661
678
  export declare const formatValue: (value: Value, isStrict?: boolean, isNormalized?: boolean) => string;
662
- interface FingerprintFailure {
663
- sources: Expression[];
664
- reason: string;
665
- }
666
679
  interface JavaOverride {
667
680
  module: string;
668
681
  operator: string;
669
682
  signature: string;
670
683
  isMatched: boolean;
671
684
  }
685
+ interface FingerprintFailure {
686
+ sources: Expression[];
687
+ reason: string;
688
+ }
689
+ type CoverageKind = "init" | "next" | "invariant" | "constraint" | "implied";
690
+ interface CoverageReport {
691
+ variables: CoverageVariable[];
692
+ relations: CoverageRelationReport[];
693
+ }
694
+ interface CoverageVariable {
695
+ label: string;
696
+ distinct: number;
697
+ }
698
+ interface CoverageRelationReport {
699
+ kind: CoverageKind;
700
+ label: string;
701
+ distinct: number;
702
+ generated: number;
703
+ expressions: CoverageExpression[];
704
+ }
705
+ interface CoverageExpression {
706
+ location: string;
707
+ depth: number;
708
+ count: number;
709
+ cost: number;
710
+ }
672
711
  interface StateDump {
673
712
  path: string;
674
713
  dot?: boolean;
675
714
  colorize?: boolean;
676
715
  actionLabels?: boolean;
677
716
  snapshot?: boolean;
717
+ constrained?: boolean;
718
+ stuttering?: boolean;
719
+ strict?: boolean;
678
720
  }
679
721
  interface FailureMessage {
680
722
  code: number;
@@ -689,18 +731,36 @@ interface CheckOptions {
689
731
  onPrint?: (text: string) => void;
690
732
  onPause?: () => void;
691
733
  readFile?: (path: string) => string | undefined;
692
- writeFile?: (path: string, content: string) => void;
734
+ writeFile?: (path: string, content: string | Uint8Array) => void;
735
+ makeDirectory?: (path: string) => void;
693
736
  seed?: bigint;
694
737
  workers?: number;
695
- livenessCheck?: "default" | "final";
738
+ livenessCheck?: "default" | "final" | "off";
739
+ fingerprintPolynomial?: number;
740
+ isLazyValueExpanded?: boolean;
741
+ isViewPrinted?: boolean;
742
+ maxSetSize?: number;
696
743
  dump?: StateDump;
697
744
  isTool?: boolean;
698
- isTraceRecorded?: boolean;
745
+ isContinued?: boolean;
746
+ moduleOperators?: ModuleOperator[];
747
+ traceSpec?: TraceSpecOptions;
699
748
  isSanyReported?: boolean;
700
749
  isWarningEnabled?: boolean;
750
+ coverage?: number;
701
751
  version?: TlcVersion;
702
752
  onProgress?: (progress: CheckProgress) => void;
703
753
  }
754
+ interface TraceSpecOptions {
755
+ module: string;
756
+ traceFile?: string;
757
+ }
758
+ interface ModuleOperator {
759
+ kind: "postcondition" | "constraint" | "view";
760
+ module: string;
761
+ operator: string;
762
+ constants?: Record<string, string>;
763
+ }
704
764
  interface InitialStatesProgress {
705
765
  kind: "initial-states-progress";
706
766
  count: number;
@@ -743,14 +803,21 @@ type CheckProgress = {
743
803
  statistics: SearchStatistics;
744
804
  } | {
745
805
  kind: "liveness-finished";
806
+ } | {
807
+ kind: "sequential-fallback";
808
+ string: string;
746
809
  } | {
747
810
  kind: "warning";
748
811
  code: number;
749
812
  text: string;
813
+ } | {
814
+ kind: "violation";
815
+ status: CheckStatus;
816
+ violation: Violation;
750
817
  } | ({
751
818
  kind: "java-override";
752
819
  } & JavaOverride);
753
- interface SearchStatistics extends Pick<CheckResult, "generatedStates" | "distinctStates" | "queuedStates" | "depth"> {}
820
+ interface SearchStatistics extends Pick<CheckResult, "generatedStates" | "distinctStates" | "queuedStates" | "depth" | "coverage"> {}
754
821
  type CheckStatus = "success" | "assumption-violation" | "invariant-violation" | "property-violation" | "liveness-violation" | "postcondition-violation" | "deadlock" | "error";
755
822
  interface TraceStep {
756
823
  action: string | undefined;
@@ -763,6 +830,7 @@ interface Violation {
763
830
  properties?: string[];
764
831
  trace: TraceStep[];
765
832
  traceOutput?: OutputLine[];
833
+ postconditionOutput?: OutputLine[];
766
834
  loopStart: number | undefined;
767
835
  loopLabel?: string;
768
836
  message?: string;
@@ -813,6 +881,8 @@ interface CheckResult {
813
881
  additionalViolation?: Violation;
814
882
  liveCallStack?: Expression[];
815
883
  violationOutDegrees?: number[];
884
+ traceSpec?: string;
885
+ coverage?: CoverageReport;
816
886
  }
817
887
  export declare const check: (options: CheckOptions) => Promise<CheckResult>;
818
888
  export declare const parseModule: (source: string) => Module;
@@ -848,4 +918,4 @@ interface ProveOptions {
848
918
  workers?: number;
849
919
  }
850
920
  export declare const prove: (options: ProveOptions) => Promise<ProveResult>;
851
- export type { CheckOptions, CheckProgress, CheckResult, CheckStatus, ConfigValue, ConstantAssignment, EvaluationFailure, ModelConfig, Module, ProofObligation, ProofStatus, ProveOptions, ProveResult, ProvedObligation, Substitution, TraceStep, TrivialObligation, UnprovedObligation, Value, Violation };
921
+ export type { CheckOptions, CheckProgress, CheckResult, CheckStatus, ConfigValue, ConstantAssignment, CoverageReport, EvaluationFailure, ModelConfig, Module, ModuleOperator, ProofObligation, ProofStatus, ProveOptions, ProveResult, ProvedObligation, Substitution, TraceSpecOptions, TraceStep, TrivialObligation, UnprovedObligation, Value, Violation };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@
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
+ import ts from "@typescript/typescript6";
9
10
  interface LocalResolution {
10
11
  kind: "Local";
11
12
  }
@@ -106,6 +107,7 @@ interface CaseExpression {
106
107
  kind: "Case";
107
108
  arms: CaseArm[];
108
109
  other: Expression | undefined;
110
+ otherRange?: SourceRange;
109
111
  location: SourceLocation;
110
112
  }
111
113
  interface LetExpression {
@@ -261,6 +263,7 @@ interface LabelExpression {
261
263
  name: string;
262
264
  params: string[];
263
265
  paramRanges?: SourceRange[];
266
+ head?: SourceRange;
264
267
  body: Expression;
265
268
  location: SourceLocation;
266
269
  }
@@ -298,6 +301,7 @@ interface OperatorDefinition {
298
301
  params: OperatorParam[];
299
302
  body: Expression;
300
303
  bodyRange?: SourceRange;
304
+ head?: SourceRange;
301
305
  isLocal: boolean;
302
306
  isRecursive: boolean;
303
307
  location: SourceLocation;
@@ -439,6 +443,7 @@ type ModuleUnit = {
439
443
  } | {
440
444
  kind: "Recursive";
441
445
  declarations: Declaration[];
446
+ location: SourceLocation;
442
447
  } | {
443
448
  kind: "Definition";
444
449
  definition: Definition;
@@ -511,6 +516,7 @@ interface ModelConfig {
511
516
  actionConstraints: string[];
512
517
  constants: ConstantAssignment[];
513
518
  substitutions: Substitution[];
519
+ rawConstants: string[];
514
520
  checkDeadlock: boolean;
515
521
  symmetry: string | undefined;
516
522
  view: string | undefined;
@@ -529,6 +535,13 @@ interface SyntaxFailure {
529
535
  line: number;
530
536
  column: number;
531
537
  isEnd: boolean;
538
+ proof?: {
539
+ stop: {
540
+ line: number;
541
+ column: number;
542
+ };
543
+ exception: string;
544
+ };
532
545
  }
533
546
  interface SanyError {
534
547
  location: string;
@@ -570,6 +583,8 @@ interface LazySet {
570
583
  interface SetValue {
571
584
  kind: "Set";
572
585
  elements: Value[];
586
+ writtenElements: Value[] | undefined;
587
+ isNormalized: boolean;
573
588
  hash: number;
574
589
  fingerprint: number;
575
590
  isFingerprinted: boolean;
@@ -586,6 +601,7 @@ interface FunctionValue {
586
601
  fingerprint: number;
587
602
  writtenKeys: Value[] | undefined;
588
603
  functionClass: FunctionClass | undefined;
604
+ lambdaDomain: Value | undefined;
589
605
  isFingerprinted: boolean;
590
606
  }
591
607
  interface IntervalValue {
@@ -632,7 +648,7 @@ interface FilteredSetSource {
632
648
  interface FilteredSetValue extends LazySet {
633
649
  kind: "FilteredSet";
634
650
  base: Value;
635
- test: (element: Value) => boolean;
651
+ test: (element: Value, isMember: boolean) => boolean;
636
652
  source?: FilteredSetSource;
637
653
  }
638
654
  interface UnionValue extends LazySet {
@@ -651,6 +667,7 @@ interface LazyFunctionValue {
651
667
  kind: "LazyFunction";
652
668
  domain: Value;
653
669
  apply: (argument: Value) => Value;
670
+ boundTupleLengths?: (number | undefined)[];
654
671
  source?: LazyFunctionSource;
655
672
  functionClass?: FunctionClass;
656
673
  enumerated?: FunctionValue;
@@ -659,22 +676,47 @@ interface LazyFunctionValue {
659
676
  type Value = boolean | number | string | ModelValue | SetValue | MixedSetValue | FunctionValue | IntervalValue | InfiniteSetValue | SubsetValue | FunctionSetValue | RecordSetValue | ProductSetValue | SequenceSetValue | SetOperationValue | FilteredSetValue | UnionValue | LazyFunctionValue;
660
677
  type FunctionClass = "lambda" | "tuple" | "record";
661
678
  export declare const formatValue: (value: Value, isStrict?: boolean, isNormalized?: boolean) => string;
662
- interface FingerprintFailure {
663
- sources: Expression[];
664
- reason: string;
665
- }
666
679
  interface JavaOverride {
667
680
  module: string;
668
681
  operator: string;
669
682
  signature: string;
670
683
  isMatched: boolean;
671
684
  }
685
+ interface FingerprintFailure {
686
+ sources: Expression[];
687
+ reason: string;
688
+ }
689
+ type CoverageKind = "init" | "next" | "invariant" | "constraint" | "implied";
690
+ interface CoverageReport {
691
+ variables: CoverageVariable[];
692
+ relations: CoverageRelationReport[];
693
+ }
694
+ interface CoverageVariable {
695
+ label: string;
696
+ distinct: number;
697
+ }
698
+ interface CoverageRelationReport {
699
+ kind: CoverageKind;
700
+ label: string;
701
+ distinct: number;
702
+ generated: number;
703
+ expressions: CoverageExpression[];
704
+ }
705
+ interface CoverageExpression {
706
+ location: string;
707
+ depth: number;
708
+ count: number;
709
+ cost: number;
710
+ }
672
711
  interface StateDump {
673
712
  path: string;
674
713
  dot?: boolean;
675
714
  colorize?: boolean;
676
715
  actionLabels?: boolean;
677
716
  snapshot?: boolean;
717
+ constrained?: boolean;
718
+ stuttering?: boolean;
719
+ strict?: boolean;
678
720
  }
679
721
  interface FailureMessage {
680
722
  code: number;
@@ -689,18 +731,36 @@ interface CheckOptions {
689
731
  onPrint?: (text: string) => void;
690
732
  onPause?: () => void;
691
733
  readFile?: (path: string) => string | undefined;
692
- writeFile?: (path: string, content: string) => void;
734
+ writeFile?: (path: string, content: string | Uint8Array) => void;
735
+ makeDirectory?: (path: string) => void;
693
736
  seed?: bigint;
694
737
  workers?: number;
695
- livenessCheck?: "default" | "final";
738
+ livenessCheck?: "default" | "final" | "off";
739
+ fingerprintPolynomial?: number;
740
+ isLazyValueExpanded?: boolean;
741
+ isViewPrinted?: boolean;
742
+ maxSetSize?: number;
696
743
  dump?: StateDump;
697
744
  isTool?: boolean;
698
- isTraceRecorded?: boolean;
745
+ isContinued?: boolean;
746
+ moduleOperators?: ModuleOperator[];
747
+ traceSpec?: TraceSpecOptions;
699
748
  isSanyReported?: boolean;
700
749
  isWarningEnabled?: boolean;
750
+ coverage?: number;
701
751
  version?: TlcVersion;
702
752
  onProgress?: (progress: CheckProgress) => void;
703
753
  }
754
+ interface TraceSpecOptions {
755
+ module: string;
756
+ traceFile?: string;
757
+ }
758
+ interface ModuleOperator {
759
+ kind: "postcondition" | "constraint" | "view";
760
+ module: string;
761
+ operator: string;
762
+ constants?: Record<string, string>;
763
+ }
704
764
  interface InitialStatesProgress {
705
765
  kind: "initial-states-progress";
706
766
  count: number;
@@ -743,14 +803,21 @@ type CheckProgress = {
743
803
  statistics: SearchStatistics;
744
804
  } | {
745
805
  kind: "liveness-finished";
806
+ } | {
807
+ kind: "sequential-fallback";
808
+ string: string;
746
809
  } | {
747
810
  kind: "warning";
748
811
  code: number;
749
812
  text: string;
813
+ } | {
814
+ kind: "violation";
815
+ status: CheckStatus;
816
+ violation: Violation;
750
817
  } | ({
751
818
  kind: "java-override";
752
819
  } & JavaOverride);
753
- interface SearchStatistics extends Pick<CheckResult, "generatedStates" | "distinctStates" | "queuedStates" | "depth"> {}
820
+ interface SearchStatistics extends Pick<CheckResult, "generatedStates" | "distinctStates" | "queuedStates" | "depth" | "coverage"> {}
754
821
  type CheckStatus = "success" | "assumption-violation" | "invariant-violation" | "property-violation" | "liveness-violation" | "postcondition-violation" | "deadlock" | "error";
755
822
  interface TraceStep {
756
823
  action: string | undefined;
@@ -763,6 +830,7 @@ interface Violation {
763
830
  properties?: string[];
764
831
  trace: TraceStep[];
765
832
  traceOutput?: OutputLine[];
833
+ postconditionOutput?: OutputLine[];
766
834
  loopStart: number | undefined;
767
835
  loopLabel?: string;
768
836
  message?: string;
@@ -813,6 +881,8 @@ interface CheckResult {
813
881
  additionalViolation?: Violation;
814
882
  liveCallStack?: Expression[];
815
883
  violationOutDegrees?: number[];
884
+ traceSpec?: string;
885
+ coverage?: CoverageReport;
816
886
  }
817
887
  export declare const check: (options: CheckOptions) => Promise<CheckResult>;
818
888
  export declare const parseModule: (source: string) => Module;
@@ -848,4 +918,4 @@ interface ProveOptions {
848
918
  workers?: number;
849
919
  }
850
920
  export declare const prove: (options: ProveOptions) => Promise<ProveResult>;
851
- export type { CheckOptions, CheckProgress, CheckResult, CheckStatus, ConfigValue, ConstantAssignment, EvaluationFailure, ModelConfig, Module, ProofObligation, ProofStatus, ProveOptions, ProveResult, ProvedObligation, Substitution, TraceStep, TrivialObligation, UnprovedObligation, Value, Violation };
921
+ export type { CheckOptions, CheckProgress, CheckResult, CheckStatus, ConfigValue, ConstantAssignment, CoverageReport, EvaluationFailure, ModelConfig, Module, ModuleOperator, ProofObligation, ProofStatus, ProveOptions, ProveResult, ProvedObligation, Substitution, TraceSpecOptions, TraceStep, TrivialObligation, UnprovedObligation, Value, Violation };
package/dist/index.js 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
- import{A as e,O as t,_ as n,g as r,h as i}from"./worker.js";import{V as a,jt as o}from"./transfer.js";import{h as s,m as c,r as l}from"./prove.js";export{i as TlaConfigError,r as TlaError,n as TlaEvaluationError,t as TlaSyntaxError,e as TlaUnsupportedError,c as check,o as formatValue,s as parseConfig,a as parseModule,l as prove};
9
+ import{B as e,F as t,_ as n,b as r,y as i}from"./worker.js";import{Ot as a,V as o,en as s}from"./transfer.js";import{m as c,r as l}from"./prove.js";export{n as TlaConfigError,i as TlaError,r as TlaEvaluationError,t as TlaSyntaxError,e as TlaUnsupportedError,c as check,a as formatValue,s as parseConfig,o as parseModule,l as prove};
@@ -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
- const e=require("./worker.cjs"),t=require("./transfer.cjs"),n=(n,r)=>{let i=new Map(n.modules),a=e=>i.get(e),o=new Map(n.classes),s=t.N(n.source,a);t.zt(s.getStringOrder(n.config)),t.Bt(n.version);let c=t.Pt(),l=t.M(n.config,{source:n.source,loadModule:a,order:s,loadClass:e=>o.get(e),print:()=>{},files:{readFile:void 0,writeFile:void 0},isTool:n.isTool,isTraceRecorded:n.isTraceRecorded,isWarningEnabled:n.isWarningEnabled,version:n.version}).environment,u=t.h(n.config,l,()=>s.getDeclarationOrder(`variable`)),d=u?.spec.next;if(!u||d===void 0)return r.postMessage({type:`abort`});let f=n.index,p=t.Tt(),m=t.t(l.variables.length),h={fingerprints:n.fingerprints},g=n.requests,_=n.remaining,v=u.isSymmetric?t.r():void 0,y=/* @__PURE__ */ new Int32Array(2),b={resume:()=>{},loot:e=>{}};n.ports.forEach(e=>{e?.addEventListener(`message`,e=>b.loot(e.data)),e?.start?.()});let x={states:m(n.seed).map(p)},S=e.t(),C=(e,r)=>{let i=Atomics.load(g,f)-1,a=Math.floor((e.end-e.origin-1)/2),o=t.n(),s=e.states.slice(e.end-a,e.end),c=a>0&&s.every(o.encode);c&&(e.end-=a);let l=c?o.finish():t.n().finish();n.ports[i]?.postMessage(l,[l.words.buffer]),Atomics.store(g,f,r),Atomics.notify(g,f)},w=e=>{Atomics.store(_,f,0),Atomics.compareExchange(g,f,0,-1)!==0&&C(e,-1)},T=e=>{Atomics.store(_,f,e.end-e.origin),Atomics.store(g,f,0)},E=e=>{for(;e.origin<e.end;e.origin++){let r=e.states[e.origin];if(!e.successors){if(performance.now()>=e.breakAt)return`break`;if(Atomics.load(g,f)>0&&C(e,0),Atomics.store(_,f,e.end-e.origin-1),e.successors=t.st(d,r,l,u.spec.scope),e.generated+=e.successors.length,e.successors.length===0&&n.config.checkDeadlock)return}let i=e.successors;for(;e.index<i.length;e.index++){if(t.s(h.fingerprints))return`paused`;let n=i[e.index];if(u.findViolatedActionProperty(r,n.state))return;if(!u.satisfiesActionConstraints(r,n.state)){if(u.findViolatedInvariant(n.state,r))return;continue}if(v&&(t.c(n.state,y),!v.insert(y[0],y[1])))continue;p(n.state);let a=u.getFingerprintState(n.state);if(t.c(a,y),t.o(h.fingerprints,y[0],y[1])){if(u.findViolatedInvariant(n.state,r))return;u.satisfiesConstraints(n.state,r)&&(e.next.push(n.state),e.fingerprintStates.push(a),e.added++)}}e.outDegrees[Math.min(e.added,31)]++,e.successors=void 0,e.index=0,e.added=0}return`done`},D=async e=>{let t=/* @__PURE__ */ new Set;for(;;){let r=n.ports.reduce((e,n,r)=>!n||t.has(r)||Atomics.load(_,r)<2?e:e===void 0||Atomics.load(_,r)>Atomics.load(_,e)?r:e,void 0);if(r===void 0)return!1;let i=Atomics.compareExchange(g,r,0,f+1);if(i===-1&&t.add(r),i>0&&Atomics.wait(g,r,i),i!==0)continue;let a=await new Promise(e=>b.loot=e);if(a.count===0)t.add(r);else return e.states=m(a).map(p),e.origin=0,e.end=e.states.length,T(e),!0}},O=e=>r.postMessage(e,e.type===`level`?[e.fingerprints.buffer]:[]),k=async()=>{let e={states:x.states,origin:0,end:x.states.length,successors:void 0,index:0,added:0,generated:0,outDegrees:Array.from({length:32},()=>0),next:[],fingerprintStates:[],breakAt:performance.now()+100};for(;;){let t=E(e);if(t===void 0)return;if(t===`break`)await S(),e.breakAt=performance.now()+100;else if(w(e),t===`paused`){let t=new Promise(e=>b.resume=e);O({type:`paused`}),await t,T(e)}else if(!await D(e))break}if(t.Pt()===c)return x.states=e.next,Atomics.store(_,f,x.states.length),{type:`level`,generated:e.generated,added:e.next.length,outDegrees:e.outDegrees,fingerprints:u.getStoredFingerprints(e.next,e.fingerprintStates)}},A=()=>{k().then(e=>O(e??{type:`abort`}),()=>O({type:`abort`}))};r.addEventListener(`message`,e=>{let t=e.data;t.type===`level`&&A(),t.type===`resize`&&(h.fingerprints=t.fingerprints,b.resume())}),Atomics.store(_,f,x.states.length),O({type:`ready`})};e.n().then(e=>{let t=r=>{let i=r.data;if(i.type===`start`){e.removeEventListener?.(`message`,t);try{n(i,e)}catch{e.postMessage({type:`abort`})}}};e.addEventListener(`message`,t),e.start?.()});
9
+ const e=require("./worker.cjs"),t=require("./transfer.cjs"),n=(n,r)=>{let i=new Map(n.modules),a=e=>i.get(e),o=new Map(n.classes),s=t.z(n.source,a);t.Rt(s.getStringOrder(n.config)),t.zt(n),t.St(n.fingerprintPolynomial??0),t.kt();let c=t.R(n.config,{source:n.source,loadModule:a,order:s,loadClass:e=>o.get(e),print:()=>{},files:{readFile:void 0,writeFile:void 0,makeDirectory:void 0},isTool:n.isTool,traceFile:n.traceFile,isWarningEnabled:n.isWarningEnabled,version:n.version}),l=c.environment,u=t.h(n.config,l,c.variableLocations,()=>s.getDeclarationOrder(`variable`)),d=u?.spec.next;if(!u||d===void 0)return r.postMessage({type:`abort`});let f=n.index,p=t.wt(),m=t.t(l.variables.length),h={fingerprints:n.fingerprints},g=n.requests,_=n.remaining,v=u.isSymmetric?t.r():void 0,y=/* @__PURE__ */ new Int32Array(2),b={resume:()=>{},loot:e=>{}};n.ports.forEach(e=>{e?.addEventListener(`message`,e=>b.loot(e.data)),e?.start?.()});let x={states:m(n.seed).map(p)},S=e.t(),C=(e,r)=>{let i=Atomics.load(g,f)-1,a=Math.floor((e.end-e.origin-1)/2),o=t.n(),s=e.states.slice(e.end-a,e.end),c=a>0&&s.every(o.encode);c&&(e.end-=a);let l=c?o.finish():t.n().finish();n.ports[i]?.postMessage(l,[l.words.buffer]),Atomics.store(g,f,r),Atomics.notify(g,f)},w=e=>{Atomics.store(_,f,0),Atomics.compareExchange(g,f,0,-1)!==0&&C(e,-1)},T=e=>{Atomics.store(_,f,e.end-e.origin),Atomics.store(g,f,0)},E=e=>{for(;e.origin<e.end;e.origin++){let r=e.states[e.origin];if(!e.successors){if(performance.now()>=e.breakAt)return`break`;if(Atomics.load(g,f)>0&&C(e,0),Atomics.store(_,f,e.end-e.origin-1),e.successors=t.et(d,r,l,u.spec.scope),e.generated+=e.successors.length,e.successors.length===0&&n.config.checkDeadlock)return}let i=e.successors;for(;e.index<i.length;e.index++){if(t.s(h.fingerprints))return`paused`;let n=i[e.index];if(u.findViolatedActionProperty(r,n.state))return;if(!u.satisfiesActionConstraints(r,n.state)){if(u.findViolatedInvariant(n.state,r))return;continue}if(v&&(t.c(n.state,y),!v.insert(y[0],y[1])))continue;p(n.state);let a=u.getFingerprintState(n.state);if(t.c(a,y),t.o(h.fingerprints,y[0],y[1])){if(u.findViolatedInvariant(n.state,r))return;u.satisfiesConstraints(n.state,r)&&(e.next.push(n.state),e.fingerprintStates.push(a),e.added++)}}e.outDegrees[Math.min(e.added,31)]++,e.successors=void 0,e.index=0,e.added=0}return`done`},D=async e=>{let t=/* @__PURE__ */ new Set;for(;;){let r=n.ports.reduce((e,n,r)=>!n||t.has(r)||Atomics.load(_,r)<2?e:e===void 0||Atomics.load(_,r)>Atomics.load(_,e)?r:e,void 0);if(r===void 0)return!1;let i=Atomics.compareExchange(g,r,0,f+1);if(i===-1&&t.add(r),i>0&&Atomics.wait(g,r,i),i!==0)continue;let a=await new Promise(e=>b.loot=e);if(a.count===0)t.add(r);else return e.states=m(a).map(p),e.origin=0,e.end=e.states.length,T(e),!0}},O=e=>r.postMessage(e,e.type===`level`?[e.fingerprints.buffer]:[]),k=async()=>{let e={states:x.states,origin:0,end:x.states.length,successors:void 0,index:0,added:0,generated:0,outDegrees:Array.from({length:32},()=>0),next:[],fingerprintStates:[],breakAt:performance.now()+100};for(;;){let t=E(e);if(t===void 0)return;if(t===`break`)await S(),e.breakAt=performance.now()+100;else if(w(e),t===`paused`){let t=new Promise(e=>b.resume=e);O({type:`paused`}),await t,T(e)}else if(!await D(e))break}let n=t.Pt();return n===void 0?(x.states=e.next,Atomics.store(_,f,x.states.length),{type:`level`,generated:e.generated,added:e.next.length,outDegrees:e.outDegrees,fingerprints:u.getStoredFingerprints(e.next,e.fingerprintStates)}):{type:`abort`,string:n}},A=()=>{k().then(e=>O(e??{type:`abort`}),()=>O({type:`abort`}))};r.addEventListener(`message`,e=>{let t=e.data;t.type===`level`&&A(),t.type===`resize`&&(h.fingerprints=t.fingerprints,b.resume())}),Atomics.store(_,f,x.states.length),O({type:`ready`})};e.n().then(e=>{let t=r=>{let i=r.data;if(i.type===`start`){e.removeEventListener?.(`message`,t);try{n(i,e)}catch{e.postMessage({type:`abort`})}}};e.addEventListener(`message`,t),e.start?.()});
@@ -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
- import{n as e,t}from"./worker.js";import{Bt as n,M as r,N as i,Pt as a,Tt as o,c as s,h as c,n as l,o as u,r as d,s as f,st as p,t as m,zt as h}from"./transfer.js";const g=(e,g)=>{let _=new Map(e.modules),v=e=>_.get(e),y=new Map(e.classes),b=i(e.source,v);h(b.getStringOrder(e.config)),n(e.version);let x=a(),S=r(e.config,{source:e.source,loadModule:v,order:b,loadClass:e=>y.get(e),print:()=>{},files:{readFile:void 0,writeFile:void 0},isTool:e.isTool,isTraceRecorded:e.isTraceRecorded,isWarningEnabled:e.isWarningEnabled,version:e.version}).environment,C=c(e.config,S,()=>b.getDeclarationOrder(`variable`)),w=C?.spec.next;if(!C||w===void 0)return g.postMessage({type:`abort`});let T=e.index,E=o(),D=m(S.variables.length),O={fingerprints:e.fingerprints},k=e.requests,A=e.remaining,j=C.isSymmetric?d():void 0,M=/* @__PURE__ */ new Int32Array(2),N={resume:()=>{},loot:e=>{}};e.ports.forEach(e=>{e?.addEventListener(`message`,e=>N.loot(e.data)),e?.start?.()});let P={states:D(e.seed).map(E)},F=t(),I=(t,n)=>{let r=Atomics.load(k,T)-1,i=Math.floor((t.end-t.origin-1)/2),a=l(),o=t.states.slice(t.end-i,t.end),s=i>0&&o.every(a.encode);s&&(t.end-=i);let c=s?a.finish():l().finish();e.ports[r]?.postMessage(c,[c.words.buffer]),Atomics.store(k,T,n),Atomics.notify(k,T)},L=e=>{Atomics.store(A,T,0),Atomics.compareExchange(k,T,0,-1)!==0&&I(e,-1)},R=e=>{Atomics.store(A,T,e.end-e.origin),Atomics.store(k,T,0)},z=t=>{for(;t.origin<t.end;t.origin++){let n=t.states[t.origin];if(!t.successors){if(performance.now()>=t.breakAt)return`break`;if(Atomics.load(k,T)>0&&I(t,0),Atomics.store(A,T,t.end-t.origin-1),t.successors=p(w,n,S,C.spec.scope),t.generated+=t.successors.length,t.successors.length===0&&e.config.checkDeadlock)return}let r=t.successors;for(;t.index<r.length;t.index++){if(f(O.fingerprints))return`paused`;let e=r[t.index];if(C.findViolatedActionProperty(n,e.state))return;if(!C.satisfiesActionConstraints(n,e.state)){if(C.findViolatedInvariant(e.state,n))return;continue}if(j&&(s(e.state,M),!j.insert(M[0],M[1])))continue;E(e.state);let i=C.getFingerprintState(e.state);if(s(i,M),u(O.fingerprints,M[0],M[1])){if(C.findViolatedInvariant(e.state,n))return;C.satisfiesConstraints(e.state,n)&&(t.next.push(e.state),t.fingerprintStates.push(i),t.added++)}}t.outDegrees[Math.min(t.added,31)]++,t.successors=void 0,t.index=0,t.added=0}return`done`},B=async t=>{let n=/* @__PURE__ */ new Set;for(;;){let r=e.ports.reduce((e,t,r)=>!t||n.has(r)||Atomics.load(A,r)<2?e:e===void 0||Atomics.load(A,r)>Atomics.load(A,e)?r:e,void 0);if(r===void 0)return!1;let i=Atomics.compareExchange(k,r,0,T+1);if(i===-1&&n.add(r),i>0&&Atomics.wait(k,r,i),i!==0)continue;let a=await new Promise(e=>N.loot=e);if(a.count===0)n.add(r);else return t.states=D(a).map(E),t.origin=0,t.end=t.states.length,R(t),!0}},V=e=>g.postMessage(e,e.type===`level`?[e.fingerprints.buffer]:[]),H=async()=>{let e={states:P.states,origin:0,end:P.states.length,successors:void 0,index:0,added:0,generated:0,outDegrees:Array.from({length:32},()=>0),next:[],fingerprintStates:[],breakAt:performance.now()+100};for(;;){let t=z(e);if(t===void 0)return;if(t===`break`)await F(),e.breakAt=performance.now()+100;else if(L(e),t===`paused`){let t=new Promise(e=>N.resume=e);V({type:`paused`}),await t,R(e)}else if(!await B(e))break}if(a()===x)return P.states=e.next,Atomics.store(A,T,P.states.length),{type:`level`,generated:e.generated,added:e.next.length,outDegrees:e.outDegrees,fingerprints:C.getStoredFingerprints(e.next,e.fingerprintStates)}},U=()=>{H().then(e=>V(e??{type:`abort`}),()=>V({type:`abort`}))};g.addEventListener(`message`,e=>{let t=e.data;t.type===`level`&&U(),t.type===`resize`&&(O.fingerprints=t.fingerprints,N.resume())}),Atomics.store(A,T,P.states.length),V({type:`ready`})};e().then(e=>{let t=n=>{let r=n.data;if(r.type===`start`){e.removeEventListener?.(`message`,t);try{g(r,e)}catch{e.postMessage({type:`abort`})}}};e.addEventListener(`message`,t),e.start?.()});
9
+ import{n as e,t}from"./worker.js";import{Pt as n,R as r,Rt as i,St as a,c as o,et as s,h as c,kt as l,n as u,o as d,r as f,s as p,t as m,wt as h,z as g,zt as _}from"./transfer.js";const v=(e,v)=>{let y=new Map(e.modules),b=e=>y.get(e),x=new Map(e.classes),S=g(e.source,b);i(S.getStringOrder(e.config)),_(e),a(e.fingerprintPolynomial??0),l();let C=r(e.config,{source:e.source,loadModule:b,order:S,loadClass:e=>x.get(e),print:()=>{},files:{readFile:void 0,writeFile:void 0,makeDirectory:void 0},isTool:e.isTool,traceFile:e.traceFile,isWarningEnabled:e.isWarningEnabled,version:e.version}),w=C.environment,T=c(e.config,w,C.variableLocations,()=>S.getDeclarationOrder(`variable`)),E=T?.spec.next;if(!T||E===void 0)return v.postMessage({type:`abort`});let D=e.index,O=h(),k=m(w.variables.length),A={fingerprints:e.fingerprints},j=e.requests,M=e.remaining,N=T.isSymmetric?f():void 0,P=/* @__PURE__ */ new Int32Array(2),F={resume:()=>{},loot:e=>{}};e.ports.forEach(e=>{e?.addEventListener(`message`,e=>F.loot(e.data)),e?.start?.()});let I={states:k(e.seed).map(O)},L=t(),R=(t,n)=>{let r=Atomics.load(j,D)-1,i=Math.floor((t.end-t.origin-1)/2),a=u(),o=t.states.slice(t.end-i,t.end),s=i>0&&o.every(a.encode);s&&(t.end-=i);let c=s?a.finish():u().finish();e.ports[r]?.postMessage(c,[c.words.buffer]),Atomics.store(j,D,n),Atomics.notify(j,D)},z=e=>{Atomics.store(M,D,0),Atomics.compareExchange(j,D,0,-1)!==0&&R(e,-1)},B=e=>{Atomics.store(M,D,e.end-e.origin),Atomics.store(j,D,0)},V=t=>{for(;t.origin<t.end;t.origin++){let n=t.states[t.origin];if(!t.successors){if(performance.now()>=t.breakAt)return`break`;if(Atomics.load(j,D)>0&&R(t,0),Atomics.store(M,D,t.end-t.origin-1),t.successors=s(E,n,w,T.spec.scope),t.generated+=t.successors.length,t.successors.length===0&&e.config.checkDeadlock)return}let r=t.successors;for(;t.index<r.length;t.index++){if(p(A.fingerprints))return`paused`;let e=r[t.index];if(T.findViolatedActionProperty(n,e.state))return;if(!T.satisfiesActionConstraints(n,e.state)){if(T.findViolatedInvariant(e.state,n))return;continue}if(N&&(o(e.state,P),!N.insert(P[0],P[1])))continue;O(e.state);let i=T.getFingerprintState(e.state);if(o(i,P),d(A.fingerprints,P[0],P[1])){if(T.findViolatedInvariant(e.state,n))return;T.satisfiesConstraints(e.state,n)&&(t.next.push(e.state),t.fingerprintStates.push(i),t.added++)}}t.outDegrees[Math.min(t.added,31)]++,t.successors=void 0,t.index=0,t.added=0}return`done`},H=async t=>{let n=/* @__PURE__ */ new Set;for(;;){let r=e.ports.reduce((e,t,r)=>!t||n.has(r)||Atomics.load(M,r)<2?e:e===void 0||Atomics.load(M,r)>Atomics.load(M,e)?r:e,void 0);if(r===void 0)return!1;let i=Atomics.compareExchange(j,r,0,D+1);if(i===-1&&n.add(r),i>0&&Atomics.wait(j,r,i),i!==0)continue;let a=await new Promise(e=>F.loot=e);if(a.count===0)n.add(r);else return t.states=k(a).map(O),t.origin=0,t.end=t.states.length,B(t),!0}},U=e=>v.postMessage(e,e.type===`level`?[e.fingerprints.buffer]:[]),W=async()=>{let e={states:I.states,origin:0,end:I.states.length,successors:void 0,index:0,added:0,generated:0,outDegrees:Array.from({length:32},()=>0),next:[],fingerprintStates:[],breakAt:performance.now()+100};for(;;){let t=V(e);if(t===void 0)return;if(t===`break`)await L(),e.breakAt=performance.now()+100;else if(z(e),t===`paused`){let t=new Promise(e=>F.resume=e);U({type:`paused`}),await t,B(e)}else if(!await H(e))break}let t=n();return t===void 0?(I.states=e.next,Atomics.store(M,D,I.states.length),{type:`level`,generated:e.generated,added:e.next.length,outDegrees:e.outDegrees,fingerprints:T.getStoredFingerprints(e.next,e.fingerprintStates)}):{type:`abort`,string:t}},G=()=>{W().then(e=>U(e??{type:`abort`}),()=>U({type:`abort`}))};v.addEventListener(`message`,e=>{let t=e.data;t.type===`level`&&G(),t.type===`resize`&&(A.fingerprints=t.fingerprints,F.resume())}),Atomics.store(M,D,I.states.length),U({type:`ready`})};e().then(e=>{let t=n=>{let r=n.data;if(r.type===`start`){e.removeEventListener?.(`message`,t);try{v(r,e)}catch{e.postMessage({type:`abort`})}}};e.addEventListener(`message`,t),e.start?.()});
@@ -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
- const e=require("./worker.cjs"),t=require("./deciders.cjs"),n=n=>{try{return t.t(n.prover,n.text,{timeLimitMs:n.timeLimitMs})}catch(t){if(t instanceof e.T)return{error:t.message};throw t}};e.n().then(e=>{e.addEventListener(`message`,t=>e.postMessage(n(t.data))),e.start?.()});
9
+ const e=require("./worker.cjs"),t=require("./deciders.cjs"),n=n=>{try{return t.t(n.prover,n.text,{timeLimitMs:n.timeLimitMs})}catch(t){if(t instanceof e.j)return{error:t.message};throw t}};e.n().then(e=>{e.addEventListener(`message`,t=>e.postMessage(n(t.data))),e.start?.()});
@@ -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
- import{T as e,n as t}from"./worker.js";import{t as n}from"./deciders.js";const r=t=>{try{return n(t.prover,t.text,{timeLimitMs:t.timeLimitMs})}catch(t){if(t instanceof e)return{error:t.message};throw t}};t().then(e=>{e.addEventListener(`message`,t=>e.postMessage(r(t.data))),e.start?.()});
9
+ import{j as e,n as t}from"./worker.js";import{t as n}from"./deciders.js";const r=t=>{try{return n(t.prover,t.text,{timeLimitMs:t.timeLimitMs})}catch(t){if(t instanceof e)return{error:t.message};throw t}};t().then(e=>{e.addEventListener(`message`,t=>e.postMessage(r(t.data))),e.start?.()});