Bigraph.PlaceOperations on place graphs.
type m = Sparse.tThe type of boolean matrices.
val pp_m :
Ppx_deriving_runtime.Format.formatter ->
m ->
Ppx_deriving_runtime.unitval show_m : m -> Ppx_deriving_runtime.stringval m_to_yojson : m -> Yojson.Safe.tval m_of_yojson : Yojson.Safe.t -> m Ppx_deriving_yojson_runtime.error_orval 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_orval outer : t -> intThe number of regions.
val inner : t -> intThe number of sites.
val nodes : t -> intThe number of nodes.
val edges : m -> (int * int) listComputes the representation of a boolean matrix as a list of edges.
val size : t -> intCompute the number of edges in the DAG.
to_dot ~outer_nodes p returns four strings expressing place graph p in DOT format. outer_nodes holds the nodes carrying an outer name; for such a node at the top of a single-level place graph the site edge gets minlen 2, since newrank would otherwise merge the site into the node's rank. The first two elements encode region and site shapes, the third encodes node ranks, and the fourth represents the adjacency matrix. Region-to-site edges are anchored r:e -> s:n so they leave the region's east face.
val depths : t -> int arraydepths p.(i) = the depth of node i in the place forest: 1 + the max depth of its parents, a region parent counting as depth 0. Empty if there are no nodes.
val region_of : t -> int arrayregion_of p.(i) = the region containing node i (a shared node keeps the lowest such region). Empty if there are no nodes.
val parents_above : t -> int list arrayparents_above p.(i) = the node parents of node i in the rank directly above it, in row order (ascending id): the place arrowheads arriving at i's top. Empty if there are no nodes.
val parse_placing : int list list -> int -> tparse_placing l r returns the placing with r regions defined by list l in which each element is a site's parent set.
val elementary_id : int -> telementary_id m computes a place graph in the form of an identity of m.
val id0 : tid0 is the empty place graph.
val elementary_merge : int -> telementary_merge m computes an elementary place graph formed by one region containing m sites.
val elementary_split : int -> telementary_split m computes an elementary place graph formed by one site shared by m regions.
val zero : tzero is the place graph formed by an orphaned site.
val one : tone is the place graph formed by an idle region.
val elementary_sym : int -> int -> telementary_sym m n computes a place graph consisting of a symmetry between m and n.
val elementary_ion : tThe elementary ion: one region containing one site.
equal_placing a b returns true if placings a and b are equal. Inputs are assumed to be valid placing. No check is performed.
Raised when a composition between two incompatible place graphs is attempted. The two integers are the number of sites and regions involved in the composition, respectively.
val is_id : t -> boolis_id p returns true if place graph p is an identity, false otherwise.
val is_plc : t -> boolTest for the absence of nodes.
val is_ground : t -> boolis_ground p is true if place graph p has no sites, false otherwise.
val is_mono : t -> boolis_mono p is true if place graph p is monomorphic, false otherwise. A place graph is monomorphic if no two sites are siblings and no site is an orphan.
val is_epi : t -> boolis_epi p is true if place graph p is epimorphic, false otherwise. A place graph is epimorphic if no region is idle and no two regions are partners.
val is_guard : t -> boolis_guard p is true if place graph p is guarded, false otherwise. A place graph is guarded if no region has sites as children.
val deg_regions : t -> int listInvariants
Out-degree of roots, in order.
val deg_sites : t -> int listIn-degree of sites, in order.
decomp t p i computes the decomposition of target t given pattern p and node isomorphism i from p to t. Pattern p is assumed epi and mono. The result tuple (c, id, d, iso_c, iso_d) is formed by context c, identity id, parameter d, and nodes in c and d expressed as rows of t. The decomposition is with respect to the minimal parameter.
Compute the prime components (i.e. place graphs with one region) of a place graph. The original node numbering is returned in the form of an isomorphism.
Compute or retrieve the transitive closure of the nodes X nodes matrix of a place graph.