diff options
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl')
10 files changed, 324 insertions, 66 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java index 9f6bc7ae..f7d045ca 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java | |||
@@ -14,7 +14,7 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | |||
14 | import org.eclipse.viatra.solver.language.model.problem.Argument; | 14 | import org.eclipse.viatra.solver.language.model.problem.Argument; |
15 | import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; | 15 | import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; |
16 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | 16 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; |
17 | import org.eclipse.viatra.solver.language.model.problem.Variable; | 17 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNode; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * <!-- begin-user-doc --> | 20 | * <!-- begin-user-doc --> |
@@ -24,7 +24,7 @@ import org.eclipse.viatra.solver.language.model.problem.Variable; | |||
24 | * The following features are implemented: | 24 | * The following features are implemented: |
25 | * </p> | 25 | * </p> |
26 | * <ul> | 26 | * <ul> |
27 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ArgumentImpl#getVariable <em>Variable</em>}</li> | 27 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ArgumentImpl#getVariableOrNode <em>Variable Or Node</em>}</li> |
28 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ArgumentImpl#getSingletonVariable <em>Singleton Variable</em>}</li> | 28 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ArgumentImpl#getSingletonVariable <em>Singleton Variable</em>}</li> |
29 | * </ul> | 29 | * </ul> |
30 | * | 30 | * |
@@ -32,14 +32,14 @@ import org.eclipse.viatra.solver.language.model.problem.Variable; | |||
32 | */ | 32 | */ |
33 | public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argument { | 33 | public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argument { |
34 | /** | 34 | /** |
35 | * The cached value of the '{@link #getVariable() <em>Variable</em>}' reference. | 35 | * The cached value of the '{@link #getVariableOrNode() <em>Variable Or Node</em>}' reference. |
36 | * <!-- begin-user-doc --> | 36 | * <!-- begin-user-doc --> |
37 | * <!-- end-user-doc --> | 37 | * <!-- end-user-doc --> |
38 | * @see #getVariable() | 38 | * @see #getVariableOrNode() |
39 | * @generated | 39 | * @generated |
40 | * @ordered | 40 | * @ordered |
41 | */ | 41 | */ |
42 | protected Variable variable; | 42 | protected VariableOrNode variableOrNode; |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * The cached value of the '{@link #getSingletonVariable() <em>Singleton Variable</em>}' containment reference. | 45 | * The cached value of the '{@link #getSingletonVariable() <em>Singleton Variable</em>}' containment reference. |
@@ -75,17 +75,17 @@ public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argume | |||
75 | * <!-- end-user-doc --> | 75 | * <!-- end-user-doc --> |
76 | * @generated | 76 | * @generated |
77 | */ | 77 | */ |
78 | public Variable getVariable() { | 78 | public VariableOrNode getVariableOrNode() { |
79 | if (variable != null && variable.eIsProxy()) { | 79 | if (variableOrNode != null && variableOrNode.eIsProxy()) { |
80 | InternalEObject oldVariable = (InternalEObject) variable; | 80 | InternalEObject oldVariableOrNode = (InternalEObject) variableOrNode; |
81 | variable = (Variable) eResolveProxy(oldVariable); | 81 | variableOrNode = (VariableOrNode) eResolveProxy(oldVariableOrNode); |
82 | if (variable != oldVariable) { | 82 | if (variableOrNode != oldVariableOrNode) { |
83 | if (eNotificationRequired()) | 83 | if (eNotificationRequired()) |
84 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.ARGUMENT__VARIABLE, | 84 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.ARGUMENT__VARIABLE_OR_NODE, |
85 | oldVariable, variable)); | 85 | oldVariableOrNode, variableOrNode)); |
86 | } | 86 | } |
87 | } | 87 | } |
88 | return variable; | 88 | return variableOrNode; |
89 | } | 89 | } |
90 | 90 | ||
91 | /** | 91 | /** |
@@ -93,8 +93,8 @@ public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argume | |||
93 | * <!-- end-user-doc --> | 93 | * <!-- end-user-doc --> |
94 | * @generated | 94 | * @generated |
95 | */ | 95 | */ |
96 | public Variable basicGetVariable() { | 96 | public VariableOrNode basicGetVariableOrNode() { |
97 | return variable; | 97 | return variableOrNode; |
98 | } | 98 | } |
99 | 99 | ||
100 | /** | 100 | /** |
@@ -102,12 +102,12 @@ public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argume | |||
102 | * <!-- end-user-doc --> | 102 | * <!-- end-user-doc --> |
103 | * @generated | 103 | * @generated |
104 | */ | 104 | */ |
105 | public void setVariable(Variable newVariable) { | 105 | public void setVariableOrNode(VariableOrNode newVariableOrNode) { |
106 | Variable oldVariable = variable; | 106 | VariableOrNode oldVariableOrNode = variableOrNode; |
107 | variable = newVariable; | 107 | variableOrNode = newVariableOrNode; |
108 | if (eNotificationRequired()) | 108 | if (eNotificationRequired()) |
109 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ARGUMENT__VARIABLE, oldVariable, | 109 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ARGUMENT__VARIABLE_OR_NODE, |
110 | variable)); | 110 | oldVariableOrNode, variableOrNode)); |
111 | } | 111 | } |
112 | 112 | ||
113 | /** | 113 | /** |
@@ -182,10 +182,10 @@ public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argume | |||
182 | @Override | 182 | @Override |
183 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | 183 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
184 | switch (featureID) { | 184 | switch (featureID) { |
185 | case ProblemPackage.ARGUMENT__VARIABLE: | 185 | case ProblemPackage.ARGUMENT__VARIABLE_OR_NODE: |
186 | if (resolve) | 186 | if (resolve) |
187 | return getVariable(); | 187 | return getVariableOrNode(); |
188 | return basicGetVariable(); | 188 | return basicGetVariableOrNode(); |
189 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: | 189 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: |
190 | return getSingletonVariable(); | 190 | return getSingletonVariable(); |
191 | } | 191 | } |
@@ -200,8 +200,8 @@ public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argume | |||
200 | @Override | 200 | @Override |
201 | public void eSet(int featureID, Object newValue) { | 201 | public void eSet(int featureID, Object newValue) { |
202 | switch (featureID) { | 202 | switch (featureID) { |
203 | case ProblemPackage.ARGUMENT__VARIABLE: | 203 | case ProblemPackage.ARGUMENT__VARIABLE_OR_NODE: |
204 | setVariable((Variable) newValue); | 204 | setVariableOrNode((VariableOrNode) newValue); |
205 | return; | 205 | return; |
206 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: | 206 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: |
207 | setSingletonVariable((ImplicitVariable) newValue); | 207 | setSingletonVariable((ImplicitVariable) newValue); |
@@ -218,8 +218,8 @@ public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argume | |||
218 | @Override | 218 | @Override |
219 | public void eUnset(int featureID) { | 219 | public void eUnset(int featureID) { |
220 | switch (featureID) { | 220 | switch (featureID) { |
221 | case ProblemPackage.ARGUMENT__VARIABLE: | 221 | case ProblemPackage.ARGUMENT__VARIABLE_OR_NODE: |
222 | setVariable((Variable) null); | 222 | setVariableOrNode((VariableOrNode) null); |
223 | return; | 223 | return; |
224 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: | 224 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: |
225 | setSingletonVariable((ImplicitVariable) null); | 225 | setSingletonVariable((ImplicitVariable) null); |
@@ -236,8 +236,8 @@ public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argume | |||
236 | @Override | 236 | @Override |
237 | public boolean eIsSet(int featureID) { | 237 | public boolean eIsSet(int featureID) { |
238 | switch (featureID) { | 238 | switch (featureID) { |
239 | case ProblemPackage.ARGUMENT__VARIABLE: | 239 | case ProblemPackage.ARGUMENT__VARIABLE_OR_NODE: |
240 | return variable != null; | 240 | return variableOrNode != null; |
241 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: | 241 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: |
242 | return singletonVariable != null; | 242 | return singletonVariable != null; |
243 | } | 243 | } |
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java index 89de4d01..774a6e33 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java | |||
@@ -22,6 +22,7 @@ import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; | |||
22 | import org.eclipse.viatra.solver.language.model.problem.Node; | 22 | import org.eclipse.viatra.solver.language.model.problem.Node; |
23 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | 23 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; |
24 | import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; | 24 | import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; |
25 | import org.eclipse.viatra.solver.language.model.problem.Relation; | ||
25 | 26 | ||
26 | /** | 27 | /** |
27 | * <!-- begin-user-doc --> | 28 | * <!-- begin-user-doc --> |
@@ -68,7 +69,7 @@ public class ClassDeclarationImpl extends RelationImpl implements ClassDeclarati | |||
68 | * @generated | 69 | * @generated |
69 | * @ordered | 70 | * @ordered |
70 | */ | 71 | */ |
71 | protected EList<ClassDeclaration> superTypes; | 72 | protected EList<Relation> superTypes; |
72 | 73 | ||
73 | /** | 74 | /** |
74 | * The cached value of the '{@link #getReferenceDeclarations() <em>Reference Declarations</em>}' containment reference list. | 75 | * The cached value of the '{@link #getReferenceDeclarations() <em>Reference Declarations</em>}' containment reference list. |
@@ -136,9 +137,9 @@ public class ClassDeclarationImpl extends RelationImpl implements ClassDeclarati | |||
136 | * <!-- end-user-doc --> | 137 | * <!-- end-user-doc --> |
137 | * @generated | 138 | * @generated |
138 | */ | 139 | */ |
139 | public EList<ClassDeclaration> getSuperTypes() { | 140 | public EList<Relation> getSuperTypes() { |
140 | if (superTypes == null) { | 141 | if (superTypes == null) { |
141 | superTypes = new EObjectResolvingEList<ClassDeclaration>(ClassDeclaration.class, this, | 142 | superTypes = new EObjectResolvingEList<Relation>(Relation.class, this, |
142 | ProblemPackage.CLASS_DECLARATION__SUPER_TYPES); | 143 | ProblemPackage.CLASS_DECLARATION__SUPER_TYPES); |
143 | } | 144 | } |
144 | return superTypes; | 145 | return superTypes; |
@@ -257,7 +258,7 @@ public class ClassDeclarationImpl extends RelationImpl implements ClassDeclarati | |||
257 | return; | 258 | return; |
258 | case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES: | 259 | case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES: |
259 | getSuperTypes().clear(); | 260 | getSuperTypes().clear(); |
260 | getSuperTypes().addAll((Collection<? extends ClassDeclaration>) newValue); | 261 | getSuperTypes().addAll((Collection<? extends Relation>) newValue); |
261 | return; | 262 | return; |
262 | case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: | 263 | case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: |
263 | getReferenceDeclarations().clear(); | 264 | getReferenceDeclarations().clear(); |
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/EnumDeclarationImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/EnumDeclarationImpl.java new file mode 100644 index 00000000..aac00423 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/EnumDeclarationImpl.java | |||
@@ -0,0 +1,150 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import java.util.Collection; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.NotificationChain; | ||
8 | |||
9 | import org.eclipse.emf.common.util.EList; | ||
10 | |||
11 | import org.eclipse.emf.ecore.EClass; | ||
12 | import org.eclipse.emf.ecore.InternalEObject; | ||
13 | |||
14 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
15 | import org.eclipse.emf.ecore.util.InternalEList; | ||
16 | |||
17 | import org.eclipse.viatra.solver.language.model.problem.EnumDeclaration; | ||
18 | import org.eclipse.viatra.solver.language.model.problem.Node; | ||
19 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
20 | |||
21 | /** | ||
22 | * <!-- begin-user-doc --> | ||
23 | * An implementation of the model object '<em><b>Enum Declaration</b></em>'. | ||
24 | * <!-- end-user-doc --> | ||
25 | * <p> | ||
26 | * The following features are implemented: | ||
27 | * </p> | ||
28 | * <ul> | ||
29 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.EnumDeclarationImpl#getLiterals <em>Literals</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class EnumDeclarationImpl extends RelationImpl implements EnumDeclaration { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getLiterals() <em>Literals</em>}' containment reference list. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getLiterals() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected EList<Node> literals; | ||
44 | |||
45 | /** | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @generated | ||
49 | */ | ||
50 | protected EnumDeclarationImpl() { | ||
51 | super(); | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | @Override | ||
60 | protected EClass eStaticClass() { | ||
61 | return ProblemPackage.Literals.ENUM_DECLARATION; | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @generated | ||
68 | */ | ||
69 | public EList<Node> getLiterals() { | ||
70 | if (literals == null) { | ||
71 | literals = new EObjectContainmentEList<Node>(Node.class, this, ProblemPackage.ENUM_DECLARATION__LITERALS); | ||
72 | } | ||
73 | return literals; | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @generated | ||
80 | */ | ||
81 | @Override | ||
82 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
83 | switch (featureID) { | ||
84 | case ProblemPackage.ENUM_DECLARATION__LITERALS: | ||
85 | return ((InternalEList<?>) getLiterals()).basicRemove(otherEnd, msgs); | ||
86 | } | ||
87 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | @Override | ||
96 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
97 | switch (featureID) { | ||
98 | case ProblemPackage.ENUM_DECLARATION__LITERALS: | ||
99 | return getLiterals(); | ||
100 | } | ||
101 | return super.eGet(featureID, resolve, coreType); | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | @SuppressWarnings("unchecked") | ||
110 | @Override | ||
111 | public void eSet(int featureID, Object newValue) { | ||
112 | switch (featureID) { | ||
113 | case ProblemPackage.ENUM_DECLARATION__LITERALS: | ||
114 | getLiterals().clear(); | ||
115 | getLiterals().addAll((Collection<? extends Node>) newValue); | ||
116 | return; | ||
117 | } | ||
118 | super.eSet(featureID, newValue); | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * <!-- begin-user-doc --> | ||
123 | * <!-- end-user-doc --> | ||
124 | * @generated | ||
125 | */ | ||
126 | @Override | ||
127 | public void eUnset(int featureID) { | ||
128 | switch (featureID) { | ||
129 | case ProblemPackage.ENUM_DECLARATION__LITERALS: | ||
130 | getLiterals().clear(); | ||
131 | return; | ||
132 | } | ||
133 | super.eUnset(featureID); | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @generated | ||
140 | */ | ||
141 | @Override | ||
142 | public boolean eIsSet(int featureID) { | ||
143 | switch (featureID) { | ||
144 | case ProblemPackage.ENUM_DECLARATION__LITERALS: | ||
145 | return literals != null && !literals.isEmpty(); | ||
146 | } | ||
147 | return super.eIsSet(featureID); | ||
148 | } | ||
149 | |||
150 | } //EnumDeclarationImpl | ||
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeImpl.java index 23b85a9c..0c08bb1b 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeImpl.java +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeImpl.java | |||
@@ -14,7 +14,7 @@ import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | |||
14 | * | 14 | * |
15 | * @generated | 15 | * @generated |
16 | */ | 16 | */ |
17 | public class NodeImpl extends NamedElementImpl implements Node { | 17 | public class NodeImpl extends VariableOrNodeImpl implements Node { |
18 | /** | 18 | /** |
19 | * <!-- begin-user-doc --> | 19 | * <!-- begin-user-doc --> |
20 | * <!-- end-user-doc --> | 20 | * <!-- end-user-doc --> |
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ParameterImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ParameterImpl.java index cfbf25b0..06eea3f3 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ParameterImpl.java +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ParameterImpl.java | |||
@@ -8,10 +8,9 @@ import org.eclipse.emf.ecore.EClass; | |||
8 | import org.eclipse.emf.ecore.InternalEObject; | 8 | import org.eclipse.emf.ecore.InternalEObject; |
9 | 9 | ||
10 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | 10 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
11 | |||
12 | import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; | ||
13 | import org.eclipse.viatra.solver.language.model.problem.Parameter; | 11 | import org.eclipse.viatra.solver.language.model.problem.Parameter; |
14 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | 12 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; |
13 | import org.eclipse.viatra.solver.language.model.problem.Relation; | ||
15 | 14 | ||
16 | /** | 15 | /** |
17 | * <!-- begin-user-doc --> | 16 | * <!-- begin-user-doc --> |
@@ -35,7 +34,7 @@ public class ParameterImpl extends VariableImpl implements Parameter { | |||
35 | * @generated | 34 | * @generated |
36 | * @ordered | 35 | * @ordered |
37 | */ | 36 | */ |
38 | protected ClassDeclaration parameterType; | 37 | protected Relation parameterType; |
39 | 38 | ||
40 | /** | 39 | /** |
41 | * <!-- begin-user-doc --> | 40 | * <!-- begin-user-doc --> |
@@ -61,10 +60,10 @@ public class ParameterImpl extends VariableImpl implements Parameter { | |||
61 | * <!-- end-user-doc --> | 60 | * <!-- end-user-doc --> |
62 | * @generated | 61 | * @generated |
63 | */ | 62 | */ |
64 | public ClassDeclaration getParameterType() { | 63 | public Relation getParameterType() { |
65 | if (parameterType != null && parameterType.eIsProxy()) { | 64 | if (parameterType != null && parameterType.eIsProxy()) { |
66 | InternalEObject oldParameterType = (InternalEObject) parameterType; | 65 | InternalEObject oldParameterType = (InternalEObject) parameterType; |
67 | parameterType = (ClassDeclaration) eResolveProxy(oldParameterType); | 66 | parameterType = (Relation) eResolveProxy(oldParameterType); |
68 | if (parameterType != oldParameterType) { | 67 | if (parameterType != oldParameterType) { |
69 | if (eNotificationRequired()) | 68 | if (eNotificationRequired()) |
70 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.PARAMETER__PARAMETER_TYPE, | 69 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.PARAMETER__PARAMETER_TYPE, |
@@ -79,7 +78,7 @@ public class ParameterImpl extends VariableImpl implements Parameter { | |||
79 | * <!-- end-user-doc --> | 78 | * <!-- end-user-doc --> |
80 | * @generated | 79 | * @generated |
81 | */ | 80 | */ |
82 | public ClassDeclaration basicGetParameterType() { | 81 | public Relation basicGetParameterType() { |
83 | return parameterType; | 82 | return parameterType; |
84 | } | 83 | } |
85 | 84 | ||
@@ -88,8 +87,8 @@ public class ParameterImpl extends VariableImpl implements Parameter { | |||
88 | * <!-- end-user-doc --> | 87 | * <!-- end-user-doc --> |
89 | * @generated | 88 | * @generated |
90 | */ | 89 | */ |
91 | public void setParameterType(ClassDeclaration newParameterType) { | 90 | public void setParameterType(Relation newParameterType) { |
92 | ClassDeclaration oldParameterType = parameterType; | 91 | Relation oldParameterType = parameterType; |
93 | parameterType = newParameterType; | 92 | parameterType = newParameterType; |
94 | if (eNotificationRequired()) | 93 | if (eNotificationRequired()) |
95 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.PARAMETER__PARAMETER_TYPE, | 94 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.PARAMETER__PARAMETER_TYPE, |
@@ -121,7 +120,7 @@ public class ParameterImpl extends VariableImpl implements Parameter { | |||
121 | public void eSet(int featureID, Object newValue) { | 120 | public void eSet(int featureID, Object newValue) { |
122 | switch (featureID) { | 121 | switch (featureID) { |
123 | case ProblemPackage.PARAMETER__PARAMETER_TYPE: | 122 | case ProblemPackage.PARAMETER__PARAMETER_TYPE: |
124 | setParameterType((ClassDeclaration) newValue); | 123 | setParameterType((Relation) newValue); |
125 | return; | 124 | return; |
126 | } | 125 | } |
127 | super.eSet(featureID, newValue); | 126 | super.eSet(featureID, newValue); |
@@ -136,7 +135,7 @@ public class ParameterImpl extends VariableImpl implements Parameter { | |||
136 | public void eUnset(int featureID) { | 135 | public void eUnset(int featureID) { |
137 | switch (featureID) { | 136 | switch (featureID) { |
138 | case ProblemPackage.PARAMETER__PARAMETER_TYPE: | 137 | case ProblemPackage.PARAMETER__PARAMETER_TYPE: |
139 | setParameterType((ClassDeclaration) null); | 138 | setParameterType((Relation) null); |
140 | return; | 139 | return; |
141 | } | 140 | } |
142 | super.eUnset(featureID); | 141 | super.eUnset(featureID); |
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java index 3bb50cfe..2f4144b9 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java | |||
@@ -91,6 +91,8 @@ public class ProblemFactoryImpl extends EFactoryImpl implements ProblemFactory { | |||
91 | return createUnboundedMultiplicity(); | 91 | return createUnboundedMultiplicity(); |
92 | case ProblemPackage.ARGUMENT: | 92 | case ProblemPackage.ARGUMENT: |
93 | return createArgument(); | 93 | return createArgument(); |
94 | case ProblemPackage.ENUM_DECLARATION: | ||
95 | return createEnumDeclaration(); | ||
94 | default: | 96 | default: |
95 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | 97 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
96 | } | 98 | } |
@@ -301,6 +303,16 @@ public class ProblemFactoryImpl extends EFactoryImpl implements ProblemFactory { | |||
301 | * <!-- end-user-doc --> | 303 | * <!-- end-user-doc --> |
302 | * @generated | 304 | * @generated |
303 | */ | 305 | */ |
306 | public EnumDeclaration createEnumDeclaration() { | ||
307 | EnumDeclarationImpl enumDeclaration = new EnumDeclarationImpl(); | ||
308 | return enumDeclaration; | ||
309 | } | ||
310 | |||
311 | /** | ||
312 | * <!-- begin-user-doc --> | ||
313 | * <!-- end-user-doc --> | ||
314 | * @generated | ||
315 | */ | ||
304 | public LogicValue createLogicValueFromString(EDataType eDataType, String initialValue) { | 316 | public LogicValue createLogicValueFromString(EDataType eDataType, String initialValue) { |
305 | LogicValue result = LogicValue.get(initialValue); | 317 | LogicValue result = LogicValue.get(initialValue); |
306 | if (result == null) | 318 | if (result == null) |
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java index f412addc..d10ff2f0 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java | |||
@@ -15,6 +15,7 @@ import org.eclipse.viatra.solver.language.model.problem.Assertion; | |||
15 | import org.eclipse.viatra.solver.language.model.problem.Atom; | 15 | import org.eclipse.viatra.solver.language.model.problem.Atom; |
16 | import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; | 16 | import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; |
17 | import org.eclipse.viatra.solver.language.model.problem.Conjunction; | 17 | import org.eclipse.viatra.solver.language.model.problem.Conjunction; |
18 | import org.eclipse.viatra.solver.language.model.problem.EnumDeclaration; | ||
18 | import org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity; | 19 | import org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity; |
19 | import org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier; | 20 | import org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier; |
20 | import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; | 21 | import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; |
@@ -37,6 +38,7 @@ import org.eclipse.viatra.solver.language.model.problem.Statement; | |||
37 | import org.eclipse.viatra.solver.language.model.problem.TypeScope; | 38 | import org.eclipse.viatra.solver.language.model.problem.TypeScope; |
38 | import org.eclipse.viatra.solver.language.model.problem.UnboundedMultiplicity; | 39 | import org.eclipse.viatra.solver.language.model.problem.UnboundedMultiplicity; |
39 | import org.eclipse.viatra.solver.language.model.problem.Variable; | 40 | import org.eclipse.viatra.solver.language.model.problem.Variable; |
41 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNode; | ||
40 | 42 | ||
41 | /** | 43 | /** |
42 | * <!-- begin-user-doc --> | 44 | * <!-- begin-user-doc --> |
@@ -218,6 +220,20 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
218 | * <!-- end-user-doc --> | 220 | * <!-- end-user-doc --> |
219 | * @generated | 221 | * @generated |
220 | */ | 222 | */ |
223 | private EClass enumDeclarationEClass = null; | ||
224 | |||
225 | /** | ||
226 | * <!-- begin-user-doc --> | ||
227 | * <!-- end-user-doc --> | ||
228 | * @generated | ||
229 | */ | ||
230 | private EClass variableOrNodeEClass = null; | ||
231 | |||
232 | /** | ||
233 | * <!-- begin-user-doc --> | ||
234 | * <!-- end-user-doc --> | ||
235 | * @generated | ||
236 | */ | ||
221 | private EEnum logicValueEEnum = null; | 237 | private EEnum logicValueEEnum = null; |
222 | 238 | ||
223 | /** | 239 | /** |
@@ -784,7 +800,7 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
784 | * <!-- end-user-doc --> | 800 | * <!-- end-user-doc --> |
785 | * @generated | 801 | * @generated |
786 | */ | 802 | */ |
787 | public EReference getArgument_Variable() { | 803 | public EReference getArgument_VariableOrNode() { |
788 | return (EReference) argumentEClass.getEStructuralFeatures().get(0); | 804 | return (EReference) argumentEClass.getEStructuralFeatures().get(0); |
789 | } | 805 | } |
790 | 806 | ||
@@ -802,6 +818,33 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
802 | * <!-- end-user-doc --> | 818 | * <!-- end-user-doc --> |
803 | * @generated | 819 | * @generated |
804 | */ | 820 | */ |
821 | public EClass getEnumDeclaration() { | ||
822 | return enumDeclarationEClass; | ||
823 | } | ||
824 | |||
825 | /** | ||
826 | * <!-- begin-user-doc --> | ||
827 | * <!-- end-user-doc --> | ||
828 | * @generated | ||
829 | */ | ||
830 | public EReference getEnumDeclaration_Literals() { | ||
831 | return (EReference) enumDeclarationEClass.getEStructuralFeatures().get(0); | ||
832 | } | ||
833 | |||
834 | /** | ||
835 | * <!-- begin-user-doc --> | ||
836 | * <!-- end-user-doc --> | ||
837 | * @generated | ||
838 | */ | ||
839 | public EClass getVariableOrNode() { | ||
840 | return variableOrNodeEClass; | ||
841 | } | ||
842 | |||
843 | /** | ||
844 | * <!-- begin-user-doc --> | ||
845 | * <!-- end-user-doc --> | ||
846 | * @generated | ||
847 | */ | ||
805 | public EEnum getLogicValue() { | 848 | public EEnum getLogicValue() { |
806 | return logicValueEEnum; | 849 | return logicValueEEnum; |
807 | } | 850 | } |
@@ -913,9 +956,14 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
913 | unboundedMultiplicityEClass = createEClass(UNBOUNDED_MULTIPLICITY); | 956 | unboundedMultiplicityEClass = createEClass(UNBOUNDED_MULTIPLICITY); |
914 | 957 | ||
915 | argumentEClass = createEClass(ARGUMENT); | 958 | argumentEClass = createEClass(ARGUMENT); |
916 | createEReference(argumentEClass, ARGUMENT__VARIABLE); | 959 | createEReference(argumentEClass, ARGUMENT__VARIABLE_OR_NODE); |
917 | createEReference(argumentEClass, ARGUMENT__SINGLETON_VARIABLE); | 960 | createEReference(argumentEClass, ARGUMENT__SINGLETON_VARIABLE); |
918 | 961 | ||
962 | enumDeclarationEClass = createEClass(ENUM_DECLARATION); | ||
963 | createEReference(enumDeclarationEClass, ENUM_DECLARATION__LITERALS); | ||
964 | |||
965 | variableOrNodeEClass = createEClass(VARIABLE_OR_NODE); | ||
966 | |||
919 | // Create enums | 967 | // Create enums |
920 | logicValueEEnum = createEEnum(LOGIC_VALUE); | 968 | logicValueEEnum = createEEnum(LOGIC_VALUE); |
921 | } | 969 | } |
@@ -957,18 +1005,21 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
957 | predicateDefinitionEClass.getESuperTypes().add(this.getRelation()); | 1005 | predicateDefinitionEClass.getESuperTypes().add(this.getRelation()); |
958 | predicateDefinitionEClass.getESuperTypes().add(this.getStatement()); | 1006 | predicateDefinitionEClass.getESuperTypes().add(this.getStatement()); |
959 | parameterEClass.getESuperTypes().add(this.getVariable()); | 1007 | parameterEClass.getESuperTypes().add(this.getVariable()); |
960 | variableEClass.getESuperTypes().add(this.getNamedElement()); | 1008 | variableEClass.getESuperTypes().add(this.getVariableOrNode()); |
961 | conjunctionEClass.getESuperTypes().add(this.getExistentialQuantifier()); | 1009 | conjunctionEClass.getESuperTypes().add(this.getExistentialQuantifier()); |
962 | atomEClass.getESuperTypes().add(this.getLiteral()); | 1010 | atomEClass.getESuperTypes().add(this.getLiteral()); |
963 | implicitVariableEClass.getESuperTypes().add(this.getVariable()); | 1011 | implicitVariableEClass.getESuperTypes().add(this.getVariable()); |
964 | negativeLiteralEClass.getESuperTypes().add(this.getExistentialQuantifier()); | 1012 | negativeLiteralEClass.getESuperTypes().add(this.getExistentialQuantifier()); |
965 | negativeLiteralEClass.getESuperTypes().add(this.getLiteral()); | 1013 | negativeLiteralEClass.getESuperTypes().add(this.getLiteral()); |
966 | assertionEClass.getESuperTypes().add(this.getStatement()); | 1014 | assertionEClass.getESuperTypes().add(this.getStatement()); |
967 | nodeEClass.getESuperTypes().add(this.getNamedElement()); | 1015 | nodeEClass.getESuperTypes().add(this.getVariableOrNode()); |
968 | scopeDeclarationEClass.getESuperTypes().add(this.getStatement()); | 1016 | scopeDeclarationEClass.getESuperTypes().add(this.getStatement()); |
969 | rangeMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); | 1017 | rangeMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); |
970 | exactMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); | 1018 | exactMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); |
971 | unboundedMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); | 1019 | unboundedMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); |
1020 | enumDeclarationEClass.getESuperTypes().add(this.getRelation()); | ||
1021 | enumDeclarationEClass.getESuperTypes().add(this.getStatement()); | ||
1022 | variableOrNodeEClass.getESuperTypes().add(this.getNamedElement()); | ||
972 | 1023 | ||
973 | // Initialize classes, features, and operations; add parameters | 1024 | // Initialize classes, features, and operations; add parameters |
974 | initEClass(problemEClass, Problem.class, "Problem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 1025 | initEClass(problemEClass, Problem.class, "Problem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
@@ -986,7 +1037,7 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
986 | initEAttribute(getClassDeclaration_Abstract(), ecorePackage.getEBoolean(), "abstract", null, 0, 1, | 1037 | initEAttribute(getClassDeclaration_Abstract(), ecorePackage.getEBoolean(), "abstract", null, 0, 1, |
987 | ClassDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, | 1038 | ClassDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, |
988 | !IS_DERIVED, IS_ORDERED); | 1039 | !IS_DERIVED, IS_ORDERED); |
989 | initEReference(getClassDeclaration_SuperTypes(), this.getClassDeclaration(), null, "superTypes", null, 0, -1, | 1040 | initEReference(getClassDeclaration_SuperTypes(), this.getRelation(), null, "superTypes", null, 0, -1, |
990 | ClassDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, | 1041 | ClassDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, |
991 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 1042 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
992 | initEReference(getClassDeclaration_ReferenceDeclarations(), this.getReferenceDeclaration(), null, | 1043 | initEReference(getClassDeclaration_ReferenceDeclarations(), this.getReferenceDeclaration(), null, |
@@ -998,8 +1049,8 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
998 | 1049 | ||
999 | initEClass(referenceDeclarationEClass, ReferenceDeclaration.class, "ReferenceDeclaration", !IS_ABSTRACT, | 1050 | initEClass(referenceDeclarationEClass, ReferenceDeclaration.class, "ReferenceDeclaration", !IS_ABSTRACT, |
1000 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 1051 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
1001 | initEReference(getReferenceDeclaration_ReferenceType(), this.getClassDeclaration(), null, "referenceType", null, | 1052 | initEReference(getReferenceDeclaration_ReferenceType(), this.getRelation(), null, "referenceType", null, 0, 1, |
1002 | 0, 1, ReferenceDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, | 1053 | ReferenceDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, |
1003 | IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 1054 | IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
1004 | initEReference(getReferenceDeclaration_Opposite(), this.getReferenceDeclaration(), null, "opposite", null, 0, 1, | 1055 | initEReference(getReferenceDeclaration_Opposite(), this.getReferenceDeclaration(), null, "opposite", null, 0, 1, |
1005 | ReferenceDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, | 1056 | ReferenceDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, |
@@ -1030,7 +1081,7 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
1030 | 1081 | ||
1031 | initEClass(parameterEClass, Parameter.class, "Parameter", !IS_ABSTRACT, !IS_INTERFACE, | 1082 | initEClass(parameterEClass, Parameter.class, "Parameter", !IS_ABSTRACT, !IS_INTERFACE, |
1032 | IS_GENERATED_INSTANCE_CLASS); | 1083 | IS_GENERATED_INSTANCE_CLASS); |
1033 | initEReference(getParameter_ParameterType(), this.getClassDeclaration(), null, "parameterType", null, 0, 1, | 1084 | initEReference(getParameter_ParameterType(), this.getRelation(), null, "parameterType", null, 0, 1, |
1034 | Parameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, | 1085 | Parameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, |
1035 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 1086 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
1036 | 1087 | ||
@@ -1126,13 +1177,22 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
1126 | 1177 | ||
1127 | initEClass(argumentEClass, Argument.class, "Argument", !IS_ABSTRACT, !IS_INTERFACE, | 1178 | initEClass(argumentEClass, Argument.class, "Argument", !IS_ABSTRACT, !IS_INTERFACE, |
1128 | IS_GENERATED_INSTANCE_CLASS); | 1179 | IS_GENERATED_INSTANCE_CLASS); |
1129 | initEReference(getArgument_Variable(), this.getVariable(), null, "variable", null, 0, 1, Argument.class, | 1180 | initEReference(getArgument_VariableOrNode(), this.getVariableOrNode(), null, "variableOrNode", null, 0, 1, |
1130 | !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, | 1181 | Argument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, |
1131 | IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 1182 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
1132 | initEReference(getArgument_SingletonVariable(), this.getImplicitVariable(), null, "singletonVariable", null, 0, | 1183 | initEReference(getArgument_SingletonVariable(), this.getImplicitVariable(), null, "singletonVariable", null, 0, |
1133 | 1, Argument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, | 1184 | 1, Argument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, |
1134 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 1185 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
1135 | 1186 | ||
1187 | initEClass(enumDeclarationEClass, EnumDeclaration.class, "EnumDeclaration", !IS_ABSTRACT, !IS_INTERFACE, | ||
1188 | IS_GENERATED_INSTANCE_CLASS); | ||
1189 | initEReference(getEnumDeclaration_Literals(), this.getNode(), null, "literals", null, 0, -1, | ||
1190 | EnumDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, | ||
1191 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
1192 | |||
1193 | initEClass(variableOrNodeEClass, VariableOrNode.class, "VariableOrNode", IS_ABSTRACT, !IS_INTERFACE, | ||
1194 | IS_GENERATED_INSTANCE_CLASS); | ||
1195 | |||
1136 | // Initialize enums and add enum literals | 1196 | // Initialize enums and add enum literals |
1137 | initEEnum(logicValueEEnum, LogicValue.class, "LogicValue"); | 1197 | initEEnum(logicValueEEnum, LogicValue.class, "LogicValue"); |
1138 | addEEnumLiteral(logicValueEEnum, LogicValue.TRUE); | 1198 | addEEnumLiteral(logicValueEEnum, LogicValue.TRUE); |
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java index 424db23d..8df2715f 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java | |||
@@ -9,11 +9,10 @@ import org.eclipse.emf.ecore.EClass; | |||
9 | import org.eclipse.emf.ecore.InternalEObject; | 9 | import org.eclipse.emf.ecore.InternalEObject; |
10 | 10 | ||
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | 11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
12 | |||
13 | import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; | ||
14 | import org.eclipse.viatra.solver.language.model.problem.Multiplicity; | 12 | import org.eclipse.viatra.solver.language.model.problem.Multiplicity; |
15 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | 13 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; |
16 | import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; | 14 | import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; |
15 | import org.eclipse.viatra.solver.language.model.problem.Relation; | ||
17 | 16 | ||
18 | /** | 17 | /** |
19 | * <!-- begin-user-doc --> | 18 | * <!-- begin-user-doc --> |
@@ -40,7 +39,7 @@ public class ReferenceDeclarationImpl extends RelationImpl implements ReferenceD | |||
40 | * @generated | 39 | * @generated |
41 | * @ordered | 40 | * @ordered |
42 | */ | 41 | */ |
43 | protected ClassDeclaration referenceType; | 42 | protected Relation referenceType; |
44 | 43 | ||
45 | /** | 44 | /** |
46 | * The cached value of the '{@link #getOpposite() <em>Opposite</em>}' reference. | 45 | * The cached value of the '{@link #getOpposite() <em>Opposite</em>}' reference. |
@@ -106,10 +105,10 @@ public class ReferenceDeclarationImpl extends RelationImpl implements ReferenceD | |||
106 | * <!-- end-user-doc --> | 105 | * <!-- end-user-doc --> |
107 | * @generated | 106 | * @generated |
108 | */ | 107 | */ |
109 | public ClassDeclaration getReferenceType() { | 108 | public Relation getReferenceType() { |
110 | if (referenceType != null && referenceType.eIsProxy()) { | 109 | if (referenceType != null && referenceType.eIsProxy()) { |
111 | InternalEObject oldReferenceType = (InternalEObject) referenceType; | 110 | InternalEObject oldReferenceType = (InternalEObject) referenceType; |
112 | referenceType = (ClassDeclaration) eResolveProxy(oldReferenceType); | 111 | referenceType = (Relation) eResolveProxy(oldReferenceType); |
113 | if (referenceType != oldReferenceType) { | 112 | if (referenceType != oldReferenceType) { |
114 | if (eNotificationRequired()) | 113 | if (eNotificationRequired()) |
115 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, | 114 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, |
@@ -124,7 +123,7 @@ public class ReferenceDeclarationImpl extends RelationImpl implements ReferenceD | |||
124 | * <!-- end-user-doc --> | 123 | * <!-- end-user-doc --> |
125 | * @generated | 124 | * @generated |
126 | */ | 125 | */ |
127 | public ClassDeclaration basicGetReferenceType() { | 126 | public Relation basicGetReferenceType() { |
128 | return referenceType; | 127 | return referenceType; |
129 | } | 128 | } |
130 | 129 | ||
@@ -133,8 +132,8 @@ public class ReferenceDeclarationImpl extends RelationImpl implements ReferenceD | |||
133 | * <!-- end-user-doc --> | 132 | * <!-- end-user-doc --> |
134 | * @generated | 133 | * @generated |
135 | */ | 134 | */ |
136 | public void setReferenceType(ClassDeclaration newReferenceType) { | 135 | public void setReferenceType(Relation newReferenceType) { |
137 | ClassDeclaration oldReferenceType = referenceType; | 136 | Relation oldReferenceType = referenceType; |
138 | referenceType = newReferenceType; | 137 | referenceType = newReferenceType; |
139 | if (eNotificationRequired()) | 138 | if (eNotificationRequired()) |
140 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE, | 139 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE, |
@@ -300,7 +299,7 @@ public class ReferenceDeclarationImpl extends RelationImpl implements ReferenceD | |||
300 | public void eSet(int featureID, Object newValue) { | 299 | public void eSet(int featureID, Object newValue) { |
301 | switch (featureID) { | 300 | switch (featureID) { |
302 | case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: | 301 | case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: |
303 | setReferenceType((ClassDeclaration) newValue); | 302 | setReferenceType((Relation) newValue); |
304 | return; | 303 | return; |
305 | case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: | 304 | case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: |
306 | setOpposite((ReferenceDeclaration) newValue); | 305 | setOpposite((ReferenceDeclaration) newValue); |
@@ -324,7 +323,7 @@ public class ReferenceDeclarationImpl extends RelationImpl implements ReferenceD | |||
324 | public void eUnset(int featureID) { | 323 | public void eUnset(int featureID) { |
325 | switch (featureID) { | 324 | switch (featureID) { |
326 | case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: | 325 | case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: |
327 | setReferenceType((ClassDeclaration) null); | 326 | setReferenceType((Relation) null); |
328 | return; | 327 | return; |
329 | case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: | 328 | case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: |
330 | setOpposite((ReferenceDeclaration) null); | 329 | setOpposite((ReferenceDeclaration) null); |
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableImpl.java index 0a8cde48..645ac39c 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableImpl.java +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableImpl.java | |||
@@ -14,7 +14,7 @@ import org.eclipse.viatra.solver.language.model.problem.Variable; | |||
14 | * | 14 | * |
15 | * @generated | 15 | * @generated |
16 | */ | 16 | */ |
17 | public abstract class VariableImpl extends NamedElementImpl implements Variable { | 17 | public abstract class VariableImpl extends VariableOrNodeImpl implements Variable { |
18 | /** | 18 | /** |
19 | * <!-- begin-user-doc --> | 19 | * <!-- begin-user-doc --> |
20 | * <!-- end-user-doc --> | 20 | * <!-- end-user-doc --> |
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableOrNodeImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableOrNodeImpl.java new file mode 100644 index 00000000..4964a019 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableOrNodeImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EClass; | ||
6 | |||
7 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
8 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNode; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Variable Or Node</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public abstract class VariableOrNodeImpl extends NamedElementImpl implements VariableOrNode { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected VariableOrNodeImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return ProblemPackage.Literals.VARIABLE_OR_NODE; | ||
35 | } | ||
36 | |||
37 | } //VariableOrNodeImpl | ||