Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2019-12-02 18:49:27 +0000
committerEd Willink2019-12-02 18:49:27 +0000
commit1e778bbfaa9c06e6df55ae02e15ce56a05f3b321 (patch)
tree7cf8ca176f63e51b746d8b6b157afebce0fa8f7e
parent75e1fa42a7a2db65410cfed6e65a0dddc7b0764a (diff)
downloadorg.eclipse.qvtd-1e778bbfaa9c06e6df55ae02e15ce56a05f3b321.tar.gz
org.eclipse.qvtd-1e778bbfaa9c06e6df55ae02e15ce56a05f3b321.tar.xz
org.eclipse.qvtd-1e778bbfaa9c06e6df55ae02e15ce56a05f3b321.zip
ok
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtb2qvts/ExpressionSynthesizer.java4
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtm2qvts/MappingAnalysis.java4
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationAnalysis.java8
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvts2qvts/merger/EdgeMerger.java3
4 files changed, 9 insertions, 10 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 0023475ff..5e3df0e2c 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
@@ -305,7 +305,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
return context.createNavigationEdge(utility, sourceNode, source2targetProperty, targetNode, false);
}
- protected @NonNull NavigableEdge createNavigationEdge(@NonNull Node sourceNode, @NonNull Property source2targetProperty, @NonNull Node targetNode, boolean isPartial) {
+ public @NonNull NavigableEdge createNavigationEdge(@NonNull Node sourceNode, @NonNull Property source2targetProperty, @NonNull Node targetNode, boolean isPartial) {
InitUtility utility = getRequiredInitUtility(targetNode);
return context.createNavigationEdge(utility, sourceNode, source2targetProperty, targetNode, isPartial);
}
@@ -372,7 +372,7 @@ public abstract class ExpressionSynthesizer extends AbstractExtendingQVTbaseVisi
// return context.createRealizedDataTypeNode(utility, sourceNode, source2targetProperty);
// }
- protected @NonNull NavigableEdge createRealizedNavigationEdge(@NonNull Node sourceNode, @NonNull Property source2targetProperty, @NonNull Node targetNode, boolean isPartial) {
+ public @NonNull NavigableEdge createRealizedNavigationEdge(@NonNull Node sourceNode, @NonNull Property source2targetProperty, @NonNull Node targetNode, boolean isPartial) {
InitUtility utility = getRequiredInitUtility(targetNode);
return context.createRealizedNavigationEdge(utility, sourceNode, source2targetProperty, targetNode, isPartial);
}
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 bb1bca164..7ed90e897 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
@@ -677,7 +677,7 @@ extends RuleAnalysis {
ClassDatum initClassDatum = QVTscheduleUtil.getClassDatum(bestInitNode);
ClassDatum variableClassDatum = scheduleManager.getClassDatum(variable);
if (!QVTscheduleUtil.conformsTo(initClassDatum, variableClassDatum)) {
- Node castNode = createOldNode(InitUtility.NOT_KNOWN, variable);
+ Node castNode = createOldNode(InitUtility.getRequiredInitUtility(variable), variable);
rootExpressionSynthesizer.createCastEdge(bestInitNode, variableClassDatum, castNode);
bestInitNode = castNode;
}
@@ -691,7 +691,7 @@ extends RuleAnalysis {
// navigation to the bestInitNode
Node initNode = bestInitExpression.accept(rootExpressionSynthesizer);
assert initNode != null;
- createEqualsEdge(InitUtility.NOT_KNOWN, bestInitNode, initNode);
+ createEqualsEdge(initNode.getInitUtility(), bestInitNode, initNode);
}
}
return bestInitNode;
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 1018c1920..cb7c207c5 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
@@ -1181,14 +1181,14 @@ public class RelationAnalysis extends RuleAnalysis
Relation2ResultProperty relation2resultProperty = baseRelation2invocationInterface.basicGetRelation2ResultProperty();
if (relation2resultProperty != null) {
Property resultProperty = relation2resultProperty.getTraceProperty();
- createRealizedNavigationEdge(InitUtility.NOT_KNOWN, invocationNode, resultProperty, traceNode, false);
+ rootExpressionSynthesizer.createRealizedNavigationEdge(invocationNode, resultProperty, traceNode, false);
}
for (@NonNull VariableDeclaration rootVariable : QVTrelationUtil.getRootVariables(relation)) {
Node rootNode = region.getNode(rootVariable);
assert rootNode != null;
VariableDeclaration baseRootVariable = QVTrelationUtil.getOverriddenVariable(baseRelation, rootVariable);
Property traceProperty = baseRelation2invocationInterface.getTraceProperty(baseRootVariable);
- createNavigationEdge(InitUtility.NOT_KNOWN, invocationNode, traceProperty, rootNode, false);
+ rootExpressionSynthesizer.createNavigationEdge(invocationNode, traceProperty, rootNode, false);
}
}
else {
@@ -1398,7 +1398,7 @@ public class RelationAnalysis extends RuleAnalysis
for (@NonNull OCLExpression member : QVTrelationUtil.getOwnedMembers(collectionTemplateExp)) {
Node memberNode = member.accept(rootExpressionSynthesizer);
assert memberNode != null;
- createRealizedNavigationEdge(InitUtility.NOT_KNOWN, sourceNode, source2target, memberNode, true);
+ rootExpressionSynthesizer.createRealizedNavigationEdge(sourceNode, source2target, memberNode, true);
}
}
else {
@@ -1643,7 +1643,7 @@ public class RelationAnalysis extends RuleAnalysis
assert sourceNode != null;
Node memberNode = members.get(0).accept(rootExpressionSynthesizer);
assert memberNode != null;
- createNavigationEdge(InitUtility.NOT_KNOWN, sourceNode, source2target, memberNode, true);
+ rootExpressionSynthesizer.createNavigationEdge(sourceNode, source2target, memberNode, true);
return true;
}
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvts2qvts/merger/EdgeMerger.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvts2qvts/merger/EdgeMerger.java
index e9d2c1488..07e66189d 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvts2qvts/merger/EdgeMerger.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvts2qvts/merger/EdgeMerger.java
@@ -21,7 +21,6 @@ import org.eclipse.qvtd.pivot.qvtschedule.Edge;
import org.eclipse.qvtd.pivot.qvtschedule.NavigationEdge;
import org.eclipse.qvtd.pivot.qvtschedule.Node;
import org.eclipse.qvtd.pivot.qvtschedule.Role;
-import org.eclipse.qvtd.pivot.qvtschedule.utilities.InitUtility;
import org.eclipse.qvtd.pivot.qvtschedule.utilities.QVTscheduleUtil;
/**
@@ -61,7 +60,7 @@ class EdgeMerger
Edge mergedEdge2 = mergedEdge;
assert mergedEdge2 == null;
for (@NonNull Edge originalEdge : originalEdges) {
- mergedEdge2 = mergedEdge = originalEdge.createEdge(edgeRole, InitUtility.NOT_KNOWN, sourceNodeMerger, targetNodeMerger);
+ mergedEdge2 = mergedEdge = originalEdge.createEdge(edgeRole, originalEdge.getInitUtility(), sourceNodeMerger, targetNodeMerger);
break;
}
if (mergedEdge2 == null) {

Back to the top