Here's an outline for writing the init function:
- void
+ void
init_foo (struct mc *mc)
{
struct foo *foo;
{
struct foo *state = state_;
- for (...each operation...)
+ for (...each operation...)
if (mc_include_state (mc))
{
struct foo *clone;
make it possible to reliably reproduce errors.
3. void destroy (struct mc *mc, void *data);
-
+
This function is called to discard the client-specified
DATA associated with a state.
\f
/* A path of operations through a model to arrive at some
particular state. */
-struct mc_path
+struct mc_path
{
int *ops; /* Sequence of operations. */
size_t length; /* Number of operations. */
void mc_options_destroy (struct mc_options *);
/* Search strategy. */
-enum mc_strategy
+enum mc_strategy
{
MC_BROAD, /* Breadth-first search. */
MC_DEEP, /* Depth-first search. */
/* Strategy for dropped states from the queue when it
overflows. */
-enum mc_queue_limit_strategy
+enum mc_queue_limit_strategy
{
MC_DROP_NEWEST, /* Don't enqueue the new state at all. */
MC_DROP_OLDEST, /* Drop the oldest state in the queue. */
void mc_options_set_aux (struct mc_options *, void *aux);
\f
/* Reason that a model checking run terminated. */
-enum mc_stop_reason
+enum mc_stop_reason
{
MC_CONTINUING, /* Run has not yet terminated. */
MC_SUCCESS, /* Queue emptied (ran out of states). */