Package org.bigraphs.framework.core
Interface BigraphComposite<S extends Signature<? extends Control<?,?>>>
- Type Parameters:
S- the signature type
- All Known Implementing Classes:
BigraphCompositeSupport,PureBigraphComposite
Generic interface for composing bigraphs.
Current implementation:
PureBigraphCompositefor pure bigraphs
- Author:
- Dominik Grzelak
-
Method Summary
Modifier and TypeMethodDescriptionComposes two bigraphs where a new immutable bigraph is created.compose(BigraphComposite<S> inner) Composes two bigraphs where a new immutable bigraph is created.Return the outer bigraph of a composition, that is, the left part of the operator (i.e., outer bigraph).Compute the tensor product of two bigraphs.Convenient method forjuxtapose(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.
-
Method Details
-
getOuterBigraph
Return the outer bigraph of a composition, that is, the left part of the operator (i.e., outer bigraph).- Returns:
- the outer bigraph of a composition
-
compose
BigraphComposite<S> compose(Bigraph<S> inner) throws IncompatibleSignatureException, IncompatibleInterfaceException Composes two bigraphs where a new immutable bigraph is created.The
EMetaModelDataof the outer bigraph is used.- Parameters:
inner- the right part of the composition operator, i.e., the inner bigraph- Returns:
- a new bigraph composed of both arguments
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
compose
BigraphComposite<S> compose(BigraphComposite<S> inner) throws IncompatibleSignatureException, IncompatibleInterfaceException Composes two bigraphs where a new immutable bigraph is created.The
EMetaModelDataof the outer bigraph is used.- Parameters:
inner- the right part of the composition operator, i.e., the inner bigraph- Returns:
- a new bigraph composed of both arguments
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
nesting
BigraphComposite<S> nesting(Bigraph<S> inner) throws IncompatibleSignatureException, IncompatibleInterfaceException 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.- Parameters:
inner- the inner bigraph- Returns:
- a new composed bigraph
- Throws:
IncompatibleSignatureException- if signatures do not matchIncompatibleInterfaceException- if both bigraphs have incompatible interface definitions
-
nesting
BigraphComposite<S> nesting(BigraphComposite<S> inner) throws IncompatibleSignatureException, IncompatibleInterfaceException 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.- 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
BigraphComposite<S> juxtapose(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Compute 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.- Parameters:
f- inner bigraph term for the juxtaposition- Returns:
- the juxtaposition of two bigraphs
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
juxtapose
BigraphComposite<S> juxtapose(BigraphComposite<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException Convenient method forjuxtapose(BigraphComposite).The
EMetaModelDataof the outer bigraph is used.- Parameters:
f- inner bigraph term for the juxtaposition- Returns:
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
parallelProduct
BigraphComposite<S> parallelProduct(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException 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
EMetaModelDataof the outer bigraph is used.- 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
-
parallelProduct
BigraphComposite<S> parallelProduct(BigraphComposite<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException 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
EMetaModelDataof the outer bigraph is used.- 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
-
merge
BigraphComposite<S> merge(Bigraph<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException -
merge
BigraphComposite<S> merge(BigraphComposite<S> f) throws IncompatibleSignatureException, IncompatibleInterfaceException -
parallelProductOf
BigraphComposite<S> parallelProductOf(Bigraph<S>... bigraphs) throws IncompatibleSignatureException, IncompatibleInterfaceException Compute the parallel product in a row.The
EMetaModelDataof the outer bigraph is used.- Parameters:
bigraphs- the bigraphs to juxtapose in the order the appear- Returns:
- the juxtaposed bigraph
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-
juxtpositionOf
BigraphComposite<S> juxtpositionOf(Bigraph<S>... bigraphs) throws IncompatibleSignatureException, IncompatibleInterfaceException Compute the tensor product in a row.The
EMetaModelDataof the outer bigraph is used.- Parameters:
bigraphs- the bigraphs to juxtapose in the order the appear- Returns:
- the juxtaposed bigraph
- Throws:
IncompatibleSignatureExceptionIncompatibleInterfaceException
-