Malli value objects for the recife (TLA+/TLC) model-check adapter, registered into the hive-spi schema registry.
Registered keys (contributed to the schema registry):
:hive.recife/tlc-opts the TLC run budget a ModelSpec may carry
:hive.recife/model-spec a ModelSpec descriptor
:hive.recife/raw-result a permissive model of recife get-result output
:hive.recife/counterexample a normalized violation trace
:hive.recife/result a normalized ModelCheckResult
ModelCheckResult contract: [:map {:closed true} [:status #{:ok :fail :skip}] [:details :map]]. :ok = no violation; :fail = a counterexample exists (in :details under :counterexample); :skip = indeterminate (recife/TLC absent, no spec, or a TLC error) — never conflate :skip with :ok.
Malli value objects for the recife (TLA+/TLC) model-check adapter, registered
into the hive-spi schema registry.
Registered keys (contributed to the schema registry):
:hive.recife/tlc-opts the TLC run budget a ModelSpec may carry
:hive.recife/model-spec a ModelSpec descriptor
:hive.recife/raw-result a permissive model of recife `get-result` output
:hive.recife/counterexample a normalized violation trace
:hive.recife/result a normalized ModelCheckResult
ModelCheckResult contract: [:map {:closed true} [:status #{:ok :fail :skip}]
[:details :map]]. :ok = no violation; :fail = a counterexample exists (in
:details under :counterexample); :skip = indeterminate (recife/TLC absent, no
spec, or a TLC error) — never conflate :skip with :ok.A normalized violation trace: the classified violation kind, the trace length (>= 1 — a counterexample always has an initial state), and the sequence of global-state maps (the recife [idx state] pairs with the index dropped).
A normalized violation trace: the classified violation kind, the trace length (>= 1 — a counterexample always has an initial state), and the sequence of global-state maps (the recife [idx state] pairs with the index dropped).
The single normalized output of the adapter.
The single normalized output of the adapter.
Descriptor of a recife model: the init global-state, the opaque recife components (procs/invariants/properties), and the DECLARED names of the safety invariants + liveness properties the spec carries. :opts optionally carries the TLC run budget (see TlcOpts).
Descriptor of a recife model: the init global-state, the opaque recife components (procs/invariants/properties), and the DECLARED names of the safety invariants + liveness properties the spec carries. :opts optionally carries the TLC run budget (see TlcOpts).
Permissive model of what recife get-result returns. The :trace key is the
status discriminator: :ok (clean) | :error (TLC error) | a vector of
[idx state] pairs (a counterexample). Modeled for GENERATION of the adapter
input; open so real recife maps (with :seed/:fp/:simulation/... ) also match.
Permissive model of what recife `get-result` returns. The :trace key is the status discriminator: :ok (clean) | :error (TLC error) | a vector of [idx state] pairs (a counterexample). Modeled for GENERATION of the adapter input; open so real recife maps (with :seed/:fp/:simulation/... ) also match.
The schema keys this ns contributes to the hive-spi registry.
The schema keys this ns contributes to the hive-spi registry.
The TLC run budget a caller may thread through to recife.core/run-model. Closed: only these keys reach TLC, so a caller cannot smuggle recife's process-control opts (:async, :run-local, :raw-output, :debug ...) past the adapter. :isolated runs the spec under a fresh class loader, which is what makes many specs per JVM safe (TLC caches modules across runs otherwise). :tlc-args are extra literal TLC command-line arguments, appended last.
TLC formats numbers through the JVM default locale; on a non-English locale run the JVM with -Duser.language=en -Duser.country=US so its output parses.
The TLC run budget a caller may thread through to recife.core/run-model. Closed: only these keys reach TLC, so a caller cannot smuggle recife's process-control opts (:async, :run-local, :raw-output, :debug ...) past the adapter. :isolated runs the spec under a fresh class loader, which is what makes many specs per JVM safe (TLC caches modules across runs otherwise). :tlc-args are extra literal TLC command-line arguments, appended last. TLC formats numbers through the JVM default locale; on a non-English locale run the JVM with -Duser.language=en -Duser.country=US so its output parses.
What a counterexample refutes.
:safety and :liveness are the two TLC property classes. :deadlock is a third member on purpose: TLC raises it for a state with no enabled action, which at the TLA+ level IS a safety property — but folding it into :safety tells a caller that a property THEY wrote was refuted, and none was. A spec whose goal is to terminate reaches its goal and is reported as violating it.
What a counterexample refutes. :safety and :liveness are the two TLC property classes. :deadlock is a third member on purpose: TLC raises it for a state with no enabled action, which at the TLA+ level IS a safety property — but folding it into :safety tells a caller that a property THEY wrote was refuted, and none was. A spec whose goal is to terminate reaches its goal and is reported as violating it.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |