Interface Bigraph<S extends Signature<?>>

Type Parameters:
S - type of the signature
All Superinterfaces:
HasSignature<S>
All Known Implementing Classes:
AbstractDynamicMatchAdapter, BigraphCompositeSupport, BigraphDelegator, DiscreteIon, ElementaryBigraph, KindBigraph, Linkings.Closure, Linkings.Identity, Linkings.IdentityEmpty, Linkings.Substitution, Placings.Barren, Placings.Identity1, Placings.Join, Placings.Merge, Placings.Permutation, Placings.Symmetry, PureBigraph, PureBigraphAgentAdapter, PureBigraphComposite, PureBigraphRedexAdapter

public interface Bigraph<S extends Signature<?>> extends HasSignature<S>
Generic bigraph interface of all bigraph entities in this framework. This interface is primarily implemented by pure bigraphs.

Important direct implementations are:

Author:
Dominik Grzelak
  • Method Details

    • getSignature

      S getSignature()
      Description copied from interface: HasSignature
      Get the corresponding signature of the underlying bigraph
      Specified by:
      getSignature in interface HasSignature<S extends Signature<?>>
      Returns:
      the signature of the bigraph
    • isGround

      default boolean isGround()
      Checks, if the bigraph is ground, that is, whether the inner interface is empty (no sites and no inner names).
      Returns:
      true, if the bigraph is ground, otherwise false
    • isPrime

      default boolean isPrime()
      Checks, if the bigraph is prime. A Prime bigraph has only one root and no inner names.
      Returns:
      true, if the bigraph is prime, otherwise false.
    • isEpimorphic

      default boolean isEpimorphic()
      A concrete bigraph is epi (epimorphic) iff its place graph has no idle root (i.e., no root is a barren) and its link graph has no idle outer names.
      Returns:
      true if the bigraph is epi, otherwise false
    • isMonomorphic

      default boolean isMonomorphic()
      A concrete bigraph is mono (monomorphic) iff no two sites are siblings ("inner-injective") and no two inner names are siblings. With other words, every edge has at most one inner name (= no two inner names are peers).
      Returns:
      true if the bigraph is mono, otherwise false
    • isLean

      default boolean isLean()
      A bigrap is lean if it contains no idle edges.
      Returns:
      true, if the bigraph is lean, otherwise false.
    • getSupport

      default Collection<BigraphEntity<?>> getSupport()
      Returns the support of a bigraph. The support is a finite set comprising the nodes of the place graph and the edges of the link graph of the current bigraph.

      Only concrete bigraphs have a support. If this set is empty, the bigraph is considered as abstract.

      Returns:
      the support |B| of the bigraph B
    • isActiveAtSite

      default boolean isActiveAtSite(int siteIndex)
      A site is active if all its ancestors are also active.
      Parameters:
      siteIndex - the index of the site to check
      Returns:
      true if the site is active, otherwise false
    • isActiveAtNode

      default <C extends Control<?, ?>> boolean isActiveAtNode(BigraphEntity.NodeEntity<C> node)
    • isActive

      default boolean isActive()
      A bigraph is active if all its sites are active. See isActiveAtSite(int).
      Returns:
      true if the bigraph is active.
    • isGuarding

      default boolean isGuarding()
      Checks if the bigraph is guarding. A bigraph is guarding if no site has a root as parent and no inner name is open.
      Returns:
      true if the bigraph is guarding, otherwise false
    • isDiscrete

      default boolean isDiscrete()
      A discrete bigraph has no edges and its link map is bijective (all names are distinct and every point is open).

      See: 1.Jensen, O.H., Milner, R.: Bigraphs and mobile processes (revised). University of Cambridge Computer Laboratory (2004), p. 59.

      Returns:
      true if the bigraph is discrete, otherwise false
    • getInnerFace

      default Map.Entry<Set<FiniteOrdinal<Integer>>,Set<StringTypedName>> getInnerFace()
    • getOuterFace

      default Map.Entry<Set<FiniteOrdinal<Integer>>,Set<StringTypedName>> getOuterFace()
    • getLevelOf

      int getLevelOf(BigraphEntity<?> place)
      Get the depth of a place entity in the place graph (i.e., a tree). The depth of a root node is always 0.
      Parameters:
      place - the place node in question to compute its depth
      Returns:
      the depth of the given place entity of this bigraph
    • getOpenNeighborhoodOfVertex

      List<BigraphEntity<?>> getOpenNeighborhoodOfVertex(BigraphEntity<?> node)
      Gets the neighborhood of the given node of the place graph. The neighborhood is the set containing the its children and its parent (without the node in question itself).
      Parameters:
      node - the nodes who's neighborhood should be returned
      Returns:
      the neighborhood of the node of the place graph
    • getRoots

    • getSites

    • getOuterNames

    • getInnerNames

    • getAllPlaces

      Collection<BigraphEntity<?>> getAllPlaces()
      Returns all places of the bigraph, i.e., roots, nodes and sites.
      Returns:
      all places of the bigraph
    • getAllLinks

    • getEdges

    • getNodes

      <C extends Control<?, ?>> Collection<BigraphEntity.NodeEntity<C>> getNodes()
    • getTopLevelRoot

      BigraphEntity.RootEntity getTopLevelRoot(BigraphEntity<?> node)
    • isParentOf

      boolean isParentOf(BigraphEntity<?> node, BigraphEntity<?> possibleParent)
      A recursive function that checks, whether the given node has possibleParent as parent. This means that possibleParent must not necessarily be the direct parent, but can also be a parent higher in the hierarchy.
      Parameters:
      node - the node to check against the parent possibleParent
      possibleParent - the possible parent to check against node
      Returns:
      true, if possibleParent is directly or indirectly the parent of node, otherwise false
    • getChildrenOf

      Collection<BigraphEntity<?>> getChildrenOf(BigraphEntity<?> node)
      Returns the set of children of a given node (including sites).
      If the node has no children, then an empty set is returned.
      Parameters:
      node - the node whose children should be returned
      Returns:
      a set of children of the given node
    • getIncidentLinksOf

      default <C extends Control<?, ?>> Collection<BigraphEntity.Link> getIncidentLinksOf(BigraphEntity.NodeEntity<C> node)
      Returns all incidents links (i.e., edges and outer names) for the given node
      Parameters:
      node - the node
      Returns:
      all incident links of node
    • getParent

      BigraphEntity<?> getParent(BigraphEntity<?> node)
      Get the parent of a bigraph's place. Passing a root as argument will always return null.
      Parameters:
      node - a place of this bigraph
      Returns:
      the parent of the given place, or null
    • getLinkOfPoint

      BigraphEntity.Link getLinkOfPoint(BigraphEntity<?> point)
      Returns the link of a bigraph's point type.
      Parameters:
      point - a point of the bigraph
      Returns:
      returns the link that connects the point a null
    • getPorts

      Return all ports of a node. If the node's control has arity 0, then the list will always be empty. If no link is attached to a port, the list will also be empty.
      Parameters:
      node - the node who's ports shall be returned
      Returns:
      all ports of a node
    • getPortCount

      <C extends Control<?, ?>> int getPortCount(BigraphEntity.NodeEntity<C> node)
      Get the number of "blocked/occupied" ports by links of a node. Check with the control's arity.
      Parameters:
      node - the node
      Returns:
      the port count of the node which are already used by links
    • getNodeOfPort

      <C extends Control<?, ?>> BigraphEntity.NodeEntity<C> getNodeOfPort(BigraphEntity.Port port)
    • getSiblingsOfNode

      Collection<BigraphEntity<?>> getSiblingsOfNode(BigraphEntity<?> node)
      Returns all siblings of the given node of the current bigraph. The node itself is not included.
      Parameters:
      node - the node whoms sibling should be returned
      Returns:
      siblings of node
    • getSiblingsOfInnerName

      Collection<BigraphEntity.InnerName> getSiblingsOfInnerName(BigraphEntity.InnerName innerName)
      Returns all siblings of an inner name. The collection will not contain any port.
      Parameters:
      innerName - the inner name who's siblings should be returned
      Returns:
      the siblings connected to innerName
    • getPointsFromLink

      Collection<BigraphEntity<?>> getPointsFromLink(BigraphEntity.Link linkEntity)
      Get all point entities (i.e., ports and inner names) of a link entity (i.e., edges and outer names).
      Parameters:
      linkEntity - the link entity who's connections shall be returned
      Returns:
      collection of points connected to the link entity
    • areConnected

      <C extends Control<?, ?>> boolean areConnected(BigraphEntity.NodeEntity<C> place1, BigraphEntity.NodeEntity<C> place2)
      Check if two nodes are connected to each other. The method considers connections by edges and outer names.
      Parameters:
      place1 - left node
      place2 - right node
      Returns:
      true, if the two nodes are connected by an edge or outer name