Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2019-12-02 20:18:38 +0000
committerEd Willink2019-12-02 20:18:38 +0000
commit7f1f860364bea1eba6adf6edeb64310babd7ed23 (patch)
tree48bc7d28e7acca8ea1f2374b12ea0dbffba48b6b
parent6f548bdeec86ece06e2f908fd80e11a555054a76 (diff)
downloadorg.eclipse.qvtd-7f1f860364bea1eba6adf6edeb64310babd7ed23.tar.gz
org.eclipse.qvtd-7f1f860364bea1eba6adf6edeb64310babd7ed23.tar.xz
org.eclipse.qvtd-7f1f860364bea1eba6adf6edeb64310babd7ed23.zip
all ok wip less setMatched
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java14
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/RegionHelper.java40
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtm2qvts/MappingAnalysis.java32
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationAnalysis.java8
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/MappingNodeImpl.java8
5 files changed, 37 insertions, 65 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 c2ef47e35..91941759f 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
@@ -192,7 +192,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
if (nodeName == null) {
nodeName = QVTbaseUtil.getName(rangeOperation);
}
- Node operationNode = context.createCollectionRangeNode(!resultUtility.isConditional(), utility, nodeName, collectionRange, sourceAndArgumentNodes);
+ Node operationNode = context.createCollectionRangeNode(utility, nodeName, collectionRange, sourceAndArgumentNodes);
Parameter firstParameter = qvtbaseLibraryHelper.getRangeFirstParameter();
Parameter lastParameter = qvtbaseLibraryHelper.getRangeLastParameter();
createOperationParameterEdge(firstNode, firstParameter, -1, operationNode);
@@ -215,7 +215,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
protected @NonNull EnumLiteralNode createEnumLiteralNode(@NonNull EnumerationLiteral enumValue, @NonNull EnumLiteralExp enumLiteralExp) {
InitUtility utility = getRequiredInitUtility(enumLiteralExp);
- return context.createEnumLiteralNode(!resultUtility.isConditional(), utility, enumValue, enumLiteralExp);
+ return context.createEnumLiteralNode(utility, enumValue, enumLiteralExp);
}
protected @NonNull Node createErrorNode(@NonNull String name, @NonNull ClassDatum classDatum) {
@@ -230,7 +230,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
protected @NonNull IfNode createIfNode(@NonNull IfExp ifExp, @NonNull String name, @NonNull Node@NonNull [] sourceAndArgumentNodes) {
InitUtility utility = getRequiredInitUtility(ifExp);
- return context.createIfNode(!resultUtility.isConditional(), utility, name, ifExp, sourceAndArgumentNodes);
+ return context.createIfNode(utility, name, ifExp, sourceAndArgumentNodes);
}
protected @NonNull Edge createIteratedEdge(@NonNull Node sourceNode, @NonNull Node targetNode) {
@@ -283,7 +283,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
if (nodeName == null) {
nodeName = QVTbaseUtil.getName(partOperation);
}
- Node operationNode = context.createMapPartNode(!resultUtility.isConditional(), resultUtility, nodeName, mapLiteralPart, subPartNodes);
+ Node operationNode = context.createMapPartNode(resultUtility, nodeName, mapLiteralPart, subPartNodes);
Parameter keyParameter = qvtbaseLibraryHelper.getMapPartKeyParameter();
Parameter valueParameter = qvtbaseLibraryHelper.getMapPartValueParameter();
createOperationParameterEdge(keyNode, keyParameter, -1, operationNode);
@@ -342,7 +342,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
assert reusedNode == null;
String nameHint = CompilerUtil.recoverVariableName(callExp);
InitUtility utility = getRequiredInitUtility(callExp);
- Node operationNode = context.createOperationCallNode(!resultUtility.isConditional(), utility, nameHint, operation, callExp, sourceAndArgumentNodes);
+ Node operationNode = context.createOperationCallNode(utility, nameHint, operation, callExp, sourceAndArgumentNodes);
return operationNode;
}
protected @NonNull Node createOperationCallNode2(@NonNull String nameHint, @NonNull Role nodeRole, @NonNull Operation operation, @NonNull ClassDatum classDatum, @NonNull Node @NonNull ... sourceAndArgumentNodes) {
@@ -433,7 +433,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
}
protected @NonNull TypeLiteralNode createTypeLiteralNode(@NonNull Type typeValue, @NonNull TypeExp typeExp) {
- return context.createTypeLiteralNode(!resultUtility.isConditional(), getRequiredInitUtility(typeExp), typeValue, typeExp);
+ return context.createTypeLiteralNode(getRequiredInitUtility(typeExp), typeValue, typeExp);
}
protected @NonNull Node doLoopExp(@NonNull LoopExp loopExp, @NonNull Node sourceNode) {
@@ -638,7 +638,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
Operation ifOperation = qvtbaseLibraryHelper.getIfOperation();
@NonNull Node [] sourceAndArgumentNodes = new @NonNull Node[] { isNonNullNode, navigationNode, nullNode2 };
String nodeName = QVTbaseUtil.getName(ifOperation);
- Node ifNode = context.createIfNode2(!resultUtility.isConditional(), resultUtility, nodeName, QVTscheduleUtil.getClassDatum(navigationNode), sourceAndArgumentNodes);
+ Node ifNode = context.createIfNode2(resultUtility, nodeName, QVTscheduleUtil.getClassDatum(navigationNode), sourceAndArgumentNodes);
Parameter conditionParameter = qvtbaseLibraryHelper.getIfConditionParameter();
Parameter thenParameter = qvtbaseLibraryHelper.getIfThenParameter();
Parameter elseParameter = qvtbaseLibraryHelper.getIfElseParameter();
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 041a51560..2723a5646 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
@@ -150,7 +150,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
ClassDatum classDatum = scheduleManager.getBooleanClassDatum();
BooleanLiteralNode booleanLiteralNode = QVTscheduleFactory.eINSTANCE.createBooleanLiteralNode();
booleanLiteralNode.initialize(nodeRole, region, utility, Boolean.toString(booleanValue), classDatum);
- booleanLiteralNode.setMatched(!utility.isConditional());
booleanLiteralNode.setBooleanValue(booleanValue);
if (booleanLiteralExp != null) {
booleanLiteralNode.setOriginatingElement(booleanLiteralExp);
@@ -170,7 +169,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
Role nodeRole = getOperationNodePhase(region, collectionLiteralExp, partNodes);
CollectionLiteralNode node = QVTscheduleFactory.eINSTANCE.createCollectionLiteralNode();
node.initialize(nodeRole, region, utility, name, scheduleManager.getClassDatum(collectionLiteralExp));
- node.setMatched(!utility.isConditional());
node.setOriginatingElement(collectionLiteralExp);
return node;
}
@@ -185,12 +183,10 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
return edge;
}
- public @NonNull CollectionRangeNode createCollectionRangeNode(boolean isMatched, @NonNull InitUtility utility, @NonNull String name, @NonNull CollectionRange collectionRange, @NonNull Node @NonNull [] argNodes) {
- assert isMatched == !utility.isConditional();
+ public @NonNull CollectionRangeNode createCollectionRangeNode(@NonNull InitUtility utility, @NonNull String name, @NonNull CollectionRange collectionRange, @NonNull Node @NonNull [] argNodes) {
Role nodeRole = getOperationNodePhase(region, collectionRange, argNodes);
CollectionRangeNode node = QVTscheduleFactory.eINSTANCE.createCollectionRangeNode();
node.initialize(nodeRole, region, utility, name, scheduleManager.getClassDatum(collectionRange));
- node.setMatched(isMatched);
node.setOriginatingElement(collectionRange);
return node;
}
@@ -281,14 +277,12 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
return castEdge;
} */
- public @NonNull EnumLiteralNode createEnumLiteralNode(boolean isMatched, @NonNull InitUtility utility, @NonNull EnumerationLiteral enumValue, @NonNull EnumLiteralExp enumLiteralExp) {
- assert isMatched == !utility.isConditional();
+ public @NonNull EnumLiteralNode createEnumLiteralNode(@NonNull InitUtility utility, @NonNull EnumerationLiteral enumValue, @NonNull EnumLiteralExp enumLiteralExp) {
ClassDatum classDatum = scheduleManager.getClassDatum(enumLiteralExp);
String typeName = PrettyPrinter.printType(enumValue);
Role nodeRole = getOperationNodePhase(region, enumLiteralExp);
EnumLiteralNode enumLiteralNode = QVTscheduleFactory.eINSTANCE.createEnumLiteralNode();
enumLiteralNode.initialize(nodeRole, region, utility, typeName, classDatum);
- enumLiteralNode.setMatched(isMatched);
enumLiteralNode.setEnumValue(enumValue);
enumLiteralNode.setOriginatingElement(enumLiteralExp);
return enumLiteralNode;
@@ -320,21 +314,17 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
return node;
}
- public @NonNull IfNode createIfNode(boolean isMatched, @NonNull InitUtility utility, @NonNull String name, @NonNull IfExp ifExp, @NonNull Node @NonNull [] argNodes) {
- assert isMatched == !utility.isConditional();
+ public @NonNull IfNode createIfNode(@NonNull InitUtility utility, @NonNull String name, @NonNull IfExp ifExp, @NonNull Node @NonNull [] argNodes) {
Role nodeRole = getOperationNodePhase(region, ifExp, argNodes);
IfNode node = QVTscheduleFactory.eINSTANCE.createIfNode();
node.initialize(nodeRole, region, utility, name, scheduleManager.getClassDatum(ifExp));
- node.setMatched(isMatched);
node.setOriginatingElement(ifExp);
return node;
}
- public @NonNull IfNode createIfNode2(boolean isMatched, @NonNull InitUtility utility, @NonNull String name, @NonNull ClassDatum classDatum, @NonNull Node @NonNull [] argNodes) {
- assert isMatched == !utility.isConditional();
+ public @NonNull IfNode createIfNode2(@NonNull InitUtility utility, @NonNull String name, @NonNull ClassDatum classDatum, @NonNull Node @NonNull [] argNodes) {
Role nodeRole = getOperationNodePhase(region, null, argNodes);
IfNode node = QVTscheduleFactory.eINSTANCE.createIfNode();
node.initialize(nodeRole, region, utility, name, classDatum);
- node.setMatched(isMatched);
return node;
}
@@ -369,14 +359,12 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
return edge;
}
- public @NonNull Node createKeyedNode(boolean isMatched, @NonNull InitUtility utility, @NonNull String name, @NonNull VariableDeclaration templateVariable) {
- assert isMatched == !utility.isConditional();
+ public @NonNull Node createKeyedNode(@NonNull InitUtility utility, @NonNull String name, @NonNull VariableDeclaration templateVariable) {
ClassDatum classDatum = scheduleManager.getClassDatum(templateVariable);
KeyedValueNode node = QVTscheduleFactory.eINSTANCE.createKeyedValueNode();
node.setClassDatumValue(classDatum);
node.initialize(Role.REALIZED, region, utility, name, classDatum);
region.addVariableNode(templateVariable, node);
- node.setMatched(isMatched);
// node.addTypedElement(templateVariable);
return node;
}
@@ -412,7 +400,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
Role nodeRole = getOperationNodePhase(region, mapLiteralExp, partNodes);
MapLiteralNode node = QVTscheduleFactory.eINSTANCE.createMapLiteralNode();
node.initialize(nodeRole, region, utility, name, scheduleManager.getClassDatum(mapLiteralExp));
- node.setMatched(!utility.isConditional());
node.setOriginatingElement(mapLiteralExp);
return node;
}
@@ -426,13 +413,11 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
return edge;
}
- public @NonNull Node createMapPartNode(boolean isMatched, @NonNull InitUtility utility, @NonNull String name, @NonNull MapLiteralPart mapLiteralPart, @NonNull Node @NonNull [] argNodes) {
- assert isMatched == !utility.isConditional();
+ public @NonNull Node createMapPartNode(@NonNull InitUtility utility, @NonNull String name, @NonNull MapLiteralPart mapLiteralPart, @NonNull Node @NonNull [] argNodes) {
TypedElement typedElement = QVTbaseUtil.getOwnedValue(mapLiteralPart); // FIXME delete this
Role nodeRole = getOperationNodePhase(region, typedElement, argNodes);
MapPartNode node = QVTscheduleFactory.eINSTANCE.createMapPartNode();
node.initialize(nodeRole, region, utility, name, scheduleManager.getClassDatum(typedElement));
- node.setMatched(isMatched);
node.setOriginatingElement(mapLiteralPart);
return node;
}
@@ -478,7 +463,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
}
NullLiteralNode node = QVTscheduleFactory.eINSTANCE.createNullLiteralNode();
node.initialize(nodeRole, region, utility, "┬źnull┬╗", classDatum);
- node.setMatched(!utility.isConditional());
if (nullLiteralExp != null) {
node.setOriginatingElement(nullLiteralExp);
}
@@ -489,7 +473,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
Role nodeRole = getOperationNodePhase(region, numericLiteralExp);
NumericLiteralNode node = QVTscheduleFactory.eINSTANCE.createNumericLiteralNode();
node.initialize(nodeRole, region, utility, numericValue.toString(), scheduleManager.getClassDatum(numericLiteralExp));
- node.setMatched(!utility.isConditional());
node.setNumericValue(numericValue);
node.setOriginatingElement(numericLiteralExp);
return node;
@@ -519,8 +502,7 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
return node;
}
- public @NonNull OperationCallNode createOperationCallNode(boolean isMatched, @NonNull InitUtility utility, @Nullable String nameHint, @NonNull Operation operation, @NonNull TypedElement callExpOrCollectionTemplateExp, @NonNull Node ... argNodes) {
- assert isMatched == !utility.isConditional();
+ public @NonNull OperationCallNode createOperationCallNode(@NonNull InitUtility utility, @Nullable String nameHint, @NonNull Operation operation, @NonNull TypedElement callExpOrCollectionTemplateExp, @NonNull Node ... argNodes) {
String name = nameHint;
if (name == null) {
name = QVTbaseUtil.getName(operation);
@@ -528,7 +510,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
Role nodeRole = getOperationNodePhase(region, callExpOrCollectionTemplateExp, argNodes);
OperationCallNode node = QVTscheduleFactory.eINSTANCE.createOperationCallNode();
node.initialize(nodeRole, region, utility, name, scheduleManager.getClassDatum(callExpOrCollectionTemplateExp));
- node.setMatched(isMatched);
node.setOriginatingElement(callExpOrCollectionTemplateExp);
node.setReferredOperation(operation);
return node;
@@ -712,7 +693,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
Role nodeRole = getOperationNodePhase(region, shadowExp, partNodes);
ShadowNode node = QVTscheduleFactory.eINSTANCE.createShadowNode();
node.initialize(nodeRole, region, utility, name, scheduleManager.getClassDatum(shadowExp));
- node.setMatched(!utility.isConditional());
node.setOriginatingElement(shadowExp);
return node;
}
@@ -755,7 +735,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
Role nodeRole = getOperationNodePhase(region, stringLiteralExp);
StringLiteralNode node = QVTscheduleFactory.eINSTANCE.createStringLiteralNode();
node.initialize(nodeRole, region, utility, stringValue, scheduleManager.getClassDatum(stringLiteralExp));
- node.setMatched(!utility.isConditional());
node.setStringValue(stringValue);
node.setOriginatingElement(stringLiteralExp);
return node;
@@ -765,7 +744,6 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
Role nodeRole = getOperationNodePhase(region, tupleLiteralExp, partNodes);
TupleLiteralNode node = QVTscheduleFactory.eINSTANCE.createTupleLiteralNode();
node.initialize(nodeRole, region, utility, name, scheduleManager.getClassDatum(tupleLiteralExp));
- node.setMatched(!utility.isConditional());
node.setOriginatingElement(tupleLiteralExp);
return node;
}
@@ -779,14 +757,12 @@ public class RegionHelper<R extends Region> extends QVTscheduleUtil implements N
return edge;
}
- public @NonNull TypeLiteralNode createTypeLiteralNode(boolean isMatched, @NonNull InitUtility utility, @NonNull Type typeValue, @NonNull TypeExp typeExp) {
- assert isMatched == !utility.isConditional();
+ public @NonNull TypeLiteralNode createTypeLiteralNode(@NonNull InitUtility utility, @NonNull Type typeValue, @NonNull TypeExp typeExp) {
ClassDatum classDatum = scheduleManager.getClassDatum(typeExp);
// String typeName = PrettyPrinter.printType(QVTscheduleUtil.getCompleteClass(classDatum));
Role nodeRole = getOperationNodePhase(region, typeExp);
TypeLiteralNode typeLiteralNode = QVTscheduleFactory.eINSTANCE.createTypeLiteralNode();
typeLiteralNode.initialize(nodeRole, region, utility, String.valueOf(typeValue), classDatum);
- typeLiteralNode.setMatched(isMatched);
typeLiteralNode.setTypeValue(typeValue);
typeLiteralNode.setOriginatingElement(typeExp);
return typeLiteralNode;
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 66bb4e022..e756fbc4e 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
@@ -470,10 +470,8 @@ public class MappingAnalysis extends RuleAnalysis
analyzeContainments();
rewriteCastEdges();
//
- Iterable<@NonNull Node> headNodes = RuleHeadAnalysis
- .computeRuleHeadNodes(scheduleManager, region, null);
- Iterables.addAll(QVTscheduleUtil.Internal.getHeadNodesList(region),
- headNodes);
+ Iterable<@NonNull Node> headNodes = RuleHeadAnalysis.computeRuleHeadNodes(scheduleManager, region, null);
+ Iterables.addAll(QVTscheduleUtil.Internal.getHeadNodesList(region), headNodes);
}
//
@@ -514,11 +512,9 @@ public class MappingAnalysis extends RuleAnalysis
// assert (boundVariable == null) || targetNode.isGuard();
assert sourceNode.isClass();
if (!referredProperty.isIsMany()) {
- Edge predicateEdge = sourceNode
- .getOutgoingPredicateEdge(referredProperty);
+ Edge predicateEdge = sourceNode.getOutgoingPredicateEdge(referredProperty);
if (predicateEdge == null) {
- createNavigationEdge(InitUtility.NON_NULL_MATCHED,
- sourceNode, referredProperty, targetNode, false);
+ createNavigationEdge(InitUtility.NON_NULL_MATCHED, sourceNode, referredProperty, targetNode, false);
} else {
assert predicateEdge.getEdgeTarget() == targetNode;
}
@@ -528,8 +524,7 @@ public class MappingAnalysis extends RuleAnalysis
return true;
}
- private @Nullable Node analyzeVariable(@NonNull Variable variable,
- @NonNull List<@NonNull OCLExpression> expressions) {
+ private @Nullable Node analyzeVariable(@NonNull Variable variable, @NonNull List<@NonNull OCLExpression> expressions) {
//
// Use something hard to compute as the initializer that creates an
// initNode in the hope that other
@@ -537,31 +532,24 @@ public class MappingAnalysis extends RuleAnalysis
// edges.
//
OCLExpression bestInitExpression = null;
- for (@NonNull
- OCLExpression initExpression : expressions) {
+ for (@NonNull OCLExpression initExpression : expressions) {
if (initExpression instanceof OperationCallExp) {
OperationCallExp operationCallExp = (OperationCallExp) initExpression;
- OperationId operationId = operationCallExp
- .getReferredOperation().getOperationId();
+ OperationId operationId = operationCallExp.getReferredOperation().getOperationId();
if (!PivotUtil.isSameOperation(operationId,
- OperationId.OCLANY_EQUALS)
- && !PivotUtil.isSameOperation(operationId,
- OperationId.OCLANY_NOT_EQUALS)) {
+ OperationId.OCLANY_EQUALS) && !PivotUtil.isSameOperation(operationId, OperationId.OCLANY_NOT_EQUALS)) {
bestInitExpression = initExpression;
break;
}
}
}
if (bestInitExpression == null) {
- bestInitExpression = (expressions.size() > 0)
- ? expressions.get(0)
- : null;
+ bestInitExpression = (expressions.size() > 0) ? expressions.get(0) : null;
}
if (bestInitExpression == null) {
return null;
}
- Node bestInitNode = bestInitExpression.accept(rootExpressionSynthesizer
- .getRequiredExpressionSynthesizer(variable.isIsRequired()));
+ Node bestInitNode = bestInitExpression.accept(rootExpressionSynthesizer.getRequiredExpressionSynthesizer(variable.isIsRequired()));
assert bestInitNode != null;
/*
* if ((ownedInit instanceof OperationCallExp) &&
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 191c7b8ab..875edae52 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
@@ -1269,7 +1269,7 @@ public class RelationAnalysis extends RuleAnalysis
if (memberNode != null) {
Node selfNode = residueNode;
assert selfNode != null;
- residueNode = createOperationCallNode(true, InitUtility.NON_NULL_MATCHED, null, collectionExcludingOperation, collectionTemplateExp, residueNode, memberNode);
+ residueNode = createOperationCallNode(InitUtility.NON_NULL_MATCHED, null, collectionExcludingOperation, collectionTemplateExp, residueNode, memberNode);
createOperationSelfEdge(selfNode.getInitUtility(), selfNode, QVTrelationUtil.getType(collectionExcludingOperation), residueNode);
createOperationParameterEdge(memberNode.getInitUtility(), memberNode, QVTrelationUtil.getOwnedParameter(collectionExcludingOperation, 0), -1, residueNode);
}
@@ -1284,7 +1284,7 @@ public class RelationAnalysis extends RuleAnalysis
if (memberNode != null) {
Node selfNode = residueNode;
assert selfNode != null;
- residueNode = createOperationCallNode(true, InitUtility.NON_NULL_MATCHED, null, collectionExcludingOperation, collectionTemplateExp, residueNode, memberNode);
+ residueNode = createOperationCallNode(InitUtility.NON_NULL_MATCHED, null, collectionExcludingOperation, collectionTemplateExp, residueNode, memberNode);
createOperationSelfEdge(selfNode.getInitUtility(), selfNode, QVTrelationUtil.getType(collectionExcludingOperation), residueNode);
createOperationParameterEdge(memberNode.getInitUtility(), memberNode, QVTrelationUtil.getOwnedParameter(collectionExcludingOperation, 0), -1, residueNode);
}
@@ -1294,7 +1294,7 @@ public class RelationAnalysis extends RuleAnalysis
}
if (rest == null) {
Operation collectionIsEmptyOperation = scheduleManager.getStandardLibraryHelper().getCollectionIsEmptyOperation();
- Node isEmptyNode = createOperationCallNode(true, InitUtility.NON_NULL_MATCHED, null, collectionIsEmptyOperation, collectionTemplateExp, residueNode);
+ Node isEmptyNode = createOperationCallNode(InitUtility.NON_NULL_MATCHED, null, collectionIsEmptyOperation, collectionTemplateExp, residueNode);
createPredicatedStepNode(InitUtility.NON_NULL_MATCHED, isEmptyNode, false);
}
}
@@ -1875,7 +1875,7 @@ public class RelationAnalysis extends RuleAnalysis
}
else if (getKeyedOutputVariables().contains(variableDeclaration)) {
boolean isUnconditional = true;
- createKeyedNode(isUnconditional, InitUtility.NON_NULL_MATCHED, QVTrelationUtil.getName(variableDeclaration), variableDeclaration);
+ createKeyedNode(InitUtility.NON_NULL_MATCHED, QVTrelationUtil.getName(variableDeclaration), variableDeclaration);
return; // keyed object created by synthesizeKeyedObject
}
else if (getTopWhenedOutputVariables().contains(variableDeclaration)) {
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/MappingNodeImpl.java b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/MappingNodeImpl.java
index 7e1f6e83b..8c50fec33 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/MappingNodeImpl.java
+++ b/plugins/org.eclipse.qvtd.pivot.qvtschedule/emf-gen/org/eclipse/qvtd/pivot/qvtschedule/impl/MappingNodeImpl.java
@@ -30,11 +30,13 @@ import org.eclipse.ocl.pivot.Variable;
import org.eclipse.ocl.pivot.VariableDeclaration;
import org.eclipse.ocl.pivot.internal.ElementImpl;
import org.eclipse.ocl.pivot.utilities.ClassUtil;
+import org.eclipse.qvtd.pivot.qvtschedule.ClassDatum;
import org.eclipse.qvtd.pivot.qvtschedule.MappingNode;
import org.eclipse.qvtd.pivot.qvtschedule.Node;
import org.eclipse.qvtd.pivot.qvtschedule.QVTschedulePackage;
import org.eclipse.qvtd.pivot.qvtschedule.Region;
import org.eclipse.qvtd.pivot.qvtschedule.Role;
+import org.eclipse.qvtd.pivot.qvtschedule.utilities.InitUtility;
/**
* <!-- begin-user-doc -->
@@ -239,6 +241,12 @@ public abstract class MappingNodeImpl extends NodeImpl implements MappingNode {
}
@Override
+ public void initialize(@NonNull Role nodeRole, @NonNull Region region, @NonNull InitUtility initUtility, String name, ClassDatum classDatum) {
+ super.initialize(nodeRole, region, initUtility, name, classDatum);
+ setMatched(!initUtility.isConditional());
+ }
+
+ @Override
public boolean isRequired() {
boolean superIsRequired = super.isRequired();
assert superIsRequired == isRequired;

Back to the top