stateright / stateright

A model checker for implementing distributed systems.

Home Page:https://docs.rs/stateright

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simulation checker

jeffa5 opened this issue · comments

Hi @jonnadal. I'm looking to add a simulation checker to stateright, similar to TLC's.

A rough outline:

  1. Each thread starts with a seed and the set of initial states.
  2. It picks a random initial state using the seeded rng
  3. It then generates the next states
  4. It picks a random state from this list using the seeded rng, going back to 3
    • This continues until it reaches the boundary of the model
    • Or a max depth is specified and that is reached
  5. Once a single trace has finished it begins from point 2 again.

This is not intended to finish running (similarly to TLC's).

Primarily this aims to enable checking deeper in the search space quickly, typically where more interesting behaviour might be happening (at least for more complex protocols).

I'd be happy to implement this, let me know what you think!

Great idea, and thank you for offering! I think this would be an excellent feature to have.

Linking #50