Expand description
Model checker module for LazyBalance implementations.
Use LazyBalanceModelChecker as the entrypoint for all model
checking operations.
This module exposes the required types:
These types are used to define the testing environment:
- reference model behavior
- operation space
- state representation
- validity and trap conditions
The execution engine is internal; interact with it only through the trait methods.
Structsยง
- Balance
Exit - Represents a successful withdrawal where the lazy and manual models produce different outputs.
- Balance
Failure - Represents a failure encountered during execution of an operation sequence.
- Balance
Model Results - Aggregates results produced during state exploration.
- Balance
State - Primary state container for executing and tracking a sequence of operations.
- Balance
Traps - Defines trap behavior for state exploration.
- Lazy
Container - Convenience container holding the owned state required to operate
on a
LazyBalanceinstance.
Enumsยง
- Balance
Op - Operation descriptor for driving both
LazyBalanceandManualBalanceModelexecutions in a consistent manner.
Traitsยง
- Balance
Guards - Defines validity checks for operations during state exploration.
- Balance
State Hasher - Defines a primary hashing strategy for
BalanceStateinstances. - Lazy
Balance Marker - Convenience trait alias for a
LazyBalanceimplementor used in model checking and testing. - Lazy
Balance Model Checker - Unified model checker interface over the lazy balance model checker module.
- Manual
Balance Model - A user-indexed eager balance model over a
LazyBalancesystem, primarily intended for testing and validation.
Functionsยง
- balance_
states_ ๐csv_ reports - Writes model exploration results to CSV files.
- compare_
balances_ ๐values - Compares lazy and manual withdrawal results and evaluates drift.
- deposit ๐
- Executes a deposit on the lazy balance model using the provided container.
- drain ๐
- Executes a drain operation on the lazy balance model.
- explore_
balance_ ๐states - Core state exploration engine for
LazyBalance. - explore_
balance_ ๐trap_ states_ default - Extends
explore_explore_balance_states_defaultby allowing controlled violations ofBalanceGuardsviaBalanceTraps. - explore_
explore_ ๐balance_ states_ default - Default state exploration entrypoint for
LazyBalance. - mint ๐
- Executes a mint operation on the lazy balance model.
- reap ๐
- Executes a reap operation on the lazy balance model.
- record_
err ๐ - Records a failed execution for the given trace.
- record_
exit ๐ - Records an exit (drift) between lazy and manual models.
- record_
pass ๐ - Records a successful execution for the given trace.
- withdraw ๐
- Executes a withdrawal on the lazy balance model.