type ('state, 'context) rule = {from : 'state;label : string;guard : 'context -> int -> bool;target : 'state;
}type ('state, 'context) machine = ('state, 'context) rule listtype 'state run = {state : 'state;since : int;fired : string option;
}val start : 'state -> 'state runval step : ('state, 'context) machine -> 'context -> 'state run -> 'state runval after : int -> 'context -> int -> boolval states : ('state, 'context) machine -> 'state list