Skip to content

Invariants

Invariants shape how the solver looks for a viable solution. They are statements that are either assumed to be true or that we want the solver to disprove.

Temporal Logic

Fault has a couple of temporal logic operators that create SMT rules to test conditions across time. Fault is not as good at temporal logic as other languages specifically designed for it (TLA+ comes to mind), but it can handle some basic reasoning.

OperatorDefinitionUse
eventuallyAt some point in the model runtime this assertion will be trueassert x eventually;
alwaysThis assertion is always true (technically the default for all assertions)assert x always;
eventually-alwaysWhen this assertion becomes true it will stay true for the rest of the model runtimeassert x eventually-always;
nmt nThis assertion is true no more than n timesassert x nmt 2;
nft nThis assertion is true no fewer than n timesassert x nft 2;
availableAn unfunc's precondition is satisfiable from the initial stateassume f available;