Expression Primitives
Declarative expression primitives used inside specification predicates. All primitives raise NotImplementedError if invoked at runtime by Python — checkers read them statically from source.
implies(antecedent: bool, consequent: bool) -> bool#
Logical implication (not antecedent or consequent). Valid at any level.
choose(domain: Iterable[T], predicate: Callable[[T], bool] | None = None) -> T#
Hilbert choice operator: picks one deterministic element from domain satisfying predicate (not random).
enabled(action: Any) -> bool#
True in the current state iff the given action call (e.g. s.acquire(p)) has at least one valid successor step. State-level (legal inside Invariant).
prime(value: T) -> T#
Refers to the value of a state or ghost variable in the next state after a transition step.
unchanged(*values: Any) -> bool#
Asserts that every listed expression keeps its pre-step value after the step.
always(formula: bool) -> bool#
Temporal box operator: formula holds in every state of the behaviour.
eventually(formula: bool) -> bool#
Temporal diamond operator: formula holds in at least one state of the behaviour.
leads_to(cause: bool, effect: bool) -> bool#
Temporal leads-to: whenever cause holds, effect eventually holds.
weak_fairness(action: Any, *, on: Any = None) -> bool#
Weak fairness assumption inside Fairness: if action stays continuously enabled, it must eventually occur. on defaults to all variables.
strong_fairness(action: Any, *, on: Any = None) -> bool#
Strong fairness assumption inside Fairness: if action is enabled infinitely often, it must eventually occur. on defaults to all variables.