Skip to content

Commit a9debd0

Browse files
committed
Revert "Changed MSE metamodel to remove the reference between an MSEOccurrence and its LogicalStep, allowing to save the trace (WIP, only works in sequential mode, the change certainly broke things in concurrent and coordination modes)"
This reverts commit 74c1b09. Conflicts: java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/GenericSequentialModelDebugger.java java_execution/java_engine/plugins/org.gemoc.execution.sequential.javaengine.ui/src/org/gemoc/execution/sequential/javaengine/ui/debug/OmniscientGenericSequentialModelDebugger.xtend
1 parent 399c589 commit a9debd0

File tree

22 files changed

+324
-910
lines changed

22 files changed

+324
-910
lines changed

framework/execution_framework/plugins/org.gemoc.executionframework.engine/src/org/gemoc/executionframework/engine/core/AbstractSequentialExecutionEngine.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import org.gemoc.executionframework.engine.mse.MSE;
3737
import org.gemoc.executionframework.engine.mse.MSEModel;
3838
import org.gemoc.executionframework.engine.mse.MSEOccurrence;
39-
import org.gemoc.executionframework.engine.mse.SequentialLogicalStep;
4039
import org.gemoc.xdsmlframework.api.core.IExecutionContext;
4140
import org.gemoc.xdsmlframework.api.core.ISequentialExecutionEngine;
4241
import org.gemoc.xdsmlframework.api.engine_addon.IEngineAddon;
@@ -186,16 +185,19 @@ private void startNewTransaction(InternalTransactionalEditingDomain editingDomai
186185
}
187186

188187
private LogicalStep createLogicalStep(EObject caller, String className, String methodName) {
189-
SequentialLogicalStep sequentialLogicalStep = null;
188+
LogicalStep logicalStep = MseFactory.eINSTANCE.createLogicalStep();
190189
MSE mse = findOrCreateMSE(caller, className, methodName);
190+
MSEOccurrence occurrence = null;
191191
if (traceAddon == null) {
192-
sequentialLogicalStep = MseFactory.eINSTANCE.createSequentialLogicalStep();
193-
sequentialLogicalStep.setMse(mse);
192+
occurrence = MseFactory.eINSTANCE.createMSEOccurrence();
193+
occurrence.setLogicalStep(logicalStep);
194+
occurrence.setMse(mse);
194195
} else {
195-
sequentialLogicalStep = traceAddon.getFactory().createSequentialLogicalStep(mse, new ArrayList<Object>(), new ArrayList<Object>());
196+
occurrence = traceAddon.getFactory().createMSEOccurrence(mse, new ArrayList<Object>(), new ArrayList<Object>());
197+
occurrence.setLogicalStep(logicalStep);
196198
}
197-
currentLogicalSteps.push(sequentialLogicalStep);
198-
return sequentialLogicalStep;
199+
currentLogicalSteps.push(logicalStep);
200+
return logicalStep;
199201

200202
}
201203

