Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2019-12-03 17:02:39 +0000
committerEd Willink2019-12-03 17:02:39 +0000
commitadbd3ef27405769b3b2519ae2c8fedf0269b4077 (patch)
tree8a45054d388e849e5197aa06b830849ea0f11a88
parent2587f016d050cc62d82fcd3e322d781e596be9a9 (diff)
downloadorg.eclipse.qvtd-ewillink/553706.tar.gz
org.eclipse.qvtd-ewillink/553706.tar.xz
org.eclipse.qvtd-ewillink/553706.zip
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/AbstractScheduleManager.java10
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java86
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtm2qvts/MappingAnalysis.java6
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/QVTrelationExpressionSynthesizer.java2
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationAnalysis.java28
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationDispatchAnalysis.java2
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/TopWhenInvocationAnalysis.java7
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/Utility.java2
8 files changed, 70 insertions, 73 deletions
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/AbstractScheduleManager.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/AbstractScheduleManager.java
index 1e4184edb..3de68dbaa 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/AbstractScheduleManager.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/AbstractScheduleManager.java
@@ -423,7 +423,7 @@ public abstract class AbstractScheduleManager implements ScheduleManager
TypedModel typedModel = getDomainUsage(expression).getTypedModel(expression);
assert typedModel != null;
ClassDatum classDatum = getClassDatum(typedModel, type);
- Node parameterNode = regionHelper.createOperationParameterNode(Utility.getRequiredInitUtility(variable), name, classDatum);
+ Node parameterNode = regionHelper.createOperationParameterNode(Utility.getRequiredUtility(variable), name, classDatum);
// addVariableNode(variable, parameterNode);
regionHelper.getRegion().addHeadNode(parameterNode);
return parameterNode;
@@ -454,7 +454,7 @@ public abstract class AbstractScheduleManager implements ScheduleManager
Node dependencyNode;
dependencyNode = selfNode;
//
- Utility utility = Utility.getRequiredInitUtility(operationCallExp);
+ Utility utility = Utility.getRequiredUtility(operationCallExp);
Node resultNode = regionHelper.createStepNode(utility, "result", operationCallExp, dependencyNode); // FIXME do not use a MappingNode
operationRegion.setResultNode(resultNode);
regionHelper.createEqualsEdge(utility, dependencyNode, resultNode);
@@ -546,12 +546,12 @@ public abstract class AbstractScheduleManager implements ScheduleManager
if (name == null) {
name = QVTscheduleUtil.getName(PivotUtil.getReferredProperty((NavigationCallExp)callExp));
}
- nextNode = regionHelper.createDataTypeNode(Utility.getRequiredInitUtility(callExp), name, dependencyNode2, (NavigationCallExp)callExp);
+ nextNode = regionHelper.createDataTypeNode(Utility.getRequiredUtility(callExp), name, dependencyNode2, (NavigationCallExp)callExp);
}
else {
- nextNode = regionHelper.createDataTypeNode(Utility.getRequiredInitUtility(property), dependencyNode2, property);
+ nextNode = regionHelper.createDataTypeNode(Utility.getRequiredUtility(property), dependencyNode2, property);
}
- regionHelper.createNavigationEdge(Utility.getRequiredInitUtility(property), dependencyNode2, property, nextNode, false);
+ regionHelper.createNavigationEdge(Utility.getRequiredUtility(property), dependencyNode2, property, nextNode, false);
dependencyNode2 = nextNode;
}
}
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java
index 776fbbd07..b8a546d35 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java
@@ -148,17 +148,17 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
}
protected @NonNull Node createBooleanLiteralNode(boolean booleanValue, @NonNull BooleanLiteralExp booleanLiteralExp) {
- Utility utility = getRequiredInitUtility(booleanLiteralExp);
+ Utility utility = getRequiredUtility(booleanLiteralExp);
return context.createBooleanLiteralNode(utility, booleanValue, booleanLiteralExp);
}
public @NonNull CastEdge createCastEdge(@NonNull Node sourceNode, @NonNull ClassDatum classDatum, @NonNull Node castNode) {
- Utility utility = getRequiredInitUtility(castNode);
+ Utility utility = getRequiredUtility(castNode);
return context.createCastEdge(utility, sourceNode, classDatum, castNode);
}
protected @NonNull Node createCollectionLiteral(@NonNull CollectionLiteralExp collectionLiteralExp, @NonNull CollectionLiteralPart [] collectionParts, @NonNull Node @NonNull [] partNodes) {
- Utility utility = getRequiredInitUtility(collectionLiteralExp);
+ Utility utility = getRequiredUtility(collectionLiteralExp);
Operation collectionOperation = qvtbaseLibraryHelper.getCollectionOperation();
assert collectionParts.length == partNodes.length;
Node reusedNode = findOperationNode(collectionOperation, partNodes);
@@ -173,7 +173,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
CollectionLiteralNode collectionLiteralNode = context.createCollectionLiteralNode(utility, nodeName, collectionLiteralExp, partNodes);
for (int i = 0; i < collectionParts.length; i++) {
CollectionLiteralPart collectionPart = collectionParts[i];
- Utility partUtility = getRequiredInitUtility(collectionPart);
+ Utility partUtility = getRequiredUtility(collectionPart);
context.createCollectionPartEdge(partUtility, partNodes[i], collectionPart, collectionLiteralNode);
}
return collectionLiteralNode;
@@ -200,7 +200,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
}
protected @NonNull Node createDataTypeNode(@NonNull String name, @NonNull Node sourceNode, @NonNull NavigationCallExp navigationCallExp) {
- Utility utility = getRequiredInitUtility(navigationCallExp);
+ Utility utility = getRequiredUtility(navigationCallExp);
return context.createDataTypeNode(utility, name, sourceNode, navigationCallExp);
}
@@ -213,7 +213,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
}
protected @NonNull EnumLiteralNode createEnumLiteralNode(@NonNull EnumerationLiteral enumValue, @NonNull EnumLiteralExp enumLiteralExp) {
- Utility utility = getRequiredInitUtility(enumLiteralExp);
+ Utility utility = getRequiredUtility(enumLiteralExp);
return context.createEnumLiteralNode(utility, enumValue, enumLiteralExp);
}
@@ -228,27 +228,27 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
protected abstract @NonNull ExpressionSynthesizer createExpressionSynthesizer(@NonNull Utility utility);
protected @NonNull IfNode createIfNode(@NonNull IfExp ifExp, @NonNull String name, @NonNull Node@NonNull [] sourceAndArgumentNodes) {
- Utility utility = getRequiredInitUtility(ifExp);
+ Utility utility = getRequiredUtility(ifExp);
return context.createIfNode(utility, name, ifExp, sourceAndArgumentNodes);
}
protected @NonNull Edge createIteratedEdge(@NonNull Node sourceNode, @NonNull Node targetNode) {
- Utility utility = getRequiredInitUtility(targetNode);
+ Utility utility = getRequiredUtility(targetNode);
return context.createIteratedEdge(utility, sourceNode, targetNode);
}
protected @NonNull Node createIteratorNode(@NonNull Variable iterator, @NonNull Node sourceNode) {
- Utility utility = getRequiredInitUtility(iterator);
+ Utility utility = getRequiredUtility(iterator);
return context.createIteratorNode(utility, iterator, sourceNode);
}
protected @NonNull Node createLetNode(@NonNull Variable letVariable, @NonNull Node inNode) {
- Utility utility = getRequiredInitUtility(letVariable);
+ Utility utility = getRequiredUtility(letVariable);
return context.createLetVariableNode(utility, letVariable, inNode);
}
protected @NonNull Node createMapLiteral(@NonNull MapLiteralExp mapLiteralExp, @NonNull MapLiteralPart [] mapParts, @NonNull Node @NonNull [] partNodes) {
- Utility utility = getRequiredInitUtility(mapLiteralExp);
+ Utility utility = getRequiredUtility(mapLiteralExp);
assert mapParts.length == partNodes.length;
Operation mapOperation = qvtbaseLibraryHelper.getMapOperation();
Node reusedNode = findOperationNode(mapOperation, partNodes);
@@ -263,7 +263,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
MapLiteralNode mapLiteralNode = context.createMapLiteralNode(utility, nodeName, mapLiteralExp, partNodes);
for (int i = 0; i < mapParts.length; i++) {
MapLiteralPart mapPart = mapParts[i];
- Utility partUtility = utility; //getRequiredInitUtility(mapPart);
+ Utility partUtility = utility; //getRequiredUtility(mapPart);
context.createMapPartEdge(partUtility, partNodes[i], mapPart, mapLiteralNode);
}
return mapLiteralNode;
@@ -290,22 +290,22 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
return operationNode;
}
- // protected @NonNull Node createNavigableDataTypeNode(@NonNull InitUtility utility, @NonNull Node targetNode, @NonNull NavigationAssignment navigationAssignment) {
+ // protected @NonNull Node createNavigableDataTypeNode(@NonNull Utility utility, @NonNull Node targetNode, @NonNull NavigationAssignment navigationAssignment) {
// return context.createDataTypeNode(utility, targetNode, navigationAssignment);
// }
protected @NonNull Node createNavigableDataTypeNode(@NonNull Node sourceNode, @NonNull Property source2targetProperty) {
- Utility utility = getRequiredInitUtility(source2targetProperty);
+ Utility utility = getRequiredUtility(source2targetProperty);
return context.createDataTypeNode(utility, sourceNode, source2targetProperty);
}
protected @NonNull NavigableEdge createNavigableNavigationEdge(@NonNull Node sourceNode, @NonNull Property source2targetProperty, @NonNull Node targetNode) {
- Utility utility = getRequiredInitUtility(targetNode);
+ Utility utility = getRequiredUtility(targetNode);
return context.createNavigationEdge(utility, sourceNode, source2targetProperty, targetNode, false);
}
public @NonNull NavigableEdge createNavigationEdge(@NonNull Node sourceNode, @NonNull Property source2targetProperty, @NonNull Node targetNode, boolean isPartial) {
- Utility utility = getRequiredInitUtility(targetNode);
+ Utility utility = getRequiredUtility(targetNode);
return context.createNavigationEdge(utility, sourceNode, source2targetProperty, targetNode, isPartial);
}
@@ -327,12 +327,12 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
}
protected @NonNull Node createNullLiteralNode(@NonNull NullLiteralExp nullLiteralExp) {
- Utility utility = getRequiredInitUtility(nullLiteralExp);
+ Utility utility = getRequiredUtility(nullLiteralExp);
return context.createNullLiteralNode(utility, nullLiteralExp);
}
protected @NonNull Node createNumericLiteralNode(@NonNull Number numberValue, @NonNull NumericLiteralExp numericLiteralExp) {
- Utility utility = getRequiredInitUtility(numericLiteralExp);
+ Utility utility = getRequiredUtility(numericLiteralExp);
return context.createNumericLiteralNode(utility, numberValue, numericLiteralExp);
}
@@ -340,7 +340,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Node reusedNode = findOperationNode(operation, sourceAndArgumentNodes);
assert reusedNode == null;
String nameHint = CompilerUtil.recoverVariableName(callExp);
- Utility utility = getRequiredInitUtility(callExp);
+ Utility utility = getRequiredUtility(callExp);
Node operationNode = context.createOperationCallNode(utility, nameHint, operation, callExp, sourceAndArgumentNodes);
return operationNode;
}
@@ -350,12 +350,12 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
}
protected @NonNull Edge createOperationParameterEdge(@NonNull Node sourceNode, @NonNull Parameter parameter, int parameterIndex, @NonNull Node targetNode) {
- Utility utility = getRequiredInitUtility(sourceNode);
+ Utility utility = getRequiredUtility(sourceNode);
return context.createOperationParameterEdge(utility, sourceNode, parameter, parameterIndex, targetNode);
}
protected @NonNull Edge createOperationSelfEdge(@NonNull Node sourceNode, @NonNull Type type, @NonNull Node targetNode) {
- Utility utility = getRequiredInitUtility(sourceNode);
+ Utility utility = getRequiredUtility(sourceNode);
return context.createOperationSelfEdge(utility, sourceNode, type, targetNode);
}
@@ -363,21 +363,21 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
return context.createPredicateEdge(utility, sourceNode, name, targetNode);
}
- // protected @NonNull Node createPredicatedClassNode(@NonNull InitUtility utility, @NonNull Node parentNode, @NonNull NavigationAssignment navigationAssignment) {
+ // protected @NonNull Node createPredicatedClassNode(@NonNull Utility utility, @NonNull Node parentNode, @NonNull NavigationAssignment navigationAssignment) {
// return context.createDependencyClassNode(utility, parentNode, navigationAssignment);
// }
- // protected @NonNull Node createRealizedDataTypeNode(@NonNull InitUtility utility, @NonNull Node sourceNode, @NonNull Property source2targetProperty) {
+ // protected @NonNull Node createRealizedDataTypeNode(@NonNull Utility utility, @NonNull Node sourceNode, @NonNull Property source2targetProperty) {
// return context.createRealizedDataTypeNode(utility, sourceNode, source2targetProperty);
// }
public @NonNull NavigableEdge createRealizedNavigationEdge(@NonNull Node sourceNode, @NonNull Property source2targetProperty, @NonNull Node targetNode, boolean isPartial) {
- Utility utility = getRequiredInitUtility(targetNode);
+ Utility utility = getRequiredUtility(targetNode);
return context.createRealizedNavigationEdge(utility, sourceNode, source2targetProperty, targetNode, isPartial);
}
protected @NonNull Node createShadow(@NonNull ShadowExp shadowExp, @NonNull ShadowPart [] shadowParts, @NonNull Node @NonNull [] partNodes) {
- Utility utility = getRequiredInitUtility(shadowExp);
+ Utility utility = getRequiredUtility(shadowExp);
assert shadowParts.length == partNodes.length;
Operation shadowOperation = qvtbaseLibraryHelper.getShadowOperation();
Node reusedNode = findOperationNode(shadowOperation, partNodes);
@@ -392,24 +392,24 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
ShadowNode shadowLiteralNode = context.createShadowNode(utility, nodeName, shadowExp, partNodes);
for (int i = 0; i < shadowParts.length; i++) {
ShadowPart shadowPart = shadowParts[i];
- Utility partUtility = getRequiredInitUtility(shadowPart);
+ Utility partUtility = getRequiredUtility(shadowPart);
context.createShadowPartEdge(partUtility, partNodes[i], shadowPart, shadowLiteralNode);
}
return shadowLiteralNode;
}
protected @NonNull Node createStepNode(@NonNull String name, @NonNull CallExp callExp, @NonNull Node sourceNode) {
- Utility utility = getRequiredInitUtility(callExp);
+ Utility utility = getRequiredUtility(callExp);
return context.createStepNode(utility, name, callExp, sourceNode);
}
protected @NonNull Node createStringLiteralNode(@NonNull String stringValue, @NonNull StringLiteralExp stringLiteralExp) {
- Utility utility = getRequiredInitUtility(stringLiteralExp);
+ Utility utility = getRequiredUtility(stringLiteralExp);
return context.createStringLiteralNode(utility, stringValue, stringLiteralExp);
}
protected @NonNull Node createTupleLiteral(@NonNull TupleLiteralExp tupleLiteralExp, @NonNull TupleLiteralPart [] tupleParts, @NonNull Node @NonNull [] partNodes) {
- Utility utility = getRequiredInitUtility(tupleLiteralExp);
+ Utility utility = getRequiredUtility(tupleLiteralExp);
assert tupleParts.length == partNodes.length;
Operation tupleOperation = qvtbaseLibraryHelper.getTupleOperation();
Node reusedNode = findOperationNode(tupleOperation, partNodes);
@@ -424,14 +424,14 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
TupleLiteralNode tupleLiteralNode = context.createTupleLiteralNode(utility, nodeName, tupleLiteralExp, partNodes);
for (int i = 0; i < tupleParts.length; i++) {
TupleLiteralPart tuplePart = tupleParts[i];
- Utility partUtility = getRequiredInitUtility(tuplePart);
+ Utility partUtility = getRequiredUtility(tuplePart);
context.createTuplePartEdge(partUtility, partNodes[i], tuplePart, tupleLiteralNode);
}
return tupleLiteralNode;
}
protected @NonNull TypeLiteralNode createTypeLiteralNode(@NonNull Type typeValue, @NonNull TypeExp typeExp) {
- return context.createTypeLiteralNode(getRequiredInitUtility(typeExp), typeValue, typeExp);
+ return context.createTypeLiteralNode(getRequiredUtility(typeExp), typeValue, typeExp);
}
protected @NonNull Node doLoopExp(@NonNull LoopExp loopExp, @NonNull Node sourceNode) {
@@ -692,9 +692,9 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
return null;
}
- // protected final @NonNull InitUtility getConditionalUtility() {
+ // protected final @NonNull Utility getConditionalUtility() {
// boolean isNullable = resultUtility.isNullable();
- // return isNullable ? InitUtility.NULLABLE_CONDITIONAL : InitUtility.NON_NULL_CONDITIONAL;
+ // return isNullable ? Utility.NULLABLE_CONDITIONAL : Utility.NON_NULL_CONDITIONAL;
// }
public @NonNull ExpressionSynthesizer getExpressionSynthesizer(@NonNull Utility utility) {
@@ -796,7 +796,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
else {
// if (!navigationEdge.isRealized() || targetNode.isRealized()) {
if (targetNode != navigationEdge.getEdgeTarget()) {
- context.createEqualsEdge(getRequiredInitUtility(navigationEdge.getEdgeTarget()), targetNode, navigationEdge.getEdgeTarget());
+ context.createEqualsEdge(getRequiredUtility(navigationEdge.getEdgeTarget()), targetNode, navigationEdge.getEdgeTarget());
}
}
return navigationEdge;
@@ -808,7 +808,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
if (navigationEdge != null) {
Node target = navigationEdge.getEdgeTarget();
if (target != targetNode) {
- context.createEqualsEdge(getRequiredInitUtility(targetNode), targetNode, target);
+ context.createEqualsEdge(getRequiredUtility(targetNode), targetNode, target);
}
}
else {
@@ -879,18 +879,18 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
}
public @NonNull ExpressionSynthesizer getRequiredExpressionSynthesizer(boolean isRequired) {
- return getExpressionSynthesizer(getRequiredInitUtility(isRequired));
+ return getExpressionSynthesizer(getRequiredUtility(isRequired));
}
- public @NonNull Utility getRequiredInitUtility(boolean isRequired) {
+ public @NonNull Utility getRequiredUtility(boolean isRequired) {
return isRequired ? getNonNullUtility() : getNullableUtility();
}
- public @NonNull Utility getRequiredInitUtility(@NonNull TypedElement typedElement) {
- return getRequiredInitUtility(typedElement.isIsRequired());
+ public @NonNull Utility getRequiredUtility(@NonNull TypedElement typedElement) {
+ return getRequiredUtility(typedElement.isIsRequired());
}
- protected @NonNull Utility getRequiredInitUtility(@NonNull Utility utility) {
+ protected @NonNull Utility getRequiredUtility(@NonNull Utility utility) {
boolean isConditional = this.utility.isConditional();
boolean isNullable = utility.isNullable();
if (isConditional) {
@@ -902,8 +902,8 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
}
}
- protected @NonNull Utility getRequiredInitUtility(@NonNull Node node) {
- return getRequiredInitUtility(node.getUtility());
+ protected @NonNull Utility getRequiredUtility(@NonNull Node node) {
+ return getRequiredUtility(node.getUtility());
}
private void instantiate(@NonNull Node instantiatedNode, @NonNull Node referenceNode) {
@@ -915,7 +915,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
String name = QVTscheduleUtil.getName(referenceTargetNode);
ClassDatum classDatum = QVTscheduleUtil.getClassDatum(referenceTargetNode);
Node instantiatedTargetNode = createDependencyNode(name, classDatum);
- createNavigationEdge(/*InitUtility.DEPENDENCY,*/ instantiatedNode, QVTscheduleUtil.getReferredProperty(navigationEdge), instantiatedTargetNode, false);
+ createNavigationEdge(/*Utility.DEPENDENCY,*/ instantiatedNode, QVTscheduleUtil.getReferredProperty(navigationEdge), instantiatedTargetNode, false);
instantiate(instantiatedTargetNode, referenceTargetNode);
}
}
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtm2qvts/MappingAnalysis.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtm2qvts/MappingAnalysis.java
index f00614f9f..da8e76b3b 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtm2qvts/MappingAnalysis.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtm2qvts/MappingAnalysis.java
@@ -572,7 +572,7 @@ public class MappingAnalysis extends RuleAnalysis
ClassDatum initClassDatum = QVTscheduleUtil.getClassDatum(bestInitNode);
ClassDatum variableClassDatum = scheduleManager.getClassDatum(variable);
if (!QVTscheduleUtil.conformsTo(initClassDatum, variableClassDatum)) {
- Node castNode = createOldNode(Utility.getRequiredInitUtility(variable), variable);
+ Node castNode = createOldNode(Utility.getRequiredUtility(variable), variable);
rootExpressionSynthesizer.createCastEdge(bestInitNode, variableClassDatum, castNode);
bestInitNode = castNode;
}
@@ -683,9 +683,9 @@ public class MappingAnalysis extends RuleAnalysis
"Enforceable variable ''{0}'' has not been realized in ''{1}''",
variable, region);
}
- node = createRealizedStepNode(Utility.getRequiredInitUtility(variable), variable);
+ node = createRealizedStepNode(Utility.getRequiredUtility(variable), variable);
} else {
- node = createLoadedStepNode(Utility.getRequiredInitUtility(variable), variable); // FIXME Predicated ??
+ node = createLoadedStepNode(Utility.getRequiredUtility(variable), variable); // FIXME Predicated ??
}
}
}
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/QVTrelationExpressionSynthesizer.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/QVTrelationExpressionSynthesizer.java
index 76de0c2ec..848782592 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/QVTrelationExpressionSynthesizer.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/QVTrelationExpressionSynthesizer.java
@@ -78,7 +78,7 @@ public class QVTrelationExpressionSynthesizer extends AbstractQVTrelationExpress
assert argumentNode != null;
rootVariable2argumentNode.put(rootVariable, argumentNode);
}
- InvocationAnalysis invocationAnalysis = relationAnalysis.getOutgoingInvocationAnalysis(invokedRelationAnalysis, relationCallExp, isWhen, getRequiredInitUtility(true), rootVariable2argumentNode);
+ InvocationAnalysis invocationAnalysis = relationAnalysis.getOutgoingInvocationAnalysis(invokedRelationAnalysis, relationCallExp, isWhen, getRequiredUtility(true), rootVariable2argumentNode);
// for ()
// if (referredRule2TraceClass.getStatusInterfaceProperty())
invocationAnalysis.getInvokingNode();
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationAnalysis.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationAnalysis.java
index 228697906..6abd5a744 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationAnalysis.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationAnalysis.java
@@ -791,7 +791,7 @@ public class RelationAnalysis extends RuleAnalysis
* Return the utility for a give variableDeclaration adjusting the optional multiplicity of the heads an optional
* when invocation to non-optional. (See Bug 499432)
*/
- private @NonNull Utility getOptionallyMatchAtRootUtility(@NonNull VariableDeclaration variableDeclaration) {
+ private @NonNull Utility getOptionalMatchAtRootUtility(@NonNull VariableDeclaration variableDeclaration) {
boolean anyRequired = false;
boolean isRootVariable = false;
for (@NonNull VariableDeclaration rootVariable : QVTrelationUtil.getRootVariables(getRule())) {
@@ -803,10 +803,10 @@ public class RelationAnalysis extends RuleAnalysis
}
}
if (!isRootVariable) { // Non-root is not
- return Utility.getRequiredInitUtility(variableDeclaration); // a root match
+ return Utility.getRequiredUtility(variableDeclaration); // a root match
}
if (anyRequired) { // If any root cannot be null
- return Utility.getRequiredInitUtility(variableDeclaration); // a match is required
+ return Utility.getRequiredUtility(variableDeclaration); // a match is required
}
return Utility.NON_NULL_MATCHED; // Match can be omitted
}
@@ -835,7 +835,7 @@ public class RelationAnalysis extends RuleAnalysis
node = getReferenceNodeForSharedVariable((SharedVariable)variableDeclaration, null);
}
if (node == null) {
- node = createOldNode(Utility.getRequiredInitUtility(variableDeclaration), variableDeclaration);
+ node = createOldNode(Utility.getRequiredUtility(variableDeclaration), variableDeclaration);
if (node.isThis()) {
setThisNode(node);
}
@@ -901,7 +901,7 @@ public class RelationAnalysis extends RuleAnalysis
ClassDatum initClassDatum = QVTscheduleUtil.getClassDatum(bestInitNode);
ClassDatum variableClassDatum = scheduleManager.getClassDatum(variable);
if (!QVTscheduleUtil.conformsTo(initClassDatum, variableClassDatum)) {
- Node castNode = createOldNode(Utility.getRequiredInitUtility(variable), variable);
+ Node castNode = createOldNode(Utility.getRequiredUtility(variable), variable);
expressionSynthesizer2.createCastEdge(bestInitNode, variableClassDatum, castNode);
bestInitNode = castNode;
}
@@ -1727,10 +1727,10 @@ public class RelationAnalysis extends RuleAnalysis
assert targetNode != null;
boolean isPartial = scheduleManager.computeIsPartial(traceNode, traceProperty);
if (hasPredicatedTrace && rootVariables.contains(tracedVariable)) {
- createNavigationEdge(Utility.getRequiredInitUtility(traceProperty), traceNode, traceProperty, targetNode, isPartial);
+ createNavigationEdge(Utility.getRequiredUtility(traceProperty), traceNode, traceProperty, targetNode, isPartial);
}
else {
- createRealizedNavigationEdge(Utility.getRequiredInitUtility(traceProperty), traceNode, traceProperty, targetNode, isPartial);
+ createRealizedNavigationEdge(Utility.getRequiredUtility(traceProperty), traceNode, traceProperty, targetNode, isPartial);
}
}
}
@@ -1897,22 +1897,20 @@ public class RelationAnalysis extends RuleAnalysis
return; // implicit CollectionTemplateExp rest nodes are not needed
}
else if (getKeyedOutputVariables().contains(variableDeclaration)) {
- boolean isUnconditional = true;
createKeyedNode(Utility.NON_NULL_MATCHED, QVTrelationUtil.getName(variableDeclaration), variableDeclaration);
- return; // keyed object created by synthesizeKeyedObject
}
else if (getTopWhenedOutputVariables().contains(variableDeclaration)) {
- createOldNode(Utility.getRequiredInitUtility(variableDeclaration), variableDeclaration); // when output is created by the invoked when
+ createOldNode(Utility.getRequiredUtility(variableDeclaration), variableDeclaration); // when output is created by the invoked when
}
else if (getNonTopWhenedOutputVariables().contains(variableDeclaration)) {
- createOldNode(Utility.getRequiredInitUtility(variableDeclaration), variableDeclaration); // when output is created by the invoked when
+ createOldNode(Utility.getRequiredUtility(variableDeclaration), variableDeclaration); // when output is created by the invoked when
// createRealizedStepNode(variableDeclaration); // when output is created by the invoker
}
else if (hasIncomingWhereInvocations() && Iterables.contains(QVTrelationUtil.getRootVariables(getRule()), variableDeclaration)) {
- createOldNode(Utility.getRequiredInitUtility(variableDeclaration), variableDeclaration); // where 'output' is created by invoker
+ createOldNode(Utility.getRequiredUtility(variableDeclaration), variableDeclaration); // where 'output' is created by invoker
}
else if (getRealizedOutputVariables().contains(variableDeclaration)) {
- Utility utility = getOptionallyMatchAtRootUtility(variableDeclaration);
+ Utility utility = getOptionalMatchAtRootUtility(variableDeclaration);
createRealizedStepNode(utility, variableDeclaration);
}
else {
@@ -1923,7 +1921,7 @@ public class RelationAnalysis extends RuleAnalysis
return; // CollectionTemplateExp variables would be bloat
// }
}
- Utility utility = getOptionallyMatchAtRootUtility(variableDeclaration);
+ Utility utility = getOptionalMatchAtRootUtility(variableDeclaration);
createOldNode(utility, variableDeclaration);
}
else if (variableDeclaration instanceof SharedVariable) {
@@ -1936,7 +1934,7 @@ public class RelationAnalysis extends RuleAnalysis
}
}
else {
- Utility utility = getOptionallyMatchAtRootUtility(variableDeclaration);
+ Utility utility = getOptionalMatchAtRootUtility(variableDeclaration);
createOldNode(utility, variableDeclaration); // Never happens
}
}
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationDispatchAnalysis.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationDispatchAnalysis.java
index d3559e331..2970e9dc7 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationDispatchAnalysis.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationDispatchAnalysis.java
@@ -101,7 +101,7 @@ public class RelationDispatchAnalysis extends RegionHelper<@NonNull RuleRegion>
// VariableDeclaration2TraceProperty variableDeclaration2traceInterfaceProperty = rule2traceInterface.getVariableDeclaration2TraceProperty(variable);
Property traceClassProperty = variableDeclaration2traceClassProperty.getTraceProperty();
// Property traceInterfaceProperty = variableDeclaration2traceInterfaceProperty.getTraceProperty();
- Node targetNode = createOldNode(Utility.getRequiredInitUtility(variable), variable);
+ Node targetNode = createOldNode(Utility.getRequiredUtility(variable), variable);
boolean isPartial = scheduleManager.computeIsPartial(targetNode, traceClassProperty);
createNavigationEdge(targetNode.getUtility(), traceNode, traceClassProperty, targetNode, isPartial);
if (isTopLevel) {
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/TopWhenInvocationAnalysis.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/TopWhenInvocationAnalysis.java
index 0954ae938..35922288e 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/TopWhenInvocationAnalysis.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/TopWhenInvocationAnalysis.java
@@ -25,10 +25,9 @@ import org.eclipse.qvtd.pivot.qvtschedule.Utility;
public class TopWhenInvocationAnalysis extends AbstractWhenInvocationAnalysis
{
/**
- * Return true unless a non-match is permitted and used for null input to null output. (See Bug 499432)
+ * Return the utility of a top-when invocation. (See Bug 499432)
*/
- // @Override
- private static @NonNull Utility resolveInitUtility(@NonNull Utility utility, @NonNull Map<@NonNull VariableDeclaration, @NonNull Node> rootVariable2argumentNode) {
+ private static @NonNull Utility resolveUtility(@NonNull Utility utility, @NonNull Map<@NonNull VariableDeclaration, @NonNull Node> rootVariable2argumentNode) {
boolean anyRequired = false;
boolean anyOmitted = false;
for (@NonNull VariableDeclaration rootVariable : rootVariable2argumentNode.keySet()) {
@@ -52,7 +51,7 @@ public class TopWhenInvocationAnalysis extends AbstractWhenInvocationAnalysis
public TopWhenInvocationAnalysis(@NonNull RelationAnalysis invokingRelationAnalysis, @NonNull RelationAnalysis invokedRelationAnalysis,
@NonNull Utility utility, @NonNull Map<@NonNull VariableDeclaration, @NonNull Node> rootVariable2argumentNode) {
- super(invokingRelationAnalysis, invokedRelationAnalysis, resolveInitUtility(utility, rootVariable2argumentNode), rootVariable2argumentNode);
+ super(invokingRelationAnalysis, invokedRelationAnalysis, resolveUtility(utility, rootVariable2argumentNode), rootVariable2argumentNode);
}
@Override
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/Utility.java b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/Utility.java
index 9752fd31e..6a6be7067 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/Utility.java
+++ b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/Utility.java
@@ -459,7 +459,7 @@ public enum Utility implements Enumerator {
}
- public static @NonNull Utility getRequiredInitUtility(@NonNull TypedElement typedElement) {
+ public static @NonNull Utility getRequiredUtility(@NonNull TypedElement typedElement) {
return typedElement.isIsRequired() ? Utility.NON_NULL_MATCHED : Utility.NULLABLE_MATCHED;
}

Back to the top