Skip to main content

Crate dive_explore

Crate dive_explore 

Source
Expand description

dive-explore: breadth-first exploration over a compiled dive_core::Plan. With several workers, each level is expanded in parallel and committed in order (parallel.rs), so every result is the one-worker result.

The loop follows TLC’s ModelChecker with one worker:

  • every emitted state counts as generated, before any check;
  • an initial state, or a successor, that is not completely specified is an error;
  • constraints are evaluated before the seen check; a state outside the model is not inserted, but its invariants are still checked if it was not seen;
  • invariants are checked only for new states;
  • a state with no successors at all is a deadlock when deadlock is checked.

Successors are probed against the seen set with an incremental hash computed from the transient buffer, and only new states are interned. Invariant and constraint conjuncts whose read set does not meet the variables a step changed are skipped: the parent satisfied them.

§Example

The counts of a run are reported in Outcome::stats; see tests/golden.rs for complete runs from TLA+ sources.

Re-exports§

pub use ending::Failure;
pub use ending::Replayed;
pub use ending::Site;
pub use trace::TraceState;

Modules§

checkpoint
Completed-level native safety search images, owned by their checked Store.
distributed
Authenticated, bounded native pure-safety work over trusted TCP endpoints.
ending
Error endings.
graph
The behavior graph of a run, as events for a temporal check.
sample
Successor sampling for a differential sample: Core’s successors of a sample of states, for comparison with an independent evaluator.
storage
Opt-in native safety storage. Exact identities are separate from receiver history.
trace
Counterexample reconstruction.

Structs§

Config
Run settings.
Metrics
Strategy metrics.
Outcome
The result of a run.
Seen
A set of 64-bit state keys (open addressing, linear probing).
Stats
TLC’s statistics.

Enums§

Limit
An admission limit (--max-states, --max-depth).
Verdict
How a run ended.

Functions§

explore
Explores the plan’s state space.
explore_distributed
Explores pure safety with authenticated remote phase-one evaluation. The coordinator retains ordered commit, seen keys and concrete trace replay.
explore_owned
Explores pure safety while allowing completed-level replacement of its Store.
explore_with
Explores the plan’s state space, reporting its behavior graph to graph (graph::GraphSink) in the one-worker order.
explore_with_control
Explores with the caller’s existing owned work checkpoint in addition to state-boundary polls. Mathematical identity walks use this same owner.
explore_with_storage
Explores with explicit native safety storage policies. Persistent values stay owned by store; transient files are not restartable checkpoints.