Module Kappa_runtime.Replay

type state = {
graph : Kappa_mixtures.Edges.t;
time : float;
event : int;
connected_components : Kappa_mixtures.Agent.SetMap.Set.t Kappa_generic_toolset.Mods.IntMap.t option;
}
type summary = {
unary_distances : (int * int) option;
}
val init_state : with_connected_components:bool -> state
val do_step : Kappa_mixtures.Signature.s -> state -> Trace.step -> state * summary
returns

the new state and, if the step was an unary instance of a binary rule, the id of the rule and the distance between its 2 connected patterns.

val is_step_triggerable : state -> Trace.step -> bool

determines whether or not a step can be applied from a given state.

val is_step_triggerable_on_edges : Kappa_mixtures.Edges.t -> Trace.step -> bool

same function but takes a graph of type Edges.t directly.

val tests_pass_on : Kappa_mixtures.Edges.t -> Kappa_terms.Instantiation.concrete Kappa_terms.Instantiation.test list list -> bool

exported for convenience.

val cc_of_state : debugMode:bool -> state -> Kappa_terms.Pattern.PreEnv.t -> Kappa_terms.Pattern.PreEnv.t * ((int * int) list * Kappa_terms.Pattern.cc * Kappa_terms.Pattern.id) list