package kappa-library

  1. Overview
  2. Docs

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 = {
  1. rate : alg_expr Kappa_data_structures.Loc.annoted;
  2. unary_rate : (alg_expr Kappa_data_structures.Loc.annoted * alg_expr option) option;
  3. connected_components : Pattern.id array;
  4. removed : Instantiation.abstract Transformation.t list;
  5. inserted : Instantiation.abstract Transformation.t list;
  6. delta_tokens : (alg_expr Kappa_data_structures.Loc.annoted * int) list;
  7. syntactic_rule : int;
    (*

    0 means generated for perturbation.

    *)
  8. 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 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 =
  1. | Str_pexpr of string Kappa_data_structures.Loc.annoted
  2. | 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
type din_kind =
  1. | ABSOLUTE
  2. | RELATIVE
  3. | PROBABILITY
val din_kind_to_yojson : din_kind -> Yojson.Basic.t
val din_kind_of_yojson : Yojson.Basic.t -> din_kind
val write_din_kind : Buffer.t -> din_kind -> unit

Output a JSON value of type din_kind.

val string_of_din_kind : ?len:int -> din_kind -> string

Serialize a value of type din_kind into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

Input JSON data of type din_kind.

val din_kind_of_string : string -> din_kind

Deserialize JSON data of type din_kind.

type modification =
  1. | ITER_RULE of alg_expr Kappa_data_structures.Loc.annoted * elementary_rule
  2. | UPDATE of int * alg_expr Kappa_data_structures.Loc.annoted
  3. | SNAPSHOT of bool * alg_expr print_expr list
  4. | STOP of alg_expr print_expr list
  5. | CFLOW of string option * Pattern.id array * Instantiation.abstract Instantiation.test list list
    (*

    First string is the named used by the user

    *)
  6. | DIN of din_kind * alg_expr print_expr list
  7. | DINOFF of alg_expr print_expr list
  8. | CFLOWOFF of string option * Pattern.id array
  9. | PLOTENTRY
  10. | PRINT of alg_expr print_expr list * alg_expr print_expr list
  11. | SPECIES of alg_expr print_expr list * Pattern.id array * Instantiation.abstract Instantiation.test list list
  12. | SPECIES_OFF of alg_expr print_expr list
type perturbation = {
  1. alarm : Kappa_data_structures.Nbr.t option;
  2. precondition : (Pattern.id array list, int) Alg_expr.bool Kappa_data_structures.Loc.annoted;
  3. effect : modification list;
  4. repeat : (Pattern.id array list, int) Alg_expr.bool Kappa_data_structures.Loc.annoted;
  5. 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 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
OCaml

Innovation. Community. Security.