tla-ts 0.0.9 → 0.0.10-dev.06b481ee0
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/README.md +30 -1
- package/dist/compile.cjs +23 -0
- package/dist/compile.js +23 -0
- package/dist/deciders.cjs +41 -37
- package/dist/deciders.js +48 -44
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +122 -12
- package/dist/index.d.ts +122 -12
- package/dist/index.js +1 -1
- package/dist/parallel-worker.cjs +1 -1
- package/dist/parallel-worker.js +1 -1
- package/dist/prove-worker.cjs +1 -1
- package/dist/prove-worker.js +1 -1
- package/dist/prove.cjs +2746 -410
- package/dist/prove.js +2745 -409
- package/dist/run.cjs +144 -31
- package/dist/run.js +144 -31
- package/dist/tlapm.cjs +2 -2
- package/dist/tlapm.js +2 -2
- package/dist/transfer.cjs +134 -104
- package/dist/transfer.js +134 -104
- package/dist/worker.cjs +7 -7
- package/dist/worker.js +7 -7
- package/package.json +3 -1
- package/src/ast.ts +56 -60
- package/src/bags.ts +128 -110
- package/src/builtins.ts +31 -77
- package/src/bundled-modules.ts +1 -8
- package/src/check-failure.ts +118 -0
- package/src/check-trace.ts +320 -0
- package/src/check.ts +1156 -888
- package/src/cli/options.ts +12 -32
- package/src/cli/run.ts +0 -2
- package/src/cli/runtime-invariants.ts +100 -0
- package/src/cli/shared.ts +19 -12
- package/src/cli/tlapm.ts +433 -82
- package/src/cli/tlc-arguments.ts +652 -0
- package/src/cli/tlc-output.ts +701 -0
- package/src/cli/tlc-usage.ts +360 -0
- package/src/cli/tlc.ts +330 -659
- package/src/cli/typescript.ts +23 -0
- package/src/cli/xml-exporter.ts +27 -49
- package/src/cli.ts +0 -1
- package/src/codegen.ts +217 -82
- package/src/config.ts +140 -109
- package/src/coverage.ts +1019 -0
- package/src/dependencies.ts +101 -66
- package/src/dfid.ts +683 -0
- package/src/environment-config.ts +315 -0
- package/src/environment.ts +263 -370
- package/src/errors.ts +107 -57
- package/src/evaluate.ts +898 -369
- package/src/exit-codes.ts +63 -13
- package/src/fingerprints.ts +75 -11
- package/src/index.ts +3 -0
- package/src/instances.ts +137 -22
- package/src/java-hash.ts +21 -0
- package/src/java-overrides.ts +6 -21
- package/src/json-reader.ts +455 -0
- package/src/json.ts +252 -139
- package/src/levels.ts +231 -154
- package/src/lexer.ts +83 -101
- package/src/liveness-checker.ts +743 -322
- package/src/liveness.ts +230 -133
- package/src/obligations/action.ts +17 -44
- package/src/obligations/anonymize.ts +120 -95
- package/src/obligations/enabled-axioms.ts +218 -0
- package/src/obligations/equality.ts +1 -3
- package/src/obligations/expression.ts +37 -26
- package/src/obligations/format.ts +0 -10
- package/src/obligations/generate.ts +66 -64
- package/src/obligations/index.ts +39 -20
- package/src/obligations/levels.ts +27 -18
- package/src/obligations/module.ts +28 -55
- package/src/obligations/normalize.ts +31 -41
- package/src/obligations/operators.ts +0 -3
- package/src/obligations/pragma.ts +52 -24
- package/src/obligations/printer.ts +94 -63
- package/src/obligations/proof.ts +3 -6
- package/src/obligations/regroup.ts +0 -5
- package/src/obligations/simplify.ts +57 -63
- package/src/obligations/source.ts +121 -95
- package/src/obligations/subexpression.ts +49 -28
- package/src/obligations/substitution.ts +1 -5
- package/src/obligations/temporal.ts +12 -20
- package/src/obligations/tuples.ts +2 -10
- package/src/parallel-worker.ts +36 -60
- package/src/parallel.ts +64 -73
- package/src/parser.ts +1184 -531
- package/src/pcal/ast.ts +53 -86
- package/src/pcal/parse.ts +144 -219
- package/src/pcal/tokenize.ts +91 -131
- package/src/pcal/translate.ts +83 -130
- package/src/pcal/validate.ts +48 -68
- package/src/pretty-print.ts +7 -8
- package/src/prover/decide-pool.ts +8 -13
- package/src/prover/deciders.ts +12 -13
- package/src/prover/first-order.ts +0 -11
- package/src/prover/isabelle/decide.ts +3 -31
- package/src/prover/isabelle/encode.ts +82 -64
- package/src/prover/isabelle/isar/attrib.ts +250 -0
- package/src/prover/isabelle/isar/context.ts +335 -0
- package/src/prover/isabelle/isar/induct.ts +382 -0
- package/src/prover/isabelle/isar/inner-syntax.ts +262 -117
- package/src/prover/isabelle/isar/method.ts +510 -226
- package/src/prover/isabelle/isar/proof.ts +570 -23
- package/src/prover/isabelle/isar/rule-cases.ts +226 -0
- package/src/prover/isabelle/isar/theory.ts +488 -88
- package/src/prover/isabelle/isar/toplevel.ts +331 -0
- package/src/prover/isabelle/isar/type-check.ts +99 -38
- package/src/prover/isabelle/provers/blast/blast.ts +16 -105
- package/src/prover/isabelle/provers/blast/branch.ts +0 -33
- package/src/prover/isabelle/provers/blast/prove.ts +0 -36
- package/src/prover/isabelle/provers/blast/rules.ts +5 -45
- package/src/prover/isabelle/provers/blast/state.ts +1 -29
- package/src/prover/isabelle/provers/blast/term.ts +8 -37
- package/src/prover/isabelle/provers/clasimp.ts +1 -15
- package/src/prover/isabelle/provers/classical.ts +58 -61
- package/src/prover/isabelle/provers/hypsubst.ts +29 -54
- package/src/prover/isabelle/pure/bicompose.ts +24 -39
- package/src/prover/isabelle/pure/consts.ts +0 -8
- package/src/prover/isabelle/pure/conv.ts +2 -18
- package/src/prover/isabelle/pure/drule.ts +95 -45
- package/src/prover/isabelle/pure/envir.ts +2 -53
- package/src/prover/isabelle/pure/goal.ts +1 -9
- package/src/prover/isabelle/pure/interrupt.ts +0 -5
- package/src/prover/isabelle/pure/list.ts +0 -3
- package/src/prover/isabelle/pure/logic.ts +1 -16
- package/src/prover/isabelle/pure/name.ts +1 -10
- package/src/prover/isabelle/pure/net.ts +2 -60
- package/src/prover/isabelle/pure/object-logic.ts +15 -16
- package/src/prover/isabelle/pure/pattern.ts +1 -20
- package/src/prover/isabelle/pure/raw-simplifier.ts +16 -63
- package/src/prover/isabelle/pure/rewriter.ts +34 -77
- package/src/prover/isabelle/pure/search.ts +2 -11
- package/src/prover/isabelle/pure/seq.ts +0 -11
- package/src/prover/isabelle/pure/simplifier.ts +27 -16
- package/src/prover/isabelle/pure/table.ts +2 -33
- package/src/prover/isabelle/pure/tactic.ts +11 -23
- package/src/prover/isabelle/pure/tactical.ts +47 -48
- package/src/prover/isabelle/pure/term-ord.ts +1 -7
- package/src/prover/isabelle/pure/term.ts +4 -47
- package/src/prover/isabelle/pure/thm.ts +26 -48
- package/src/prover/isabelle/pure/type.ts +1 -16
- package/src/prover/isabelle/pure/unify.ts +19 -31
- package/src/prover/isabelle/pure/variable.ts +2 -8
- package/src/prover/isabelle/tla/classical-setup.ts +17 -25
- package/src/prover/isabelle/tla/context.ts +65 -26
- package/src/prover/isabelle/tla/logic-data.ts +1 -1
- package/src/prover/isabelle/tla/logic.ts +53 -32
- package/src/prover/isabelle/tla/simpdata.ts +45 -44
- package/src/prover/isabelle/tools/intuitionistic.ts +28 -21
- package/src/prover/ocaml.ts +4 -7
- package/src/prover/prep/action.ts +33 -66
- package/src/prover/prep/enabled-axioms.ts +22 -20
- package/src/prover/prep/fingerprint.ts +2 -21
- package/src/prover/prep/level-comparison.ts +8 -12
- package/src/prover/prep/md5.ts +26 -31
- package/src/prover/prep/methods.ts +189 -86
- package/src/prover/prep/normalize.ts +42 -37
- package/src/prover/prove-worker.ts +0 -2
- package/src/prover/prove.ts +398 -133
- package/src/prover/ptl/decide.ts +96 -56
- package/src/prover/ptl/encode.ts +15 -38
- package/src/prover/ptl/sat.ts +24 -32
- package/src/prover/ptl/tableau.ts +40 -28
- package/src/prover/smt/arithmetic.ts +310 -0
- package/src/prover/smt/axioms.ts +12 -15
- package/src/prover/smt/context.ts +60 -32
- package/src/prover/smt/data.ts +517 -401
- package/src/prover/smt/encode.ts +155 -85
- package/src/prover/smt/extensionality.ts +5 -13
- package/src/prover/smt/flatten.ts +7 -28
- package/src/prover/smt/format.ts +33 -14
- package/src/prover/smt/instances.ts +7 -11
- package/src/prover/smt/layout.ts +91 -0
- package/src/prover/smt/rewrite.ts +1021 -658
- package/src/prover/smt/simplify.ts +441 -0
- package/src/prover/smt/solver/ackermannize-bv-tactic.ts +61 -0
- package/src/prover/smt/solver/ackr-helper.ts +179 -0
- package/src/prover/smt/solver/ackr-model-converter.ts +105 -0
- package/src/prover/smt/solver/act-cache.ts +0 -16
- package/src/prover/smt/solver/add-bounds-tactic.ts +59 -0
- package/src/prover/smt/solver/aig-tactic.ts +52 -0
- package/src/prover/smt/solver/aig.ts +889 -0
- package/src/prover/smt/solver/arith-rewriter.ts +626 -56
- package/src/prover/smt/solver/arith-terms.ts +121 -0
- package/src/prover/smt/solver/array-decl-plugin.ts +175 -0
- package/src/prover/smt/solver/array-rewriter.ts +319 -0
- package/src/prover/smt/solver/array.ts +1 -3
- package/src/prover/smt/solver/asserted-formulas.ts +241 -99
- package/src/prover/smt/solver/ast-lt.ts +165 -21
- package/src/prover/smt/solver/ast-util.ts +160 -7
- package/src/prover/smt/solver/ast.ts +1480 -184
- package/src/prover/smt/solver/auf-solver.ts +30 -56
- package/src/prover/smt/solver/bit-blast-tactic.ts +608 -0
- package/src/prover/smt/solver/bit-blaster.ts +871 -0
- package/src/prover/smt/solver/blast-term-ite.ts +47 -0
- package/src/prover/smt/solver/bound-manager.ts +196 -0
- package/src/prover/smt/solver/bound-simplifier.ts +598 -0
- package/src/prover/smt/solver/bv-bound-chk.ts +492 -0
- package/src/prover/smt/solver/bv-decl-plugin.ts +341 -0
- package/src/prover/smt/solver/bv-divrem-bounds.ts +95 -0
- package/src/prover/smt/solver/bv-rewriter.ts +1901 -0
- package/src/prover/smt/solver/bv1-blast.ts +214 -0
- package/src/prover/smt/solver/bv2fpa-converter.ts +174 -0
- package/src/prover/smt/solver/bv2int-rewriter.ts +544 -0
- package/src/prover/smt/solver/bv2real-rewriter.ts +533 -0
- package/src/prover/smt/solver/card2bv.ts +127 -0
- package/src/prover/smt/solver/case-split-queue.ts +0 -10
- package/src/prover/smt/solver/cg-table.ts +39 -42
- package/src/prover/smt/solver/check-logic.ts +330 -0
- package/src/prover/smt/solver/clause.ts +0 -27
- package/src/prover/smt/solver/cofactor-elim-term-ite.ts +293 -0
- package/src/prover/smt/solver/conflict-resolution.ts +78 -11
- package/src/prover/smt/solver/context.ts +600 -187
- package/src/prover/smt/solver/ctx-simplify.ts +34 -52
- package/src/prover/smt/solver/ctx-solver-simplify.ts +122 -0
- package/src/prover/smt/solver/datatype-decl-plugin.ts +580 -0
- package/src/prover/smt/solver/datatype-rewriter.ts +82 -0
- package/src/prover/smt/solver/demodulator.ts +786 -0
- package/src/prover/smt/solver/dependent-expr-state.ts +93 -0
- package/src/prover/smt/solver/der.ts +39 -30
- package/src/prover/smt/solver/diff-neq.ts +205 -0
- package/src/prover/smt/solver/distribute-forall.ts +57 -0
- package/src/prover/smt/solver/dom-simplify.ts +511 -0
- package/src/prover/smt/solver/dt2bv-tactic.ts +296 -0
- package/src/prover/smt/solver/dyn-ack.ts +0 -11
- package/src/prover/smt/solver/e-matching.ts +9 -41
- package/src/prover/smt/solver/elim-bounds.ts +89 -0
- package/src/prover/smt/solver/elim-small-bv-tactic.ts +129 -0
- package/src/prover/smt/solver/elim-term-ite-tactic.ts +48 -0
- package/src/prover/smt/solver/elim-uncnstr.ts +542 -0
- package/src/prover/smt/solver/enode.ts +100 -23
- package/src/prover/smt/solver/eq2bv-tactic.ts +218 -0
- package/src/prover/smt/solver/euf/arith-axioms.ts +403 -0
- package/src/prover/smt/solver/euf/arith-internalize.ts +653 -0
- package/src/prover/smt/solver/euf/arith-solver.ts +889 -0
- package/src/prover/smt/solver/euf/array-axioms.ts +527 -0
- package/src/prover/smt/solver/euf/array-internalize.ts +428 -0
- package/src/prover/smt/solver/euf/array-solver.ts +306 -0
- package/src/prover/smt/solver/euf/bv-ackerman.ts +162 -0
- package/src/prover/smt/solver/euf/bv-internalize.ts +748 -0
- package/src/prover/smt/solver/euf/bv-solver.ts +449 -0
- package/src/prover/smt/solver/euf/dt-solver.ts +618 -0
- package/src/prover/smt/solver/euf/egraph.ts +901 -0
- package/src/prover/smt/solver/euf/euf-solver.ts +1204 -0
- package/src/prover/smt/solver/euf/fpa-solver.ts +317 -0
- package/src/prover/smt/solver/euf/mam.ts +1046 -0
- package/src/prover/smt/solver/euf/q-ematch.ts +829 -0
- package/src/prover/smt/solver/euf/q-mbi.ts +587 -0
- package/src/prover/smt/solver/euf/q-model-fixer.ts +296 -0
- package/src/prover/smt/solver/euf/q-solver.ts +361 -0
- package/src/prover/smt/solver/euf/th-solver.ts +328 -0
- package/src/prover/smt/solver/euf/th-solvers.ts +30 -0
- package/src/prover/smt/solver/expr-ref.ts +0 -5
- package/src/prover/smt/solver/expr-safe-replace.ts +26 -7
- package/src/prover/smt/solver/expr2polynomial.ts +271 -0
- package/src/prover/smt/solver/factor.ts +163 -0
- package/src/prover/smt/solver/fd-solver.ts +734 -0
- package/src/prover/smt/solver/fingerprints.ts +15 -26
- package/src/prover/smt/solver/fix-dl-var.ts +147 -0
- package/src/prover/smt/solver/flat-literals.ts +0 -9
- package/src/prover/smt/solver/fm-tactic.ts +884 -0
- package/src/prover/smt/solver/fpa-decl-plugin.ts +618 -0
- package/src/prover/smt/solver/fpa-rewriter.ts +639 -0
- package/src/prover/smt/solver/fpa2bv-converter.ts +2251 -0
- package/src/prover/smt/solver/fpa2bv-rewriter.ts +349 -0
- package/src/prover/smt/solver/fpa2bv-tactic.ts +73 -0
- package/src/prover/smt/solver/goal.ts +179 -28
- package/src/prover/smt/solver/goal2nlsat.ts +216 -0
- package/src/prover/smt/solver/guard-set.ts +219 -0
- package/src/prover/smt/solver/hash.ts +0 -9
- package/src/prover/smt/solver/hashtable.ts +30 -23
- package/src/prover/smt/solver/inf-eps.ts +63 -0
- package/src/prover/smt/solver/inj-axiom.ts +101 -0
- package/src/prover/smt/solver/internalizer.ts +113 -133
- package/src/prover/smt/solver/lackr.ts +381 -0
- package/src/prover/smt/solver/lbool.ts +0 -2
- package/src/prover/smt/solver/lia2card.ts +268 -0
- package/src/prover/smt/solver/lia2pb.ts +154 -0
- package/src/prover/smt/solver/literal.ts +0 -4
- package/src/prover/smt/solver/logic-tactics.ts +355 -0
- package/src/prover/smt/solver/lp/bound-propagator.ts +7 -26
- package/src/prover/smt/solver/lp/constraints.ts +1 -8
- package/src/prover/smt/solver/lp/containers.ts +18 -31
- package/src/prover/smt/solver/lp/core-solver.ts +35 -37
- package/src/prover/smt/solver/lp/cross-nested.ts +4 -21
- package/src/prover/smt/solver/lp/dep-intervals.ts +6 -24
- package/src/prover/smt/solver/lp/dependency.ts +0 -5
- package/src/prover/smt/solver/lp/dioph-eq.ts +8 -103
- package/src/prover/smt/solver/lp/explanation.ts +0 -6
- package/src/prover/smt/solver/lp/gomory.ts +8 -22
- package/src/prover/smt/solver/lp/hnf-cutter.ts +16 -23
- package/src/prover/smt/solver/lp/hnf.ts +10 -28
- package/src/prover/smt/solver/lp/int-cube.ts +17 -39
- package/src/prover/smt/solver/lp/int-solver.ts +3 -35
- package/src/prover/smt/solver/lp/lar-solver.ts +70 -83
- package/src/prover/smt/solver/lp/lar-term.ts +0 -5
- package/src/prover/smt/solver/lp/lp-settings.ts +6 -16
- package/src/prover/smt/solver/lp/maximize-term.ts +76 -52
- package/src/prover/smt/solver/lp/nex-creator.ts +7 -30
- package/src/prover/smt/solver/lp/nex.ts +2 -7
- package/src/prover/smt/solver/lp/nla-backoff.ts +0 -5
- package/src/prover/smt/solver/lp/nla-basics.ts +48 -30
- package/src/prover/smt/solver/lp/nla-core.ts +92 -136
- package/src/prover/smt/solver/lp/nla-divisions.ts +31 -43
- package/src/prover/smt/solver/lp/nla-emonics.ts +3 -21
- package/src/prover/smt/solver/lp/nla-factorization.ts +0 -4
- package/src/prover/smt/solver/lp/nla-grobner.ts +177 -149
- package/src/prover/smt/solver/lp/nla-horner.ts +2 -12
- package/src/prover/smt/solver/lp/nla-intervals.ts +1 -12
- package/src/prover/smt/solver/lp/nla-monomial-bounds.ts +15 -42
- package/src/prover/smt/solver/lp/nla-monotone.ts +1 -6
- package/src/prover/smt/solver/lp/nla-order.ts +0 -13
- package/src/prover/smt/solver/lp/nla-patcher.ts +3 -7
- package/src/prover/smt/solver/lp/nla-powers.ts +220 -0
- package/src/prover/smt/solver/lp/nla-tangents.ts +0 -10
- package/src/prover/smt/solver/lp/nla-throttle.ts +0 -6
- package/src/prover/smt/solver/lp/nla-transcendentals.ts +324 -0
- package/src/prover/smt/solver/lp/nla-types.ts +0 -12
- package/src/prover/smt/solver/lp/nla-var-eqs.ts +4 -26
- package/src/prover/smt/solver/lp/nra-solver.ts +164 -147
- package/src/prover/smt/solver/lp/numeric-pair.ts +0 -4
- package/src/prover/smt/solver/lp/pdd-interval.ts +6 -5
- package/src/prover/smt/solver/lp/pdd-simplifier.ts +61 -34
- package/src/prover/smt/solver/lp/pdd-solver.ts +74 -72
- package/src/prover/smt/solver/lp/pdd.ts +730 -358
- package/src/prover/smt/solver/lp/random-updater.ts +0 -9
- package/src/prover/smt/solver/lp/static-matrix.ts +8 -19
- package/src/prover/smt/solver/lp/union-find.ts +5 -5
- package/src/prover/smt/solver/macro-finder.ts +530 -0
- package/src/prover/smt/solver/mam-compiler.ts +129 -139
- package/src/prover/smt/solver/mam-interpreter.ts +0 -21
- package/src/prover/smt/solver/max-bv-sharing-tactic.ts +17 -0
- package/src/prover/smt/solver/max-cliques.ts +105 -0
- package/src/prover/smt/solver/maxcore.ts +310 -0
- package/src/prover/smt/solver/maximize-ac-sharing.ts +8 -21
- package/src/prover/smt/solver/maxlex.ts +115 -0
- package/src/prover/smt/solver/maxsmt-base.ts +106 -0
- package/src/prover/smt/solver/maxsmt.ts +92 -0
- package/src/prover/smt/solver/mbp/mbp-arith.ts +467 -0
- package/src/prover/smt/solver/mbp/mbp-basic-tg.ts +101 -0
- package/src/prover/smt/solver/mbp/mbp-plugin.ts +287 -0
- package/src/prover/smt/solver/mbp/mbp-qel.ts +48 -0
- package/src/prover/smt/solver/mbp/mbp-solve-plugin.ts +271 -0
- package/src/prover/smt/solver/mbp/mbp-term-graph.ts +606 -0
- package/src/prover/smt/solver/model-based-opt.ts +844 -0
- package/src/prover/smt/solver/model-checker.ts +20 -63
- package/src/prover/smt/solver/model-evaluator.ts +192 -40
- package/src/prover/smt/solver/model-finder.ts +14 -32
- package/src/prover/smt/solver/model-generator.ts +104 -46
- package/src/prover/smt/solver/model-macro-solver.ts +60 -114
- package/src/prover/smt/solver/model-printer.ts +214 -0
- package/src/prover/smt/solver/mpf.ts +709 -0
- package/src/prover/smt/solver/mus.ts +50 -0
- package/src/prover/smt/solver/muz/dl-context.ts +382 -0
- package/src/prover/smt/solver/muz/dl-mk-bit-blast.ts +97 -0
- package/src/prover/smt/solver/muz/dl-mk-coi-filter.ts +167 -0
- package/src/prover/smt/solver/muz/dl-mk-elim-term-ite.ts +125 -0
- package/src/prover/smt/solver/muz/dl-mk-interp-tail-simplifier.ts +299 -0
- package/src/prover/smt/solver/muz/dl-mk-rule-inliner.ts +455 -0
- package/src/prover/smt/solver/muz/dl-mk-slice.ts +340 -0
- package/src/prover/smt/solver/muz/dl-mk-subsumption-checker.ts +163 -0
- package/src/prover/smt/solver/muz/dl-rule-set.ts +273 -0
- package/src/prover/smt/solver/muz/dl-rule-transformer.ts +123 -0
- package/src/prover/smt/solver/muz/dl-rule.ts +495 -0
- package/src/prover/smt/solver/muz/hnf.ts +201 -0
- package/src/prover/smt/solver/muz/horn-subsume-model-converter.ts +176 -0
- package/src/prover/smt/solver/muz/horn-tactic.ts +214 -0
- package/src/prover/smt/solver/muz/rule-properties.ts +359 -0
- package/src/prover/smt/solver/muz/spacer-context.ts +1404 -0
- package/src/prover/smt/solver/muz/spacer-dl-interface.ts +52 -0
- package/src/prover/smt/solver/muz/spacer-generalizers.ts +241 -0
- package/src/prover/smt/solver/muz/spacer-manager.ts +127 -0
- package/src/prover/smt/solver/muz/spacer-pdr.ts +219 -0
- package/src/prover/smt/solver/muz/spacer-prop-solver.ts +333 -0
- package/src/prover/smt/solver/muz/spacer-util.ts +282 -0
- package/src/prover/smt/solver/muz/substitution.ts +203 -0
- package/src/prover/smt/solver/nla2bv-tactic.ts +285 -0
- package/src/prover/smt/solver/nlqsat.ts +484 -0
- package/src/prover/smt/solver/nlsat/algebraic.ts +357 -236
- package/src/prover/smt/solver/nlsat/atoms.ts +73 -54
- package/src/prover/smt/solver/nlsat/evaluator.ts +16 -22
- package/src/prover/smt/solver/nlsat/explain.ts +429 -275
- package/src/prover/smt/solver/nlsat/interval-set.ts +9 -51
- package/src/prover/smt/solver/nlsat/levelwise.ts +477 -344
- package/src/prover/smt/solver/nlsat/mpbq.ts +47 -14
- package/src/prover/smt/solver/nlsat/polynomial.ts +2385 -832
- package/src/prover/smt/solver/nlsat/solver.ts +297 -156
- package/src/prover/smt/solver/nlsat/transcendental-eval.ts +310 -0
- package/src/prover/smt/solver/nlsat/transcendentals.ts +391 -0
- package/src/prover/smt/solver/nlsat/types.ts +0 -9
- package/src/prover/smt/solver/nlsat/upolynomial-factorization.ts +9 -51
- package/src/prover/smt/solver/nlsat/upolynomial.ts +49 -109
- package/src/prover/smt/solver/nlsat-tactic.ts +82 -0
- package/src/prover/smt/solver/nnf.ts +112 -61
- package/src/prover/smt/solver/normalize-bounds.ts +53 -0
- package/src/prover/smt/solver/occf.ts +97 -0
- package/src/prover/smt/solver/opt-context.ts +801 -0
- package/src/prover/smt/solver/opt-nlsat.ts +386 -0
- package/src/prover/smt/solver/opt-pareto.ts +301 -0
- package/src/prover/smt/solver/opt-preprocess.ts +101 -0
- package/src/prover/smt/solver/opt-solver.ts +312 -0
- package/src/prover/smt/solver/opt-value.ts +55 -0
- package/src/prover/smt/solver/optsmt.ts +692 -0
- package/src/prover/smt/solver/parallel-tactic.ts +299 -0
- package/src/prover/smt/solver/pattern-inference.ts +21 -26
- package/src/prover/smt/solver/pb-rewriter.ts +281 -0
- package/src/prover/smt/solver/pb2bv-tactic.ts +540 -0
- package/src/prover/smt/solver/poly-rewriter.ts +261 -79
- package/src/prover/smt/solver/probes.ts +577 -0
- package/src/prover/smt/solver/propagate-values.ts +37 -30
- package/src/prover/smt/solver/proto-model.ts +650 -66
- package/src/prover/smt/solver/pull-quant.ts +28 -23
- package/src/prover/smt/solver/purify-arith.ts +632 -0
- package/src/prover/smt/solver/push-app-ite.ts +37 -0
- package/src/prover/smt/solver/qe-arith-plugin.ts +1096 -0
- package/src/prover/smt/solver/qe-lite-der.ts +2 -31
- package/src/prover/smt/solver/qe-lite-fm.ts +4 -28
- package/src/prover/smt/solver/qe-lite.ts +41 -51
- package/src/prover/smt/solver/qe-mbp.ts +270 -0
- package/src/prover/smt/solver/qe.ts +1499 -0
- package/src/prover/smt/solver/qel.ts +25 -0
- package/src/prover/smt/solver/qi-queue.ts +0 -16
- package/src/prover/smt/solver/qsat.ts +829 -0
- package/src/prover/smt/solver/quant-hoist.ts +196 -0
- package/src/prover/smt/solver/quant-tactics.ts +17 -74
- package/src/prover/smt/solver/quantifier-analyzer.ts +26 -47
- package/src/prover/smt/solver/quantifier-manager.ts +22 -32
- package/src/prover/smt/solver/quasi-macros.ts +243 -0
- package/src/prover/smt/solver/random-gen.ts +0 -2
- package/src/prover/smt/solver/rational.ts +45 -8
- package/src/prover/smt/solver/recfun-decl-plugin.ts +262 -0
- package/src/prover/smt/solver/recfun-rewriter.ts +107 -0
- package/src/prover/smt/solver/reduce-args.ts +225 -0
- package/src/prover/smt/solver/reduce-bv-size.ts +119 -0
- package/src/prover/smt/solver/ref-vector.ts +0 -6
- package/src/prover/smt/solver/relevancy.ts +2 -16
- package/src/prover/smt/solver/rewriter-tpl.ts +59 -135
- package/src/prover/smt/solver/rewriter.ts +507 -144
- package/src/prover/smt/solver/rlimit.ts +46 -24
- package/src/prover/smt/solver/sat/asymm-branch.ts +325 -0
- package/src/prover/smt/solver/sat/big.ts +177 -0
- package/src/prover/smt/solver/sat/clause-use-list.ts +71 -0
- package/src/prover/smt/solver/sat/clause.ts +203 -0
- package/src/prover/smt/solver/sat/cleaner.ts +94 -0
- package/src/prover/smt/solver/sat/config.ts +122 -0
- package/src/prover/smt/solver/sat/consequences.ts +203 -0
- package/src/prover/smt/solver/sat/elim-eqs.ts +142 -0
- package/src/prover/smt/solver/sat/goal2sat.ts +579 -0
- package/src/prover/smt/solver/sat/inc-sat-solver.ts +464 -0
- package/src/prover/smt/solver/sat/model-converter.ts +136 -0
- package/src/prover/smt/solver/sat/pb-constraint.ts +268 -0
- package/src/prover/smt/solver/sat/pb-solver.ts +1596 -0
- package/src/prover/smt/solver/sat/probing.ts +170 -0
- package/src/prover/smt/solver/sat/sat-tactic.ts +53 -0
- package/src/prover/smt/solver/sat/sat2goal.ts +189 -0
- package/src/prover/smt/solver/sat/scc.ts +142 -0
- package/src/prover/smt/solver/sat/simplifier.ts +1618 -0
- package/src/prover/smt/solver/sat/solver.ts +2107 -0
- package/src/prover/smt/solver/sat/var-queue.ts +117 -0
- package/src/prover/smt/solver/sat/watch-list.ts +140 -0
- package/src/prover/smt/solver/search-tree.ts +284 -0
- package/src/prover/smt/solver/seq-axioms.ts +995 -0
- package/src/prover/smt/solver/seq-decl-plugin.ts +819 -0
- package/src/prover/smt/solver/seq-derive.ts +1298 -0
- package/src/prover/smt/solver/seq-eq-approx.ts +236 -0
- package/src/prover/smt/solver/seq-eq-solver.ts +439 -0
- package/src/prover/smt/solver/seq-factory.ts +89 -0
- package/src/prover/smt/solver/seq-monadic.ts +730 -0
- package/src/prover/smt/solver/seq-range-predicate.ts +235 -0
- package/src/prover/smt/solver/seq-re-rewriter.ts +1171 -0
- package/src/prover/smt/solver/seq-re-util.ts +758 -0
- package/src/prover/smt/solver/seq-regex-bisim.ts +144 -0
- package/src/prover/smt/solver/seq-regex-live.ts +200 -0
- package/src/prover/smt/solver/seq-rewriter.ts +2404 -0
- package/src/prover/smt/solver/seq-skolem.ts +294 -0
- package/src/prover/smt/solver/seq-subset.ts +165 -0
- package/src/prover/smt/solver/seq-view-witness.ts +353 -0
- package/src/prover/smt/solver/smt-consequences.ts +297 -0
- package/src/prover/smt/solver/smt-kernel.ts +124 -0
- package/src/prover/smt/solver/smt-logics.ts +66 -0
- package/src/prover/smt/solver/smt-setup.ts +589 -0
- package/src/prover/smt/solver/smt2-printer.ts +765 -0
- package/src/prover/smt/solver/smtlib-parser.ts +3546 -406
- package/src/prover/smt/solver/smtlib-script.ts +2134 -0
- package/src/prover/smt/solver/solve-eqs.ts +928 -0
- package/src/prover/smt/solver/solver.ts +135 -40
- package/src/prover/smt/solver/sort.ts +1 -5
- package/src/prover/smt/solver/static-features.ts +314 -0
- package/src/prover/smt/solver/sticky-generations.ts +0 -6
- package/src/prover/smt/solver/tactic.ts +2141 -0
- package/src/prover/smt/solver/term-enumeration.ts +205 -0
- package/src/prover/smt/solver/theory-array.ts +1240 -0
- package/src/prover/smt/solver/theory-bv.ts +1210 -0
- package/src/prover/smt/solver/theory-char.ts +355 -0
- package/src/prover/smt/solver/theory-datatype.ts +598 -0
- package/src/prover/smt/solver/theory-finite-set.ts +30 -0
- package/src/prover/smt/solver/theory-fpa.ts +389 -0
- package/src/prover/smt/solver/theory-lra-axioms.ts +55 -25
- package/src/prover/smt/solver/theory-lra-bounds.ts +31 -11
- package/src/prover/smt/solver/theory-lra-final-check.ts +60 -91
- package/src/prover/smt/solver/theory-lra-internalize.ts +96 -53
- package/src/prover/smt/solver/theory-lra-model.ts +23 -53
- package/src/prover/smt/solver/theory-lra-propagate.ts +34 -42
- package/src/prover/smt/solver/theory-lra-state.ts +7 -28
- package/src/prover/smt/solver/theory-lra.ts +189 -9
- package/src/prover/smt/solver/theory-pb.ts +951 -0
- package/src/prover/smt/solver/theory-polymorphism.ts +58 -0
- package/src/prover/smt/solver/theory-recfun.ts +307 -0
- package/src/prover/smt/solver/theory-seq-regex.ts +867 -0
- package/src/prover/smt/solver/theory-seq-solve.ts +1373 -0
- package/src/prover/smt/solver/theory-seq-state.ts +852 -0
- package/src/prover/smt/solver/theory-seq.ts +961 -0
- package/src/prover/smt/solver/theory-without-terms.ts +24 -0
- package/src/prover/smt/solver/theory.ts +189 -0
- package/src/prover/smt/solver/tseitin-cnf.ts +486 -0
- package/src/prover/smt/solver/var-subst.ts +37 -39
- package/src/prover/smt/table.ts +3 -10
- package/src/prover/smt/types.ts +146 -0
- package/src/prover/tlapm/cache.ts +74 -48
- package/src/prover/tlapm/ocaml-marshal.ts +19 -21
- package/src/prover/tlapm/tlapm.ts +21 -20
- package/src/prover/tlapm-library.ts +3208 -0
- package/src/prover/verdict.ts +9 -2
- package/src/prover/zenon/check/check.ts +1 -11
- package/src/prover/zenon/check/definitions.ts +5 -15
- package/src/prover/zenon/check/equality.ts +0 -8
- package/src/prover/zenon/check/functions.ts +0 -4
- package/src/prover/zenon/check/keys.ts +0 -7
- package/src/prover/zenon/check/propositional.ts +0 -3
- package/src/prover/zenon/check/records.ts +1 -6
- package/src/prover/zenon/check/relations.ts +2 -14
- package/src/prover/zenon/check/rewrites.ts +2 -21
- package/src/prover/zenon/check/sets.ts +40 -61
- package/src/prover/zenon/check/terms.ts +1 -19
- package/src/prover/zenon/check/tla.ts +0 -6
- package/src/prover/zenon/decide.ts +10 -19
- package/src/prover/zenon/encode.ts +0 -9
- package/src/prover/zenon/eqrel.ts +2 -15
- package/src/prover/zenon/equality-rules.ts +24 -6
- package/src/prover/zenon/expr.ts +29 -28
- package/src/prover/zenon/index-table.ts +33 -61
- package/src/prover/zenon/isar-case.ts +9 -21
- package/src/prover/zenon/isar.ts +37 -67
- package/src/prover/zenon/limits.ts +0 -4
- package/src/prover/zenon/llproof.ts +2 -22
- package/src/prover/zenon/mltoll.ts +66 -106
- package/src/prover/zenon/node.ts +20 -15
- package/src/prover/zenon/ocaml.ts +1 -17
- package/src/prover/zenon/parse.ts +9 -13
- package/src/prover/zenon/phrase.ts +2 -14
- package/src/prover/zenon/proof.ts +0 -11
- package/src/prover/zenon/propositional-rules.ts +0 -7
- package/src/prover/zenon/rules.ts +3 -8
- package/src/prover/zenon/search.ts +11 -35
- package/src/prover/zenon/tla/functions.ts +59 -33
- package/src/prover/zenon/tla/llproof.ts +67 -78
- package/src/prover/zenon/tla/records.ts +57 -35
- package/src/prover/zenon/tla/rewrites.ts +12 -21
- package/src/prover/zenon/tla/sets.ts +88 -59
- package/src/prover/zenon/tla/terms.ts +0 -8
- package/src/prover/zenon/tla/tla.ts +66 -66
- package/src/randomization.ts +81 -35
- package/src/resolve.ts +1132 -430
- package/src/runtime.ts +33 -23
- package/src/sany/builtins.ts +11 -14
- package/src/sany/generation.ts +383 -0
- package/src/sany/generator-def-entries.ts +210 -0
- package/src/sany/generator-definitions.ts +688 -0
- package/src/sany/generator-expressions.ts +1108 -0
- package/src/sany/generator-proofs.ts +665 -0
- package/src/sany/generator.ts +192 -2764
- package/src/sany/levels.ts +5 -35
- package/src/sany/lexer.ts +61 -80
- package/src/sany/linter.ts +0 -10
- package/src/sany/modules.ts +5 -7
- package/src/sany/nodes.ts +6 -44
- package/src/sany/parse-error.ts +39 -117
- package/src/sany/report.ts +32 -69
- package/src/sany/selectors.ts +60 -82
- package/src/sany/source.ts +1 -17
- package/src/sany/xml.ts +37 -120
- package/src/search.ts +913 -227
- package/src/simulate.ts +765 -0
- package/src/spec-description.ts +198 -104
- package/src/standard-definitions.ts +4 -4
- package/src/standard-modules.ts +302 -99
- package/src/state-graph.ts +52 -33
- package/src/subexpressions.ts +578 -166
- package/src/substitution-levels.ts +7 -7
- package/src/successors.ts +299 -108
- package/src/symmetry.ts +37 -28
- package/src/tableau.ts +29 -26
- package/src/tlc/fingerprint.ts +267 -79
- package/src/tlc/jar-data.ts +122 -6
- package/src/tlc/messages.ts +127 -56
- package/src/tlc/order.ts +53 -72
- package/src/tlc/random.ts +38 -49
- package/src/tlc/replay.ts +579 -230
- package/src/tlc/summary.ts +64 -60
- package/src/tlc/tlc-operators.ts +83 -47
- package/src/tlc/tlcext-operators.ts +205 -127
- package/src/tlc/trace-spec.ts +235 -0
- package/src/tlc/value-stream.ts +139 -0
- package/src/tlc/version.ts +1 -4
- package/src/trace-liveness.ts +529 -0
- package/src/transfer.ts +22 -25
- package/src/typed-tier.ts +6556 -0
- package/src/typescript/actions.ts +479 -0
- package/src/typescript/collections.ts +614 -0
- package/src/typescript/compile.ts +63 -0
- package/src/typescript/context.ts +94 -0
- package/src/typescript/emit.ts +121 -0
- package/src/typescript/expressions.ts +496 -0
- package/src/typescript/formula.ts +154 -0
- package/src/typescript/functions.ts +284 -0
- package/src/typescript/model.ts +162 -0
- package/src/typescript/names.ts +114 -0
- package/src/typescript/program.ts +48 -0
- package/src/typescript/properties.ts +139 -0
- package/src/typescript/scope.ts +112 -0
- package/src/typescript/steps.ts +167 -0
- package/src/typescript/types.ts +171 -0
- package/src/values.ts +945 -526
- package/src/worker.ts +7 -8
- package/src/prover/isabelle/isar/statement.ts +0 -57
- package/src/prover/smt/solver/z3-license.txt +0 -10
- package/src/prover/tlaps-module.ts +0 -510
- package/src/prover/zenon/LICENSE +0 -32
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.
|
|
9
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./worker.cjs"),t=require("./transfer.cjs"),n=require("./prove.cjs");exports.TlaConfigError=e.v,exports.TlaError=e.b,exports.TlaEvaluationError=e.x,exports.TlaSyntaxError=e.I,exports.TlaUnsupportedError=e.V,exports.check=n.S,exports.formatValue=t.qt,exports.parseConfig=t.wn,exports.parseModule=t.bt,exports.prove=n.o;
|
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,12 +107,14 @@ 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 {
|
|
112
114
|
kind: "Let";
|
|
113
115
|
definitions: Definition[];
|
|
114
116
|
instances?: Instance[];
|
|
117
|
+
recursive?: Declaration[];
|
|
115
118
|
body: Expression;
|
|
116
119
|
location: SourceLocation;
|
|
117
120
|
}
|
|
@@ -261,6 +264,7 @@ interface LabelExpression {
|
|
|
261
264
|
name: string;
|
|
262
265
|
params: string[];
|
|
263
266
|
paramRanges?: SourceRange[];
|
|
267
|
+
head?: SourceRange;
|
|
264
268
|
body: Expression;
|
|
265
269
|
location: SourceLocation;
|
|
266
270
|
}
|
|
@@ -286,7 +290,12 @@ interface SubexpressionExpression {
|
|
|
286
290
|
argumentRanges?: (SourceRange | undefined)[];
|
|
287
291
|
location: SourceLocation;
|
|
288
292
|
}
|
|
289
|
-
|
|
293
|
+
interface SelectionExpression {
|
|
294
|
+
kind: "Selection";
|
|
295
|
+
expression: Expression;
|
|
296
|
+
location: SourceLocation;
|
|
297
|
+
}
|
|
298
|
+
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 | SelectionExpression;
|
|
290
299
|
interface OperatorParam {
|
|
291
300
|
name: string;
|
|
292
301
|
arity: number;
|
|
@@ -298,6 +307,7 @@ interface OperatorDefinition {
|
|
|
298
307
|
params: OperatorParam[];
|
|
299
308
|
body: Expression;
|
|
300
309
|
bodyRange?: SourceRange;
|
|
310
|
+
head?: SourceRange;
|
|
301
311
|
isLocal: boolean;
|
|
302
312
|
isRecursive: boolean;
|
|
303
313
|
location: SourceLocation;
|
|
@@ -439,6 +449,7 @@ type ModuleUnit = {
|
|
|
439
449
|
} | {
|
|
440
450
|
kind: "Recursive";
|
|
441
451
|
declarations: Declaration[];
|
|
452
|
+
location: SourceLocation;
|
|
442
453
|
} | {
|
|
443
454
|
kind: "Definition";
|
|
444
455
|
definition: Definition;
|
|
@@ -511,6 +522,7 @@ interface ModelConfig {
|
|
|
511
522
|
actionConstraints: string[];
|
|
512
523
|
constants: ConstantAssignment[];
|
|
513
524
|
substitutions: Substitution[];
|
|
525
|
+
rawConstants: string[];
|
|
514
526
|
checkDeadlock: boolean;
|
|
515
527
|
symmetry: string | undefined;
|
|
516
528
|
view: string | undefined;
|
|
@@ -529,6 +541,14 @@ interface SyntaxFailure {
|
|
|
529
541
|
line: number;
|
|
530
542
|
column: number;
|
|
531
543
|
isEnd: boolean;
|
|
544
|
+
proof?: {
|
|
545
|
+
stop: {
|
|
546
|
+
line: number;
|
|
547
|
+
column: number;
|
|
548
|
+
};
|
|
549
|
+
exception: string;
|
|
550
|
+
printed: string;
|
|
551
|
+
};
|
|
532
552
|
}
|
|
533
553
|
interface SanyError {
|
|
534
554
|
location: string;
|
|
@@ -570,6 +590,8 @@ interface LazySet {
|
|
|
570
590
|
interface SetValue {
|
|
571
591
|
kind: "Set";
|
|
572
592
|
elements: Value[];
|
|
593
|
+
writtenElements: Value[] | undefined;
|
|
594
|
+
isNormalized: boolean;
|
|
573
595
|
hash: number;
|
|
574
596
|
fingerprint: number;
|
|
575
597
|
isFingerprinted: boolean;
|
|
@@ -586,6 +608,7 @@ interface FunctionValue {
|
|
|
586
608
|
fingerprint: number;
|
|
587
609
|
writtenKeys: Value[] | undefined;
|
|
588
610
|
functionClass: FunctionClass | undefined;
|
|
611
|
+
lambdaDomain: Value | undefined;
|
|
589
612
|
isFingerprinted: boolean;
|
|
590
613
|
}
|
|
591
614
|
interface IntervalValue {
|
|
@@ -632,7 +655,8 @@ interface FilteredSetSource {
|
|
|
632
655
|
interface FilteredSetValue extends LazySet {
|
|
633
656
|
kind: "FilteredSet";
|
|
634
657
|
base: Value;
|
|
635
|
-
test: (element: Value) => boolean;
|
|
658
|
+
test: (element: Value, isMember: boolean) => boolean;
|
|
659
|
+
startPass?: (isMaterialized: boolean) => (element: Value) => boolean;
|
|
636
660
|
source?: FilteredSetSource;
|
|
637
661
|
}
|
|
638
662
|
interface UnionValue extends LazySet {
|
|
@@ -651,6 +675,7 @@ interface LazyFunctionValue {
|
|
|
651
675
|
kind: "LazyFunction";
|
|
652
676
|
domain: Value;
|
|
653
677
|
apply: (argument: Value) => Value;
|
|
678
|
+
boundTupleLengths?: (number | undefined)[];
|
|
654
679
|
source?: LazyFunctionSource;
|
|
655
680
|
functionClass?: FunctionClass;
|
|
656
681
|
enumerated?: FunctionValue;
|
|
@@ -659,22 +684,47 @@ interface LazyFunctionValue {
|
|
|
659
684
|
type Value = boolean | number | string | ModelValue | SetValue | MixedSetValue | FunctionValue | IntervalValue | InfiniteSetValue | SubsetValue | FunctionSetValue | RecordSetValue | ProductSetValue | SequenceSetValue | SetOperationValue | FilteredSetValue | UnionValue | LazyFunctionValue;
|
|
660
685
|
type FunctionClass = "lambda" | "tuple" | "record";
|
|
661
686
|
export declare const formatValue: (value: Value, isStrict?: boolean, isNormalized?: boolean) => string;
|
|
662
|
-
interface FingerprintFailure {
|
|
663
|
-
sources: Expression[];
|
|
664
|
-
reason: string;
|
|
665
|
-
}
|
|
666
687
|
interface JavaOverride {
|
|
667
688
|
module: string;
|
|
668
689
|
operator: string;
|
|
669
690
|
signature: string;
|
|
670
691
|
isMatched: boolean;
|
|
671
692
|
}
|
|
693
|
+
interface FingerprintFailure {
|
|
694
|
+
sources: Expression[];
|
|
695
|
+
reason: string;
|
|
696
|
+
}
|
|
697
|
+
type CoverageKind = "init" | "next" | "invariant" | "constraint" | "implied";
|
|
698
|
+
interface CoverageReport {
|
|
699
|
+
variables: CoverageVariable[];
|
|
700
|
+
relations: CoverageRelationReport[];
|
|
701
|
+
}
|
|
702
|
+
interface CoverageVariable {
|
|
703
|
+
label: string;
|
|
704
|
+
distinct: number;
|
|
705
|
+
}
|
|
706
|
+
interface CoverageRelationReport {
|
|
707
|
+
kind: CoverageKind;
|
|
708
|
+
label: string;
|
|
709
|
+
distinct: number;
|
|
710
|
+
generated: number;
|
|
711
|
+
expressions: CoverageExpression[];
|
|
712
|
+
}
|
|
713
|
+
interface CoverageExpression {
|
|
714
|
+
location: string;
|
|
715
|
+
depth: number;
|
|
716
|
+
count: number;
|
|
717
|
+
cost: number;
|
|
718
|
+
}
|
|
672
719
|
interface StateDump {
|
|
673
720
|
path: string;
|
|
674
721
|
dot?: boolean;
|
|
675
722
|
colorize?: boolean;
|
|
676
723
|
actionLabels?: boolean;
|
|
677
724
|
snapshot?: boolean;
|
|
725
|
+
constrained?: boolean;
|
|
726
|
+
stuttering?: boolean;
|
|
727
|
+
strict?: boolean;
|
|
678
728
|
}
|
|
679
729
|
interface FailureMessage {
|
|
680
730
|
code: number;
|
|
@@ -689,19 +739,50 @@ interface CheckOptions {
|
|
|
689
739
|
onPrint?: (text: string) => void;
|
|
690
740
|
onPause?: () => void;
|
|
691
741
|
readFile?: (path: string) => string | undefined;
|
|
692
|
-
writeFile?: (path: string, content: string) => void;
|
|
742
|
+
writeFile?: (path: string, content: string | Uint8Array) => void;
|
|
743
|
+
makeDirectory?: (path: string) => void;
|
|
693
744
|
seed?: bigint;
|
|
694
745
|
workers?: number;
|
|
695
|
-
|
|
746
|
+
/** TLC's -lncheck: "final" checks liveness only on the complete graph, "off" never looks for a cycle. */
|
|
747
|
+
livenessCheck?: "default" | "final" | "off";
|
|
748
|
+
/** TLC's -fp: the index of the polynomial in TLC's FP64.Polys that fingerprints states. */
|
|
749
|
+
fingerprintPolynomial?: number;
|
|
750
|
+
/** False for TLC's -terse, which prints a lazy value, such as SUBSET S, without enumerating it. */
|
|
751
|
+
isLazyValueExpanded?: boolean;
|
|
752
|
+
/** TLC's -view: prints each state as the value of the configuration's VIEW. */
|
|
753
|
+
isViewPrinted?: boolean;
|
|
754
|
+
/** TLC's -maxSetSize: the most elements TLC enumerates into a set, or states into a list of them. */
|
|
755
|
+
maxSetSize?: number;
|
|
756
|
+
/** TLC's -dump: writes the reachable states, or with `dot` the state graph, through writeFile. */
|
|
696
757
|
dump?: StateDump;
|
|
758
|
+
/** TLC's -tool, which changes the messages of TLC's errors. */
|
|
697
759
|
isTool?: boolean;
|
|
760
|
+
/** TLC's -continue: reports each violation through onProgress and goes on. */
|
|
698
761
|
isContinued?: boolean;
|
|
699
|
-
|
|
762
|
+
/** Skips fingerprintDistance, which takes fingerprinting every state again after the search. */
|
|
763
|
+
isFingerprintDistanceSkipped?: boolean;
|
|
764
|
+
moduleOperators?: ModuleOperator[];
|
|
765
|
+
/** TLC's trace exploration spec, and the binary trace TLC records for it unless -noTEBin. */
|
|
766
|
+
traceSpec?: TraceSpecOptions;
|
|
767
|
+
/** Whether the caller printed SANY's report, its warnings included, before the check. */
|
|
700
768
|
isSanyReported?: boolean;
|
|
769
|
+
/** False for TLC's -nowarning, which changes how TLC computes some successors. */
|
|
701
770
|
isWarningEnabled?: boolean;
|
|
771
|
+
/** TLC's -coverage, in minutes. */
|
|
772
|
+
coverage?: number;
|
|
702
773
|
version?: TlcVersion;
|
|
703
774
|
onProgress?: (progress: CheckProgress) => void;
|
|
704
775
|
}
|
|
776
|
+
interface TraceSpecOptions {
|
|
777
|
+
module: string;
|
|
778
|
+
traceFile?: string;
|
|
779
|
+
}
|
|
780
|
+
interface ModuleOperator {
|
|
781
|
+
kind: "postcondition" | "constraint" | "view";
|
|
782
|
+
module: string;
|
|
783
|
+
operator: string;
|
|
784
|
+
constants?: Record<string, string>;
|
|
785
|
+
}
|
|
705
786
|
interface InitialStatesProgress {
|
|
706
787
|
kind: "initial-states-progress";
|
|
707
788
|
count: number;
|
|
@@ -739,7 +820,9 @@ type CheckProgress = {
|
|
|
739
820
|
} | {
|
|
740
821
|
kind: "liveness-started";
|
|
741
822
|
branches: number;
|
|
823
|
+
/** Whether TLC checks the complete state graph. */
|
|
742
824
|
isComplete: boolean;
|
|
825
|
+
/** How many states the graphs of all branches have together. */
|
|
743
826
|
states: number;
|
|
744
827
|
statistics: SearchStatistics;
|
|
745
828
|
} | {
|
|
@@ -758,25 +841,33 @@ type CheckProgress = {
|
|
|
758
841
|
} | ({
|
|
759
842
|
kind: "java-override";
|
|
760
843
|
} & JavaOverride);
|
|
761
|
-
interface SearchStatistics extends Pick<CheckResult, "generatedStates" | "distinctStates" | "queuedStates" | "depth"> {}
|
|
844
|
+
interface SearchStatistics extends Pick<CheckResult, "generatedStates" | "distinctStates" | "queuedStates" | "depth" | "coverage"> {}
|
|
762
845
|
type CheckStatus = "success" | "assumption-violation" | "invariant-violation" | "property-violation" | "liveness-violation" | "postcondition-violation" | "deadlock" | "error";
|
|
763
846
|
interface TraceStep {
|
|
764
847
|
action: string | undefined;
|
|
848
|
+
/** TLC's name, parameters and location for the action that took this step. */
|
|
765
849
|
label: string | undefined;
|
|
766
850
|
state: Record<string, Value>;
|
|
851
|
+
/** What the spec prints before this step as TLC rebuilds the trace, and before it for the first. */
|
|
767
852
|
output?: OutputLine[];
|
|
768
853
|
}
|
|
769
854
|
interface Violation {
|
|
770
855
|
name: string;
|
|
856
|
+
/** Every temporal property that a liveness counterexample violates, in the configuration's order. */
|
|
771
857
|
properties?: string[];
|
|
772
858
|
trace: TraceStep[];
|
|
859
|
+
/** What the spec prints after the trace, as TLC finds the lasso's step back or rebuilds the trace. */
|
|
773
860
|
traceOutput?: OutputLine[];
|
|
861
|
+
/** What the postconditions print, which TLC checks after the lasso's step back. */
|
|
862
|
+
postconditionOutput?: OutputLine[];
|
|
774
863
|
loopStart: number | undefined;
|
|
775
864
|
loopLabel?: string;
|
|
776
865
|
message?: string;
|
|
777
866
|
counts?: string;
|
|
778
867
|
unwitnessed?: Postcondition;
|
|
868
|
+
/** A POSTCONDITION that is false or fails, which TLC checks as it prints the counterexample. */
|
|
779
869
|
postcondition?: Postcondition;
|
|
870
|
+
/** What TLC warns about after a counterexample, with its code. */
|
|
780
871
|
warning?: {
|
|
781
872
|
code: number;
|
|
782
873
|
text: string;
|
|
@@ -788,6 +879,11 @@ interface Postcondition {
|
|
|
788
879
|
message: string;
|
|
789
880
|
counts?: string;
|
|
790
881
|
}
|
|
882
|
+
interface TraceFailure extends FailureMessage {
|
|
883
|
+
/** What the spec prints as TLC rebuilds the step it then fails to print. */
|
|
884
|
+
output: OutputLine[];
|
|
885
|
+
}
|
|
886
|
+
/** An evaluation that failed during the search, with the behavior up to the state TLC was working on. */
|
|
791
887
|
interface EvaluationFailure {
|
|
792
888
|
code: number;
|
|
793
889
|
message: string;
|
|
@@ -796,11 +892,17 @@ interface EvaluationFailure {
|
|
|
796
892
|
traceOutput?: OutputLine[];
|
|
797
893
|
initialState: Record<string, Value> | undefined;
|
|
798
894
|
exitCode: number;
|
|
895
|
+
/** The expressions TLC was evaluating, outermost first, when its replay finds them. */
|
|
799
896
|
callStack: Expression[] | undefined;
|
|
897
|
+
/** Whether TLC prints the call stack before the error, as it does for a failed liveness check. */
|
|
800
898
|
isCallStackFirst?: boolean;
|
|
899
|
+
/** The FingerprintException the replay raises, which TLC reports in place of the call stack. */
|
|
801
900
|
fingerprint?: FingerprintFailure;
|
|
802
|
-
|
|
901
|
+
/** How TLC reports failing again as it prints the trace, since it can't fingerprint the state. */
|
|
902
|
+
traceFailure?: TraceFailure;
|
|
903
|
+
/** A POSTCONDITION that is false or fails after the trace, which TLC checks as it prints one. */
|
|
803
904
|
postcondition?: Postcondition;
|
|
905
|
+
/** Whether TLC stops before it prints the statistics, as it does for an illegal initial state. */
|
|
804
906
|
isWithoutStatistics?: boolean;
|
|
805
907
|
}
|
|
806
908
|
interface InitialStates {
|
|
@@ -815,12 +917,20 @@ interface CheckResult {
|
|
|
815
917
|
distinctStates: number;
|
|
816
918
|
queuedStates: number;
|
|
817
919
|
depth: number;
|
|
920
|
+
/** Once TLC computed all the initial states without a violation or an error. */
|
|
818
921
|
initialStates: InitialStates | undefined;
|
|
922
|
+
/** How many expanded states found each number of new states, when TLC prints the outdegree. */
|
|
819
923
|
outDegrees: number[] | undefined;
|
|
924
|
+
/** The smallest distance between two fingerprints, when TLC estimates a collision from them. */
|
|
820
925
|
fingerprintDistance: bigint | undefined;
|
|
926
|
+
/** A temporal property TLC finds violated as it adds the state it stopped at to the behavior graph, reported after. */
|
|
821
927
|
additionalViolation?: Violation;
|
|
928
|
+
/** Where TLC's worker fails to add the state to the behavior graph after it reports a violation. */
|
|
822
929
|
liveCallStack?: Expression[];
|
|
930
|
+
/** The outdegrees when TLC's workers stop on a violation that TLC 1.7.4 reports as a success. */
|
|
823
931
|
violationOutDegrees?: number[];
|
|
932
|
+
traceSpec?: string;
|
|
933
|
+
coverage?: CoverageReport;
|
|
824
934
|
}
|
|
825
935
|
export declare const check: (options: CheckOptions) => Promise<CheckResult>;
|
|
826
936
|
export declare const parseModule: (source: string) => Module;
|
|
@@ -856,4 +966,4 @@ interface ProveOptions {
|
|
|
856
966
|
workers?: number;
|
|
857
967
|
}
|
|
858
968
|
export declare const prove: (options: ProveOptions) => Promise<ProveResult>;
|
|
859
|
-
export type { CheckOptions, CheckProgress, CheckResult, CheckStatus, ConfigValue, ConstantAssignment, EvaluationFailure, ModelConfig, Module, ProofObligation, ProofStatus, ProveOptions, ProveResult, ProvedObligation, Substitution, TraceStep, TrivialObligation, UnprovedObligation, Value, Violation };
|
|
969
|
+
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,12 +107,14 @@ 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 {
|
|
112
114
|
kind: "Let";
|
|
113
115
|
definitions: Definition[];
|
|
114
116
|
instances?: Instance[];
|
|
117
|
+
recursive?: Declaration[];
|
|
115
118
|
body: Expression;
|
|
116
119
|
location: SourceLocation;
|
|
117
120
|
}
|
|
@@ -261,6 +264,7 @@ interface LabelExpression {
|
|
|
261
264
|
name: string;
|
|
262
265
|
params: string[];
|
|
263
266
|
paramRanges?: SourceRange[];
|
|
267
|
+
head?: SourceRange;
|
|
264
268
|
body: Expression;
|
|
265
269
|
location: SourceLocation;
|
|
266
270
|
}
|
|
@@ -286,7 +290,12 @@ interface SubexpressionExpression {
|
|
|
286
290
|
argumentRanges?: (SourceRange | undefined)[];
|
|
287
291
|
location: SourceLocation;
|
|
288
292
|
}
|
|
289
|
-
|
|
293
|
+
interface SelectionExpression {
|
|
294
|
+
kind: "Selection";
|
|
295
|
+
expression: Expression;
|
|
296
|
+
location: SourceLocation;
|
|
297
|
+
}
|
|
298
|
+
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 | SelectionExpression;
|
|
290
299
|
interface OperatorParam {
|
|
291
300
|
name: string;
|
|
292
301
|
arity: number;
|
|
@@ -298,6 +307,7 @@ interface OperatorDefinition {
|
|
|
298
307
|
params: OperatorParam[];
|
|
299
308
|
body: Expression;
|
|
300
309
|
bodyRange?: SourceRange;
|
|
310
|
+
head?: SourceRange;
|
|
301
311
|
isLocal: boolean;
|
|
302
312
|
isRecursive: boolean;
|
|
303
313
|
location: SourceLocation;
|
|
@@ -439,6 +449,7 @@ type ModuleUnit = {
|
|
|
439
449
|
} | {
|
|
440
450
|
kind: "Recursive";
|
|
441
451
|
declarations: Declaration[];
|
|
452
|
+
location: SourceLocation;
|
|
442
453
|
} | {
|
|
443
454
|
kind: "Definition";
|
|
444
455
|
definition: Definition;
|
|
@@ -511,6 +522,7 @@ interface ModelConfig {
|
|
|
511
522
|
actionConstraints: string[];
|
|
512
523
|
constants: ConstantAssignment[];
|
|
513
524
|
substitutions: Substitution[];
|
|
525
|
+
rawConstants: string[];
|
|
514
526
|
checkDeadlock: boolean;
|
|
515
527
|
symmetry: string | undefined;
|
|
516
528
|
view: string | undefined;
|
|
@@ -529,6 +541,14 @@ interface SyntaxFailure {
|
|
|
529
541
|
line: number;
|
|
530
542
|
column: number;
|
|
531
543
|
isEnd: boolean;
|
|
544
|
+
proof?: {
|
|
545
|
+
stop: {
|
|
546
|
+
line: number;
|
|
547
|
+
column: number;
|
|
548
|
+
};
|
|
549
|
+
exception: string;
|
|
550
|
+
printed: string;
|
|
551
|
+
};
|
|
532
552
|
}
|
|
533
553
|
interface SanyError {
|
|
534
554
|
location: string;
|
|
@@ -570,6 +590,8 @@ interface LazySet {
|
|
|
570
590
|
interface SetValue {
|
|
571
591
|
kind: "Set";
|
|
572
592
|
elements: Value[];
|
|
593
|
+
writtenElements: Value[] | undefined;
|
|
594
|
+
isNormalized: boolean;
|
|
573
595
|
hash: number;
|
|
574
596
|
fingerprint: number;
|
|
575
597
|
isFingerprinted: boolean;
|
|
@@ -586,6 +608,7 @@ interface FunctionValue {
|
|
|
586
608
|
fingerprint: number;
|
|
587
609
|
writtenKeys: Value[] | undefined;
|
|
588
610
|
functionClass: FunctionClass | undefined;
|
|
611
|
+
lambdaDomain: Value | undefined;
|
|
589
612
|
isFingerprinted: boolean;
|
|
590
613
|
}
|
|
591
614
|
interface IntervalValue {
|
|
@@ -632,7 +655,8 @@ interface FilteredSetSource {
|
|
|
632
655
|
interface FilteredSetValue extends LazySet {
|
|
633
656
|
kind: "FilteredSet";
|
|
634
657
|
base: Value;
|
|
635
|
-
test: (element: Value) => boolean;
|
|
658
|
+
test: (element: Value, isMember: boolean) => boolean;
|
|
659
|
+
startPass?: (isMaterialized: boolean) => (element: Value) => boolean;
|
|
636
660
|
source?: FilteredSetSource;
|
|
637
661
|
}
|
|
638
662
|
interface UnionValue extends LazySet {
|
|
@@ -651,6 +675,7 @@ interface LazyFunctionValue {
|
|
|
651
675
|
kind: "LazyFunction";
|
|
652
676
|
domain: Value;
|
|
653
677
|
apply: (argument: Value) => Value;
|
|
678
|
+
boundTupleLengths?: (number | undefined)[];
|
|
654
679
|
source?: LazyFunctionSource;
|
|
655
680
|
functionClass?: FunctionClass;
|
|
656
681
|
enumerated?: FunctionValue;
|
|
@@ -659,22 +684,47 @@ interface LazyFunctionValue {
|
|
|
659
684
|
type Value = boolean | number | string | ModelValue | SetValue | MixedSetValue | FunctionValue | IntervalValue | InfiniteSetValue | SubsetValue | FunctionSetValue | RecordSetValue | ProductSetValue | SequenceSetValue | SetOperationValue | FilteredSetValue | UnionValue | LazyFunctionValue;
|
|
660
685
|
type FunctionClass = "lambda" | "tuple" | "record";
|
|
661
686
|
export declare const formatValue: (value: Value, isStrict?: boolean, isNormalized?: boolean) => string;
|
|
662
|
-
interface FingerprintFailure {
|
|
663
|
-
sources: Expression[];
|
|
664
|
-
reason: string;
|
|
665
|
-
}
|
|
666
687
|
interface JavaOverride {
|
|
667
688
|
module: string;
|
|
668
689
|
operator: string;
|
|
669
690
|
signature: string;
|
|
670
691
|
isMatched: boolean;
|
|
671
692
|
}
|
|
693
|
+
interface FingerprintFailure {
|
|
694
|
+
sources: Expression[];
|
|
695
|
+
reason: string;
|
|
696
|
+
}
|
|
697
|
+
type CoverageKind = "init" | "next" | "invariant" | "constraint" | "implied";
|
|
698
|
+
interface CoverageReport {
|
|
699
|
+
variables: CoverageVariable[];
|
|
700
|
+
relations: CoverageRelationReport[];
|
|
701
|
+
}
|
|
702
|
+
interface CoverageVariable {
|
|
703
|
+
label: string;
|
|
704
|
+
distinct: number;
|
|
705
|
+
}
|
|
706
|
+
interface CoverageRelationReport {
|
|
707
|
+
kind: CoverageKind;
|
|
708
|
+
label: string;
|
|
709
|
+
distinct: number;
|
|
710
|
+
generated: number;
|
|
711
|
+
expressions: CoverageExpression[];
|
|
712
|
+
}
|
|
713
|
+
interface CoverageExpression {
|
|
714
|
+
location: string;
|
|
715
|
+
depth: number;
|
|
716
|
+
count: number;
|
|
717
|
+
cost: number;
|
|
718
|
+
}
|
|
672
719
|
interface StateDump {
|
|
673
720
|
path: string;
|
|
674
721
|
dot?: boolean;
|
|
675
722
|
colorize?: boolean;
|
|
676
723
|
actionLabels?: boolean;
|
|
677
724
|
snapshot?: boolean;
|
|
725
|
+
constrained?: boolean;
|
|
726
|
+
stuttering?: boolean;
|
|
727
|
+
strict?: boolean;
|
|
678
728
|
}
|
|
679
729
|
interface FailureMessage {
|
|
680
730
|
code: number;
|
|
@@ -689,19 +739,50 @@ interface CheckOptions {
|
|
|
689
739
|
onPrint?: (text: string) => void;
|
|
690
740
|
onPause?: () => void;
|
|
691
741
|
readFile?: (path: string) => string | undefined;
|
|
692
|
-
writeFile?: (path: string, content: string) => void;
|
|
742
|
+
writeFile?: (path: string, content: string | Uint8Array) => void;
|
|
743
|
+
makeDirectory?: (path: string) => void;
|
|
693
744
|
seed?: bigint;
|
|
694
745
|
workers?: number;
|
|
695
|
-
|
|
746
|
+
/** TLC's -lncheck: "final" checks liveness only on the complete graph, "off" never looks for a cycle. */
|
|
747
|
+
livenessCheck?: "default" | "final" | "off";
|
|
748
|
+
/** TLC's -fp: the index of the polynomial in TLC's FP64.Polys that fingerprints states. */
|
|
749
|
+
fingerprintPolynomial?: number;
|
|
750
|
+
/** False for TLC's -terse, which prints a lazy value, such as SUBSET S, without enumerating it. */
|
|
751
|
+
isLazyValueExpanded?: boolean;
|
|
752
|
+
/** TLC's -view: prints each state as the value of the configuration's VIEW. */
|
|
753
|
+
isViewPrinted?: boolean;
|
|
754
|
+
/** TLC's -maxSetSize: the most elements TLC enumerates into a set, or states into a list of them. */
|
|
755
|
+
maxSetSize?: number;
|
|
756
|
+
/** TLC's -dump: writes the reachable states, or with `dot` the state graph, through writeFile. */
|
|
696
757
|
dump?: StateDump;
|
|
758
|
+
/** TLC's -tool, which changes the messages of TLC's errors. */
|
|
697
759
|
isTool?: boolean;
|
|
760
|
+
/** TLC's -continue: reports each violation through onProgress and goes on. */
|
|
698
761
|
isContinued?: boolean;
|
|
699
|
-
|
|
762
|
+
/** Skips fingerprintDistance, which takes fingerprinting every state again after the search. */
|
|
763
|
+
isFingerprintDistanceSkipped?: boolean;
|
|
764
|
+
moduleOperators?: ModuleOperator[];
|
|
765
|
+
/** TLC's trace exploration spec, and the binary trace TLC records for it unless -noTEBin. */
|
|
766
|
+
traceSpec?: TraceSpecOptions;
|
|
767
|
+
/** Whether the caller printed SANY's report, its warnings included, before the check. */
|
|
700
768
|
isSanyReported?: boolean;
|
|
769
|
+
/** False for TLC's -nowarning, which changes how TLC computes some successors. */
|
|
701
770
|
isWarningEnabled?: boolean;
|
|
771
|
+
/** TLC's -coverage, in minutes. */
|
|
772
|
+
coverage?: number;
|
|
702
773
|
version?: TlcVersion;
|
|
703
774
|
onProgress?: (progress: CheckProgress) => void;
|
|
704
775
|
}
|
|
776
|
+
interface TraceSpecOptions {
|
|
777
|
+
module: string;
|
|
778
|
+
traceFile?: string;
|
|
779
|
+
}
|
|
780
|
+
interface ModuleOperator {
|
|
781
|
+
kind: "postcondition" | "constraint" | "view";
|
|
782
|
+
module: string;
|
|
783
|
+
operator: string;
|
|
784
|
+
constants?: Record<string, string>;
|
|
785
|
+
}
|
|
705
786
|
interface InitialStatesProgress {
|
|
706
787
|
kind: "initial-states-progress";
|
|
707
788
|
count: number;
|
|
@@ -739,7 +820,9 @@ type CheckProgress = {
|
|
|
739
820
|
} | {
|
|
740
821
|
kind: "liveness-started";
|
|
741
822
|
branches: number;
|
|
823
|
+
/** Whether TLC checks the complete state graph. */
|
|
742
824
|
isComplete: boolean;
|
|
825
|
+
/** How many states the graphs of all branches have together. */
|
|
743
826
|
states: number;
|
|
744
827
|
statistics: SearchStatistics;
|
|
745
828
|
} | {
|
|
@@ -758,25 +841,33 @@ type CheckProgress = {
|
|
|
758
841
|
} | ({
|
|
759
842
|
kind: "java-override";
|
|
760
843
|
} & JavaOverride);
|
|
761
|
-
interface SearchStatistics extends Pick<CheckResult, "generatedStates" | "distinctStates" | "queuedStates" | "depth"> {}
|
|
844
|
+
interface SearchStatistics extends Pick<CheckResult, "generatedStates" | "distinctStates" | "queuedStates" | "depth" | "coverage"> {}
|
|
762
845
|
type CheckStatus = "success" | "assumption-violation" | "invariant-violation" | "property-violation" | "liveness-violation" | "postcondition-violation" | "deadlock" | "error";
|
|
763
846
|
interface TraceStep {
|
|
764
847
|
action: string | undefined;
|
|
848
|
+
/** TLC's name, parameters and location for the action that took this step. */
|
|
765
849
|
label: string | undefined;
|
|
766
850
|
state: Record<string, Value>;
|
|
851
|
+
/** What the spec prints before this step as TLC rebuilds the trace, and before it for the first. */
|
|
767
852
|
output?: OutputLine[];
|
|
768
853
|
}
|
|
769
854
|
interface Violation {
|
|
770
855
|
name: string;
|
|
856
|
+
/** Every temporal property that a liveness counterexample violates, in the configuration's order. */
|
|
771
857
|
properties?: string[];
|
|
772
858
|
trace: TraceStep[];
|
|
859
|
+
/** What the spec prints after the trace, as TLC finds the lasso's step back or rebuilds the trace. */
|
|
773
860
|
traceOutput?: OutputLine[];
|
|
861
|
+
/** What the postconditions print, which TLC checks after the lasso's step back. */
|
|
862
|
+
postconditionOutput?: OutputLine[];
|
|
774
863
|
loopStart: number | undefined;
|
|
775
864
|
loopLabel?: string;
|
|
776
865
|
message?: string;
|
|
777
866
|
counts?: string;
|
|
778
867
|
unwitnessed?: Postcondition;
|
|
868
|
+
/** A POSTCONDITION that is false or fails, which TLC checks as it prints the counterexample. */
|
|
779
869
|
postcondition?: Postcondition;
|
|
870
|
+
/** What TLC warns about after a counterexample, with its code. */
|
|
780
871
|
warning?: {
|
|
781
872
|
code: number;
|
|
782
873
|
text: string;
|
|
@@ -788,6 +879,11 @@ interface Postcondition {
|
|
|
788
879
|
message: string;
|
|
789
880
|
counts?: string;
|
|
790
881
|
}
|
|
882
|
+
interface TraceFailure extends FailureMessage {
|
|
883
|
+
/** What the spec prints as TLC rebuilds the step it then fails to print. */
|
|
884
|
+
output: OutputLine[];
|
|
885
|
+
}
|
|
886
|
+
/** An evaluation that failed during the search, with the behavior up to the state TLC was working on. */
|
|
791
887
|
interface EvaluationFailure {
|
|
792
888
|
code: number;
|
|
793
889
|
message: string;
|
|
@@ -796,11 +892,17 @@ interface EvaluationFailure {
|
|
|
796
892
|
traceOutput?: OutputLine[];
|
|
797
893
|
initialState: Record<string, Value> | undefined;
|
|
798
894
|
exitCode: number;
|
|
895
|
+
/** The expressions TLC was evaluating, outermost first, when its replay finds them. */
|
|
799
896
|
callStack: Expression[] | undefined;
|
|
897
|
+
/** Whether TLC prints the call stack before the error, as it does for a failed liveness check. */
|
|
800
898
|
isCallStackFirst?: boolean;
|
|
899
|
+
/** The FingerprintException the replay raises, which TLC reports in place of the call stack. */
|
|
801
900
|
fingerprint?: FingerprintFailure;
|
|
802
|
-
|
|
901
|
+
/** How TLC reports failing again as it prints the trace, since it can't fingerprint the state. */
|
|
902
|
+
traceFailure?: TraceFailure;
|
|
903
|
+
/** A POSTCONDITION that is false or fails after the trace, which TLC checks as it prints one. */
|
|
803
904
|
postcondition?: Postcondition;
|
|
905
|
+
/** Whether TLC stops before it prints the statistics, as it does for an illegal initial state. */
|
|
804
906
|
isWithoutStatistics?: boolean;
|
|
805
907
|
}
|
|
806
908
|
interface InitialStates {
|
|
@@ -815,12 +917,20 @@ interface CheckResult {
|
|
|
815
917
|
distinctStates: number;
|
|
816
918
|
queuedStates: number;
|
|
817
919
|
depth: number;
|
|
920
|
+
/** Once TLC computed all the initial states without a violation or an error. */
|
|
818
921
|
initialStates: InitialStates | undefined;
|
|
922
|
+
/** How many expanded states found each number of new states, when TLC prints the outdegree. */
|
|
819
923
|
outDegrees: number[] | undefined;
|
|
924
|
+
/** The smallest distance between two fingerprints, when TLC estimates a collision from them. */
|
|
820
925
|
fingerprintDistance: bigint | undefined;
|
|
926
|
+
/** A temporal property TLC finds violated as it adds the state it stopped at to the behavior graph, reported after. */
|
|
821
927
|
additionalViolation?: Violation;
|
|
928
|
+
/** Where TLC's worker fails to add the state to the behavior graph after it reports a violation. */
|
|
822
929
|
liveCallStack?: Expression[];
|
|
930
|
+
/** The outdegrees when TLC's workers stop on a violation that TLC 1.7.4 reports as a success. */
|
|
823
931
|
violationOutDegrees?: number[];
|
|
932
|
+
traceSpec?: string;
|
|
933
|
+
coverage?: CoverageReport;
|
|
824
934
|
}
|
|
825
935
|
export declare const check: (options: CheckOptions) => Promise<CheckResult>;
|
|
826
936
|
export declare const parseModule: (source: string) => Module;
|
|
@@ -856,4 +966,4 @@ interface ProveOptions {
|
|
|
856
966
|
workers?: number;
|
|
857
967
|
}
|
|
858
968
|
export declare const prove: (options: ProveOptions) => Promise<ProveResult>;
|
|
859
|
-
export type { CheckOptions, CheckProgress, CheckResult, CheckStatus, ConfigValue, ConstantAssignment, EvaluationFailure, ModelConfig, Module, ProofObligation, ProofStatus, ProveOptions, ProveResult, ProvedObligation, Substitution, TraceStep, TrivialObligation, UnprovedObligation, Value, Violation };
|
|
969
|
+
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{
|
|
9
|
+
import{I as e,V as t,b as n,v as r,x as i}from"./worker.js";import{bt as a,qt as o,wn as s}from"./transfer.js";import{S as c,o as l}from"./prove.js";export{r as TlaConfigError,n as TlaError,i as TlaEvaluationError,e as TlaSyntaxError,t as TlaUnsupportedError,c as check,o as formatValue,s as parseConfig,a as parseModule,l as prove};
|