Module Kappa_terms.LKappa

type switching =
| Linked of int
| Freed
| Maintained
| Erased
type rule_internal =
| I_ANY
| I_ANY_CHANGED of int
| I_ANY_ERASED
| I_VAL_CHANGED of int * int
| I_VAL_ERASED of int
type rule_agent = {
ra_type : int;
ra_erased : bool;
ra_ports : ((int, int * int) link Kappa_generic_toolset.Locality.annot * switching) array;
ra_ints : rule_internal array;
ra_syntax : (((int, int * int) link Kappa_generic_toolset.Locality.annot * switching) array * rule_internal array) option;
}

A representation of 'left-hand-side' agent that stores how everything is transformed. In an observable (a mixture in an alg_expr), everything is Maintained (represented by I_VAL_CHANGED (i,i) for internal states).

The field ra_syntax represents how the user describe the agent before compilation. Therefore, compil_of_ast in this module generates rule_agent where ra_syntax is Some (Array.copy ra_ports, Array.copy ra_ints).

type rule_mixture = rule_agent list
val forbid_modification : Kappa_generic_toolset.Locality.t -> 'a option -> unit
val several_internal_states : Kappa_generic_toolset.Locality.t -> 'a
val not_enough_specified : status:string -> side:string -> string -> (string * Kappa_generic_toolset.Locality.t) -> 'a
val several_occurence_of_site : string -> (string * Kappa_generic_toolset.Locality.t) -> 'a
val counter_misused : string -> (string * Kappa_generic_toolset.Locality.t) -> 'a
val agent_to_erased : Kappa_mixtures.Signature.s -> rule_agent -> rule_agent
val to_erased : Kappa_mixtures.Signature.s -> rule_mixture -> rule_mixture
val to_maintained : rule_mixture -> rule_mixture
val to_raw_mixture : Kappa_mixtures.Signature.s -> rule_mixture -> Raw_mixture.t
val copy_rule_agent : rule_agent -> rule_agent
val print_rule_mixture : noCounters:bool -> Kappa_mixtures.Signature.s -> ltypes:bool -> Raw_mixture.t -> Format.formatter -> rule_mixture -> unit
type rule = {
r_mix : rule_mixture;
r_created : Raw_mixture.t;
r_delta_tokens : ((rule_mixture, int) Alg_expr.e Kappa_generic_toolset.Locality.annot * int) list;
r_rate : (rule_mixture, int) Alg_expr.e Kappa_generic_toolset.Locality.annot;
r_un_rate : ((rule_mixture, int) Alg_expr.e Kappa_generic_toolset.Locality.annot * (rule_mixture, int) Alg_expr.e Kappa_generic_toolset.Locality.annot option) option;
r_editStyle : bool;
}

Fragile: the list MUST NOT be a singleton

val print_rates : noCounters:bool -> Kappa_mixtures.Signature.s -> (Format.formatter -> int -> unit) -> (Format.formatter -> int -> unit) -> Format.formatter -> rule -> unit
val print_rule : noCounters:bool -> full:bool -> Kappa_mixtures.Signature.s -> (Format.formatter -> int -> unit) -> (Format.formatter -> int -> unit) -> Format.formatter -> rule -> unit
val rule_to_json : filenames:int Kappa_generic_toolset.Mods.StringMap.t -> rule -> Yojson.Basic.t
val rule_of_json : filenames:string array -> Yojson.Basic.t -> rule