Kappa_terms.Model
Compiled representation of a full Kappa model
val init :
filenames:string list ->
Pattern.Env.t ->
unit Kappa_data_structures.NamedDecls.t ->
Primitives.alg_expr Kappa_data_structures.Loc.annoted
Kappa_data_structures.NamedDecls.t ->
(Kappa_data_structures.Operator.DepSet.t
* Kappa_data_structures.Operator.DepSet.t
* Kappa_data_structures.Operator.DepSet.t array
* Kappa_data_structures.Operator.DepSet.t array) ->
((string Kappa_data_structures.Loc.annoted option
* LKappa.rule Kappa_data_structures.Loc.annoted)
array
* Primitives.elementary_rule array) ->
Primitives.alg_expr Kappa_data_structures.Loc.annoted array ->
Primitives.perturbation array ->
Contact_map.t ->
Kappa_site_graphs.Counters_info.counter_sig option array array ->
t
init sigs tokens algs dependencies (ast_rules,rules) obs perts
val deconstruct :
t ->
string list
* Pattern.Env.t
* unit Kappa_data_structures.NamedDecls.t
* Primitives.alg_expr Kappa_data_structures.Loc.annoted
Kappa_data_structures.NamedDecls.t
* (Kappa_data_structures.Operator.DepSet.t
* Kappa_data_structures.Operator.DepSet.t
* Kappa_data_structures.Operator.DepSet.t array
* Kappa_data_structures.Operator.DepSet.t array)
* ((string Kappa_data_structures.Loc.annoted option
* LKappa.rule Kappa_data_structures.Loc.annoted)
array
* Primitives.elementary_rule array)
* Primitives.alg_expr Kappa_data_structures.Loc.annoted array
* Primitives.perturbation array
* Contact_map.t
* Kappa_site_graphs.Counters_info.counter_sig option array array
val nb_tokens : t -> int
val nb_algs : t -> int
val nb_rules : t -> int
val nb_syntactic_rules : t -> int
val nb_perturbations : t -> int
val domain : t -> Pattern.Env.t
val get_obs : t -> Primitives.alg_expr Kappa_data_structures.Loc.annoted array
val get_rules : t -> Primitives.elementary_rule array
val new_domain : Pattern.Env.t -> t -> t
val signatures : t -> Kappa_site_graphs.Signature.s
val tokens_finder : t -> int Kappa_data_structures.Mods.StringMap.t
val algs_finder : t -> int Kappa_data_structures.Mods.StringMap.t
val contact_map : t -> Contact_map.t
val counters_info : t -> Kappa_site_graphs.Counters_info.t
val counter_info :
t ->
int ->
int ->
Kappa_site_graphs.Counters_info.counter_sig option
val get_alg : t -> int -> Primitives.alg_expr
val get_algs :
t ->
(string * Primitives.alg_expr Kappa_data_structures.Loc.annoted) array
val get_perturbation : t -> int -> Primitives.perturbation
val get_rule : t -> int -> Primitives.elementary_rule
val get_ast_rule : t -> int -> LKappa.rule
val get_ast_rule_with_label :
t ->
int ->
string Kappa_data_structures.Loc.annoted option
* LKappa.rule Kappa_data_structures.Loc.annoted
val get_ast_rule_rate_pos :
unary:bool ->
t ->
int ->
Kappa_data_structures.Loc.t
val map_observables : (Primitives.alg_expr -> 'a) -> t -> 'a array
val fold_rules :
(int -> 'a -> Primitives.elementary_rule -> 'a) ->
'a ->
t ->
'a
val fold_ast_rules : (int -> 'a -> LKappa.rule -> 'a) -> 'a -> t -> 'a
val fold_perturbations :
(int -> 'a -> Primitives.perturbation -> 'a) ->
'a ->
t ->
'a
val get_alg_reverse_dependencies :
t ->
int ->
Kappa_data_structures.Operator.DepSet.t
val get_token_reverse_dependencies :
t ->
int ->
Kappa_data_structures.Operator.DepSet.t
val all_dependencies :
t ->
Kappa_data_structures.Operator.DepSet.t
* Kappa_data_structures.Operator.DepSet.t
* Kappa_data_structures.Operator.DepSet.t array
* Kappa_data_structures.Operator.DepSet.t array
val num_of_agent : string Kappa_data_structures.Loc.annoted -> t -> int
val num_of_alg : string Kappa_data_structures.Loc.annoted -> t -> int
val num_of_token : string Kappa_data_structures.Loc.annoted -> t -> int
val nums_of_rule : string -> t -> int list
val print_ast_rule :
noCounters:bool ->
?env:t ->
Stdlib.Format.formatter ->
int ->
unit
The int is the ast_rule_id
val print_rule :
noCounters:bool ->
?env:t ->
Stdlib.Format.formatter ->
int ->
unit
Same as above but the int is this time the rule_id
val print_agent : ?env:t -> Stdlib.Format.formatter -> int -> unit
val print_alg : ?env:t -> Stdlib.Format.formatter -> int -> unit
val print_token : ?env:t -> Stdlib.Format.formatter -> int -> unit
val print :
noCounters:bool ->
(t -> Stdlib.Format.formatter -> Primitives.alg_expr -> unit) ->
(t -> Stdlib.Format.formatter -> Primitives.elementary_rule -> unit) ->
(t -> Stdlib.Format.formatter -> Primitives.perturbation -> unit) ->
Stdlib.Format.formatter ->
t ->
unit
val print_kappa :
noCounters:bool ->
(t -> Stdlib.Format.formatter -> Primitives.alg_expr -> unit) ->
?pr_rule:(t -> Stdlib.Format.formatter -> Primitives.elementary_rule -> unit) ->
(t -> Stdlib.Format.formatter -> Primitives.perturbation -> unit) ->
Stdlib.Format.formatter ->
t ->
unit
val to_yojson : t -> Yojson.Basic.t
val of_yojson : Yojson.Basic.t -> t
val check_if_counter_is_filled_enough : t -> unit
val overwrite_vars : (int * Primitives.alg_expr) list -> t -> t
val propagate_constant :
warning:
(pos:Kappa_data_structures.Loc.t ->
(Stdlib.Format.formatter -> unit) ->
unit) ->
?max_time:float ->
?max_events:int ->
updated_vars:int list ->
alg_overwrite:(int * Primitives.alg_expr) list ->
t ->
t
propagate_constant updated_vars overwrite_vars env
val fold_mixture_in_expr : ('a -> Pattern.id array list -> 'a) -> 'a -> t -> 'a
val unary_patterns : t -> Pattern.Set.t