Bigraph.LinkOperations on link graphs.
val pp_edg :
Ppx_deriving_runtime.Format.formatter ->
edg ->
Ppx_deriving_runtime.unitval show_edg : edg -> Ppx_deriving_runtime.stringval edg_to_yojson : edg -> Yojson.Safe.tval edg_of_yojson : Yojson.Safe.t -> edg Ppx_deriving_yojson_runtime.error_orThe port multiset of an edge. Ports are tracked as a multiset: each occurrence of a link name in the edge counts separately, so multiplicities matter for pattern matching.
Total order on edges by inner face, outer face, and then port multiset; 0 exactly when the two edges are structurally equal, that is, when struct_equal holds.
struct_equal e1 e2 is true when the two edges have the same inner face, outer face, and port multiset.
val pp :
Ppx_deriving_runtime.Format.formatter ->
t ->
Ppx_deriving_runtime.unitval show : t -> Ppx_deriving_runtime.stringval to_yojson : t -> Yojson.Safe.tval of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_orMultiset operations for link graphs.
val empty : tThe empty link graph.
val is_empty : t -> boolReturn true if the link graph is empty.
Fold over the edges of a link graph, in elements order.
val cardinal : t -> intReturn the number of edges.
Return the list of edges, sorted ascending by edge_compare with structurally-equal edges in insertion order. The position of an edge in this list is its index in the SAT closed-edge encoding and in the SBC edge generators, so the order is part of the observable behaviour.
val to_dot : t -> string * string * string * stringto_dot l computes a four-elements tuple encoding the dot representation of link graph l. The first two elements represent inner and outer names shape declarations. The third element represent the hyperedges shape declarations. The fourth element specifies the adjacency matrix.
elementary_sub inner outer computes a substitution consisting of a single edge in which inner and outer are the inner and outer face, respectively.
elementary_id f computes the identity over face f, that is, one edge for each name in f.
val id_empty : tid_empty is the empty link graph.
Raised when the tensor product between two incompatible link graphs cannot be performed. The first element is the set of inner common names while the second is the set of outer common names.
Raised when a composition between two incompatible link graphs cannot be performed.
tens a b n computes the tensor product of link graphs a and b. Argument n is the number of nodes of a.
ppar a b n computes the parallel composition of link graphs a and b. n is the number of nodes of a.
comp a b n computes the composition of link graphs a and b. Argument n is the number of nodes of a.
val is_id : t -> boolis_id l is true if link graph l is an identity, false otherwise.
val is_mono : t -> boolis_mono l is true if link graph l is monomorphic, false otherwise. A link graph is monomorphic if every edge has at most one inner name.
val is_epi : t -> boolis_epi l is true if link graph l is epimorphic, false otherwise. A link graph is epimorphic if no outer name is idle.
val is_ground : t -> boolis_ground l is true if link graph l has no inner names, false otherwise.
val is_guard : t -> boolis_guard l is true if no edges in link graph l have both inner and outer names, false otherwise.
val max_ports : t -> intCompute the maximum number of ports in one edge of a link graph.
val closed_edges : t -> intCompute the number of closed edges.
filter_iso p l filters link graph l keeping only the edges satisfying predicate p. The computed isomorphism maps edge indices of the filtered link graph to indices of edges in l.
closed_edges_iso l computes the closed edges of link graph l. The computed isomorphism maps edge indices of the new link graph to indices of edges in l.
Normalise link graph l as follows: l = omega o l' where omega is a linking and l' is the same as l but with all links open.
decomp target pattern i_e i_c i_d f_e computes the decomposition of target given pattern, iso i_e, and isos from nodes in t to nodes of c and d, respectively. Argument f_e is a total function from links in the pattern to links in the target. Pattern p is assumed epi and mono and i_e is from edges in p to edges in t. Isos i_c and i_d are obtained by Place.decomp. The results are link graph c, d and id.
Compute the prime components of a link graph. See Place.decomp.