public abstract class AbstractOCLAnalyzer<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> extends AbstractAnalyzer
AbstractOCLAnalyzer supports semantic analysis of a CST
produced by an AbstractOCLParser to create the Essential OCL
AST. It is necessary that syntactic parsing and semantic analysis are
performed in two steps because LPG is a bottom up parser and cannot provide
enough contextual information to create the AST on the first pass.
Derived classes should extend the abstract support for EssentialOCL to full
support for whatever language in which EssentialOCL is embedded.| Modifier and Type | Field and Description |
|---|---|
protected EnvironmentFactory<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
environmentFactory |
static String |
IMPLICIT_SET_CONVERSION
When a detail with this key is in an annotation with URI
Environment.OCL_NAMESPACE_URI on a CollectionLiteralExp,
this means that the collection literal was created by the analyzer
implicitly for a -> set conversion. |
static String |
OCL_ANNOTATIONS_URI |
protected OCLFactory |
oclFactory |
protected UMLReflection<PK,C,O,P,EL,PM,S,COA,SSA,CT> |
uml |
| Constructor and Description |
|---|
AbstractOCLAnalyzer(AbstractOCLParser parser) |
| Modifier and Type | Method and Description |
|---|---|
protected List<OCLExpression<C>> |
argumentsCS(OperationCallExpCS operationCallExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env) |
protected OCLExpression<C> |
arrowOperationCallExpCS(OperationCallExpCS operationCallExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
OperationCallExpCS for an ->
|
protected BooleanLiteralExp<C> |
booleanLiteralExpCS(BooleanLiteralExpCS booleanLiteralExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
BooleanLiteralExpCS
|
protected void |
checkNotReflexive(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
String rule,
AssociationClassCallExp<C,P> acc)
Asserts that the specified association class is not a reflexive
association.
|
protected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
classifierContextDeclCS(ClassifierContextDeclCS classifierContextDeclCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
List<CT> constraints)
ClassifierContextDeclCS
|
protected CollectionLiteralExp<C> |
collectionLiteralExpCS(CollectionLiteralExpCS collectionLiteralExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
CollectionLiteralExpCS
|
protected CollectionLiteralPart<C> |
collectionLiteralPartCS(CollectionLiteralPartCS collectionLiteralPartCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
CollectionLiteralPartCS
|
protected C |
collectionTypeCS(CollectionTypeCS collectionTypeCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
CollectionTypeCS
|
protected CollectionKind |
collectionTypeIdentifierCS(CollectionTypeIdentifierEnum collectionTypeIdentifier)
CollectionTypeIdentifierCS
|
protected void |
contextDeclCS(ContextDeclCS contextDeclCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
List<CT> constraints)
ContextDeclCS
|
protected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createClassifierContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
ClassifierContextDeclCS classifierContextDeclCS,
C classifier) |
protected CT |
createConstraint()
Creates an Constraint instance.
|
protected InvalidLiteralExp<C> |
createDummyInvalidLiteralExp()
Deprecated.
Use the
createDummyInvalidLiteralExp(Environment, CSTNode)
method, instead |
protected InvalidLiteralExp<C> |
createDummyInvalidLiteralExp(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
CSTNode cstNode)
Creates a dummy expression of invalid-literal type to be a placeholder
for a (sub)expression that could not be parsed.
|
protected C |
createDummyInvalidType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
CSTNode cstNode,
String message)
Return the type used to terminate the AST reference from cstNode that
failed to be resolved due to message.
|
protected Object |
createDummyPackage(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
PackageDeclarationCS packageDeclarationCS)
Return the package used to terminate the AST reference from an implicit
PackageDeclarationCS.
|
protected ExpressionInOCL<C,PM> |
createExpressionInOCL()
Creates an ExpressionInOcl instance.
|
protected IteratorExp<C,PM> |
createImplicitCollect(OCLExpression<C> source,
FeatureCallExp<C> propertyCall,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
CSTNode cstNode)
Creates an implicit
collect iterator expression for a
property call on a collection-type source expression. |
protected OCLExpression<C> |
createImplicitSource(OperationCallExpCS operationCallExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
List<OCLExpression<C>> args) |
protected OCLFactory |
createOCLFactory(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
Creates/obtains the
OCLFactory that I use to create OCL AST
elements. |
protected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createOperationContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
OperationContextDeclCS operationContextCS,
O operation) |
protected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createPackageContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent,
List<String> packageName) |
protected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createPropertyContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
PropertyContextCS propertyContextCS,
P property) |
static <any> |
createSequenceOfNames(PathNameCS pathNameCS,
SimpleNameCS simpleNameCS) |
protected VariableExp<C,PM> |
createVariableExp(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
CSTNode cst,
Variable<C,PM> var)
Creates a variable expression with the variable that it references.
|
protected CT |
defCS(DefCS defCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
DefCS
|
protected void |
documentCS(OCLDocumentCS documentCS,
List<CT> constraints)
Analyzes a top-level document CS.
|
static boolean |
equalName(String name,
String elementName)
Checks whether the names are equal, accounting for possibility of
underscore-escaped names.
|
protected OperationCallExp<C,O> |
genOperationCallExp(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
OperationCallExpCS operationCallExpCS,
String rule,
String operName,
OCLExpression<C> source,
C ownerType,
List<OCLExpression<C>> args)
Generate an OperationCallExp node.
|
protected Variable<C,PM> |
genVariableDeclaration(CSTNode cstNode,
String rule,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
String name,
C type,
OCLExpression<C> initExp,
boolean explicitFlag,
boolean addToEnvironment,
boolean isSelf)
Generate a VariableDeclaration AST node, and add it to the environment.
|
AbstractOCLParser |
getAbstractParser()
Obtains the parser that I use to transform the OCL text into the Concrete
Syntax Model.
|
protected C |
getBagType(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C elementType) |
protected C |
getBoolean() |
protected CollectionKind |
getCollectionKind(C possibleCollectionType) |
protected OCLExpression<C> |
getCollectionSourceExpression(OCLExpressionCS oclExpressionCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
OCLExpressionCS
|
protected C |
getCollectionType(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
CollectionKind kind,
C elementType)
Obtains the current environment's representation of the collection type
of the specified kind on the given element type.
|
protected C |
getCollectionType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
CollectionKind kind,
C elementType)
Deprecated.
Since 1.3, use the
getCollectionType(CSTNode, Environment, CollectionKind, Object)
method, instead. |
protected C |
getCommonSuperType(CSTNode cstNode,
String rule,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C type1,
C type2) |
protected C |
getElementType(C possibleCollectionType) |
protected OCLExpression<C> |
getLoopBody(OCLExpression<C> expr) |
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
getOCLEnvironment() |
protected C |
getOCLType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
Object metaElement) |
protected C |
getOclVoid() |
protected C |
getOperationMessageType(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
O operation) |
protected C |
getOrderedSetType(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C elementType) |
AbstractOCLParser |
getParser()
Obtains my parser.
|
protected C |
getPropertyType(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C owner,
P property)
Obtains the type, in the current environment, of the specified property.
|
protected C |
getSequenceType(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C elementType) |
protected C |
getSetType(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C elementType) |
protected C |
getSignalMessageType(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C signal) |
protected OCLStandardLibrary<C> |
getStandardLibrary() |
protected C |
getTupleType(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
<any> parts) |
protected C |
getTypeType(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C type) |
protected IfExp<C> |
ifExpCS(IfExpCS ifExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
IfExpCS
|
protected void |
initASTMapping(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
Object astNode,
CSTNode cstNode)
Initialize the symmetric mapping of an object (typically an astNode) to
its originating cstNode, so that AST-based analysis may report error
messages exploiting the CST context, or to support incremental AST/CST
update.
|
protected void |
initASTMapping(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
Object fromAstNode,
CSTNode cstNode,
Object toAstNode)
Initialize the asymmetric mapping of an object (typically an astNode) to
its originating cstNode, and of a cstNode to its consequent object
(typically an astNode) so that AST-based analysis may report error
messages exploiting the CST context, or to support incremental AST/CST
update.
|
protected CT |
initOrDerValueCS(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
InitOrDerValueCS initOrDerValueCS)
InitOrDerValueCS
|
protected IntegerLiteralExp<C> |
integerLiteralExpCS(IntegerLiteralExpCS integerLiteralExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
IntegerLiteralExpCS
|
protected InvalidLiteralExp<C> |
invalidLiteralExpCS(InvalidLiteralExpCS invalidLiteralExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
InvalidLiteralExpCS
|
protected CT |
invCS(InvCS invCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
InvCS
|
protected CT |
invOrDefCS(InvOrDefCS invOrDefCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
InvOrDefCS
|
protected boolean |
isAtPre(FeatureCallExpCS callExp)
Queries whether the specified call expression is adorned with
@pre.
|
protected boolean |
isAtPre(VariableExpCS callExp)
Queries whether the specified variable expression is adorned with
@pre.
|
protected boolean |
isErrorNode(TypedElement<C> expr)
Queries whether the specified expression is a placeholder that was
created for an expression that failed to parse.
|
static boolean |
isEscaped(String name)
Queries whether the specified name is escaped with an initial underscore
(
'_') character. |
static boolean |
isIdentifierOrKeyword(int tokenKind)
Returns true if the token kind is an identifier or keyword, otherwise
false.
|
protected IterateExp<C,PM> |
iterateExpCS(IterateExpCS iterateExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
IterateExpCS
|
protected IteratorExp<C,PM> |
iteratorExpCS(IteratorExpCS iteratorExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
IteratorExpCS
|
protected OCLExpression<C> |
letExp(LetExpCS letExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
LetExpCS
|
protected LetExp<C,PM> |
letExpCS(LetExpCS letExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
Deprecated.
Since 1.3, use
letExp(LetExpCS, Environment),
instead. |
protected OCLExpression<C> |
letExpCSRecursive(LetExpCS letExpCS,
int index,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
Constructs the LetExp
|
protected OCLExpression<C> |
literalExpCS(LiteralExpCS literalExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
LiteralExpCS
|
protected C |
lookupAssociationClassReference(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C owner,
String name) |
protected C |
lookupClassifier(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
List<String> className) |
protected Variable<C,PM> |
lookupImplicitSourceForOperation(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
List<OCLExpression<C>> args,
String operationName) |
protected O |
lookupOperation(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C owner,
String name,
List<? extends TypedElement<C>> args) |
protected P |
lookupProperty(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C owner,
String name) |
protected C |
lookupSignal(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C owner,
String name,
List<? extends TypedElement<C>> args) |
protected S |
lookupState(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C sourceType,
List<String> statePath) |
protected LoopExp<C,PM> |
loopExpCS(LoopExpCS loopExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
LoopExpCS
|
protected void |
markAsErrorNode(TypedElement<C> expr)
Marks the specified (sub)expression as a placeholder for an expression
that could not be parsed.
|
protected OCLExpression<C> |
messageExpCS(MessageExpCS messageExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
MessageExpCS
|
protected OCLExpression<C> |
modelPropertyCallExpCS(FeatureCallExpCS modelPropertyCallExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
ModelPropertyCallExpCS
|
protected NullLiteralExp<C> |
nullLiteralExpCS(NullLiteralExpCS nullLiteralExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
NullLiteralExpCS
|
protected OCLExpression<C> |
oclExpressionCS(OCLExpressionCS oclExpressionCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
OCLExpressionCS
|
protected OCLExpression<C> |
oclIsInStateOperationCallExpCS(OperationCallExpCS operationCallExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
OperationCallExpCS for oclIsInState
|
protected OCLExpression<C> |
operationCallExpCS(OperationCallExpCS operationCallExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
OperationCallExpCS
|
protected void |
operationContextDeclCS(OperationContextDeclCS operationContextDeclCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
List<CT> constraints)
OperationContextDeclCS
|
protected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
operationCS(OperationCS operationCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
OperationCS
|
protected String |
operationString(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
String operName,
List<? extends TypedElement<C>> args)
Constructs the string representation of an operation call.
|
protected void |
packageDeclarationCS(PackageDeclarationCS packageDeclarationCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
List<CT> constraints)
Analyzes a package declaration in the context of the environment created
for an
OCLDocumentCS. |
protected void |
packageDeclarationCS(PackageDeclarationCS packageDeclarationCS,
List<CT> constraints)
Parses a top-level package declaration that is not nested in an
OCLDocumentCS. |
protected List<Variable<C,PM>> |
parametersCS(List<VariableCS> parameters,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
ParametersCS
|
protected CT |
prePostOrBodyDeclCS(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
PrePostOrBodyDeclCS prePostOrBodyDeclCS)
PrePostOrBodyDeclCS
|
protected LiteralExp<C> |
primitiveLiteralExpCS(PrimitiveLiteralExpCS primitiveLiteralExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
PrimitiveLiteralExpCS
|
protected C |
primitiveTypeCS(SimpleTypeEnum simpleType,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
PrimitiveTypeCS
|
protected OCLExpression<C> |
propertyCallExpCS(CallExpCS propertyCallExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
PropertyCallExpCS
|
protected P |
propertyContextCS(PropertyContextCS propertyContextCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
List<CT> constraints)
PropertyContextCS
|
protected List<OCLExpression<C>> |
qualifiersCS(List<OCLExpressionCS> arguments,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
OCLExpression<C> navigation)
QualifiersCS
|
protected RealLiteralExp<C> |
realLiteralExpCS(RealLiteralExpCS realLiteralExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
RealLiteralExpCS
|
protected void |
resolveIteratorOperation(SimpleNameCS simpleNameCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
Ovverridden by subclasses to assign the AST Operation target for an
iterator reference from the CST.
|
protected void |
setQualifiers(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
String rule,
NavigationCallExp<C,P> nc,
List<OCLExpression<C>> qualifiers)
Sets the specified navigation call's qualifiers, if they are compatible
with the navigated association end or association class.
|
protected AssociationClassCallExp<C,P> |
simpleAssociationClassName(SimpleNameCS simpleNameCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
OCLExpression<C> source,
C owner,
String simpleName)
Attempts to parse a simpleNameCS as an association-class call
expression.
|
protected OCLExpression<C> |
simpleNameCS(SimpleNameCS simpleNameCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
OCLExpression<C> source)
Parses a simpleNameCS token.
|
protected NavigationCallExp<C,P> |
simpleNavigationName(SimpleNameCS simpleNameCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
OCLExpression<C> source,
C owner,
String simpleName)
Allows subclasses to return calls that are not necessarily a
PropertyCallExp but some
other NavigationCallExp. |
protected PropertyCallExp<C,P> |
simplePropertyName(SimpleNameCS simpleNameCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
OCLExpression<C> source,
C owner,
String simpleName)
Attempts to parse a simpleNameCS as a property call expression.
|
protected TypeExp<C> |
simpleTypeName(SimpleNameCS simpleNameCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
OCLExpression<C> source,
C classifier,
String simpleName)
Attempts to parse a simpleNameCS as a type expression.
|
protected OCLExpression<C> |
simpleUndefinedName(SimpleNameCS simpleNameCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
OCLExpression<C> source,
String simpleName)
The error case for simpleNameCS, which is called when the name
cannot be resolved to any suitable expression.
|
protected VariableExp<C,PM> |
simpleVariableName(SimpleNameCS simpleNameCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
OCLExpression<C> source,
String simpleName)
Attempts to parse a simpleNameCS as a variable expression.
|
protected StateExp<C,S> |
stateExpCS(OCLExpression<C> source,
CSTNode stateExpCS,
<any> statePath,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
stateExpCS
|
protected OCLExpression<C> |
staticOperationCallExpCS(OperationCallExpCS operationCallExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env) |
protected StringLiteralExp<C> |
stringLiteralExpCS(StringLiteralExpCS stringLiteralExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
StringLiteralExpCS
|
protected TupleLiteralExp<C,P> |
tupleLiteralExpCS(TupleLiteralExpCS tupleLiteralExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
TupleLiteralExpCS
|
protected TupleLiteralPart<C,P> |
tupleLiteralPartCS(VariableCS variableDeclarationCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
tupleLiteralPartCS
|
protected <any> |
tupleLiteralPartListCS(List<VariableCS> variableDeclarations,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
tupleLiteralPartListCS
|
protected C |
tupleTypeCS(TupleTypeCS tupleTypeCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
TupleTypeCS
|
protected TypeExp<C> |
typeCS(CSTNode cstNode,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
C type)
EnumLiteralExpCS
|
protected C |
typeCS(TypeCS typeCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
TypeCS
|
static String |
unescape(String name)
Obtains the unescaped name (assuming that it
is escaped) for another attempt to look
it up.
|
protected UnlimitedNaturalLiteralExp<C> |
unlimitedNaturalLiteralExpCS(UnlimitedNaturalLiteralExpCS unlimitedNaturalLiteralExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
UnlimitedNaturalLiteralExpCS
|
protected Variable<C,PM> |
variableDeclarationCS(VariableCS variableDeclarationCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
boolean addToEnvironment)
VariableDeclarationCS
|
protected List<Variable<C,PM>> |
variableDeclarationListCS(List<VariableCS> variableDeclarationCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
boolean addToEnvironment)
VariableDeclarationListCS
|
protected OCLExpression<C> |
variableExpCS(VariableExpCS variableExpCS,
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
VariableExpCS
|
computeInputString, dumpTokens, ERROR, ERROR, ERROR, formatClass, formatEClassName, formatName, formatPath, formatPath, formatQualifiedName, formatString, formatType, getCharOffset, getEnvironment, getFormatter, getLexer, getTraceFlag, initialize, initialize, initPropertyPositions, initStartEndPositions, initTypePositions, makeName, makeString, reset, reset, setCharacterOffset, setFileName, setTab, setTraceFlag, TRACE, TRACEpublic static final String OCL_ANNOTATIONS_URI
public static final String IMPLICIT_SET_CONVERSION
Environment.OCL_NAMESPACE_URI on a CollectionLiteralExp,
this means that the collection literal was created by the analyzer
implicitly for a -> set conversion. In this case,
if the single item evaluates to null it must not be
added to the resulting collection by an evaluator.protected OCLFactory oclFactory
public AbstractOCLAnalyzer(AbstractOCLParser parser)
protected OCLFactory createOCLFactory(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
OCLFactory that I use to create OCL AST
elements.env - my OCL environmentpublic AbstractOCLParser getAbstractParser()
AbstractAnalyzergetAbstractParser in class AbstractAnalyzerpublic AbstractOCLParser getParser()
AbstractAnalyzergetParser in class AbstractAnalyzerprotected C getBoolean()
protected C getOclVoid()
protected OCLStandardLibrary<C> getStandardLibrary()
public static boolean isIdentifierOrKeyword(int tokenKind)
tokenKind - the token kind to compareprotected String operationString(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, String operName, List<? extends TypedElement<C>> args)
operName - the operation nameargs - the arguments in the operation callprotected void setQualifiers(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, String rule, NavigationCallExp<C,P> nc, List<OCLExpression<C>> qualifiers)
rule - the rule name that parsed the qualifiersnc - the navigation call expressionqualifiers - the qualifiers to setprotected void checkNotReflexive(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, String rule, AssociationClassCallExp<C,P> acc)
env - the current environmentrule - the rule that we are matchingacc - the association class call expressioncstNode - context of the callprotected Variable<C,PM> genVariableDeclaration(CSTNode cstNode, String rule, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, String name, C type, OCLExpression<C> initExp, boolean explicitFlag, boolean addToEnvironment, boolean isSelf)
protected OperationCallExp<C,O> genOperationCallExp(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, OperationCallExpCS operationCallExpCS, String rule, String operName, OCLExpression<C> source, C ownerType, List<OCLExpression<C>> args)
env - the current environmentoperationCallExpCS - the operation call CST noderule - the name of the concrete syntax rule that we are processingoperName - the operation namesource - the operation's source expressionownerType - the type that defines the operation, in which we will look it
up. This can differ from the type of the source expression in
the case of an implicit collect iteratorargs - the operation argumentsprotected void documentCS(OCLDocumentCS documentCS, List<CT> constraints)
documentCS - the documentconstraints - the constraints list to populateprotected void packageDeclarationCS(PackageDeclarationCS packageDeclarationCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, List<CT> constraints)
OCLDocumentCS.packageDeclarationCS - the package declaration to analyzeenv - the OCL document environment in which to analyze itconstraints - the constraints list to populateprotected void packageDeclarationCS(PackageDeclarationCS packageDeclarationCS, List<CT> constraints)
OCLDocumentCS.packageDeclarationCS - the package declarationconstraints - the constraints list to populateprotected void contextDeclCS(ContextDeclCS contextDeclCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, List<CT> constraints)
contextDeclCS - the ContextDeclCS CSTNodeenv - the package environmentconstraints - the constraints list to populateprotected void operationContextDeclCS(OperationContextDeclCS operationContextDeclCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, List<CT> constraints)
operationContextDeclCS - the OperationContextDeclCS CSTNodeenv - the package environmentconstraints - the constraints list to populateprotected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> operationCS(OperationCS operationCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
operationCS - the OperationCS CSTNodeenv - the classifier context environmentnull if the
operation could not be resolvedprotected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createOperationContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, OperationContextDeclCS operationContextCS, O operation)
protected List<Variable<C,PM>> parametersCS(List<VariableCS> parameters, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
parameters - the list of parameters as VariableDeclarationCS
objectsenv - the OCL expressionVariableDeclarationsprotected CT prePostOrBodyDeclCS(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, PrePostOrBodyDeclCS prePostOrBodyDeclCS)
prePostOrBodyDeclCS - the PrePostOrBodyDeclCS CSTNodeenv - the OCL environmentoperation - the context EOperationConstraintprotected P propertyContextCS(PropertyContextCS propertyContextCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, List<CT> constraints)
propertyContextCS - the PropertyContextCS CSTNodeenv - the package environmentconstraints - the constraints list to populatenull if it could not be
resolvedprotected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createPropertyContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, PropertyContextCS propertyContextCS, P property)
protected CT initOrDerValueCS(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, InitOrDerValueCS initOrDerValueCS)
initOrDerValueCS - the InitOrDerValueCS CSTNodeenv - the OCL environmentproperty - the context EStructuralFeatureConstraintprotected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> classifierContextDeclCS(ClassifierContextDeclCS classifierContextDeclCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, List<CT> constraints)
classifierContextDeclCS - the ClassifierContextDeclCS CSTNodeenv - the package environmentconstraints - the constraints list to populatethe - classifier context environment, or null of the
classifier could not be resolvedprotected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createClassifierContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, ClassifierContextDeclCS classifierContextDeclCS, C classifier)
protected CT invOrDefCS(InvOrDefCS invOrDefCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
invOrDefCS - the InvOrDefCS CSTNodeenv - the OCL environmentConstraintprotected CT invCS(InvCS invCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
invCS - the InvCS CSTNodeenv - the OCL environmentConstraintprotected CT defCS(DefCS defCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
defCS - the DefCS CSTNodeenv - the OCL environmentConstraintprotected Variable<C,PM> variableDeclarationCS(VariableCS variableDeclarationCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, boolean addToEnvironment)
variableDeclarationCS - the VariableDeclarationCS CSTNodeenv - the OCL environmentaddToEnvironment - boolean whether or not to add the the parsed variable to the
environmentVariableDeclarationprotected List<Variable<C,PM>> variableDeclarationListCS(List<VariableCS> variableDeclarationCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, boolean addToEnvironment)
variableDeclarationCS - list of VariableDeclarationCSsenv - the OCL environmentaddToEnvironment - boolean whether or not to add the the parsed variable to the
environmentVariableDeclarationsprotected C typeCS(TypeCS typeCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
typeCS - the TypeCS CSTNodeenv - the OCL environmentEClassifier representing the typeprotected StateExp<C,S> stateExpCS(OCLExpression<C> source, CSTNode stateExpCS, <any> statePath, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
source - the source expression of the oclIsInState operationstateExpCS - the StateExpCS CSTNodeenv - the OCL environmentStateExp representing the stateprotected C collectionTypeCS(CollectionTypeCS collectionTypeCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
collectionTypeCS - the CollectionTypeCS CSTNodeenv - the OCL environmentEClassifier representing the collection typeprotected CollectionKind collectionTypeIdentifierCS(CollectionTypeIdentifierEnum collectionTypeIdentifier)
collectionTypeIdentifier - the CollectionTypeIdentifierEnum representing the
collection typeCollectionTypeprotected C tupleTypeCS(TupleTypeCS tupleTypeCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
tupleTypeCS - the TupleTypeCS CSTNodeenv - the OCL environmentTupleTypeCSprotected OCLExpression<C> oclExpressionCS(OCLExpressionCS oclExpressionCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
oclExpressionCS - the OCLExpressionCS CSTNodeenv - the OCL environmentOCLExpressionprotected OCLExpression<C> variableExpCS(VariableExpCS variableExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
variableExpCS - the VariableExpCS CSTNodeenv - the OCL environmentOCLExpressionprotected boolean isAtPre(FeatureCallExpCS callExp)
callExp - a call expressionprotected boolean isAtPre(VariableExpCS callExp)
variableExp - a variable expressionprotected VariableExp<C,PM> createVariableExp(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, CSTNode cst, Variable<C,PM> var)
env - the current parsing environmentcst - the concrete syntax that produces the variable expressionvar - the referred variableprotected List<OCLExpression<C>> qualifiersCS(List<OCLExpressionCS> arguments, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, OCLExpression<C> navigation)
arguments - the OCLExpressionCS arguments listenv - the OCL environmentnavigation - OCLExpressions listprotected IfExp<C> ifExpCS(IfExpCS ifExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
ifExpCS - the IfExpCS CSTNodeenv - the OCL environmentIfExpCS@Deprecated protected LetExp<C,PM> letExpCS(LetExpCS letExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
letExp(LetExpCS, Environment),
instead.letExpCS - the LetExpCS CSTNodeenv - the OCL environmentLetExpCSprotected OCLExpression<C> letExp(LetExpCS letExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
letExpCS - the LetExpCS CSTNodeenv - the OCL environmentLetExpCSprotected OCLExpression<C> letExpCSRecursive(LetExpCS letExpCS, int index, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
letExpCS - the LetExpCS CSTNodeindex - the index of the VariableDeclarationCS to parseenv - the OCL environmentOCLExpressionprotected OCLExpression<C> simpleNameCS(SimpleNameCS simpleNameCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, OCLExpression<C> source)
simpleNameCS - the simpleNameCS CSTNodeenv - the OCL environmentsource - the source of the simpleNameCSOCLExpressionsimpleAssociationClassName(SimpleNameCS, Environment,
OCLExpression, Object, String),
simplePropertyName(SimpleNameCS, Environment, OCLExpression,
Object, String),
simpleTypeName(SimpleNameCS, Environment, OCLExpression, Object,
String),
simpleVariableName(SimpleNameCS, Environment, OCLExpression,
String),
simpleUndefinedName(SimpleNameCS, Environment, OCLExpression,
String)protected AssociationClassCallExp<C,P> simpleAssociationClassName(SimpleNameCS simpleNameCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, OCLExpression<C> source, C owner, String simpleName)
simpleNameCS - the simple nameenv - the current environmentsource - the navigation source expression, or null if the
source is implicitowner - the owner of the association-class end to be navigated, or
null if the source is implicitsimpleName - the simple name, as a stringnull if the
simple name does not resolve to a related association classsimpleNameCS(SimpleNameCS, Environment, OCLExpression)protected NavigationCallExp<C,P> simpleNavigationName(SimpleNameCS simpleNameCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, OCLExpression<C> source, C owner, String simpleName)
PropertyCallExp but some
other NavigationCallExp.protected PropertyCallExp<C,P> simplePropertyName(SimpleNameCS simpleNameCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, OCLExpression<C> source, C owner, String simpleName)
simpleNameCS - the simple nameenv - the current environmentsource - the navigation source expression, or null if the
source is implicitowner - the owner of the property to be navigated, or
null if the source is implicitsimpleName - the simple name, as a stringnull if the simple name
does not resolve to an available propertysimpleNameCS(SimpleNameCS, Environment, OCLExpression)protected TypeExp<C> simpleTypeName(SimpleNameCS simpleNameCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, OCLExpression<C> source, C classifier, String simpleName)
source is provided, if any. In such cases, it is usually
inappropriate to attempt to resolve the simple name as a type expression.
Also, the referenced classifier may already be determined to
be a member of the OCL Standard Library.simpleNameCS - the simple nameenv - the current environmentsource - the navigation source expression, if any, in which case this
would not be a type expression in OCLclassifier - the referenced classifier, if it is already known to be one of
the OCL Standard Library typessimpleName - the simple name, as a stringnull if the simple
name does not resolve to an accessible typesimpleNameCS(SimpleNameCS, Environment, OCLExpression)protected VariableExp<C,PM> simpleVariableName(SimpleNameCS simpleNameCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, OCLExpression<C> source, String simpleName)
source, if any, is provided for completeness and
generality. If there is a navigation source, then it is not usually
appropriate to attempt to resolve the simple name as a variable.simpleNameCS - the simple nameenv - the current environmentsource - the navigation source expression, if any, in which case this
would not be a variable expression in OCLsimpleName - the simple name, as a stringnull if the simple name
does not resolve to an accessible variablesimpleNameCS(SimpleNameCS, Environment, OCLExpression)protected OCLExpression<C> simpleUndefinedName(SimpleNameCS simpleNameCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, OCLExpression<C> source, String simpleName)
simpleNameCS - the simple nameenv - the current environmentsource - the navigation source expression, or null if the
source is implicitsimpleName - the simple name, as a stringsimpleNameCS(SimpleNameCS, Environment, OCLExpression)protected IteratorExp<C,PM> createImplicitCollect(OCLExpression<C> source, FeatureCallExp<C> propertyCall, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, CSTNode cstNode)
collect iterator expression for a
property call on a collection-type source expression.source - the property call source expressionpropertyCall - the property call expressionenv - the current environmentprotected C primitiveTypeCS(SimpleTypeEnum simpleType, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
simpleType - the SimpleTypeEnum representing the primitive
typeEClassifie representing the primitive typeprotected LiteralExp<C> primitiveLiteralExpCS(PrimitiveLiteralExpCS primitiveLiteralExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
primitiveLiteralExpCS - the PrimitiveLiteralExpCS CSTNodeenv - the OCL environmentLiteralExpprotected IntegerLiteralExp<C> integerLiteralExpCS(IntegerLiteralExpCS integerLiteralExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
integerLiteralExpCS - the IntegerLiteralExpCS CSTNodeenv - the OCL environmentIntegerLiteralExpprotected UnlimitedNaturalLiteralExp<C> unlimitedNaturalLiteralExpCS(UnlimitedNaturalLiteralExpCS unlimitedNaturalLiteralExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
unlimitedNaturalLiteralExpCS - the UnlimitedNaturalLiteralExpCS
CSTNodeenv - the OCL environmentUnlimitedNaturalLiteralExpprotected RealLiteralExp<C> realLiteralExpCS(RealLiteralExpCS realLiteralExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
realLiteralExpCS - the RealLiteralExpCS CSTNodeenv - the OCL environmentRealLiteralExpprotected StringLiteralExp<C> stringLiteralExpCS(StringLiteralExpCS stringLiteralExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
stringLiteralExpCS - the StringLiteralExpCS CSTNodeenv - the OCL environmentStringLiteralExpprotected BooleanLiteralExp<C> booleanLiteralExpCS(BooleanLiteralExpCS booleanLiteralExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
booleanLiteralExpCS - the BooleanLiteralExpCS CSTNodeenv - the OCL environmentBooleanLiteralExpprotected NullLiteralExp<C> nullLiteralExpCS(NullLiteralExpCS nullLiteralExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
nullLiteralExpCS - the NullLiteralExpCS CSTNodeenv - the OCL environmentNullLiteralExpprotected InvalidLiteralExp<C> invalidLiteralExpCS(InvalidLiteralExpCS invalidLiteralExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
invalidLiteralExpCS - the InvalidLiteralExpCS CSTNodeenv - the OCL environmentInvalidLiteralExpprotected OCLExpression<C> literalExpCS(LiteralExpCS literalExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
literalExpCS - the LiteralExpCS CSTNodeenv - the OCL environmentLiteralExpprotected TupleLiteralExp<C,P> tupleLiteralExpCS(TupleLiteralExpCS tupleLiteralExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
tupleLiteralExpCS - the TupleLiteralExpCS CSTNodeenv - the OCL environmentTupleLiteralExpprotected <any> tupleLiteralPartListCS(List<VariableCS> variableDeclarations, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
variableDeclarations - list of VariableDeclarationCSesenv - the OCL environmentTupleLiteralPartsprotected TupleLiteralPart<C,P> tupleLiteralPartCS(VariableCS variableDeclarationCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
variableDeclarationCS - the VariableDeclarationCS CSTNodeenv - the OCL environmentaddToEnvironment - boolean whether or not to add the the parsed variable to the
environmentVariableDeclarationprotected TypeExp<C> typeCS(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type)
enumLiteralExpCS - the EnumLiteralExpCS CSTNodeenv - the OCL environmentEnumLiteralExpprotected CollectionLiteralExp<C> collectionLiteralExpCS(CollectionLiteralExpCS collectionLiteralExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
collectionLiteralExpCS - the CollectionLiteralExpCS CSTNodeenv - the OCL environmentCollectionLiteralExpprotected CollectionLiteralPart<C> collectionLiteralPartCS(CollectionLiteralPartCS collectionLiteralPartCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
collectionLiteralPartCS - the CollectionLiteralPartCS CSTNodeenv - the OCL environmentCollectionLiteralPartprotected OCLExpression<C> propertyCallExpCS(CallExpCS propertyCallExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
propertyCallExpCS - the PropertyCallExpCS CSTNodeenv - the OCL environmentOCLExpressionprotected LoopExp<C,PM> loopExpCS(LoopExpCS loopExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
loopExpCS - the LoopExpCS CSTNodeenv - the OCL environmentLoopExpprotected OCLExpression<C> getCollectionSourceExpression(OCLExpressionCS oclExpressionCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
oclExpressionCS - the OCLExpressionCS CSTNodeenv - the OCL environmentOCLExpressionprotected IteratorExp<C,PM> iteratorExpCS(IteratorExpCS iteratorExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
iteratorExpCS - the IteratorExpCS CSTNodeenv - the OCL environmentIteratorExpprotected void resolveIteratorOperation(SimpleNameCS simpleNameCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
simpleNameCS - the iterator nameenv - the current OCL environmentprotected IterateExp<C,PM> iterateExpCS(IterateExpCS iterateExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
iterateExpCS - the IterateExpCS CSTNodeenv - the OCL environmentIterateExpprotected OCLExpression<C> modelPropertyCallExpCS(FeatureCallExpCS modelPropertyCallExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
modelPropertyCallExpCS - the ModelPropertyCallExpCS CSTNodeenv - the OCL environmentOCLExpressionprotected OCLExpression<C> getLoopBody(OCLExpression<C> expr)
protected OCLExpression<C> operationCallExpCS(OperationCallExpCS operationCallExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
operationCallExpCS - the OperationCallExpCS CSTNodeenv - the OCL environmentOCLExpressionprotected OCLExpression<C> createImplicitSource(OperationCallExpCS operationCallExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, List<OCLExpression<C>> args)
protected OCLExpression<C> arrowOperationCallExpCS(OperationCallExpCS operationCallExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
operationCallExpCS - the OperationCallExpCS CSTNodeenv - the OCL environmentOCLExpressionprotected OCLExpression<C> oclIsInStateOperationCallExpCS(OperationCallExpCS operationCallExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
operationCallExpCS - the OperationCallExpCS CSTNodeenv - the OCL environmentOCLExpressionprotected OCLExpression<C> staticOperationCallExpCS(OperationCallExpCS operationCallExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
protected List<OCLExpression<C>> argumentsCS(OperationCallExpCS operationCallExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
protected OCLExpression<C> messageExpCS(MessageExpCS messageExpCS, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env)
messageExpCS - the MessageExpCS CSTNodeenv - the OCL environmentOCLExpressionprotected C getCommonSuperType(CSTNode cstNode, String rule, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type1, C type2)
protected C getOCLType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, Object metaElement)
protected C getSetType(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C elementType)
protected C getOrderedSetType(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C elementType)
protected C getBagType(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C elementType)
protected C getSequenceType(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C elementType)
protected C getCollectionType(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, CollectionKind kind, C elementType)
cstNode - the concrete syntax of a collection-type referenceenv - the current environmentkind - the collection kind to retrieveelementType - the collection type's element type@Deprecated protected C getCollectionType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, CollectionKind kind, C elementType)
getCollectionType(CSTNode, Environment, CollectionKind, Object)
method, instead.env - the current environmentkind - the collection kind to retrieveelementType - the collection type's element typeprotected C getTupleType(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, <any> parts)
protected C getTypeType(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type)
protected C getOperationMessageType(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, O operation)
protected C getSignalMessageType(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C signal)
protected C getPropertyType(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, P property)
cstNode - a property-call or property-context concrete syntaxenv - the current OCL parsing environmentowner - the contextual classifier of the property referenceproperty - the referenced propertyprotected CollectionKind getCollectionKind(C possibleCollectionType)
@Deprecated protected InvalidLiteralExp<C> createDummyInvalidLiteralExp()
createDummyInvalidLiteralExp(Environment, CSTNode)
method, instead#markAsErrorNode(OCLExpression)protected InvalidLiteralExp<C> createDummyInvalidLiteralExp(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, CSTNode cstNode)
env - the contextual parsing environmentcstNode - the concrete-syntax node that could not be analyzed#markAsErrorNode(OCLExpression),
createDummyInvalidLiteralExp()protected C createDummyInvalidType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, CSTNode cstNode, String message)
env - the current OCL parsing environmentcstNode - a concrete syntax node that could not be resolvedmessage - the reason for the failure to resolve. Subclasses may choose
to log this message in some wayprotected Object createDummyPackage(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, PackageDeclarationCS packageDeclarationCS)
null. Subclasses may override to create a more interesting
package.env - the current OCL parsing environmentpackageDeclarationCS - the concrete syntax of the package declarationnull if non is requiredprotected boolean isErrorNode(TypedElement<C> expr)
Queries whether the specified expression is a placeholder that was
created for an expression that failed to parse. An example is the
expression returned by createDummyInvalidLiteralExp().
The default implementation simply returns false; subclasses
should override if necessary, in conjunction with the
markAsErrorNode(TypedElement) method.
expr - a (sub)expressionmarkAsErrorNode(TypedElement)protected void markAsErrorNode(TypedElement<C> expr)
Marks the specified (sub)expression as a placeholder for an expression
that could not be parsed. A subsequent invocation of the
isErrorNode(TypedElement) method should recognize an expression
thus marked. Subsequent attempts to mark an expression that is already
marked have no effect.
The default implementation does nothing; subclasses should override if necessary, in conjunction with the isErrorPlaceholder method.
expr - an expression that takes the place of a (sub)expression that
could not be parsedisErrorNode(TypedElement)protected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createPackageContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent, List<String> packageName) throws LookupException
LookupExceptionprotected C lookupClassifier(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, List<String> className)
protected Variable<C,PM> lookupImplicitSourceForOperation(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, List<OCLExpression<C>> args, String operationName)
protected O lookupOperation(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, String name, List<? extends TypedElement<C>> args)
protected P lookupProperty(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, String name)
protected C lookupAssociationClassReference(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, String name)
protected C lookupSignal(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, String name, List<? extends TypedElement<C>> args)
protected S lookupState(CSTNode cstNode, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C sourceType, List<String> statePath)
protected ExpressionInOCL<C,PM> createExpressionInOCL()
protected CT createConstraint()
protected void initASTMapping(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, Object astNode, CSTNode cstNode)
env - the current OCL parsing environmentastNode - the abstract syntax nodecstNode - the concrete syntax node that generated itprotected void initASTMapping(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, Object fromAstNode, CSTNode cstNode, Object toAstNode)
env - the current OCL parsing environmentfromAstNode - the source of an AST-to-CST mappingcstNode - the target of the AST-to-CST mapping and the source of a
CST-to-AST mappingtoAstNode - the target of the CST-to-AST mappingpublic static <any> createSequenceOfNames(PathNameCS pathNameCS, SimpleNameCS simpleNameCS)
public static boolean isEscaped(String name)
'_') character.name - a namepublic static String unescape(String name)
name - an OCL-escaped namepublic static boolean equalName(String name, String elementName)
name - a possibly underscore-escaped nameelementName - name of an element in the modelCopyright © 2015 Open eHealth Foundation. All rights reserved.