Keywords and Reserved Words
action- Defines an action (model checker entry point)func- Defines a functionrole- Defines a role (class-like structure)symmetric- Modifier for roles or values (enables symmetry reduction)assertion- Defines a property to check
atomic- Execute without yieldingserial- Execute with yields between statements (default)parallel- Execute statements concurrentlyoneof- Choose one of multiple branches
fair- Weak fairness (same asfair<weak>)fair<weak>- Eventually executes if continuously enabledfair<strong>- Eventually executes if infinitely often enabled
always- Safety property (holds in all states)exists- Existential property (holds in at least one state)eventually always- Liveness property (eventually reaches stable state)always eventually- Progress property (always makes progress)transition- Property about state transitions
Used in the return of an assertion with no prefix (see
Temporal Formulas):
always,eventually- Prefix temporal operatorsuntil,unless- Strong and weak untilleadsto-P leadsto Qisalways (P implies eventually Q)implies- Logical implicationpossibly- Some path reaches a state (exists eventuallyis another spelling)
until, unless, leadsto, implies and possibly are keywords only in
an assertion’s return, so they can still be used as names elsewhere.
if,elif,else- Conditional branchingfor- Iteration over collectionswhile- Conditional iterationbreak- Exit loop earlycontinue- Skip to next iterationreturn- Return from function/actionpass- No-op (explicitly enables action)require- Guard clause (disables action if false)oneof- Nondeterministic choice (preferred;anyis deprecated alias)`checkpoint`- Visualization breakpoint (backtick syntax)
self- Reference to role instance (implicit in role methods)global- NOT a keyword (state variables are automatically global)@state- Decorator for role state (durable/ephemeral)
enum- Enumeration definitionrecord- Mutable named structurestruct- Immutable named structure (Starlark)set,dict,list- Standard collectionsgenericset,genericmap- Collections for non-hashable typesbag- Multiset (collection with duplicates)symmetric_values- Creates interchangeable values for symmetry reduction