Lines changed: 23 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,33 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="mse" nsURI="http://www.gemoc.org/gemoc_execution_engine_mse" nsPrefix="mse">
2+
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="mse" nsURI="http://www.gemoc.org/gemoc_execution_engine_mse"
4+
nsPrefix="mse">
35
<eClassifiers xsi:type="ecore:EDataType" name="ISerializable" instanceClassName="byte[]"/>
46
<eClassifiers xsi:type="ecore:EClass" name="MSEOccurrence">
5-
<eOperations name="getLogicalStep" eType="//LogicalStep">
6-
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
7-
<details key="body" value="if (this.eContainer() instanceof LogicalStep) {&#xA;&#x9;return (LogicalStep) (this.eContainer());&#xA;} else {&#xA;&#x9;return null;&#xA;}"/>
8-
</eAnnotations>
9-
</eOperations>
10-
<eStructuralFeatures xsi:type="ecore:EReference" name="mse" lowerBound="1" eType="//MSE"/>
11-
<eStructuralFeatures xsi:type="ecore:EAttribute" name="parameters" upperBound="-1">
12-
<eType xsi:type="ecore:EDataType" href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
13-
</eStructuralFeatures>
14-
<eStructuralFeatures xsi:type="ecore:EAttribute" name="result" upperBound="-1">
15-
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
16-
</eStructuralFeatures>
7+
<eStructuralFeatures xsi:type="ecore:EReference" name="mse" lowerBound="1" eType="#//MSE"/>
8+
<eStructuralFeatures xsi:type="ecore:EAttribute" name="parameters" upperBound="-1"
9+
eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
10+
<eStructuralFeatures xsi:type="ecore:EAttribute" name="result" upperBound="-1"
11+
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
12+
<eStructuralFeatures xsi:type="ecore:EReference" name="logicalStep" eType="#//LogicalStep"
13+
eOpposite="#//LogicalStep/mseOccurrences"/>
1714
</eClassifiers>
18-
<eClassifiers xsi:type="ecore:EClass" name="MSE" abstract="true">
19-
<eSuperTypes href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//ENamedElement"/>
20-
<eOperations name="getCaller">
21-
<eType xsi:type="ecore:EClass" href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
22-
</eOperations>
23-
<eOperations name="getAction">
24-
<eType xsi:type="ecore:EClass" href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EOperation"/>
25-
</eOperations>
15+
<eClassifiers xsi:type="ecore:EClass" name="MSE" abstract="true" eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//ENamedElement">
16+
<eOperations name="getCaller" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
17+
<eOperations name="getAction" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EOperation"/>
2618
</eClassifiers>
2719
<eClassifiers xsi:type="ecore:EClass" name="MSEModel">
28-
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedMSEs" upperBound="-1" eType="//MSE" containment="true"/>
20+
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedMSEs" upperBound="-1"
21+
eType="#//MSE" containment="true"/>
2922
</eClassifiers>
30-
<eClassifiers xsi:type="ecore:EClass" name="GenericMSE" eSuperTypes="//MSE">
31-
<eOperations name="getCaller">
32-
<eType xsi:type="ecore:EClass" href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
33-
</eOperations>
34-
<eOperations name="getAction">
35-
<eType xsi:type="ecore:EClass" href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EOperation"/>
36-
</eOperations>
37-
<eStructuralFeatures xsi:type="ecore:EReference" name="callerReference">
38-
<eType xsi:type="ecore:EClass" href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
39-
</eStructuralFeatures>
40-
<eStructuralFeatures xsi:type="ecore:EReference" name="actionReference">
41-
<eType xsi:type="ecore:EClass" href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EOperation"/>
42-
</eStructuralFeatures>
23+
<eClassifiers xsi:type="ecore:EClass" name="GenericMSE" eSuperTypes="#//MSE">
24+
<eOperations name="getCaller" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
25+
<eOperations name="getAction" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EOperation"/>
26+
<eStructuralFeatures xsi:type="ecore:EReference" name="callerReference" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
27+
<eStructuralFeatures xsi:type="ecore:EReference" name="actionReference" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EOperation"/>
4328
</eClassifiers>
44-
<eClassifiers xsi:type="ecore:EClass" name="LogicalStep" abstract="true">
45-
<eOperations name="getMseOccurrences" upperBound="-1" eType="//MSEOccurrence"/>
46-
</eClassifiers>
47-
<eClassifiers xsi:type="ecore:EClass" name="ParrallelLogicalStep" eSuperTypes="//LogicalStep">
48-
<eStructuralFeatures xsi:type="ecore:EReference" name="mseOccurrences" lowerBound="1" upperBound="-1" eType="//MSEOccurrence" containment="true"/>
49-
</eClassifiers>
50-
<eClassifiers xsi:type="ecore:EClass" name="SequentialLogicalStep" eSuperTypes="//MSEOccurrence //LogicalStep">
51-
<eOperations name="getMseOccurrences" upperBound="-1" eType="//MSEOccurrence">
52-
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
53-
<details key="body" value="EList&lt;MSEOccurrence> result = new org.eclipse.emf.common.util.BasicEList&lt;MSEOccurrence>();&#xA;result.add(this);&#xA;return result;"/>
54-
</eAnnotations>
55-
</eOperations>
56-
<eOperations name="getLogicalStep" eType="//LogicalStep">
57-
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
58-
<details key="body" value="return this;"/>
59-
</eAnnotations>
60-
</eOperations>
29+
<eClassifiers xsi:type="ecore:EClass" name="LogicalStep">
30+
<eStructuralFeatures xsi:type="ecore:EReference" name="mseOccurrences" lowerBound="1"
31+
upperBound="-1" eType="#//MSEOccurrence" eOpposite="#//MSEOccurrence/logicalStep"/>
6132
</eClassifiers>
6233
</ecore:EPackage>

