diff options
Diffstat (limited to 'language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl')
14 files changed, 2072 insertions, 261 deletions
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java index f7d045ca..68b23c09 100644 --- a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ArgumentImpl.java | |||
@@ -2,55 +2,20 @@ | |||
2 | */ | 2 | */ |
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | 3 | package org.eclipse.viatra.solver.language.model.problem.impl; |
4 | 4 | ||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | import org.eclipse.emf.common.notify.NotificationChain; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | 5 | import org.eclipse.emf.ecore.EClass; |
9 | import org.eclipse.emf.ecore.InternalEObject; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
12 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | 6 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
13 | 7 | ||
14 | import org.eclipse.viatra.solver.language.model.problem.Argument; | 8 | import org.eclipse.viatra.solver.language.model.problem.Argument; |
15 | import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; | ||
16 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | 9 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; |
17 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNode; | ||
18 | 10 | ||
19 | /** | 11 | /** |
20 | * <!-- begin-user-doc --> | 12 | * <!-- begin-user-doc --> |
21 | * An implementation of the model object '<em><b>Argument</b></em>'. | 13 | * An implementation of the model object '<em><b>Argument</b></em>'. |
22 | * <!-- end-user-doc --> | 14 | * <!-- end-user-doc --> |
23 | * <p> | ||
24 | * The following features are implemented: | ||
25 | * </p> | ||
26 | * <ul> | ||
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> | ||
29 | * </ul> | ||
30 | * | 15 | * |
31 | * @generated | 16 | * @generated |
32 | */ | 17 | */ |
33 | public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argument { | 18 | public abstract class ArgumentImpl extends MinimalEObjectImpl.Container implements Argument { |
34 | /** | ||
35 | * The cached value of the '{@link #getVariableOrNode() <em>Variable Or Node</em>}' reference. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @see #getVariableOrNode() | ||
39 | * @generated | ||
40 | * @ordered | ||
41 | */ | ||
42 | protected VariableOrNode variableOrNode; | ||
43 | |||
44 | /** | ||
45 | * The cached value of the '{@link #getSingletonVariable() <em>Singleton Variable</em>}' containment reference. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see #getSingletonVariable() | ||
49 | * @generated | ||
50 | * @ordered | ||
51 | */ | ||
52 | protected ImplicitVariable singletonVariable; | ||
53 | |||
54 | /** | 19 | /** |
55 | * <!-- begin-user-doc --> | 20 | * <!-- begin-user-doc --> |
56 | * <!-- end-user-doc --> | 21 | * <!-- end-user-doc --> |
@@ -70,178 +35,4 @@ public class ArgumentImpl extends MinimalEObjectImpl.Container implements Argume | |||
70 | return ProblemPackage.Literals.ARGUMENT; | 35 | return ProblemPackage.Literals.ARGUMENT; |
71 | } | 36 | } |
72 | 37 | ||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | public VariableOrNode getVariableOrNode() { | ||
79 | if (variableOrNode != null && variableOrNode.eIsProxy()) { | ||
80 | InternalEObject oldVariableOrNode = (InternalEObject) variableOrNode; | ||
81 | variableOrNode = (VariableOrNode) eResolveProxy(oldVariableOrNode); | ||
82 | if (variableOrNode != oldVariableOrNode) { | ||
83 | if (eNotificationRequired()) | ||
84 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.ARGUMENT__VARIABLE_OR_NODE, | ||
85 | oldVariableOrNode, variableOrNode)); | ||
86 | } | ||
87 | } | ||
88 | return variableOrNode; | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | public VariableOrNode basicGetVariableOrNode() { | ||
97 | return variableOrNode; | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * <!-- begin-user-doc --> | ||
102 | * <!-- end-user-doc --> | ||
103 | * @generated | ||
104 | */ | ||
105 | public void setVariableOrNode(VariableOrNode newVariableOrNode) { | ||
106 | VariableOrNode oldVariableOrNode = variableOrNode; | ||
107 | variableOrNode = newVariableOrNode; | ||
108 | if (eNotificationRequired()) | ||
109 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ARGUMENT__VARIABLE_OR_NODE, | ||
110 | oldVariableOrNode, variableOrNode)); | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | public ImplicitVariable getSingletonVariable() { | ||
119 | return singletonVariable; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | public NotificationChain basicSetSingletonVariable(ImplicitVariable newSingletonVariable, NotificationChain msgs) { | ||
128 | ImplicitVariable oldSingletonVariable = singletonVariable; | ||
129 | singletonVariable = newSingletonVariable; | ||
130 | if (eNotificationRequired()) { | ||
131 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, | ||
132 | ProblemPackage.ARGUMENT__SINGLETON_VARIABLE, oldSingletonVariable, newSingletonVariable); | ||
133 | if (msgs == null) | ||
134 | msgs = notification; | ||
135 | else | ||
136 | msgs.add(notification); | ||
137 | } | ||
138 | return msgs; | ||
139 | } | ||
140 | |||
141 | /** | ||
142 | * <!-- begin-user-doc --> | ||
143 | * <!-- end-user-doc --> | ||
144 | * @generated | ||
145 | */ | ||
146 | public void setSingletonVariable(ImplicitVariable newSingletonVariable) { | ||
147 | if (newSingletonVariable != singletonVariable) { | ||
148 | NotificationChain msgs = null; | ||
149 | if (singletonVariable != null) | ||
150 | msgs = ((InternalEObject) singletonVariable).eInverseRemove(this, | ||
151 | EOPPOSITE_FEATURE_BASE - ProblemPackage.ARGUMENT__SINGLETON_VARIABLE, null, msgs); | ||
152 | if (newSingletonVariable != null) | ||
153 | msgs = ((InternalEObject) newSingletonVariable).eInverseAdd(this, | ||
154 | EOPPOSITE_FEATURE_BASE - ProblemPackage.ARGUMENT__SINGLETON_VARIABLE, null, msgs); | ||
155 | msgs = basicSetSingletonVariable(newSingletonVariable, msgs); | ||
156 | if (msgs != null) | ||
157 | msgs.dispatch(); | ||
158 | } else if (eNotificationRequired()) | ||
159 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ARGUMENT__SINGLETON_VARIABLE, | ||
160 | newSingletonVariable, newSingletonVariable)); | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | @Override | ||
169 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
170 | switch (featureID) { | ||
171 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: | ||
172 | return basicSetSingletonVariable(null, msgs); | ||
173 | } | ||
174 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
175 | } | ||
176 | |||
177 | /** | ||
178 | * <!-- begin-user-doc --> | ||
179 | * <!-- end-user-doc --> | ||
180 | * @generated | ||
181 | */ | ||
182 | @Override | ||
183 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
184 | switch (featureID) { | ||
185 | case ProblemPackage.ARGUMENT__VARIABLE_OR_NODE: | ||
186 | if (resolve) | ||
187 | return getVariableOrNode(); | ||
188 | return basicGetVariableOrNode(); | ||
189 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: | ||
190 | return getSingletonVariable(); | ||
191 | } | ||
192 | return super.eGet(featureID, resolve, coreType); | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @generated | ||
199 | */ | ||
200 | @Override | ||
201 | public void eSet(int featureID, Object newValue) { | ||
202 | switch (featureID) { | ||
203 | case ProblemPackage.ARGUMENT__VARIABLE_OR_NODE: | ||
204 | setVariableOrNode((VariableOrNode) newValue); | ||
205 | return; | ||
206 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: | ||
207 | setSingletonVariable((ImplicitVariable) newValue); | ||
208 | return; | ||
209 | } | ||
210 | super.eSet(featureID, newValue); | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * <!-- begin-user-doc --> | ||
215 | * <!-- end-user-doc --> | ||
216 | * @generated | ||
217 | */ | ||
218 | @Override | ||
219 | public void eUnset(int featureID) { | ||
220 | switch (featureID) { | ||
221 | case ProblemPackage.ARGUMENT__VARIABLE_OR_NODE: | ||
222 | setVariableOrNode((VariableOrNode) null); | ||
223 | return; | ||
224 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: | ||
225 | setSingletonVariable((ImplicitVariable) null); | ||
226 | return; | ||
227 | } | ||
228 | super.eUnset(featureID); | ||
229 | } | ||
230 | |||
231 | /** | ||
232 | * <!-- begin-user-doc --> | ||
233 | * <!-- end-user-doc --> | ||
234 | * @generated | ||
235 | */ | ||
236 | @Override | ||
237 | public boolean eIsSet(int featureID) { | ||
238 | switch (featureID) { | ||
239 | case ProblemPackage.ARGUMENT__VARIABLE_OR_NODE: | ||
240 | return variableOrNode != null; | ||
241 | case ProblemPackage.ARGUMENT__SINGLETON_VARIABLE: | ||
242 | return singletonVariable != null; | ||
243 | } | ||
244 | return super.eIsSet(featureID); | ||
245 | } | ||
246 | |||
247 | } //ArgumentImpl | 38 | } //ArgumentImpl |
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionArgumentImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionArgumentImpl.java new file mode 100644 index 00000000..af41b241 --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionArgumentImpl.java | |||
@@ -0,0 +1,39 @@ | |||
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.emf.ecore.impl.MinimalEObjectImpl; | ||
8 | |||
9 | import org.eclipse.viatra.solver.language.model.problem.AssertionArgument; | ||
10 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
11 | |||
12 | /** | ||
13 | * <!-- begin-user-doc --> | ||
14 | * An implementation of the model object '<em><b>Assertion Argument</b></em>'. | ||
15 | * <!-- end-user-doc --> | ||
16 | * | ||
17 | * @generated | ||
18 | */ | ||
19 | public abstract class AssertionArgumentImpl extends MinimalEObjectImpl.Container implements AssertionArgument { | ||
20 | /** | ||
21 | * <!-- begin-user-doc --> | ||
22 | * <!-- end-user-doc --> | ||
23 | * @generated | ||
24 | */ | ||
25 | protected AssertionArgumentImpl() { | ||
26 | super(); | ||
27 | } | ||
28 | |||
29 | /** | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @generated | ||
33 | */ | ||
34 | @Override | ||
35 | protected EClass eStaticClass() { | ||
36 | return ProblemPackage.Literals.ASSERTION_ARGUMENT; | ||
37 | } | ||
38 | |||
39 | } //AssertionArgumentImpl | ||
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java index 5856a276..2567d57b 100644 --- a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java | |||
@@ -6,6 +6,7 @@ import java.util.Collection; | |||
6 | 6 | ||
7 | import org.eclipse.emf.common.notify.Notification; | 7 | import org.eclipse.emf.common.notify.Notification; |
8 | 8 | ||
9 | import org.eclipse.emf.common.notify.NotificationChain; | ||
9 | import org.eclipse.emf.common.util.EList; | 10 | import org.eclipse.emf.common.util.EList; |
10 | 11 | ||
11 | import org.eclipse.emf.ecore.EClass; | 12 | import org.eclipse.emf.ecore.EClass; |
@@ -14,11 +15,11 @@ import org.eclipse.emf.ecore.InternalEObject; | |||
14 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | 15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
15 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | 16 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
16 | 17 | ||
17 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; | 18 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
18 | 19 | import org.eclipse.emf.ecore.util.InternalEList; | |
19 | import org.eclipse.viatra.solver.language.model.problem.Assertion; | 20 | import org.eclipse.viatra.solver.language.model.problem.Assertion; |
21 | import org.eclipse.viatra.solver.language.model.problem.AssertionArgument; | ||
20 | import org.eclipse.viatra.solver.language.model.problem.LogicValue; | 22 | import org.eclipse.viatra.solver.language.model.problem.LogicValue; |
21 | import org.eclipse.viatra.solver.language.model.problem.Node; | ||
22 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | 23 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; |
23 | import org.eclipse.viatra.solver.language.model.problem.Relation; | 24 | import org.eclipse.viatra.solver.language.model.problem.Relation; |
24 | 25 | ||
@@ -31,8 +32,8 @@ import org.eclipse.viatra.solver.language.model.problem.Relation; | |||
31 | * </p> | 32 | * </p> |
32 | * <ul> | 33 | * <ul> |
33 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getRelation <em>Relation</em>}</li> | 34 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getRelation <em>Relation</em>}</li> |
34 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getArguments <em>Arguments</em>}</li> | ||
35 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getValue <em>Value</em>}</li> | 35 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getValue <em>Value</em>}</li> |
36 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getArguments <em>Arguments</em>}</li> | ||
36 | * </ul> | 37 | * </ul> |
37 | * | 38 | * |
38 | * @generated | 39 | * @generated |
@@ -49,34 +50,34 @@ public class AssertionImpl extends MinimalEObjectImpl.Container implements Asser | |||
49 | protected Relation relation; | 50 | protected Relation relation; |
50 | 51 | ||
51 | /** | 52 | /** |
52 | * The cached value of the '{@link #getArguments() <em>Arguments</em>}' reference list. | 53 | * The default value of the '{@link #getValue() <em>Value</em>}' attribute. |
53 | * <!-- begin-user-doc --> | 54 | * <!-- begin-user-doc --> |
54 | * <!-- end-user-doc --> | 55 | * <!-- end-user-doc --> |
55 | * @see #getArguments() | 56 | * @see #getValue() |
56 | * @generated | 57 | * @generated |
57 | * @ordered | 58 | * @ordered |
58 | */ | 59 | */ |
59 | protected EList<Node> arguments; | 60 | protected static final LogicValue VALUE_EDEFAULT = LogicValue.TRUE; |
60 | 61 | ||
61 | /** | 62 | /** |
62 | * The default value of the '{@link #getValue() <em>Value</em>}' attribute. | 63 | * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. |
63 | * <!-- begin-user-doc --> | 64 | * <!-- begin-user-doc --> |
64 | * <!-- end-user-doc --> | 65 | * <!-- end-user-doc --> |
65 | * @see #getValue() | 66 | * @see #getValue() |
66 | * @generated | 67 | * @generated |
67 | * @ordered | 68 | * @ordered |
68 | */ | 69 | */ |
69 | protected static final LogicValue VALUE_EDEFAULT = LogicValue.TRUE; | 70 | protected LogicValue value = VALUE_EDEFAULT; |
70 | 71 | ||
71 | /** | 72 | /** |
72 | * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. | 73 | * The cached value of the '{@link #getArguments() <em>Arguments</em>}' containment reference list. |
73 | * <!-- begin-user-doc --> | 74 | * <!-- begin-user-doc --> |
74 | * <!-- end-user-doc --> | 75 | * <!-- end-user-doc --> |
75 | * @see #getValue() | 76 | * @see #getArguments() |
76 | * @generated | 77 | * @generated |
77 | * @ordered | 78 | * @ordered |
78 | */ | 79 | */ |
79 | protected LogicValue value = VALUE_EDEFAULT; | 80 | protected EList<AssertionArgument> arguments; |
80 | 81 | ||
81 | /** | 82 | /** |
82 | * <!-- begin-user-doc --> | 83 | * <!-- begin-user-doc --> |
@@ -142,9 +143,10 @@ public class AssertionImpl extends MinimalEObjectImpl.Container implements Asser | |||
142 | * <!-- end-user-doc --> | 143 | * <!-- end-user-doc --> |
143 | * @generated | 144 | * @generated |
144 | */ | 145 | */ |
145 | public EList<Node> getArguments() { | 146 | public EList<AssertionArgument> getArguments() { |
146 | if (arguments == null) { | 147 | if (arguments == null) { |
147 | arguments = new EObjectResolvingEList<Node>(Node.class, this, ProblemPackage.ASSERTION__ARGUMENTS); | 148 | arguments = new EObjectContainmentEList<AssertionArgument>(AssertionArgument.class, this, |
149 | ProblemPackage.ASSERTION__ARGUMENTS); | ||
148 | } | 150 | } |
149 | return arguments; | 151 | return arguments; |
150 | } | 152 | } |
@@ -154,6 +156,20 @@ public class AssertionImpl extends MinimalEObjectImpl.Container implements Asser | |||
154 | * <!-- end-user-doc --> | 156 | * <!-- end-user-doc --> |
155 | * @generated | 157 | * @generated |
156 | */ | 158 | */ |
159 | @Override | ||
160 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
161 | switch (featureID) { | ||
162 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
163 | return ((InternalEList<?>) getArguments()).basicRemove(otherEnd, msgs); | ||
164 | } | ||
165 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
157 | public LogicValue getValue() { | 173 | public LogicValue getValue() { |
158 | return value; | 174 | return value; |
159 | } | 175 | } |
@@ -182,10 +198,10 @@ public class AssertionImpl extends MinimalEObjectImpl.Container implements Asser | |||
182 | if (resolve) | 198 | if (resolve) |
183 | return getRelation(); | 199 | return getRelation(); |
184 | return basicGetRelation(); | 200 | return basicGetRelation(); |
185 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
186 | return getArguments(); | ||
187 | case ProblemPackage.ASSERTION__VALUE: | 201 | case ProblemPackage.ASSERTION__VALUE: |
188 | return getValue(); | 202 | return getValue(); |
203 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
204 | return getArguments(); | ||
189 | } | 205 | } |
190 | return super.eGet(featureID, resolve, coreType); | 206 | return super.eGet(featureID, resolve, coreType); |
191 | } | 207 | } |
@@ -202,13 +218,13 @@ public class AssertionImpl extends MinimalEObjectImpl.Container implements Asser | |||
202 | case ProblemPackage.ASSERTION__RELATION: | 218 | case ProblemPackage.ASSERTION__RELATION: |
203 | setRelation((Relation) newValue); | 219 | setRelation((Relation) newValue); |
204 | return; | 220 | return; |
205 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
206 | getArguments().clear(); | ||
207 | getArguments().addAll((Collection<? extends Node>) newValue); | ||
208 | return; | ||
209 | case ProblemPackage.ASSERTION__VALUE: | 221 | case ProblemPackage.ASSERTION__VALUE: |
210 | setValue((LogicValue) newValue); | 222 | setValue((LogicValue) newValue); |
211 | return; | 223 | return; |
224 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
225 | getArguments().clear(); | ||
226 | getArguments().addAll((Collection<? extends AssertionArgument>) newValue); | ||
227 | return; | ||
212 | } | 228 | } |
213 | super.eSet(featureID, newValue); | 229 | super.eSet(featureID, newValue); |
214 | } | 230 | } |
@@ -224,12 +240,12 @@ public class AssertionImpl extends MinimalEObjectImpl.Container implements Asser | |||
224 | case ProblemPackage.ASSERTION__RELATION: | 240 | case ProblemPackage.ASSERTION__RELATION: |
225 | setRelation((Relation) null); | 241 | setRelation((Relation) null); |
226 | return; | 242 | return; |
227 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
228 | getArguments().clear(); | ||
229 | return; | ||
230 | case ProblemPackage.ASSERTION__VALUE: | 243 | case ProblemPackage.ASSERTION__VALUE: |
231 | setValue(VALUE_EDEFAULT); | 244 | setValue(VALUE_EDEFAULT); |
232 | return; | 245 | return; |
246 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
247 | getArguments().clear(); | ||
248 | return; | ||
233 | } | 249 | } |
234 | super.eUnset(featureID); | 250 | super.eUnset(featureID); |
235 | } | 251 | } |
@@ -244,10 +260,10 @@ public class AssertionImpl extends MinimalEObjectImpl.Container implements Asser | |||
244 | switch (featureID) { | 260 | switch (featureID) { |
245 | case ProblemPackage.ASSERTION__RELATION: | 261 | case ProblemPackage.ASSERTION__RELATION: |
246 | return relation != null; | 262 | return relation != null; |
247 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
248 | return arguments != null && !arguments.isEmpty(); | ||
249 | case ProblemPackage.ASSERTION__VALUE: | 263 | case ProblemPackage.ASSERTION__VALUE: |
250 | return value != VALUE_EDEFAULT; | 264 | return value != VALUE_EDEFAULT; |
265 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
266 | return arguments != null && !arguments.isEmpty(); | ||
251 | } | 267 | } |
252 | return super.eIsSet(featureID); | 268 | return super.eIsSet(featureID); |
253 | } | 269 | } |
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConstantArgumentImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConstantArgumentImpl.java new file mode 100644 index 00000000..10798200 --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConstantArgumentImpl.java | |||
@@ -0,0 +1,182 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | import org.eclipse.emf.common.notify.NotificationChain; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | import org.eclipse.emf.ecore.InternalEObject; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
12 | |||
13 | import org.eclipse.viatra.solver.language.model.problem.Constant; | ||
14 | import org.eclipse.viatra.solver.language.model.problem.ConstantArgument; | ||
15 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Constant Argument</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ConstantArgumentImpl#getConstant <em>Constant</em>}</li> | ||
26 | * </ul> | ||
27 | * | ||
28 | * @generated | ||
29 | */ | ||
30 | public class ConstantArgumentImpl extends ArgumentImpl implements ConstantArgument { | ||
31 | /** | ||
32 | * The cached value of the '{@link #getConstant() <em>Constant</em>}' containment reference. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @see #getConstant() | ||
36 | * @generated | ||
37 | * @ordered | ||
38 | */ | ||
39 | protected Constant constant; | ||
40 | |||
41 | /** | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @generated | ||
45 | */ | ||
46 | protected ConstantArgumentImpl() { | ||
47 | super(); | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @generated | ||
54 | */ | ||
55 | @Override | ||
56 | protected EClass eStaticClass() { | ||
57 | return ProblemPackage.Literals.CONSTANT_ARGUMENT; | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | public Constant getConstant() { | ||
66 | return constant; | ||
67 | } | ||
68 | |||
69 | /** | ||
70 | * <!-- begin-user-doc --> | ||
71 | * <!-- end-user-doc --> | ||
72 | * @generated | ||
73 | */ | ||
74 | public NotificationChain basicSetConstant(Constant newConstant, NotificationChain msgs) { | ||
75 | Constant oldConstant = constant; | ||
76 | constant = newConstant; | ||
77 | if (eNotificationRequired()) { | ||
78 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, | ||
79 | ProblemPackage.CONSTANT_ARGUMENT__CONSTANT, oldConstant, newConstant); | ||
80 | if (msgs == null) | ||
81 | msgs = notification; | ||
82 | else | ||
83 | msgs.add(notification); | ||
84 | } | ||
85 | return msgs; | ||
86 | } | ||
87 | |||
88 | /** | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | */ | ||
93 | public void setConstant(Constant newConstant) { | ||
94 | if (newConstant != constant) { | ||
95 | NotificationChain msgs = null; | ||
96 | if (constant != null) | ||
97 | msgs = ((InternalEObject) constant).eInverseRemove(this, | ||
98 | EOPPOSITE_FEATURE_BASE - ProblemPackage.CONSTANT_ARGUMENT__CONSTANT, null, msgs); | ||
99 | if (newConstant != null) | ||
100 | msgs = ((InternalEObject) newConstant).eInverseAdd(this, | ||
101 | EOPPOSITE_FEATURE_BASE - ProblemPackage.CONSTANT_ARGUMENT__CONSTANT, null, msgs); | ||
102 | msgs = basicSetConstant(newConstant, msgs); | ||
103 | if (msgs != null) | ||
104 | msgs.dispatch(); | ||
105 | } else if (eNotificationRequired()) | ||
106 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.CONSTANT_ARGUMENT__CONSTANT, | ||
107 | newConstant, newConstant)); | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * <!-- begin-user-doc --> | ||
112 | * <!-- end-user-doc --> | ||
113 | * @generated | ||
114 | */ | ||
115 | @Override | ||
116 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
117 | switch (featureID) { | ||
118 | case ProblemPackage.CONSTANT_ARGUMENT__CONSTANT: | ||
119 | return basicSetConstant(null, msgs); | ||
120 | } | ||
121 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * <!-- begin-user-doc --> | ||
126 | * <!-- end-user-doc --> | ||
127 | * @generated | ||
128 | */ | ||
129 | @Override | ||
130 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
131 | switch (featureID) { | ||
132 | case ProblemPackage.CONSTANT_ARGUMENT__CONSTANT: | ||
133 | return getConstant(); | ||
134 | } | ||
135 | return super.eGet(featureID, resolve, coreType); | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * <!-- begin-user-doc --> | ||
140 | * <!-- end-user-doc --> | ||
141 | * @generated | ||
142 | */ | ||
143 | @Override | ||
144 | public void eSet(int featureID, Object newValue) { | ||
145 | switch (featureID) { | ||
146 | case ProblemPackage.CONSTANT_ARGUMENT__CONSTANT: | ||
147 | setConstant((Constant) newValue); | ||
148 | return; | ||
149 | } | ||
150 | super.eSet(featureID, newValue); | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * <!-- begin-user-doc --> | ||
155 | * <!-- end-user-doc --> | ||
156 | * @generated | ||
157 | */ | ||
158 | @Override | ||
159 | public void eUnset(int featureID) { | ||
160 | switch (featureID) { | ||
161 | case ProblemPackage.CONSTANT_ARGUMENT__CONSTANT: | ||
162 | setConstant((Constant) null); | ||
163 | return; | ||
164 | } | ||
165 | super.eUnset(featureID); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
173 | @Override | ||
174 | public boolean eIsSet(int featureID) { | ||
175 | switch (featureID) { | ||
176 | case ProblemPackage.CONSTANT_ARGUMENT__CONSTANT: | ||
177 | return constant != null; | ||
178 | } | ||
179 | return super.eIsSet(featureID); | ||
180 | } | ||
181 | |||
182 | } //ConstantArgumentImpl | ||
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConstantAssertionArgumentImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConstantAssertionArgumentImpl.java new file mode 100644 index 00000000..6b5b3ed2 --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConstantAssertionArgumentImpl.java | |||
@@ -0,0 +1,182 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | import org.eclipse.emf.common.notify.NotificationChain; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | import org.eclipse.emf.ecore.InternalEObject; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
12 | |||
13 | import org.eclipse.viatra.solver.language.model.problem.Constant; | ||
14 | import org.eclipse.viatra.solver.language.model.problem.ConstantAssertionArgument; | ||
15 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Constant Assertion Argument</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ConstantAssertionArgumentImpl#getConstant <em>Constant</em>}</li> | ||
26 | * </ul> | ||
27 | * | ||
28 | * @generated | ||
29 | */ | ||
30 | public class ConstantAssertionArgumentImpl extends AssertionArgumentImpl implements ConstantAssertionArgument { | ||
31 | /** | ||
32 | * The cached value of the '{@link #getConstant() <em>Constant</em>}' containment reference. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @see #getConstant() | ||
36 | * @generated | ||
37 | * @ordered | ||
38 | */ | ||
39 | protected Constant constant; | ||
40 | |||
41 | /** | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @generated | ||
45 | */ | ||
46 | protected ConstantAssertionArgumentImpl() { | ||
47 | super(); | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @generated | ||
54 | */ | ||
55 | @Override | ||
56 | protected EClass eStaticClass() { | ||
57 | return ProblemPackage.Literals.CONSTANT_ASSERTION_ARGUMENT; | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | public Constant getConstant() { | ||
66 | return constant; | ||
67 | } | ||
68 | |||
69 | /** | ||
70 | * <!-- begin-user-doc --> | ||
71 | * <!-- end-user-doc --> | ||
72 | * @generated | ||
73 | */ | ||
74 | public NotificationChain basicSetConstant(Constant newConstant, NotificationChain msgs) { | ||
75 | Constant oldConstant = constant; | ||
76 | constant = newConstant; | ||
77 | if (eNotificationRequired()) { | ||
78 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, | ||
79 | ProblemPackage.CONSTANT_ASSERTION_ARGUMENT__CONSTANT, oldConstant, newConstant); | ||
80 | if (msgs == null) | ||
81 | msgs = notification; | ||
82 | else | ||
83 | msgs.add(notification); | ||
84 | } | ||
85 | return msgs; | ||
86 | } | ||
87 | |||
88 | /** | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | */ | ||
93 | public void setConstant(Constant newConstant) { | ||
94 | if (newConstant != constant) { | ||
95 | NotificationChain msgs = null; | ||
96 | if (constant != null) | ||
97 | msgs = ((InternalEObject) constant).eInverseRemove(this, | ||
98 | EOPPOSITE_FEATURE_BASE - ProblemPackage.CONSTANT_ASSERTION_ARGUMENT__CONSTANT, null, msgs); | ||
99 | if (newConstant != null) | ||
100 | msgs = ((InternalEObject) newConstant).eInverseAdd(this, | ||
101 | EOPPOSITE_FEATURE_BASE - ProblemPackage.CONSTANT_ASSERTION_ARGUMENT__CONSTANT, null, msgs); | ||
102 | msgs = basicSetConstant(newConstant, msgs); | ||
103 | if (msgs != null) | ||
104 | msgs.dispatch(); | ||
105 | } else if (eNotificationRequired()) | ||
106 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.CONSTANT_ASSERTION_ARGUMENT__CONSTANT, | ||
107 | newConstant, newConstant)); | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * <!-- begin-user-doc --> | ||
112 | * <!-- end-user-doc --> | ||
113 | * @generated | ||
114 | */ | ||
115 | @Override | ||
116 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
117 | switch (featureID) { | ||
118 | case ProblemPackage.CONSTANT_ASSERTION_ARGUMENT__CONSTANT: | ||
119 | return basicSetConstant(null, msgs); | ||
120 | } | ||
121 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * <!-- begin-user-doc --> | ||
126 | * <!-- end-user-doc --> | ||
127 | * @generated | ||
128 | */ | ||
129 | @Override | ||
130 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
131 | switch (featureID) { | ||
132 | case ProblemPackage.CONSTANT_ASSERTION_ARGUMENT__CONSTANT: | ||
133 | return getConstant(); | ||
134 | } | ||
135 | return super.eGet(featureID, resolve, coreType); | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * <!-- begin-user-doc --> | ||
140 | * <!-- end-user-doc --> | ||
141 | * @generated | ||
142 | */ | ||
143 | @Override | ||
144 | public void eSet(int featureID, Object newValue) { | ||
145 | switch (featureID) { | ||
146 | case ProblemPackage.CONSTANT_ASSERTION_ARGUMENT__CONSTANT: | ||
147 | setConstant((Constant) newValue); | ||
148 | return; | ||
149 | } | ||
150 | super.eSet(featureID, newValue); | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * <!-- begin-user-doc --> | ||
155 | * <!-- end-user-doc --> | ||
156 | * @generated | ||
157 | */ | ||
158 | @Override | ||
159 | public void eUnset(int featureID) { | ||
160 | switch (featureID) { | ||
161 | case ProblemPackage.CONSTANT_ASSERTION_ARGUMENT__CONSTANT: | ||
162 | setConstant((Constant) null); | ||
163 | return; | ||
164 | } | ||
165 | super.eUnset(featureID); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
173 | @Override | ||
174 | public boolean eIsSet(int featureID) { | ||
175 | switch (featureID) { | ||
176 | case ProblemPackage.CONSTANT_ASSERTION_ARGUMENT__CONSTANT: | ||
177 | return constant != null; | ||
178 | } | ||
179 | return super.eIsSet(featureID); | ||
180 | } | ||
181 | |||
182 | } //ConstantAssertionArgumentImpl | ||
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConstantImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConstantImpl.java new file mode 100644 index 00000000..14be4fb4 --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConstantImpl.java | |||
@@ -0,0 +1,39 @@ | |||
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.emf.ecore.impl.MinimalEObjectImpl; | ||
8 | |||
9 | import org.eclipse.viatra.solver.language.model.problem.Constant; | ||
10 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
11 | |||
12 | /** | ||
13 | * <!-- begin-user-doc --> | ||
14 | * An implementation of the model object '<em><b>Constant</b></em>'. | ||
15 | * <!-- end-user-doc --> | ||
16 | * | ||
17 | * @generated | ||
18 | */ | ||
19 | public abstract class ConstantImpl extends MinimalEObjectImpl.Container implements Constant { | ||
20 | /** | ||
21 | * <!-- begin-user-doc --> | ||
22 | * <!-- end-user-doc --> | ||
23 | * @generated | ||
24 | */ | ||
25 | protected ConstantImpl() { | ||
26 | super(); | ||
27 | } | ||
28 | |||
29 | /** | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @generated | ||
33 | */ | ||
34 | @Override | ||
35 | protected EClass eStaticClass() { | ||
36 | return ProblemPackage.Literals.CONSTANT; | ||
37 | } | ||
38 | |||
39 | } //ConstantImpl | ||
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/IntConstantImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/IntConstantImpl.java new file mode 100644 index 00000000..1a0da417 --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/IntConstantImpl.java | |||
@@ -0,0 +1,164 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | |||
9 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
10 | |||
11 | import org.eclipse.viatra.solver.language.model.problem.IntConstant; | ||
12 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * An implementation of the model object '<em><b>Int Constant</b></em>'. | ||
17 | * <!-- end-user-doc --> | ||
18 | * <p> | ||
19 | * The following features are implemented: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.IntConstantImpl#getIntValue <em>Int Value</em>}</li> | ||
23 | * </ul> | ||
24 | * | ||
25 | * @generated | ||
26 | */ | ||
27 | public class IntConstantImpl extends ConstantImpl implements IntConstant { | ||
28 | /** | ||
29 | * The default value of the '{@link #getIntValue() <em>Int Value</em>}' attribute. | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @see #getIntValue() | ||
33 | * @generated | ||
34 | * @ordered | ||
35 | */ | ||
36 | protected static final int INT_VALUE_EDEFAULT = 0; | ||
37 | |||
38 | /** | ||
39 | * The cached value of the '{@link #getIntValue() <em>Int Value</em>}' attribute. | ||
40 | * <!-- begin-user-doc --> | ||
41 | * <!-- end-user-doc --> | ||
42 | * @see #getIntValue() | ||
43 | * @generated | ||
44 | * @ordered | ||
45 | */ | ||
46 | protected int intValue = INT_VALUE_EDEFAULT; | ||
47 | |||
48 | /** | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @generated | ||
52 | */ | ||
53 | protected IntConstantImpl() { | ||
54 | super(); | ||
55 | } | ||
56 | |||
57 | /** | ||
58 | * <!-- begin-user-doc --> | ||
59 | * <!-- end-user-doc --> | ||
60 | * @generated | ||
61 | */ | ||
62 | @Override | ||
63 | protected EClass eStaticClass() { | ||
64 | return ProblemPackage.Literals.INT_CONSTANT; | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <!-- end-user-doc --> | ||
70 | * @generated | ||
71 | */ | ||
72 | public int getIntValue() { | ||
73 | return intValue; | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @generated | ||
80 | */ | ||
81 | public void setIntValue(int newIntValue) { | ||
82 | int oldIntValue = intValue; | ||
83 | intValue = newIntValue; | ||
84 | if (eNotificationRequired()) | ||
85 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.INT_CONSTANT__INT_VALUE, oldIntValue, | ||
86 | intValue)); | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @generated | ||
93 | */ | ||
94 | @Override | ||
95 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
96 | switch (featureID) { | ||
97 | case ProblemPackage.INT_CONSTANT__INT_VALUE: | ||
98 | return getIntValue(); | ||
99 | } | ||
100 | return super.eGet(featureID, resolve, coreType); | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | @Override | ||
109 | public void eSet(int featureID, Object newValue) { | ||
110 | switch (featureID) { | ||
111 | case ProblemPackage.INT_CONSTANT__INT_VALUE: | ||
112 | setIntValue((Integer) newValue); | ||
113 | return; | ||
114 | } | ||
115 | super.eSet(featureID, newValue); | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public void eUnset(int featureID) { | ||
125 | switch (featureID) { | ||
126 | case ProblemPackage.INT_CONSTANT__INT_VALUE: | ||
127 | setIntValue(INT_VALUE_EDEFAULT); | ||
128 | return; | ||
129 | } | ||
130 | super.eUnset(featureID); | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <!-- end-user-doc --> | ||
136 | * @generated | ||
137 | */ | ||
138 | @Override | ||
139 | public boolean eIsSet(int featureID) { | ||
140 | switch (featureID) { | ||
141 | case ProblemPackage.INT_CONSTANT__INT_VALUE: | ||
142 | return intValue != INT_VALUE_EDEFAULT; | ||
143 | } | ||
144 | return super.eIsSet(featureID); | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | @Override | ||
153 | public String toString() { | ||
154 | if (eIsProxy()) | ||
155 | return super.toString(); | ||
156 | |||
157 | StringBuilder result = new StringBuilder(super.toString()); | ||
158 | result.append(" (intValue: "); | ||
159 | result.append(intValue); | ||
160 | result.append(')'); | ||
161 | return result.toString(); | ||
162 | } | ||
163 | |||
164 | } //IntConstantImpl | ||
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeAssertionArgumentImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeAssertionArgumentImpl.java new file mode 100644 index 00000000..27a702fd --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeAssertionArgumentImpl.java | |||
@@ -0,0 +1,159 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.InternalEObject; | ||
9 | |||
10 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
11 | |||
12 | import org.eclipse.viatra.solver.language.model.problem.Node; | ||
13 | import org.eclipse.viatra.solver.language.model.problem.NodeAssertionArgument; | ||
14 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
15 | |||
16 | /** | ||
17 | * <!-- begin-user-doc --> | ||
18 | * An implementation of the model object '<em><b>Node Assertion Argument</b></em>'. | ||
19 | * <!-- end-user-doc --> | ||
20 | * <p> | ||
21 | * The following features are implemented: | ||
22 | * </p> | ||
23 | * <ul> | ||
24 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.NodeAssertionArgumentImpl#getNode <em>Node</em>}</li> | ||
25 | * </ul> | ||
26 | * | ||
27 | * @generated | ||
28 | */ | ||
29 | public class NodeAssertionArgumentImpl extends AssertionArgumentImpl implements NodeAssertionArgument { | ||
30 | /** | ||
31 | * The cached value of the '{@link #getNode() <em>Node</em>}' reference. | ||
32 | * <!-- begin-user-doc --> | ||
33 | * <!-- end-user-doc --> | ||
34 | * @see #getNode() | ||
35 | * @generated | ||
36 | * @ordered | ||
37 | */ | ||
38 | protected Node node; | ||
39 | |||
40 | /** | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <!-- end-user-doc --> | ||
43 | * @generated | ||
44 | */ | ||
45 | protected NodeAssertionArgumentImpl() { | ||
46 | super(); | ||
47 | } | ||
48 | |||
49 | /** | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @generated | ||
53 | */ | ||
54 | @Override | ||
55 | protected EClass eStaticClass() { | ||
56 | return ProblemPackage.Literals.NODE_ASSERTION_ARGUMENT; | ||
57 | } | ||
58 | |||
59 | /** | ||
60 | * <!-- begin-user-doc --> | ||
61 | * <!-- end-user-doc --> | ||
62 | * @generated | ||
63 | */ | ||
64 | public Node getNode() { | ||
65 | if (node != null && node.eIsProxy()) { | ||
66 | InternalEObject oldNode = (InternalEObject) node; | ||
67 | node = (Node) eResolveProxy(oldNode); | ||
68 | if (node != oldNode) { | ||
69 | if (eNotificationRequired()) | ||
70 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, | ||
71 | ProblemPackage.NODE_ASSERTION_ARGUMENT__NODE, oldNode, node)); | ||
72 | } | ||
73 | } | ||
74 | return node; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | public Node basicGetNode() { | ||
83 | return node; | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @generated | ||
90 | */ | ||
91 | public void setNode(Node newNode) { | ||
92 | Node oldNode = node; | ||
93 | node = newNode; | ||
94 | if (eNotificationRequired()) | ||
95 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.NODE_ASSERTION_ARGUMENT__NODE, oldNode, | ||
96 | node)); | ||
97 | } | ||
98 | |||
99 | /** | ||
100 | * <!-- begin-user-doc --> | ||
101 | * <!-- end-user-doc --> | ||
102 | * @generated | ||
103 | */ | ||
104 | @Override | ||
105 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
106 | switch (featureID) { | ||
107 | case ProblemPackage.NODE_ASSERTION_ARGUMENT__NODE: | ||
108 | if (resolve) | ||
109 | return getNode(); | ||
110 | return basicGetNode(); | ||
111 | } | ||
112 | return super.eGet(featureID, resolve, coreType); | ||
113 | } | ||
114 | |||
115 | /** | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <!-- end-user-doc --> | ||
118 | * @generated | ||
119 | */ | ||
120 | @Override | ||
121 | public void eSet(int featureID, Object newValue) { | ||
122 | switch (featureID) { | ||
123 | case ProblemPackage.NODE_ASSERTION_ARGUMENT__NODE: | ||
124 | setNode((Node) newValue); | ||
125 | return; | ||
126 | } | ||
127 | super.eSet(featureID, newValue); | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * <!-- begin-user-doc --> | ||
132 | * <!-- end-user-doc --> | ||
133 | * @generated | ||
134 | */ | ||
135 | @Override | ||
136 | public void eUnset(int featureID) { | ||
137 | switch (featureID) { | ||
138 | case ProblemPackage.NODE_ASSERTION_ARGUMENT__NODE: | ||
139 | setNode((Node) null); | ||
140 | return; | ||
141 | } | ||
142 | super.eUnset(featureID); | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | @Override | ||
151 | public boolean eIsSet(int featureID) { | ||
152 | switch (featureID) { | ||
153 | case ProblemPackage.NODE_ASSERTION_ARGUMENT__NODE: | ||
154 | return node != null; | ||
155 | } | ||
156 | return super.eIsSet(featureID); | ||
157 | } | ||
158 | |||
159 | } //NodeAssertionArgumentImpl | ||
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeValueAssertionImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeValueAssertionImpl.java new file mode 100644 index 00000000..0078b35e --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeValueAssertionImpl.java | |||
@@ -0,0 +1,247 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | import org.eclipse.emf.common.notify.NotificationChain; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | import org.eclipse.emf.ecore.InternalEObject; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
12 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
13 | |||
14 | import org.eclipse.viatra.solver.language.model.problem.Constant; | ||
15 | import org.eclipse.viatra.solver.language.model.problem.Node; | ||
16 | import org.eclipse.viatra.solver.language.model.problem.NodeValueAssertion; | ||
17 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
18 | |||
19 | /** | ||
20 | * <!-- begin-user-doc --> | ||
21 | * An implementation of the model object '<em><b>Node Value Assertion</b></em>'. | ||
22 | * <!-- end-user-doc --> | ||
23 | * <p> | ||
24 | * The following features are implemented: | ||
25 | * </p> | ||
26 | * <ul> | ||
27 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.NodeValueAssertionImpl#getNode <em>Node</em>}</li> | ||
28 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.NodeValueAssertionImpl#getValue <em>Value</em>}</li> | ||
29 | * </ul> | ||
30 | * | ||
31 | * @generated | ||
32 | */ | ||
33 | public class NodeValueAssertionImpl extends MinimalEObjectImpl.Container implements NodeValueAssertion { | ||
34 | /** | ||
35 | * The cached value of the '{@link #getNode() <em>Node</em>}' reference. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @see #getNode() | ||
39 | * @generated | ||
40 | * @ordered | ||
41 | */ | ||
42 | protected Node node; | ||
43 | |||
44 | /** | ||
45 | * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see #getValue() | ||
49 | * @generated | ||
50 | * @ordered | ||
51 | */ | ||
52 | protected Constant value; | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | protected NodeValueAssertionImpl() { | ||
60 | super(); | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @generated | ||
67 | */ | ||
68 | @Override | ||
69 | protected EClass eStaticClass() { | ||
70 | return ProblemPackage.Literals.NODE_VALUE_ASSERTION; | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | public Node getNode() { | ||
79 | if (node != null && node.eIsProxy()) { | ||
80 | InternalEObject oldNode = (InternalEObject) node; | ||
81 | node = (Node) eResolveProxy(oldNode); | ||
82 | if (node != oldNode) { | ||
83 | if (eNotificationRequired()) | ||
84 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.NODE_VALUE_ASSERTION__NODE, | ||
85 | oldNode, node)); | ||
86 | } | ||
87 | } | ||
88 | return node; | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | public Node basicGetNode() { | ||
97 | return node; | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * <!-- begin-user-doc --> | ||
102 | * <!-- end-user-doc --> | ||
103 | * @generated | ||
104 | */ | ||
105 | public void setNode(Node newNode) { | ||
106 | Node oldNode = node; | ||
107 | node = newNode; | ||
108 | if (eNotificationRequired()) | ||
109 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.NODE_VALUE_ASSERTION__NODE, oldNode, | ||
110 | node)); | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | public Constant getValue() { | ||
119 | return value; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | public NotificationChain basicSetValue(Constant newValue, NotificationChain msgs) { | ||
128 | Constant oldValue = value; | ||
129 | value = newValue; | ||
130 | if (eNotificationRequired()) { | ||
131 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, | ||
132 | ProblemPackage.NODE_VALUE_ASSERTION__VALUE, oldValue, newValue); | ||
133 | if (msgs == null) | ||
134 | msgs = notification; | ||
135 | else | ||
136 | msgs.add(notification); | ||
137 | } | ||
138 | return msgs; | ||
139 | } | ||
140 | |||
141 | /** | ||
142 | * <!-- begin-user-doc --> | ||
143 | * <!-- end-user-doc --> | ||
144 | * @generated | ||
145 | */ | ||
146 | public void setValue(Constant newValue) { | ||
147 | if (newValue != value) { | ||
148 | NotificationChain msgs = null; | ||
149 | if (value != null) | ||
150 | msgs = ((InternalEObject) value).eInverseRemove(this, | ||
151 | EOPPOSITE_FEATURE_BASE - ProblemPackage.NODE_VALUE_ASSERTION__VALUE, null, msgs); | ||
152 | if (newValue != null) | ||
153 | msgs = ((InternalEObject) newValue).eInverseAdd(this, | ||
154 | EOPPOSITE_FEATURE_BASE - ProblemPackage.NODE_VALUE_ASSERTION__VALUE, null, msgs); | ||
155 | msgs = basicSetValue(newValue, msgs); | ||
156 | if (msgs != null) | ||
157 | msgs.dispatch(); | ||
158 | } else if (eNotificationRequired()) | ||
159 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.NODE_VALUE_ASSERTION__VALUE, newValue, | ||
160 | newValue)); | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | @Override | ||
169 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
170 | switch (featureID) { | ||
171 | case ProblemPackage.NODE_VALUE_ASSERTION__VALUE: | ||
172 | return basicSetValue(null, msgs); | ||
173 | } | ||
174 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
175 | } | ||
176 | |||
177 | /** | ||
178 | * <!-- begin-user-doc --> | ||
179 | * <!-- end-user-doc --> | ||
180 | * @generated | ||
181 | */ | ||
182 | @Override | ||
183 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
184 | switch (featureID) { | ||
185 | case ProblemPackage.NODE_VALUE_ASSERTION__NODE: | ||
186 | if (resolve) | ||
187 | return getNode(); | ||
188 | return basicGetNode(); | ||
189 | case ProblemPackage.NODE_VALUE_ASSERTION__VALUE: | ||
190 | return getValue(); | ||
191 | } | ||
192 | return super.eGet(featureID, resolve, coreType); | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @generated | ||
199 | */ | ||
200 | @Override | ||
201 | public void eSet(int featureID, Object newValue) { | ||
202 | switch (featureID) { | ||
203 | case ProblemPackage.NODE_VALUE_ASSERTION__NODE: | ||
204 | setNode((Node) newValue); | ||
205 | return; | ||
206 | case ProblemPackage.NODE_VALUE_ASSERTION__VALUE: | ||
207 | setValue((Constant) newValue); | ||
208 | return; | ||
209 | } | ||
210 | super.eSet(featureID, newValue); | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * <!-- begin-user-doc --> | ||
215 | * <!-- end-user-doc --> | ||
216 | * @generated | ||
217 | */ | ||
218 | @Override | ||
219 | public void eUnset(int featureID) { | ||
220 | switch (featureID) { | ||
221 | case ProblemPackage.NODE_VALUE_ASSERTION__NODE: | ||
222 | setNode((Node) null); | ||
223 | return; | ||
224 | case ProblemPackage.NODE_VALUE_ASSERTION__VALUE: | ||
225 | setValue((Constant) null); | ||
226 | return; | ||
227 | } | ||
228 | super.eUnset(featureID); | ||
229 | } | ||
230 | |||
231 | /** | ||
232 | * <!-- begin-user-doc --> | ||
233 | * <!-- end-user-doc --> | ||
234 | * @generated | ||
235 | */ | ||
236 | @Override | ||
237 | public boolean eIsSet(int featureID) { | ||
238 | switch (featureID) { | ||
239 | case ProblemPackage.NODE_VALUE_ASSERTION__NODE: | ||
240 | return node != null; | ||
241 | case ProblemPackage.NODE_VALUE_ASSERTION__VALUE: | ||
242 | return value != null; | ||
243 | } | ||
244 | return super.eIsSet(featureID); | ||
245 | } | ||
246 | |||
247 | } //NodeValueAssertionImpl | ||
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java index 2f4144b9..27da13e2 100644 --- a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java | |||
@@ -89,10 +89,24 @@ public class ProblemFactoryImpl extends EFactoryImpl implements ProblemFactory { | |||
89 | return createExactMultiplicity(); | 89 | return createExactMultiplicity(); |
90 | case ProblemPackage.UNBOUNDED_MULTIPLICITY: | 90 | case ProblemPackage.UNBOUNDED_MULTIPLICITY: |
91 | return createUnboundedMultiplicity(); | 91 | return createUnboundedMultiplicity(); |
92 | case ProblemPackage.ARGUMENT: | 92 | case ProblemPackage.VARIABLE_OR_NODE_ARGUMENT: |
93 | return createArgument(); | 93 | return createVariableOrNodeArgument(); |
94 | case ProblemPackage.ENUM_DECLARATION: | 94 | case ProblemPackage.ENUM_DECLARATION: |
95 | return createEnumDeclaration(); | 95 | return createEnumDeclaration(); |
96 | case ProblemPackage.INT_CONSTANT: | ||
97 | return createIntConstant(); | ||
98 | case ProblemPackage.REAL_CONSTANT: | ||
99 | return createRealConstant(); | ||
100 | case ProblemPackage.STRING_CONSTANT: | ||
101 | return createStringConstant(); | ||
102 | case ProblemPackage.CONSTANT_ARGUMENT: | ||
103 | return createConstantArgument(); | ||
104 | case ProblemPackage.NODE_ASSERTION_ARGUMENT: | ||
105 | return createNodeAssertionArgument(); | ||
106 | case ProblemPackage.CONSTANT_ASSERTION_ARGUMENT: | ||
107 | return createConstantAssertionArgument(); | ||
108 | case ProblemPackage.NODE_VALUE_ASSERTION: | ||
109 | return createNodeValueAssertion(); | ||
96 | default: | 110 | default: |
97 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | 111 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
98 | } | 112 | } |
@@ -293,9 +307,9 @@ public class ProblemFactoryImpl extends EFactoryImpl implements ProblemFactory { | |||
293 | * <!-- end-user-doc --> | 307 | * <!-- end-user-doc --> |
294 | * @generated | 308 | * @generated |
295 | */ | 309 | */ |
296 | public Argument createArgument() { | 310 | public VariableOrNodeArgument createVariableOrNodeArgument() { |
297 | ArgumentImpl argument = new ArgumentImpl(); | 311 | VariableOrNodeArgumentImpl variableOrNodeArgument = new VariableOrNodeArgumentImpl(); |
298 | return argument; | 312 | return variableOrNodeArgument; |
299 | } | 313 | } |
300 | 314 | ||
301 | /** | 315 | /** |
@@ -313,6 +327,76 @@ public class ProblemFactoryImpl extends EFactoryImpl implements ProblemFactory { | |||
313 | * <!-- end-user-doc --> | 327 | * <!-- end-user-doc --> |
314 | * @generated | 328 | * @generated |
315 | */ | 329 | */ |
330 | public IntConstant createIntConstant() { | ||
331 | IntConstantImpl intConstant = new IntConstantImpl(); | ||
332 | return intConstant; | ||
333 | } | ||
334 | |||
335 | /** | ||
336 | * <!-- begin-user-doc --> | ||
337 | * <!-- end-user-doc --> | ||
338 | * @generated | ||
339 | */ | ||
340 | public RealConstant createRealConstant() { | ||
341 | RealConstantImpl realConstant = new RealConstantImpl(); | ||
342 | return realConstant; | ||
343 | } | ||
344 | |||
345 | /** | ||
346 | * <!-- begin-user-doc --> | ||
347 | * <!-- end-user-doc --> | ||
348 | * @generated | ||
349 | */ | ||
350 | public StringConstant createStringConstant() { | ||
351 | StringConstantImpl stringConstant = new StringConstantImpl(); | ||
352 | return stringConstant; | ||
353 | } | ||
354 | |||
355 | /** | ||
356 | * <!-- begin-user-doc --> | ||
357 | * <!-- end-user-doc --> | ||
358 | * @generated | ||
359 | */ | ||
360 | public ConstantArgument createConstantArgument() { | ||
361 | ConstantArgumentImpl constantArgument = new ConstantArgumentImpl(); | ||
362 | return constantArgument; | ||
363 | } | ||
364 | |||
365 | /** | ||
366 | * <!-- begin-user-doc --> | ||
367 | * <!-- end-user-doc --> | ||
368 | * @generated | ||
369 | */ | ||
370 | public NodeAssertionArgument createNodeAssertionArgument() { | ||
371 | NodeAssertionArgumentImpl nodeAssertionArgument = new NodeAssertionArgumentImpl(); | ||
372 | return nodeAssertionArgument; | ||
373 | } | ||
374 | |||
375 | /** | ||
376 | * <!-- begin-user-doc --> | ||
377 | * <!-- end-user-doc --> | ||
378 | * @generated | ||
379 | */ | ||
380 | public ConstantAssertionArgument createConstantAssertionArgument() { | ||
381 | ConstantAssertionArgumentImpl constantAssertionArgument = new ConstantAssertionArgumentImpl(); | ||
382 | return constantAssertionArgument; | ||
383 | } | ||
384 | |||
385 | /** | ||
386 | * <!-- begin-user-doc --> | ||
387 | * <!-- end-user-doc --> | ||
388 | * @generated | ||
389 | */ | ||
390 | public NodeValueAssertion createNodeValueAssertion() { | ||
391 | NodeValueAssertionImpl nodeValueAssertion = new NodeValueAssertionImpl(); | ||
392 | return nodeValueAssertion; | ||
393 | } | ||
394 | |||
395 | /** | ||
396 | * <!-- begin-user-doc --> | ||
397 | * <!-- end-user-doc --> | ||
398 | * @generated | ||
399 | */ | ||
316 | public LogicValue createLogicValueFromString(EDataType eDataType, String initialValue) { | 400 | public LogicValue createLogicValueFromString(EDataType eDataType, String initialValue) { |
317 | LogicValue result = LogicValue.get(initialValue); | 401 | LogicValue result = LogicValue.get(initialValue); |
318 | if (result == null) | 402 | if (result == null) |
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java index d10ff2f0..ee72c538 100644 --- a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java | |||
@@ -12,33 +12,43 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; | |||
12 | 12 | ||
13 | import org.eclipse.viatra.solver.language.model.problem.Argument; | 13 | import org.eclipse.viatra.solver.language.model.problem.Argument; |
14 | import org.eclipse.viatra.solver.language.model.problem.Assertion; | 14 | import org.eclipse.viatra.solver.language.model.problem.Assertion; |
15 | import org.eclipse.viatra.solver.language.model.problem.AssertionArgument; | ||
15 | import org.eclipse.viatra.solver.language.model.problem.Atom; | 16 | import org.eclipse.viatra.solver.language.model.problem.Atom; |
16 | import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; | 17 | import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; |
17 | import org.eclipse.viatra.solver.language.model.problem.Conjunction; | 18 | import org.eclipse.viatra.solver.language.model.problem.Conjunction; |
19 | import org.eclipse.viatra.solver.language.model.problem.Constant; | ||
20 | import org.eclipse.viatra.solver.language.model.problem.ConstantArgument; | ||
21 | import org.eclipse.viatra.solver.language.model.problem.ConstantAssertionArgument; | ||
18 | import org.eclipse.viatra.solver.language.model.problem.EnumDeclaration; | 22 | import org.eclipse.viatra.solver.language.model.problem.EnumDeclaration; |
19 | import org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity; | 23 | import org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity; |
20 | import org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier; | 24 | import org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier; |
21 | import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; | 25 | import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; |
26 | import org.eclipse.viatra.solver.language.model.problem.IntConstant; | ||
22 | import org.eclipse.viatra.solver.language.model.problem.Literal; | 27 | import org.eclipse.viatra.solver.language.model.problem.Literal; |
23 | import org.eclipse.viatra.solver.language.model.problem.LogicValue; | 28 | import org.eclipse.viatra.solver.language.model.problem.LogicValue; |
24 | import org.eclipse.viatra.solver.language.model.problem.Multiplicity; | 29 | import org.eclipse.viatra.solver.language.model.problem.Multiplicity; |
25 | import org.eclipse.viatra.solver.language.model.problem.NamedElement; | 30 | import org.eclipse.viatra.solver.language.model.problem.NamedElement; |
26 | import org.eclipse.viatra.solver.language.model.problem.NegativeLiteral; | 31 | import org.eclipse.viatra.solver.language.model.problem.NegativeLiteral; |
27 | import org.eclipse.viatra.solver.language.model.problem.Node; | 32 | import org.eclipse.viatra.solver.language.model.problem.Node; |
33 | import org.eclipse.viatra.solver.language.model.problem.NodeAssertionArgument; | ||
34 | import org.eclipse.viatra.solver.language.model.problem.NodeValueAssertion; | ||
28 | import org.eclipse.viatra.solver.language.model.problem.Parameter; | 35 | import org.eclipse.viatra.solver.language.model.problem.Parameter; |
29 | import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition; | 36 | import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition; |
30 | import org.eclipse.viatra.solver.language.model.problem.Problem; | 37 | import org.eclipse.viatra.solver.language.model.problem.Problem; |
31 | import org.eclipse.viatra.solver.language.model.problem.ProblemFactory; | 38 | import org.eclipse.viatra.solver.language.model.problem.ProblemFactory; |
32 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | 39 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; |
33 | import org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity; | 40 | import org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity; |
41 | import org.eclipse.viatra.solver.language.model.problem.RealConstant; | ||
34 | import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; | 42 | import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; |
35 | import org.eclipse.viatra.solver.language.model.problem.Relation; | 43 | import org.eclipse.viatra.solver.language.model.problem.Relation; |
36 | import org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration; | 44 | import org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration; |
37 | import org.eclipse.viatra.solver.language.model.problem.Statement; | 45 | import org.eclipse.viatra.solver.language.model.problem.Statement; |
46 | import org.eclipse.viatra.solver.language.model.problem.StringConstant; | ||
38 | import org.eclipse.viatra.solver.language.model.problem.TypeScope; | 47 | import org.eclipse.viatra.solver.language.model.problem.TypeScope; |
39 | import org.eclipse.viatra.solver.language.model.problem.UnboundedMultiplicity; | 48 | import org.eclipse.viatra.solver.language.model.problem.UnboundedMultiplicity; |
40 | import org.eclipse.viatra.solver.language.model.problem.Variable; | 49 | import org.eclipse.viatra.solver.language.model.problem.Variable; |
41 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNode; | 50 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNode; |
51 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNodeArgument; | ||
42 | 52 | ||
43 | /** | 53 | /** |
44 | * <!-- begin-user-doc --> | 54 | * <!-- begin-user-doc --> |
@@ -213,6 +223,13 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
213 | * <!-- end-user-doc --> | 223 | * <!-- end-user-doc --> |
214 | * @generated | 224 | * @generated |
215 | */ | 225 | */ |
226 | private EClass variableOrNodeArgumentEClass = null; | ||
227 | |||
228 | /** | ||
229 | * <!-- begin-user-doc --> | ||
230 | * <!-- end-user-doc --> | ||
231 | * @generated | ||
232 | */ | ||
216 | private EClass argumentEClass = null; | 233 | private EClass argumentEClass = null; |
217 | 234 | ||
218 | /** | 235 | /** |
@@ -220,6 +237,34 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
220 | * <!-- end-user-doc --> | 237 | * <!-- end-user-doc --> |
221 | * @generated | 238 | * @generated |
222 | */ | 239 | */ |
240 | private EClass nodeAssertionArgumentEClass = null; | ||
241 | |||
242 | /** | ||
243 | * <!-- begin-user-doc --> | ||
244 | * <!-- end-user-doc --> | ||
245 | * @generated | ||
246 | */ | ||
247 | private EClass assertionArgumentEClass = null; | ||
248 | |||
249 | /** | ||
250 | * <!-- begin-user-doc --> | ||
251 | * <!-- end-user-doc --> | ||
252 | * @generated | ||
253 | */ | ||
254 | private EClass constantAssertionArgumentEClass = null; | ||
255 | |||
256 | /** | ||
257 | * <!-- begin-user-doc --> | ||
258 | * <!-- end-user-doc --> | ||
259 | * @generated | ||
260 | */ | ||
261 | private EClass nodeValueAssertionEClass = null; | ||
262 | |||
263 | /** | ||
264 | * <!-- begin-user-doc --> | ||
265 | * <!-- end-user-doc --> | ||
266 | * @generated | ||
267 | */ | ||
223 | private EClass enumDeclarationEClass = null; | 268 | private EClass enumDeclarationEClass = null; |
224 | 269 | ||
225 | /** | 270 | /** |
@@ -234,6 +279,41 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
234 | * <!-- end-user-doc --> | 279 | * <!-- end-user-doc --> |
235 | * @generated | 280 | * @generated |
236 | */ | 281 | */ |
282 | private EClass constantEClass = null; | ||
283 | |||
284 | /** | ||
285 | * <!-- begin-user-doc --> | ||
286 | * <!-- end-user-doc --> | ||
287 | * @generated | ||
288 | */ | ||
289 | private EClass intConstantEClass = null; | ||
290 | |||
291 | /** | ||
292 | * <!-- begin-user-doc --> | ||
293 | * <!-- end-user-doc --> | ||
294 | * @generated | ||
295 | */ | ||
296 | private EClass realConstantEClass = null; | ||
297 | |||
298 | /** | ||
299 | * <!-- begin-user-doc --> | ||
300 | * <!-- end-user-doc --> | ||
301 | * @generated | ||
302 | */ | ||
303 | private EClass stringConstantEClass = null; | ||
304 | |||
305 | /** | ||
306 | * <!-- begin-user-doc --> | ||
307 | * <!-- end-user-doc --> | ||
308 | * @generated | ||
309 | */ | ||
310 | private EClass constantArgumentEClass = null; | ||
311 | |||
312 | /** | ||
313 | * <!-- begin-user-doc --> | ||
314 | * <!-- end-user-doc --> | ||
315 | * @generated | ||
316 | */ | ||
237 | private EEnum logicValueEEnum = null; | 317 | private EEnum logicValueEEnum = null; |
238 | 318 | ||
239 | /** | 319 | /** |
@@ -639,7 +719,7 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
639 | * @generated | 719 | * @generated |
640 | */ | 720 | */ |
641 | public EReference getAssertion_Arguments() { | 721 | public EReference getAssertion_Arguments() { |
642 | return (EReference) assertionEClass.getEStructuralFeatures().get(1); | 722 | return (EReference) assertionEClass.getEStructuralFeatures().get(2); |
643 | } | 723 | } |
644 | 724 | ||
645 | /** | 725 | /** |
@@ -648,7 +728,7 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
648 | * @generated | 728 | * @generated |
649 | */ | 729 | */ |
650 | public EAttribute getAssertion_Value() { | 730 | public EAttribute getAssertion_Value() { |
651 | return (EAttribute) assertionEClass.getEStructuralFeatures().get(2); | 731 | return (EAttribute) assertionEClass.getEStructuralFeatures().get(1); |
652 | } | 732 | } |
653 | 733 | ||
654 | /** | 734 | /** |
@@ -791,6 +871,33 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
791 | * <!-- end-user-doc --> | 871 | * <!-- end-user-doc --> |
792 | * @generated | 872 | * @generated |
793 | */ | 873 | */ |
874 | public EClass getVariableOrNodeArgument() { | ||
875 | return variableOrNodeArgumentEClass; | ||
876 | } | ||
877 | |||
878 | /** | ||
879 | * <!-- begin-user-doc --> | ||
880 | * <!-- end-user-doc --> | ||
881 | * @generated | ||
882 | */ | ||
883 | public EReference getVariableOrNodeArgument_VariableOrNode() { | ||
884 | return (EReference) variableOrNodeArgumentEClass.getEStructuralFeatures().get(0); | ||
885 | } | ||
886 | |||
887 | /** | ||
888 | * <!-- begin-user-doc --> | ||
889 | * <!-- end-user-doc --> | ||
890 | * @generated | ||
891 | */ | ||
892 | public EReference getVariableOrNodeArgument_SingletonVariable() { | ||
893 | return (EReference) variableOrNodeArgumentEClass.getEStructuralFeatures().get(1); | ||
894 | } | ||
895 | |||
896 | /** | ||
897 | * <!-- begin-user-doc --> | ||
898 | * <!-- end-user-doc --> | ||
899 | * @generated | ||
900 | */ | ||
794 | public EClass getArgument() { | 901 | public EClass getArgument() { |
795 | return argumentEClass; | 902 | return argumentEClass; |
796 | } | 903 | } |
@@ -800,8 +907,8 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
800 | * <!-- end-user-doc --> | 907 | * <!-- end-user-doc --> |
801 | * @generated | 908 | * @generated |
802 | */ | 909 | */ |
803 | public EReference getArgument_VariableOrNode() { | 910 | public EClass getNodeAssertionArgument() { |
804 | return (EReference) argumentEClass.getEStructuralFeatures().get(0); | 911 | return nodeAssertionArgumentEClass; |
805 | } | 912 | } |
806 | 913 | ||
807 | /** | 914 | /** |
@@ -809,8 +916,62 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
809 | * <!-- end-user-doc --> | 916 | * <!-- end-user-doc --> |
810 | * @generated | 917 | * @generated |
811 | */ | 918 | */ |
812 | public EReference getArgument_SingletonVariable() { | 919 | public EReference getNodeAssertionArgument_Node() { |
813 | return (EReference) argumentEClass.getEStructuralFeatures().get(1); | 920 | return (EReference) nodeAssertionArgumentEClass.getEStructuralFeatures().get(0); |
921 | } | ||
922 | |||
923 | /** | ||
924 | * <!-- begin-user-doc --> | ||
925 | * <!-- end-user-doc --> | ||
926 | * @generated | ||
927 | */ | ||
928 | public EClass getAssertionArgument() { | ||
929 | return assertionArgumentEClass; | ||
930 | } | ||
931 | |||
932 | /** | ||
933 | * <!-- begin-user-doc --> | ||
934 | * <!-- end-user-doc --> | ||
935 | * @generated | ||
936 | */ | ||
937 | public EClass getConstantAssertionArgument() { | ||
938 | return constantAssertionArgumentEClass; | ||
939 | } | ||
940 | |||
941 | /** | ||
942 | * <!-- begin-user-doc --> | ||
943 | * <!-- end-user-doc --> | ||
944 | * @generated | ||
945 | */ | ||
946 | public EReference getConstantAssertionArgument_Constant() { | ||
947 | return (EReference) constantAssertionArgumentEClass.getEStructuralFeatures().get(0); | ||
948 | } | ||
949 | |||
950 | /** | ||
951 | * <!-- begin-user-doc --> | ||
952 | * <!-- end-user-doc --> | ||
953 | * @generated | ||
954 | */ | ||
955 | public EClass getNodeValueAssertion() { | ||
956 | return nodeValueAssertionEClass; | ||
957 | } | ||
958 | |||
959 | /** | ||
960 | * <!-- begin-user-doc --> | ||
961 | * <!-- end-user-doc --> | ||
962 | * @generated | ||
963 | */ | ||
964 | public EReference getNodeValueAssertion_Node() { | ||
965 | return (EReference) nodeValueAssertionEClass.getEStructuralFeatures().get(0); | ||
966 | } | ||
967 | |||
968 | /** | ||
969 | * <!-- begin-user-doc --> | ||
970 | * <!-- end-user-doc --> | ||
971 | * @generated | ||
972 | */ | ||
973 | public EReference getNodeValueAssertion_Value() { | ||
974 | return (EReference) nodeValueAssertionEClass.getEStructuralFeatures().get(1); | ||
814 | } | 975 | } |
815 | 976 | ||
816 | /** | 977 | /** |
@@ -845,6 +1006,87 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
845 | * <!-- end-user-doc --> | 1006 | * <!-- end-user-doc --> |
846 | * @generated | 1007 | * @generated |
847 | */ | 1008 | */ |
1009 | public EClass getConstant() { | ||
1010 | return constantEClass; | ||
1011 | } | ||
1012 | |||
1013 | /** | ||
1014 | * <!-- begin-user-doc --> | ||
1015 | * <!-- end-user-doc --> | ||
1016 | * @generated | ||
1017 | */ | ||
1018 | public EClass getIntConstant() { | ||
1019 | return intConstantEClass; | ||
1020 | } | ||
1021 | |||
1022 | /** | ||
1023 | * <!-- begin-user-doc --> | ||
1024 | * <!-- end-user-doc --> | ||
1025 | * @generated | ||
1026 | */ | ||
1027 | public EAttribute getIntConstant_IntValue() { | ||
1028 | return (EAttribute) intConstantEClass.getEStructuralFeatures().get(0); | ||
1029 | } | ||
1030 | |||
1031 | /** | ||
1032 | * <!-- begin-user-doc --> | ||
1033 | * <!-- end-user-doc --> | ||
1034 | * @generated | ||
1035 | */ | ||
1036 | public EClass getRealConstant() { | ||
1037 | return realConstantEClass; | ||
1038 | } | ||
1039 | |||
1040 | /** | ||
1041 | * <!-- begin-user-doc --> | ||
1042 | * <!-- end-user-doc --> | ||
1043 | * @generated | ||
1044 | */ | ||
1045 | public EAttribute getRealConstant_RealValue() { | ||
1046 | return (EAttribute) realConstantEClass.getEStructuralFeatures().get(0); | ||
1047 | } | ||
1048 | |||
1049 | /** | ||
1050 | * <!-- begin-user-doc --> | ||
1051 | * <!-- end-user-doc --> | ||
1052 | * @generated | ||
1053 | */ | ||
1054 | public EClass getStringConstant() { | ||
1055 | return stringConstantEClass; | ||
1056 | } | ||
1057 | |||
1058 | /** | ||
1059 | * <!-- begin-user-doc --> | ||
1060 | * <!-- end-user-doc --> | ||
1061 | * @generated | ||
1062 | */ | ||
1063 | public EAttribute getStringConstant_StringValue() { | ||
1064 | return (EAttribute) stringConstantEClass.getEStructuralFeatures().get(0); | ||
1065 | } | ||
1066 | |||
1067 | /** | ||
1068 | * <!-- begin-user-doc --> | ||
1069 | * <!-- end-user-doc --> | ||
1070 | * @generated | ||
1071 | */ | ||
1072 | public EClass getConstantArgument() { | ||
1073 | return constantArgumentEClass; | ||
1074 | } | ||
1075 | |||
1076 | /** | ||
1077 | * <!-- begin-user-doc --> | ||
1078 | * <!-- end-user-doc --> | ||
1079 | * @generated | ||
1080 | */ | ||
1081 | public EReference getConstantArgument_Constant() { | ||
1082 | return (EReference) constantArgumentEClass.getEStructuralFeatures().get(0); | ||
1083 | } | ||
1084 | |||
1085 | /** | ||
1086 | * <!-- begin-user-doc --> | ||
1087 | * <!-- end-user-doc --> | ||
1088 | * @generated | ||
1089 | */ | ||
848 | public EEnum getLogicValue() { | 1090 | public EEnum getLogicValue() { |
849 | return logicValueEEnum; | 1091 | return logicValueEEnum; |
850 | } | 1092 | } |
@@ -929,8 +1171,8 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
929 | 1171 | ||
930 | assertionEClass = createEClass(ASSERTION); | 1172 | assertionEClass = createEClass(ASSERTION); |
931 | createEReference(assertionEClass, ASSERTION__RELATION); | 1173 | createEReference(assertionEClass, ASSERTION__RELATION); |
932 | createEReference(assertionEClass, ASSERTION__ARGUMENTS); | ||
933 | createEAttribute(assertionEClass, ASSERTION__VALUE); | 1174 | createEAttribute(assertionEClass, ASSERTION__VALUE); |
1175 | createEReference(assertionEClass, ASSERTION__ARGUMENTS); | ||
934 | 1176 | ||
935 | nodeEClass = createEClass(NODE); | 1177 | nodeEClass = createEClass(NODE); |
936 | 1178 | ||
@@ -955,15 +1197,43 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
955 | 1197 | ||
956 | unboundedMultiplicityEClass = createEClass(UNBOUNDED_MULTIPLICITY); | 1198 | unboundedMultiplicityEClass = createEClass(UNBOUNDED_MULTIPLICITY); |
957 | 1199 | ||
958 | argumentEClass = createEClass(ARGUMENT); | 1200 | variableOrNodeArgumentEClass = createEClass(VARIABLE_OR_NODE_ARGUMENT); |
959 | createEReference(argumentEClass, ARGUMENT__VARIABLE_OR_NODE); | 1201 | createEReference(variableOrNodeArgumentEClass, VARIABLE_OR_NODE_ARGUMENT__VARIABLE_OR_NODE); |
960 | createEReference(argumentEClass, ARGUMENT__SINGLETON_VARIABLE); | 1202 | createEReference(variableOrNodeArgumentEClass, VARIABLE_OR_NODE_ARGUMENT__SINGLETON_VARIABLE); |
961 | 1203 | ||
962 | enumDeclarationEClass = createEClass(ENUM_DECLARATION); | 1204 | enumDeclarationEClass = createEClass(ENUM_DECLARATION); |
963 | createEReference(enumDeclarationEClass, ENUM_DECLARATION__LITERALS); | 1205 | createEReference(enumDeclarationEClass, ENUM_DECLARATION__LITERALS); |
964 | 1206 | ||
965 | variableOrNodeEClass = createEClass(VARIABLE_OR_NODE); | 1207 | variableOrNodeEClass = createEClass(VARIABLE_OR_NODE); |
966 | 1208 | ||
1209 | constantEClass = createEClass(CONSTANT); | ||
1210 | |||
1211 | intConstantEClass = createEClass(INT_CONSTANT); | ||
1212 | createEAttribute(intConstantEClass, INT_CONSTANT__INT_VALUE); | ||
1213 | |||
1214 | realConstantEClass = createEClass(REAL_CONSTANT); | ||
1215 | createEAttribute(realConstantEClass, REAL_CONSTANT__REAL_VALUE); | ||
1216 | |||
1217 | stringConstantEClass = createEClass(STRING_CONSTANT); | ||
1218 | createEAttribute(stringConstantEClass, STRING_CONSTANT__STRING_VALUE); | ||
1219 | |||
1220 | constantArgumentEClass = createEClass(CONSTANT_ARGUMENT); | ||
1221 | createEReference(constantArgumentEClass, CONSTANT_ARGUMENT__CONSTANT); | ||
1222 | |||
1223 | argumentEClass = createEClass(ARGUMENT); | ||
1224 | |||
1225 | nodeAssertionArgumentEClass = createEClass(NODE_ASSERTION_ARGUMENT); | ||
1226 | createEReference(nodeAssertionArgumentEClass, NODE_ASSERTION_ARGUMENT__NODE); | ||
1227 | |||
1228 | assertionArgumentEClass = createEClass(ASSERTION_ARGUMENT); | ||
1229 | |||
1230 | constantAssertionArgumentEClass = createEClass(CONSTANT_ASSERTION_ARGUMENT); | ||
1231 | createEReference(constantAssertionArgumentEClass, CONSTANT_ASSERTION_ARGUMENT__CONSTANT); | ||
1232 | |||
1233 | nodeValueAssertionEClass = createEClass(NODE_VALUE_ASSERTION); | ||
1234 | createEReference(nodeValueAssertionEClass, NODE_VALUE_ASSERTION__NODE); | ||
1235 | createEReference(nodeValueAssertionEClass, NODE_VALUE_ASSERTION__VALUE); | ||
1236 | |||
967 | // Create enums | 1237 | // Create enums |
968 | logicValueEEnum = createEEnum(LOGIC_VALUE); | 1238 | logicValueEEnum = createEEnum(LOGIC_VALUE); |
969 | } | 1239 | } |
@@ -1017,9 +1287,17 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
1017 | rangeMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); | 1287 | rangeMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); |
1018 | exactMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); | 1288 | exactMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); |
1019 | unboundedMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); | 1289 | unboundedMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); |
1290 | variableOrNodeArgumentEClass.getESuperTypes().add(this.getArgument()); | ||
1020 | enumDeclarationEClass.getESuperTypes().add(this.getRelation()); | 1291 | enumDeclarationEClass.getESuperTypes().add(this.getRelation()); |
1021 | enumDeclarationEClass.getESuperTypes().add(this.getStatement()); | 1292 | enumDeclarationEClass.getESuperTypes().add(this.getStatement()); |
1022 | variableOrNodeEClass.getESuperTypes().add(this.getNamedElement()); | 1293 | variableOrNodeEClass.getESuperTypes().add(this.getNamedElement()); |
1294 | intConstantEClass.getESuperTypes().add(this.getConstant()); | ||
1295 | realConstantEClass.getESuperTypes().add(this.getConstant()); | ||
1296 | stringConstantEClass.getESuperTypes().add(this.getConstant()); | ||
1297 | constantArgumentEClass.getESuperTypes().add(this.getArgument()); | ||
1298 | nodeAssertionArgumentEClass.getESuperTypes().add(this.getAssertionArgument()); | ||
1299 | constantAssertionArgumentEClass.getESuperTypes().add(this.getAssertionArgument()); | ||
1300 | nodeValueAssertionEClass.getESuperTypes().add(this.getStatement()); | ||
1023 | 1301 | ||
1024 | // Initialize classes, features, and operations; add parameters | 1302 | // Initialize classes, features, and operations; add parameters |
1025 | initEClass(problemEClass, Problem.class, "Problem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 1303 | initEClass(problemEClass, Problem.class, "Problem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
@@ -1126,11 +1404,11 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
1126 | initEReference(getAssertion_Relation(), this.getRelation(), null, "relation", null, 0, 1, Assertion.class, | 1404 | initEReference(getAssertion_Relation(), this.getRelation(), null, "relation", null, 0, 1, Assertion.class, |
1127 | !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, | 1405 | !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, |
1128 | IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 1406 | IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
1129 | initEReference(getAssertion_Arguments(), this.getNode(), null, "arguments", null, 0, -1, Assertion.class, | ||
1130 | !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, | ||
1131 | IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
1132 | initEAttribute(getAssertion_Value(), this.getLogicValue(), "value", null, 0, 1, Assertion.class, !IS_TRANSIENT, | 1407 | initEAttribute(getAssertion_Value(), this.getLogicValue(), "value", null, 0, 1, Assertion.class, !IS_TRANSIENT, |
1133 | !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 1408 | !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
1409 | initEReference(getAssertion_Arguments(), this.getAssertionArgument(), null, "arguments", null, 0, -1, | ||
1410 | Assertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, | ||
1411 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
1134 | 1412 | ||
1135 | initEClass(nodeEClass, Node.class, "Node", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 1413 | initEClass(nodeEClass, Node.class, "Node", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
1136 | 1414 | ||
@@ -1175,14 +1453,14 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
1175 | initEClass(unboundedMultiplicityEClass, UnboundedMultiplicity.class, "UnboundedMultiplicity", !IS_ABSTRACT, | 1453 | initEClass(unboundedMultiplicityEClass, UnboundedMultiplicity.class, "UnboundedMultiplicity", !IS_ABSTRACT, |
1176 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 1454 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
1177 | 1455 | ||
1178 | initEClass(argumentEClass, Argument.class, "Argument", !IS_ABSTRACT, !IS_INTERFACE, | 1456 | initEClass(variableOrNodeArgumentEClass, VariableOrNodeArgument.class, "VariableOrNodeArgument", !IS_ABSTRACT, |
1179 | IS_GENERATED_INSTANCE_CLASS); | 1457 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
1180 | initEReference(getArgument_VariableOrNode(), this.getVariableOrNode(), null, "variableOrNode", null, 0, 1, | 1458 | initEReference(getVariableOrNodeArgument_VariableOrNode(), this.getVariableOrNode(), null, "variableOrNode", |
1181 | Argument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, | 1459 | null, 0, 1, VariableOrNodeArgument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, |
1182 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 1460 | IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
1183 | initEReference(getArgument_SingletonVariable(), this.getImplicitVariable(), null, "singletonVariable", null, 0, | 1461 | initEReference(getVariableOrNodeArgument_SingletonVariable(), this.getImplicitVariable(), null, |
1184 | 1, Argument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, | 1462 | "singletonVariable", null, 0, 1, VariableOrNodeArgument.class, !IS_TRANSIENT, !IS_VOLATILE, |
1185 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 1463 | IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
1186 | 1464 | ||
1187 | initEClass(enumDeclarationEClass, EnumDeclaration.class, "EnumDeclaration", !IS_ABSTRACT, !IS_INTERFACE, | 1465 | initEClass(enumDeclarationEClass, EnumDeclaration.class, "EnumDeclaration", !IS_ABSTRACT, !IS_INTERFACE, |
1188 | IS_GENERATED_INSTANCE_CLASS); | 1466 | IS_GENERATED_INSTANCE_CLASS); |
@@ -1193,6 +1471,57 @@ public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { | |||
1193 | initEClass(variableOrNodeEClass, VariableOrNode.class, "VariableOrNode", IS_ABSTRACT, !IS_INTERFACE, | 1471 | initEClass(variableOrNodeEClass, VariableOrNode.class, "VariableOrNode", IS_ABSTRACT, !IS_INTERFACE, |
1194 | IS_GENERATED_INSTANCE_CLASS); | 1472 | IS_GENERATED_INSTANCE_CLASS); |
1195 | 1473 | ||
1474 | initEClass(constantEClass, Constant.class, "Constant", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
1475 | |||
1476 | initEClass(intConstantEClass, IntConstant.class, "IntConstant", !IS_ABSTRACT, !IS_INTERFACE, | ||
1477 | IS_GENERATED_INSTANCE_CLASS); | ||
1478 | initEAttribute(getIntConstant_IntValue(), ecorePackage.getEInt(), "intValue", "0", 0, 1, IntConstant.class, | ||
1479 | !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
1480 | |||
1481 | initEClass(realConstantEClass, RealConstant.class, "RealConstant", !IS_ABSTRACT, !IS_INTERFACE, | ||
1482 | IS_GENERATED_INSTANCE_CLASS); | ||
1483 | initEAttribute(getRealConstant_RealValue(), ecorePackage.getEDouble(), "realValue", "0.0", 0, 1, | ||
1484 | RealConstant.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, | ||
1485 | !IS_DERIVED, IS_ORDERED); | ||
1486 | |||
1487 | initEClass(stringConstantEClass, StringConstant.class, "StringConstant", !IS_ABSTRACT, !IS_INTERFACE, | ||
1488 | IS_GENERATED_INSTANCE_CLASS); | ||
1489 | initEAttribute(getStringConstant_StringValue(), ecorePackage.getEString(), "stringValue", null, 0, 1, | ||
1490 | StringConstant.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, | ||
1491 | !IS_DERIVED, IS_ORDERED); | ||
1492 | |||
1493 | initEClass(constantArgumentEClass, ConstantArgument.class, "ConstantArgument", !IS_ABSTRACT, !IS_INTERFACE, | ||
1494 | IS_GENERATED_INSTANCE_CLASS); | ||
1495 | initEReference(getConstantArgument_Constant(), this.getConstant(), null, "constant", null, 0, 1, | ||
1496 | ConstantArgument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, | ||
1497 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
1498 | |||
1499 | initEClass(argumentEClass, Argument.class, "Argument", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
1500 | |||
1501 | initEClass(nodeAssertionArgumentEClass, NodeAssertionArgument.class, "NodeAssertionArgument", !IS_ABSTRACT, | ||
1502 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
1503 | initEReference(getNodeAssertionArgument_Node(), this.getNode(), null, "node", null, 0, 1, | ||
1504 | NodeAssertionArgument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, | ||
1505 | IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
1506 | |||
1507 | initEClass(assertionArgumentEClass, AssertionArgument.class, "AssertionArgument", IS_ABSTRACT, !IS_INTERFACE, | ||
1508 | IS_GENERATED_INSTANCE_CLASS); | ||
1509 | |||
1510 | initEClass(constantAssertionArgumentEClass, ConstantAssertionArgument.class, "ConstantAssertionArgument", | ||
1511 | !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
1512 | initEReference(getConstantAssertionArgument_Constant(), this.getConstant(), null, "constant", null, 0, 1, | ||
1513 | ConstantAssertionArgument.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, | ||
1514 | !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
1515 | |||
1516 | initEClass(nodeValueAssertionEClass, NodeValueAssertion.class, "NodeValueAssertion", !IS_ABSTRACT, | ||
1517 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
1518 | initEReference(getNodeValueAssertion_Node(), this.getNode(), null, "node", null, 0, 1, NodeValueAssertion.class, | ||
1519 | !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, | ||
1520 | IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
1521 | initEReference(getNodeValueAssertion_Value(), this.getConstant(), null, "value", null, 0, 1, | ||
1522 | NodeValueAssertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, | ||
1523 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
1524 | |||
1196 | // Initialize enums and add enum literals | 1525 | // Initialize enums and add enum literals |
1197 | initEEnum(logicValueEEnum, LogicValue.class, "LogicValue"); | 1526 | initEEnum(logicValueEEnum, LogicValue.class, "LogicValue"); |
1198 | addEEnumLiteral(logicValueEEnum, LogicValue.TRUE); | 1527 | addEEnumLiteral(logicValueEEnum, LogicValue.TRUE); |
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RealConstantImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RealConstantImpl.java new file mode 100644 index 00000000..f28d7b5f --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RealConstantImpl.java | |||
@@ -0,0 +1,164 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | |||
9 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
10 | |||
11 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
12 | import org.eclipse.viatra.solver.language.model.problem.RealConstant; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * An implementation of the model object '<em><b>Real Constant</b></em>'. | ||
17 | * <!-- end-user-doc --> | ||
18 | * <p> | ||
19 | * The following features are implemented: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.RealConstantImpl#getRealValue <em>Real Value</em>}</li> | ||
23 | * </ul> | ||
24 | * | ||
25 | * @generated | ||
26 | */ | ||
27 | public class RealConstantImpl extends ConstantImpl implements RealConstant { | ||
28 | /** | ||
29 | * The default value of the '{@link #getRealValue() <em>Real Value</em>}' attribute. | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @see #getRealValue() | ||
33 | * @generated | ||
34 | * @ordered | ||
35 | */ | ||
36 | protected static final double REAL_VALUE_EDEFAULT = 0.0; | ||
37 | |||
38 | /** | ||
39 | * The cached value of the '{@link #getRealValue() <em>Real Value</em>}' attribute. | ||
40 | * <!-- begin-user-doc --> | ||
41 | * <!-- end-user-doc --> | ||
42 | * @see #getRealValue() | ||
43 | * @generated | ||
44 | * @ordered | ||
45 | */ | ||
46 | protected double realValue = REAL_VALUE_EDEFAULT; | ||
47 | |||
48 | /** | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @generated | ||
52 | */ | ||
53 | protected RealConstantImpl() { | ||
54 | super(); | ||
55 | } | ||
56 | |||
57 | /** | ||
58 | * <!-- begin-user-doc --> | ||
59 | * <!-- end-user-doc --> | ||
60 | * @generated | ||
61 | */ | ||
62 | @Override | ||
63 | protected EClass eStaticClass() { | ||
64 | return ProblemPackage.Literals.REAL_CONSTANT; | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <!-- end-user-doc --> | ||
70 | * @generated | ||
71 | */ | ||
72 | public double getRealValue() { | ||
73 | return realValue; | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @generated | ||
80 | */ | ||
81 | public void setRealValue(double newRealValue) { | ||
82 | double oldRealValue = realValue; | ||
83 | realValue = newRealValue; | ||
84 | if (eNotificationRequired()) | ||
85 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REAL_CONSTANT__REAL_VALUE, | ||
86 | oldRealValue, realValue)); | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @generated | ||
93 | */ | ||
94 | @Override | ||
95 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
96 | switch (featureID) { | ||
97 | case ProblemPackage.REAL_CONSTANT__REAL_VALUE: | ||
98 | return getRealValue(); | ||
99 | } | ||
100 | return super.eGet(featureID, resolve, coreType); | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | @Override | ||
109 | public void eSet(int featureID, Object newValue) { | ||
110 | switch (featureID) { | ||
111 | case ProblemPackage.REAL_CONSTANT__REAL_VALUE: | ||
112 | setRealValue((Double) newValue); | ||
113 | return; | ||
114 | } | ||
115 | super.eSet(featureID, newValue); | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public void eUnset(int featureID) { | ||
125 | switch (featureID) { | ||
126 | case ProblemPackage.REAL_CONSTANT__REAL_VALUE: | ||
127 | setRealValue(REAL_VALUE_EDEFAULT); | ||
128 | return; | ||
129 | } | ||
130 | super.eUnset(featureID); | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <!-- end-user-doc --> | ||
136 | * @generated | ||
137 | */ | ||
138 | @Override | ||
139 | public boolean eIsSet(int featureID) { | ||
140 | switch (featureID) { | ||
141 | case ProblemPackage.REAL_CONSTANT__REAL_VALUE: | ||
142 | return realValue != REAL_VALUE_EDEFAULT; | ||
143 | } | ||
144 | return super.eIsSet(featureID); | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | @Override | ||
153 | public String toString() { | ||
154 | if (eIsProxy()) | ||
155 | return super.toString(); | ||
156 | |||
157 | StringBuilder result = new StringBuilder(super.toString()); | ||
158 | result.append(" (realValue: "); | ||
159 | result.append(realValue); | ||
160 | result.append(')'); | ||
161 | return result.toString(); | ||
162 | } | ||
163 | |||
164 | } //RealConstantImpl | ||
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/StringConstantImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/StringConstantImpl.java new file mode 100644 index 00000000..9eb05cf3 --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/StringConstantImpl.java | |||
@@ -0,0 +1,164 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | |||
9 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
10 | |||
11 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
12 | import org.eclipse.viatra.solver.language.model.problem.StringConstant; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * An implementation of the model object '<em><b>String Constant</b></em>'. | ||
17 | * <!-- end-user-doc --> | ||
18 | * <p> | ||
19 | * The following features are implemented: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.StringConstantImpl#getStringValue <em>String Value</em>}</li> | ||
23 | * </ul> | ||
24 | * | ||
25 | * @generated | ||
26 | */ | ||
27 | public class StringConstantImpl extends ConstantImpl implements StringConstant { | ||
28 | /** | ||
29 | * The default value of the '{@link #getStringValue() <em>String Value</em>}' attribute. | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @see #getStringValue() | ||
33 | * @generated | ||
34 | * @ordered | ||
35 | */ | ||
36 | protected static final String STRING_VALUE_EDEFAULT = null; | ||
37 | |||
38 | /** | ||
39 | * The cached value of the '{@link #getStringValue() <em>String Value</em>}' attribute. | ||
40 | * <!-- begin-user-doc --> | ||
41 | * <!-- end-user-doc --> | ||
42 | * @see #getStringValue() | ||
43 | * @generated | ||
44 | * @ordered | ||
45 | */ | ||
46 | protected String stringValue = STRING_VALUE_EDEFAULT; | ||
47 | |||
48 | /** | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @generated | ||
52 | */ | ||
53 | protected StringConstantImpl() { | ||
54 | super(); | ||
55 | } | ||
56 | |||
57 | /** | ||
58 | * <!-- begin-user-doc --> | ||
59 | * <!-- end-user-doc --> | ||
60 | * @generated | ||
61 | */ | ||
62 | @Override | ||
63 | protected EClass eStaticClass() { | ||
64 | return ProblemPackage.Literals.STRING_CONSTANT; | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <!-- end-user-doc --> | ||
70 | * @generated | ||
71 | */ | ||
72 | public String getStringValue() { | ||
73 | return stringValue; | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @generated | ||
80 | */ | ||
81 | public void setStringValue(String newStringValue) { | ||
82 | String oldStringValue = stringValue; | ||
83 | stringValue = newStringValue; | ||
84 | if (eNotificationRequired()) | ||
85 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.STRING_CONSTANT__STRING_VALUE, | ||
86 | oldStringValue, stringValue)); | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @generated | ||
93 | */ | ||
94 | @Override | ||
95 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
96 | switch (featureID) { | ||
97 | case ProblemPackage.STRING_CONSTANT__STRING_VALUE: | ||
98 | return getStringValue(); | ||
99 | } | ||
100 | return super.eGet(featureID, resolve, coreType); | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | @Override | ||
109 | public void eSet(int featureID, Object newValue) { | ||
110 | switch (featureID) { | ||
111 | case ProblemPackage.STRING_CONSTANT__STRING_VALUE: | ||
112 | setStringValue((String) newValue); | ||
113 | return; | ||
114 | } | ||
115 | super.eSet(featureID, newValue); | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public void eUnset(int featureID) { | ||
125 | switch (featureID) { | ||
126 | case ProblemPackage.STRING_CONSTANT__STRING_VALUE: | ||
127 | setStringValue(STRING_VALUE_EDEFAULT); | ||
128 | return; | ||
129 | } | ||
130 | super.eUnset(featureID); | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <!-- end-user-doc --> | ||
136 | * @generated | ||
137 | */ | ||
138 | @Override | ||
139 | public boolean eIsSet(int featureID) { | ||
140 | switch (featureID) { | ||
141 | case ProblemPackage.STRING_CONSTANT__STRING_VALUE: | ||
142 | return STRING_VALUE_EDEFAULT == null ? stringValue != null : !STRING_VALUE_EDEFAULT.equals(stringValue); | ||
143 | } | ||
144 | return super.eIsSet(featureID); | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | @Override | ||
153 | public String toString() { | ||
154 | if (eIsProxy()) | ||
155 | return super.toString(); | ||
156 | |||
157 | StringBuilder result = new StringBuilder(super.toString()); | ||
158 | result.append(" (stringValue: "); | ||
159 | result.append(stringValue); | ||
160 | result.append(')'); | ||
161 | return result.toString(); | ||
162 | } | ||
163 | |||
164 | } //StringConstantImpl | ||
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableOrNodeArgumentImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableOrNodeArgumentImpl.java new file mode 100644 index 00000000..693d5cdd --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableOrNodeArgumentImpl.java | |||
@@ -0,0 +1,251 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | import org.eclipse.emf.common.notify.NotificationChain; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | import org.eclipse.emf.ecore.InternalEObject; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
12 | |||
13 | import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; | ||
14 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
15 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNode; | ||
16 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNodeArgument; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>Variable Or Node Argument</b></em>'. | ||
21 | * <!-- end-user-doc --> | ||
22 | * <p> | ||
23 | * The following features are implemented: | ||
24 | * </p> | ||
25 | * <ul> | ||
26 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.VariableOrNodeArgumentImpl#getVariableOrNode <em>Variable Or Node</em>}</li> | ||
27 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.VariableOrNodeArgumentImpl#getSingletonVariable <em>Singleton Variable</em>}</li> | ||
28 | * </ul> | ||
29 | * | ||
30 | * @generated | ||
31 | */ | ||
32 | public class VariableOrNodeArgumentImpl extends ArgumentImpl implements VariableOrNodeArgument { | ||
33 | /** | ||
34 | * The cached value of the '{@link #getVariableOrNode() <em>Variable Or Node</em>}' reference. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @see #getVariableOrNode() | ||
38 | * @generated | ||
39 | * @ordered | ||
40 | */ | ||
41 | protected VariableOrNode variableOrNode; | ||
42 | |||
43 | /** | ||
44 | * The cached value of the '{@link #getSingletonVariable() <em>Singleton Variable</em>}' containment reference. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getSingletonVariable() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected ImplicitVariable singletonVariable; | ||
52 | |||
53 | /** | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @generated | ||
57 | */ | ||
58 | protected VariableOrNodeArgumentImpl() { | ||
59 | super(); | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @generated | ||
66 | */ | ||
67 | @Override | ||
68 | protected EClass eStaticClass() { | ||
69 | return ProblemPackage.Literals.VARIABLE_OR_NODE_ARGUMENT; | ||
70 | } | ||
71 | |||
72 | /** | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @generated | ||
76 | */ | ||
77 | public VariableOrNode getVariableOrNode() { | ||
78 | if (variableOrNode != null && variableOrNode.eIsProxy()) { | ||
79 | InternalEObject oldVariableOrNode = (InternalEObject) variableOrNode; | ||
80 | variableOrNode = (VariableOrNode) eResolveProxy(oldVariableOrNode); | ||
81 | if (variableOrNode != oldVariableOrNode) { | ||
82 | if (eNotificationRequired()) | ||
83 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, | ||
84 | ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__VARIABLE_OR_NODE, oldVariableOrNode, | ||
85 | variableOrNode)); | ||
86 | } | ||
87 | } | ||
88 | return variableOrNode; | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | public VariableOrNode basicGetVariableOrNode() { | ||
97 | return variableOrNode; | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * <!-- begin-user-doc --> | ||
102 | * <!-- end-user-doc --> | ||
103 | * @generated | ||
104 | */ | ||
105 | public void setVariableOrNode(VariableOrNode newVariableOrNode) { | ||
106 | VariableOrNode oldVariableOrNode = variableOrNode; | ||
107 | variableOrNode = newVariableOrNode; | ||
108 | if (eNotificationRequired()) | ||
109 | eNotify(new ENotificationImpl(this, Notification.SET, | ||
110 | ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__VARIABLE_OR_NODE, oldVariableOrNode, variableOrNode)); | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | public ImplicitVariable getSingletonVariable() { | ||
119 | return singletonVariable; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | public NotificationChain basicSetSingletonVariable(ImplicitVariable newSingletonVariable, NotificationChain msgs) { | ||
128 | ImplicitVariable oldSingletonVariable = singletonVariable; | ||
129 | singletonVariable = newSingletonVariable; | ||
130 | if (eNotificationRequired()) { | ||
131 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, | ||
132 | ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__SINGLETON_VARIABLE, oldSingletonVariable, | ||
133 | newSingletonVariable); | ||
134 | if (msgs == null) | ||
135 | msgs = notification; | ||
136 | else | ||
137 | msgs.add(notification); | ||
138 | } | ||
139 | return msgs; | ||
140 | } | ||
141 | |||
142 | /** | ||
143 | * <!-- begin-user-doc --> | ||
144 | * <!-- end-user-doc --> | ||
145 | * @generated | ||
146 | */ | ||
147 | public void setSingletonVariable(ImplicitVariable newSingletonVariable) { | ||
148 | if (newSingletonVariable != singletonVariable) { | ||
149 | NotificationChain msgs = null; | ||
150 | if (singletonVariable != null) | ||
151 | msgs = ((InternalEObject) singletonVariable).eInverseRemove(this, | ||
152 | EOPPOSITE_FEATURE_BASE - ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__SINGLETON_VARIABLE, null, | ||
153 | msgs); | ||
154 | if (newSingletonVariable != null) | ||
155 | msgs = ((InternalEObject) newSingletonVariable).eInverseAdd(this, | ||
156 | EOPPOSITE_FEATURE_BASE - ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__SINGLETON_VARIABLE, null, | ||
157 | msgs); | ||
158 | msgs = basicSetSingletonVariable(newSingletonVariable, msgs); | ||
159 | if (msgs != null) | ||
160 | msgs.dispatch(); | ||
161 | } else if (eNotificationRequired()) | ||
162 | eNotify(new ENotificationImpl(this, Notification.SET, | ||
163 | ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__SINGLETON_VARIABLE, newSingletonVariable, | ||
164 | newSingletonVariable)); | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | @Override | ||
173 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
174 | switch (featureID) { | ||
175 | case ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__SINGLETON_VARIABLE: | ||
176 | return basicSetSingletonVariable(null, msgs); | ||
177 | } | ||
178 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
179 | } | ||
180 | |||
181 | /** | ||
182 | * <!-- begin-user-doc --> | ||
183 | * <!-- end-user-doc --> | ||
184 | * @generated | ||
185 | */ | ||
186 | @Override | ||
187 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
188 | switch (featureID) { | ||
189 | case ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__VARIABLE_OR_NODE: | ||
190 | if (resolve) | ||
191 | return getVariableOrNode(); | ||
192 | return basicGetVariableOrNode(); | ||
193 | case ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__SINGLETON_VARIABLE: | ||
194 | return getSingletonVariable(); | ||
195 | } | ||
196 | return super.eGet(featureID, resolve, coreType); | ||
197 | } | ||
198 | |||
199 | /** | ||
200 | * <!-- begin-user-doc --> | ||
201 | * <!-- end-user-doc --> | ||
202 | * @generated | ||
203 | */ | ||
204 | @Override | ||
205 | public void eSet(int featureID, Object newValue) { | ||
206 | switch (featureID) { | ||
207 | case ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__VARIABLE_OR_NODE: | ||
208 | setVariableOrNode((VariableOrNode) newValue); | ||
209 | return; | ||
210 | case ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__SINGLETON_VARIABLE: | ||
211 | setSingletonVariable((ImplicitVariable) newValue); | ||
212 | return; | ||
213 | } | ||
214 | super.eSet(featureID, newValue); | ||
215 | } | ||
216 | |||
217 | /** | ||
218 | * <!-- begin-user-doc --> | ||
219 | * <!-- end-user-doc --> | ||
220 | * @generated | ||
221 | */ | ||
222 | @Override | ||
223 | public void eUnset(int featureID) { | ||
224 | switch (featureID) { | ||
225 | case ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__VARIABLE_OR_NODE: | ||
226 | setVariableOrNode((VariableOrNode) null); | ||
227 | return; | ||
228 | case ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__SINGLETON_VARIABLE: | ||
229 | setSingletonVariable((ImplicitVariable) null); | ||
230 | return; | ||
231 | } | ||
232 | super.eUnset(featureID); | ||
233 | } | ||
234 | |||
235 | /** | ||
236 | * <!-- begin-user-doc --> | ||
237 | * <!-- end-user-doc --> | ||
238 | * @generated | ||
239 | */ | ||
240 | @Override | ||
241 | public boolean eIsSet(int featureID) { | ||
242 | switch (featureID) { | ||
243 | case ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__VARIABLE_OR_NODE: | ||
244 | return variableOrNode != null; | ||
245 | case ProblemPackage.VARIABLE_OR_NODE_ARGUMENT__SINGLETON_VARIABLE: | ||
246 | return singletonVariable != null; | ||
247 | } | ||
248 | return super.eIsSet(featureID); | ||
249 | } | ||
250 | |||
251 | } //VariableOrNodeArgumentImpl | ||