diff options
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer')
2 files changed, 1069 insertions, 362 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java index 1ad39fd7..fc204c16 100644 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * generated by Xtext 2.18.0.M3 | 2 | * generated by Xtext 2.21.0 |
3 | */ | 3 | */ |
4 | package org.eclipse.viatra.solver.language.serializer; | 4 | package org.eclipse.viatra.solver.language.serializer; |
5 | 5 | ||
@@ -8,43 +8,48 @@ import java.util.Set; | |||
8 | import org.eclipse.emf.ecore.EObject; | 8 | import org.eclipse.emf.ecore.EObject; |
9 | import org.eclipse.emf.ecore.EPackage; | 9 | import org.eclipse.emf.ecore.EPackage; |
10 | import org.eclipse.viatra.solver.language.services.SolverLanguageGrammarAccess; | 10 | import org.eclipse.viatra.solver.language.services.SolverLanguageGrammarAccess; |
11 | import org.eclipse.viatra.solver.language.solverLanguage.AllInstances; | 11 | import org.eclipse.viatra.solver.language.solverLanguage.Aggregation; |
12 | import org.eclipse.viatra.solver.language.solverLanguage.AllObjects; | 12 | import org.eclipse.viatra.solver.language.solverLanguage.ArgumentList; |
13 | import org.eclipse.viatra.solver.language.solverLanguage.BasicInterpretation; | 13 | import org.eclipse.viatra.solver.language.solverLanguage.Assertion; |
14 | import org.eclipse.viatra.solver.language.solverLanguage.BooleanFalse; | 14 | import org.eclipse.viatra.solver.language.solverLanguage.BinaryExpression; |
15 | import org.eclipse.viatra.solver.language.solverLanguage.BooleanObject; | 15 | import org.eclipse.viatra.solver.language.solverLanguage.BoundedMultiplicity; |
16 | import org.eclipse.viatra.solver.language.solverLanguage.BooleanSymbol; | 16 | import org.eclipse.viatra.solver.language.solverLanguage.BoundedScopeDefinition; |
17 | import org.eclipse.viatra.solver.language.solverLanguage.BooleanTrue; | 17 | import org.eclipse.viatra.solver.language.solverLanguage.Call; |
18 | import org.eclipse.viatra.solver.language.solverLanguage.ClassInterpretation; | 18 | import org.eclipse.viatra.solver.language.solverLanguage.Case; |
19 | import org.eclipse.viatra.solver.language.solverLanguage.Constraint; | 19 | import org.eclipse.viatra.solver.language.solverLanguage.Comparison; |
20 | import org.eclipse.viatra.solver.language.solverLanguage.DefaultInterpretation; | 20 | import org.eclipse.viatra.solver.language.solverLanguage.Conjunction; |
21 | import org.eclipse.viatra.solver.language.solverLanguage.EnumInterpretation; | 21 | import org.eclipse.viatra.solver.language.solverLanguage.Count; |
22 | import org.eclipse.viatra.solver.language.solverLanguage.EqualsSymbol; | 22 | import org.eclipse.viatra.solver.language.solverLanguage.DefaultDefinition; |
23 | import org.eclipse.viatra.solver.language.solverLanguage.ExistSymbol; | 23 | import org.eclipse.viatra.solver.language.solverLanguage.Disjunction; |
24 | import org.eclipse.viatra.solver.language.solverLanguage.False; | 24 | import org.eclipse.viatra.solver.language.solverLanguage.EmptyIntervalLiteral; |
25 | import org.eclipse.viatra.solver.language.solverLanguage.FieldRelationInterpretation; | 25 | import org.eclipse.viatra.solver.language.solverLanguage.ExactMultiplicity; |
26 | import org.eclipse.viatra.solver.language.solverLanguage.GlobalRelationInterpretation; | 26 | import org.eclipse.viatra.solver.language.solverLanguage.ExactScopeDefinition; |
27 | import org.eclipse.viatra.solver.language.solverLanguage.IntObject; | 27 | import org.eclipse.viatra.solver.language.solverLanguage.ExpressionArgument; |
28 | import org.eclipse.viatra.solver.language.solverLanguage.IntegerSymbol; | 28 | import org.eclipse.viatra.solver.language.solverLanguage.ExternMetricDefinition; |
29 | import org.eclipse.viatra.solver.language.solverLanguage.IrreflexiveClosure; | 29 | import org.eclipse.viatra.solver.language.solverLanguage.ExternPredicateDefinition; |
30 | import org.eclipse.viatra.solver.language.solverLanguage.ModelSymbol; | 30 | import org.eclipse.viatra.solver.language.solverLanguage.IfElse; |
31 | import org.eclipse.viatra.solver.language.solverLanguage.MultiplicityDefinition; | 31 | import org.eclipse.viatra.solver.language.solverLanguage.InfinityLiteral; |
32 | import org.eclipse.viatra.solver.language.solverLanguage.NamedObject; | 32 | import org.eclipse.viatra.solver.language.solverLanguage.Interval; |
33 | import org.eclipse.viatra.solver.language.solverLanguage.Negative; | 33 | import org.eclipse.viatra.solver.language.solverLanguage.LogicLiteral; |
34 | import org.eclipse.viatra.solver.language.solverLanguage.PatternBody; | 34 | import org.eclipse.viatra.solver.language.solverLanguage.LowerBoundedScopeDefinition; |
35 | import org.eclipse.viatra.solver.language.solverLanguage.Positive; | 35 | import org.eclipse.viatra.solver.language.solverLanguage.ManyMultiplicity; |
36 | import org.eclipse.viatra.solver.language.solverLanguage.Predicate; | 36 | import org.eclipse.viatra.solver.language.solverLanguage.MemberDefinition; |
37 | import org.eclipse.viatra.solver.language.solverLanguage.MetricDefinition; | ||
38 | import org.eclipse.viatra.solver.language.solverLanguage.NamedElement; | ||
39 | import org.eclipse.viatra.solver.language.solverLanguage.NumericLiteral; | ||
40 | import org.eclipse.viatra.solver.language.solverLanguage.ObjectiveDefinition; | ||
41 | import org.eclipse.viatra.solver.language.solverLanguage.PredicateDefinition; | ||
37 | import org.eclipse.viatra.solver.language.solverLanguage.Problem; | 42 | import org.eclipse.viatra.solver.language.solverLanguage.Problem; |
38 | import org.eclipse.viatra.solver.language.solverLanguage.RealObject; | 43 | import org.eclipse.viatra.solver.language.solverLanguage.Reference; |
39 | import org.eclipse.viatra.solver.language.solverLanguage.RealSymbol; | ||
40 | import org.eclipse.viatra.solver.language.solverLanguage.ReflexiveClosure; | ||
41 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | 44 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; |
42 | import org.eclipse.viatra.solver.language.solverLanguage.StringObject; | 45 | import org.eclipse.viatra.solver.language.solverLanguage.StarArgument; |
43 | import org.eclipse.viatra.solver.language.solverLanguage.StringSymbol; | 46 | import org.eclipse.viatra.solver.language.solverLanguage.Statement; |
44 | import org.eclipse.viatra.solver.language.solverLanguage.True; | 47 | import org.eclipse.viatra.solver.language.solverLanguage.StringLiteral; |
45 | import org.eclipse.viatra.solver.language.solverLanguage.Unknown; | 48 | import org.eclipse.viatra.solver.language.solverLanguage.Switch; |
46 | import org.eclipse.viatra.solver.language.solverLanguage.UnnamedObject; | 49 | import org.eclipse.viatra.solver.language.solverLanguage.TypedArgument; |
47 | import org.eclipse.viatra.solver.language.solverLanguage.Variable; | 50 | import org.eclipse.viatra.solver.language.solverLanguage.TypedStarArgument; |
51 | import org.eclipse.viatra.solver.language.solverLanguage.UnaryExpression; | ||
52 | import org.eclipse.viatra.solver.language.solverLanguage.UnnamedErrorPrediateDefinition; | ||
48 | import org.eclipse.xtext.Action; | 53 | import org.eclipse.xtext.Action; |
49 | import org.eclipse.xtext.Parameter; | 54 | import org.eclipse.xtext.Parameter; |
50 | import org.eclipse.xtext.ParserRule; | 55 | import org.eclipse.xtext.ParserRule; |
@@ -67,119 +72,183 @@ public class SolverLanguageSemanticSequencer extends AbstractDelegatingSemanticS | |||
67 | Set<Parameter> parameters = context.getEnabledBooleanParameters(); | 72 | Set<Parameter> parameters = context.getEnabledBooleanParameters(); |
68 | if (epackage == SolverLanguagePackage.eINSTANCE) | 73 | if (epackage == SolverLanguagePackage.eINSTANCE) |
69 | switch (semanticObject.eClass().getClassifierID()) { | 74 | switch (semanticObject.eClass().getClassifierID()) { |
70 | case SolverLanguagePackage.ALL_INSTANCES: | 75 | case SolverLanguagePackage.AGGREGATION: |
71 | sequence_AllInstances(context, (AllInstances) semanticObject); | 76 | sequence_Aggregation(context, (Aggregation) semanticObject); |
72 | return; | 77 | return; |
73 | case SolverLanguagePackage.ALL_OBJECTS: | 78 | case SolverLanguagePackage.ARGUMENT_LIST: |
74 | sequence_AllObjects(context, (AllObjects) semanticObject); | 79 | sequence_ArgumentList(context, (ArgumentList) semanticObject); |
75 | return; | 80 | return; |
76 | case SolverLanguagePackage.BASIC_INTERPRETATION: | 81 | case SolverLanguagePackage.ASSERTION: |
77 | sequence_BasicInterpretation(context, (BasicInterpretation) semanticObject); | 82 | sequence_AssertionOrDefinition(context, (Assertion) semanticObject); |
78 | return; | 83 | return; |
79 | case SolverLanguagePackage.BOOLEAN_FALSE: | 84 | case SolverLanguagePackage.BINARY_EXPRESSION: |
80 | sequence_BooleanValue(context, (BooleanFalse) semanticObject); | 85 | sequence_AdditiveExpression_ExponentialExpression_MultiplicativeExpression(context, (BinaryExpression) semanticObject); |
81 | return; | 86 | return; |
82 | case SolverLanguagePackage.BOOLEAN_OBJECT: | 87 | case SolverLanguagePackage.BOUNDED_MULTIPLICITY: |
83 | sequence_BooleanObject(context, (BooleanObject) semanticObject); | 88 | sequence_BoundedMultiplicity(context, (BoundedMultiplicity) semanticObject); |
84 | return; | 89 | return; |
85 | case SolverLanguagePackage.BOOLEAN_SYMBOL: | 90 | case SolverLanguagePackage.BOUNDED_SCOPE_DEFINITION: |
86 | sequence_BooleanSymbol(context, (BooleanSymbol) semanticObject); | 91 | sequence_BoundedScopeDefinition(context, (BoundedScopeDefinition) semanticObject); |
87 | return; | 92 | return; |
88 | case SolverLanguagePackage.BOOLEAN_TRUE: | 93 | case SolverLanguagePackage.CALL: |
89 | sequence_BooleanValue(context, (BooleanTrue) semanticObject); | 94 | if (action == grammarAccess.getAssertionOrDefinitionAccess().getAssertionBodyAction_1_0_0() |
95 | || action == grammarAccess.getAssertionOrDefinitionAccess().getPredicateDefinitionHeadAction_1_1_0() | ||
96 | || action == grammarAccess.getAssertionOrDefinitionAccess().getMetricDefinitionHeadAction_1_2_0() | ||
97 | || rule == grammarAccess.getExpressionRule() | ||
98 | || rule == grammarAccess.getDisjunctiveExpressionRule() | ||
99 | || action == grammarAccess.getDisjunctiveExpressionAccess().getDisjunctionChildrenAction_1_0_0() | ||
100 | || action == grammarAccess.getDisjunctiveExpressionAccess().getCaseConditionAction_1_1_0() | ||
101 | || rule == grammarAccess.getConjunctiveExpressionRule() | ||
102 | || action == grammarAccess.getConjunctiveExpressionAccess().getConjunctionChildrenAction_1_0() | ||
103 | || rule == grammarAccess.getComparisonExpressionRule() | ||
104 | || action == grammarAccess.getComparisonExpressionAccess().getComparisonLeftAction_1_0() | ||
105 | || rule == grammarAccess.getAdditiveExpressionRule() | ||
106 | || action == grammarAccess.getAdditiveExpressionAccess().getBinaryExpressionLeftAction_1_0() | ||
107 | || rule == grammarAccess.getMultiplicativeExpressionRule() | ||
108 | || action == grammarAccess.getMultiplicativeExpressionAccess().getBinaryExpressionLeftAction_1_0() | ||
109 | || rule == grammarAccess.getExponentialExpressionRule() | ||
110 | || action == grammarAccess.getExponentialExpressionAccess().getBinaryExpressionLeftAction_1_0() | ||
111 | || rule == grammarAccess.getUnaryExpressionRule() | ||
112 | || rule == grammarAccess.getAggregationExpressionRule() | ||
113 | || rule == grammarAccess.getAtomicExpressionRule()) { | ||
114 | sequence_AtomicExpression(context, (Call) semanticObject); | ||
115 | return; | ||
116 | } | ||
117 | else if (rule == grammarAccess.getCallRule()) { | ||
118 | sequence_Call(context, (Call) semanticObject); | ||
119 | return; | ||
120 | } | ||
121 | else break; | ||
122 | case SolverLanguagePackage.CASE: | ||
123 | if (rule == grammarAccess.getCaseRule()) { | ||
124 | sequence_Case(context, (Case) semanticObject); | ||
125 | return; | ||
126 | } | ||
127 | else if (action == grammarAccess.getDisjunctiveExpressionAccess().getSwitchCasesAction_1_1_3()) { | ||
128 | sequence_DisjunctiveExpression_Switch_1_1_3(context, (Case) semanticObject); | ||
129 | return; | ||
130 | } | ||
131 | else break; | ||
132 | case SolverLanguagePackage.COMPARISON: | ||
133 | sequence_ComparisonExpression(context, (Comparison) semanticObject); | ||
90 | return; | 134 | return; |
91 | case SolverLanguagePackage.CLASS_INTERPRETATION: | 135 | case SolverLanguagePackage.CONJUNCTION: |
92 | sequence_ClassInterpretation(context, (ClassInterpretation) semanticObject); | 136 | sequence_ConjunctiveExpression(context, (Conjunction) semanticObject); |
93 | return; | 137 | return; |
94 | case SolverLanguagePackage.CONSTRAINT: | 138 | case SolverLanguagePackage.COUNT: |
95 | sequence_Constraint(context, (Constraint) semanticObject); | 139 | sequence_Count(context, (Count) semanticObject); |
96 | return; | 140 | return; |
97 | case SolverLanguagePackage.DEFAULT_INTERPRETATION: | 141 | case SolverLanguagePackage.DEFAULT_DEFINITION: |
98 | sequence_DefaultInterpretation(context, (DefaultInterpretation) semanticObject); | 142 | sequence_DefaultDefinition(context, (DefaultDefinition) semanticObject); |
99 | return; | 143 | return; |
100 | case SolverLanguagePackage.ENUM_INTERPRETATION: | 144 | case SolverLanguagePackage.DISJUNCTION: |
101 | sequence_EnumInterpretation(context, (EnumInterpretation) semanticObject); | 145 | sequence_DisjunctiveExpression(context, (Disjunction) semanticObject); |
102 | return; | 146 | return; |
103 | case SolverLanguagePackage.EQUALS_SYMBOL: | 147 | case SolverLanguagePackage.EMPTY_INTERVAL_LITERAL: |
104 | sequence_EqualsSymbol(context, (EqualsSymbol) semanticObject); | 148 | sequence_EmptyIntervalLiteral(context, (EmptyIntervalLiteral) semanticObject); |
105 | return; | 149 | return; |
106 | case SolverLanguagePackage.ERROR: | 150 | case SolverLanguagePackage.EXACT_MULTIPLICITY: |
107 | sequence_TruthValue(context, (org.eclipse.viatra.solver.language.solverLanguage.Error) semanticObject); | 151 | sequence_ExactMultiplicity(context, (ExactMultiplicity) semanticObject); |
108 | return; | 152 | return; |
109 | case SolverLanguagePackage.EXIST_SYMBOL: | 153 | case SolverLanguagePackage.EXACT_SCOPE_DEFINITION: |
110 | sequence_ExistSymbol(context, (ExistSymbol) semanticObject); | 154 | sequence_ExactScopeDefinition(context, (ExactScopeDefinition) semanticObject); |
111 | return; | 155 | return; |
112 | case SolverLanguagePackage.FALSE: | 156 | case SolverLanguagePackage.EXPRESSION_ARGUMENT: |
113 | sequence_TruthValue(context, (False) semanticObject); | 157 | sequence_ExpressionArgument(context, (ExpressionArgument) semanticObject); |
114 | return; | 158 | return; |
115 | case SolverLanguagePackage.FIELD_RELATION_INTERPRETATION: | 159 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION: |
116 | sequence_FieldRelationInterpretation(context, (FieldRelationInterpretation) semanticObject); | 160 | sequence_ExternMetricDefinition(context, (ExternMetricDefinition) semanticObject); |
117 | return; | 161 | return; |
118 | case SolverLanguagePackage.GLOBAL_RELATION_INTERPRETATION: | 162 | case SolverLanguagePackage.EXTERN_PREDICATE_DEFINITION: |
119 | sequence_GlobalRelationInterpretation(context, (GlobalRelationInterpretation) semanticObject); | 163 | sequence_ExternPredicateDefinition(context, (ExternPredicateDefinition) semanticObject); |
120 | return; | 164 | return; |
121 | case SolverLanguagePackage.INT_OBJECT: | 165 | case SolverLanguagePackage.IF_ELSE: |
122 | sequence_IntObject(context, (IntObject) semanticObject); | 166 | sequence_IfElse(context, (IfElse) semanticObject); |
123 | return; | 167 | return; |
124 | case SolverLanguagePackage.INTEGER_SYMBOL: | 168 | case SolverLanguagePackage.INFINITY_LITERAL: |
125 | sequence_IntegerSymbol(context, (IntegerSymbol) semanticObject); | 169 | sequence_InfinityLiteral(context, (InfinityLiteral) semanticObject); |
126 | return; | 170 | return; |
127 | case SolverLanguagePackage.IRREFLEXIVE_CLOSURE: | 171 | case SolverLanguagePackage.INTERVAL: |
128 | sequence_ClosureType(context, (IrreflexiveClosure) semanticObject); | 172 | sequence_Interval(context, (Interval) semanticObject); |
129 | return; | 173 | return; |
130 | case SolverLanguagePackage.MODEL_SYMBOL: | 174 | case SolverLanguagePackage.LOGIC_LITERAL: |
131 | sequence_ModelSymbol(context, (ModelSymbol) semanticObject); | 175 | sequence_LogicLiteral(context, (LogicLiteral) semanticObject); |
132 | return; | 176 | return; |
133 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION: | 177 | case SolverLanguagePackage.LOWER_BOUNDED_SCOPE_DEFINITION: |
134 | sequence_MultiplicityDefinition(context, (MultiplicityDefinition) semanticObject); | 178 | sequence_LowerBoundedScopeDefinition(context, (LowerBoundedScopeDefinition) semanticObject); |
135 | return; | 179 | return; |
136 | case SolverLanguagePackage.NAMED_OBJECT: | 180 | case SolverLanguagePackage.MANY_MULTIPLICITY: |
137 | sequence_NamedObject(context, (NamedObject) semanticObject); | 181 | sequence_ManyMultiplicity(context, (ManyMultiplicity) semanticObject); |
138 | return; | 182 | return; |
139 | case SolverLanguagePackage.NEGATIVE: | 183 | case SolverLanguagePackage.MEMBER_DEFINITION: |
140 | sequence_Polarity(context, (Negative) semanticObject); | 184 | sequence_MemberDefinition(context, (MemberDefinition) semanticObject); |
141 | return; | 185 | return; |
142 | case SolverLanguagePackage.PARAMETER: | 186 | case SolverLanguagePackage.METRIC_DEFINITION: |
143 | sequence_Parameter(context, (org.eclipse.viatra.solver.language.solverLanguage.Parameter) semanticObject); | 187 | if (rule == grammarAccess.getAssertionOrDefinitionRule()) { |
188 | sequence_AssertionOrDefinition(context, (MetricDefinition) semanticObject); | ||
189 | return; | ||
190 | } | ||
191 | else if (rule == grammarAccess.getStatementRule()) { | ||
192 | sequence_AssertionOrDefinition_MetricDefinition(context, (MetricDefinition) semanticObject); | ||
193 | return; | ||
194 | } | ||
195 | else if (rule == grammarAccess.getMetricDefinitionRule()) { | ||
196 | sequence_MetricDefinition(context, (MetricDefinition) semanticObject); | ||
197 | return; | ||
198 | } | ||
199 | else break; | ||
200 | case SolverLanguagePackage.NAMED_ELEMENT: | ||
201 | sequence_NamedElement(context, (NamedElement) semanticObject); | ||
144 | return; | 202 | return; |
145 | case SolverLanguagePackage.PATTERN_BODY: | 203 | case SolverLanguagePackage.NUMERIC_LITERAL: |
146 | sequence_PatternBody(context, (PatternBody) semanticObject); | 204 | sequence_NumericLiteral(context, (NumericLiteral) semanticObject); |
147 | return; | 205 | return; |
148 | case SolverLanguagePackage.POSITIVE: | 206 | case SolverLanguagePackage.OBJECTIVE_DEFINITION: |
149 | sequence_Polarity(context, (Positive) semanticObject); | 207 | sequence_ObjectiveDefinition(context, (ObjectiveDefinition) semanticObject); |
150 | return; | ||
151 | case SolverLanguagePackage.PREDICATE: | ||
152 | sequence_Predicate(context, (Predicate) semanticObject); | ||
153 | return; | 208 | return; |
209 | case SolverLanguagePackage.PREDICATE_DEFINITION: | ||
210 | if (rule == grammarAccess.getAssertionOrDefinitionRule()) { | ||
211 | sequence_AssertionOrDefinition(context, (PredicateDefinition) semanticObject); | ||
212 | return; | ||
213 | } | ||
214 | else if (rule == grammarAccess.getStatementRule()) { | ||
215 | sequence_AssertionOrDefinition_PredicateDefinition(context, (PredicateDefinition) semanticObject); | ||
216 | return; | ||
217 | } | ||
218 | else if (rule == grammarAccess.getPredicateDefinitionRule()) { | ||
219 | sequence_PredicateDefinition(context, (PredicateDefinition) semanticObject); | ||
220 | return; | ||
221 | } | ||
222 | else break; | ||
154 | case SolverLanguagePackage.PROBLEM: | 223 | case SolverLanguagePackage.PROBLEM: |
155 | sequence_Problem(context, (Problem) semanticObject); | 224 | sequence_Problem(context, (Problem) semanticObject); |
156 | return; | 225 | return; |
157 | case SolverLanguagePackage.REAL_OBJECT: | 226 | case SolverLanguagePackage.REFERENCE: |
158 | sequence_RealObject(context, (RealObject) semanticObject); | 227 | sequence_Reference(context, (Reference) semanticObject); |
159 | return; | 228 | return; |
160 | case SolverLanguagePackage.REAL_SYMBOL: | 229 | case SolverLanguagePackage.STAR_ARGUMENT: |
161 | sequence_RealSymbol(context, (RealSymbol) semanticObject); | 230 | sequence_StarArgument(context, (StarArgument) semanticObject); |
162 | return; | 231 | return; |
163 | case SolverLanguagePackage.REFLEXIVE_CLOSURE: | 232 | case SolverLanguagePackage.STATEMENT: |
164 | sequence_ClosureType(context, (ReflexiveClosure) semanticObject); | 233 | sequence_ClassDefinition(context, (Statement) semanticObject); |
165 | return; | 234 | return; |
166 | case SolverLanguagePackage.STRING_OBJECT: | 235 | case SolverLanguagePackage.STRING_LITERAL: |
167 | sequence_StringObject(context, (StringObject) semanticObject); | 236 | sequence_StringLiteral(context, (StringLiteral) semanticObject); |
168 | return; | 237 | return; |
169 | case SolverLanguagePackage.STRING_SYMBOL: | 238 | case SolverLanguagePackage.SWITCH: |
170 | sequence_StringSymbol(context, (StringSymbol) semanticObject); | 239 | sequence_DisjunctiveExpression(context, (Switch) semanticObject); |
171 | return; | 240 | return; |
172 | case SolverLanguagePackage.TRUE: | 241 | case SolverLanguagePackage.TYPED_ARGUMENT: |
173 | sequence_TruthValue(context, (True) semanticObject); | 242 | sequence_TypedArgument(context, (TypedArgument) semanticObject); |
174 | return; | 243 | return; |
175 | case SolverLanguagePackage.UNKNOWN: | 244 | case SolverLanguagePackage.TYPED_STAR_ARGUMENT: |
176 | sequence_TruthValue(context, (Unknown) semanticObject); | 245 | sequence_TypedStarArgument(context, (TypedStarArgument) semanticObject); |
177 | return; | 246 | return; |
178 | case SolverLanguagePackage.UNNAMED_OBJECT: | 247 | case SolverLanguagePackage.UNARY_EXPRESSION: |
179 | sequence_UnnamedObject(context, (UnnamedObject) semanticObject); | 248 | sequence_UnaryExpression(context, (UnaryExpression) semanticObject); |
180 | return; | 249 | return; |
181 | case SolverLanguagePackage.VARIABLE: | 250 | case SolverLanguagePackage.UNNAMED_ERROR_PREDIATE_DEFINITION: |
182 | sequence_Variable(context, (Variable) semanticObject); | 251 | sequence_UnnamedErrorPrediateDefinition(context, (UnnamedErrorPrediateDefinition) semanticObject); |
183 | return; | 252 | return; |
184 | } | 253 | } |
185 | if (errorAcceptor != null) | 254 | if (errorAcceptor != null) |
@@ -188,574 +257,1169 @@ public class SolverLanguageSemanticSequencer extends AbstractDelegatingSemanticS | |||
188 | 257 | ||
189 | /** | 258 | /** |
190 | * Contexts: | 259 | * Contexts: |
191 | * ComplexObject returns AllInstances | 260 | * AssertionOrDefinition.Assertion_1_0_0 returns BinaryExpression |
192 | * AllInstances returns AllInstances | 261 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns BinaryExpression |
262 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns BinaryExpression | ||
263 | * Expression returns BinaryExpression | ||
264 | * DisjunctiveExpression returns BinaryExpression | ||
265 | * DisjunctiveExpression.Disjunction_1_0_0 returns BinaryExpression | ||
266 | * DisjunctiveExpression.Case_1_1_0 returns BinaryExpression | ||
267 | * ConjunctiveExpression returns BinaryExpression | ||
268 | * ConjunctiveExpression.Conjunction_1_0 returns BinaryExpression | ||
269 | * ComparisonExpression returns BinaryExpression | ||
270 | * ComparisonExpression.Comparison_1_0 returns BinaryExpression | ||
271 | * AdditiveExpression returns BinaryExpression | ||
272 | * AdditiveExpression.BinaryExpression_1_0 returns BinaryExpression | ||
273 | * MultiplicativeExpression returns BinaryExpression | ||
274 | * MultiplicativeExpression.BinaryExpression_1_0 returns BinaryExpression | ||
275 | * ExponentialExpression returns BinaryExpression | ||
276 | * ExponentialExpression.BinaryExpression_1_0 returns BinaryExpression | ||
277 | * UnaryExpression returns BinaryExpression | ||
278 | * AggregationExpression returns BinaryExpression | ||
279 | * AtomicExpression returns BinaryExpression | ||
280 | * | ||
281 | * Constraint: | ||
282 | * ( | ||
283 | * (left=AdditiveExpression_BinaryExpression_1_0 op=AdditiveBinaryOperator right=MultiplicativeExpression) | | ||
284 | * (left=MultiplicativeExpression_BinaryExpression_1_0 op=MultiplicativeBinaryOperator right=ExponentialExpression) | | ||
285 | * (left=ExponentialExpression_BinaryExpression_1_0 op=ExponentialOp right=ExponentialExpression) | ||
286 | * ) | ||
287 | */ | ||
288 | protected void sequence_AdditiveExpression_ExponentialExpression_MultiplicativeExpression(ISerializationContext context, BinaryExpression semanticObject) { | ||
289 | genericSequencer.createSequence(context, semanticObject); | ||
290 | } | ||
291 | |||
292 | |||
293 | /** | ||
294 | * Contexts: | ||
295 | * AssertionOrDefinition.Assertion_1_0_0 returns Aggregation | ||
296 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Aggregation | ||
297 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Aggregation | ||
298 | * Expression returns Aggregation | ||
299 | * DisjunctiveExpression returns Aggregation | ||
300 | * DisjunctiveExpression.Disjunction_1_0_0 returns Aggregation | ||
301 | * DisjunctiveExpression.Case_1_1_0 returns Aggregation | ||
302 | * ConjunctiveExpression returns Aggregation | ||
303 | * ConjunctiveExpression.Conjunction_1_0 returns Aggregation | ||
304 | * ComparisonExpression returns Aggregation | ||
305 | * ComparisonExpression.Comparison_1_0 returns Aggregation | ||
306 | * AdditiveExpression returns Aggregation | ||
307 | * AdditiveExpression.BinaryExpression_1_0 returns Aggregation | ||
308 | * MultiplicativeExpression returns Aggregation | ||
309 | * MultiplicativeExpression.BinaryExpression_1_0 returns Aggregation | ||
310 | * ExponentialExpression returns Aggregation | ||
311 | * ExponentialExpression.BinaryExpression_1_0 returns Aggregation | ||
312 | * UnaryExpression returns Aggregation | ||
313 | * AggregationExpression returns Aggregation | ||
314 | * Aggregation returns Aggregation | ||
315 | * AtomicExpression returns Aggregation | ||
193 | * | 316 | * |
194 | * Constraint: | 317 | * Constraint: |
195 | * symbol=Symbol | 318 | * (op=AggregationOp body=Expression condition=Expression) |
196 | */ | 319 | */ |
197 | protected void sequence_AllInstances(ISerializationContext context, AllInstances semanticObject) { | 320 | protected void sequence_Aggregation(ISerializationContext context, Aggregation semanticObject) { |
198 | if (errorAcceptor != null) { | 321 | if (errorAcceptor != null) { |
199 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.ALL_INSTANCES__SYMBOL) == ValueTransient.YES) | 322 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.AGGREGATION__OP) == ValueTransient.YES) |
200 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.ALL_INSTANCES__SYMBOL)); | 323 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.AGGREGATION__OP)); |
324 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.AGGREGATION__BODY) == ValueTransient.YES) | ||
325 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.AGGREGATION__BODY)); | ||
326 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.AGGREGATION__CONDITION) == ValueTransient.YES) | ||
327 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.AGGREGATION__CONDITION)); | ||
201 | } | 328 | } |
202 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | 329 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); |
203 | feeder.accept(grammarAccess.getAllInstancesAccess().getSymbolSymbolParserRuleCall_1_0(), semanticObject.getSymbol()); | 330 | feeder.accept(grammarAccess.getAggregationAccess().getOpAggregationOpEnumRuleCall_0_0(), semanticObject.getOp()); |
331 | feeder.accept(grammarAccess.getAggregationAccess().getBodyExpressionParserRuleCall_2_0(), semanticObject.getBody()); | ||
332 | feeder.accept(grammarAccess.getAggregationAccess().getConditionExpressionParserRuleCall_4_0(), semanticObject.getCondition()); | ||
204 | feeder.finish(); | 333 | feeder.finish(); |
205 | } | 334 | } |
206 | 335 | ||
207 | 336 | ||
208 | /** | 337 | /** |
209 | * Contexts: | 338 | * Contexts: |
210 | * ComplexObject returns AllObjects | 339 | * ArgumentList returns ArgumentList |
211 | * AllObjects returns AllObjects | ||
212 | * | 340 | * |
213 | * Constraint: | 341 | * Constraint: |
214 | * {AllObjects} | 342 | * (arguments+=Argument arguments+=Argument*)? |
215 | */ | 343 | */ |
216 | protected void sequence_AllObjects(ISerializationContext context, AllObjects semanticObject) { | 344 | protected void sequence_ArgumentList(ISerializationContext context, ArgumentList semanticObject) { |
217 | genericSequencer.createSequence(context, semanticObject); | 345 | genericSequencer.createSequence(context, semanticObject); |
218 | } | 346 | } |
219 | 347 | ||
220 | 348 | ||
221 | /** | 349 | /** |
222 | * Contexts: | 350 | * Contexts: |
223 | * Statement returns BasicInterpretation | 351 | * Statement returns Assertion |
224 | * Interpretation returns BasicInterpretation | 352 | * AssertionOrDefinition returns Assertion |
225 | * BasicInterpretation returns BasicInterpretation | ||
226 | * | 353 | * |
227 | * Constraint: | 354 | * Constraint: |
228 | * (symbol=Symbol (objects+=ComplexObject objects+=ComplexObject*)? value=TruthValue) | 355 | * (body=AssertionOrDefinition_Assertion_1_0_0 range=Expression?) |
229 | */ | 356 | */ |
230 | protected void sequence_BasicInterpretation(ISerializationContext context, BasicInterpretation semanticObject) { | 357 | protected void sequence_AssertionOrDefinition(ISerializationContext context, Assertion semanticObject) { |
231 | genericSequencer.createSequence(context, semanticObject); | 358 | genericSequencer.createSequence(context, semanticObject); |
232 | } | 359 | } |
233 | 360 | ||
234 | 361 | ||
235 | /** | 362 | /** |
236 | * Contexts: | 363 | * Contexts: |
237 | * ComplexObject returns BooleanObject | 364 | * AssertionOrDefinition returns MetricDefinition |
238 | * Object returns BooleanObject | ||
239 | * DataObject returns BooleanObject | ||
240 | * BooleanObject returns BooleanObject | ||
241 | * Literal returns BooleanObject | ||
242 | * | 365 | * |
243 | * Constraint: | 366 | * Constraint: |
244 | * value=BooleanValue | 367 | * (head=AssertionOrDefinition_MetricDefinition_1_2_0 body=Expression) |
245 | */ | 368 | */ |
246 | protected void sequence_BooleanObject(ISerializationContext context, BooleanObject semanticObject) { | 369 | protected void sequence_AssertionOrDefinition(ISerializationContext context, MetricDefinition semanticObject) { |
247 | if (errorAcceptor != null) { | 370 | if (errorAcceptor != null) { |
248 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.BOOLEAN_OBJECT__VALUE) == ValueTransient.YES) | 371 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.METRIC_DEFINITION__HEAD) == ValueTransient.YES) |
249 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.BOOLEAN_OBJECT__VALUE)); | 372 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.METRIC_DEFINITION__HEAD)); |
373 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.METRIC_DEFINITION__BODY) == ValueTransient.YES) | ||
374 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.METRIC_DEFINITION__BODY)); | ||
250 | } | 375 | } |
251 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | 376 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); |
252 | feeder.accept(grammarAccess.getBooleanObjectAccess().getValueBooleanValueParserRuleCall_0(), semanticObject.getValue()); | 377 | feeder.accept(grammarAccess.getAssertionOrDefinitionAccess().getMetricDefinitionHeadAction_1_2_0(), semanticObject.getHead()); |
378 | feeder.accept(grammarAccess.getAssertionOrDefinitionAccess().getBodyExpressionParserRuleCall_1_2_2_0(), semanticObject.getBody()); | ||
253 | feeder.finish(); | 379 | feeder.finish(); |
254 | } | 380 | } |
255 | 381 | ||
256 | 382 | ||
257 | /** | 383 | /** |
258 | * Contexts: | 384 | * Contexts: |
259 | * Symbol returns BooleanSymbol | 385 | * Statement returns MetricDefinition |
260 | * DataSymbol returns BooleanSymbol | ||
261 | * BooleanSymbol returns BooleanSymbol | ||
262 | * | 386 | * |
263 | * Constraint: | 387 | * Constraint: |
264 | * {BooleanSymbol} | 388 | * ((head=AssertionOrDefinition_MetricDefinition_1_2_0 body=Expression) | (type=MetricType head=Expression body=Expression)) |
265 | */ | 389 | */ |
266 | protected void sequence_BooleanSymbol(ISerializationContext context, BooleanSymbol semanticObject) { | 390 | protected void sequence_AssertionOrDefinition_MetricDefinition(ISerializationContext context, MetricDefinition semanticObject) { |
267 | genericSequencer.createSequence(context, semanticObject); | 391 | genericSequencer.createSequence(context, semanticObject); |
268 | } | 392 | } |
269 | 393 | ||
270 | 394 | ||
271 | /** | 395 | /** |
272 | * Contexts: | 396 | * Contexts: |
273 | * BooleanValue returns BooleanFalse | 397 | * AssertionOrDefinition returns PredicateDefinition |
274 | * | 398 | * |
275 | * Constraint: | 399 | * Constraint: |
276 | * {BooleanFalse} | 400 | * (head=AssertionOrDefinition_PredicateDefinition_1_1_0 body=Expression) |
277 | */ | 401 | */ |
278 | protected void sequence_BooleanValue(ISerializationContext context, BooleanFalse semanticObject) { | 402 | protected void sequence_AssertionOrDefinition(ISerializationContext context, PredicateDefinition semanticObject) { |
279 | genericSequencer.createSequence(context, semanticObject); | 403 | if (errorAcceptor != null) { |
404 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.PREDICATE_DEFINITION__HEAD) == ValueTransient.YES) | ||
405 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.PREDICATE_DEFINITION__HEAD)); | ||
406 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.PREDICATE_DEFINITION__BODY) == ValueTransient.YES) | ||
407 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.PREDICATE_DEFINITION__BODY)); | ||
408 | } | ||
409 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
410 | feeder.accept(grammarAccess.getAssertionOrDefinitionAccess().getPredicateDefinitionHeadAction_1_1_0(), semanticObject.getHead()); | ||
411 | feeder.accept(grammarAccess.getAssertionOrDefinitionAccess().getBodyExpressionParserRuleCall_1_1_2_0(), semanticObject.getBody()); | ||
412 | feeder.finish(); | ||
280 | } | 413 | } |
281 | 414 | ||
282 | 415 | ||
283 | /** | 416 | /** |
284 | * Contexts: | 417 | * Contexts: |
285 | * BooleanValue returns BooleanTrue | 418 | * Statement returns PredicateDefinition |
286 | * | 419 | * |
287 | * Constraint: | 420 | * Constraint: |
288 | * {BooleanTrue} | 421 | * ( |
422 | * (head=AssertionOrDefinition_PredicateDefinition_1_1_0 body=Expression) | | ||
423 | * (((functional?='functional' error?='error'?) | (error?='error' functional?='functional'?)) head=Call body=Expression) | ||
424 | * ) | ||
289 | */ | 425 | */ |
290 | protected void sequence_BooleanValue(ISerializationContext context, BooleanTrue semanticObject) { | 426 | protected void sequence_AssertionOrDefinition_PredicateDefinition(ISerializationContext context, PredicateDefinition semanticObject) { |
291 | genericSequencer.createSequence(context, semanticObject); | 427 | genericSequencer.createSequence(context, semanticObject); |
292 | } | 428 | } |
293 | 429 | ||
294 | 430 | ||
295 | /** | 431 | /** |
296 | * Contexts: | 432 | * Contexts: |
297 | * Statement returns ClassInterpretation | 433 | * AssertionOrDefinition.Assertion_1_0_0 returns Call |
298 | * Interpretation returns ClassInterpretation | 434 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Call |
299 | * CDInterpretation returns ClassInterpretation | 435 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Call |
300 | * ClassInterpretation returns ClassInterpretation | 436 | * Expression returns Call |
437 | * DisjunctiveExpression returns Call | ||
438 | * DisjunctiveExpression.Disjunction_1_0_0 returns Call | ||
439 | * DisjunctiveExpression.Case_1_1_0 returns Call | ||
440 | * ConjunctiveExpression returns Call | ||
441 | * ConjunctiveExpression.Conjunction_1_0 returns Call | ||
442 | * ComparisonExpression returns Call | ||
443 | * ComparisonExpression.Comparison_1_0 returns Call | ||
444 | * AdditiveExpression returns Call | ||
445 | * AdditiveExpression.BinaryExpression_1_0 returns Call | ||
446 | * MultiplicativeExpression returns Call | ||
447 | * MultiplicativeExpression.BinaryExpression_1_0 returns Call | ||
448 | * ExponentialExpression returns Call | ||
449 | * ExponentialExpression.BinaryExpression_1_0 returns Call | ||
450 | * UnaryExpression returns Call | ||
451 | * AggregationExpression returns Call | ||
452 | * AtomicExpression returns Call | ||
301 | * | 453 | * |
302 | * Constraint: | 454 | * Constraint: |
303 | * (abstract?='abstract'? symbol=ModelSymbol supertypes+=ModelSymbol* fielt+=FieldRelationInterpretation*) | 455 | * (functor=AtomicExpression_Call_0_1_0 argumentList=ArgumentList) |
304 | */ | 456 | */ |
305 | protected void sequence_ClassInterpretation(ISerializationContext context, ClassInterpretation semanticObject) { | 457 | protected void sequence_AtomicExpression(ISerializationContext context, Call semanticObject) { |
306 | genericSequencer.createSequence(context, semanticObject); | 458 | if (errorAcceptor != null) { |
459 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.CALL__FUNCTOR) == ValueTransient.YES) | ||
460 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.CALL__FUNCTOR)); | ||
461 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.CALL__ARGUMENT_LIST) == ValueTransient.YES) | ||
462 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.CALL__ARGUMENT_LIST)); | ||
463 | } | ||
464 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
465 | feeder.accept(grammarAccess.getAtomicExpressionAccess().getCallFunctorAction_0_1_0(), semanticObject.getFunctor()); | ||
466 | feeder.accept(grammarAccess.getAtomicExpressionAccess().getArgumentListArgumentListParserRuleCall_0_1_1_0(), semanticObject.getArgumentList()); | ||
467 | feeder.finish(); | ||
307 | } | 468 | } |
308 | 469 | ||
309 | 470 | ||
310 | /** | 471 | /** |
311 | * Contexts: | 472 | * Contexts: |
312 | * ClosureType returns IrreflexiveClosure | 473 | * Multiplicity returns BoundedMultiplicity |
474 | * BoundedMultiplicity returns BoundedMultiplicity | ||
313 | * | 475 | * |
314 | * Constraint: | 476 | * Constraint: |
315 | * {IrreflexiveClosure} | 477 | * (lowerBound=INT upperBound=UpperMultiplicty) |
316 | */ | 478 | */ |
317 | protected void sequence_ClosureType(ISerializationContext context, IrreflexiveClosure semanticObject) { | 479 | protected void sequence_BoundedMultiplicity(ISerializationContext context, BoundedMultiplicity semanticObject) { |
318 | genericSequencer.createSequence(context, semanticObject); | 480 | if (errorAcceptor != null) { |
481 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.BOUNDED_MULTIPLICITY__LOWER_BOUND) == ValueTransient.YES) | ||
482 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.BOUNDED_MULTIPLICITY__LOWER_BOUND)); | ||
483 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.BOUNDED_MULTIPLICITY__UPPER_BOUND) == ValueTransient.YES) | ||
484 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.BOUNDED_MULTIPLICITY__UPPER_BOUND)); | ||
485 | } | ||
486 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
487 | feeder.accept(grammarAccess.getBoundedMultiplicityAccess().getLowerBoundINTTerminalRuleCall_1_0(), semanticObject.getLowerBound()); | ||
488 | feeder.accept(grammarAccess.getBoundedMultiplicityAccess().getUpperBoundUpperMultiplictyParserRuleCall_3_0(), semanticObject.getUpperBound()); | ||
489 | feeder.finish(); | ||
319 | } | 490 | } |
320 | 491 | ||
321 | 492 | ||
322 | /** | 493 | /** |
323 | * Contexts: | 494 | * Contexts: |
324 | * ClosureType returns ReflexiveClosure | 495 | * Statement returns BoundedScopeDefinition |
496 | * ScopeDefinition returns BoundedScopeDefinition | ||
497 | * BoundedScopeDefinition returns BoundedScopeDefinition | ||
325 | * | 498 | * |
326 | * Constraint: | 499 | * Constraint: |
327 | * {ReflexiveClosure} | 500 | * ((lowerBound=INT? type=[NamedElement|QualifiedName] upperBound=INT) | (upperBound=INT type=[NamedElement|QualifiedName] lowerBound=INT?)) |
328 | */ | 501 | */ |
329 | protected void sequence_ClosureType(ISerializationContext context, ReflexiveClosure semanticObject) { | 502 | protected void sequence_BoundedScopeDefinition(ISerializationContext context, BoundedScopeDefinition semanticObject) { |
330 | genericSequencer.createSequence(context, semanticObject); | 503 | genericSequencer.createSequence(context, semanticObject); |
331 | } | 504 | } |
332 | 505 | ||
333 | 506 | ||
334 | /** | 507 | /** |
335 | * Contexts: | 508 | * Contexts: |
336 | * Constraint returns Constraint | 509 | * Call returns Call |
337 | * | 510 | * |
338 | * Constraint: | 511 | * Constraint: |
339 | * ((polarity=Polarity? symbol=ModelSymbol params+=Literal? params+=Literal*) | (closureType=ClosureType params+=Literal? params+=Literal*)) | 512 | * (functor=Reference (transitiveClosure?=STAR | reflexiveTransitiveClosure?=PLUS)? argumentList=ArgumentList) |
340 | */ | 513 | */ |
341 | protected void sequence_Constraint(ISerializationContext context, Constraint semanticObject) { | 514 | protected void sequence_Call(ISerializationContext context, Call semanticObject) { |
342 | genericSequencer.createSequence(context, semanticObject); | 515 | genericSequencer.createSequence(context, semanticObject); |
343 | } | 516 | } |
344 | 517 | ||
345 | 518 | ||
346 | /** | 519 | /** |
347 | * Contexts: | 520 | * Contexts: |
348 | * Statement returns DefaultInterpretation | 521 | * Case returns Case |
349 | * Interpretation returns DefaultInterpretation | ||
350 | * DefaultInterpretation returns DefaultInterpretation | ||
351 | * | 522 | * |
352 | * Constraint: | 523 | * Constraint: |
353 | * interpretation=BasicInterpretation | 524 | * (condition=ConjunctiveExpression body=ConjunctiveExpression) |
354 | */ | 525 | */ |
355 | protected void sequence_DefaultInterpretation(ISerializationContext context, DefaultInterpretation semanticObject) { | 526 | protected void sequence_Case(ISerializationContext context, Case semanticObject) { |
356 | if (errorAcceptor != null) { | 527 | if (errorAcceptor != null) { |
357 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.DEFAULT_INTERPRETATION__INTERPRETATION) == ValueTransient.YES) | 528 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.CASE__CONDITION) == ValueTransient.YES) |
358 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.DEFAULT_INTERPRETATION__INTERPRETATION)); | 529 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.CASE__CONDITION)); |
530 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.CASE__BODY) == ValueTransient.YES) | ||
531 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.CASE__BODY)); | ||
359 | } | 532 | } |
360 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | 533 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); |
361 | feeder.accept(grammarAccess.getDefaultInterpretationAccess().getInterpretationBasicInterpretationParserRuleCall_1_0(), semanticObject.getInterpretation()); | 534 | feeder.accept(grammarAccess.getCaseAccess().getConditionConjunctiveExpressionParserRuleCall_0_0(), semanticObject.getCondition()); |
535 | feeder.accept(grammarAccess.getCaseAccess().getBodyConjunctiveExpressionParserRuleCall_2_0(), semanticObject.getBody()); | ||
362 | feeder.finish(); | 536 | feeder.finish(); |
363 | } | 537 | } |
364 | 538 | ||
365 | 539 | ||
366 | /** | 540 | /** |
367 | * Contexts: | 541 | * Contexts: |
368 | * Statement returns EnumInterpretation | 542 | * Statement returns Statement |
369 | * Interpretation returns EnumInterpretation | 543 | * ClassDefinition returns Statement |
370 | * CDInterpretation returns EnumInterpretation | ||
371 | * EnumInterpretation returns EnumInterpretation | ||
372 | * | 544 | * |
373 | * Constraint: | 545 | * Constraint: |
374 | * (Symbol=ModelSymbol objects+=NamedObject+) | 546 | * ( |
547 | * abstract?='abstract'? | ||
548 | * name=ID | ||
549 | * (superclasses+=[NamedElement|QualifiedName] superclasses+=[NamedElement|QualifiedName]*)? | ||
550 | * members+=MemberDefinition* | ||
551 | * ) | ||
375 | */ | 552 | */ |
376 | protected void sequence_EnumInterpretation(ISerializationContext context, EnumInterpretation semanticObject) { | 553 | protected void sequence_ClassDefinition(ISerializationContext context, Statement semanticObject) { |
377 | genericSequencer.createSequence(context, semanticObject); | 554 | genericSequencer.createSequence(context, semanticObject); |
378 | } | 555 | } |
379 | 556 | ||
380 | 557 | ||
381 | /** | 558 | /** |
382 | * Contexts: | 559 | * Contexts: |
383 | * Symbol returns EqualsSymbol | 560 | * AssertionOrDefinition.Assertion_1_0_0 returns Comparison |
384 | * PartialitySymbol returns EqualsSymbol | 561 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Comparison |
385 | * EqualsSymbol returns EqualsSymbol | 562 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Comparison |
563 | * Expression returns Comparison | ||
564 | * DisjunctiveExpression returns Comparison | ||
565 | * DisjunctiveExpression.Disjunction_1_0_0 returns Comparison | ||
566 | * DisjunctiveExpression.Case_1_1_0 returns Comparison | ||
567 | * ConjunctiveExpression returns Comparison | ||
568 | * ConjunctiveExpression.Conjunction_1_0 returns Comparison | ||
569 | * ComparisonExpression returns Comparison | ||
570 | * ComparisonExpression.Comparison_1_0 returns Comparison | ||
571 | * AdditiveExpression returns Comparison | ||
572 | * AdditiveExpression.BinaryExpression_1_0 returns Comparison | ||
573 | * MultiplicativeExpression returns Comparison | ||
574 | * MultiplicativeExpression.BinaryExpression_1_0 returns Comparison | ||
575 | * ExponentialExpression returns Comparison | ||
576 | * ExponentialExpression.BinaryExpression_1_0 returns Comparison | ||
577 | * UnaryExpression returns Comparison | ||
578 | * AggregationExpression returns Comparison | ||
579 | * AtomicExpression returns Comparison | ||
386 | * | 580 | * |
387 | * Constraint: | 581 | * Constraint: |
388 | * {EqualsSymbol} | 582 | * (left=ComparisonExpression_Comparison_1_0 op=ComparisonOperator right=AdditiveExpression) |
389 | */ | 583 | */ |
390 | protected void sequence_EqualsSymbol(ISerializationContext context, EqualsSymbol semanticObject) { | 584 | protected void sequence_ComparisonExpression(ISerializationContext context, Comparison semanticObject) { |
391 | genericSequencer.createSequence(context, semanticObject); | 585 | if (errorAcceptor != null) { |
586 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.COMPARISON__LEFT) == ValueTransient.YES) | ||
587 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.COMPARISON__LEFT)); | ||
588 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.COMPARISON__OP) == ValueTransient.YES) | ||
589 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.COMPARISON__OP)); | ||
590 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.COMPARISON__RIGHT) == ValueTransient.YES) | ||
591 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.COMPARISON__RIGHT)); | ||
592 | } | ||
593 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
594 | feeder.accept(grammarAccess.getComparisonExpressionAccess().getComparisonLeftAction_1_0(), semanticObject.getLeft()); | ||
595 | feeder.accept(grammarAccess.getComparisonExpressionAccess().getOpComparisonOperatorEnumRuleCall_1_1_0(), semanticObject.getOp()); | ||
596 | feeder.accept(grammarAccess.getComparisonExpressionAccess().getRightAdditiveExpressionParserRuleCall_1_2_0(), semanticObject.getRight()); | ||
597 | feeder.finish(); | ||
392 | } | 598 | } |
393 | 599 | ||
394 | 600 | ||
395 | /** | 601 | /** |
396 | * Contexts: | 602 | * Contexts: |
397 | * Symbol returns ExistSymbol | 603 | * AssertionOrDefinition.Assertion_1_0_0 returns Conjunction |
398 | * PartialitySymbol returns ExistSymbol | 604 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Conjunction |
399 | * ExistSymbol returns ExistSymbol | 605 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Conjunction |
606 | * Expression returns Conjunction | ||
607 | * DisjunctiveExpression returns Conjunction | ||
608 | * DisjunctiveExpression.Disjunction_1_0_0 returns Conjunction | ||
609 | * DisjunctiveExpression.Case_1_1_0 returns Conjunction | ||
610 | * ConjunctiveExpression returns Conjunction | ||
611 | * ConjunctiveExpression.Conjunction_1_0 returns Conjunction | ||
612 | * ComparisonExpression returns Conjunction | ||
613 | * ComparisonExpression.Comparison_1_0 returns Conjunction | ||
614 | * AdditiveExpression returns Conjunction | ||
615 | * AdditiveExpression.BinaryExpression_1_0 returns Conjunction | ||
616 | * MultiplicativeExpression returns Conjunction | ||
617 | * MultiplicativeExpression.BinaryExpression_1_0 returns Conjunction | ||
618 | * ExponentialExpression returns Conjunction | ||
619 | * ExponentialExpression.BinaryExpression_1_0 returns Conjunction | ||
620 | * UnaryExpression returns Conjunction | ||
621 | * AggregationExpression returns Conjunction | ||
622 | * AtomicExpression returns Conjunction | ||
400 | * | 623 | * |
401 | * Constraint: | 624 | * Constraint: |
402 | * {ExistSymbol} | 625 | * (children+=ConjunctiveExpression_Conjunction_1_0 children+=ComparisonExpression+) |
403 | */ | 626 | */ |
404 | protected void sequence_ExistSymbol(ISerializationContext context, ExistSymbol semanticObject) { | 627 | protected void sequence_ConjunctiveExpression(ISerializationContext context, Conjunction semanticObject) { |
405 | genericSequencer.createSequence(context, semanticObject); | 628 | genericSequencer.createSequence(context, semanticObject); |
406 | } | 629 | } |
407 | 630 | ||
408 | 631 | ||
409 | /** | 632 | /** |
410 | * Contexts: | 633 | * Contexts: |
411 | * FieldRelationInterpretation returns FieldRelationInterpretation | 634 | * AssertionOrDefinition.Assertion_1_0_0 returns Count |
635 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Count | ||
636 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Count | ||
637 | * Expression returns Count | ||
638 | * DisjunctiveExpression returns Count | ||
639 | * DisjunctiveExpression.Disjunction_1_0_0 returns Count | ||
640 | * DisjunctiveExpression.Case_1_1_0 returns Count | ||
641 | * ConjunctiveExpression returns Count | ||
642 | * ConjunctiveExpression.Conjunction_1_0 returns Count | ||
643 | * ComparisonExpression returns Count | ||
644 | * ComparisonExpression.Comparison_1_0 returns Count | ||
645 | * AdditiveExpression returns Count | ||
646 | * AdditiveExpression.BinaryExpression_1_0 returns Count | ||
647 | * MultiplicativeExpression returns Count | ||
648 | * MultiplicativeExpression.BinaryExpression_1_0 returns Count | ||
649 | * ExponentialExpression returns Count | ||
650 | * ExponentialExpression.BinaryExpression_1_0 returns Count | ||
651 | * UnaryExpression returns Count | ||
652 | * AggregationExpression returns Count | ||
653 | * Count returns Count | ||
654 | * AtomicExpression returns Count | ||
655 | * | ||
656 | * Constraint: | ||
657 | * body=Expression | ||
658 | */ | ||
659 | protected void sequence_Count(ISerializationContext context, Count semanticObject) { | ||
660 | if (errorAcceptor != null) { | ||
661 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.COUNT__BODY) == ValueTransient.YES) | ||
662 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.COUNT__BODY)); | ||
663 | } | ||
664 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
665 | feeder.accept(grammarAccess.getCountAccess().getBodyExpressionParserRuleCall_2_0(), semanticObject.getBody()); | ||
666 | feeder.finish(); | ||
667 | } | ||
668 | |||
669 | |||
670 | /** | ||
671 | * Contexts: | ||
672 | * Statement returns DefaultDefinition | ||
673 | * DefaultDefinition returns DefaultDefinition | ||
674 | * | ||
675 | * Constraint: | ||
676 | * (head=Call range=Expression) | ||
677 | */ | ||
678 | protected void sequence_DefaultDefinition(ISerializationContext context, DefaultDefinition semanticObject) { | ||
679 | if (errorAcceptor != null) { | ||
680 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.DEFAULT_DEFINITION__HEAD) == ValueTransient.YES) | ||
681 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.DEFAULT_DEFINITION__HEAD)); | ||
682 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.DEFAULT_DEFINITION__RANGE) == ValueTransient.YES) | ||
683 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.DEFAULT_DEFINITION__RANGE)); | ||
684 | } | ||
685 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
686 | feeder.accept(grammarAccess.getDefaultDefinitionAccess().getHeadCallParserRuleCall_1_0(), semanticObject.getHead()); | ||
687 | feeder.accept(grammarAccess.getDefaultDefinitionAccess().getRangeExpressionParserRuleCall_3_0(), semanticObject.getRange()); | ||
688 | feeder.finish(); | ||
689 | } | ||
690 | |||
691 | |||
692 | /** | ||
693 | * Contexts: | ||
694 | * AssertionOrDefinition.Assertion_1_0_0 returns Disjunction | ||
695 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Disjunction | ||
696 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Disjunction | ||
697 | * Expression returns Disjunction | ||
698 | * DisjunctiveExpression returns Disjunction | ||
699 | * DisjunctiveExpression.Disjunction_1_0_0 returns Disjunction | ||
700 | * DisjunctiveExpression.Case_1_1_0 returns Disjunction | ||
701 | * ConjunctiveExpression returns Disjunction | ||
702 | * ConjunctiveExpression.Conjunction_1_0 returns Disjunction | ||
703 | * ComparisonExpression returns Disjunction | ||
704 | * ComparisonExpression.Comparison_1_0 returns Disjunction | ||
705 | * AdditiveExpression returns Disjunction | ||
706 | * AdditiveExpression.BinaryExpression_1_0 returns Disjunction | ||
707 | * MultiplicativeExpression returns Disjunction | ||
708 | * MultiplicativeExpression.BinaryExpression_1_0 returns Disjunction | ||
709 | * ExponentialExpression returns Disjunction | ||
710 | * ExponentialExpression.BinaryExpression_1_0 returns Disjunction | ||
711 | * UnaryExpression returns Disjunction | ||
712 | * AggregationExpression returns Disjunction | ||
713 | * AtomicExpression returns Disjunction | ||
412 | * | 714 | * |
413 | * Constraint: | 715 | * Constraint: |
414 | * (containment?='containment'? symbol=ModelSymbol multiplicity=MultiplicityDefinition? target=Symbol) | 716 | * (children+=DisjunctiveExpression_Disjunction_1_0_0 children+=ConjunctiveExpression+) |
415 | */ | 717 | */ |
416 | protected void sequence_FieldRelationInterpretation(ISerializationContext context, FieldRelationInterpretation semanticObject) { | 718 | protected void sequence_DisjunctiveExpression(ISerializationContext context, Disjunction semanticObject) { |
417 | genericSequencer.createSequence(context, semanticObject); | 719 | genericSequencer.createSequence(context, semanticObject); |
418 | } | 720 | } |
419 | 721 | ||
420 | 722 | ||
421 | /** | 723 | /** |
422 | * Contexts: | 724 | * Contexts: |
423 | * Statement returns GlobalRelationInterpretation | 725 | * AssertionOrDefinition.Assertion_1_0_0 returns Switch |
424 | * Interpretation returns GlobalRelationInterpretation | 726 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Switch |
425 | * CDInterpretation returns GlobalRelationInterpretation | 727 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Switch |
426 | * GlobalRelationInterpretation returns GlobalRelationInterpretation | 728 | * Expression returns Switch |
729 | * DisjunctiveExpression returns Switch | ||
730 | * DisjunctiveExpression.Disjunction_1_0_0 returns Switch | ||
731 | * DisjunctiveExpression.Case_1_1_0 returns Switch | ||
732 | * ConjunctiveExpression returns Switch | ||
733 | * ConjunctiveExpression.Conjunction_1_0 returns Switch | ||
734 | * ComparisonExpression returns Switch | ||
735 | * ComparisonExpression.Comparison_1_0 returns Switch | ||
736 | * AdditiveExpression returns Switch | ||
737 | * AdditiveExpression.BinaryExpression_1_0 returns Switch | ||
738 | * MultiplicativeExpression returns Switch | ||
739 | * MultiplicativeExpression.BinaryExpression_1_0 returns Switch | ||
740 | * ExponentialExpression returns Switch | ||
741 | * ExponentialExpression.BinaryExpression_1_0 returns Switch | ||
742 | * UnaryExpression returns Switch | ||
743 | * AggregationExpression returns Switch | ||
744 | * AtomicExpression returns Switch | ||
427 | * | 745 | * |
428 | * Constraint: | 746 | * Constraint: |
429 | * ( | 747 | * (cases+=DisjunctiveExpression_Switch_1_1_3 cases+=Case*) |
430 | * containment?='containment'? | ||
431 | * symbol=ModelSymbol | ||
432 | * sourceMultiplicity=MultiplicityDefinition? | ||
433 | * source=Symbol | ||
434 | * targetMultiplicity=MultiplicityDefinition? | ||
435 | * target=Symbol | ||
436 | * ) | ||
437 | */ | 748 | */ |
438 | protected void sequence_GlobalRelationInterpretation(ISerializationContext context, GlobalRelationInterpretation semanticObject) { | 749 | protected void sequence_DisjunctiveExpression(ISerializationContext context, Switch semanticObject) { |
439 | genericSequencer.createSequence(context, semanticObject); | 750 | genericSequencer.createSequence(context, semanticObject); |
440 | } | 751 | } |
441 | 752 | ||
442 | 753 | ||
443 | /** | 754 | /** |
444 | * Contexts: | 755 | * Contexts: |
445 | * ComplexObject returns IntObject | 756 | * DisjunctiveExpression.Switch_1_1_3 returns Case |
446 | * Object returns IntObject | ||
447 | * DataObject returns IntObject | ||
448 | * IntObject returns IntObject | ||
449 | * Literal returns IntObject | ||
450 | * | 757 | * |
451 | * Constraint: | 758 | * Constraint: |
452 | * value=INTLiteral | 759 | * (condition=DisjunctiveExpression_Case_1_1_0 body=ConjunctiveExpression) |
453 | */ | 760 | */ |
454 | protected void sequence_IntObject(ISerializationContext context, IntObject semanticObject) { | 761 | protected void sequence_DisjunctiveExpression_Switch_1_1_3(ISerializationContext context, Case semanticObject) { |
455 | if (errorAcceptor != null) { | 762 | if (errorAcceptor != null) { |
456 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.INT_OBJECT__VALUE) == ValueTransient.YES) | 763 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.CASE__CONDITION) == ValueTransient.YES) |
457 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.INT_OBJECT__VALUE)); | 764 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.CASE__CONDITION)); |
765 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.CASE__BODY) == ValueTransient.YES) | ||
766 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.CASE__BODY)); | ||
458 | } | 767 | } |
459 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | 768 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); |
460 | feeder.accept(grammarAccess.getIntObjectAccess().getValueINTLiteralParserRuleCall_0(), semanticObject.getValue()); | 769 | feeder.accept(grammarAccess.getDisjunctiveExpressionAccess().getCaseConditionAction_1_1_0(), semanticObject.getCondition()); |
770 | feeder.accept(grammarAccess.getDisjunctiveExpressionAccess().getBodyConjunctiveExpressionParserRuleCall_1_1_2_0(), semanticObject.getBody()); | ||
461 | feeder.finish(); | 771 | feeder.finish(); |
462 | } | 772 | } |
463 | 773 | ||
464 | 774 | ||
465 | /** | 775 | /** |
466 | * Contexts: | 776 | * Contexts: |
467 | * Symbol returns IntegerSymbol | 777 | * AssertionOrDefinition.Assertion_1_0_0 returns EmptyIntervalLiteral |
468 | * DataSymbol returns IntegerSymbol | 778 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns EmptyIntervalLiteral |
469 | * IntegerSymbol returns IntegerSymbol | 779 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns EmptyIntervalLiteral |
780 | * Expression returns EmptyIntervalLiteral | ||
781 | * DisjunctiveExpression returns EmptyIntervalLiteral | ||
782 | * DisjunctiveExpression.Disjunction_1_0_0 returns EmptyIntervalLiteral | ||
783 | * DisjunctiveExpression.Case_1_1_0 returns EmptyIntervalLiteral | ||
784 | * ConjunctiveExpression returns EmptyIntervalLiteral | ||
785 | * ConjunctiveExpression.Conjunction_1_0 returns EmptyIntervalLiteral | ||
786 | * ComparisonExpression returns EmptyIntervalLiteral | ||
787 | * ComparisonExpression.Comparison_1_0 returns EmptyIntervalLiteral | ||
788 | * AdditiveExpression returns EmptyIntervalLiteral | ||
789 | * AdditiveExpression.BinaryExpression_1_0 returns EmptyIntervalLiteral | ||
790 | * MultiplicativeExpression returns EmptyIntervalLiteral | ||
791 | * MultiplicativeExpression.BinaryExpression_1_0 returns EmptyIntervalLiteral | ||
792 | * ExponentialExpression returns EmptyIntervalLiteral | ||
793 | * ExponentialExpression.BinaryExpression_1_0 returns EmptyIntervalLiteral | ||
794 | * UnaryExpression returns EmptyIntervalLiteral | ||
795 | * AggregationExpression returns EmptyIntervalLiteral | ||
796 | * AtomicExpression returns EmptyIntervalLiteral | ||
797 | * Literal returns EmptyIntervalLiteral | ||
798 | * EmptyIntervalLiteral returns EmptyIntervalLiteral | ||
470 | * | 799 | * |
471 | * Constraint: | 800 | * Constraint: |
472 | * {IntegerSymbol} | 801 | * {EmptyIntervalLiteral} |
473 | */ | 802 | */ |
474 | protected void sequence_IntegerSymbol(ISerializationContext context, IntegerSymbol semanticObject) { | 803 | protected void sequence_EmptyIntervalLiteral(ISerializationContext context, EmptyIntervalLiteral semanticObject) { |
475 | genericSequencer.createSequence(context, semanticObject); | 804 | genericSequencer.createSequence(context, semanticObject); |
476 | } | 805 | } |
477 | 806 | ||
478 | 807 | ||
479 | /** | 808 | /** |
480 | * Contexts: | 809 | * Contexts: |
481 | * Symbol returns ModelSymbol | 810 | * Multiplicity returns ExactMultiplicity |
482 | * ModelSymbol returns ModelSymbol | 811 | * ExactMultiplicity returns ExactMultiplicity |
483 | * | 812 | * |
484 | * Constraint: | 813 | * Constraint: |
485 | * name=ID | 814 | * multiplicity=UpperMultiplicty |
486 | */ | 815 | */ |
487 | protected void sequence_ModelSymbol(ISerializationContext context, ModelSymbol semanticObject) { | 816 | protected void sequence_ExactMultiplicity(ISerializationContext context, ExactMultiplicity semanticObject) { |
488 | if (errorAcceptor != null) { | 817 | if (errorAcceptor != null) { |
489 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.MODEL_SYMBOL__NAME) == ValueTransient.YES) | 818 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.EXACT_MULTIPLICITY__MULTIPLICITY) == ValueTransient.YES) |
490 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.MODEL_SYMBOL__NAME)); | 819 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.EXACT_MULTIPLICITY__MULTIPLICITY)); |
491 | } | 820 | } |
492 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | 821 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); |
493 | feeder.accept(grammarAccess.getModelSymbolAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName()); | 822 | feeder.accept(grammarAccess.getExactMultiplicityAccess().getMultiplicityUpperMultiplictyParserRuleCall_1_0(), semanticObject.getMultiplicity()); |
494 | feeder.finish(); | 823 | feeder.finish(); |
495 | } | 824 | } |
496 | 825 | ||
497 | 826 | ||
498 | /** | 827 | /** |
499 | * Contexts: | 828 | * Contexts: |
500 | * MultiplicityDefinition returns MultiplicityDefinition | 829 | * Statement returns ExactScopeDefinition |
830 | * ScopeDefinition returns ExactScopeDefinition | ||
831 | * ExactScopeDefinition returns ExactScopeDefinition | ||
501 | * | 832 | * |
502 | * Constraint: | 833 | * Constraint: |
503 | * (lower=INT (upper=INT | unlimitedUpper?='*')) | 834 | * (type=[NamedElement|QualifiedName] exactScope=INT) |
504 | */ | 835 | */ |
505 | protected void sequence_MultiplicityDefinition(ISerializationContext context, MultiplicityDefinition semanticObject) { | 836 | protected void sequence_ExactScopeDefinition(ISerializationContext context, ExactScopeDefinition semanticObject) { |
506 | genericSequencer.createSequence(context, semanticObject); | 837 | if (errorAcceptor != null) { |
838 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.SCOPE_DEFINITION__TYPE) == ValueTransient.YES) | ||
839 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.SCOPE_DEFINITION__TYPE)); | ||
840 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.EXACT_SCOPE_DEFINITION__EXACT_SCOPE) == ValueTransient.YES) | ||
841 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.EXACT_SCOPE_DEFINITION__EXACT_SCOPE)); | ||
842 | } | ||
843 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
844 | feeder.accept(grammarAccess.getExactScopeDefinitionAccess().getTypeNamedElementQualifiedNameParserRuleCall_1_0_1(), semanticObject.eGet(SolverLanguagePackage.Literals.SCOPE_DEFINITION__TYPE, false)); | ||
845 | feeder.accept(grammarAccess.getExactScopeDefinitionAccess().getExactScopeINTTerminalRuleCall_3_0(), semanticObject.getExactScope()); | ||
846 | feeder.finish(); | ||
507 | } | 847 | } |
508 | 848 | ||
509 | 849 | ||
510 | /** | 850 | /** |
511 | * Contexts: | 851 | * Contexts: |
512 | * ComplexObject returns NamedObject | 852 | * Argument returns ExpressionArgument |
513 | * Object returns NamedObject | 853 | * ExpressionArgument returns ExpressionArgument |
514 | * NamedObject returns NamedObject | ||
515 | * Literal returns NamedObject | ||
516 | * | 854 | * |
517 | * Constraint: | 855 | * Constraint: |
518 | * name=ID | 856 | * body=ComparisonExpression |
519 | */ | 857 | */ |
520 | protected void sequence_NamedObject(ISerializationContext context, NamedObject semanticObject) { | 858 | protected void sequence_ExpressionArgument(ISerializationContext context, ExpressionArgument semanticObject) { |
521 | if (errorAcceptor != null) { | 859 | if (errorAcceptor != null) { |
522 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.NAMED_OBJECT__NAME) == ValueTransient.YES) | 860 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.EXPRESSION_ARGUMENT__BODY) == ValueTransient.YES) |
523 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.NAMED_OBJECT__NAME)); | 861 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.EXPRESSION_ARGUMENT__BODY)); |
524 | } | 862 | } |
525 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | 863 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); |
526 | feeder.accept(grammarAccess.getNamedObjectAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName()); | 864 | feeder.accept(grammarAccess.getExpressionArgumentAccess().getBodyComparisonExpressionParserRuleCall_0(), semanticObject.getBody()); |
527 | feeder.finish(); | 865 | feeder.finish(); |
528 | } | 866 | } |
529 | 867 | ||
530 | 868 | ||
531 | /** | 869 | /** |
532 | * Contexts: | 870 | * Contexts: |
533 | * Parameter returns Parameter | 871 | * Statement returns ExternMetricDefinition |
872 | * ExternMetricDefinition returns ExternMetricDefinition | ||
534 | * | 873 | * |
535 | * Constraint: | 874 | * Constraint: |
536 | * (variable=Variable type=Symbol?) | 875 | * (type=MetricType head=Call) |
537 | */ | 876 | */ |
538 | protected void sequence_Parameter(ISerializationContext context, org.eclipse.viatra.solver.language.solverLanguage.Parameter semanticObject) { | 877 | protected void sequence_ExternMetricDefinition(ISerializationContext context, ExternMetricDefinition semanticObject) { |
539 | genericSequencer.createSequence(context, semanticObject); | 878 | if (errorAcceptor != null) { |
879 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.EXTERN_METRIC_DEFINITION__TYPE) == ValueTransient.YES) | ||
880 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.EXTERN_METRIC_DEFINITION__TYPE)); | ||
881 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.EXTERN_METRIC_DEFINITION__HEAD) == ValueTransient.YES) | ||
882 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.EXTERN_METRIC_DEFINITION__HEAD)); | ||
883 | } | ||
884 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
885 | feeder.accept(grammarAccess.getExternMetricDefinitionAccess().getTypeMetricTypeEnumRuleCall_1_0(), semanticObject.getType()); | ||
886 | feeder.accept(grammarAccess.getExternMetricDefinitionAccess().getHeadCallParserRuleCall_2_0(), semanticObject.getHead()); | ||
887 | feeder.finish(); | ||
540 | } | 888 | } |
541 | 889 | ||
542 | 890 | ||
543 | /** | 891 | /** |
544 | * Contexts: | 892 | * Contexts: |
545 | * PatternBody returns PatternBody | 893 | * Statement returns ExternPredicateDefinition |
894 | * ExternPredicateDefinition returns ExternPredicateDefinition | ||
546 | * | 895 | * |
547 | * Constraint: | 896 | * Constraint: |
548 | * constraints+=Constraint* | 897 | * head=Call |
549 | */ | 898 | */ |
550 | protected void sequence_PatternBody(ISerializationContext context, PatternBody semanticObject) { | 899 | protected void sequence_ExternPredicateDefinition(ISerializationContext context, ExternPredicateDefinition semanticObject) { |
551 | genericSequencer.createSequence(context, semanticObject); | 900 | if (errorAcceptor != null) { |
901 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.EXTERN_PREDICATE_DEFINITION__HEAD) == ValueTransient.YES) | ||
902 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.EXTERN_PREDICATE_DEFINITION__HEAD)); | ||
903 | } | ||
904 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
905 | feeder.accept(grammarAccess.getExternPredicateDefinitionAccess().getHeadCallParserRuleCall_1_0(), semanticObject.getHead()); | ||
906 | feeder.finish(); | ||
907 | } | ||
908 | |||
909 | |||
910 | /** | ||
911 | * Contexts: | ||
912 | * AssertionOrDefinition.Assertion_1_0_0 returns IfElse | ||
913 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns IfElse | ||
914 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns IfElse | ||
915 | * Expression returns IfElse | ||
916 | * IfElse returns IfElse | ||
917 | * DisjunctiveExpression returns IfElse | ||
918 | * DisjunctiveExpression.Disjunction_1_0_0 returns IfElse | ||
919 | * DisjunctiveExpression.Case_1_1_0 returns IfElse | ||
920 | * ConjunctiveExpression returns IfElse | ||
921 | * ConjunctiveExpression.Conjunction_1_0 returns IfElse | ||
922 | * ComparisonExpression returns IfElse | ||
923 | * ComparisonExpression.Comparison_1_0 returns IfElse | ||
924 | * AdditiveExpression returns IfElse | ||
925 | * AdditiveExpression.BinaryExpression_1_0 returns IfElse | ||
926 | * MultiplicativeExpression returns IfElse | ||
927 | * MultiplicativeExpression.BinaryExpression_1_0 returns IfElse | ||
928 | * ExponentialExpression returns IfElse | ||
929 | * ExponentialExpression.BinaryExpression_1_0 returns IfElse | ||
930 | * UnaryExpression returns IfElse | ||
931 | * AggregationExpression returns IfElse | ||
932 | * AtomicExpression returns IfElse | ||
933 | * | ||
934 | * Constraint: | ||
935 | * (condition=Expression then=Expression else=Expression) | ||
936 | */ | ||
937 | protected void sequence_IfElse(ISerializationContext context, IfElse semanticObject) { | ||
938 | if (errorAcceptor != null) { | ||
939 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.IF_ELSE__CONDITION) == ValueTransient.YES) | ||
940 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.IF_ELSE__CONDITION)); | ||
941 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.IF_ELSE__THEN) == ValueTransient.YES) | ||
942 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.IF_ELSE__THEN)); | ||
943 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.IF_ELSE__ELSE) == ValueTransient.YES) | ||
944 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.IF_ELSE__ELSE)); | ||
945 | } | ||
946 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
947 | feeder.accept(grammarAccess.getIfElseAccess().getConditionExpressionParserRuleCall_1_0(), semanticObject.getCondition()); | ||
948 | feeder.accept(grammarAccess.getIfElseAccess().getThenExpressionParserRuleCall_3_0(), semanticObject.getThen()); | ||
949 | feeder.accept(grammarAccess.getIfElseAccess().getElseExpressionParserRuleCall_5_0(), semanticObject.getElse()); | ||
950 | feeder.finish(); | ||
552 | } | 951 | } |
553 | 952 | ||
554 | 953 | ||
555 | /** | 954 | /** |
556 | * Contexts: | 955 | * Contexts: |
557 | * Polarity returns Negative | 956 | * AssertionOrDefinition.Assertion_1_0_0 returns InfinityLiteral |
957 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns InfinityLiteral | ||
958 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns InfinityLiteral | ||
959 | * Expression returns InfinityLiteral | ||
960 | * DisjunctiveExpression returns InfinityLiteral | ||
961 | * DisjunctiveExpression.Disjunction_1_0_0 returns InfinityLiteral | ||
962 | * DisjunctiveExpression.Case_1_1_0 returns InfinityLiteral | ||
963 | * ConjunctiveExpression returns InfinityLiteral | ||
964 | * ConjunctiveExpression.Conjunction_1_0 returns InfinityLiteral | ||
965 | * ComparisonExpression returns InfinityLiteral | ||
966 | * ComparisonExpression.Comparison_1_0 returns InfinityLiteral | ||
967 | * AdditiveExpression returns InfinityLiteral | ||
968 | * AdditiveExpression.BinaryExpression_1_0 returns InfinityLiteral | ||
969 | * MultiplicativeExpression returns InfinityLiteral | ||
970 | * MultiplicativeExpression.BinaryExpression_1_0 returns InfinityLiteral | ||
971 | * ExponentialExpression returns InfinityLiteral | ||
972 | * ExponentialExpression.BinaryExpression_1_0 returns InfinityLiteral | ||
973 | * UnaryExpression returns InfinityLiteral | ||
974 | * AggregationExpression returns InfinityLiteral | ||
975 | * AtomicExpression returns InfinityLiteral | ||
976 | * Literal returns InfinityLiteral | ||
977 | * InfinityLiteral returns InfinityLiteral | ||
558 | * | 978 | * |
559 | * Constraint: | 979 | * Constraint: |
560 | * {Negative} | 980 | * {InfinityLiteral} |
561 | */ | 981 | */ |
562 | protected void sequence_Polarity(ISerializationContext context, Negative semanticObject) { | 982 | protected void sequence_InfinityLiteral(ISerializationContext context, InfinityLiteral semanticObject) { |
563 | genericSequencer.createSequence(context, semanticObject); | 983 | genericSequencer.createSequence(context, semanticObject); |
564 | } | 984 | } |
565 | 985 | ||
566 | 986 | ||
567 | /** | 987 | /** |
568 | * Contexts: | 988 | * Contexts: |
569 | * Polarity returns Positive | 989 | * AssertionOrDefinition.Assertion_1_0_0 returns Interval |
990 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Interval | ||
991 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Interval | ||
992 | * Expression returns Interval | ||
993 | * DisjunctiveExpression returns Interval | ||
994 | * DisjunctiveExpression.Disjunction_1_0_0 returns Interval | ||
995 | * DisjunctiveExpression.Case_1_1_0 returns Interval | ||
996 | * ConjunctiveExpression returns Interval | ||
997 | * ConjunctiveExpression.Conjunction_1_0 returns Interval | ||
998 | * ComparisonExpression returns Interval | ||
999 | * ComparisonExpression.Comparison_1_0 returns Interval | ||
1000 | * AdditiveExpression returns Interval | ||
1001 | * AdditiveExpression.BinaryExpression_1_0 returns Interval | ||
1002 | * MultiplicativeExpression returns Interval | ||
1003 | * MultiplicativeExpression.BinaryExpression_1_0 returns Interval | ||
1004 | * ExponentialExpression returns Interval | ||
1005 | * ExponentialExpression.BinaryExpression_1_0 returns Interval | ||
1006 | * UnaryExpression returns Interval | ||
1007 | * AggregationExpression returns Interval | ||
1008 | * AtomicExpression returns Interval | ||
1009 | * Interval returns Interval | ||
1010 | * | ||
1011 | * Constraint: | ||
1012 | * (lowerBound=Expression upperBound=Expression) | ||
1013 | */ | ||
1014 | protected void sequence_Interval(ISerializationContext context, Interval semanticObject) { | ||
1015 | if (errorAcceptor != null) { | ||
1016 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.INTERVAL__LOWER_BOUND) == ValueTransient.YES) | ||
1017 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.INTERVAL__LOWER_BOUND)); | ||
1018 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.INTERVAL__UPPER_BOUND) == ValueTransient.YES) | ||
1019 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.INTERVAL__UPPER_BOUND)); | ||
1020 | } | ||
1021 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
1022 | feeder.accept(grammarAccess.getIntervalAccess().getLowerBoundExpressionParserRuleCall_1_0(), semanticObject.getLowerBound()); | ||
1023 | feeder.accept(grammarAccess.getIntervalAccess().getUpperBoundExpressionParserRuleCall_3_0(), semanticObject.getUpperBound()); | ||
1024 | feeder.finish(); | ||
1025 | } | ||
1026 | |||
1027 | |||
1028 | /** | ||
1029 | * Contexts: | ||
1030 | * AssertionOrDefinition.Assertion_1_0_0 returns LogicLiteral | ||
1031 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns LogicLiteral | ||
1032 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns LogicLiteral | ||
1033 | * Expression returns LogicLiteral | ||
1034 | * DisjunctiveExpression returns LogicLiteral | ||
1035 | * DisjunctiveExpression.Disjunction_1_0_0 returns LogicLiteral | ||
1036 | * DisjunctiveExpression.Case_1_1_0 returns LogicLiteral | ||
1037 | * ConjunctiveExpression returns LogicLiteral | ||
1038 | * ConjunctiveExpression.Conjunction_1_0 returns LogicLiteral | ||
1039 | * ComparisonExpression returns LogicLiteral | ||
1040 | * ComparisonExpression.Comparison_1_0 returns LogicLiteral | ||
1041 | * AdditiveExpression returns LogicLiteral | ||
1042 | * AdditiveExpression.BinaryExpression_1_0 returns LogicLiteral | ||
1043 | * MultiplicativeExpression returns LogicLiteral | ||
1044 | * MultiplicativeExpression.BinaryExpression_1_0 returns LogicLiteral | ||
1045 | * ExponentialExpression returns LogicLiteral | ||
1046 | * ExponentialExpression.BinaryExpression_1_0 returns LogicLiteral | ||
1047 | * UnaryExpression returns LogicLiteral | ||
1048 | * AggregationExpression returns LogicLiteral | ||
1049 | * AtomicExpression returns LogicLiteral | ||
1050 | * Literal returns LogicLiteral | ||
1051 | * LogicLiteral returns LogicLiteral | ||
570 | * | 1052 | * |
571 | * Constraint: | 1053 | * Constraint: |
572 | * {Positive} | 1054 | * value=LogicValue |
573 | */ | 1055 | */ |
574 | protected void sequence_Polarity(ISerializationContext context, Positive semanticObject) { | 1056 | protected void sequence_LogicLiteral(ISerializationContext context, LogicLiteral semanticObject) { |
1057 | if (errorAcceptor != null) { | ||
1058 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.LOGIC_LITERAL__VALUE) == ValueTransient.YES) | ||
1059 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.LOGIC_LITERAL__VALUE)); | ||
1060 | } | ||
1061 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
1062 | feeder.accept(grammarAccess.getLogicLiteralAccess().getValueLogicValueEnumRuleCall_0(), semanticObject.getValue()); | ||
1063 | feeder.finish(); | ||
1064 | } | ||
1065 | |||
1066 | |||
1067 | /** | ||
1068 | * Contexts: | ||
1069 | * Statement returns LowerBoundedScopeDefinition | ||
1070 | * ScopeDefinition returns LowerBoundedScopeDefinition | ||
1071 | * LowerBoundedScopeDefinition returns LowerBoundedScopeDefinition | ||
1072 | * | ||
1073 | * Constraint: | ||
1074 | * ((lowerBound=INT type=[NamedElement|QualifiedName]) | (type=[NamedElement|QualifiedName] lowerBound=INT)) | ||
1075 | */ | ||
1076 | protected void sequence_LowerBoundedScopeDefinition(ISerializationContext context, LowerBoundedScopeDefinition semanticObject) { | ||
575 | genericSequencer.createSequence(context, semanticObject); | 1077 | genericSequencer.createSequence(context, semanticObject); |
576 | } | 1078 | } |
577 | 1079 | ||
578 | 1080 | ||
579 | /** | 1081 | /** |
580 | * Contexts: | 1082 | * Contexts: |
581 | * Statement returns Predicate | 1083 | * Multiplicity returns ManyMultiplicity |
582 | * Predicate returns Predicate | 1084 | * ManyMultiplicity returns ManyMultiplicity |
583 | * | 1085 | * |
584 | * Constraint: | 1086 | * Constraint: |
585 | * (isError?='error'? symbol=ModelSymbol (parameters+=Parameter parameters+=Parameter*)? (bodies+=PatternBody bodies+=PatternBody*)?) | 1087 | * {ManyMultiplicity} |
586 | */ | 1088 | */ |
587 | protected void sequence_Predicate(ISerializationContext context, Predicate semanticObject) { | 1089 | protected void sequence_ManyMultiplicity(ISerializationContext context, ManyMultiplicity semanticObject) { |
588 | genericSequencer.createSequence(context, semanticObject); | 1090 | genericSequencer.createSequence(context, semanticObject); |
589 | } | 1091 | } |
590 | 1092 | ||
591 | 1093 | ||
592 | /** | 1094 | /** |
593 | * Contexts: | 1095 | * Contexts: |
594 | * Problem returns Problem | 1096 | * MemberDefinition returns MemberDefinition |
595 | * | 1097 | * |
596 | * Constraint: | 1098 | * Constraint: |
597 | * statements+=Statement+ | 1099 | * (containment?='contains'? type=[NamedElement|QualifiedName] multiplicity=Multiplicity? name=ID opposite=[NamedElement|QualifiedName]?) |
598 | */ | 1100 | */ |
599 | protected void sequence_Problem(ISerializationContext context, Problem semanticObject) { | 1101 | protected void sequence_MemberDefinition(ISerializationContext context, MemberDefinition semanticObject) { |
600 | genericSequencer.createSequence(context, semanticObject); | 1102 | genericSequencer.createSequence(context, semanticObject); |
601 | } | 1103 | } |
602 | 1104 | ||
603 | 1105 | ||
604 | /** | 1106 | /** |
605 | * Contexts: | 1107 | * Contexts: |
606 | * ComplexObject returns RealObject | 1108 | * MetricDefinition returns MetricDefinition |
607 | * Object returns RealObject | ||
608 | * DataObject returns RealObject | ||
609 | * RealObject returns RealObject | ||
610 | * Literal returns RealObject | ||
611 | * | 1109 | * |
612 | * Constraint: | 1110 | * Constraint: |
613 | * value=REALLiteral | 1111 | * (type=MetricType head=Expression body=Expression) |
614 | */ | 1112 | */ |
615 | protected void sequence_RealObject(ISerializationContext context, RealObject semanticObject) { | 1113 | protected void sequence_MetricDefinition(ISerializationContext context, MetricDefinition semanticObject) { |
616 | if (errorAcceptor != null) { | 1114 | if (errorAcceptor != null) { |
617 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.REAL_OBJECT__VALUE) == ValueTransient.YES) | 1115 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.METRIC_DEFINITION__TYPE) == ValueTransient.YES) |
618 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.REAL_OBJECT__VALUE)); | 1116 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.METRIC_DEFINITION__TYPE)); |
1117 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.METRIC_DEFINITION__HEAD) == ValueTransient.YES) | ||
1118 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.METRIC_DEFINITION__HEAD)); | ||
1119 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.METRIC_DEFINITION__BODY) == ValueTransient.YES) | ||
1120 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.METRIC_DEFINITION__BODY)); | ||
619 | } | 1121 | } |
620 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | 1122 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); |
621 | feeder.accept(grammarAccess.getRealObjectAccess().getValueREALLiteralParserRuleCall_0(), semanticObject.getValue()); | 1123 | feeder.accept(grammarAccess.getMetricDefinitionAccess().getTypeMetricTypeEnumRuleCall_0_0(), semanticObject.getType()); |
1124 | feeder.accept(grammarAccess.getMetricDefinitionAccess().getHeadExpressionParserRuleCall_1_0(), semanticObject.getHead()); | ||
1125 | feeder.accept(grammarAccess.getMetricDefinitionAccess().getBodyExpressionParserRuleCall_3_0(), semanticObject.getBody()); | ||
622 | feeder.finish(); | 1126 | feeder.finish(); |
623 | } | 1127 | } |
624 | 1128 | ||
625 | 1129 | ||
626 | /** | 1130 | /** |
627 | * Contexts: | 1131 | * Contexts: |
628 | * Symbol returns RealSymbol | 1132 | * NamedElement returns NamedElement |
629 | * DataSymbol returns RealSymbol | ||
630 | * RealSymbol returns RealSymbol | ||
631 | * | 1133 | * |
632 | * Constraint: | 1134 | * Constraint: |
633 | * {RealSymbol} | 1135 | * name=QualifiedName |
634 | */ | 1136 | */ |
635 | protected void sequence_RealSymbol(ISerializationContext context, RealSymbol semanticObject) { | 1137 | protected void sequence_NamedElement(ISerializationContext context, NamedElement semanticObject) { |
636 | genericSequencer.createSequence(context, semanticObject); | 1138 | if (errorAcceptor != null) { |
1139 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.NAMED_ELEMENT__NAME) == ValueTransient.YES) | ||
1140 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.NAMED_ELEMENT__NAME)); | ||
1141 | } | ||
1142 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
1143 | feeder.accept(grammarAccess.getNamedElementAccess().getNameQualifiedNameParserRuleCall_0(), semanticObject.getName()); | ||
1144 | feeder.finish(); | ||
637 | } | 1145 | } |
638 | 1146 | ||
639 | 1147 | ||
640 | /** | 1148 | /** |
641 | * Contexts: | 1149 | * Contexts: |
642 | * ComplexObject returns StringObject | 1150 | * AssertionOrDefinition.Assertion_1_0_0 returns NumericLiteral |
643 | * Object returns StringObject | 1151 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns NumericLiteral |
644 | * DataObject returns StringObject | 1152 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns NumericLiteral |
645 | * StringObject returns StringObject | 1153 | * Expression returns NumericLiteral |
646 | * Literal returns StringObject | 1154 | * DisjunctiveExpression returns NumericLiteral |
1155 | * DisjunctiveExpression.Disjunction_1_0_0 returns NumericLiteral | ||
1156 | * DisjunctiveExpression.Case_1_1_0 returns NumericLiteral | ||
1157 | * ConjunctiveExpression returns NumericLiteral | ||
1158 | * ConjunctiveExpression.Conjunction_1_0 returns NumericLiteral | ||
1159 | * ComparisonExpression returns NumericLiteral | ||
1160 | * ComparisonExpression.Comparison_1_0 returns NumericLiteral | ||
1161 | * AdditiveExpression returns NumericLiteral | ||
1162 | * AdditiveExpression.BinaryExpression_1_0 returns NumericLiteral | ||
1163 | * MultiplicativeExpression returns NumericLiteral | ||
1164 | * MultiplicativeExpression.BinaryExpression_1_0 returns NumericLiteral | ||
1165 | * ExponentialExpression returns NumericLiteral | ||
1166 | * ExponentialExpression.BinaryExpression_1_0 returns NumericLiteral | ||
1167 | * UnaryExpression returns NumericLiteral | ||
1168 | * AggregationExpression returns NumericLiteral | ||
1169 | * AtomicExpression returns NumericLiteral | ||
1170 | * Literal returns NumericLiteral | ||
1171 | * NumericLiteral returns NumericLiteral | ||
647 | * | 1172 | * |
648 | * Constraint: | 1173 | * Constraint: |
649 | * value=STRING | 1174 | * value=Real |
650 | */ | 1175 | */ |
651 | protected void sequence_StringObject(ISerializationContext context, StringObject semanticObject) { | 1176 | protected void sequence_NumericLiteral(ISerializationContext context, NumericLiteral semanticObject) { |
652 | if (errorAcceptor != null) { | 1177 | if (errorAcceptor != null) { |
653 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.STRING_OBJECT__VALUE) == ValueTransient.YES) | 1178 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.NUMERIC_LITERAL__VALUE) == ValueTransient.YES) |
654 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.STRING_OBJECT__VALUE)); | 1179 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.NUMERIC_LITERAL__VALUE)); |
655 | } | 1180 | } |
656 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | 1181 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); |
657 | feeder.accept(grammarAccess.getStringObjectAccess().getValueSTRINGTerminalRuleCall_0(), semanticObject.getValue()); | 1182 | feeder.accept(grammarAccess.getNumericLiteralAccess().getValueRealParserRuleCall_0(), semanticObject.getValue()); |
658 | feeder.finish(); | 1183 | feeder.finish(); |
659 | } | 1184 | } |
660 | 1185 | ||
661 | 1186 | ||
662 | /** | 1187 | /** |
663 | * Contexts: | 1188 | * Contexts: |
664 | * Symbol returns StringSymbol | 1189 | * Statement returns ObjectiveDefinition |
665 | * DataSymbol returns StringSymbol | 1190 | * ObjectiveDefinition returns ObjectiveDefinition |
666 | * StringSymbol returns StringSymbol | ||
667 | * | 1191 | * |
668 | * Constraint: | 1192 | * Constraint: |
669 | * {StringSymbol} | 1193 | * (kind=ObjectiveKind objective=Expression) |
670 | */ | 1194 | */ |
671 | protected void sequence_StringSymbol(ISerializationContext context, StringSymbol semanticObject) { | 1195 | protected void sequence_ObjectiveDefinition(ISerializationContext context, ObjectiveDefinition semanticObject) { |
672 | genericSequencer.createSequence(context, semanticObject); | 1196 | if (errorAcceptor != null) { |
1197 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.OBJECTIVE_DEFINITION__KIND) == ValueTransient.YES) | ||
1198 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.OBJECTIVE_DEFINITION__KIND)); | ||
1199 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.OBJECTIVE_DEFINITION__OBJECTIVE) == ValueTransient.YES) | ||
1200 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.OBJECTIVE_DEFINITION__OBJECTIVE)); | ||
1201 | } | ||
1202 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
1203 | feeder.accept(grammarAccess.getObjectiveDefinitionAccess().getKindObjectiveKindEnumRuleCall_0_0(), semanticObject.getKind()); | ||
1204 | feeder.accept(grammarAccess.getObjectiveDefinitionAccess().getObjectiveExpressionParserRuleCall_1_0(), semanticObject.getObjective()); | ||
1205 | feeder.finish(); | ||
673 | } | 1206 | } |
674 | 1207 | ||
675 | 1208 | ||
676 | /** | 1209 | /** |
677 | * Contexts: | 1210 | * Contexts: |
678 | * TruthValue returns Error | 1211 | * PredicateDefinition returns PredicateDefinition |
679 | * | 1212 | * |
680 | * Constraint: | 1213 | * Constraint: |
681 | * {Error} | 1214 | * (((functional?='functional' error?='error'?) | (error?='error' functional?='functional'?)) head=Call body=Expression) |
682 | */ | 1215 | */ |
683 | protected void sequence_TruthValue(ISerializationContext context, org.eclipse.viatra.solver.language.solverLanguage.Error semanticObject) { | 1216 | protected void sequence_PredicateDefinition(ISerializationContext context, PredicateDefinition semanticObject) { |
684 | genericSequencer.createSequence(context, semanticObject); | 1217 | genericSequencer.createSequence(context, semanticObject); |
685 | } | 1218 | } |
686 | 1219 | ||
687 | 1220 | ||
688 | /** | 1221 | /** |
689 | * Contexts: | 1222 | * Contexts: |
690 | * TruthValue returns False | 1223 | * Problem returns Problem |
691 | * | 1224 | * |
692 | * Constraint: | 1225 | * Constraint: |
693 | * {False} | 1226 | * statements+=Statement+ |
694 | */ | 1227 | */ |
695 | protected void sequence_TruthValue(ISerializationContext context, False semanticObject) { | 1228 | protected void sequence_Problem(ISerializationContext context, Problem semanticObject) { |
696 | genericSequencer.createSequence(context, semanticObject); | 1229 | genericSequencer.createSequence(context, semanticObject); |
697 | } | 1230 | } |
698 | 1231 | ||
699 | 1232 | ||
700 | /** | 1233 | /** |
701 | * Contexts: | 1234 | * Contexts: |
702 | * TruthValue returns True | 1235 | * AssertionOrDefinition.Assertion_1_0_0 returns Reference |
1236 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Reference | ||
1237 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Reference | ||
1238 | * Expression returns Reference | ||
1239 | * DisjunctiveExpression returns Reference | ||
1240 | * DisjunctiveExpression.Disjunction_1_0_0 returns Reference | ||
1241 | * DisjunctiveExpression.Case_1_1_0 returns Reference | ||
1242 | * ConjunctiveExpression returns Reference | ||
1243 | * ConjunctiveExpression.Conjunction_1_0 returns Reference | ||
1244 | * ComparisonExpression returns Reference | ||
1245 | * ComparisonExpression.Comparison_1_0 returns Reference | ||
1246 | * AdditiveExpression returns Reference | ||
1247 | * AdditiveExpression.BinaryExpression_1_0 returns Reference | ||
1248 | * MultiplicativeExpression returns Reference | ||
1249 | * MultiplicativeExpression.BinaryExpression_1_0 returns Reference | ||
1250 | * ExponentialExpression returns Reference | ||
1251 | * ExponentialExpression.BinaryExpression_1_0 returns Reference | ||
1252 | * UnaryExpression returns Reference | ||
1253 | * AggregationExpression returns Reference | ||
1254 | * AtomicExpression returns Reference | ||
1255 | * AtomicExpression.Call_0_1_0 returns Reference | ||
1256 | * Reference returns Reference | ||
703 | * | 1257 | * |
704 | * Constraint: | 1258 | * Constraint: |
705 | * {True} | 1259 | * referred=[NamedElement|QualifiedName] |
706 | */ | 1260 | */ |
707 | protected void sequence_TruthValue(ISerializationContext context, True semanticObject) { | 1261 | protected void sequence_Reference(ISerializationContext context, Reference semanticObject) { |
708 | genericSequencer.createSequence(context, semanticObject); | 1262 | if (errorAcceptor != null) { |
1263 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.REFERENCE__REFERRED) == ValueTransient.YES) | ||
1264 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.REFERENCE__REFERRED)); | ||
1265 | } | ||
1266 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
1267 | feeder.accept(grammarAccess.getReferenceAccess().getReferredNamedElementQualifiedNameParserRuleCall_0_1(), semanticObject.eGet(SolverLanguagePackage.Literals.REFERENCE__REFERRED, false)); | ||
1268 | feeder.finish(); | ||
709 | } | 1269 | } |
710 | 1270 | ||
711 | 1271 | ||
712 | /** | 1272 | /** |
713 | * Contexts: | 1273 | * Contexts: |
714 | * TruthValue returns Unknown | 1274 | * Argument returns StarArgument |
1275 | * StarArgument returns StarArgument | ||
715 | * | 1276 | * |
716 | * Constraint: | 1277 | * Constraint: |
717 | * {Unknown} | 1278 | * {StarArgument} |
718 | */ | 1279 | */ |
719 | protected void sequence_TruthValue(ISerializationContext context, Unknown semanticObject) { | 1280 | protected void sequence_StarArgument(ISerializationContext context, StarArgument semanticObject) { |
720 | genericSequencer.createSequence(context, semanticObject); | 1281 | genericSequencer.createSequence(context, semanticObject); |
721 | } | 1282 | } |
722 | 1283 | ||
723 | 1284 | ||
724 | /** | 1285 | /** |
725 | * Contexts: | 1286 | * Contexts: |
726 | * ComplexObject returns UnnamedObject | 1287 | * AssertionOrDefinition.Assertion_1_0_0 returns StringLiteral |
727 | * Object returns UnnamedObject | 1288 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns StringLiteral |
728 | * UnnamedObject returns UnnamedObject | 1289 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns StringLiteral |
1290 | * Expression returns StringLiteral | ||
1291 | * DisjunctiveExpression returns StringLiteral | ||
1292 | * DisjunctiveExpression.Disjunction_1_0_0 returns StringLiteral | ||
1293 | * DisjunctiveExpression.Case_1_1_0 returns StringLiteral | ||
1294 | * ConjunctiveExpression returns StringLiteral | ||
1295 | * ConjunctiveExpression.Conjunction_1_0 returns StringLiteral | ||
1296 | * ComparisonExpression returns StringLiteral | ||
1297 | * ComparisonExpression.Comparison_1_0 returns StringLiteral | ||
1298 | * AdditiveExpression returns StringLiteral | ||
1299 | * AdditiveExpression.BinaryExpression_1_0 returns StringLiteral | ||
1300 | * MultiplicativeExpression returns StringLiteral | ||
1301 | * MultiplicativeExpression.BinaryExpression_1_0 returns StringLiteral | ||
1302 | * ExponentialExpression returns StringLiteral | ||
1303 | * ExponentialExpression.BinaryExpression_1_0 returns StringLiteral | ||
1304 | * UnaryExpression returns StringLiteral | ||
1305 | * AggregationExpression returns StringLiteral | ||
1306 | * AtomicExpression returns StringLiteral | ||
1307 | * Literal returns StringLiteral | ||
1308 | * StringLiteral returns StringLiteral | ||
1309 | * | ||
1310 | * Constraint: | ||
1311 | * value=STRING | ||
1312 | */ | ||
1313 | protected void sequence_StringLiteral(ISerializationContext context, StringLiteral semanticObject) { | ||
1314 | if (errorAcceptor != null) { | ||
1315 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.STRING_LITERAL__VALUE) == ValueTransient.YES) | ||
1316 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.STRING_LITERAL__VALUE)); | ||
1317 | } | ||
1318 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
1319 | feeder.accept(grammarAccess.getStringLiteralAccess().getValueSTRINGTerminalRuleCall_0(), semanticObject.getValue()); | ||
1320 | feeder.finish(); | ||
1321 | } | ||
1322 | |||
1323 | |||
1324 | /** | ||
1325 | * Contexts: | ||
1326 | * Argument returns TypedArgument | ||
1327 | * TypedArgument returns TypedArgument | ||
1328 | * | ||
1329 | * Constraint: | ||
1330 | * (type=[NamedElement|QualifiedName] variable=[NamedElement|QualifiedName]) | ||
1331 | */ | ||
1332 | protected void sequence_TypedArgument(ISerializationContext context, TypedArgument semanticObject) { | ||
1333 | if (errorAcceptor != null) { | ||
1334 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.TYPED_ARGUMENT__TYPE) == ValueTransient.YES) | ||
1335 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.TYPED_ARGUMENT__TYPE)); | ||
1336 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.TYPED_ARGUMENT__VARIABLE) == ValueTransient.YES) | ||
1337 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.TYPED_ARGUMENT__VARIABLE)); | ||
1338 | } | ||
1339 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
1340 | feeder.accept(grammarAccess.getTypedArgumentAccess().getTypeNamedElementQualifiedNameParserRuleCall_0_0_1(), semanticObject.eGet(SolverLanguagePackage.Literals.TYPED_ARGUMENT__TYPE, false)); | ||
1341 | feeder.accept(grammarAccess.getTypedArgumentAccess().getVariableNamedElementQualifiedNameParserRuleCall_1_0_1(), semanticObject.eGet(SolverLanguagePackage.Literals.TYPED_ARGUMENT__VARIABLE, false)); | ||
1342 | feeder.finish(); | ||
1343 | } | ||
1344 | |||
1345 | |||
1346 | /** | ||
1347 | * Contexts: | ||
1348 | * Argument returns TypedStarArgument | ||
1349 | * TypedStarArgument returns TypedStarArgument | ||
1350 | * | ||
1351 | * Constraint: | ||
1352 | * type=[NamedElement|QualifiedName] | ||
1353 | */ | ||
1354 | protected void sequence_TypedStarArgument(ISerializationContext context, TypedStarArgument semanticObject) { | ||
1355 | if (errorAcceptor != null) { | ||
1356 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.TYPED_STAR_ARGUMENT__TYPE) == ValueTransient.YES) | ||
1357 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.TYPED_STAR_ARGUMENT__TYPE)); | ||
1358 | } | ||
1359 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
1360 | feeder.accept(grammarAccess.getTypedStarArgumentAccess().getTypeNamedElementQualifiedNameParserRuleCall_0_0_1(), semanticObject.eGet(SolverLanguagePackage.Literals.TYPED_STAR_ARGUMENT__TYPE, false)); | ||
1361 | feeder.finish(); | ||
1362 | } | ||
1363 | |||
1364 | |||
1365 | /** | ||
1366 | * Contexts: | ||
1367 | * AssertionOrDefinition.Assertion_1_0_0 returns UnaryExpression | ||
1368 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns UnaryExpression | ||
1369 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns UnaryExpression | ||
1370 | * Expression returns UnaryExpression | ||
1371 | * DisjunctiveExpression returns UnaryExpression | ||
1372 | * DisjunctiveExpression.Disjunction_1_0_0 returns UnaryExpression | ||
1373 | * DisjunctiveExpression.Case_1_1_0 returns UnaryExpression | ||
1374 | * ConjunctiveExpression returns UnaryExpression | ||
1375 | * ConjunctiveExpression.Conjunction_1_0 returns UnaryExpression | ||
1376 | * ComparisonExpression returns UnaryExpression | ||
1377 | * ComparisonExpression.Comparison_1_0 returns UnaryExpression | ||
1378 | * AdditiveExpression returns UnaryExpression | ||
1379 | * AdditiveExpression.BinaryExpression_1_0 returns UnaryExpression | ||
1380 | * MultiplicativeExpression returns UnaryExpression | ||
1381 | * MultiplicativeExpression.BinaryExpression_1_0 returns UnaryExpression | ||
1382 | * ExponentialExpression returns UnaryExpression | ||
1383 | * ExponentialExpression.BinaryExpression_1_0 returns UnaryExpression | ||
1384 | * UnaryExpression returns UnaryExpression | ||
1385 | * AggregationExpression returns UnaryExpression | ||
1386 | * AtomicExpression returns UnaryExpression | ||
729 | * | 1387 | * |
730 | * Constraint: | 1388 | * Constraint: |
731 | * name=ID | 1389 | * (op=UnaryOp body=AggregationExpression) |
732 | */ | 1390 | */ |
733 | protected void sequence_UnnamedObject(ISerializationContext context, UnnamedObject semanticObject) { | 1391 | protected void sequence_UnaryExpression(ISerializationContext context, UnaryExpression semanticObject) { |
734 | if (errorAcceptor != null) { | 1392 | if (errorAcceptor != null) { |
735 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.UNNAMED_OBJECT__NAME) == ValueTransient.YES) | 1393 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.UNARY_EXPRESSION__OP) == ValueTransient.YES) |
736 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.UNNAMED_OBJECT__NAME)); | 1394 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.UNARY_EXPRESSION__OP)); |
1395 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.UNARY_EXPRESSION__BODY) == ValueTransient.YES) | ||
1396 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.UNARY_EXPRESSION__BODY)); | ||
737 | } | 1397 | } |
738 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | 1398 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); |
739 | feeder.accept(grammarAccess.getUnnamedObjectAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName()); | 1399 | feeder.accept(grammarAccess.getUnaryExpressionAccess().getOpUnaryOpEnumRuleCall_1_1_0(), semanticObject.getOp()); |
1400 | feeder.accept(grammarAccess.getUnaryExpressionAccess().getBodyAggregationExpressionParserRuleCall_1_2_0(), semanticObject.getBody()); | ||
740 | feeder.finish(); | 1401 | feeder.finish(); |
741 | } | 1402 | } |
742 | 1403 | ||
743 | 1404 | ||
744 | /** | 1405 | /** |
745 | * Contexts: | 1406 | * Contexts: |
746 | * Literal returns Variable | 1407 | * Statement returns UnnamedErrorPrediateDefinition |
747 | * Variable returns Variable | 1408 | * UnnamedErrorPrediateDefinition returns UnnamedErrorPrediateDefinition |
748 | * | 1409 | * |
749 | * Constraint: | 1410 | * Constraint: |
750 | * name=ID | 1411 | * (argumentList=ArgumentList body=Expression) |
751 | */ | 1412 | */ |
752 | protected void sequence_Variable(ISerializationContext context, Variable semanticObject) { | 1413 | protected void sequence_UnnamedErrorPrediateDefinition(ISerializationContext context, UnnamedErrorPrediateDefinition semanticObject) { |
753 | if (errorAcceptor != null) { | 1414 | if (errorAcceptor != null) { |
754 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.VARIABLE__NAME) == ValueTransient.YES) | 1415 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.UNNAMED_ERROR_PREDIATE_DEFINITION__ARGUMENT_LIST) == ValueTransient.YES) |
755 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.VARIABLE__NAME)); | 1416 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.UNNAMED_ERROR_PREDIATE_DEFINITION__ARGUMENT_LIST)); |
1417 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.UNNAMED_ERROR_PREDIATE_DEFINITION__BODY) == ValueTransient.YES) | ||
1418 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.UNNAMED_ERROR_PREDIATE_DEFINITION__BODY)); | ||
756 | } | 1419 | } |
757 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | 1420 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); |
758 | feeder.accept(grammarAccess.getVariableAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName()); | 1421 | feeder.accept(grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getArgumentListArgumentListParserRuleCall_1_0(), semanticObject.getArgumentList()); |
1422 | feeder.accept(grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getBodyExpressionParserRuleCall_3_0(), semanticObject.getBody()); | ||
759 | feeder.finish(); | 1423 | feeder.finish(); |
760 | } | 1424 | } |
761 | 1425 | ||
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java index 8a2d6f62..861f2125 100644 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * generated by Xtext 2.18.0.M3 | 2 | * generated by Xtext 2.21.0 |
3 | */ | 3 | */ |
4 | package org.eclipse.viatra.solver.language.serializer; | 4 | package org.eclipse.viatra.solver.language.serializer; |
5 | 5 | ||
@@ -11,7 +11,6 @@ import org.eclipse.xtext.IGrammarAccess; | |||
11 | import org.eclipse.xtext.RuleCall; | 11 | import org.eclipse.xtext.RuleCall; |
12 | import org.eclipse.xtext.nodemodel.INode; | 12 | import org.eclipse.xtext.nodemodel.INode; |
13 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; | 13 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; |
14 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.GroupAlias; | ||
15 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; | 14 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; |
16 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; | 15 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; |
17 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; | 16 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; |
@@ -21,25 +20,58 @@ import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; | |||
21 | public class SolverLanguageSyntacticSequencer extends AbstractSyntacticSequencer { | 20 | public class SolverLanguageSyntacticSequencer extends AbstractSyntacticSequencer { |
22 | 21 | ||
23 | protected SolverLanguageGrammarAccess grammarAccess; | 22 | protected SolverLanguageGrammarAccess grammarAccess; |
24 | protected AbstractElementAlias match_BasicInterpretation___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q; | 23 | protected AbstractElementAlias match_AtomicExpression_LeftParenthesisKeyword_3_0_a; |
25 | protected AbstractElementAlias match_Constraint___LeftParenthesisKeyword_0_2_0_RightParenthesisKeyword_0_2_3__q; | 24 | protected AbstractElementAlias match_AtomicExpression_LeftParenthesisKeyword_3_0_p; |
26 | protected AbstractElementAlias match_PatternBody_TrueKeyword_1_0_q; | 25 | protected AbstractElementAlias match_MemberDefinition_SemicolonKeyword_5_q; |
27 | protected AbstractElementAlias match_Predicate___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q; | ||
28 | 26 | ||
29 | @Inject | 27 | @Inject |
30 | protected void init(IGrammarAccess access) { | 28 | protected void init(IGrammarAccess access) { |
31 | grammarAccess = (SolverLanguageGrammarAccess) access; | 29 | grammarAccess = (SolverLanguageGrammarAccess) access; |
32 | match_BasicInterpretation___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getBasicInterpretationAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getBasicInterpretationAccess().getRightParenthesisKeyword_1_2())); | 30 | match_AtomicExpression_LeftParenthesisKeyword_3_0_a = new TokenAlias(true, true, grammarAccess.getAtomicExpressionAccess().getLeftParenthesisKeyword_3_0()); |
33 | match_Constraint___LeftParenthesisKeyword_0_2_0_RightParenthesisKeyword_0_2_3__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getConstraintAccess().getLeftParenthesisKeyword_0_2_0()), new TokenAlias(false, false, grammarAccess.getConstraintAccess().getRightParenthesisKeyword_0_2_3())); | 31 | match_AtomicExpression_LeftParenthesisKeyword_3_0_p = new TokenAlias(true, false, grammarAccess.getAtomicExpressionAccess().getLeftParenthesisKeyword_3_0()); |
34 | match_PatternBody_TrueKeyword_1_0_q = new TokenAlias(false, true, grammarAccess.getPatternBodyAccess().getTrueKeyword_1_0()); | 32 | match_MemberDefinition_SemicolonKeyword_5_q = new TokenAlias(false, true, grammarAccess.getMemberDefinitionAccess().getSemicolonKeyword_5()); |
35 | match_Predicate___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getPredicateAccess().getLeftParenthesisKeyword_2_0()), new TokenAlias(false, false, grammarAccess.getPredicateAccess().getRightParenthesisKeyword_2_2())); | ||
36 | } | 33 | } |
37 | 34 | ||
38 | @Override | 35 | @Override |
39 | protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { | 36 | protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { |
37 | if (ruleCall.getRule() == grammarAccess.getDOTRule()) | ||
38 | return getDOTToken(semanticObject, ruleCall, node); | ||
39 | else if (ruleCall.getRule() == grammarAccess.getPLUSRule()) | ||
40 | return getPLUSToken(semanticObject, ruleCall, node); | ||
41 | else if (ruleCall.getRule() == grammarAccess.getSTARRule()) | ||
42 | return getSTARToken(semanticObject, ruleCall, node); | ||
40 | return ""; | 43 | return ""; |
41 | } | 44 | } |
42 | 45 | ||
46 | /** | ||
47 | * terminal DOT: | ||
48 | * "synthetic::dot"; | ||
49 | */ | ||
50 | protected String getDOTToken(EObject semanticObject, RuleCall ruleCall, INode node) { | ||
51 | if (node != null) | ||
52 | return getTokenText(node); | ||
53 | return "synthetic::dot"; | ||
54 | } | ||
55 | |||
56 | /** | ||
57 | * terminal PLUS: | ||
58 | * "synthetic::plus"; | ||
59 | */ | ||
60 | protected String getPLUSToken(EObject semanticObject, RuleCall ruleCall, INode node) { | ||
61 | if (node != null) | ||
62 | return getTokenText(node); | ||
63 | return "synthetic::plus"; | ||
64 | } | ||
65 | |||
66 | /** | ||
67 | * terminal STAR: | ||
68 | * "synthetic::star"; | ||
69 | */ | ||
70 | protected String getSTARToken(EObject semanticObject, RuleCall ruleCall, INode node) { | ||
71 | if (node != null) | ||
72 | return getTokenText(node); | ||
73 | return "synthetic::star"; | ||
74 | } | ||
43 | 75 | ||
44 | @Override | 76 | @Override |
45 | protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { | 77 | protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { |
@@ -47,60 +79,71 @@ public class SolverLanguageSyntacticSequencer extends AbstractSyntacticSequencer | |||
47 | List<INode> transitionNodes = collectNodes(fromNode, toNode); | 79 | List<INode> transitionNodes = collectNodes(fromNode, toNode); |
48 | for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { | 80 | for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { |
49 | List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax); | 81 | List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax); |
50 | if (match_BasicInterpretation___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax)) | 82 | if (match_AtomicExpression_LeftParenthesisKeyword_3_0_a.equals(syntax)) |
51 | emit_BasicInterpretation___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes); | 83 | emit_AtomicExpression_LeftParenthesisKeyword_3_0_a(semanticObject, getLastNavigableState(), syntaxNodes); |
52 | else if (match_Constraint___LeftParenthesisKeyword_0_2_0_RightParenthesisKeyword_0_2_3__q.equals(syntax)) | 84 | else if (match_AtomicExpression_LeftParenthesisKeyword_3_0_p.equals(syntax)) |
53 | emit_Constraint___LeftParenthesisKeyword_0_2_0_RightParenthesisKeyword_0_2_3__q(semanticObject, getLastNavigableState(), syntaxNodes); | 85 | emit_AtomicExpression_LeftParenthesisKeyword_3_0_p(semanticObject, getLastNavigableState(), syntaxNodes); |
54 | else if (match_PatternBody_TrueKeyword_1_0_q.equals(syntax)) | 86 | else if (match_MemberDefinition_SemicolonKeyword_5_q.equals(syntax)) |
55 | emit_PatternBody_TrueKeyword_1_0_q(semanticObject, getLastNavigableState(), syntaxNodes); | 87 | emit_MemberDefinition_SemicolonKeyword_5_q(semanticObject, getLastNavigableState(), syntaxNodes); |
56 | else if (match_Predicate___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q.equals(syntax)) | ||
57 | emit_Predicate___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q(semanticObject, getLastNavigableState(), syntaxNodes); | ||
58 | else acceptNodes(getLastNavigableState(), syntaxNodes); | 88 | else acceptNodes(getLastNavigableState(), syntaxNodes); |
59 | } | 89 | } |
60 | } | 90 | } |
61 | 91 | ||
62 | /** | 92 | /** |
63 | * Ambiguous syntax: | 93 | * Ambiguous syntax: |
64 | * ('(' ')')? | 94 | * '('* |
65 | * | ||
66 | * This ambiguous syntax occurs at: | ||
67 | * symbol=Symbol (ambiguity) ':' value=TruthValue | ||
68 | */ | ||
69 | protected void emit_BasicInterpretation___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
70 | acceptNodes(transition, nodes); | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * Ambiguous syntax: | ||
75 | * ('(' ')')? | ||
76 | * | 95 | * |
77 | * This ambiguous syntax occurs at: | 96 | * This ambiguous syntax occurs at: |
78 | * symbol=ModelSymbol (ambiguity) (rule end) | 97 | * (rule start) (ambiguity) '[' lowerBound=Expression |
98 | * (rule start) (ambiguity) 'count' '{' body=Expression | ||
99 | * (rule start) (ambiguity) 'empty' (rule start) | ||
100 | * (rule start) (ambiguity) 'if' condition=Expression | ||
101 | * (rule start) (ambiguity) 'inf' (rule start) | ||
102 | * (rule start) (ambiguity) op=AggregationOp | ||
103 | * (rule start) (ambiguity) op=UnaryOp | ||
104 | * (rule start) (ambiguity) referred=[NamedElement|QualifiedName] | ||
105 | * (rule start) (ambiguity) value=LogicValue | ||
106 | * (rule start) (ambiguity) value=Real | ||
107 | * (rule start) (ambiguity) value=STRING | ||
108 | * (rule start) (ambiguity) {BinaryExpression.left=} | ||
109 | * (rule start) (ambiguity) {Call.functor=} | ||
110 | * (rule start) (ambiguity) {Comparison.left=} | ||
111 | * (rule start) (ambiguity) {Conjunction.children+=} | ||
112 | * (rule start) (ambiguity) {Disjunction.children+=} | ||
113 | * (rule start) (ambiguity) {Switch.cases+=} | ||
79 | */ | 114 | */ |
80 | protected void emit_Constraint___LeftParenthesisKeyword_0_2_0_RightParenthesisKeyword_0_2_3__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | 115 | protected void emit_AtomicExpression_LeftParenthesisKeyword_3_0_a(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { |
81 | acceptNodes(transition, nodes); | 116 | acceptNodes(transition, nodes); |
82 | } | 117 | } |
83 | 118 | ||
84 | /** | 119 | /** |
85 | * Ambiguous syntax: | 120 | * Ambiguous syntax: |
86 | * 'true'? | 121 | * '('+ |
87 | * | 122 | * |
88 | * This ambiguous syntax occurs at: | 123 | * This ambiguous syntax occurs at: |
89 | * (rule start) (ambiguity) (rule start) | 124 | * (rule start) (ambiguity) 'count' '{' body=Expression |
125 | * (rule start) (ambiguity) 'if' condition=Expression | ||
126 | * (rule start) (ambiguity) op=AggregationOp | ||
127 | * (rule start) (ambiguity) op=UnaryOp | ||
128 | * (rule start) (ambiguity) {BinaryExpression.left=} | ||
129 | * (rule start) (ambiguity) {Comparison.left=} | ||
130 | * (rule start) (ambiguity) {Conjunction.children+=} | ||
131 | * (rule start) (ambiguity) {Disjunction.children+=} | ||
132 | * (rule start) (ambiguity) {Switch.cases+=} | ||
90 | */ | 133 | */ |
91 | protected void emit_PatternBody_TrueKeyword_1_0_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | 134 | protected void emit_AtomicExpression_LeftParenthesisKeyword_3_0_p(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { |
92 | acceptNodes(transition, nodes); | 135 | acceptNodes(transition, nodes); |
93 | } | 136 | } |
94 | 137 | ||
95 | /** | 138 | /** |
96 | * Ambiguous syntax: | 139 | * Ambiguous syntax: |
97 | * ('(' ')')? | 140 | * ';'? |
98 | * | 141 | * |
99 | * This ambiguous syntax occurs at: | 142 | * This ambiguous syntax occurs at: |
100 | * symbol=ModelSymbol (ambiguity) ':-' 'false' '.' (rule end) | 143 | * name=ID (ambiguity) (rule end) |
101 | * symbol=ModelSymbol (ambiguity) ':-' bodies+=PatternBody | 144 | * opposite=[NamedElement|QualifiedName] (ambiguity) (rule end) |
102 | */ | 145 | */ |
103 | protected void emit_Predicate___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | 146 | protected void emit_MemberDefinition_SemicolonKeyword_5_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { |
104 | acceptNodes(transition, nodes); | 147 | acceptNodes(transition, nodes); |
105 | } | 148 | } |
106 | 149 | ||