Kappa_terms.Primitives
Compiled kappa model unit
module Transformation : sig ... end
Elementary rule transformations
type alg_expr = (Pattern.id array list, int) Alg_expr.e
type elementary_rule = {
rate : alg_expr Kappa_data_structures.Loc.annoted;
unary_rate : (alg_expr Kappa_data_structures.Loc.annoted * alg_expr option)
option;
connected_components : Pattern.id array;
removed : Instantiation.abstract Transformation.t list;
inserted : Instantiation.abstract Transformation.t list;
delta_tokens : (alg_expr Kappa_data_structures.Loc.annoted * int) list;
syntactic_rule : int;
0
means generated for perturbation.
instantiations : Instantiation.abstract Instantiation.event;
In the reverse order on purpose so that we rev_map when we concretize
*)}
If unary_rate
is Some _
, rate
means binary rate. Else rate
is the rate independently of the connectivity
val extract_cc_ids : elementary_rule -> Pattern.id array
val extract_abstract_event :
elementary_rule ->
Instantiation.abstract Instantiation.event
val rule_to_yojson :
filenames:int Kappa_data_structures.Mods.StringMap.t ->
elementary_rule ->
Yojson.Basic.t
val rule_of_yojson :
filenames:string array ->
Yojson.Basic.t ->
elementary_rule
val fully_specified_pattern_to_positive_transformations :
Pattern.cc ->
Instantiation.concrete Transformation.t list
type 'alg_expr print_expr =
| Str_pexpr of string Kappa_data_structures.Loc.annoted
| Alg_pexpr of 'alg_expr Kappa_data_structures.Loc.annoted
val print_expr_to_yojson :
filenames:int Kappa_data_structures.Mods.StringMap.t ->
('a -> Yojson.Basic.t) ->
('b -> Yojson.Basic.t) ->
('a, 'b) Alg_expr.e print_expr ->
Yojson.Basic.t
val print_expr_of_yojson :
filenames:string array ->
(Yojson.Basic.t -> 'a) ->
(Yojson.Basic.t -> 'b) ->
Yojson.Basic.t ->
('a, 'b) Alg_expr.e print_expr
val din_kind_to_yojson : din_kind -> Yojson.Basic.t
val din_kind_of_yojson : Yojson.Basic.t -> din_kind
val string_of_din_kind : ?len:int -> din_kind -> string
Serialize a value of type din_kind
into a JSON string.
val read_din_kind : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> din_kind
Input JSON data of type din_kind
.
type modification =
| ITER_RULE of alg_expr Kappa_data_structures.Loc.annoted * elementary_rule
| UPDATE of int * alg_expr Kappa_data_structures.Loc.annoted
| SNAPSHOT of bool * alg_expr print_expr list
| STOP of alg_expr print_expr list
| CFLOW of string option
* Pattern.id array
* Instantiation.abstract Instantiation.test list list
First string is the named used by the user
*)| DIN of din_kind * alg_expr print_expr list
| DINOFF of alg_expr print_expr list
| CFLOWOFF of string option * Pattern.id array
| PLOTENTRY
| PRINT of alg_expr print_expr list * alg_expr print_expr list
| SPECIES of alg_expr print_expr list
* Pattern.id array
* Instantiation.abstract Instantiation.test list list
| SPECIES_OFF of alg_expr print_expr list
type perturbation = {
alarm : Kappa_data_structures.Nbr.t option;
precondition : (Pattern.id array list, int) Alg_expr.bool
Kappa_data_structures.Loc.annoted;
effect : modification list;
repeat : (Pattern.id array list, int) Alg_expr.bool
Kappa_data_structures.Loc.annoted;
needs_backtrack : bool;
}
val perturbation_to_yojson :
filenames:int Kappa_data_structures.Mods.StringMap.t ->
perturbation ->
Yojson.Basic.t
val perturbation_of_yojson :
filenames:string array ->
Yojson.Basic.t ->
perturbation
val exists_modification : (modification -> bool) -> perturbation array -> bool
val extract_connected_components_modifications :
modification list ->
Pattern.id list
val extract_connected_components_bool :
(Pattern.id array list, int) Alg_expr.bool Kappa_data_structures.Loc.annoted ->
Pattern.id list
val map_expr_rule :
(alg_expr Kappa_data_structures.Loc.annoted ->
alg_expr Kappa_data_structures.Loc.annoted) ->
elementary_rule ->
elementary_rule
val map_expr_perturbation :
(alg_expr Kappa_data_structures.Loc.annoted ->
alg_expr Kappa_data_structures.Loc.annoted) ->
((Pattern.id array list, int) Alg_expr.bool Kappa_data_structures.Loc.annoted ->
(Pattern.id array list, int) Alg_expr.bool
Kappa_data_structures.Loc.annoted) ->
perturbation ->
perturbation
val fold_expr_rule :
('a -> alg_expr Kappa_data_structures.Loc.annoted -> 'a) ->
'a ->
elementary_rule ->
'a
val fold_expr_perturbation :
('a -> alg_expr Kappa_data_structures.Loc.annoted -> 'a) ->
('a ->
(Pattern.id array list, int) Alg_expr.bool
Kappa_data_structures.Loc.annoted ->
'a) ->
'a ->
perturbation ->
'a