package kappa-library

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Generic_rule_interpreter.MakeSource

Parameters

Signature

Sourcetype t

Abstract graph

Sourcetype instance
Sourcetype result =
  1. | Clash
  2. | Corrected
  3. | Blocked
  4. | Success of t
    (*

    Clash means rectangular approximation failure Corrected means molecular ambiguity failure

    *)

Initialisation

Sourceval empty : outputs:(Data.t -> unit) -> with_trace:bool -> Random.State.t -> Kappa_terms.Model.t -> Counter.t -> t

algebraic expression computation

get_alg is by default Model.get_alg but it is not hard wired because perturbations can redefined alg_expr.

Sourceval value_bool : Counter.t -> t -> (Kappa_terms.Pattern.id array list, int) Kappa_terms.Alg_expr.bool -> bool
Sourceval activity : t -> float

Core

Sourceval apply_given_rule : debug_mode:bool -> outputs:(Data.t -> unit) -> ?rule_id:int -> Kappa_terms.Model.t -> Counter.t -> t -> Trace.event_kind -> Kappa_terms.Primitives.elementary_rule -> result

Returns the graph obtained by applying the rule. rule_id is mandatory if the rule has an unary rate.

Sourceval pick_an_instance : debug_mode:bool -> Kappa_terms.Model.t -> t -> instance
Sourceval is_correct_instance : Kappa_terms.Model.t -> t -> instance -> bool
Sourceval apply_instance : debug_mode:bool -> outputs:(Data.t -> unit) -> ?maxConsecutiveBlocked:int -> maxConsecutiveClash:int -> Kappa_terms.Model.t -> Counter.t -> t -> instance -> int option * bool * t

apply_rule ~outputs ~maxConsecutiveClash ?is_blocked model counter st Returns (corresponding_syntactic_rule, is_final_step, new_state). is_final_step is determined by the counter. corresponding_syntactic_rule is equal to None if and only if a null event occured

Sourceval force_rule : debug_mode:bool -> outputs:(Data.t -> unit) -> Kappa_terms.Model.t -> Counter.t -> t -> Trace.event_kind -> ?rule_id:int -> Kappa_terms.Primitives.elementary_rule -> t option

Apply the rule for sure if it is possible. Try apply_rule but in case of null_event, it computes the exact injections of the left hand side to do apply the rule and returns the remaining exact injections.

Sourceval incorporate_extra_pattern : debug_mode:bool -> Kappa_terms.Pattern.Env.t -> t -> Kappa_terms.Pattern.id -> t
Sourceval overwrite_var : int -> Counter.t -> t -> Kappa_terms.Primitives.alg_expr -> t
Sourceval update_outdated_activities : debug_mode:bool -> (int -> float -> float -> unit) -> Kappa_terms.Model.t -> Counter.t -> t -> int list -> t * int list

Resynchronize the state after a rule application.

It takes the function to store the new activities as an argument whose signature is store rule_id syntactic_rule_id new_activity.

As long as you don't use any algebraic variable (that include don't pick a rule randomly), you can apply several rules in row before resynchronizing. (This is what initial state does.)

takes the list of perturbations to be tried and returns it updated

Sourceval snapshot : debug_mode:bool -> raw:bool -> Kappa_terms.Model.t -> Counter.t -> t -> Data.snapshot
Sourceval print : Kappa_terms.Model.t -> Format.formatter -> t -> unit
Sourceval get_random_state : t -> Random.State.t
Sourceval send_instances_message : Instances.message -> t -> t

Blocking events

Sourceval set_events_to_block : event_predicate option -> t -> t

Stories

Sourceval add_tracked : outputs:(Data.t -> unit) -> Kappa_terms.Pattern.id array -> string -> Kappa_terms.Instantiation.abstract Kappa_terms.Instantiation.test list list -> t -> t
Sourceval remove_tracked : Kappa_terms.Pattern.id array -> string option -> t -> t

Species

Sourceval add_tracked_species : Kappa_terms.Pattern.id array -> string -> Kappa_terms.Instantiation.abstract Kappa_terms.Instantiation.test list list -> t -> t
Sourceval remove_tracked_species : string -> t -> t

Debugging

Sourcetype stats = {
  1. mixture_stats : Kappa_site_graphs.Edges.stats;
}
Sourceval stats : t -> stats
Sourceval print_stats : Format.formatter -> t -> unit
Sourceval debug_print : Format.formatter -> t -> unit

obs_from_transformations domain state transformations

  • returns

    (obs, deps)

Sourceval add_outdated_dependencies : Kappa_data_structures.Operator.DepSet.t -> t -> t
Sourceval debug_print_instances : Format.formatter -> t -> unit
OCaml

Innovation. Community. Security.