Package org.bigraphs.grgen.converter
Class RuleTransformer
java.lang.Object
org.bigraphs.grgen.converter.TransformerSupport
org.bigraphs.grgen.converter.RuleTransformer
- All Implemented Interfaces:
BaseTransformer<org.bigraphs.framework.core.reactivesystem.ReactionRule<?>>
- Direct Known Subclasses:
PureGroundRuleTransformer
,PureParametrizedRuleTransformer
public abstract class RuleTransformer
extends TransformerSupport
implements BaseTransformer<org.bigraphs.framework.core.reactivesystem.ReactionRule<?>>
- Author:
- Dominik Grzelak
-
Field Summary
Modifier and TypeFieldDescription(package private) boolean
final String
A generic piece of GrGen.NET code used within a rule specification.final String
A GrGen.NET pattern specifying a NAC (for atomic controls, or nodes in the rule not containing a site).protected org.bigraphs.framework.core.reactivesystem.TrackingMap
Fields inherited from class org.bigraphs.grgen.converter.TransformerSupport
DEFAULT_WHITESPACE_CHAR, LINE_SEP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bigraphs.framework.core.reactivesystem.TrackingMap
boolean
printNACPattern
(boolean printNACPattern) Determine, whether to generate also the GrGen.NET pattern (TEMPLATE_NAC_NO_SITE_PATTERN
) for each rule.abstract String
toString
(org.bigraphs.framework.core.reactivesystem.ReactionRule<?> element) Redirects the result of an encoding to a stringtrackIdentityOf
(String nodeId) BaseTransformer<org.bigraphs.framework.core.reactivesystem.ReactionRule<?>>
withMap
(org.bigraphs.framework.core.reactivesystem.TrackingMap trackingMap) Supply a tracking map for the current rule instance.Methods inherited from class org.bigraphs.grgen.converter.TransformerSupport
assertCorrectClassType, assertPrimeAndGround, closeBlock, closeClassDefinition, closeClassDefinitionWithAttributes, createAbstractEdgeClass, createAbstractNodeClass, createEdge, createEdgeClass, createGraphlet, createNodeClass, createNodeInstance, createNodeInstance, createVarTypeDecl, createVarTypeDeclWithComma, createVarTypeDeclWithComma, extendClass, nodeTypeOf, openRuleModifierBlock, openRuleReplaceBlock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bigraphs.grgen.converter.BaseTransformer
createNameSupplier, toOutputStream
-
Field Details
-
trackingMap
protected org.bigraphs.framework.core.reactivesystem.TrackingMap trackingMap -
printNACPattern
boolean printNACPattern -
TEMPLATE_NAC_NO_SITE_PATTERN
A GrGen.NET pattern specifying a NAC (for atomic controls, or nodes in the rule not containing a site).- See Also:
-
TEMPLATE_COPY_SITE_CONTENTS
A generic piece of GrGen.NET code used within a rule specification. It is used to handle the copies of graph substructures determined by the bigraphical sites of a rule.- See Also:
-
-
Constructor Details
-
RuleTransformer
public RuleTransformer()
-
-
Method Details
-
withMap
public BaseTransformer<org.bigraphs.framework.core.reactivesystem.ReactionRule<?>> withMap(org.bigraphs.framework.core.reactivesystem.TrackingMap trackingMap) Supply a tracking map for the current rule instance.- Parameters:
trackingMap
- a tracking map.- Returns:
- this instance
-
isPrintNACPattern
public boolean isPrintNACPattern() -
printNACPattern
Determine, whether to generate also the GrGen.NET pattern (TEMPLATE_NAC_NO_SITE_PATTERN
) for each rule. Useful, when multiple bigraphical rules have to be translated. Then, the pattern (TEMPLATE_NAC_NO_SITE_PATTERN
) can be omitted for all rules but one.- Parameters:
printNACPattern
- true or false, whether to output it or not.- Returns:
- this instance
-
createMap
public static org.bigraphs.framework.core.reactivesystem.TrackingMap createMap() -
toString
Description copied from interface:BaseTransformer
Redirects the result of an encoding to a string- Specified by:
toString
in interfaceBaseTransformer<org.bigraphs.framework.core.reactivesystem.ReactionRule<?>>
- Parameters:
element
- the bigraph or signature being encoded
-
trackIdentityOf
-