Parameter Make.2-R

type t

The type of reaction rules.

type ac

The type of application conditions.

type label

The type of reaction rule lables.

type react_error
exception NOT_VALID of react_error
val name : t -> string

Returns the name of a rewrite rule.

val lhs : t -> Big.t

Return the left-hand side of a rewrite rule.

val rhs : t -> Big.t

Return the right-hand side of a rewrite rule.

val conds : t -> ac list

Return application conditions for a rewrite rule.

val l : t -> label

Return the label of a rewrite rule.

val equal : t -> t -> bool

Equality for reaction rules

val map : t -> Fun.t option

Return the instantition map of a rewrite rule.

val make : name:string -> lhs:Big.t -> rhs:Big.t -> ?⁠conds:ac list -> label -> Fun.t option -> t

Create a new reaction rule.

val to_string : t -> string

String representation of a rewrite rule.

val is_valid : t -> bool

Validity check.

val is_valid_exn : t -> bool

Same as is_valid but an exception is raised instead of returning false.

raises NOT_VALID

when the reaction rule is not valid.

val string_of_react_err : react_error -> string

Convert to string the output of the validity check.

val is_enabled : Big.t -> t -> bool

is_enabled b r checks if rewrite rule r can be applied to bigraph b.

val filter_iso : (Big.t * label * t list) list -> (Big.t * label * t list) list

Merge isomorphic occurrences

val apply : Big.t -> t list -> Big.t option

Apply a list of reaction rules in sequence. Non-enabled rules are ignored.

val fix : Big.t -> t list -> Big.t * int

fix b r_list applies the rewrite rules in list r_list to bigraph b until a fixed point b' is reached. The result is fixed point b' and the number of rewriting steps performed. Note, b is returned when no rewriting is performed.

val step : Big.t -> t list -> (Big.t * label * t list) list * int

All the possible evolutions in one step. Total number of occurrences also returned.

val random_step : Big.t -> t list -> (Big.t * label * t list) option * int

Random step.

module Memo : sig ... end

Memoised interface