-
Suppose you have a .tla file that has snowcat type annotations, so imports some modules like Apalache/Option/Variants. However, this module also has a TLC model. How can TLC be told where to look for the Apalache/Option/Variants modules so the module parses correctly, and what is the recommended method of acquiring those modules? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @ahelwer! The answer depends on how you run TLC. Command lineConsider the example spec ---- MODULE t ----
EXTENDS Integers, Variants
VARIABLE
\* @type: A(Int) | B(Str);
v
Init == v = Variant("A", 0)
Next ==
LET old == VariantGetUnsafe("A", v) IN
v' = Variant("A", old + 1)
Inv == VariantGetUnsafe("A", v) < 10
================== and the accompanying TLC config:
Assuming that you have java -cp ~/Downloads/tla2tools.jar:~/Downloads/apalache.jar tlc2.TLC t.tla TLA+ ToolboxIn case of the TLA+ Toolbox, you could probably add VSCode extensionActually, I don't know what to do there. The community modules are bundled with the extension. We could bundle the recent Apalache modules with the extension too. |
Beta Was this translation helpful? Give feedback.
Hi @ahelwer!
The answer depends on how you run TLC.
Command line
Consider the example spec
t.tla
:and the accompanying TLC config:
Assuming that you have
apalache.jar
andtla2tools.jar
in~/Downloads
, you could run TLC as follows:TLA+ Toolbox
In case of the TLA+ Toolbox, you could probably add
apalache.jar
to the libraries…