ravel
Deterministic simulation testing for C++. Seed a bug, replay it exact.
Loading...
Searching...
No Matches
Public Attributes | List of all members
ravel::SimulationOptions Struct Reference

Options for one run. Every field has a sensible default. More...

#include <simulation.hpp>

Public Attributes

std::uint64_t max_steps = 1'000'000
 Upper bound on scheduler steps, so a livelocked system fails the run instead of hanging it.
 
VirtualClock::Tick time_limit = std::numeric_limits<VirtualClock::Tick>::max()
 Virtual time after which the run stops, without failing.
 
std::filesystem::path trace_dir
 When set, a failed run writes its trace here as ravel-seed-<seed>.trace.jsonl.
 
std::optional< std::vector< VirtualRng::Choice > > replay_choices
 When set, the run answers every random draw from this list instead of the seed (see VirtualRng::replaying).
 

Detailed Description

Options for one run. Every field has a sensible default.

Member Data Documentation

◆ replay_choices

std::optional<std::vector<VirtualRng::Choice> > ravel::SimulationOptions::replay_choices

When set, the run answers every random draw from this list instead of the seed (see VirtualRng::replaying).

Used to replay and shrink failures.

◆ time_limit

VirtualClock::Tick ravel::SimulationOptions::time_limit = std::numeric_limits<VirtualClock::Tick>::max()

Virtual time after which the run stops, without failing.

Timers due later never fire. Set it for systems that never go quiet on their own, such as ones with heartbeats. The default lets a run go on until nothing is left.

◆ trace_dir

std::filesystem::path ravel::SimulationOptions::trace_dir

When set, a failed run writes its trace here as ravel-seed-<seed>.trace.jsonl.

Empty (the default) writes no files.


The documentation for this struct was generated from the following file: