Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2019-12-02 16:47:47 +0000
committerEd Willink2019-12-02 16:47:47 +0000
commita18ff752f9c12d39fd4aedcfb159f560a86b0a3c (patch)
tree8968e61d2ca201b6cb4c8d356369007d51e08fbc
parentffe92b965ccca62c715ab73edd238e5b563b16c7 (diff)
downloadorg.eclipse.qvtd-a18ff752f9c12d39fd4aedcfb159f560a86b0a3c.tar.gz
org.eclipse.qvtd-a18ff752f9c12d39fd4aedcfb159f560a86b0a3c.tar.xz
org.eclipse.qvtd-a18ff752f9c12d39fd4aedcfb159f560a86b0a3c.zip
ok
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java114
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java4
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationAnalysis.java2
3 files changed, 60 insertions, 60 deletions
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 5ccd3c820..b411024df 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
@@ -197,21 +197,21 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Node operationNode = context.createCollectionRangeNode(!resultUtility.isConditional(), utility, nodeName, collectionRange, sourceAndArgumentNodes);
Parameter firstParameter = qvtbaseLibraryHelper.getRangeFirstParameter();
Parameter lastParameter = qvtbaseLibraryHelper.getRangeLastParameter();
- createOperationParameterEdge(getRequiredInitUtility(firstNode), firstNode, firstParameter, -1, operationNode);
- createOperationParameterEdge(getRequiredInitUtility(lastNode), lastNode, lastParameter, -1, operationNode);
+ createOperationParameterEdge(firstNode, firstParameter, -1, operationNode);
+ createOperationParameterEdge(lastNode, lastParameter, -1, operationNode);
return operationNode;
}
- protected @NonNull Node createDataTypeNode(@NonNull InitUtility utility, @NonNull String name, @NonNull Node sourceNode, @NonNull NavigationCallExp navigationCallExp) {
- return context.createDataTypeNode(utility, name, sourceNode, navigationCallExp);
+ protected @NonNull Node createDataTypeNode(@NonNull String name, @NonNull Node sourceNode, @NonNull NavigationCallExp navigationCallExp) {
+ return context.createDataTypeNode(getRequiredInitUtility(navigationCallExp), name, sourceNode, navigationCallExp);
}
- protected @NonNull Edge createDependencyEdge(@NonNull InitUtility utility, @NonNull Node sourceNode, @NonNull String name, @NonNull Node targetNode) {
- return context.createDependencyEdge(utility, sourceNode, name, targetNode);
+ protected @NonNull Edge createDependencyEdge(@NonNull Node sourceNode, @NonNull String name, @NonNull Node targetNode) {
+ return context.createDependencyEdge(InitUtility.DEPENDENCY, sourceNode, name, targetNode);
}
- protected @NonNull Node createDependencyNode(@NonNull InitUtility utility, @NonNull String name, @NonNull ClassDatum classDatum) {
- return context.createDependencyNode(utility, name, classDatum);
+ protected @NonNull Node createDependencyNode(@NonNull String name, @NonNull ClassDatum classDatum) {
+ return context.createDependencyNode(InitUtility.DEPENDENCY, name, classDatum);
}
protected @NonNull EnumLiteralNode createEnumLiteralNode(@NonNull InitUtility utility, @NonNull EnumerationLiteral enumValue, @NonNull EnumLiteralExp enumLiteralExp) {
@@ -228,19 +228,19 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
protected abstract @NonNull ExpressionSynthesizer createExpressionSynthesizer(@NonNull InitUtility initUtility);
- protected @NonNull Edge createIteratedEdge(@NonNull InitUtility utility, @NonNull Node sourceNode, @NonNull Node targetNode) {
- return context.createIteratedEdge(utility, sourceNode, targetNode);
+ protected @NonNull Edge createIteratedEdge(@NonNull Node sourceNode, @NonNull Node targetNode) {
+ return context.createIteratedEdge(getRequiredInitUtility(targetNode), sourceNode, targetNode);
}
- protected @NonNull Node createIteratorNode(@NonNull InitUtility utility, @NonNull Variable iterator, @NonNull Node sourceNode) {
- return context.createIteratorNode(utility, iterator, sourceNode);
+ protected @NonNull Node createIteratorNode(@NonNull Variable iterator, @NonNull Node sourceNode) {
+ return context.createIteratorNode(getRequiredInitUtility(iterator), iterator, sourceNode);
}
- protected @NonNull Node createLetNode(@NonNull InitUtility utility, @NonNull Variable letVariable, @NonNull Node inNode) {
- return context.createLetVariableNode(utility, letVariable, inNode);
+ protected @NonNull Node createLetNode(@NonNull Variable letVariable, @NonNull Node inNode) {
+ return context.createLetVariableNode(getRequiredInitUtility(letVariable), letVariable, inNode);
}
- protected @NonNull Node createMapLiteral(@NonNull InitUtility utility, @NonNull MapLiteralExp mapLiteralExp, @NonNull MapLiteralPart [] mapParts, @NonNull Node @NonNull [] partNodes) {
+ protected @NonNull Node createMapLiteral(@NonNull MapLiteralExp mapLiteralExp, @NonNull MapLiteralPart [] mapParts, @NonNull Node @NonNull [] partNodes) {
assert mapParts.length == partNodes.length;
Operation mapOperation = qvtbaseLibraryHelper.getMapOperation();
Node reusedNode = findOperationNode(mapOperation, partNodes);
@@ -252,7 +252,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
if (nodeName == null) {
nodeName = QVTbaseUtil.getName(mapOperation);
}
- MapLiteralNode mapLiteralNode = context.createMapLiteralNode(!resultUtility.isConditional(), utility, nodeName, mapLiteralExp, partNodes);
+ MapLiteralNode mapLiteralNode = context.createMapLiteralNode(!resultUtility.isConditional(), getRequiredInitUtility(mapLiteralExp), nodeName, mapLiteralExp, partNodes);
for (int i = 0; i < mapParts.length; i++) {
context.createMapPartEdge(resultUtility, partNodes[i], mapParts[i], mapLiteralNode);
}
@@ -279,8 +279,8 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Node operationNode = context.createMapPartNode(!resultUtility.isConditional(), resultUtility, nodeName, mapLiteralPart, subPartNodes);
Parameter keyParameter = qvtbaseLibraryHelper.getMapPartKeyParameter();
Parameter valueParameter = qvtbaseLibraryHelper.getMapPartValueParameter();
- createOperationParameterEdge(getRequiredInitUtility(keyNode), keyNode, keyParameter, -1, operationNode);
- createOperationParameterEdge(getRequiredInitUtility(valueNode), valueNode, valueParameter, -1, operationNode);
+ createOperationParameterEdge(keyNode, keyParameter, -1, operationNode);
+ createOperationParameterEdge(valueNode, valueParameter, -1, operationNode);
return operationNode;
}
@@ -318,8 +318,8 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
return context.createNullLiteralNode(!resultUtility.isConditional(), getRequiredInitUtility(nullLiteralExp), nullLiteralExp);
}
- protected @NonNull Node createNumericLiteralNode(@NonNull InitUtility utility, @NonNull Number numberValue, @NonNull NumericLiteralExp numericLiteralExp) {
- return context.createNumericLiteralNode(!resultUtility.isConditional(), utility, numberValue, numericLiteralExp);
+ protected @NonNull Node createNumericLiteralNode(@NonNull Number numberValue, @NonNull NumericLiteralExp numericLiteralExp) {
+ return context.createNumericLiteralNode(!resultUtility.isConditional(), getRequiredInitUtility(numericLiteralExp), numberValue, numericLiteralExp);
}
protected @NonNull Node createOperationCallNode(@NonNull CallExp callExp, @NonNull Operation operation, @NonNull Node @NonNull [] sourceAndArgumentNodes) {
@@ -334,12 +334,12 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
return operationNode;
}
- protected @NonNull Edge createOperationParameterEdge(@NonNull InitUtility utility, @NonNull Node sourceNode, @NonNull Parameter parameter, int parameterIndex, @NonNull Node targetNode) {
- return context.createOperationParameterEdge(utility, sourceNode, parameter, parameterIndex, targetNode);
+ protected @NonNull Edge createOperationParameterEdge(@NonNull Node sourceNode, @NonNull Parameter parameter, int parameterIndex, @NonNull Node targetNode) {
+ return context.createOperationParameterEdge(getRequiredInitUtility(sourceNode), sourceNode, parameter, parameterIndex, targetNode);
}
- protected @NonNull Edge createOperationSelfEdge(@NonNull InitUtility utility, @NonNull Node sourceNode, @NonNull Type type, @NonNull Node targetNode) {
- return context.createOperationSelfEdge(utility, sourceNode, type, targetNode);
+ protected @NonNull Edge createOperationSelfEdge(@NonNull Node sourceNode, @NonNull Type type, @NonNull Node targetNode) {
+ return context.createOperationSelfEdge(getRequiredInitUtility(sourceNode), sourceNode, type, targetNode);
}
protected @NonNull Edge createPredicateEdge(@NonNull InitUtility utility, @NonNull Node sourceNode, @Nullable String name, @NonNull Node targetNode) {
@@ -382,8 +382,8 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
return context.createStepNode(initUtility, name, callExp, sourceNode, isMatched);
}
- protected @NonNull Node createStringLiteralNode(@NonNull InitUtility initUtility, @NonNull String stringValue, @NonNull StringLiteralExp stringLiteralExp) {
- return context.createStringLiteralNode(!resultUtility.isConditional(), initUtility, stringValue, stringLiteralExp);
+ protected @NonNull Node createStringLiteralNode(@NonNull String stringValue, @NonNull StringLiteralExp stringLiteralExp) {
+ return context.createStringLiteralNode(!resultUtility.isConditional(), getRequiredInitUtility(stringLiteralExp), stringValue, stringLiteralExp);
}
protected @NonNull Node createTupleLiteral(@NonNull TupleLiteralExp tupleLiteralExp, @NonNull TupleLiteralPart [] tupleParts, @NonNull Node @NonNull [] partNodes) {
@@ -415,19 +415,19 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
@NonNull Node[] argNodes = new @NonNull Node[1+ownedIterators.size()+(loopExp instanceof IterateExp ? 1 : 0)];
int i = 1;
for (@NonNull Variable iterator : ownedIterators) {
- Node iteratorNode = conditionalExpressionSynthesizer.createIteratorNode(conditionalExpressionSynthesizer.getRequiredInitUtility(iterator), iterator, sourceNode);
+ Node iteratorNode = conditionalExpressionSynthesizer.createIteratorNode(iterator, sourceNode);
@SuppressWarnings("unused")
Type iteratorType = QVTbaseUtil.getType(iterator);
// Property iterateProperty = context.getScheduleModel().getIterateProperty(iteratorType);
- conditionalExpressionSynthesizer.createIteratedEdge(conditionalExpressionSynthesizer.getRequiredInitUtility(iteratorNode), sourceNode, iteratorNode);
+ conditionalExpressionSynthesizer.createIteratedEdge(sourceNode, iteratorNode);
argNodes[i++] = iteratorNode;
}
if (loopExp instanceof IterateExp) {
Variable accumulator = QVTbaseUtil.getOwnedResult((IterateExp)loopExp);
- Node iteratorNode = conditionalExpressionSynthesizer.createIteratorNode(conditionalExpressionSynthesizer.getRequiredInitUtility(accumulator), accumulator, sourceNode);
+ Node iteratorNode = conditionalExpressionSynthesizer.createIteratorNode(accumulator, sourceNode);
@SuppressWarnings("unused")
Type iteratorType = QVTbaseUtil.getType(accumulator);
- conditionalExpressionSynthesizer.createIteratedEdge(conditionalExpressionSynthesizer.getRequiredInitUtility(iteratorNode), sourceNode, iteratorNode);
+ conditionalExpressionSynthesizer.createIteratedEdge(sourceNode, iteratorNode);
argNodes[i++] = iteratorNode;
}
Node bodyNode = conditionalExpressionSynthesizer.synthesize(loopExp.getOwnedBody());
@@ -436,10 +436,10 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Node accumulateNode = findOperationNode(referredIteration, argNodes);
if (accumulateNode == null) {
accumulateNode = createOperationCallNode(loopExp, referredIteration, argNodes);
- createOperationParameterEdge(getRequiredInitUtility(sourceNode), sourceNode, qvtbaseLibraryHelper.getLoopSourceParameter(), -1, accumulateNode);
- conditionalExpressionSynthesizer.createOperationParameterEdge(conditionalExpressionSynthesizer.getRequiredInitUtility(bodyNode), bodyNode, qvtbaseLibraryHelper.getLoopBodyParameter(), -1, accumulateNode);
+ createOperationParameterEdge(sourceNode, qvtbaseLibraryHelper.getLoopSourceParameter(), -1, accumulateNode);
+ conditionalExpressionSynthesizer.createOperationParameterEdge(bodyNode, qvtbaseLibraryHelper.getLoopBodyParameter(), -1, accumulateNode);
for (int j = 1 ; j <= ownedIterators.size(); j++) {
- conditionalExpressionSynthesizer.createOperationParameterEdge(conditionalExpressionSynthesizer.getRequiredInitUtility(argNodes[j]), argNodes[j], qvtbaseLibraryHelper.getLoopIteratorsParameter(), j-1, accumulateNode);
+ conditionalExpressionSynthesizer.createOperationParameterEdge(argNodes[j], qvtbaseLibraryHelper.getLoopIteratorsParameter(), j-1, accumulateNode);
}
}
return accumulateNode;
@@ -464,7 +464,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
if (type instanceof DataType) {
targetNode = sourceNode.getNavigableTarget(referredProperty);
if (targetNode == null) {
- targetNode = createDataTypeNode(getRequiredInitUtility(navigationCallExp), name, sourceNode, navigationCallExp);
+ targetNode = createDataTypeNode(name, sourceNode, navigationCallExp);
}
}
else {
@@ -496,7 +496,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
operationNode = nestedAnalyzer.createOperationCallNode(operationCallExp, referredOperation, argNodes);
for (int i = 0; i < iSize; i++) {
Parameter parameter = QVTbaseUtil.getOwnedParameter(referredOperation, i);
- nestedAnalyzer.createOperationParameterEdge(getRequiredInitUtility(argNodes[i]), argNodes[i], parameter, -1, operationNode);
+ nestedAnalyzer.createOperationParameterEdge(argNodes[i], parameter, -1, operationNode);
}
if (referredOperation.getBodyExpression() != null) {
OperationRegion operationRegion = scheduleManager.analyzeOperation(operationCallExp);
@@ -506,7 +506,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Node dependencyHead = context.getDependencyHead(classDatum);
if (dependencyHead == null) {
dependencyHead = context.createDependencyHead(classDatum);
- createDependencyEdge(resultUtility, dependencyHead, QVTscheduleUtil.getName(dependencyHead), operationNode);
+ createDependencyEdge(dependencyHead, QVTscheduleUtil.getName(dependencyHead), operationNode);
}
instantiate(dependencyHead, referenceNode);
}
@@ -557,10 +557,10 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
for (int i = 0; i <= iSize; i++) {
// createExpressionEdge(argNodes[i], argNames[i], operationNode);
if (i == 0) {
- createOperationSelfEdge(getRequiredInitUtility(argNodes[i]), argNodes[i], QVTbaseUtil.getType(ownedSource), operationNode);
+ createOperationSelfEdge(argNodes[i], QVTbaseUtil.getType(ownedSource), operationNode);
}
else {
- createOperationParameterEdge(getRequiredInitUtility(argNodes[i]), argNodes[i], QVTbaseUtil.getOwnedParameter(referredOperation, i-1), -1, operationNode);
+ createOperationParameterEdge(argNodes[i], QVTbaseUtil.getOwnedParameter(referredOperation, i-1), -1, operationNode);
}
}
if (referredOperation.getBodyExpression() != null) {
@@ -572,7 +572,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Node dependencyHead = context.getDependencyHead(classDatum);
if (dependencyHead == null) {
dependencyHead = context.createDependencyHead(classDatum);
- createDependencyEdge(resultUtility, dependencyHead, QVTscheduleUtil.getName(dependencyHead), operationNode);
+ createDependencyEdge(dependencyHead, QVTscheduleUtil.getName(dependencyHead), operationNode);
}
instantiate(dependencyHead, referenceNode);
}
@@ -605,8 +605,8 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Operation equalsOperation = standardLibraryHelper.getOclAnyEqualsOperation();
Node nullNode1 = createNullLiteralNode();
Node isNonNullNode = createOperationCallNode2("equals"/*"isSafe"+navigationNode.getName()*/, QVTscheduleUtil.getNodeRole(navigationNode), equalsOperation, scheduleManager.getBooleanClassDatum(), sourceNode, nullNode1);
- createOperationSelfEdge(getRequiredInitUtility(sourceNode), sourceNode, QVTbaseUtil.getType(QVTbaseUtil.getOwnedSource(callExp)), isNonNullNode);
- createOperationParameterEdge(getRequiredInitUtility(nullNode1), nullNode1, QVTbaseUtil.getOwnedParameter(equalsOperation, 0), -1, isNonNullNode);
+ createOperationSelfEdge(sourceNode, QVTbaseUtil.getType(QVTbaseUtil.getOwnedSource(callExp)), isNonNullNode);
+ createOperationParameterEdge(nullNode1, QVTbaseUtil.getOwnedParameter(equalsOperation, 0), -1, isNonNullNode);
Node nullNode2 = createNullLiteralNode();
Operation ifOperation = qvtbaseLibraryHelper.getIfOperation();
@NonNull Node [] sourceAndArgumentNodes = new @NonNull Node[] { isNonNullNode, navigationNode, nullNode2 };
@@ -615,9 +615,9 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Parameter conditionParameter = qvtbaseLibraryHelper.getIfConditionParameter();
Parameter thenParameter = qvtbaseLibraryHelper.getIfThenParameter();
Parameter elseParameter = qvtbaseLibraryHelper.getIfElseParameter();
- createOperationParameterEdge(getRequiredInitUtility(isNonNullNode), isNonNullNode, conditionParameter, -1, ifNode);
- createOperationParameterEdge(getRequiredInitUtility(nullNode2), nullNode2, thenParameter, -1, ifNode);
- createOperationParameterEdge(getRequiredInitUtility(navigationNode), navigationNode, elseParameter, -1, ifNode);
+ createOperationParameterEdge(isNonNullNode, conditionParameter, -1, ifNode);
+ createOperationParameterEdge(nullNode2, thenParameter, -1, ifNode);
+ createOperationParameterEdge(navigationNode, elseParameter, -1, ifNode);
return ifNode;
}
}
@@ -889,7 +889,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Node referenceTargetNode = navigationEdge.getEdgeTarget();
String name = QVTscheduleUtil.getName(referenceTargetNode);
ClassDatum classDatum = QVTscheduleUtil.getClassDatum(referenceTargetNode);
- Node instantiatedTargetNode = createDependencyNode(InitUtility.DEPENDENCY, name, classDatum);
+ Node instantiatedTargetNode = createDependencyNode(name, classDatum);
createNavigationEdge(InitUtility.DEPENDENCY, instantiatedNode, QVTscheduleUtil.getReferredProperty(navigationEdge), instantiatedTargetNode, false);
instantiate(instantiatedTargetNode, referenceTargetNode);
}
@@ -922,9 +922,9 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Node operationNode = findOperationNode(referredOperation, sourceAndArgumentNodes);
if (operationNode == null) {
operationNode = nestedAnalyzer.createOperationCallNode(operationCallExp, referredOperation, sourceAndArgumentNodes);
- nestedAnalyzer.createOperationSelfEdge(getRequiredInitUtility(sourceNode), sourceNode, sourceType, operationNode);
+ nestedAnalyzer.createOperationSelfEdge(sourceNode, sourceType, operationNode);
Parameter parameter = QVTbaseUtil.getOwnedParameter(referredOperation, 0);
- nestedAnalyzer.createOperationParameterEdge(getRequiredInitUtility(typeNode), typeNode, parameter, -1, operationNode);
+ nestedAnalyzer.createOperationParameterEdge(typeNode, parameter, -1, operationNode);
}
//
// Install operationNode as a replacement for targetNode.
@@ -1100,7 +1100,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
// createExpressionEdge(argumentNode, "«arg»", castNode);
Operation referredOperation = QVTbaseUtil.getReferredOperation(operationCallExp);
Parameter firstParameter = QVTbaseUtil.getOwnedParameter(referredOperation, 0);
- createOperationParameterEdge(getRequiredInitUtility(argumentNode), argumentNode, firstParameter, -1, castNode);
+ createOperationParameterEdge(argumentNode, firstParameter, -1, castNode);
}
return castNode;
/* OperationNode operationNode = new OperationNode(context, operationCallExp.getReferredOperation().getName(), context.getClassDatumAnalysis(operationCallExp));
@@ -1268,7 +1268,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
for (EObject eObject : element.eContents()) {
Node node = synthesize((Element) eObject);
// createExpressionEdge(node, "?", errorNode);
- createOperationParameterEdge(getRequiredInitUtility(node), node, qvtbaseLibraryHelper.getErrorElementsParameter(), parameterIndex++, errorNode);
+ createOperationParameterEdge(node, qvtbaseLibraryHelper.getErrorElementsParameter(), parameterIndex++, errorNode);
}
return errorNode;
}
@@ -1304,16 +1304,16 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Parameter thenParameter = qvtbaseLibraryHelper.getIfThenParameter();
Parameter elseParameter = qvtbaseLibraryHelper.getIfElseParameter();
// createOperationSelfEdge(selfNode, selfType, operationNode);
- createOperationParameterEdge(getRequiredInitUtility(selfNode), selfNode, conditionParameter, -1, operationNode);
- conditionalExpressionSynthesizer.createOperationParameterEdge(conditionalExpressionSynthesizer.getRequiredInitUtility(thenNode), thenNode, thenParameter, -1, operationNode);
- conditionalExpressionSynthesizer.createOperationParameterEdge(conditionalExpressionSynthesizer.getRequiredInitUtility(elseNode), elseNode, elseParameter, -1, operationNode);
+ createOperationParameterEdge(selfNode, conditionParameter, -1, operationNode);
+ conditionalExpressionSynthesizer.createOperationParameterEdge(thenNode, thenParameter, -1, operationNode);
+ conditionalExpressionSynthesizer.createOperationParameterEdge(elseNode, elseParameter, -1, operationNode);
return operationNode;
}
@Override
public @NonNull Node visitIntegerLiteralExp(@NonNull IntegerLiteralExp integerLiteralExp) {
Number numberValue = ClassUtil.nonNullState(integerLiteralExp.getIntegerSymbol());
- Node operationNode = createNumericLiteralNode(getRequiredInitUtility(integerLiteralExp), numberValue, integerLiteralExp);
+ Node operationNode = createNumericLiteralNode(numberValue, integerLiteralExp);
return operationNode;
}
@@ -1329,7 +1329,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
initNode.setOriginatingVariable(ownedVariable);
}
else {
- Node varNode = createLetNode(resultUtility, ownedVariable, initNode);
+ Node varNode = createLetNode(ownedVariable, initNode);
createCastEdge(resultUtility, initNode, variableClassDatum, varNode);
}
return synthesize(letExp.getOwnedIn());
@@ -1359,7 +1359,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
}
boolean isMatched = mapLiteralExp.isIsRequired();
ExpressionSynthesizer nestedAnalyzer = getRequiredExpressionSynthesizer(isMatched);
- return nestedAnalyzer.createMapLiteral(resultUtility, mapLiteralExp, mapParts, partNodes);
+ return nestedAnalyzer.createMapLiteral(mapLiteralExp, mapParts, partNodes);
}
@Override
@@ -1421,7 +1421,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
@Override
public @NonNull Node visitRealLiteralExp(@NonNull RealLiteralExp realLiteralExp) {
Number numberValue = ClassUtil.nonNullState(realLiteralExp.getRealSymbol());
- Node operationNode = createNumericLiteralNode(getRequiredInitUtility(realLiteralExp), numberValue, realLiteralExp);
+ Node operationNode = createNumericLiteralNode(numberValue, realLiteralExp);
return operationNode;
}
@@ -1449,7 +1449,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
@Override
public @NonNull Node visitStringLiteralExp(@NonNull StringLiteralExp stringLiteralExp) {
String stringValue = ClassUtil.nonNullState(stringLiteralExp.getStringSymbol());
- Node operationNode = createStringLiteralNode(getRequiredInitUtility(stringLiteralExp), stringValue, stringLiteralExp);
+ Node operationNode = createStringLiteralNode(stringValue, stringLiteralExp);
return operationNode;
}
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java
index 2cd8c8631..24c2db818 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java
@@ -356,13 +356,13 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
return node;
}
- public @NonNull Edge createKeyPartEdge(@NonNull Node sourceNode, @NonNull PropertyDatum propertyDatum, @NonNull Node targetNode) {
+ public @NonNull Edge createKeyPartEdge(@NonNull InitUtility initUtility, @NonNull Node sourceNode, @NonNull PropertyDatum propertyDatum, @NonNull Node targetNode) {
Role edgeRole = getNodeRole(sourceNode);
KeyPartEdge edge = QVTscheduleFactory.eINSTANCE.createKeyPartEdge();
edge.setReferredPart(propertyDatum);
Property referredProperty = QVTscheduleUtil.getReferredProperty(propertyDatum);
String name = "«" + QVTrelationUtil.getName(referredProperty) + "»";
- edge.initialize(edgeRole, targetNode.getInitUtility(), sourceNode, name, targetNode);
+ edge.initialize(edgeRole, initUtility, sourceNode, name, targetNode);
return edge;
}
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 46b757804..6da0061d5 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
@@ -1233,7 +1233,7 @@ public class RelationAnalysis extends RuleAnalysis
Node node = property2node.get(property);
assert node != null;
PropertyDatum propertyDatum = scheduleManager.getPropertyDatum(classDatum, property);
- createKeyPartEdge(node, propertyDatum, keyNode);
+ createKeyPartEdge(keyNode.getInitUtility(), node, propertyDatum, keyNode);
}
return null;
}

Back to the top