Stateful.RuleDeclares a rule.
name is printed in the final output when the rule is runstep tc state performs one application of the rule, drawing any arguments it needs from tc and returning the new state.To trace the state a rule produces on a failing replay, pass ?sexp_of_state to run.
let push =
Stateful.Rule.create ~name:"push" ~step:(fun tc stack ->
let n = draw tc (Generators.integers ~min_value:0 ~max_value:100 ()) in
n :: stack)val name : _ t -> stringReturns the name of the rule.
let label = Stateful.Rule.name push