tla-ts 0.0.4-dev.c4929d7 → 0.0.4-dev.ca40dfe
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 +31 -6
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/deciders.cjs +27 -27
- package/dist/deciders.js +34 -34
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +12 -14
- package/dist/index.d.ts +12 -14
- 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 +37 -27
- package/dist/prove.js +39 -29
- package/dist/run.cjs +45 -0
- package/dist/run.js +45 -0
- package/dist/tlapm.cjs +2 -2
- package/dist/tlapm.js +2 -2
- package/dist/transfer.cjs +76 -86
- package/dist/transfer.js +73 -83
- package/dist/worker.cjs +6 -6
- package/dist/worker.js +6 -6
- package/package.json +1 -1
- package/src/ast.ts +2 -2
- package/src/bags.ts +22 -23
- package/src/builtins.ts +16 -8
- package/src/check.ts +131 -1154
- package/src/{cli-options.ts → cli/options.ts} +54 -9
- 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 +1 -1
- package/src/codegen.ts +17 -15
- package/src/config.ts +5 -5
- package/src/dependencies.ts +4 -6
- package/src/environment.ts +55 -60
- package/src/errors.ts +12 -36
- package/src/evaluate.ts +81 -101
- package/src/exit-codes.ts +1 -1
- package/src/fingerprints.ts +3 -3
- package/src/instances.ts +56 -46
- package/src/java-overrides.ts +79 -41
- package/src/json.ts +31 -36
- package/src/levels.ts +10 -13
- package/src/{live-check.ts → liveness-checker.ts} +169 -142
- package/src/liveness.ts +38 -34
- package/src/obligations/action.ts +9 -45
- package/src/obligations/{anon.ts → anonymize.ts} +13 -25
- package/src/obligations/equality.ts +260 -0
- package/src/obligations/expression.ts +42 -517
- package/src/obligations/generate.ts +88 -778
- package/src/obligations/index.ts +20 -22
- package/src/obligations/levels.ts +36 -41
- package/src/obligations/module.ts +88 -708
- package/src/obligations/normalize.ts +554 -0
- package/src/obligations/operators.ts +176 -0
- package/src/obligations/pragma.ts +21 -15
- package/src/obligations/printer.ts +81 -188
- package/src/obligations/proof.ts +0 -1
- package/src/obligations/regroup.ts +100 -0
- package/src/obligations/simplify.ts +668 -0
- package/src/obligations/source.ts +25 -131
- package/src/obligations/{deref.ts → subexpression.ts} +48 -56
- package/src/obligations/substitution.ts +261 -0
- package/src/obligations/temporal.ts +28 -26
- package/src/obligations/tuples.ts +37 -53
- package/src/parallel-worker.ts +37 -33
- package/src/parallel.ts +30 -24
- package/src/parser.ts +67 -74
- package/src/{pcal-ast.ts → pcal/ast.ts} +2 -17
- package/src/{pcal-parse.ts → pcal/parse.ts} +28 -64
- package/src/{pcal-tokenize.ts → pcal/tokenize.ts} +10 -39
- package/src/{pcal-translate.ts → pcal/translate.ts} +30 -109
- package/src/{pcal-validate.ts → pcal/validate.ts} +10 -20
- package/src/prove/decide-pool.ts +7 -12
- package/src/{obligations/pickle.ts → prove/first-order.ts} +79 -2
- package/src/prove/isabelle/decide.ts +3 -6
- package/src/prove/isabelle/encode.ts +35 -93
- package/src/prove/isabelle/isar/inner-syntax.ts +1 -1
- package/src/prove/isabelle/isar/method.ts +3 -3
- package/src/prove/isabelle/isar/type-check.ts +1 -1
- package/src/prove/isabelle/provers/blast/blast.ts +1 -1
- package/src/prove/isabelle/provers/blast/branch.ts +1 -1
- package/src/prove/isabelle/provers/blast/term.ts +3 -4
- package/src/prove/isabelle/provers/clasimp.ts +1 -1
- package/src/prove/isabelle/provers/classical.ts +3 -3
- package/src/prove/isabelle/provers/hypsubst.ts +1 -9
- package/src/prove/isabelle/pure/conv.ts +1 -1
- package/src/prove/isabelle/pure/drule.ts +2 -2
- package/src/prove/isabelle/pure/envir.ts +3 -35
- package/src/prove/isabelle/pure/logic.ts +4 -76
- package/src/prove/isabelle/pure/name.ts +1 -13
- package/src/prove/isabelle/pure/net.ts +2 -49
- package/src/prove/isabelle/pure/pattern.ts +3 -22
- package/src/prove/isabelle/pure/raw-simplifier.ts +3 -18
- package/src/prove/isabelle/pure/seq.ts +0 -23
- package/src/prove/isabelle/pure/simplifier.ts +2 -8
- package/src/prove/isabelle/pure/table.ts +1 -8
- package/src/prove/isabelle/pure/tactic.ts +5 -113
- package/src/prove/isabelle/pure/tactical.ts +1 -84
- package/src/prove/isabelle/pure/term-ord.ts +1 -55
- package/src/prove/isabelle/pure/term.ts +8 -128
- package/src/prove/isabelle/pure/thm.ts +4 -27
- package/src/prove/isabelle/pure/type.ts +0 -12
- package/src/prove/isabelle/pure/unify.ts +1 -1
- package/src/prove/isabelle/tla/classical-setup.ts +1 -1
- package/src/prove/ocaml.ts +1 -1
- package/src/prove/prep/action.ts +23 -36
- package/src/prove/prep/enabled-axioms.ts +2 -2
- package/src/prove/prep/fingerprint.ts +3 -3
- package/src/prove/prep/level-comparison.ts +9 -37
- package/src/prove/prep/md5.ts +2 -9
- package/src/prove/prep/normalize.ts +309 -0
- package/src/prove/prove-worker.ts +2 -5
- package/src/prove/prove.ts +98 -111
- package/src/prove/ptl/encode.ts +19 -31
- package/src/prove/smt/axioms.ts +45 -58
- package/src/prove/smt/encode.ts +124 -15
- package/src/prove/smt/instances.ts +2 -3
- package/src/prove/smt/rewrite.ts +24 -31
- package/src/prove/smt/solver/ast-util.ts +0 -56
- package/src/prove/smt/solver/case-split-queue.ts +1 -1
- package/src/prove/smt/solver/enode.ts +1 -1
- package/src/prove/smt/solver/lp/dep-intervals.ts +0 -14
- package/src/prove/smt/solver/model-macro-solver.ts +1 -1
- package/src/prove/smt/solver/nlsat/algebraic.ts +3 -3
- package/src/prove/smt/solver/nlsat/atoms.ts +1 -1
- package/src/prove/smt/solver/nlsat/explain.ts +1 -1
- package/src/prove/smt/solver/nlsat/interval-set.ts +1 -1
- package/src/prove/smt/solver/nlsat/levelwise.ts +4 -7
- package/src/prove/smt/solver/nlsat/polynomial.ts +4 -4
- package/src/prove/smt/solver/nlsat/upolynomial.ts +2 -2
- package/src/prove/smt/solver/pattern-inference.ts +1 -1
- package/src/prove/smt/solver/relevancy.ts +2 -2
- package/src/prove/smt/solver/rewriter.ts +1 -1
- package/src/prove/smt/solver/solver.ts +2 -2
- package/src/{tlapm-cache.ts → prove/tlapm/cache.ts} +11 -11
- package/src/{ocaml-marshal.ts → prove/tlapm/ocaml-marshal.ts} +1 -1
- package/src/prove/verdict.ts +0 -5
- package/src/prove/zenon/decide.ts +5 -11
- package/src/prove/zenon/encode.ts +21 -80
- package/src/prove/zenon/eqrel.ts +1 -1
- package/src/prove/zenon/equality-rules.ts +1 -1
- package/src/prove/zenon/expr.ts +2 -2
- package/src/prove/zenon/index-table.ts +1 -1
- package/src/prove/zenon/isar.ts +1 -1
- package/src/prove/zenon/llproof.ts +1 -1
- package/src/prove/zenon/mltoll.ts +1 -1
- package/src/prove/zenon/node.ts +1 -1
- package/src/prove/zenon/search.ts +1 -1
- package/src/prove/zenon/tla/terms.ts +1 -20
- package/src/prove/zenon/tla/tla.ts +1 -1
- package/src/randomization.ts +19 -24
- package/src/resolve.ts +15 -22
- package/src/runtime.ts +8 -8
- package/src/{sany-builtins.ts → sany/builtins.ts} +1 -1
- package/src/{sany-generator.ts → sany/generator.ts} +38 -55
- package/src/{sany-levels.ts → sany/levels.ts} +45 -48
- package/src/{sany-lexer.ts → sany/lexer.ts} +2 -3
- package/src/{sany-linter.ts → sany/linter.ts} +1 -1
- package/src/{sany-modules.ts → sany/modules.ts} +2 -2
- package/src/{sany-nodes.ts → sany/nodes.ts} +2 -2
- package/src/{sany-parse-error.ts → sany/parse-error.ts} +2 -2
- package/src/{sany-report.ts → sany/report.ts} +16 -17
- package/src/{sany-selectors.ts → sany/selectors.ts} +3 -5
- package/src/{sany-source.ts → sany/source.ts} +6 -7
- package/src/{sany-xml.ts → sany/xml.ts} +5 -6
- package/src/search.ts +969 -0
- package/src/spec-description.ts +26 -20
- package/src/{standard-levels.ts → standard-definitions.ts} +118 -2
- package/src/standard-modules.ts +16 -20
- package/src/state-graph.ts +9 -8
- package/src/substitution-levels.ts +2 -2
- package/src/successors.ts +16 -19
- package/src/symmetry.ts +1 -1
- package/src/tableau.ts +6 -7
- package/src/tlc/fingerprint.ts +214 -0
- package/src/{tlc-messages.ts → tlc/messages.ts} +119 -7
- package/src/{tlc-order.ts → tlc/order.ts} +7 -7
- package/src/{tlc-random.ts → tlc/random.ts} +3 -213
- package/src/{tlc-replay.ts → tlc/replay.ts} +40 -36
- package/src/{tlc-module.ts → tlc/tlc-operators.ts} +9 -9
- package/src/{tlc-ext.ts → tlc/tlcext-operators.ts} +30 -25
- package/src/transfer.ts +32 -32
- package/src/values.ts +72 -67
- package/src/worker.ts +1 -4
- package/dist/run-cli.cjs +0 -45
- package/dist/run-cli.js +0 -45
- package/src/canonical.ts +0 -40
- package/src/obligations/ctx.ts +0 -64
- package/src/prove/prep/defs.ts +0 -33
- package/src/prove/prep/elab.ts +0 -156
- package/src/prove/prep/enabled.ts +0 -43
- package/src/prove/prep/flatten.ts +0 -70
- package/src/prove/prep/trivial.ts +0 -22
- package/src/prove/smt/axiomatize.ts +0 -69
- package/src/prove/smt/simplify.ts +0 -57
- package/src/run-cli.ts +0 -1806
- package/src/standard-ranges.ts +0 -116
- package/src/value-sources.ts +0 -29
- /package/src/prove/prep/{pragma.ts → methods.ts} +0 -0
- /package/src/{tlc-modules.ts → tlc/jar-data.ts} +0 -0
- /package/src/{tlc-summary.ts → tlc/summary.ts} +0 -0
- /package/src/{tlc-version.ts → tlc/version.ts} +0 -0
package/src/runtime.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getTlcFingerprint } from "./tlc/fingerprint";
|
|
2
|
+
import { createJavaRandom, type JavaRandom } from "./tlc/random";
|
|
2
3
|
import { createFunction, createRecord, type Value } from "./values";
|
|
3
|
-
import type { TlcVersion } from "./tlc
|
|
4
|
+
import type { TlcVersion } from "./tlc/version";
|
|
4
5
|
|
|
5
6
|
export interface CheckerRuntime {
|
|
6
7
|
getLevel: (state: (Value | undefined)[]) => number;
|
|
@@ -22,7 +23,6 @@ export interface CheckerRuntime {
|
|
|
22
23
|
// TLC's -tool, under which the message of an error that TLC raises with a code holds the
|
|
23
24
|
// code's markers, which AssertError compares with.
|
|
24
25
|
isTool: boolean;
|
|
25
|
-
// The TLC whose messages tla-ts reproduces.
|
|
26
26
|
version: TlcVersion;
|
|
27
27
|
seed: bigint;
|
|
28
28
|
isSeen: (state: Value[]) => boolean;
|
|
@@ -46,8 +46,8 @@ export interface CheckerRuntime {
|
|
|
46
46
|
// its Random with the fingerprint of each state it expands, XORed with the seed, so a state's
|
|
47
47
|
// successors are the same whatever order the workers expand states in.
|
|
48
48
|
export const createRuntime = (checkDeadlock: boolean, seed = 0n): CheckerRuntime => {
|
|
49
|
-
const
|
|
50
|
-
const worker = { random: createJavaRandom(seed),
|
|
49
|
+
const startupRandom = createJavaRandom(seed);
|
|
50
|
+
const worker = { random: createJavaRandom(seed), seededState: undefined as Value[] | undefined };
|
|
51
51
|
const phase = { isStartup: false };
|
|
52
52
|
const runtime: CheckerRuntime = {
|
|
53
53
|
getLevel: () => 0,
|
|
@@ -60,10 +60,10 @@ export const createRuntime = (checkDeadlock: boolean, seed = 0n): CheckerRuntime
|
|
|
60
60
|
getFingerprint: getTlcFingerprint,
|
|
61
61
|
getRandom: () => {
|
|
62
62
|
const state = phase.isStartup ? undefined : runtime.getCurrentState();
|
|
63
|
-
if (state === undefined) return
|
|
64
|
-
if (state !== worker.
|
|
63
|
+
if (state === undefined) return startupRandom;
|
|
64
|
+
if (state !== worker.seededState) {
|
|
65
65
|
worker.random.setSeed(runtime.getFingerprint(state) ^ BigInt.asUintN(64, seed));
|
|
66
|
-
worker.
|
|
66
|
+
worker.seededState = state;
|
|
67
67
|
}
|
|
68
68
|
return worker.random;
|
|
69
69
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FormalParamNode, LevelFields, OpDefNode, SanyLocation } from "./
|
|
1
|
+
import type { FormalParamNode, LevelFields, OpDefNode, SanyLocation } from "./nodes";
|
|
2
2
|
|
|
3
3
|
// tla2sany.semantic.BuiltInOperators: name, arity, level, maximum argument levels and argument
|
|
4
4
|
// weights. SANY leaves the levels of "." and \neg unset.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TEMPORAL_LEVEL } from "
|
|
2
|
-
import type { TlcVersion } from "
|
|
1
|
+
import { TEMPORAL_LEVEL } from "../levels";
|
|
2
|
+
import type { TlcVersion } from "../tlc/version";
|
|
3
3
|
import type {
|
|
4
4
|
AssumeProve,
|
|
5
5
|
Assumption,
|
|
@@ -18,18 +18,18 @@ import type {
|
|
|
18
18
|
SourceLocation,
|
|
19
19
|
Theorem,
|
|
20
20
|
UseOrHide,
|
|
21
|
-
} from "
|
|
22
|
-
import { getChildren } from "
|
|
21
|
+
} from "../ast";
|
|
22
|
+
import { getChildren } from "../ast";
|
|
23
23
|
import {
|
|
24
24
|
TlaMissingModuleError,
|
|
25
25
|
TlaSanyFatalError,
|
|
26
26
|
TlaSyntaxError,
|
|
27
27
|
TlaUnsupportedError,
|
|
28
|
-
} from "
|
|
29
|
-
import { parseSanyModule } from "
|
|
30
|
-
import { BUILTIN_LOCATION, createBuiltins, createLevelFields } from "./
|
|
31
|
-
import { getSany174LexicalError } from "./
|
|
32
|
-
import { getSanyParseError } from "./
|
|
28
|
+
} from "../errors";
|
|
29
|
+
import { parseSanyModule } from "../parser";
|
|
30
|
+
import { BUILTIN_LOCATION, createBuiltins, createLevelFields } from "./builtins";
|
|
31
|
+
import { getSany174LexicalError } from "./lexer";
|
|
32
|
+
import { getSanyParseError } from "./parse-error";
|
|
33
33
|
import {
|
|
34
34
|
addSanyMessage,
|
|
35
35
|
CONSTANT_DECL_KIND,
|
|
@@ -73,13 +73,13 @@ import {
|
|
|
73
73
|
type TheoremNode,
|
|
74
74
|
type ThmOrAssumpDefNode,
|
|
75
75
|
type UseOrHideNode,
|
|
76
|
-
} from "./
|
|
76
|
+
} from "./nodes";
|
|
77
77
|
import {
|
|
78
78
|
createSelectorResolver,
|
|
79
79
|
getSelectorItems,
|
|
80
80
|
isGeneralId,
|
|
81
81
|
type SelectorItem,
|
|
82
|
-
} from "./
|
|
82
|
+
} from "./selectors";
|
|
83
83
|
import {
|
|
84
84
|
createSourceFile,
|
|
85
85
|
findNameTokens,
|
|
@@ -99,8 +99,8 @@ import {
|
|
|
99
99
|
isToken,
|
|
100
100
|
type SourceFile,
|
|
101
101
|
type TokenSpan,
|
|
102
|
-
} from "./
|
|
103
|
-
import { SANY_OPERATOR_SYNONYMS } from "
|
|
102
|
+
} from "./source";
|
|
103
|
+
import { SANY_OPERATOR_SYNONYMS } from "../tlc/jar-data";
|
|
104
104
|
|
|
105
105
|
const SYNONYMS = new Map(
|
|
106
106
|
SANY_OPERATOR_SYNONYMS.flatMap(([canonical, ...synonyms]) =>
|
|
@@ -161,7 +161,7 @@ export interface SanySpecification {
|
|
|
161
161
|
messages: SanyMessage[];
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
interface SanyGenerationOptions {
|
|
165
165
|
// The name of the root module's file, which SANY requires to match the module's name.
|
|
166
166
|
rootFileName?: string;
|
|
167
167
|
// The path of the root module's file as SANY's caller gives it, which SANY names when it cannot
|
|
@@ -271,6 +271,15 @@ const isInternalInstance = (module: Module, name: string) => {
|
|
|
271
271
|
return false;
|
|
272
272
|
};
|
|
273
273
|
|
|
274
|
+
type LetUnit =
|
|
275
|
+
| { kind: "Recursive"; declarations: Declaration[] }
|
|
276
|
+
| { kind: "Instance"; instance: Instance }
|
|
277
|
+
| { kind: "Definition"; definition: Definition };
|
|
278
|
+
|
|
279
|
+
// The decimal digits of a numeral such as \hFF, which SANY keeps at any size.
|
|
280
|
+
const getNumeralDigits = (text: string) =>
|
|
281
|
+
BigInt(text.startsWith("\\") ? `0${text.slice(1).replace(/^h/i, "x")}` : text).toString();
|
|
282
|
+
|
|
274
283
|
// An entry of SANY's LS stack: the labels of a definition, theorem or label and the parameters
|
|
275
284
|
// bound within it around the expression being generated.
|
|
276
285
|
interface LabelScope {
|
|
@@ -542,11 +551,8 @@ export const generateSanySpecification = (
|
|
|
542
551
|
path.pop();
|
|
543
552
|
order.push(name);
|
|
544
553
|
};
|
|
545
|
-
// SpecObj.loadSpec: SANY resolves the first name it finds
|
|
546
|
-
//
|
|
547
|
-
// only once it has resolved every extended module. SANY resolves a name in the context of the
|
|
548
|
-
// module that names it, so a module another module loaded is unresolved until SANY reaches it
|
|
549
|
-
// from this one.
|
|
554
|
+
// SpecObj.loadSpec: SANY resolves the first unresolved name it finds from the root, every
|
|
555
|
+
// extended module before any instantiated one, each in the context of the module that names it.
|
|
550
556
|
const resolutions = new Set<string>();
|
|
551
557
|
const isResolved = (importer: string, name: string) => resolutions.has(`${importer} ${name}`);
|
|
552
558
|
const findUnresolved = (
|
|
@@ -1402,7 +1408,7 @@ export const generateSanySpecification = (
|
|
|
1402
1408
|
return {
|
|
1403
1409
|
...createLevelFields(getId()),
|
|
1404
1410
|
kind: "Numeral",
|
|
1405
|
-
value:
|
|
1411
|
+
value: getNumeralDigits(expression.text ?? String(expression.value)),
|
|
1406
1412
|
location,
|
|
1407
1413
|
};
|
|
1408
1414
|
case "Decimal": {
|
|
@@ -1913,7 +1919,6 @@ export const generateSanySpecification = (
|
|
|
1913
1919
|
if (node.operator.name === "$NonRecursiveFcnSpec") node.unbounded = undefined;
|
|
1914
1920
|
};
|
|
1915
1921
|
|
|
1916
|
-
// The module's operators declared in RECURSIVE statements.
|
|
1917
1922
|
const recursiveDeclarations: OpDefNode[] = [];
|
|
1918
1923
|
const processRecursive = (declarations: Declaration[]) => {
|
|
1919
1924
|
if (state.unresolvedSum === 0) state.recursiveSectionCount++;
|
|
@@ -1985,12 +1990,13 @@ export const generateSanySpecification = (
|
|
|
1985
1990
|
});
|
|
1986
1991
|
// Generator.checkSubstitutionForCorrectArity, which SANY locates in its builtins for the
|
|
1987
1992
|
// nullOpArg it substitutes after an error.
|
|
1988
|
-
const checkArity = (target: OpDeclNode,
|
|
1989
|
-
const arity =
|
|
1990
|
-
const isNullOpArg =
|
|
1993
|
+
const checkArity = (target: OpDeclNode, substitute: ExprOrOpArgNode) => {
|
|
1994
|
+
const arity = substitute.kind === "OpArg" ? getSymbolArity(substitute.op) : 0;
|
|
1995
|
+
const isNullOpArg =
|
|
1996
|
+
target.arity > 0 && substitute.kind === "OpAppl" && substitute.isNull === true;
|
|
1991
1997
|
if (arity !== target.arity && !isNullOpArg) {
|
|
1992
1998
|
addError(
|
|
1993
|
-
|
|
1999
|
+
substitute.location,
|
|
1994
2000
|
`An operator must be substituted for symbol '${target.name}', and it must have arity ${target.arity}.`,
|
|
1995
2001
|
);
|
|
1996
2002
|
}
|
|
@@ -2012,11 +2018,11 @@ export const generateSanySpecification = (
|
|
|
2012
2018
|
);
|
|
2013
2019
|
return;
|
|
2014
2020
|
}
|
|
2015
|
-
const
|
|
2021
|
+
const substitute =
|
|
2016
2022
|
target.arity === 0
|
|
2017
2023
|
? generateExpression(substitution.expression)
|
|
2018
2024
|
: generateOperatorArgument(substitution.expression, target);
|
|
2019
|
-
checkArity(target,
|
|
2025
|
+
checkArity(target, substitute);
|
|
2020
2026
|
const existing = substs.find((subst) => subst.op.name === target.name);
|
|
2021
2027
|
if (existing && !existing.isImplicit) {
|
|
2022
2028
|
addError(
|
|
@@ -2024,9 +2030,9 @@ export const generateSanySpecification = (
|
|
|
2024
2030
|
`Multiple substitutions for symbol '${target.name}' in substitution.`,
|
|
2025
2031
|
);
|
|
2026
2032
|
} else if (existing) {
|
|
2027
|
-
existing.expr =
|
|
2033
|
+
existing.expr = substitute;
|
|
2028
2034
|
existing.isImplicit = false;
|
|
2029
|
-
} else substs.push({ op: target, expr, isImplicit: false });
|
|
2035
|
+
} else substs.push({ op: target, expr: substitute, isImplicit: false });
|
|
2030
2036
|
});
|
|
2031
2037
|
// TLC 1.7.4's SANY checks the arity of only the substitutions that the INSTANCE writes.
|
|
2032
2038
|
substs
|
|
@@ -2215,8 +2221,8 @@ export const generateSanySpecification = (
|
|
|
2215
2221
|
return symbol;
|
|
2216
2222
|
};
|
|
2217
2223
|
const isOriginParameterFree = symbol.module === undefined || isParameterFree(symbol.module);
|
|
2218
|
-
const node =
|
|
2219
|
-
|
|
2224
|
+
const node =
|
|
2225
|
+
isInstanceeParameterFree || isOriginParameterFree
|
|
2220
2226
|
? isLocal
|
|
2221
2227
|
? copyFrom(symbol.module, symbol.body)
|
|
2222
2228
|
: reuse()
|
|
@@ -2224,10 +2230,7 @@ export const generateSanySpecification = (
|
|
|
2224
2230
|
currentModule,
|
|
2225
2231
|
symbol.body &&
|
|
2226
2232
|
createSubstIn("SubstIn", substs, symbol.body, instanceeModule, location),
|
|
2227
|
-
)
|
|
2228
|
-
: isLocal
|
|
2229
|
-
? copyFrom(symbol.module, symbol.body)
|
|
2230
|
-
: reuse();
|
|
2233
|
+
);
|
|
2231
2234
|
currentModule.definitions.push(node);
|
|
2232
2235
|
setRecursionFields(node);
|
|
2233
2236
|
});
|
|
@@ -3106,23 +3109,3 @@ export const generateSanySpecification = (
|
|
|
3106
3109
|
});
|
|
3107
3110
|
return { root: modules[modules.length - 1], modules, messages };
|
|
3108
3111
|
};
|
|
3109
|
-
|
|
3110
|
-
type LetUnit =
|
|
3111
|
-
| { kind: "Recursive"; declarations: Declaration[] }
|
|
3112
|
-
| { kind: "Instance"; instance: Instance }
|
|
3113
|
-
| { kind: "Definition"; definition: Definition };
|
|
3114
|
-
|
|
3115
|
-
const getNumeralValue = (text: string) => {
|
|
3116
|
-
const lower = text.toLowerCase();
|
|
3117
|
-
const radix = lower.startsWith("\\b")
|
|
3118
|
-
? 2
|
|
3119
|
-
: lower.startsWith("\\o")
|
|
3120
|
-
? 8
|
|
3121
|
-
: lower.startsWith("\\h")
|
|
3122
|
-
? 16
|
|
3123
|
-
: 10;
|
|
3124
|
-
const digits = radix === 10 ? lower : lower.slice(2);
|
|
3125
|
-
return [...digits]
|
|
3126
|
-
.reduce((value, digit) => value * BigInt(radix) + BigInt(parseInt(digit, radix)), 0n)
|
|
3127
|
-
.toString();
|
|
3128
|
-
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ACTION_LEVEL, CONSTANT_LEVEL, TEMPORAL_LEVEL, VARIABLE_LEVEL } from "
|
|
1
|
+
import { ACTION_LEVEL, CONSTANT_LEVEL, TEMPORAL_LEVEL, VARIABLE_LEVEL } from "../levels";
|
|
2
2
|
import {
|
|
3
3
|
addSanyMessage,
|
|
4
4
|
CONSTANT_DECL_KIND,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
type Subst,
|
|
26
26
|
type SymbolNode,
|
|
27
27
|
type ThmOrAssumpDefNode,
|
|
28
|
-
} from "./
|
|
28
|
+
} from "./nodes";
|
|
29
29
|
|
|
30
30
|
// A port of the levelCheck methods of SANY's semantic nodes: the levels, weights and Leibniz flags
|
|
31
31
|
// its XMLExporter writes, and the level errors it reports. Each check returns what SANY's returns,
|
|
@@ -50,16 +50,16 @@ const addAll = <Item>(target: Set<Item>, source: Iterable<Item>) => {
|
|
|
50
50
|
for (const item of source) target.add(item);
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
const getArgLevelKey = (
|
|
54
|
-
`${
|
|
53
|
+
const getArgLevelKey = (operator: SymbolNode, index: number, param: SymbolNode) =>
|
|
54
|
+
`${operator.id}:${index}:${param.id}`;
|
|
55
55
|
|
|
56
56
|
const addArgLevelParam = (
|
|
57
57
|
target: Map<string, ArgLevelParam>,
|
|
58
|
-
|
|
58
|
+
operator: SymbolNode,
|
|
59
59
|
index: number,
|
|
60
60
|
param: SymbolNode,
|
|
61
61
|
) => {
|
|
62
|
-
target.set(getArgLevelKey(
|
|
62
|
+
target.set(getArgLevelKey(operator, index, param), { op: operator, index, param });
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
const addArgLevelParams = (
|
|
@@ -172,22 +172,22 @@ const getSubstitute = (symbol: SymbolNode, substs: Subst[]) =>
|
|
|
172
172
|
|
|
173
173
|
// Subst.paramSet and Subst.allParamSet.
|
|
174
174
|
const getSubstitutedParams = (param: SymbolNode, substs: Subst[], isAll: boolean) => {
|
|
175
|
-
const
|
|
176
|
-
if (
|
|
177
|
-
return isAll ?
|
|
175
|
+
const substitute = getSubstitute(param, substs);
|
|
176
|
+
if (substitute === undefined) return new Set([param]);
|
|
177
|
+
return isAll ? substitute.allParams : substitute.levelParams;
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
// Subst.getSubALPSet.
|
|
181
181
|
const getSubstitutedArgLevelParams = (source: Map<string, ArgLevelParam>, substs: Subst[]) => {
|
|
182
182
|
const result = new Map<string, ArgLevelParam>();
|
|
183
183
|
source.forEach((argLevelParam, key) => {
|
|
184
|
-
const
|
|
185
|
-
if (
|
|
184
|
+
const substitute = getSubstitute(argLevelParam.op, substs);
|
|
185
|
+
if (substitute === undefined) {
|
|
186
186
|
result.set(key, argLevelParam);
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
|
-
if (
|
|
190
|
-
const operator =
|
|
189
|
+
if (substitute.kind !== "OpArg" || !isParam(substitute.op)) return;
|
|
190
|
+
const operator = substitute.op;
|
|
191
191
|
getSubstitutedParams(argLevelParam.param, substs, false).forEach((param) =>
|
|
192
192
|
addArgLevelParam(result, operator, argLevelParam.index, param),
|
|
193
193
|
);
|
|
@@ -224,10 +224,10 @@ const getSubstitutedLevelConstraints = (
|
|
|
224
224
|
);
|
|
225
225
|
});
|
|
226
226
|
body.argLevelParams.forEach((argLevelParam) => {
|
|
227
|
-
const
|
|
228
|
-
if (
|
|
229
|
-
checkLevel(
|
|
230
|
-
const level = getMaxLevel(
|
|
227
|
+
const substitute = getSubstitute(argLevelParam.op, substs);
|
|
228
|
+
if (substitute?.kind !== "OpArg" || substitute.op.kind !== "OpDef") return;
|
|
229
|
+
checkLevel(substitute.op, iteration, check);
|
|
230
|
+
const level = getMaxLevel(substitute.op, argLevelParam.index);
|
|
231
231
|
getSubstitutedParams(argLevelParam.param, substs, false).forEach((substituted) =>
|
|
232
232
|
putLevelConstraint(result, substituted, level),
|
|
233
233
|
);
|
|
@@ -244,22 +244,26 @@ const getSubstitutedArgLevelConstraints = (
|
|
|
244
244
|
) => {
|
|
245
245
|
const result = new Map<string, ArgLevelConstraint>();
|
|
246
246
|
body.argLevelConstraints.forEach((constraint) => {
|
|
247
|
-
const
|
|
248
|
-
if (
|
|
247
|
+
const substitute = getSubstitute(constraint.param, substs);
|
|
248
|
+
if (substitute === undefined) {
|
|
249
249
|
putArgLevelConstraint(result, constraint.param, constraint.position, constraint.level);
|
|
250
|
-
} else if (
|
|
251
|
-
putArgLevelConstraint(result,
|
|
250
|
+
} else if (substitute.kind === "OpArg" && isParam(substitute.op)) {
|
|
251
|
+
putArgLevelConstraint(result, substitute.op, constraint.position, constraint.level);
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
254
|
body.argLevelParams.forEach((argLevelParam) => {
|
|
255
|
-
const
|
|
256
|
-
if (
|
|
257
|
-
const
|
|
255
|
+
const paramSubstitute = getSubstitute(argLevelParam.param, substs);
|
|
256
|
+
if (paramSubstitute === undefined) return;
|
|
257
|
+
const operatorSubstitute = getSubstitute(argLevelParam.op, substs);
|
|
258
258
|
const operator =
|
|
259
|
-
|
|
259
|
+
operatorSubstitute === undefined
|
|
260
|
+
? argLevelParam.op
|
|
261
|
+
: operatorSubstitute.kind === "OpArg"
|
|
262
|
+
? operatorSubstitute.op
|
|
263
|
+
: undefined;
|
|
260
264
|
if (operator === undefined || !isParam(operator)) return;
|
|
261
|
-
checkLevel(
|
|
262
|
-
putArgLevelConstraint(result, operator, argLevelParam.index,
|
|
265
|
+
checkLevel(paramSubstitute, iteration, check);
|
|
266
|
+
putArgLevelConstraint(result, operator, argLevelParam.index, paramSubstitute.level);
|
|
263
267
|
});
|
|
264
268
|
return result;
|
|
265
269
|
};
|
|
@@ -836,26 +840,6 @@ const checkTemporalProof = (proof: ProofNode | undefined, check: LevelCheck) =>
|
|
|
836
840
|
});
|
|
837
841
|
};
|
|
838
842
|
|
|
839
|
-
// Subst.getSubLCSet, getSubALCSet and getSubALPSet for the body of an instantiation.
|
|
840
|
-
const constrainSubstitution = (
|
|
841
|
-
node: LevelFields,
|
|
842
|
-
body: ConstraintSource,
|
|
843
|
-
substs: Subst[],
|
|
844
|
-
isConstant: boolean,
|
|
845
|
-
iteration: number,
|
|
846
|
-
check: LevelCheck,
|
|
847
|
-
) => {
|
|
848
|
-
node.levelConstraints = getSubstitutedLevelConstraints(
|
|
849
|
-
body,
|
|
850
|
-
substs,
|
|
851
|
-
isConstant,
|
|
852
|
-
iteration,
|
|
853
|
-
check,
|
|
854
|
-
);
|
|
855
|
-
node.argLevelConstraints = getSubstitutedArgLevelConstraints(body, substs, iteration, check);
|
|
856
|
-
node.argLevelParams = getSubstitutedArgLevelParams(body.argLevelParams, substs);
|
|
857
|
-
};
|
|
858
|
-
|
|
859
843
|
// InstanceNode.levelCheck.
|
|
860
844
|
const checkInstance = (node: InstanceNode, iteration: number, check: LevelCheck) => {
|
|
861
845
|
if (node.levelChecked >= iteration) return node.levelCorrect;
|
|
@@ -1114,7 +1098,20 @@ const checkLevel = (node: SemanticNode, iteration: number, check: LevelCheck): b
|
|
|
1114
1098
|
});
|
|
1115
1099
|
}
|
|
1116
1100
|
const isConstant = isConstantModule(node.instantiatedModule, check);
|
|
1117
|
-
|
|
1101
|
+
node.levelConstraints = getSubstitutedLevelConstraints(
|
|
1102
|
+
body,
|
|
1103
|
+
node.substs,
|
|
1104
|
+
isConstant,
|
|
1105
|
+
iteration,
|
|
1106
|
+
check,
|
|
1107
|
+
);
|
|
1108
|
+
node.argLevelConstraints = getSubstitutedArgLevelConstraints(
|
|
1109
|
+
body,
|
|
1110
|
+
node.substs,
|
|
1111
|
+
iteration,
|
|
1112
|
+
check,
|
|
1113
|
+
);
|
|
1114
|
+
node.argLevelParams = getSubstitutedArgLevelParams(body.argLevelParams, node.substs);
|
|
1118
1115
|
return node.levelCorrect;
|
|
1119
1116
|
}
|
|
1120
1117
|
case "Instance":
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TlaError } from "
|
|
1
|
+
import { TlaError } from "../errors";
|
|
2
2
|
|
|
3
3
|
// An emulation of the token manager that JavaCC generates for SANY's grammar, javacc/tla+.jj: the
|
|
4
4
|
// tokens it produces, their kinds in TLAplusParserConstants order, and their positions.
|
|
@@ -228,8 +228,7 @@ const KIND_INDEXES = new Map(
|
|
|
228
228
|
KIND_NAMES.map((name, kind): [string, number] => [name, kind]).reverse(),
|
|
229
229
|
);
|
|
230
230
|
|
|
231
|
-
// The
|
|
232
|
-
// looks up.
|
|
231
|
+
// The anonymous infix operators share the name "infix", which no caller looks up.
|
|
233
232
|
export const getKind = (name: string) => {
|
|
234
233
|
const kind = KIND_INDEXES.get(name);
|
|
235
234
|
if (kind === undefined) throw new TlaError(`Unknown SANY token kind ${name}`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TlcVersion } from "
|
|
2
|
-
import { REAL_TIME, REALS, TOOLBOX } from "
|
|
1
|
+
import type { TlcVersion } from "../tlc/version";
|
|
2
|
+
import { REAL_TIME, REALS, TOOLBOX } from "../bundled-modules";
|
|
3
3
|
|
|
4
4
|
const BAGS = `----------------------------- MODULE Bags --------------------------------
|
|
5
5
|
(**************************************************************************)
|
|
@@ -344,7 +344,7 @@ export type LevelNode = ExprOrOpArgNode | AssumeProveNode | NewSymbNode;
|
|
|
344
344
|
|
|
345
345
|
export type ProofPartNode = ProofNode | DefStepNode;
|
|
346
346
|
|
|
347
|
-
|
|
347
|
+
type TopLevelNode = InstanceNode | AssumeNode | TheoremNode | UseOrHideNode;
|
|
348
348
|
|
|
349
349
|
export type SemanticNode = SymbolNode | LevelNode | TopLevelNode | ProofPartNode;
|
|
350
350
|
|
|
@@ -362,7 +362,7 @@ interface HashtableEntry {
|
|
|
362
362
|
value: SymbolNode;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
|
|
365
|
+
interface JavaHashtable {
|
|
366
366
|
buckets: HashtableEntry[][];
|
|
367
367
|
count: number;
|
|
368
368
|
threshold: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createSanyLexer, escapeLexeme, getKind, type SanyToken } from "./
|
|
2
|
-
import { SANY_OPERATOR_SYNONYMS } from "
|
|
1
|
+
import { createSanyLexer, escapeLexeme, getKind, type SanyToken } from "./lexer";
|
|
2
|
+
import { SANY_OPERATOR_SYNONYMS } from "../tlc/jar-data";
|
|
3
3
|
|
|
4
4
|
// The report SANY's parser, TLAplusParser, gives for a module it fails to parse. This interprets
|
|
5
5
|
// the grammar of javacc/tla+.jj the way the code JavaCC generates from it runs: the productions,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { basename } from "node:path";
|
|
3
|
-
import type { Module } from "
|
|
4
|
-
import { TlaSyntaxError, PcalRuntimeError, TlaSanyFatalError } from "
|
|
5
|
-
import { extractModule, parseSanyModule } from "
|
|
6
|
-
import { createPcalParams } from "
|
|
7
|
-
import { createPcalSession } from "
|
|
8
|
-
import { validatePcalModule } from "
|
|
9
|
-
import { generateSanySpecification, type SanySpecification } from "./
|
|
10
|
-
import { checkModuleLevels } from "./
|
|
11
|
-
import { getSany174LexicalError } from "./
|
|
12
|
-
import { lintSanyModule } from "./
|
|
13
|
-
import { getSanyStandardModules } from "./
|
|
14
|
-
import { formatSanyLocation, type SanyMessage } from "./
|
|
15
|
-
import { getUnboxedSource } from "./
|
|
16
|
-
import type { TlcVersion } from "
|
|
3
|
+
import type { Module } from "../ast";
|
|
4
|
+
import { TlaSyntaxError, PcalRuntimeError, TlaSanyFatalError } from "../errors";
|
|
5
|
+
import { extractModule, parseSanyModule } from "../parser";
|
|
6
|
+
import { createPcalParams } from "../pcal/ast";
|
|
7
|
+
import { createPcalSession } from "../pcal/parse";
|
|
8
|
+
import { validatePcalModule } from "../pcal/validate";
|
|
9
|
+
import { generateSanySpecification, type SanySpecification } from "./generator";
|
|
10
|
+
import { checkModuleLevels } from "./levels";
|
|
11
|
+
import { getSany174LexicalError } from "./lexer";
|
|
12
|
+
import { lintSanyModule } from "./linter";
|
|
13
|
+
import { getSanyStandardModules } from "./modules";
|
|
14
|
+
import { formatSanyLocation, type SanyMessage } from "./nodes";
|
|
15
|
+
import { getUnboxedSource } from "./source";
|
|
16
|
+
import type { TlcVersion } from "../tlc/version";
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
interface SanyReport {
|
|
19
19
|
text: string;
|
|
20
20
|
isFailed: boolean;
|
|
21
21
|
// The specification SANY analyzes, which has errors when SANY rejects it.
|
|
@@ -35,7 +35,6 @@ export interface SanyReportOptions {
|
|
|
35
35
|
// tla2sany.xml.XMLExporter runs SANY with its validAstSettings, which neither lint the modules
|
|
36
36
|
// nor validate their PlusCal, and prints only SANY's errors.
|
|
37
37
|
isXmlExport?: boolean;
|
|
38
|
-
// The TLC whose SANY to reproduce.
|
|
39
38
|
version?: TlcVersion;
|
|
40
39
|
// The modules TLC adds to the root module's EXTENDS for its post conditions.
|
|
41
40
|
rootExtendees?: string[];
|
|
@@ -119,7 +118,7 @@ export const getSanyModuleName = (text: string, version?: TlcVersion) =>
|
|
|
119
118
|
// in the rest.
|
|
120
119
|
export const getSanyReport = (
|
|
121
120
|
rootPath: string,
|
|
122
|
-
loadModule: (name: string) => string | undefined
|
|
121
|
+
loadModule: (name: string) => string | undefined,
|
|
123
122
|
options: SanyReportOptions = {},
|
|
124
123
|
): SanyReport => {
|
|
125
124
|
const rootName = basename(rootPath, ".tla");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Expression } from "
|
|
2
|
-
import type { TlcVersion } from "
|
|
1
|
+
import type { Expression } from "../ast";
|
|
2
|
+
import type { TlcVersion } from "../tlc/version";
|
|
3
3
|
import {
|
|
4
4
|
CONSTANT_DECL_KIND,
|
|
5
5
|
getContextSymbol,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
type SubstInNode,
|
|
20
20
|
type SymbolNode,
|
|
21
21
|
type ThmOrAssumpDefNode,
|
|
22
|
-
} from "./
|
|
22
|
+
} from "./nodes";
|
|
23
23
|
|
|
24
24
|
// A port of SANY's Generator.selectorToNode, which turns a name such as Op(a)!lab(b)!:!2 into the
|
|
25
25
|
// semantic node it names, following the Subexpression algorithm of SANY's Subexpression.tla.
|
|
@@ -86,7 +86,6 @@ const getNameParts = (name: string) => {
|
|
|
86
86
|
return parts.some((part) => part.length === 0) ? [name] : parts;
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
// The selector of a name, an application of a name or a subexpression reference.
|
|
90
89
|
export const getSelectorItems = (expression: Expression): SelectorItem[] | undefined => {
|
|
91
90
|
switch (expression.kind) {
|
|
92
91
|
case "Identifier":
|
|
@@ -174,7 +173,6 @@ const isSymbol = (node: LevelNode | SymbolNode): node is SymbolNode =>
|
|
|
174
173
|
node.kind === "ThmOrAssumpDef" ||
|
|
175
174
|
node.kind === "Module";
|
|
176
175
|
|
|
177
|
-
// The symbols a quantifier binds: its bounded ones if it has any, else its unbounded ones.
|
|
178
176
|
const getQuantifierSymbols = (node: OpApplNode) =>
|
|
179
177
|
(node.bounded?.length ?? 0) > 0 ? (node.bounded ?? []).flat() : (node.unbounded ?? []);
|
|
180
178
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Expression, SourceLocation, SourceRange } from "
|
|
2
|
-
import { TlaSyntaxError } from "
|
|
3
|
-
import { readAtAsIdentifier, tokenize, type Token } from "
|
|
4
|
-
import { getTabStop } from "./
|
|
5
|
-
import { getSanyParseError } from "./
|
|
6
|
-
import type { SanyLocation } from "./
|
|
1
|
+
import type { Expression, SourceLocation, SourceRange } from "../ast";
|
|
2
|
+
import { TlaSyntaxError } from "../errors";
|
|
3
|
+
import { readAtAsIdentifier, tokenize, type Token } from "../lexer";
|
|
4
|
+
import { getTabStop } from "./lexer";
|
|
5
|
+
import { getSanyParseError } from "./parse-error";
|
|
6
|
+
import type { SanyLocation } from "./nodes";
|
|
7
7
|
|
|
8
8
|
// The tokens of one file, to find the locations SANY gives to names, brackets and parentheses that
|
|
9
9
|
// the syntax tree of tla-ts leaves out, and the comments SANY attaches to definitions.
|
|
@@ -230,7 +230,6 @@ export const getPreComments = (file: SourceFile, index: number) => {
|
|
|
230
230
|
return comments;
|
|
231
231
|
};
|
|
232
232
|
|
|
233
|
-
// The identifier tokens with the given names, in order, between two token indexes.
|
|
234
233
|
export const findNameTokens = (file: SourceFile, start: number, end: number, names: string[]) => {
|
|
235
234
|
const found: number[] = [];
|
|
236
235
|
for (let index = start; index < end && found.length < names.length; index++) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TlaJavaException, TlaUnsupportedError } from "
|
|
2
|
-
import { setExitCode } from "
|
|
3
|
-
import type { TlcVersion } from "
|
|
4
|
-
import type { SanySpecification } from "./
|
|
1
|
+
import { TlaJavaException, TlaUnsupportedError } from "../errors";
|
|
2
|
+
import { setExitCode } from "../exit-codes";
|
|
3
|
+
import type { TlcVersion } from "../tlc/version";
|
|
4
|
+
import type { SanySpecification } from "./generator";
|
|
5
5
|
import {
|
|
6
6
|
CONSTANT_DECL_KIND,
|
|
7
7
|
VARIABLE_DECL_KIND,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
type ProofPartNode,
|
|
24
24
|
type InstanceNode,
|
|
25
25
|
type UseOrHideNode,
|
|
26
|
-
} from "./
|
|
26
|
+
} from "./nodes";
|
|
27
27
|
|
|
28
28
|
// XMLExporterExitCode, and the status Java exits with on an exception that nothing catches.
|
|
29
29
|
export const XML_EXPORT_EXIT_CODE = {
|
|
@@ -386,7 +386,6 @@ const unboxBackslashStarComment = (text: string) => {
|
|
|
386
386
|
};
|
|
387
387
|
|
|
388
388
|
export interface XmlExportOptions {
|
|
389
|
-
// The TLC whose XMLExporter to reproduce.
|
|
390
389
|
version: TlcVersion;
|
|
391
390
|
// -r: only the root module, and only the declarations and definitions a module makes itself.
|
|
392
391
|
isRestricted: boolean;
|