Class PureBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>>
- Type Parameters:
S- the signature type
- All Implemented Interfaces:
Bigraph<S>,BigraphComposite<S>,EcoreBigraph<S>,EcoreBigraphExt,HasSignature<S>
BigraphComposite for pure bigraphs.
Provides categorical operators to compute products of two bigraphs. Operators apply only to bigraphs of the same type and signature, except elementary ones.
- Author:
- Dominik Grzelak
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bigraphs.framework.core.BigraphCompositeSupport
BigraphCompositeSupport.LinkComparator<T extends BigraphEntity<?>>Nested classes/interfaces inherited from interface org.bigraphs.framework.core.EcoreBigraph
EcoreBigraph.Stub<S extends AbstractEcoreSignature<?>> -
Field Summary
Fields inherited from class org.bigraphs.framework.core.BigraphDelegator
bigraphDelegate -
Constructor Summary
ConstructorsConstructorDescriptionPureBigraphComposite(Bigraph<S> bigraph) Constructs a composable bigraph from the givenBigraph. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertSignaturesAreSame(Bigraph<S> outer, Bigraph<S> inner) Composes two bigraphs where a new immutable bigraph is created.compose(BigraphComposite<S> f) Composes two bigraphs where a new immutable bigraph is created.org.eclipse.emf.ecore.EObjectReturn the Ecore-based instance model of a bigraph object or signature object.org.eclipse.emf.ecore.EPackageReturn the metamodel of a bigraph object or a signature object.Function that makes the nodes disjunct in terms of there names.Compute the tensor product of two bigraphs.Convenient method forBigraphComposite.juxtapose(BigraphComposite).juxtpositionOf(Bigraph<S>... bigraphs) Compute the tensor product in a row.merge(BigraphComposite<S> f) Nesting operation for two bigraphs.nesting(BigraphComposite<S> inner) Nesting operation for two bigraphs.parallelProduct(Bigraph<S> f) Compute the parallel product of two bigraphs.Compute the parallel product of two bigraphs.parallelProductOf(Bigraph<S>... bigraphs) Compute the parallel product in a row.Methods inherited from class org.bigraphs.framework.core.BigraphCompositeSupport
assertInterfaceCompatibleForCompose, assertInterfaceCompatibleForJuxtaposition, createNameSupplier, createNameSupplier, createNameSupplier, createNameSupplier, isLinking, isPlacingMethods inherited from class org.bigraphs.framework.core.BigraphDelegator
areConnected, getAllLinks, getAllPlaces, getBigraphDelegate, getChildrenOf, getEdges, getInnerNames, getLevelOf, getLinkOfPoint, getNodeOfPort, getNodes, getOpenNeighborhoodOfVertex, getOuterNames, getParent, getPointsFromLink, getPortCount, getPorts, getRoots, getSiblingsOfInnerName, getSiblingsOfNode, getSignature, getSites, getTopLevelRoot, isParentOfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bigraphs.framework.core.Bigraph
getIncidentLinksOf, getInnerFace, getOuterFace, getSupport, isActive, isActiveAtNode, isActiveAtSite, isDiscrete, isEpimorphic, isGround, isGuarding, isLean, isMonomorphic, isPrimeMethods inherited from interface org.bigraphs.framework.core.EcoreBigraph
getEMetaModelData, getSignature, isBEdge, isBInnerName, isBLink, isBNode, isBOuterName, isBPlace, isBPoint, isBPort, isBRoot, isBSite, isIndexable, isNameable, isOfEClass
-
Constructor Details
-
PureBigraphComposite
Constructs a composable bigraph from the givenBigraph.The resulting instance is equipped with categorical operators such as composition and tensor product, enabling combination of two bigraphs.
This operational wrapper may only be applied to instances of
PureBigraph,ElementaryBigraph, or this class itself.The parameter type remains
Bigraphto allow composition ofPureBigraphs with other classes (e.g., elementary ones) without requiring casts or additional checks.- Parameters:
bigraph- the bigraph to be equipped with categorical operators
-
-
Method Details
-
getOuterBigraph
Function that makes the nodes disjunct in terms of there names. This is needed for composition.- Specified by:
getOuterBigraphin interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Returns:
- the outer bigraph of a composition
-
parallelProductOf
public BigraphComposite<S> parallelProductOf(Bigraph<S>... bigraphs) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphCompositeCompute the parallel product in a row.The
EMetaModelDataof the outer bigraph is used.- Specified by:
parallelProductOfin interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Parameters:
bigraphs- the bigraphs to juxtapose in the order the appear- Returns:
- the juxtaposed bigraph
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
juxtpositionOf
public BigraphComposite<S> juxtpositionOf(Bigraph<S>... bigraphs) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphCompositeCompute the tensor product in a row.The
EMetaModelDataof the outer bigraph is used.- Specified by:
juxtpositionOfin interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Parameters:
bigraphs- the bigraphs to juxtapose in the order the appear- Returns:
- the juxtaposed bigraph
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
parallelProduct
public BigraphComposite<S> parallelProduct(BigraphComposite<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphCompositeCompute the parallel product of two bigraphs. The parallel product is defined as tensor product, except it allows name sharing. So the tensor product can be seen as a special case of the parallel product.This implementation satisfies the "bifunctiorial property". The inner faces must not be disjoint here, as defined in previous works of Milner.
The
EMetaModelDataof the outer bigraph is used.- Specified by:
parallelProductin interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Parameters:
f- inner bigraph term for the parallel product- Returns:
- the parallel product of two bigraphs
- Throws:
IncompatibleSignatureException- if the signature of both bigraphs are not the sameIncompatibleInterfaceException- if the interfaces of both bigraphs are not appropriate for the operator
-
compose
public BigraphComposite<S> compose(BigraphComposite<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphCompositeComposes two bigraphs where a new immutable bigraph is created.The
EMetaModelDataof the outer bigraph is used.- Specified by:
composein interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Parameters:
f- the right part of the composition operator, i.e., the inner bigraph- Returns:
- a new bigraph composed of both arguments
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
nesting
public BigraphComposite<S> nesting(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphCompositeNesting operation for two bigraphs. It works like composition but with sharing of names. It is a derived operation and uses parallel and composition operations.- Specified by:
nestingin interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Parameters:
f- the inner bigraph- Returns:
- a new composed bigraph
- Throws:
IncompatibleSignatureException- if signatures do not matchIncompatibleInterfaceException- if both bigraphs have incompatible interface definitions
-
nesting
public BigraphComposite<S> nesting(BigraphComposite<S> inner) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphCompositeNesting operation for two bigraphs. It works like composition but with sharing of names. It is a derived operation and uses parallel and composition operations.- Specified by:
nestingin interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Parameters:
inner- the inner bigraph of typeBigraphComposite- Returns:
- a new composed bigraph
- Throws:
IncompatibleSignatureException- if signatures do not matchIncompatibleInterfaceException- if both bigraphs have incompatible interface definitions
-
juxtapose
public BigraphComposite<S> juxtapose(BigraphComposite<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphCompositeConvenient method forBigraphComposite.juxtapose(BigraphComposite).The
EMetaModelDataof the outer bigraph is used.- Specified by:
juxtaposein interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Parameters:
f- inner bigraph term for the juxtaposition- Returns:
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
parallelProduct
public BigraphComposite<S> parallelProduct(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphCompositeCompute the parallel product of two bigraphs. The parallel product is defined as tensor product, except it allows name sharing. So the tensor product can be seen as a special case of the parallel product.This implementation satisfies the "bifunctiorial property". The inner faces must not be disjoint here, as defined in previous works of Milner.
The
EMetaModelDataof the outer bigraph is used.- Specified by:
parallelProductin interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Parameters:
f- inner bigraph term for the parallel product- Returns:
- the parallel product of two bigraphs
- Throws:
IncompatibleSignatureException- if the signature of both bigraphs are not the sameIncompatibleInterfaceException- if the interfaces of both bigraphs are not appropriate for the operator
-
juxtapose
public BigraphComposite<S> juxtapose(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphCompositeCompute the tensor product of two bigraphs. The outer bigraph is the composite object itself. A new immutable bigraph is created and returned as aBigraphCompositeto be composed again.The
EMetaModelDataof the outer bigraph is used.- Specified by:
juxtaposein interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Parameters:
f- inner bigraph term for the juxtaposition- Returns:
- the juxtaposition of two bigraphs
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
merge
public BigraphComposite<S> merge(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException - Specified by:
mergein interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
merge
public BigraphComposite<S> merge(BigraphComposite<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException - Specified by:
mergein interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
compose
public BigraphComposite<S> compose(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphCompositeComposes two bigraphs where a new immutable bigraph is created.The
EMetaModelDataof the outer bigraph is used.- Specified by:
composein interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>> - Parameters:
f- the right part of the composition operator, i.e., the inner bigraph- Returns:
- a new bigraph composed of both arguments
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
assertSignaturesAreSame
protected void assertSignaturesAreSame(Bigraph<S> outer, Bigraph<S> inner) throws IncompatibleSignatureException - Throws:
IncompatibleSignatureException
-
getMetaModel
public org.eclipse.emf.ecore.EPackage getMetaModel()Description copied from interface:EcoreBigraphExtReturn the metamodel of a bigraph object or a signature object.It is a metamodel that either extends the base bigraph metamodel or the base signature metamodel.
- Specified by:
getMetaModelin interfaceEcoreBigraphExt- Returns:
- the metamodel in Ecore format
- See Also:
-
getInstanceModel
public org.eclipse.emf.ecore.EObject getInstanceModel()Description copied from interface:EcoreBigraphExtReturn the Ecore-based instance model of a bigraph object or signature object.- Specified by:
getInstanceModelin interfaceEcoreBigraphExt- Returns:
- the instance model in Ecore format
-