framework/framework_commons/plugins/org.gemoc.executionframework.engine.mse.model/src/org/gemoc/executionframework/engine/mse/LogicalStep.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,32 @@
1919
* A representation of the model object '<em><b>Logical Step</b></em>'.
2020
* <!-- end-user-doc -->
2121
*
22+
* <p>
23+
* The following features are supported:
24+
* <ul>
25+
* <li>{@link org.gemoc.executionframework.engine.mse.LogicalStep#getMseOccurrences <em>Mse Occurrences</em>}</li>
26+
* </ul>
27+
* </p>
2228
*
2329
* @see org.gemoc.executionframework.engine.mse.MsePackage#getLogicalStep()
24-
* @model abstract="true"
30+
* @model
2531
* @generated
2632
*/
2733
public interface LogicalStep extends EObject {
2834
/**
35+
* Returns the value of the '<em><b>Mse Occurrences</b></em>' reference list.
36+
* The list contents are of type {@link org.gemoc.executionframework.engine.mse.MSEOccurrence}.
37+
* It is bidirectional and its opposite is '{@link org.gemoc.executionframework.engine.mse.MSEOccurrence#getLogicalStep <em>Logical Step</em>}'.
2938
* <!-- begin-user-doc -->
3039
* <p>
3140
* If the meaning of the '<em>Mse Occurrences</em>' reference list isn't clear,
3241
* there really should be more of a description here...
3342
* </p>
3443
* <!-- end-user-doc -->
35-
* @model kind="operation"
44+
* @return the value of the '<em>Mse Occurrences</em>' reference list.
45+
* @see org.gemoc.executionframework.engine.mse.MsePackage#getLogicalStep_MseOccurrences()
46+
* @see org.gemoc.executionframework.engine.mse.MSEOccurrence#getLogicalStep
47+
* @model opposite="logicalStep" required="true"
3648
* @generated
3749
*/
3850
EList<MSEOccurrence> getMseOccurrences();

framework/framework_commons/plugins/org.gemoc.executionframework.engine.mse.model/src/org/gemoc/executionframework/engine/mse/MSEOccurrence.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* <li>{@link org.gemoc.executionframework.engine.mse.MSEOccurrence#getMse <em>Mse</em>}</li>
2626
* <li>{@link org.gemoc.executionframework.engine.mse.MSEOccurrence#getParameters <em>Parameters</em>}</li>
2727
* <li>{@link org.gemoc.executionframework.engine.mse.MSEOccurrence#getResult <em>Result</em>}</li>
28+
* <li>{@link org.gemoc.executionframework.engine.mse.MSEOccurrence#getLogicalStep <em>Logical Step</em>}</li>
2829
* </ul>
2930
* </p>
3031
*
@@ -92,16 +93,31 @@ public interface MSEOccurrence extends EObject {
9293
EList<Object> getResult();
9394

9495
/**
96+
* Returns the value of the '<em><b>Logical Step</b></em>' reference.
97+
* It is bidirectional and its opposite is '{@link org.gemoc.executionframework.engine.mse.LogicalStep#getMseOccurrences <em>Mse Occurrences</em>}'.
9598
* <!-- begin-user-doc -->
9699
* <p>
97100
* If the meaning of the '<em>Logical Step</em>' reference isn't clear,
98101
* there really should be more of a description here...
99102
* </p>
100103
* <!-- end-user-doc -->
101-
* @model kind="operation"
102-
* annotation="http://www.eclipse.org/emf/2002/GenModel body='if (this.eContainer() instanceof LogicalStep) {\n\treturn (LogicalStep) (this.eContainer());\n} else {\n\treturn null;\n}'"
104+
* @return the value of the '<em>Logical Step</em>' reference.
105+
* @see #setLogicalStep(LogicalStep)
106+
* @see org.gemoc.executionframework.engine.mse.MsePackage#getMSEOccurrence_LogicalStep()
107+
* @see org.gemoc.executionframework.engine.mse.LogicalStep#getMseOccurrences
108+
* @model opposite="mseOccurrences"
103109
* @generated
104110
*/
105111
LogicalStep getLogicalStep();
106112

113+
/**
114+
* Sets the value of the '{@link org.gemoc.executionframework.engine.mse.MSEOccurrence#getLogicalStep <em>Logical Step</em>}' reference.
115+
* <!-- begin-user-doc -->
116+
* <!-- end-user-doc -->
117+
* @param value the new value of the '<em>Logical Step</em>' reference.
118+
* @see #getLogicalStep()
119+
* @generated
120+
*/
121+
void setLogicalStep(LogicalStep value);
122+
107123
} // MSEOccurrence

framework/framework_commons/plugins/org.gemoc.executionframework.engine.mse.model/src/org/gemoc/executionframework/engine/mse/MseFactory.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,13 @@ public interface MseFactory extends EFactory {
5757
GenericMSE createGenericMSE();
5858

5959
/**
60-
* Returns a new object of class '<em>Parrallel Logical Step</em>'.
60+
* Returns a new object of class '<em>Logical Step</em>'.
6161
* <!-- begin-user-doc -->
6262
* <!-- end-user-doc -->
63-
* @return a new object of class '<em>Parrallel Logical Step</em>'.
63+
* @return a new object of class '<em>Logical Step</em>'.
6464
* @generated
6565
*/
66-
ParrallelLogicalStep createParrallelLogicalStep();
67-
68-
/**
69-
* Returns a new object of class '<em>Sequential Logical Step</em>'.
70-
* <!-- begin-user-doc -->
71-
* <!-- end-user-doc -->
72-
* @return a new object of class '<em>Sequential Logical Step</em>'.
73-
* @generated
74-
*/
75-
SequentialLogicalStep createSequentialLogicalStep();
66+
LogicalStep createLogicalStep();
7667

7768
/**
7869
* Returns the package supported by this factory.

0 commit comments

Comments
 (0)