At the moment, Apalache is able to check state invariants, action invariants,
temporal properties, trace invariants, as well as inductive invariants. (See the page on
invariants in
the manual.) To check liveness/temporal properties, we employ a liveness-to-safety transformation.
A few standard modules are not supported yet (Bags)
CONSTANTS C1, C2
✔
-
Either define a ConstInit operator to initialize the constants, use a .cfg file, or declare operators instead of constants, e.g., C1 == 111
VARIABLES x, y, z
✔
-
ASSUME P
✔ / ✖
-
Parsed, but not propagated to the solver
F(x1, ..., x_n) == exp
✔ / ✖
-
Every application of F is replaced with its body. Recursive operators not supported after 0.23.1. From 0.16.1 and later, for better performance and UX, use ApaFoldSet and ApaFoldSeqLeft.
f[x ∈ S] == exp
✔ / ✖
-
Recursive functions not supported after 0.23.1. From 0.16.1 and later, for better performance and UX, use ApaFoldSet and ApaFoldSeqLeft.
Note: only finite sets are supported. Additionally, existential
quantification over Int and Nat is supported, as soon as it can be
replaced with a constant.
The model checker assumes that the specification has the form Init /\ [][Next]_e. Other than that, temporal operators
may only appear in temporal properties, not in e.g. actions.
For the moment, the model checker does not differentiate between integers and naturals. They are all translated as integers in SMT.
Operator
Supported?
Milestone
Comment
+, -, *, <=, >=, <, >
✔
-
These operators are translated into integer arithmetic of the SMT solver. Linear integer arithmetic is preferred.
\div, %
✔
-
Integer division and modulo
a^b
✔ / ✖
-
Provided a and b are constant expressions
a..b
✔ / ✖
-
Sometimes, a..b needs a constant upper bound on the range. When Apalache complains, use {x \in A..B : a <= x /\ x <= b}, provided that A and B are constant expressions.
Int, Nat
✔ / ✖
-
Supported in \E x \in Nat: p and \E x \in Int: p, if the expression is not located under \A and ~. We also support assignments like f' \in [S -> Int] and tests f \in [S -> Nat]