Class PureBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,?>>>
- Type Parameters:
S
- type of the signature.
- All Implemented Interfaces:
Bigraph<S>
,BigraphComposite<S>
,EcoreBigraph<S>
,EcoreBigraphExt
,HasSignature<S>
BigraphComposite
for pure bigraphs.
Equips the bigraph with some categorical operators to compute the product of two bigraphs. Operators can only be used by bigraphs of the same type and signature, except with 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
ConstructorDescriptionPureBigraphComposite
(Bigraph<S> bigraph) Constructor creates a composable bigraph from the given bigraph. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
assertSignaturesAreSame
(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.EObject
Return the Ecore-based instance model of a bigraph object or signature object.org.eclipse.emf.ecore.EPackage
Return 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, isPlacing
Methods 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, isParentOf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bigraphs.framework.core.Bigraph
getIncidentLinksOf, getInnerFace, getOuterFace, getSupport, isActive, isActiveAtNode, isActiveAtSite, isDiscrete, isEpimorphic, isGround, isGuarding, isLean, isMonomorphic, isPrime
Methods 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
Constructor creates a composable bigraph from the given bigraph. The bigraph is then equipped with some categorical operators, such as composition and tensor product, to compute the product of two bigraphs.This "operational wrapper" can only be used with and by instances with the superclass/superinterface of
PureBigraph
,ElementaryBigraph
, or this wrapper class itself.The type of the argument is still
Bigraph
becausePureBigraph
s can be composed with another classes to, for example, elementary ones. So we don't restrict the type here to not force casting or checking upon the developer.- Parameters:
bigraph
- the bigraph which is being 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:
getOuterBigraph
in 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:BigraphComposite
Compute the parallel product in a row.The
EMetaModelData
of the outer bigraph is used.- Specified by:
parallelProductOf
in interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,
?>>> - Parameters:
bigraphs
- the bigraphs to juxtapose in the order the appear- Returns:
- the juxtaposed bigraph
- Throws:
IncompatibleSignatureException
IncompatibleInterfaceException
-
juxtpositionOf
public BigraphComposite<S> juxtpositionOf(Bigraph<S>... bigraphs) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphComposite
Compute the tensor product in a row.The
EMetaModelData
of the outer bigraph is used.- Specified by:
juxtpositionOf
in interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,
?>>> - Parameters:
bigraphs
- the bigraphs to juxtapose in the order the appear- Returns:
- the juxtaposed bigraph
- Throws:
IncompatibleSignatureException
IncompatibleInterfaceException
-
parallelProduct
public BigraphComposite<S> parallelProduct(BigraphComposite<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphComposite
Compute 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
EMetaModelData
of the outer bigraph is used.- Specified by:
parallelProduct
in 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:BigraphComposite
Composes two bigraphs where a new immutable bigraph is created.The
EMetaModelData
of the outer bigraph is used.- Specified by:
compose
in 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:
IncompatibleSignatureException
IncompatibleInterfaceException
-
nesting
public BigraphComposite<S> nesting(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphComposite
Nesting 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:
nesting
in 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:BigraphComposite
Nesting 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:
nesting
in 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:BigraphComposite
Convenient method forBigraphComposite.juxtapose(BigraphComposite)
.The
EMetaModelData
of the outer bigraph is used.- Specified by:
juxtapose
in interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,
?>>> - Parameters:
f
- inner bigraph term for the juxtaposition- Returns:
- Throws:
IncompatibleSignatureException
IncompatibleInterfaceException
-
parallelProduct
public BigraphComposite<S> parallelProduct(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphComposite
Compute 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
EMetaModelData
of the outer bigraph is used.- Specified by:
parallelProduct
in 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:BigraphComposite
Compute the tensor product of two bigraphs. The outer bigraph is the composite object itself. A new immutable bigraph is created and returned as aBigraphComposite
to be composed again.The
EMetaModelData
of the outer bigraph is used.- Specified by:
juxtapose
in interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,
?>>> - Parameters:
f
- inner bigraph term for the juxtaposition- Returns:
- the juxtaposition of two bigraphs
- Throws:
IncompatibleSignatureException
IncompatibleInterfaceException
-
merge
public BigraphComposite<S> merge(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException - Specified by:
merge
in interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,
?>>> - Throws:
IncompatibleSignatureException
IncompatibleInterfaceException
-
merge
public BigraphComposite<S> merge(BigraphComposite<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException - Specified by:
merge
in interfaceBigraphComposite<S extends AbstractEcoreSignature<? extends Control<?,
?>>> - Throws:
IncompatibleSignatureException
IncompatibleInterfaceException
-
compose
public BigraphComposite<S> compose(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Description copied from interface:BigraphComposite
Composes two bigraphs where a new immutable bigraph is created.The
EMetaModelData
of the outer bigraph is used.- Specified by:
compose
in 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:
IncompatibleSignatureException
IncompatibleInterfaceException
-
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:EcoreBigraphExt
Return 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:
getMetaModel
in interfaceEcoreBigraphExt
- Returns:
- the metamodel in Ecore format
- See Also:
-
de.tudresden.inf.st.bigraphs.models.bigraphBaseModel.BigraphBaseModelPackage
-
getInstanceModel
public org.eclipse.emf.ecore.EObject getInstanceModel()Description copied from interface:EcoreBigraphExt
Return the Ecore-based instance model of a bigraph object or signature object.- Specified by:
getInstanceModel
in interfaceEcoreBigraphExt
- Returns:
- the instance model in Ecore format
-