tla-ts 0.0.3 → 0.0.4-dev.1a3acf6
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 +46 -115
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/deciders.cjs +366 -0
- package/dist/deciders.js +366 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +194 -8
- package/dist/index.d.ts +194 -8
- package/dist/index.js +1 -1
- package/dist/parallel-worker.cjs +1 -4
- package/dist/parallel-worker.js +1 -4
- package/dist/prove-worker.cjs +9 -0
- package/dist/prove-worker.d.cts +9 -0
- package/dist/prove-worker.d.ts +9 -0
- package/dist/prove-worker.js +9 -0
- package/dist/prove.cjs +1006 -0
- package/dist/prove.js +1006 -0
- package/dist/run.cjs +45 -0
- package/dist/run.js +45 -0
- package/dist/tlapm.cjs +10 -0
- package/dist/tlapm.js +10 -0
- package/dist/transfer.cjs +1377 -18
- package/dist/transfer.js +1377 -18
- package/dist/worker.cjs +21 -0
- package/dist/worker.js +21 -0
- package/package.json +24 -11
- package/src/ast.ts +149 -8
- package/src/bags.ts +26 -30
- package/src/builtins.ts +45 -19
- package/src/bundled-modules.ts +3 -3
- package/src/check.ts +1182 -900
- package/src/cli/options.ts +109 -0
- package/src/cli/run.ts +63 -0
- package/src/cli/shared.ts +106 -0
- package/src/cli/tlapm.ts +374 -0
- package/src/cli/tlc.ts +941 -0
- package/src/cli/xml-exporter.ts +221 -0
- package/src/cli.ts +9 -2
- package/src/codegen.ts +112 -51
- package/src/config.ts +254 -181
- package/src/dependencies.ts +5 -7
- package/src/environment.ts +579 -184
- package/src/errors.ts +287 -4
- package/src/evaluate.ts +1095 -365
- package/src/exit-codes.ts +22 -43
- package/src/fingerprints.ts +49 -14
- package/src/index.ts +11 -0
- package/src/instances.ts +73 -60
- package/src/java-overrides.ts +183 -66
- package/src/json.ts +31 -36
- package/src/levels.ts +197 -54
- package/src/lexer.ts +127 -30
- package/src/liveness-checker.ts +894 -0
- package/src/liveness.ts +246 -596
- package/src/{obligation-action.ts → obligations/action.ts} +248 -74
- package/src/{obligation-anon.ts → obligations/anonymize.ts} +55 -57
- package/src/obligations/equality.ts +260 -0
- package/src/obligations/expression.ts +618 -0
- package/src/{obligation-format.ts → obligations/format.ts} +7 -8
- package/src/obligations/generate.ts +457 -0
- package/src/{obligations.ts → obligations/index.ts} +46 -32
- package/src/{obligation-levels.ts → obligations/levels.ts} +44 -40
- package/src/obligations/module.ts +445 -0
- package/src/obligations/normalize.ts +554 -0
- package/src/obligations/operators.ts +176 -0
- package/src/obligations/pragma.ts +195 -0
- package/src/{obligation-printer.ts → obligations/printer.ts} +65 -230
- package/src/{obligation-proof.ts → obligations/proof.ts} +7 -2
- package/src/obligations/regroup.ts +100 -0
- package/src/{obligation-generate.ts → obligations/simplify.ts} +130 -536
- package/src/{obligation-source.ts → obligations/source.ts} +174 -216
- package/src/{obligation-deref.ts → obligations/subexpression.ts} +84 -115
- package/src/obligations/substitution.ts +261 -0
- package/src/obligations/temporal.ts +321 -0
- package/src/{obligation-tuples.ts → obligations/tuples.ts} +38 -54
- package/src/parallel-worker.ts +184 -235
- package/src/parallel.ts +156 -91
- package/src/parser.ts +490 -188
- package/src/pcal/ast.ts +755 -0
- package/src/pcal/parse.ts +1487 -0
- package/src/pcal/tokenize.ts +487 -0
- package/src/pcal/translate.ts +1151 -0
- package/src/pcal/validate.ts +444 -0
- package/src/prover/decide-pool.ts +95 -0
- package/src/prover/deciders.ts +33 -0
- package/src/prover/first-order.ts +175 -0
- package/src/prover/isabelle/LICENSE +36 -0
- package/src/prover/isabelle/LICENSE-tlapm +26 -0
- package/src/prover/isabelle/decide.ts +44 -0
- package/src/prover/isabelle/encode.ts +445 -0
- package/src/prover/isabelle/isar/inner-syntax.ts +579 -0
- package/src/prover/isabelle/isar/method.ts +367 -0
- package/src/prover/isabelle/isar/proof.ts +28 -0
- package/src/prover/isabelle/isar/statement.ts +57 -0
- package/src/prover/isabelle/isar/theory.ts +192 -0
- package/src/prover/isabelle/isar/type-check.ts +278 -0
- package/src/prover/isabelle/provers/blast/blast.ts +258 -0
- package/src/prover/isabelle/provers/blast/branch.ts +322 -0
- package/src/prover/isabelle/provers/blast/prove.ts +347 -0
- package/src/prover/isabelle/provers/blast/rules.ts +330 -0
- package/src/prover/isabelle/provers/blast/state.ts +180 -0
- package/src/prover/isabelle/provers/blast/term.ts +546 -0
- package/src/prover/isabelle/provers/clasimp.ts +150 -0
- package/src/prover/isabelle/provers/classical.ts +389 -0
- package/src/prover/isabelle/provers/hypsubst.ts +433 -0
- package/src/prover/isabelle/pure/bicompose.ts +174 -0
- package/src/prover/isabelle/pure/consts.ts +32 -0
- package/src/prover/isabelle/pure/conv.ts +79 -0
- package/src/prover/isabelle/pure/drule.ts +264 -0
- package/src/prover/isabelle/pure/envir.ts +331 -0
- package/src/prover/isabelle/pure/goal.ts +53 -0
- package/src/prover/isabelle/pure/interrupt.ts +16 -0
- package/src/prover/isabelle/pure/list.ts +12 -0
- package/src/prover/isabelle/pure/logic.ts +330 -0
- package/src/prover/isabelle/pure/name.ts +98 -0
- package/src/prover/isabelle/pure/net.ts +215 -0
- package/src/prover/isabelle/pure/object-logic.ts +41 -0
- package/src/prover/isabelle/pure/pattern.ts +631 -0
- package/src/prover/isabelle/pure/raw-simplifier.ts +338 -0
- package/src/prover/isabelle/pure/rewriter.ts +602 -0
- package/src/prover/isabelle/pure/search.ts +68 -0
- package/src/prover/isabelle/pure/seq.ts +133 -0
- package/src/prover/isabelle/pure/simplifier.ts +106 -0
- package/src/prover/isabelle/pure/table.ts +201 -0
- package/src/prover/isabelle/pure/tactic.ts +168 -0
- package/src/prover/isabelle/pure/tactical.ts +264 -0
- package/src/prover/isabelle/pure/term-ord.ts +105 -0
- package/src/prover/isabelle/pure/term.ts +688 -0
- package/src/prover/isabelle/pure/thm.ts +783 -0
- package/src/prover/isabelle/pure/type.ts +121 -0
- package/src/prover/isabelle/pure/unify.ts +753 -0
- package/src/prover/isabelle/pure/variable.ts +25 -0
- package/src/prover/isabelle/tla/classical-setup.ts +101 -0
- package/src/prover/isabelle/tla/context.ts +74 -0
- package/src/prover/isabelle/tla/logic-data.ts +5 -0
- package/src/prover/isabelle/tla/logic.ts +215 -0
- package/src/prover/isabelle/tla/simpdata.ts +241 -0
- package/src/prover/isabelle/tools/intuitionistic.ts +132 -0
- package/src/prover/ocaml.ts +22 -0
- package/src/prover/prep/action.ts +508 -0
- package/src/prover/prep/enabled-axioms.ts +189 -0
- package/src/prover/prep/fingerprint.ts +388 -0
- package/src/prover/prep/level-comparison.ts +529 -0
- package/src/prover/prep/md5.ts +60 -0
- package/src/prover/prep/methods.ts +221 -0
- package/src/prover/prep/normalize.ts +309 -0
- package/src/prover/prove-worker.ts +22 -0
- package/src/prover/prove.ts +492 -0
- package/src/prover/ptl/decide.ts +68 -0
- package/src/prover/ptl/encode.ts +244 -0
- package/src/prover/ptl/sat.ts +151 -0
- package/src/prover/ptl/tableau.ts +276 -0
- package/src/prover/smt/axioms.ts +209 -0
- package/src/prover/smt/context.ts +108 -0
- package/src/prover/smt/data.ts +636 -0
- package/src/prover/smt/encode.ts +275 -0
- package/src/prover/smt/extensionality.ts +65 -0
- package/src/prover/smt/flatten.ts +112 -0
- package/src/prover/smt/format.ts +154 -0
- package/src/prover/smt/instances.ts +181 -0
- package/src/prover/smt/rewrite.ts +766 -0
- package/src/prover/smt/solver/act-cache.ts +265 -0
- package/src/prover/smt/solver/arith-rewriter.ts +962 -0
- package/src/prover/smt/solver/array.ts +22 -0
- package/src/prover/smt/solver/asserted-formulas.ts +469 -0
- package/src/prover/smt/solver/ast-lt.ts +157 -0
- package/src/prover/smt/solver/ast-util.ts +91 -0
- package/src/prover/smt/solver/ast.ts +1315 -0
- package/src/prover/smt/solver/auf-solver.ts +572 -0
- package/src/prover/smt/solver/case-split-queue.ts +178 -0
- package/src/prover/smt/solver/cg-table.ts +175 -0
- package/src/prover/smt/solver/clause.ts +276 -0
- package/src/prover/smt/solver/conflict-resolution.ts +343 -0
- package/src/prover/smt/solver/context.ts +1292 -0
- package/src/prover/smt/solver/ctx-simplify.ts +334 -0
- package/src/prover/smt/solver/der.ts +224 -0
- package/src/prover/smt/solver/dyn-ack.ts +141 -0
- package/src/prover/smt/solver/e-matching.ts +659 -0
- package/src/prover/smt/solver/enode.ts +259 -0
- package/src/prover/smt/solver/expr-ref.ts +21 -0
- package/src/prover/smt/solver/expr-safe-replace.ts +172 -0
- package/src/prover/smt/solver/fingerprints.ts +92 -0
- package/src/prover/smt/solver/flat-literals.ts +51 -0
- package/src/prover/smt/solver/goal.ts +138 -0
- package/src/prover/smt/solver/hash.ts +173 -0
- package/src/prover/smt/solver/hashtable.ts +166 -0
- package/src/prover/smt/solver/internalizer.ts +1381 -0
- package/src/prover/smt/solver/lbool.ts +5 -0
- package/src/prover/smt/solver/literal.ts +24 -0
- package/src/prover/smt/solver/lp/bound-propagator.ts +391 -0
- package/src/prover/smt/solver/lp/constraints.ts +78 -0
- package/src/prover/smt/solver/lp/containers.ts +296 -0
- package/src/prover/smt/solver/lp/core-solver.ts +504 -0
- package/src/prover/smt/solver/lp/cross-nested.ts +224 -0
- package/src/prover/smt/solver/lp/dep-intervals.ts +642 -0
- package/src/prover/smt/solver/lp/dependency.ts +51 -0
- package/src/prover/smt/solver/lp/dioph-eq.ts +1181 -0
- package/src/prover/smt/solver/lp/explanation.ts +46 -0
- package/src/prover/smt/solver/lp/gomory.ts +255 -0
- package/src/prover/smt/solver/lp/hnf-cutter.ts +125 -0
- package/src/prover/smt/solver/lp/hnf.ts +281 -0
- package/src/prover/smt/solver/lp/int-cube.ts +295 -0
- package/src/prover/smt/solver/lp/int-solver.ts +514 -0
- package/src/prover/smt/solver/lp/lar-solver.ts +816 -0
- package/src/prover/smt/solver/lp/lar-term.ts +62 -0
- package/src/prover/smt/solver/lp/lp-settings.ts +91 -0
- package/src/prover/smt/solver/lp/maximize-term.ts +347 -0
- package/src/prover/smt/solver/lp/nex-creator.ts +381 -0
- package/src/prover/smt/solver/lp/nex.ts +120 -0
- package/src/prover/smt/solver/lp/nla-backoff.ts +43 -0
- package/src/prover/smt/solver/lp/nla-basics.ts +398 -0
- package/src/prover/smt/solver/lp/nla-core.ts +968 -0
- package/src/prover/smt/solver/lp/nla-divisions.ts +332 -0
- package/src/prover/smt/solver/lp/nla-emonics.ts +373 -0
- package/src/prover/smt/solver/lp/nla-factorization.ts +30 -0
- package/src/prover/smt/solver/lp/nla-grobner.ts +904 -0
- package/src/prover/smt/solver/lp/nla-horner.ts +126 -0
- package/src/prover/smt/solver/lp/nla-intervals.ts +265 -0
- package/src/prover/smt/solver/lp/nla-monomial-bounds.ts +715 -0
- package/src/prover/smt/solver/lp/nla-monotone.ts +59 -0
- package/src/prover/smt/solver/lp/nla-order.ts +307 -0
- package/src/prover/smt/solver/lp/nla-patcher.ts +112 -0
- package/src/prover/smt/solver/lp/nla-tangents.ts +251 -0
- package/src/prover/smt/solver/lp/nla-throttle.ts +85 -0
- package/src/prover/smt/solver/lp/nla-types.ts +124 -0
- package/src/prover/smt/solver/lp/nla-var-eqs.ts +141 -0
- package/src/prover/smt/solver/lp/nra-solver.ts +440 -0
- package/src/prover/smt/solver/lp/numeric-pair.ts +65 -0
- package/src/prover/smt/solver/lp/pdd-interval.ts +31 -0
- package/src/prover/smt/solver/lp/pdd-simplifier.ts +184 -0
- package/src/prover/smt/solver/lp/pdd-solver.ts +408 -0
- package/src/prover/smt/solver/lp/pdd.ts +971 -0
- package/src/prover/smt/solver/lp/random-updater.ts +138 -0
- package/src/prover/smt/solver/lp/static-matrix.ts +246 -0
- package/src/prover/smt/solver/lp/union-find.ts +96 -0
- package/src/prover/smt/solver/mam-compiler.ts +847 -0
- package/src/prover/smt/solver/mam-interpreter.ts +400 -0
- package/src/prover/smt/solver/maximize-ac-sharing.ts +118 -0
- package/src/prover/smt/solver/model-checker.ts +347 -0
- package/src/prover/smt/solver/model-evaluator.ts +262 -0
- package/src/prover/smt/solver/model-finder.ts +155 -0
- package/src/prover/smt/solver/model-generator.ts +97 -0
- package/src/prover/smt/solver/model-macro-solver.ts +728 -0
- package/src/prover/smt/solver/nlsat/algebraic.ts +1161 -0
- package/src/prover/smt/solver/nlsat/atoms.ts +238 -0
- package/src/prover/smt/solver/nlsat/evaluator.ts +303 -0
- package/src/prover/smt/solver/nlsat/explain.ts +607 -0
- package/src/prover/smt/solver/nlsat/interval-set.ts +351 -0
- package/src/prover/smt/solver/nlsat/levelwise.ts +737 -0
- package/src/prover/smt/solver/nlsat/mpbq.ts +161 -0
- package/src/prover/smt/solver/nlsat/polynomial.ts +1722 -0
- package/src/prover/smt/solver/nlsat/solver.ts +911 -0
- package/src/prover/smt/solver/nlsat/types.ts +43 -0
- package/src/prover/smt/solver/nlsat/upolynomial-factorization.ts +648 -0
- package/src/prover/smt/solver/nlsat/upolynomial.ts +996 -0
- package/src/prover/smt/solver/nnf.ts +469 -0
- package/src/prover/smt/solver/pattern-inference.ts +351 -0
- package/src/prover/smt/solver/poly-rewriter.ts +477 -0
- package/src/prover/smt/solver/propagate-values.ts +83 -0
- package/src/prover/smt/solver/proto-model.ts +551 -0
- package/src/prover/smt/solver/pull-quant.ts +139 -0
- package/src/prover/smt/solver/qe-lite-der.ts +526 -0
- package/src/prover/smt/solver/qe-lite-fm.ts +576 -0
- package/src/prover/smt/solver/qe-lite.ts +381 -0
- package/src/prover/smt/solver/qi-queue.ts +362 -0
- package/src/prover/smt/solver/quant-tactics.ts +117 -0
- package/src/prover/smt/solver/quantifier-analyzer.ts +562 -0
- package/src/prover/smt/solver/quantifier-manager.ts +186 -0
- package/src/prover/smt/solver/random-gen.ts +10 -0
- package/src/prover/smt/solver/rational.ts +165 -0
- package/src/prover/smt/solver/ref-vector.ts +62 -0
- package/src/prover/smt/solver/relevancy.ts +247 -0
- package/src/prover/smt/solver/rewriter-tpl.ts +1159 -0
- package/src/prover/smt/solver/rewriter.ts +843 -0
- package/src/prover/smt/solver/rlimit.ts +79 -0
- package/src/prover/smt/solver/smtlib-parser.ts +526 -0
- package/src/prover/smt/solver/solver.ts +71 -0
- package/src/prover/smt/solver/sort.ts +35 -0
- package/src/prover/smt/solver/sticky-generations.ts +69 -0
- package/src/prover/smt/solver/theory-lra-axioms.ts +340 -0
- package/src/prover/smt/solver/theory-lra-bounds.ts +226 -0
- package/src/prover/smt/solver/theory-lra-final-check.ts +252 -0
- package/src/prover/smt/solver/theory-lra-internalize.ts +476 -0
- package/src/prover/smt/solver/theory-lra-model.ts +243 -0
- package/src/prover/smt/solver/theory-lra-propagate.ts +405 -0
- package/src/prover/smt/solver/theory-lra-state.ts +43 -0
- package/src/prover/smt/solver/theory-lra.ts +56 -0
- package/src/prover/smt/solver/var-subst.ts +258 -0
- package/src/prover/smt/solver/z3-license.txt +10 -0
- package/src/prover/smt/table.ts +170 -0
- package/src/prover/tlapm/cache.ts +236 -0
- package/src/prover/tlapm/ocaml-marshal.ts +166 -0
- package/src/prover/tlapm/tlapm.ts +96 -0
- package/src/prover/tlaps-module.ts +510 -0
- package/src/prover/verdict.ts +13 -0
- package/src/prover/zenon/LICENSE +32 -0
- package/src/prover/zenon/check/check.ts +105 -0
- package/src/prover/zenon/check/definitions.ts +144 -0
- package/src/prover/zenon/check/equality.ts +182 -0
- package/src/prover/zenon/check/functions.ts +62 -0
- package/src/prover/zenon/check/keys.ts +125 -0
- package/src/prover/zenon/check/propositional.ts +104 -0
- package/src/prover/zenon/check/records.ts +188 -0
- package/src/prover/zenon/check/relations.ts +121 -0
- package/src/prover/zenon/check/rewrites.ts +224 -0
- package/src/prover/zenon/check/sets.ts +302 -0
- package/src/prover/zenon/check/terms.ts +127 -0
- package/src/prover/zenon/check/tla.ts +126 -0
- package/src/prover/zenon/decide.ts +107 -0
- package/src/prover/zenon/encode.ts +378 -0
- package/src/prover/zenon/eqrel.ts +300 -0
- package/src/prover/zenon/equality-rules.ts +435 -0
- package/src/prover/zenon/expr.ts +551 -0
- package/src/prover/zenon/index-table.ts +350 -0
- package/src/prover/zenon/isar-case.ts +513 -0
- package/src/prover/zenon/isar.ts +1249 -0
- package/src/prover/zenon/limits.ts +15 -0
- package/src/prover/zenon/llproof.ts +173 -0
- package/src/prover/zenon/mltoll.ts +1566 -0
- package/src/prover/zenon/node.ts +297 -0
- package/src/prover/zenon/ocaml.ts +169 -0
- package/src/prover/zenon/parse.ts +247 -0
- package/src/prover/zenon/phrase.ts +191 -0
- package/src/prover/zenon/proof.ts +198 -0
- package/src/prover/zenon/propositional-rules.ts +387 -0
- package/src/prover/zenon/rules.ts +94 -0
- package/src/prover/zenon/search.ts +288 -0
- package/src/prover/zenon/tla/functions.ts +151 -0
- package/src/prover/zenon/tla/llproof.ts +480 -0
- package/src/prover/zenon/tla/records.ts +225 -0
- package/src/prover/zenon/tla/rewrites.ts +447 -0
- package/src/prover/zenon/tla/sets.ts +304 -0
- package/src/prover/zenon/tla/terms.ts +162 -0
- package/src/prover/zenon/tla/tla.ts +506 -0
- package/src/randomization.ts +39 -27
- package/src/resolve.ts +1474 -426
- package/src/runtime.ts +25 -7
- package/src/sany/builtins.ts +147 -0
- package/src/sany/generator.ts +3111 -0
- package/src/sany/levels.ts +1205 -0
- package/src/sany/lexer.ts +544 -0
- package/src/sany/linter.ts +122 -0
- package/src/sany/modules.ts +1398 -0
- package/src/sany/nodes.ts +463 -0
- package/src/sany/parse-error.ts +2161 -0
- package/src/sany/report.ts +355 -0
- package/src/sany/selectors.ts +736 -0
- package/src/sany/source.ts +247 -0
- package/src/sany/xml.ts +1016 -0
- package/src/search.ts +969 -0
- package/src/spec-description.ts +66 -29
- package/src/{standard-levels.ts → standard-definitions.ts} +118 -2
- package/src/standard-modules.ts +215 -164
- package/src/state-graph.ts +181 -0
- package/src/subexpressions.ts +231 -171
- package/src/substitution-levels.ts +40 -19
- package/src/successors.ts +253 -125
- package/src/symmetry.ts +194 -54
- package/src/tableau.ts +60 -32
- package/src/tlc/fingerprint.ts +214 -0
- package/src/{tlc-modules.ts → tlc/jar-data.ts} +4 -0
- package/src/tlc/messages.ts +441 -0
- package/src/{tlc-order.ts → tlc/order.ts} +84 -16
- package/src/{tlc-random.ts → tlc/random.ts} +30 -189
- package/src/tlc/replay.ts +659 -0
- package/src/{tlc-summary.ts → tlc/summary.ts} +20 -5
- package/src/{tlc-module.ts → tlc/tlc-operators.ts} +59 -50
- package/src/{tlc-ext.ts → tlc/tlcext-operators.ts} +63 -45
- package/src/tlc/version.ts +19 -0
- package/src/transfer.ts +44 -32
- package/src/values.ts +843 -241
- package/src/worker.ts +62 -0
- package/dist/parallel.cjs +0 -12
- package/dist/parallel.js +0 -12
- package/dist/run-cli.cjs +0 -28
- package/dist/run-cli.js +0 -28
- package/src/canonical.ts +0 -39
- package/src/cli-options.ts +0 -58
- package/src/obligation-expression.ts +0 -1060
- package/src/obligation-module.ts +0 -1042
- package/src/run-cli.ts +0 -478
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("./
|
|
9
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./worker.cjs"),t=require("./transfer.cjs"),n=require("./prove.cjs");exports.TlaConfigError=e.m,exports.TlaError=e.h,exports.TlaEvaluationError=e.g,exports.TlaSyntaxError=e.D,exports.TlaUnsupportedError=e.k,exports.check=n.m,exports.formatValue=t.Mt,exports.parseConfig=n.h,exports.parseModule=t.H,exports.prove=n.r;
|
package/dist/index.d.cts
CHANGED
|
@@ -38,32 +38,42 @@ interface StringExpression {
|
|
|
38
38
|
interface IdentifierExpression {
|
|
39
39
|
kind: "Identifier";
|
|
40
40
|
name: string;
|
|
41
|
+
spelling?: string;
|
|
42
|
+
selectorRanges?: SourceRange[];
|
|
41
43
|
location: SourceLocation;
|
|
42
44
|
resolution?: LocalResolution;
|
|
43
45
|
}
|
|
44
46
|
interface ApplyExpression {
|
|
45
47
|
kind: "Apply";
|
|
46
48
|
operator: string;
|
|
49
|
+
spelling?: string;
|
|
47
50
|
args: Expression[];
|
|
48
51
|
argumentCounts?: number[];
|
|
52
|
+
argumentsRange?: SourceRange;
|
|
53
|
+
selectorRanges?: SourceRange[];
|
|
54
|
+
argumentRanges?: (SourceRange | undefined)[];
|
|
49
55
|
location: SourceLocation;
|
|
50
56
|
resolution?: LocalResolution;
|
|
51
57
|
}
|
|
52
58
|
interface OperatorReferenceExpression {
|
|
53
59
|
kind: "OperatorReference";
|
|
54
60
|
operator: string;
|
|
61
|
+
spelling?: string;
|
|
55
62
|
location: SourceLocation;
|
|
56
63
|
}
|
|
57
64
|
interface LambdaExpression {
|
|
58
65
|
kind: "Lambda";
|
|
59
66
|
params: string[];
|
|
67
|
+
paramRanges?: SourceRange[];
|
|
60
68
|
body: Expression;
|
|
69
|
+
operator?: string;
|
|
61
70
|
location: SourceLocation;
|
|
62
71
|
}
|
|
63
72
|
interface JunctionExpression {
|
|
64
73
|
kind: "And" | "Or";
|
|
65
74
|
operands: Expression[];
|
|
66
75
|
isBulleted?: boolean;
|
|
76
|
+
prefixEnds?: SourceLocation[];
|
|
67
77
|
location: SourceLocation;
|
|
68
78
|
}
|
|
69
79
|
interface PrimeExpression {
|
|
@@ -108,9 +118,11 @@ interface LetExpression {
|
|
|
108
118
|
type BoundPattern = {
|
|
109
119
|
kind: "Name";
|
|
110
120
|
name: string;
|
|
121
|
+
ranges?: SourceRange[];
|
|
111
122
|
} | {
|
|
112
123
|
kind: "Tuple";
|
|
113
124
|
names: string[];
|
|
125
|
+
ranges?: SourceRange[];
|
|
114
126
|
};
|
|
115
127
|
interface Bound {
|
|
116
128
|
pattern: BoundPattern;
|
|
@@ -126,6 +138,7 @@ interface UnboundedQuantifierExpression {
|
|
|
126
138
|
kind: "UnboundedQuantifier";
|
|
127
139
|
quantifier: "Forall" | "Exists";
|
|
128
140
|
names: string[];
|
|
141
|
+
nameRanges?: SourceRange[];
|
|
129
142
|
isTemporal?: boolean;
|
|
130
143
|
body: Expression;
|
|
131
144
|
location: SourceLocation;
|
|
@@ -175,6 +188,7 @@ interface FunctionSetExpression {
|
|
|
175
188
|
interface RecordField {
|
|
176
189
|
name: string;
|
|
177
190
|
value: Expression;
|
|
191
|
+
location: SourceLocation;
|
|
178
192
|
}
|
|
179
193
|
interface RecordExpression {
|
|
180
194
|
kind: "Record" | "RecordSet";
|
|
@@ -208,6 +222,11 @@ interface FunctionApplicationExpression {
|
|
|
208
222
|
args: Expression[];
|
|
209
223
|
location: SourceLocation;
|
|
210
224
|
}
|
|
225
|
+
interface BracketExpression {
|
|
226
|
+
kind: "Bracket";
|
|
227
|
+
args: Expression[];
|
|
228
|
+
location: SourceLocation;
|
|
229
|
+
}
|
|
211
230
|
interface FieldAccessExpression {
|
|
212
231
|
kind: "FieldAccess";
|
|
213
232
|
record: Expression;
|
|
@@ -241,6 +260,7 @@ interface LabelExpression {
|
|
|
241
260
|
kind: "Label";
|
|
242
261
|
name: string;
|
|
243
262
|
params: string[];
|
|
263
|
+
paramRanges?: SourceRange[];
|
|
244
264
|
body: Expression;
|
|
245
265
|
location: SourceLocation;
|
|
246
266
|
}
|
|
@@ -262,9 +282,11 @@ type Selector = {
|
|
|
262
282
|
interface SubexpressionExpression {
|
|
263
283
|
kind: "Subexpression";
|
|
264
284
|
selectors: Selector[];
|
|
285
|
+
selectorRanges?: SourceRange[];
|
|
286
|
+
argumentRanges?: (SourceRange | undefined)[];
|
|
265
287
|
location: SourceLocation;
|
|
266
288
|
}
|
|
267
|
-
type Expression = NumberExpression | DecimalExpression | StringExpression | IdentifierExpression | ApplyExpression | OperatorReferenceExpression | LambdaExpression | JunctionExpression | PrimeExpression | UnchangedExpression | EnabledExpression | IfExpression | CaseExpression | LetExpression | QuantifierExpression | UnboundedQuantifierExpression | ChooseExpression | SetEnumerationExpression | SetFilterExpression | SetMapExpression | TupleExpression | FunctionConstructionExpression | FunctionSetExpression | RecordExpression | ExceptExpression | ExceptAtExpression | FunctionApplicationExpression | FieldAccessExpression | ProductExpression | TemporalExpression | ActionExpression | FairnessExpression | LabelExpression | SubexpressionExpression;
|
|
289
|
+
type Expression = NumberExpression | DecimalExpression | StringExpression | IdentifierExpression | ApplyExpression | OperatorReferenceExpression | LambdaExpression | JunctionExpression | PrimeExpression | UnchangedExpression | EnabledExpression | IfExpression | CaseExpression | LetExpression | QuantifierExpression | UnboundedQuantifierExpression | ChooseExpression | SetEnumerationExpression | SetFilterExpression | SetMapExpression | TupleExpression | FunctionConstructionExpression | FunctionSetExpression | RecordExpression | ExceptExpression | ExceptAtExpression | FunctionApplicationExpression | BracketExpression | FieldAccessExpression | ProductExpression | TemporalExpression | ActionExpression | FairnessExpression | LabelExpression | SubexpressionExpression;
|
|
268
290
|
interface OperatorParam {
|
|
269
291
|
name: string;
|
|
270
292
|
arity: number;
|
|
@@ -287,6 +309,7 @@ interface FunctionDefinition {
|
|
|
287
309
|
body: Expression;
|
|
288
310
|
isLocal: boolean;
|
|
289
311
|
isRecursive: boolean;
|
|
312
|
+
isSelfReferential?: boolean;
|
|
290
313
|
location: SourceLocation;
|
|
291
314
|
}
|
|
292
315
|
type Definition = OperatorDefinition | FunctionDefinition;
|
|
@@ -303,6 +326,7 @@ interface Assumption {
|
|
|
303
326
|
}
|
|
304
327
|
interface InstanceSubstitution {
|
|
305
328
|
name: string;
|
|
329
|
+
nameRange: SourceRange;
|
|
306
330
|
expression: Expression;
|
|
307
331
|
}
|
|
308
332
|
interface Instance {
|
|
@@ -322,6 +346,7 @@ interface NewSymbol {
|
|
|
322
346
|
arity: number;
|
|
323
347
|
level: "Constant" | "Variable" | "State" | "Action" | "Temporal";
|
|
324
348
|
set: Expression | undefined;
|
|
349
|
+
nameRange?: SourceRange;
|
|
325
350
|
location: SourceLocation;
|
|
326
351
|
}
|
|
327
352
|
interface AssumeProve {
|
|
@@ -371,6 +396,7 @@ type StepBody = UseOrHide | Instance | DefineStep | {
|
|
|
371
396
|
} | {
|
|
372
397
|
kind: "Take";
|
|
373
398
|
names: string[];
|
|
399
|
+
nameRanges?: SourceRange[];
|
|
374
400
|
bounds: Bound[];
|
|
375
401
|
} | {
|
|
376
402
|
kind: "Witness";
|
|
@@ -378,6 +404,7 @@ type StepBody = UseOrHide | Instance | DefineStep | {
|
|
|
378
404
|
} | {
|
|
379
405
|
kind: "Pick";
|
|
380
406
|
names: string[];
|
|
407
|
+
nameRanges?: SourceRange[];
|
|
381
408
|
bounds: Bound[];
|
|
382
409
|
body: Expression;
|
|
383
410
|
} | {
|
|
@@ -395,6 +422,7 @@ interface ProofStep {
|
|
|
395
422
|
token: string;
|
|
396
423
|
body: StepBody;
|
|
397
424
|
head: SourceRange;
|
|
425
|
+
statement: SourceRange;
|
|
398
426
|
proof: Proof | undefined;
|
|
399
427
|
location: SourceLocation;
|
|
400
428
|
}
|
|
@@ -405,11 +433,9 @@ interface Theorem {
|
|
|
405
433
|
location: SourceLocation;
|
|
406
434
|
}
|
|
407
435
|
type ModuleUnit = {
|
|
408
|
-
kind: "Constants";
|
|
409
|
-
declarations: Declaration[];
|
|
410
|
-
} | {
|
|
411
|
-
kind: "Variables";
|
|
436
|
+
kind: "Constants" | "Variables";
|
|
412
437
|
declarations: Declaration[];
|
|
438
|
+
location: SourceLocation;
|
|
413
439
|
} | {
|
|
414
440
|
kind: "Recursive";
|
|
415
441
|
declarations: Declaration[];
|
|
@@ -447,6 +473,7 @@ interface Module {
|
|
|
447
473
|
uses: UseOrHide[];
|
|
448
474
|
units: ModuleUnit[];
|
|
449
475
|
}
|
|
476
|
+
type TlcVersion = "1.7.4" | "master";
|
|
450
477
|
type ConfigValue = {
|
|
451
478
|
kind: "Number";
|
|
452
479
|
value: number;
|
|
@@ -493,7 +520,7 @@ interface ModelConfig {
|
|
|
493
520
|
periodic: string | undefined;
|
|
494
521
|
rlReward: string | undefined;
|
|
495
522
|
}
|
|
496
|
-
export declare const parseConfig: (source: string) => ModelConfig;
|
|
523
|
+
export declare const parseConfig: (source: string, version?: TlcVersion) => ModelConfig;
|
|
497
524
|
export declare class TlaError extends Error {
|
|
498
525
|
constructor(message: string, cause?: unknown);
|
|
499
526
|
}
|
|
@@ -503,9 +530,20 @@ interface SyntaxFailure {
|
|
|
503
530
|
column: number;
|
|
504
531
|
isEnd: boolean;
|
|
505
532
|
}
|
|
533
|
+
interface SanyError {
|
|
534
|
+
location: string;
|
|
535
|
+
message: string;
|
|
536
|
+
}
|
|
537
|
+
interface SanyReport {
|
|
538
|
+
errors: SanyError[];
|
|
539
|
+
warnings: SanyError[];
|
|
540
|
+
isFatal: boolean;
|
|
541
|
+
parseError?: string;
|
|
542
|
+
}
|
|
506
543
|
export declare class TlaSyntaxError extends TlaError {
|
|
507
544
|
failure: SyntaxFailure | undefined;
|
|
508
|
-
|
|
545
|
+
sany: SanyReport | undefined;
|
|
546
|
+
constructor(message: string, cause?: unknown, failure?: SyntaxFailure, sany?: SanyReport);
|
|
509
547
|
}
|
|
510
548
|
export declare class TlaConfigError extends TlaError {
|
|
511
549
|
constructor(message: string, cause?: unknown);
|
|
@@ -520,12 +558,14 @@ interface ModelValue {
|
|
|
520
558
|
kind: "ModelValue";
|
|
521
559
|
name: string;
|
|
522
560
|
type: string | undefined;
|
|
561
|
+
rank: number;
|
|
523
562
|
}
|
|
524
563
|
interface SetValue {
|
|
525
564
|
kind: "Set";
|
|
526
565
|
elements: Value[];
|
|
527
566
|
hash: number;
|
|
528
567
|
fingerprint: number;
|
|
568
|
+
isFingerprinted: boolean;
|
|
529
569
|
}
|
|
530
570
|
interface MixedSetValue {
|
|
531
571
|
kind: "MixedSet";
|
|
@@ -538,6 +578,8 @@ interface FunctionValue {
|
|
|
538
578
|
hash: number;
|
|
539
579
|
fingerprint: number;
|
|
540
580
|
writtenKeys: Value[] | undefined;
|
|
581
|
+
functionClass: FunctionClass | undefined;
|
|
582
|
+
isFingerprinted: boolean;
|
|
541
583
|
}
|
|
542
584
|
interface IntervalValue {
|
|
543
585
|
kind: "Interval";
|
|
@@ -576,10 +618,15 @@ interface SetOperationValue {
|
|
|
576
618
|
left: Value;
|
|
577
619
|
right: Value;
|
|
578
620
|
}
|
|
621
|
+
interface FilteredSetSource {
|
|
622
|
+
names: string;
|
|
623
|
+
predicate: string;
|
|
624
|
+
}
|
|
579
625
|
interface FilteredSetValue {
|
|
580
626
|
kind: "FilteredSet";
|
|
581
627
|
base: Value;
|
|
582
628
|
test: (element: Value) => boolean;
|
|
629
|
+
source?: FilteredSetSource;
|
|
583
630
|
}
|
|
584
631
|
interface UnionValue {
|
|
585
632
|
kind: "Union";
|
|
@@ -598,9 +645,33 @@ interface LazyFunctionValue {
|
|
|
598
645
|
domain: Value;
|
|
599
646
|
apply: (argument: Value) => Value;
|
|
600
647
|
source?: LazyFunctionSource;
|
|
648
|
+
functionClass?: FunctionClass;
|
|
601
649
|
}
|
|
602
650
|
type Value = boolean | number | string | ModelValue | SetValue | MixedSetValue | FunctionValue | IntervalValue | InfiniteSetValue | SubsetValue | FunctionSetValue | RecordSetValue | ProductSetValue | SequenceSetValue | SetOperationValue | FilteredSetValue | UnionValue | LazyFunctionValue;
|
|
651
|
+
type FunctionClass = "lambda" | "tuple" | "record";
|
|
603
652
|
export declare const formatValue: (value: Value, isStrict?: boolean, isNormalized?: boolean) => string;
|
|
653
|
+
interface FingerprintFailure {
|
|
654
|
+
sources: Expression[];
|
|
655
|
+
reason: string;
|
|
656
|
+
}
|
|
657
|
+
interface JavaOverride {
|
|
658
|
+
module: string;
|
|
659
|
+
operator: string;
|
|
660
|
+
signature: string;
|
|
661
|
+
isMatched: boolean;
|
|
662
|
+
}
|
|
663
|
+
interface StateDump {
|
|
664
|
+
path: string;
|
|
665
|
+
dot?: boolean;
|
|
666
|
+
colorize?: boolean;
|
|
667
|
+
actionLabels?: boolean;
|
|
668
|
+
snapshot?: boolean;
|
|
669
|
+
}
|
|
670
|
+
interface FailureMessage {
|
|
671
|
+
code: number;
|
|
672
|
+
message: string;
|
|
673
|
+
toolMessage: string;
|
|
674
|
+
}
|
|
604
675
|
interface CheckOptions {
|
|
605
676
|
source: string;
|
|
606
677
|
config: string | ModelConfig;
|
|
@@ -613,32 +684,111 @@ interface CheckOptions {
|
|
|
613
684
|
seed?: bigint;
|
|
614
685
|
workers?: number;
|
|
615
686
|
livenessCheck?: "default" | "final";
|
|
687
|
+
dump?: StateDump;
|
|
688
|
+
isTool?: boolean;
|
|
689
|
+
isTraceRecorded?: boolean;
|
|
690
|
+
isSanyReported?: boolean;
|
|
691
|
+
isWarningEnabled?: boolean;
|
|
692
|
+
version?: TlcVersion;
|
|
693
|
+
onProgress?: (progress: CheckProgress) => void;
|
|
694
|
+
}
|
|
695
|
+
interface InitialStatesProgress {
|
|
696
|
+
kind: "initial-states-progress";
|
|
697
|
+
count: number;
|
|
698
|
+
}
|
|
699
|
+
interface InitialStateViolation {
|
|
700
|
+
kind: "initial-state-violation";
|
|
701
|
+
status: "invariant-violation" | "liveness-violation";
|
|
702
|
+
name: string;
|
|
703
|
+
state: Record<string, Value>;
|
|
616
704
|
}
|
|
705
|
+
type OutputLine = string | InitialStatesProgress | InitialStateViolation;
|
|
706
|
+
type CheckProgress = {
|
|
707
|
+
kind: "parsed";
|
|
708
|
+
} | {
|
|
709
|
+
kind: "constant-level-invariant";
|
|
710
|
+
name: string;
|
|
711
|
+
} | {
|
|
712
|
+
kind: "state-level-property";
|
|
713
|
+
name: string;
|
|
714
|
+
} | {
|
|
715
|
+
kind: "liveness-initializing";
|
|
716
|
+
isSymmetric: boolean;
|
|
717
|
+
isConstrained: boolean;
|
|
718
|
+
} | {
|
|
719
|
+
kind: "liveness-prepared";
|
|
720
|
+
branches: number;
|
|
721
|
+
} | {
|
|
722
|
+
kind: "initial-states-started";
|
|
723
|
+
} | InitialStatesProgress | {
|
|
724
|
+
kind: "initial-states-computed";
|
|
725
|
+
initialStates: InitialStates;
|
|
726
|
+
} | {
|
|
727
|
+
kind: "progress";
|
|
728
|
+
statistics: SearchStatistics;
|
|
729
|
+
} | {
|
|
730
|
+
kind: "liveness-started";
|
|
731
|
+
branches: number;
|
|
732
|
+
isComplete: boolean;
|
|
733
|
+
states: number;
|
|
734
|
+
statistics: SearchStatistics;
|
|
735
|
+
} | {
|
|
736
|
+
kind: "liveness-finished";
|
|
737
|
+
} | {
|
|
738
|
+
kind: "warning";
|
|
739
|
+
code: number;
|
|
740
|
+
text: string;
|
|
741
|
+
} | ({
|
|
742
|
+
kind: "java-override";
|
|
743
|
+
} & JavaOverride);
|
|
744
|
+
interface SearchStatistics extends Pick<CheckResult, "generatedStates" | "distinctStates" | "queuedStates" | "depth"> {}
|
|
617
745
|
type CheckStatus = "success" | "assumption-violation" | "invariant-violation" | "property-violation" | "liveness-violation" | "postcondition-violation" | "deadlock" | "error";
|
|
618
746
|
interface TraceStep {
|
|
619
747
|
action: string | undefined;
|
|
620
748
|
label: string | undefined;
|
|
621
749
|
state: Record<string, Value>;
|
|
750
|
+
output?: OutputLine[];
|
|
622
751
|
}
|
|
623
752
|
interface Violation {
|
|
624
753
|
name: string;
|
|
754
|
+
properties?: string[];
|
|
625
755
|
trace: TraceStep[];
|
|
756
|
+
traceOutput?: OutputLine[];
|
|
626
757
|
loopStart: number | undefined;
|
|
627
758
|
loopLabel?: string;
|
|
628
759
|
message?: string;
|
|
629
760
|
counts?: string;
|
|
630
761
|
unwitnessed?: Postcondition;
|
|
762
|
+
postcondition?: Postcondition;
|
|
763
|
+
warning?: {
|
|
764
|
+
code: number;
|
|
765
|
+
text: string;
|
|
766
|
+
};
|
|
631
767
|
}
|
|
632
768
|
interface Postcondition {
|
|
633
769
|
name: string;
|
|
770
|
+
code: number;
|
|
634
771
|
message: string;
|
|
635
772
|
counts?: string;
|
|
636
773
|
}
|
|
637
774
|
interface EvaluationFailure {
|
|
775
|
+
code: number;
|
|
638
776
|
message: string;
|
|
777
|
+
toolMessage: string;
|
|
639
778
|
trace: TraceStep[];
|
|
779
|
+
traceOutput?: OutputLine[];
|
|
640
780
|
initialState: Record<string, Value> | undefined;
|
|
641
781
|
exitCode: number;
|
|
782
|
+
callStack: Expression[] | undefined;
|
|
783
|
+
isCallStackFirst?: boolean;
|
|
784
|
+
fingerprint?: FingerprintFailure;
|
|
785
|
+
traceFailure?: FailureMessage;
|
|
786
|
+
postcondition?: Postcondition;
|
|
787
|
+
isWithoutStatistics?: boolean;
|
|
788
|
+
}
|
|
789
|
+
interface InitialStates {
|
|
790
|
+
generated: number;
|
|
791
|
+
distinct: number;
|
|
642
792
|
}
|
|
643
793
|
interface CheckResult {
|
|
644
794
|
status: CheckStatus;
|
|
@@ -648,9 +798,45 @@ interface CheckResult {
|
|
|
648
798
|
distinctStates: number;
|
|
649
799
|
queuedStates: number;
|
|
650
800
|
depth: number;
|
|
801
|
+
initialStates: InitialStates | undefined;
|
|
651
802
|
outDegrees: number[] | undefined;
|
|
652
803
|
fingerprintDistance: bigint | undefined;
|
|
804
|
+
additionalViolation?: Violation;
|
|
805
|
+
liveCallStack?: Expression[];
|
|
806
|
+
violationOutDegrees?: number[];
|
|
653
807
|
}
|
|
654
808
|
export declare const check: (options: CheckOptions) => Promise<CheckResult>;
|
|
655
809
|
export declare const parseModule: (source: string) => Module;
|
|
656
|
-
|
|
810
|
+
interface ObligationBase {
|
|
811
|
+
id: number;
|
|
812
|
+
location: string;
|
|
813
|
+
text: string;
|
|
814
|
+
}
|
|
815
|
+
interface ProvedObligation extends ObligationBase {
|
|
816
|
+
status: "proved";
|
|
817
|
+
prover: string;
|
|
818
|
+
}
|
|
819
|
+
interface TrivialObligation extends ObligationBase {
|
|
820
|
+
status: "trivial";
|
|
821
|
+
}
|
|
822
|
+
interface UnprovedObligation extends ObligationBase {
|
|
823
|
+
status: "failed" | "unsupported";
|
|
824
|
+
reason: string;
|
|
825
|
+
}
|
|
826
|
+
type ProofObligation = ProvedObligation | TrivialObligation | UnprovedObligation;
|
|
827
|
+
type ProofStatus = ProofObligation["status"];
|
|
828
|
+
interface ProveResult {
|
|
829
|
+
obligations: ProofObligation[];
|
|
830
|
+
missingProofCount: number;
|
|
831
|
+
omittedProofCount: number;
|
|
832
|
+
}
|
|
833
|
+
interface ProveOptions {
|
|
834
|
+
source: string;
|
|
835
|
+
loadModule?: (name: string) => string | undefined;
|
|
836
|
+
backend?: "tla-ts" | "tlapm";
|
|
837
|
+
signal?: AbortSignal;
|
|
838
|
+
onObligation?: (obligation: ProofObligation) => void;
|
|
839
|
+
workers?: number;
|
|
840
|
+
}
|
|
841
|
+
export declare const prove: (options: ProveOptions) => Promise<ProveResult>;
|
|
842
|
+
export type { CheckOptions, CheckProgress, CheckResult, CheckStatus, ConfigValue, ConstantAssignment, EvaluationFailure, ModelConfig, Module, ProofObligation, ProofStatus, ProveOptions, ProveResult, ProvedObligation, Substitution, TraceStep, TrivialObligation, UnprovedObligation, Value, Violation };
|