Module Nodes

module Nodes: sig .. end
This module provides operations on bigraphical nodes.
Author(s): Michele Sevegnani

type t 
The type of a set of nodes.
val add : int -> Ctrl.t -> t -> t
Add a node to the set.
val fold : (int -> Ctrl.t -> 'a -> 'a) -> t -> 'a -> 'a
Fold over a set.
val empty : t
The empty node set.
val is_empty : t -> bool
Return true if the set is empty.
val size : t -> int
Return the cardinality of a node set.
val to_string : t -> string
Return a string representation of a node set. Example:

{(2, Ready:0),(0, A:1),(3, Fun:0),(1, Snd:2)}.

val of_string : string -> t
Opposite of Nodes.to_string.
Raises Invalid_argument if the input cannot be parsed.
val json_of_nodes : t -> string
Return a JSON representation of a node set. Example:

"nodes": [
       {
          "node_id": 1,
          "control": {
            "control_id""Send",
            "control_arity": 2
          }
       },
       {
          "node_id": 2,
          "control": {
            "control_id""New",
            "control_arity": 1
          }
       }
     ]

val json_of_nodes_f : t -> Base.JSON.json_node
val string_of_sorts : t -> string
Return a string representation of the sorts of a node set. Example:

{ReadyAFunSnd}.

val to_dot : t -> string
to_dot ns returns a string expressing node shapes in dot format.
val get_ctrl : int -> t -> Ctrl.t option
get_ctrl i ns returns the control of node i in node set ns.
val find_all : Ctrl.t -> t -> IntSet.t
find_all ns c returns the set of nodes of control c in node set ns.
val tens : t -> t -> t
tens n0 n1 returns the disjoint union of name sets n0 and n1.
val apply : Iso.t -> t -> t
Apply an isomorphism.
val not_sub : t -> t -> bool
not_sub a b returns true when node set a is not a subset of node set b.
val norm : t -> string list
Compute the norm of a set. The norm is a defined as a sorted list of controls. Example:

["A""A""C""D""T"].

val equal : t -> t -> bool
Equality test. Node identities are ignored.