diff options
author | 2020-05-19 21:18:06 +0200 | |
---|---|---|
committer | 2020-05-19 21:18:06 +0200 | |
commit | b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b (patch) | |
tree | ad3222182065b8fac7d9b3d528c4efabf2aa0dd2 /Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/services | |
parent | Merge branch 'master' of github.com:viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.gz VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.zst VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.zip |
Config language WIP
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/services')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/services/SolverLanguageGrammarAccess.java | 1153 |
1 files changed, 749 insertions, 404 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/services/SolverLanguageGrammarAccess.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/services/SolverLanguageGrammarAccess.java index 0252938a..ed1569a5 100644 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/services/SolverLanguageGrammarAccess.java +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/services/SolverLanguageGrammarAccess.java | |||
@@ -50,28 +50,30 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
50 | private final RuleCall cPredicateDefinitionParserRuleCall_0_1 = (RuleCall)cAlternatives_0.eContents().get(1); | 50 | private final RuleCall cPredicateDefinitionParserRuleCall_0_1 = (RuleCall)cAlternatives_0.eContents().get(1); |
51 | private final RuleCall cUnnamedErrorPrediateDefinitionParserRuleCall_0_2 = (RuleCall)cAlternatives_0.eContents().get(2); | 51 | private final RuleCall cUnnamedErrorPrediateDefinitionParserRuleCall_0_2 = (RuleCall)cAlternatives_0.eContents().get(2); |
52 | private final RuleCall cDefaultDefinitionParserRuleCall_0_3 = (RuleCall)cAlternatives_0.eContents().get(3); | 52 | private final RuleCall cDefaultDefinitionParserRuleCall_0_3 = (RuleCall)cAlternatives_0.eContents().get(3); |
53 | private final RuleCall cExternPredicateDefinitionParserRuleCall_0_4 = (RuleCall)cAlternatives_0.eContents().get(4); | 53 | private final RuleCall cMetricDefinitionParserRuleCall_0_4 = (RuleCall)cAlternatives_0.eContents().get(4); |
54 | private final RuleCall cMetricDefinitionParserRuleCall_0_5 = (RuleCall)cAlternatives_0.eContents().get(5); | 54 | private final RuleCall cExternPredicateDefinitionParserRuleCall_0_5 = (RuleCall)cAlternatives_0.eContents().get(5); |
55 | private final RuleCall cExternMetricDefinitionParserRuleCall_0_6 = (RuleCall)cAlternatives_0.eContents().get(6); | 55 | private final RuleCall cExternMetricDefinitionParserRuleCall_0_6 = (RuleCall)cAlternatives_0.eContents().get(6); |
56 | private final RuleCall cClassDefinitionParserRuleCall_0_7 = (RuleCall)cAlternatives_0.eContents().get(7); | 56 | private final RuleCall cExternAggregatorDefinitionParserRuleCall_0_7 = (RuleCall)cAlternatives_0.eContents().get(7); |
57 | private final RuleCall cScopeDefinitionParserRuleCall_0_8 = (RuleCall)cAlternatives_0.eContents().get(8); | 57 | private final RuleCall cExternDatatypeDefinitionParserRuleCall_0_8 = (RuleCall)cAlternatives_0.eContents().get(8); |
58 | private final RuleCall cObjectiveDefinitionParserRuleCall_0_9 = (RuleCall)cAlternatives_0.eContents().get(9); | 58 | private final RuleCall cClassDefinitionParserRuleCall_0_9 = (RuleCall)cAlternatives_0.eContents().get(9); |
59 | private final RuleCall cScopeDefinitionParserRuleCall_0_10 = (RuleCall)cAlternatives_0.eContents().get(10); | ||
60 | private final RuleCall cObjectiveDefinitionParserRuleCall_0_11 = (RuleCall)cAlternatives_0.eContents().get(11); | ||
59 | private final RuleCall cFULL_STOPTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); | 61 | private final RuleCall cFULL_STOPTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); |
60 | 62 | ||
61 | //Statement: | 63 | //Statement: |
62 | // (AssertionOrDefinition | PredicateDefinition | UnnamedErrorPrediateDefinition | DefaultDefinition | | 64 | // (AssertionOrDefinition | PredicateDefinition | UnnamedErrorPrediateDefinition | DefaultDefinition | MetricDefinition |
63 | // ExternPredicateDefinition | MetricDefinition | ExternMetricDefinition | ClassDefinition | ScopeDefinition | | 65 | // | ExternPredicateDefinition | ExternMetricDefinition | ExternAggregatorDefinition | ExternDatatypeDefinition | |
64 | // ObjectiveDefinition) FULL_STOP; | 66 | // ClassDefinition | ScopeDefinition | ObjectiveDefinition) FULL_STOP; |
65 | @Override public ParserRule getRule() { return rule; } | 67 | @Override public ParserRule getRule() { return rule; } |
66 | 68 | ||
67 | //(AssertionOrDefinition | PredicateDefinition | UnnamedErrorPrediateDefinition | DefaultDefinition | | 69 | //(AssertionOrDefinition | PredicateDefinition | UnnamedErrorPrediateDefinition | DefaultDefinition | MetricDefinition | |
68 | //ExternPredicateDefinition | MetricDefinition | ExternMetricDefinition | ClassDefinition | ScopeDefinition | | 70 | //ExternPredicateDefinition | ExternMetricDefinition | ExternAggregatorDefinition | ExternDatatypeDefinition | |
69 | //ObjectiveDefinition) FULL_STOP | 71 | //ClassDefinition | ScopeDefinition | ObjectiveDefinition) FULL_STOP |
70 | public Group getGroup() { return cGroup; } | 72 | public Group getGroup() { return cGroup; } |
71 | 73 | ||
72 | //(AssertionOrDefinition | PredicateDefinition | UnnamedErrorPrediateDefinition | DefaultDefinition | | 74 | //(AssertionOrDefinition | PredicateDefinition | UnnamedErrorPrediateDefinition | DefaultDefinition | MetricDefinition | |
73 | //ExternPredicateDefinition | MetricDefinition | ExternMetricDefinition | ClassDefinition | ScopeDefinition | | 75 | //ExternPredicateDefinition | ExternMetricDefinition | ExternAggregatorDefinition | ExternDatatypeDefinition | |
74 | //ObjectiveDefinition) | 76 | //ClassDefinition | ScopeDefinition | ObjectiveDefinition) |
75 | public Alternatives getAlternatives_0() { return cAlternatives_0; } | 77 | public Alternatives getAlternatives_0() { return cAlternatives_0; } |
76 | 78 | ||
77 | //AssertionOrDefinition | 79 | //AssertionOrDefinition |
@@ -86,23 +88,29 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
86 | //DefaultDefinition | 88 | //DefaultDefinition |
87 | public RuleCall getDefaultDefinitionParserRuleCall_0_3() { return cDefaultDefinitionParserRuleCall_0_3; } | 89 | public RuleCall getDefaultDefinitionParserRuleCall_0_3() { return cDefaultDefinitionParserRuleCall_0_3; } |
88 | 90 | ||
89 | //ExternPredicateDefinition | ||
90 | public RuleCall getExternPredicateDefinitionParserRuleCall_0_4() { return cExternPredicateDefinitionParserRuleCall_0_4; } | ||
91 | |||
92 | //MetricDefinition | 91 | //MetricDefinition |
93 | public RuleCall getMetricDefinitionParserRuleCall_0_5() { return cMetricDefinitionParserRuleCall_0_5; } | 92 | public RuleCall getMetricDefinitionParserRuleCall_0_4() { return cMetricDefinitionParserRuleCall_0_4; } |
93 | |||
94 | //ExternPredicateDefinition | ||
95 | public RuleCall getExternPredicateDefinitionParserRuleCall_0_5() { return cExternPredicateDefinitionParserRuleCall_0_5; } | ||
94 | 96 | ||
95 | //ExternMetricDefinition | 97 | //ExternMetricDefinition |
96 | public RuleCall getExternMetricDefinitionParserRuleCall_0_6() { return cExternMetricDefinitionParserRuleCall_0_6; } | 98 | public RuleCall getExternMetricDefinitionParserRuleCall_0_6() { return cExternMetricDefinitionParserRuleCall_0_6; } |
97 | 99 | ||
100 | //ExternAggregatorDefinition | ||
101 | public RuleCall getExternAggregatorDefinitionParserRuleCall_0_7() { return cExternAggregatorDefinitionParserRuleCall_0_7; } | ||
102 | |||
103 | //ExternDatatypeDefinition | ||
104 | public RuleCall getExternDatatypeDefinitionParserRuleCall_0_8() { return cExternDatatypeDefinitionParserRuleCall_0_8; } | ||
105 | |||
98 | //ClassDefinition | 106 | //ClassDefinition |
99 | public RuleCall getClassDefinitionParserRuleCall_0_7() { return cClassDefinitionParserRuleCall_0_7; } | 107 | public RuleCall getClassDefinitionParserRuleCall_0_9() { return cClassDefinitionParserRuleCall_0_9; } |
100 | 108 | ||
101 | //ScopeDefinition | 109 | //ScopeDefinition |
102 | public RuleCall getScopeDefinitionParserRuleCall_0_8() { return cScopeDefinitionParserRuleCall_0_8; } | 110 | public RuleCall getScopeDefinitionParserRuleCall_0_10() { return cScopeDefinitionParserRuleCall_0_10; } |
103 | 111 | ||
104 | //ObjectiveDefinition | 112 | //ObjectiveDefinition |
105 | public RuleCall getObjectiveDefinitionParserRuleCall_0_9() { return cObjectiveDefinitionParserRuleCall_0_9; } | 113 | public RuleCall getObjectiveDefinitionParserRuleCall_0_11() { return cObjectiveDefinitionParserRuleCall_0_11; } |
106 | 114 | ||
107 | //FULL_STOP | 115 | //FULL_STOP |
108 | public RuleCall getFULL_STOPTerminalRuleCall_1() { return cFULL_STOPTerminalRuleCall_1; } | 116 | public RuleCall getFULL_STOPTerminalRuleCall_1() { return cFULL_STOPTerminalRuleCall_1; } |
@@ -113,11 +121,10 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
113 | private final RuleCall cExpressionParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); | 121 | private final RuleCall cExpressionParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); |
114 | private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1); | 122 | private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1); |
115 | private final Group cGroup_1_0 = (Group)cAlternatives_1.eContents().get(0); | 123 | private final Group cGroup_1_0 = (Group)cAlternatives_1.eContents().get(0); |
116 | private final Action cAssertionBodyAction_1_0_0 = (Action)cGroup_1_0.eContents().get(0); | 124 | private final Action cInterpretationBodyAction_1_0_0 = (Action)cGroup_1_0.eContents().get(0); |
117 | private final Group cGroup_1_0_1 = (Group)cGroup_1_0.eContents().get(1); | 125 | private final Keyword cColonKeyword_1_0_1 = (Keyword)cGroup_1_0.eContents().get(1); |
118 | private final Keyword cColonKeyword_1_0_1_0 = (Keyword)cGroup_1_0_1.eContents().get(0); | 126 | private final Assignment cRangeAssignment_1_0_2 = (Assignment)cGroup_1_0.eContents().get(2); |
119 | private final Assignment cRangeAssignment_1_0_1_1 = (Assignment)cGroup_1_0_1.eContents().get(1); | 127 | private final RuleCall cRangeExpressionParserRuleCall_1_0_2_0 = (RuleCall)cRangeAssignment_1_0_2.eContents().get(0); |
120 | private final RuleCall cRangeExpressionParserRuleCall_1_0_1_1_0 = (RuleCall)cRangeAssignment_1_0_1_1.eContents().get(0); | ||
121 | private final Group cGroup_1_1 = (Group)cAlternatives_1.eContents().get(1); | 128 | private final Group cGroup_1_1 = (Group)cAlternatives_1.eContents().get(1); |
122 | private final Action cPredicateDefinitionHeadAction_1_1_0 = (Action)cGroup_1_1.eContents().get(0); | 129 | private final Action cPredicateDefinitionHeadAction_1_1_0 = (Action)cGroup_1_1.eContents().get(0); |
123 | private final Keyword cColonHyphenMinusKeyword_1_1_1 = (Keyword)cGroup_1_1.eContents().get(1); | 130 | private final Keyword cColonHyphenMinusKeyword_1_1_1 = (Keyword)cGroup_1_1.eContents().get(1); |
@@ -130,38 +137,35 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
130 | private final RuleCall cBodyExpressionParserRuleCall_1_2_2_0 = (RuleCall)cBodyAssignment_1_2_2.eContents().get(0); | 137 | private final RuleCall cBodyExpressionParserRuleCall_1_2_2_0 = (RuleCall)cBodyAssignment_1_2_2.eContents().get(0); |
131 | 138 | ||
132 | //AssertionOrDefinition Statement: | 139 | //AssertionOrDefinition Statement: |
133 | // Expression ({Assertion.body=current} (":" range=Expression)? | {PredicateDefinition.head=current} ":-" | 140 | // Expression ({Interpretation.body=current} ":" range=Expression | {PredicateDefinition.head=current} ":-" |
134 | // body=Expression | {MetricDefinition.head=current} "=" body=Expression); | 141 | // body=Expression | {MetricDefinition.head=current} "=" body=Expression)?; |
135 | @Override public ParserRule getRule() { return rule; } | 142 | @Override public ParserRule getRule() { return rule; } |
136 | 143 | ||
137 | //Expression ({Assertion.body=current} (":" range=Expression)? | {PredicateDefinition.head=current} ":-" body=Expression | | 144 | //Expression ({Interpretation.body=current} ":" range=Expression | {PredicateDefinition.head=current} ":-" body=Expression |
138 | //{MetricDefinition.head=current} "=" body=Expression) | 145 | //| {MetricDefinition.head=current} "=" body=Expression)? |
139 | public Group getGroup() { return cGroup; } | 146 | public Group getGroup() { return cGroup; } |
140 | 147 | ||
141 | //Expression | 148 | //Expression |
142 | public RuleCall getExpressionParserRuleCall_0() { return cExpressionParserRuleCall_0; } | 149 | public RuleCall getExpressionParserRuleCall_0() { return cExpressionParserRuleCall_0; } |
143 | 150 | ||
144 | //({Assertion.body=current} (":" range=Expression)? | {PredicateDefinition.head=current} ":-" body=Expression | | 151 | //({Interpretation.body=current} ":" range=Expression | {PredicateDefinition.head=current} ":-" body=Expression | |
145 | //{MetricDefinition.head=current} "=" body=Expression) | 152 | //{MetricDefinition.head=current} "=" body=Expression)? |
146 | public Alternatives getAlternatives_1() { return cAlternatives_1; } | 153 | public Alternatives getAlternatives_1() { return cAlternatives_1; } |
147 | 154 | ||
148 | //{Assertion.body=current} (":" range=Expression)? | 155 | //{Interpretation.body=current} ":" range=Expression |
149 | public Group getGroup_1_0() { return cGroup_1_0; } | 156 | public Group getGroup_1_0() { return cGroup_1_0; } |
150 | 157 | ||
151 | //{Assertion.body=current} | 158 | //{Interpretation.body=current} |
152 | public Action getAssertionBodyAction_1_0_0() { return cAssertionBodyAction_1_0_0; } | 159 | public Action getInterpretationBodyAction_1_0_0() { return cInterpretationBodyAction_1_0_0; } |
153 | |||
154 | //(":" range=Expression)? | ||
155 | public Group getGroup_1_0_1() { return cGroup_1_0_1; } | ||
156 | 160 | ||
157 | //":" | 161 | //":" |
158 | public Keyword getColonKeyword_1_0_1_0() { return cColonKeyword_1_0_1_0; } | 162 | public Keyword getColonKeyword_1_0_1() { return cColonKeyword_1_0_1; } |
159 | 163 | ||
160 | //range=Expression | 164 | //range=Expression |
161 | public Assignment getRangeAssignment_1_0_1_1() { return cRangeAssignment_1_0_1_1; } | 165 | public Assignment getRangeAssignment_1_0_2() { return cRangeAssignment_1_0_2; } |
162 | 166 | ||
163 | //Expression | 167 | //Expression |
164 | public RuleCall getRangeExpressionParserRuleCall_1_0_1_1_0() { return cRangeExpressionParserRuleCall_1_0_1_1_0; } | 168 | public RuleCall getRangeExpressionParserRuleCall_1_0_2_0() { return cRangeExpressionParserRuleCall_1_0_2_0; } |
165 | 169 | ||
166 | //{PredicateDefinition.head=current} ":-" body=Expression | 170 | //{PredicateDefinition.head=current} ":-" body=Expression |
167 | public Group getGroup_1_1() { return cGroup_1_1; } | 171 | public Group getGroup_1_1() { return cGroup_1_1; } |
@@ -338,58 +342,39 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
338 | //Expression | 342 | //Expression |
339 | public RuleCall getRangeExpressionParserRuleCall_3_0() { return cRangeExpressionParserRuleCall_3_0; } | 343 | public RuleCall getRangeExpressionParserRuleCall_3_0() { return cRangeExpressionParserRuleCall_3_0; } |
340 | } | 344 | } |
341 | public class ExternPredicateDefinitionElements extends AbstractParserRuleElementFinder { | ||
342 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ExternPredicateDefinition"); | ||
343 | private final Group cGroup = (Group)rule.eContents().get(1); | ||
344 | private final Keyword cExternKeyword_0 = (Keyword)cGroup.eContents().get(0); | ||
345 | private final Assignment cHeadAssignment_1 = (Assignment)cGroup.eContents().get(1); | ||
346 | private final RuleCall cHeadCallParserRuleCall_1_0 = (RuleCall)cHeadAssignment_1.eContents().get(0); | ||
347 | |||
348 | //ExternPredicateDefinition: | ||
349 | // "extern" head=Call; | ||
350 | @Override public ParserRule getRule() { return rule; } | ||
351 | |||
352 | //"extern" head=Call | ||
353 | public Group getGroup() { return cGroup; } | ||
354 | |||
355 | //"extern" | ||
356 | public Keyword getExternKeyword_0() { return cExternKeyword_0; } | ||
357 | |||
358 | //head=Call | ||
359 | public Assignment getHeadAssignment_1() { return cHeadAssignment_1; } | ||
360 | |||
361 | //Call | ||
362 | public RuleCall getHeadCallParserRuleCall_1_0() { return cHeadCallParserRuleCall_1_0; } | ||
363 | } | ||
364 | public class MetricDefinitionElements extends AbstractParserRuleElementFinder { | 345 | public class MetricDefinitionElements extends AbstractParserRuleElementFinder { |
365 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.MetricDefinition"); | 346 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.MetricDefinition"); |
366 | private final Group cGroup = (Group)rule.eContents().get(1); | 347 | private final Group cGroup = (Group)rule.eContents().get(1); |
367 | private final Assignment cTypeAssignment_0 = (Assignment)cGroup.eContents().get(0); | 348 | private final Assignment cTypeAssignment_0 = (Assignment)cGroup.eContents().get(0); |
368 | private final RuleCall cTypeMetricTypeEnumRuleCall_0_0 = (RuleCall)cTypeAssignment_0.eContents().get(0); | 349 | private final CrossReference cTypeNamedElementCrossReference_0_0 = (CrossReference)cTypeAssignment_0.eContents().get(0); |
350 | private final RuleCall cTypeNamedElementQualifiedNameParserRuleCall_0_0_1 = (RuleCall)cTypeNamedElementCrossReference_0_0.eContents().get(1); | ||
369 | private final Assignment cHeadAssignment_1 = (Assignment)cGroup.eContents().get(1); | 351 | private final Assignment cHeadAssignment_1 = (Assignment)cGroup.eContents().get(1); |
370 | private final RuleCall cHeadExpressionParserRuleCall_1_0 = (RuleCall)cHeadAssignment_1.eContents().get(0); | 352 | private final RuleCall cHeadCallParserRuleCall_1_0 = (RuleCall)cHeadAssignment_1.eContents().get(0); |
371 | private final Keyword cEqualsSignKeyword_2 = (Keyword)cGroup.eContents().get(2); | 353 | private final Keyword cEqualsSignKeyword_2 = (Keyword)cGroup.eContents().get(2); |
372 | private final Assignment cBodyAssignment_3 = (Assignment)cGroup.eContents().get(3); | 354 | private final Assignment cBodyAssignment_3 = (Assignment)cGroup.eContents().get(3); |
373 | private final RuleCall cBodyExpressionParserRuleCall_3_0 = (RuleCall)cBodyAssignment_3.eContents().get(0); | 355 | private final RuleCall cBodyExpressionParserRuleCall_3_0 = (RuleCall)cBodyAssignment_3.eContents().get(0); |
374 | 356 | ||
375 | //MetricDefinition: | 357 | //MetricDefinition: |
376 | // type=MetricType head=Expression "=" body=Expression; | 358 | // type=[NamedElement|QualifiedName] head=Call "=" body=Expression; |
377 | @Override public ParserRule getRule() { return rule; } | 359 | @Override public ParserRule getRule() { return rule; } |
378 | 360 | ||
379 | //type=MetricType head=Expression "=" body=Expression | 361 | //type=[NamedElement|QualifiedName] head=Call "=" body=Expression |
380 | public Group getGroup() { return cGroup; } | 362 | public Group getGroup() { return cGroup; } |
381 | 363 | ||
382 | //type=MetricType | 364 | //type=[NamedElement|QualifiedName] |
383 | public Assignment getTypeAssignment_0() { return cTypeAssignment_0; } | 365 | public Assignment getTypeAssignment_0() { return cTypeAssignment_0; } |
384 | 366 | ||
385 | //MetricType | 367 | //[NamedElement|QualifiedName] |
386 | public RuleCall getTypeMetricTypeEnumRuleCall_0_0() { return cTypeMetricTypeEnumRuleCall_0_0; } | 368 | public CrossReference getTypeNamedElementCrossReference_0_0() { return cTypeNamedElementCrossReference_0_0; } |
369 | |||
370 | //QualifiedName | ||
371 | public RuleCall getTypeNamedElementQualifiedNameParserRuleCall_0_0_1() { return cTypeNamedElementQualifiedNameParserRuleCall_0_0_1; } | ||
387 | 372 | ||
388 | //head=Expression | 373 | //head=Call |
389 | public Assignment getHeadAssignment_1() { return cHeadAssignment_1; } | 374 | public Assignment getHeadAssignment_1() { return cHeadAssignment_1; } |
390 | 375 | ||
391 | //Expression | 376 | //Call |
392 | public RuleCall getHeadExpressionParserRuleCall_1_0() { return cHeadExpressionParserRuleCall_1_0; } | 377 | public RuleCall getHeadCallParserRuleCall_1_0() { return cHeadCallParserRuleCall_1_0; } |
393 | 378 | ||
394 | //"=" | 379 | //"=" |
395 | public Keyword getEqualsSignKeyword_2() { return cEqualsSignKeyword_2; } | 380 | public Keyword getEqualsSignKeyword_2() { return cEqualsSignKeyword_2; } |
@@ -400,55 +385,261 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
400 | //Expression | 385 | //Expression |
401 | public RuleCall getBodyExpressionParserRuleCall_3_0() { return cBodyExpressionParserRuleCall_3_0; } | 386 | public RuleCall getBodyExpressionParserRuleCall_3_0() { return cBodyExpressionParserRuleCall_3_0; } |
402 | } | 387 | } |
388 | public class ExternPredicateDefinitionElements extends AbstractParserRuleElementFinder { | ||
389 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ExternPredicateDefinition"); | ||
390 | private final Group cGroup = (Group)rule.eContents().get(1); | ||
391 | private final Keyword cExternKeyword_0 = (Keyword)cGroup.eContents().get(0); | ||
392 | private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1); | ||
393 | private final RuleCall cNameQualifiedNameParserRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0); | ||
394 | private final Assignment cArgumentListAssignment_2 = (Assignment)cGroup.eContents().get(2); | ||
395 | private final RuleCall cArgumentListArgumentListParserRuleCall_2_0 = (RuleCall)cArgumentListAssignment_2.eContents().get(0); | ||
396 | |||
397 | //ExternPredicateDefinition: | ||
398 | // "extern" name=QualifiedName argumentList=ArgumentList; | ||
399 | @Override public ParserRule getRule() { return rule; } | ||
400 | |||
401 | //"extern" name=QualifiedName argumentList=ArgumentList | ||
402 | public Group getGroup() { return cGroup; } | ||
403 | |||
404 | //"extern" | ||
405 | public Keyword getExternKeyword_0() { return cExternKeyword_0; } | ||
406 | |||
407 | //name=QualifiedName | ||
408 | public Assignment getNameAssignment_1() { return cNameAssignment_1; } | ||
409 | |||
410 | //QualifiedName | ||
411 | public RuleCall getNameQualifiedNameParserRuleCall_1_0() { return cNameQualifiedNameParserRuleCall_1_0; } | ||
412 | |||
413 | //argumentList=ArgumentList | ||
414 | public Assignment getArgumentListAssignment_2() { return cArgumentListAssignment_2; } | ||
415 | |||
416 | //ArgumentList | ||
417 | public RuleCall getArgumentListArgumentListParserRuleCall_2_0() { return cArgumentListArgumentListParserRuleCall_2_0; } | ||
418 | } | ||
403 | public class ExternMetricDefinitionElements extends AbstractParserRuleElementFinder { | 419 | public class ExternMetricDefinitionElements extends AbstractParserRuleElementFinder { |
404 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ExternMetricDefinition"); | 420 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ExternMetricDefinition"); |
405 | private final Group cGroup = (Group)rule.eContents().get(1); | 421 | private final Group cGroup = (Group)rule.eContents().get(1); |
406 | private final Keyword cExternKeyword_0 = (Keyword)cGroup.eContents().get(0); | 422 | private final Keyword cExternKeyword_0 = (Keyword)cGroup.eContents().get(0); |
407 | private final Assignment cTypeAssignment_1 = (Assignment)cGroup.eContents().get(1); | 423 | private final Assignment cTypeAssignment_1 = (Assignment)cGroup.eContents().get(1); |
408 | private final RuleCall cTypeMetricTypeEnumRuleCall_1_0 = (RuleCall)cTypeAssignment_1.eContents().get(0); | 424 | private final CrossReference cTypeNamedElementCrossReference_1_0 = (CrossReference)cTypeAssignment_1.eContents().get(0); |
409 | private final Assignment cHeadAssignment_2 = (Assignment)cGroup.eContents().get(2); | 425 | private final RuleCall cTypeNamedElementQualifiedNameParserRuleCall_1_0_1 = (RuleCall)cTypeNamedElementCrossReference_1_0.eContents().get(1); |
410 | private final RuleCall cHeadCallParserRuleCall_2_0 = (RuleCall)cHeadAssignment_2.eContents().get(0); | 426 | private final Assignment cNameAssignment_2 = (Assignment)cGroup.eContents().get(2); |
427 | private final RuleCall cNameQualifiedNameParserRuleCall_2_0 = (RuleCall)cNameAssignment_2.eContents().get(0); | ||
428 | private final Assignment cArgumentListAssignment_3 = (Assignment)cGroup.eContents().get(3); | ||
429 | private final RuleCall cArgumentListArgumentListParserRuleCall_3_0 = (RuleCall)cArgumentListAssignment_3.eContents().get(0); | ||
411 | 430 | ||
412 | //ExternMetricDefinition: | 431 | //ExternMetricDefinition: |
413 | // "extern" type=MetricType head=Call; | 432 | // "extern" type=[NamedElement|QualifiedName] name=QualifiedName argumentList=ArgumentList; |
414 | @Override public ParserRule getRule() { return rule; } | 433 | @Override public ParserRule getRule() { return rule; } |
415 | 434 | ||
416 | //"extern" type=MetricType head=Call | 435 | //"extern" type=[NamedElement|QualifiedName] name=QualifiedName argumentList=ArgumentList |
417 | public Group getGroup() { return cGroup; } | 436 | public Group getGroup() { return cGroup; } |
418 | 437 | ||
419 | //"extern" | 438 | //"extern" |
420 | public Keyword getExternKeyword_0() { return cExternKeyword_0; } | 439 | public Keyword getExternKeyword_0() { return cExternKeyword_0; } |
421 | 440 | ||
422 | //type=MetricType | 441 | //type=[NamedElement|QualifiedName] |
423 | public Assignment getTypeAssignment_1() { return cTypeAssignment_1; } | 442 | public Assignment getTypeAssignment_1() { return cTypeAssignment_1; } |
424 | 443 | ||
425 | //MetricType | 444 | //[NamedElement|QualifiedName] |
426 | public RuleCall getTypeMetricTypeEnumRuleCall_1_0() { return cTypeMetricTypeEnumRuleCall_1_0; } | 445 | public CrossReference getTypeNamedElementCrossReference_1_0() { return cTypeNamedElementCrossReference_1_0; } |
427 | 446 | ||
428 | //head=Call | 447 | //QualifiedName |
429 | public Assignment getHeadAssignment_2() { return cHeadAssignment_2; } | 448 | public RuleCall getTypeNamedElementQualifiedNameParserRuleCall_1_0_1() { return cTypeNamedElementQualifiedNameParserRuleCall_1_0_1; } |
430 | 449 | ||
431 | //Call | 450 | //name=QualifiedName |
432 | public RuleCall getHeadCallParserRuleCall_2_0() { return cHeadCallParserRuleCall_2_0; } | 451 | public Assignment getNameAssignment_2() { return cNameAssignment_2; } |
452 | |||
453 | //QualifiedName | ||
454 | public RuleCall getNameQualifiedNameParserRuleCall_2_0() { return cNameQualifiedNameParserRuleCall_2_0; } | ||
455 | |||
456 | //argumentList=ArgumentList | ||
457 | public Assignment getArgumentListAssignment_3() { return cArgumentListAssignment_3; } | ||
458 | |||
459 | //ArgumentList | ||
460 | public RuleCall getArgumentListArgumentListParserRuleCall_3_0() { return cArgumentListArgumentListParserRuleCall_3_0; } | ||
461 | } | ||
462 | public class ExternAggregatorDefinitionElements extends AbstractParserRuleElementFinder { | ||
463 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ExternAggregatorDefinition"); | ||
464 | private final Group cGroup = (Group)rule.eContents().get(1); | ||
465 | private final Keyword cExternKeyword_0 = (Keyword)cGroup.eContents().get(0); | ||
466 | private final Assignment cTypeAssignment_1 = (Assignment)cGroup.eContents().get(1); | ||
467 | private final CrossReference cTypeNamedElementCrossReference_1_0 = (CrossReference)cTypeAssignment_1.eContents().get(0); | ||
468 | private final RuleCall cTypeNamedElementQualifiedNameParserRuleCall_1_0_1 = (RuleCall)cTypeNamedElementCrossReference_1_0.eContents().get(1); | ||
469 | private final Assignment cNameAssignment_2 = (Assignment)cGroup.eContents().get(2); | ||
470 | private final RuleCall cNameQualifiedNameParserRuleCall_2_0 = (RuleCall)cNameAssignment_2.eContents().get(0); | ||
471 | private final Keyword cLeftCurlyBracketKeyword_3 = (Keyword)cGroup.eContents().get(3); | ||
472 | private final Assignment cInputTypeAssignment_4 = (Assignment)cGroup.eContents().get(4); | ||
473 | private final CrossReference cInputTypeNamedElementCrossReference_4_0 = (CrossReference)cInputTypeAssignment_4.eContents().get(0); | ||
474 | private final RuleCall cInputTypeNamedElementQualifiedNameParserRuleCall_4_0_1 = (RuleCall)cInputTypeNamedElementCrossReference_4_0.eContents().get(1); | ||
475 | private final Keyword cFullStopFullStopFullStopKeyword_5 = (Keyword)cGroup.eContents().get(5); | ||
476 | private final Keyword cRightCurlyBracketKeyword_6 = (Keyword)cGroup.eContents().get(6); | ||
477 | |||
478 | //ExternAggregatorDefinition: | ||
479 | // "extern" type=[NamedElement|QualifiedName] name=QualifiedName "{" inputType=[NamedElement|QualifiedName] "..." "}"; | ||
480 | @Override public ParserRule getRule() { return rule; } | ||
481 | |||
482 | //"extern" type=[NamedElement|QualifiedName] name=QualifiedName "{" inputType=[NamedElement|QualifiedName] "..." "}" | ||
483 | public Group getGroup() { return cGroup; } | ||
484 | |||
485 | //"extern" | ||
486 | public Keyword getExternKeyword_0() { return cExternKeyword_0; } | ||
487 | |||
488 | //type=[NamedElement|QualifiedName] | ||
489 | public Assignment getTypeAssignment_1() { return cTypeAssignment_1; } | ||
490 | |||
491 | //[NamedElement|QualifiedName] | ||
492 | public CrossReference getTypeNamedElementCrossReference_1_0() { return cTypeNamedElementCrossReference_1_0; } | ||
493 | |||
494 | //QualifiedName | ||
495 | public RuleCall getTypeNamedElementQualifiedNameParserRuleCall_1_0_1() { return cTypeNamedElementQualifiedNameParserRuleCall_1_0_1; } | ||
496 | |||
497 | //name=QualifiedName | ||
498 | public Assignment getNameAssignment_2() { return cNameAssignment_2; } | ||
499 | |||
500 | //QualifiedName | ||
501 | public RuleCall getNameQualifiedNameParserRuleCall_2_0() { return cNameQualifiedNameParserRuleCall_2_0; } | ||
502 | |||
503 | //"{" | ||
504 | public Keyword getLeftCurlyBracketKeyword_3() { return cLeftCurlyBracketKeyword_3; } | ||
505 | |||
506 | //inputType=[NamedElement|QualifiedName] | ||
507 | public Assignment getInputTypeAssignment_4() { return cInputTypeAssignment_4; } | ||
508 | |||
509 | //[NamedElement|QualifiedName] | ||
510 | public CrossReference getInputTypeNamedElementCrossReference_4_0() { return cInputTypeNamedElementCrossReference_4_0; } | ||
511 | |||
512 | //QualifiedName | ||
513 | public RuleCall getInputTypeNamedElementQualifiedNameParserRuleCall_4_0_1() { return cInputTypeNamedElementQualifiedNameParserRuleCall_4_0_1; } | ||
514 | |||
515 | //"..." | ||
516 | public Keyword getFullStopFullStopFullStopKeyword_5() { return cFullStopFullStopFullStopKeyword_5; } | ||
517 | |||
518 | //"}" | ||
519 | public Keyword getRightCurlyBracketKeyword_6() { return cRightCurlyBracketKeyword_6; } | ||
520 | } | ||
521 | public class ExternDatatypeDefinitionElements extends AbstractParserRuleElementFinder { | ||
522 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ExternDatatypeDefinition"); | ||
523 | private final Group cGroup = (Group)rule.eContents().get(1); | ||
524 | private final Keyword cExternKeyword_0 = (Keyword)cGroup.eContents().get(0); | ||
525 | private final Keyword cDatatypeKeyword_1 = (Keyword)cGroup.eContents().get(1); | ||
526 | private final Assignment cNameAssignment_2 = (Assignment)cGroup.eContents().get(2); | ||
527 | private final RuleCall cNameQualifiedNameParserRuleCall_2_0 = (RuleCall)cNameAssignment_2.eContents().get(0); | ||
528 | private final Group cGroup_3 = (Group)cGroup.eContents().get(3); | ||
529 | private final Keyword cExtendsKeyword_3_0 = (Keyword)cGroup_3.eContents().get(0); | ||
530 | private final Assignment cSupertypesAssignment_3_1 = (Assignment)cGroup_3.eContents().get(1); | ||
531 | private final CrossReference cSupertypesNamedElementCrossReference_3_1_0 = (CrossReference)cSupertypesAssignment_3_1.eContents().get(0); | ||
532 | private final RuleCall cSupertypesNamedElementQualifiedNameParserRuleCall_3_1_0_1 = (RuleCall)cSupertypesNamedElementCrossReference_3_1_0.eContents().get(1); | ||
533 | private final Group cGroup_3_2 = (Group)cGroup_3.eContents().get(2); | ||
534 | private final Keyword cCommaKeyword_3_2_0 = (Keyword)cGroup_3_2.eContents().get(0); | ||
535 | private final Assignment cSupertypesAssignment_3_2_1 = (Assignment)cGroup_3_2.eContents().get(1); | ||
536 | private final CrossReference cSupertypesNamedElementCrossReference_3_2_1_0 = (CrossReference)cSupertypesAssignment_3_2_1.eContents().get(0); | ||
537 | private final RuleCall cSupertypesNamedElementQualifiedNameParserRuleCall_3_2_1_0_1 = (RuleCall)cSupertypesNamedElementCrossReference_3_2_1_0.eContents().get(1); | ||
538 | |||
539 | //ExternDatatypeDefinition: | ||
540 | // "extern" "datatype" name=QualifiedName ("extends" supertypes+=[NamedElement|QualifiedName] ("," | ||
541 | // supertypes+=[NamedElement|QualifiedName])*); | ||
542 | @Override public ParserRule getRule() { return rule; } | ||
543 | |||
544 | //"extern" "datatype" name=QualifiedName ("extends" supertypes+=[NamedElement|QualifiedName] ("," | ||
545 | //supertypes+=[NamedElement|QualifiedName])*) | ||
546 | public Group getGroup() { return cGroup; } | ||
547 | |||
548 | //"extern" | ||
549 | public Keyword getExternKeyword_0() { return cExternKeyword_0; } | ||
550 | |||
551 | //"datatype" | ||
552 | public Keyword getDatatypeKeyword_1() { return cDatatypeKeyword_1; } | ||
553 | |||
554 | //name=QualifiedName | ||
555 | public Assignment getNameAssignment_2() { return cNameAssignment_2; } | ||
556 | |||
557 | //QualifiedName | ||
558 | public RuleCall getNameQualifiedNameParserRuleCall_2_0() { return cNameQualifiedNameParserRuleCall_2_0; } | ||
559 | |||
560 | //("extends" supertypes+=[NamedElement|QualifiedName] ("," supertypes+=[NamedElement|QualifiedName])*) | ||
561 | public Group getGroup_3() { return cGroup_3; } | ||
562 | |||
563 | //"extends" | ||
564 | public Keyword getExtendsKeyword_3_0() { return cExtendsKeyword_3_0; } | ||
565 | |||
566 | //supertypes+=[NamedElement|QualifiedName] | ||
567 | public Assignment getSupertypesAssignment_3_1() { return cSupertypesAssignment_3_1; } | ||
568 | |||
569 | //[NamedElement|QualifiedName] | ||
570 | public CrossReference getSupertypesNamedElementCrossReference_3_1_0() { return cSupertypesNamedElementCrossReference_3_1_0; } | ||
571 | |||
572 | //QualifiedName | ||
573 | public RuleCall getSupertypesNamedElementQualifiedNameParserRuleCall_3_1_0_1() { return cSupertypesNamedElementQualifiedNameParserRuleCall_3_1_0_1; } | ||
574 | |||
575 | //("," supertypes+=[NamedElement|QualifiedName])* | ||
576 | public Group getGroup_3_2() { return cGroup_3_2; } | ||
577 | |||
578 | //"," | ||
579 | public Keyword getCommaKeyword_3_2_0() { return cCommaKeyword_3_2_0; } | ||
580 | |||
581 | //supertypes+=[NamedElement|QualifiedName] | ||
582 | public Assignment getSupertypesAssignment_3_2_1() { return cSupertypesAssignment_3_2_1; } | ||
583 | |||
584 | //[NamedElement|QualifiedName] | ||
585 | public CrossReference getSupertypesNamedElementCrossReference_3_2_1_0() { return cSupertypesNamedElementCrossReference_3_2_1_0; } | ||
586 | |||
587 | //QualifiedName | ||
588 | public RuleCall getSupertypesNamedElementQualifiedNameParserRuleCall_3_2_1_0_1() { return cSupertypesNamedElementQualifiedNameParserRuleCall_3_2_1_0_1; } | ||
589 | } | ||
590 | public class VariableElements extends AbstractParserRuleElementFinder { | ||
591 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.Variable"); | ||
592 | private final Group cGroup = (Group)rule.eContents().get(1); | ||
593 | private final Assignment cTypeAssignment_0 = (Assignment)cGroup.eContents().get(0); | ||
594 | private final CrossReference cTypeNamedElementCrossReference_0_0 = (CrossReference)cTypeAssignment_0.eContents().get(0); | ||
595 | private final RuleCall cTypeNamedElementQualifiedNameParserRuleCall_0_0_1 = (RuleCall)cTypeNamedElementCrossReference_0_0.eContents().get(1); | ||
596 | private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1); | ||
597 | private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0); | ||
598 | |||
599 | //Variable: | ||
600 | // type=[NamedElement|QualifiedName]? name=ID; | ||
601 | @Override public ParserRule getRule() { return rule; } | ||
602 | |||
603 | //type=[NamedElement|QualifiedName]? name=ID | ||
604 | public Group getGroup() { return cGroup; } | ||
605 | |||
606 | //type=[NamedElement|QualifiedName]? | ||
607 | public Assignment getTypeAssignment_0() { return cTypeAssignment_0; } | ||
608 | |||
609 | //[NamedElement|QualifiedName] | ||
610 | public CrossReference getTypeNamedElementCrossReference_0_0() { return cTypeNamedElementCrossReference_0_0; } | ||
611 | |||
612 | //QualifiedName | ||
613 | public RuleCall getTypeNamedElementQualifiedNameParserRuleCall_0_0_1() { return cTypeNamedElementQualifiedNameParserRuleCall_0_0_1; } | ||
614 | |||
615 | //name=ID | ||
616 | public Assignment getNameAssignment_1() { return cNameAssignment_1; } | ||
617 | |||
618 | //ID | ||
619 | public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; } | ||
433 | } | 620 | } |
434 | public class ExpressionElements extends AbstractParserRuleElementFinder { | 621 | public class ExpressionElements extends AbstractParserRuleElementFinder { |
435 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); | 622 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.Expression"); |
436 | private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); | 623 | private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); |
437 | private final RuleCall cIfElseParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); | 624 | private final RuleCall cIfElseParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); |
438 | private final RuleCall cDisjunctiveExpressionParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); | 625 | private final RuleCall cLetParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); |
626 | private final RuleCall cImplicationExpressionParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); | ||
439 | 627 | ||
440 | //Expression: | 628 | //Expression: |
441 | // IfElse | DisjunctiveExpression; | 629 | // IfElse | Let | ImplicationExpression; |
442 | @Override public ParserRule getRule() { return rule; } | 630 | @Override public ParserRule getRule() { return rule; } |
443 | 631 | ||
444 | //IfElse | DisjunctiveExpression | 632 | //IfElse | Let | ImplicationExpression |
445 | public Alternatives getAlternatives() { return cAlternatives; } | 633 | public Alternatives getAlternatives() { return cAlternatives; } |
446 | 634 | ||
447 | //IfElse | 635 | //IfElse |
448 | public RuleCall getIfElseParserRuleCall_0() { return cIfElseParserRuleCall_0; } | 636 | public RuleCall getIfElseParserRuleCall_0() { return cIfElseParserRuleCall_0; } |
449 | 637 | ||
450 | //DisjunctiveExpression | 638 | //Let |
451 | public RuleCall getDisjunctiveExpressionParserRuleCall_1() { return cDisjunctiveExpressionParserRuleCall_1; } | 639 | public RuleCall getLetParserRuleCall_1() { return cLetParserRuleCall_1; } |
640 | |||
641 | //ImplicationExpression | ||
642 | public RuleCall getImplicationExpressionParserRuleCall_2() { return cImplicationExpressionParserRuleCall_2; } | ||
452 | } | 643 | } |
453 | public class IfElseElements extends AbstractParserRuleElementFinder { | 644 | public class IfElseElements extends AbstractParserRuleElementFinder { |
454 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.IfElse"); | 645 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.IfElse"); |
@@ -497,6 +688,127 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
497 | //Expression | 688 | //Expression |
498 | public RuleCall getElseExpressionParserRuleCall_5_0() { return cElseExpressionParserRuleCall_5_0; } | 689 | public RuleCall getElseExpressionParserRuleCall_5_0() { return cElseExpressionParserRuleCall_5_0; } |
499 | } | 690 | } |
691 | public class LetElements extends AbstractParserRuleElementFinder { | ||
692 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.Let"); | ||
693 | private final Group cGroup = (Group)rule.eContents().get(1); | ||
694 | private final Keyword cLetKeyword_0 = (Keyword)cGroup.eContents().get(0); | ||
695 | private final Assignment cBindingsAssignment_1 = (Assignment)cGroup.eContents().get(1); | ||
696 | private final RuleCall cBindingsLetBindingParserRuleCall_1_0 = (RuleCall)cBindingsAssignment_1.eContents().get(0); | ||
697 | private final Group cGroup_2 = (Group)cGroup.eContents().get(2); | ||
698 | private final Keyword cCommaKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0); | ||
699 | private final Assignment cBindingsAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); | ||
700 | private final RuleCall cBindingsLetBindingParserRuleCall_2_1_0 = (RuleCall)cBindingsAssignment_2_1.eContents().get(0); | ||
701 | private final Keyword cInKeyword_3 = (Keyword)cGroup.eContents().get(3); | ||
702 | private final Assignment cBodyAssignment_4 = (Assignment)cGroup.eContents().get(4); | ||
703 | private final RuleCall cBodyExpressionParserRuleCall_4_0 = (RuleCall)cBodyAssignment_4.eContents().get(0); | ||
704 | |||
705 | //Let: | ||
706 | // "let" bindings+=LetBinding ("," bindings+=LetBinding)* "in" body=Expression; | ||
707 | @Override public ParserRule getRule() { return rule; } | ||
708 | |||
709 | //"let" bindings+=LetBinding ("," bindings+=LetBinding)* "in" body=Expression | ||
710 | public Group getGroup() { return cGroup; } | ||
711 | |||
712 | //"let" | ||
713 | public Keyword getLetKeyword_0() { return cLetKeyword_0; } | ||
714 | |||
715 | //bindings+=LetBinding | ||
716 | public Assignment getBindingsAssignment_1() { return cBindingsAssignment_1; } | ||
717 | |||
718 | //LetBinding | ||
719 | public RuleCall getBindingsLetBindingParserRuleCall_1_0() { return cBindingsLetBindingParserRuleCall_1_0; } | ||
720 | |||
721 | //("," bindings+=LetBinding)* | ||
722 | public Group getGroup_2() { return cGroup_2; } | ||
723 | |||
724 | //"," | ||
725 | public Keyword getCommaKeyword_2_0() { return cCommaKeyword_2_0; } | ||
726 | |||
727 | //bindings+=LetBinding | ||
728 | public Assignment getBindingsAssignment_2_1() { return cBindingsAssignment_2_1; } | ||
729 | |||
730 | //LetBinding | ||
731 | public RuleCall getBindingsLetBindingParserRuleCall_2_1_0() { return cBindingsLetBindingParserRuleCall_2_1_0; } | ||
732 | |||
733 | //"in" | ||
734 | public Keyword getInKeyword_3() { return cInKeyword_3; } | ||
735 | |||
736 | //body=Expression | ||
737 | public Assignment getBodyAssignment_4() { return cBodyAssignment_4; } | ||
738 | |||
739 | //Expression | ||
740 | public RuleCall getBodyExpressionParserRuleCall_4_0() { return cBodyExpressionParserRuleCall_4_0; } | ||
741 | } | ||
742 | public class LetBindingElements extends AbstractParserRuleElementFinder { | ||
743 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.LetBinding"); | ||
744 | private final Group cGroup = (Group)rule.eContents().get(1); | ||
745 | private final Assignment cVariableAssignment_0 = (Assignment)cGroup.eContents().get(0); | ||
746 | private final RuleCall cVariableVariableParserRuleCall_0_0 = (RuleCall)cVariableAssignment_0.eContents().get(0); | ||
747 | private final Keyword cEqualsSignKeyword_1 = (Keyword)cGroup.eContents().get(1); | ||
748 | private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2); | ||
749 | private final RuleCall cValueAdditiveExpressionParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0); | ||
750 | |||
751 | //LetBinding: | ||
752 | // variable=Variable "=" value=AdditiveExpression; | ||
753 | @Override public ParserRule getRule() { return rule; } | ||
754 | |||
755 | //variable=Variable "=" value=AdditiveExpression | ||
756 | public Group getGroup() { return cGroup; } | ||
757 | |||
758 | //variable=Variable | ||
759 | public Assignment getVariableAssignment_0() { return cVariableAssignment_0; } | ||
760 | |||
761 | //Variable | ||
762 | public RuleCall getVariableVariableParserRuleCall_0_0() { return cVariableVariableParserRuleCall_0_0; } | ||
763 | |||
764 | //"=" | ||
765 | public Keyword getEqualsSignKeyword_1() { return cEqualsSignKeyword_1; } | ||
766 | |||
767 | //value=AdditiveExpression | ||
768 | public Assignment getValueAssignment_2() { return cValueAssignment_2; } | ||
769 | |||
770 | //AdditiveExpression | ||
771 | public RuleCall getValueAdditiveExpressionParserRuleCall_2_0() { return cValueAdditiveExpressionParserRuleCall_2_0; } | ||
772 | } | ||
773 | public class ImplicationExpressionElements extends AbstractParserRuleElementFinder { | ||
774 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ImplicationExpression"); | ||
775 | private final Group cGroup = (Group)rule.eContents().get(1); | ||
776 | private final RuleCall cDisjunctiveExpressionParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); | ||
777 | private final Group cGroup_1 = (Group)cGroup.eContents().get(1); | ||
778 | private final Action cBinaryExpressionLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); | ||
779 | private final Assignment cOpAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); | ||
780 | private final RuleCall cOpImplicationOperatorEnumRuleCall_1_1_0 = (RuleCall)cOpAssignment_1_1.eContents().get(0); | ||
781 | private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); | ||
782 | private final RuleCall cRightImplicationExpressionParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); | ||
783 | |||
784 | //ImplicationExpression Expression: | ||
785 | // DisjunctiveExpression ({BinaryExpression.left=current} op=ImplicationOperator right=ImplicationExpression)?; | ||
786 | @Override public ParserRule getRule() { return rule; } | ||
787 | |||
788 | //DisjunctiveExpression ({BinaryExpression.left=current} op=ImplicationOperator right=ImplicationExpression)? | ||
789 | public Group getGroup() { return cGroup; } | ||
790 | |||
791 | //DisjunctiveExpression | ||
792 | public RuleCall getDisjunctiveExpressionParserRuleCall_0() { return cDisjunctiveExpressionParserRuleCall_0; } | ||
793 | |||
794 | //({BinaryExpression.left=current} op=ImplicationOperator right=ImplicationExpression)? | ||
795 | public Group getGroup_1() { return cGroup_1; } | ||
796 | |||
797 | //{BinaryExpression.left=current} | ||
798 | public Action getBinaryExpressionLeftAction_1_0() { return cBinaryExpressionLeftAction_1_0; } | ||
799 | |||
800 | //op=ImplicationOperator | ||
801 | public Assignment getOpAssignment_1_1() { return cOpAssignment_1_1; } | ||
802 | |||
803 | //ImplicationOperator | ||
804 | public RuleCall getOpImplicationOperatorEnumRuleCall_1_1_0() { return cOpImplicationOperatorEnumRuleCall_1_1_0; } | ||
805 | |||
806 | //right=ImplicationExpression | ||
807 | public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } | ||
808 | |||
809 | //ImplicationExpression | ||
810 | public RuleCall getRightImplicationExpressionParserRuleCall_1_2_0() { return cRightImplicationExpressionParserRuleCall_1_2_0; } | ||
811 | } | ||
500 | public class DisjunctiveExpressionElements extends AbstractParserRuleElementFinder { | 812 | public class DisjunctiveExpressionElements extends AbstractParserRuleElementFinder { |
501 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.DisjunctiveExpression"); | 813 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.DisjunctiveExpression"); |
502 | private final Group cGroup = (Group)rule.eContents().get(1); | 814 | private final Group cGroup = (Group)rule.eContents().get(1); |
@@ -773,25 +1085,25 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
773 | public class ExponentialExpressionElements extends AbstractParserRuleElementFinder { | 1085 | public class ExponentialExpressionElements extends AbstractParserRuleElementFinder { |
774 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialExpression"); | 1086 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialExpression"); |
775 | private final Group cGroup = (Group)rule.eContents().get(1); | 1087 | private final Group cGroup = (Group)rule.eContents().get(1); |
776 | private final RuleCall cUnaryExpressionParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); | 1088 | private final RuleCall cCastExpressionParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); |
777 | private final Group cGroup_1 = (Group)cGroup.eContents().get(1); | 1089 | private final Group cGroup_1 = (Group)cGroup.eContents().get(1); |
778 | private final Action cBinaryExpressionLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); | 1090 | private final Action cBinaryExpressionLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); |
779 | private final Assignment cOpAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); | 1091 | private final Assignment cOpAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); |
780 | private final RuleCall cOpExponentialOpEnumRuleCall_1_1_0 = (RuleCall)cOpAssignment_1_1.eContents().get(0); | 1092 | private final RuleCall cOpExponentialOpEnumRuleCall_1_1_0 = (RuleCall)cOpAssignment_1_1.eContents().get(0); |
781 | private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); | 1093 | private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); |
782 | private final RuleCall cRightExponentialExpressionParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); | 1094 | private final RuleCall cRightCastExpressionParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); |
783 | 1095 | ||
784 | //ExponentialExpression Expression: | 1096 | //ExponentialExpression Expression: |
785 | // UnaryExpression ({BinaryExpression.left=current} op=ExponentialOp right=ExponentialExpression)?; | 1097 | // CastExpression ({BinaryExpression.left=current} op=ExponentialOp right=CastExpression)?; |
786 | @Override public ParserRule getRule() { return rule; } | 1098 | @Override public ParserRule getRule() { return rule; } |
787 | 1099 | ||
788 | //UnaryExpression ({BinaryExpression.left=current} op=ExponentialOp right=ExponentialExpression)? | 1100 | //CastExpression ({BinaryExpression.left=current} op=ExponentialOp right=CastExpression)? |
789 | public Group getGroup() { return cGroup; } | 1101 | public Group getGroup() { return cGroup; } |
790 | 1102 | ||
791 | //UnaryExpression | 1103 | //CastExpression |
792 | public RuleCall getUnaryExpressionParserRuleCall_0() { return cUnaryExpressionParserRuleCall_0; } | 1104 | public RuleCall getCastExpressionParserRuleCall_0() { return cCastExpressionParserRuleCall_0; } |
793 | 1105 | ||
794 | //({BinaryExpression.left=current} op=ExponentialOp right=ExponentialExpression)? | 1106 | //({BinaryExpression.left=current} op=ExponentialOp right=CastExpression)? |
795 | public Group getGroup_1() { return cGroup_1; } | 1107 | public Group getGroup_1() { return cGroup_1; } |
796 | 1108 | ||
797 | //{BinaryExpression.left=current} | 1109 | //{BinaryExpression.left=current} |
@@ -803,11 +1115,50 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
803 | //ExponentialOp | 1115 | //ExponentialOp |
804 | public RuleCall getOpExponentialOpEnumRuleCall_1_1_0() { return cOpExponentialOpEnumRuleCall_1_1_0; } | 1116 | public RuleCall getOpExponentialOpEnumRuleCall_1_1_0() { return cOpExponentialOpEnumRuleCall_1_1_0; } |
805 | 1117 | ||
806 | //right=ExponentialExpression | 1118 | //right=CastExpression |
807 | public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } | 1119 | public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } |
808 | 1120 | ||
809 | //ExponentialExpression | 1121 | //CastExpression |
810 | public RuleCall getRightExponentialExpressionParserRuleCall_1_2_0() { return cRightExponentialExpressionParserRuleCall_1_2_0; } | 1122 | public RuleCall getRightCastExpressionParserRuleCall_1_2_0() { return cRightCastExpressionParserRuleCall_1_2_0; } |
1123 | } | ||
1124 | public class CastExpressionElements extends AbstractParserRuleElementFinder { | ||
1125 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.CastExpression"); | ||
1126 | private final Group cGroup = (Group)rule.eContents().get(1); | ||
1127 | private final RuleCall cUnaryExpressionParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); | ||
1128 | private final Group cGroup_1 = (Group)cGroup.eContents().get(1); | ||
1129 | private final Action cCastExpressionBodyAction_1_0 = (Action)cGroup_1.eContents().get(0); | ||
1130 | private final Keyword cAsKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1); | ||
1131 | private final Assignment cTypeAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); | ||
1132 | private final CrossReference cTypeNamedElementCrossReference_1_2_0 = (CrossReference)cTypeAssignment_1_2.eContents().get(0); | ||
1133 | private final RuleCall cTypeNamedElementQualifiedNameParserRuleCall_1_2_0_1 = (RuleCall)cTypeNamedElementCrossReference_1_2_0.eContents().get(1); | ||
1134 | |||
1135 | //CastExpression Expression: | ||
1136 | // UnaryExpression ({CastExpression.body=current} "as" type=[NamedElement|QualifiedName])?; | ||
1137 | @Override public ParserRule getRule() { return rule; } | ||
1138 | |||
1139 | //UnaryExpression ({CastExpression.body=current} "as" type=[NamedElement|QualifiedName])? | ||
1140 | public Group getGroup() { return cGroup; } | ||
1141 | |||
1142 | //UnaryExpression | ||
1143 | public RuleCall getUnaryExpressionParserRuleCall_0() { return cUnaryExpressionParserRuleCall_0; } | ||
1144 | |||
1145 | //({CastExpression.body=current} "as" type=[NamedElement|QualifiedName])? | ||
1146 | public Group getGroup_1() { return cGroup_1; } | ||
1147 | |||
1148 | //{CastExpression.body=current} | ||
1149 | public Action getCastExpressionBodyAction_1_0() { return cCastExpressionBodyAction_1_0; } | ||
1150 | |||
1151 | //"as" | ||
1152 | public Keyword getAsKeyword_1_1() { return cAsKeyword_1_1; } | ||
1153 | |||
1154 | //type=[NamedElement|QualifiedName] | ||
1155 | public Assignment getTypeAssignment_1_2() { return cTypeAssignment_1_2; } | ||
1156 | |||
1157 | //[NamedElement|QualifiedName] | ||
1158 | public CrossReference getTypeNamedElementCrossReference_1_2_0() { return cTypeNamedElementCrossReference_1_2_0; } | ||
1159 | |||
1160 | //QualifiedName | ||
1161 | public RuleCall getTypeNamedElementQualifiedNameParserRuleCall_1_2_0_1() { return cTypeNamedElementQualifiedNameParserRuleCall_1_2_0_1; } | ||
811 | } | 1162 | } |
812 | public class UnaryExpressionElements extends AbstractParserRuleElementFinder { | 1163 | public class UnaryExpressionElements extends AbstractParserRuleElementFinder { |
813 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.UnaryExpression"); | 1164 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.UnaryExpression"); |
@@ -852,99 +1203,178 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
852 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.AggregationExpression"); | 1203 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.AggregationExpression"); |
853 | private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); | 1204 | private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); |
854 | private final RuleCall cAtomicExpressionParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); | 1205 | private final RuleCall cAtomicExpressionParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); |
855 | private final RuleCall cCountParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); | 1206 | private final RuleCall cQuantifiedExpressionParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); |
856 | private final RuleCall cAggregationParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); | 1207 | private final RuleCall cAggregationParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); |
857 | 1208 | ||
858 | //AggregationExpression Expression: | 1209 | //AggregationExpression Expression: |
859 | // AtomicExpression | Count | Aggregation; | 1210 | // AtomicExpression | QuantifiedExpression | Aggregation; |
860 | @Override public ParserRule getRule() { return rule; } | 1211 | @Override public ParserRule getRule() { return rule; } |
861 | 1212 | ||
862 | //AtomicExpression | Count | Aggregation | 1213 | //AtomicExpression | QuantifiedExpression | Aggregation |
863 | public Alternatives getAlternatives() { return cAlternatives; } | 1214 | public Alternatives getAlternatives() { return cAlternatives; } |
864 | 1215 | ||
865 | //AtomicExpression | 1216 | //AtomicExpression |
866 | public RuleCall getAtomicExpressionParserRuleCall_0() { return cAtomicExpressionParserRuleCall_0; } | 1217 | public RuleCall getAtomicExpressionParserRuleCall_0() { return cAtomicExpressionParserRuleCall_0; } |
867 | 1218 | ||
868 | //Count | 1219 | //QuantifiedExpression |
869 | public RuleCall getCountParserRuleCall_1() { return cCountParserRuleCall_1; } | 1220 | public RuleCall getQuantifiedExpressionParserRuleCall_1() { return cQuantifiedExpressionParserRuleCall_1; } |
870 | 1221 | ||
871 | //Aggregation | 1222 | //Aggregation |
872 | public RuleCall getAggregationParserRuleCall_2() { return cAggregationParserRuleCall_2; } | 1223 | public RuleCall getAggregationParserRuleCall_2() { return cAggregationParserRuleCall_2; } |
873 | } | 1224 | } |
874 | public class CountElements extends AbstractParserRuleElementFinder { | 1225 | public class LocalVariablesElements extends AbstractParserRuleElementFinder { |
875 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.Count"); | 1226 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.LocalVariables"); |
876 | private final Group cGroup = (Group)rule.eContents().get(1); | 1227 | private final Group cGroup = (Group)rule.eContents().get(1); |
877 | private final Keyword cCountKeyword_0 = (Keyword)cGroup.eContents().get(0); | 1228 | private final Action cLocalVariablesAction_0 = (Action)cGroup.eContents().get(0); |
878 | private final Keyword cLeftCurlyBracketKeyword_1 = (Keyword)cGroup.eContents().get(1); | 1229 | private final Keyword cLeftSquareBracketKeyword_1 = (Keyword)cGroup.eContents().get(1); |
879 | private final Assignment cBodyAssignment_2 = (Assignment)cGroup.eContents().get(2); | 1230 | private final Group cGroup_2 = (Group)cGroup.eContents().get(2); |
880 | private final RuleCall cBodyExpressionParserRuleCall_2_0 = (RuleCall)cBodyAssignment_2.eContents().get(0); | 1231 | private final Assignment cVariablesAssignment_2_0 = (Assignment)cGroup_2.eContents().get(0); |
881 | private final Keyword cRightCurlyBracketKeyword_3 = (Keyword)cGroup.eContents().get(3); | 1232 | private final RuleCall cVariablesVariableParserRuleCall_2_0_0 = (RuleCall)cVariablesAssignment_2_0.eContents().get(0); |
1233 | private final Group cGroup_2_1 = (Group)cGroup_2.eContents().get(1); | ||
1234 | private final Keyword cCommaKeyword_2_1_0 = (Keyword)cGroup_2_1.eContents().get(0); | ||
1235 | private final Assignment cVariablesAssignment_2_1_1 = (Assignment)cGroup_2_1.eContents().get(1); | ||
1236 | private final RuleCall cVariablesVariableParserRuleCall_2_1_1_0 = (RuleCall)cVariablesAssignment_2_1_1.eContents().get(0); | ||
1237 | private final Keyword cRightSquareBracketKeyword_3 = (Keyword)cGroup.eContents().get(3); | ||
882 | 1238 | ||
883 | //Count: | 1239 | //LocalVariables: |
884 | // "count" "{" body=Expression "}"; | 1240 | // {LocalVariables} "[" (variables+=Variable ("," variables+=Variable)*)? "]"; |
885 | @Override public ParserRule getRule() { return rule; } | 1241 | @Override public ParserRule getRule() { return rule; } |
886 | 1242 | ||
887 | //"count" "{" body=Expression "}" | 1243 | //{LocalVariables} "[" (variables+=Variable ("," variables+=Variable)*)? "]" |
888 | public Group getGroup() { return cGroup; } | 1244 | public Group getGroup() { return cGroup; } |
889 | 1245 | ||
890 | //"count" | 1246 | //{LocalVariables} |
891 | public Keyword getCountKeyword_0() { return cCountKeyword_0; } | 1247 | public Action getLocalVariablesAction_0() { return cLocalVariablesAction_0; } |
1248 | |||
1249 | //"[" | ||
1250 | public Keyword getLeftSquareBracketKeyword_1() { return cLeftSquareBracketKeyword_1; } | ||
1251 | |||
1252 | //(variables+=Variable ("," variables+=Variable)*)? | ||
1253 | public Group getGroup_2() { return cGroup_2; } | ||
1254 | |||
1255 | //variables+=Variable | ||
1256 | public Assignment getVariablesAssignment_2_0() { return cVariablesAssignment_2_0; } | ||
1257 | |||
1258 | //Variable | ||
1259 | public RuleCall getVariablesVariableParserRuleCall_2_0_0() { return cVariablesVariableParserRuleCall_2_0_0; } | ||
1260 | |||
1261 | //("," variables+=Variable)* | ||
1262 | public Group getGroup_2_1() { return cGroup_2_1; } | ||
1263 | |||
1264 | //"," | ||
1265 | public Keyword getCommaKeyword_2_1_0() { return cCommaKeyword_2_1_0; } | ||
1266 | |||
1267 | //variables+=Variable | ||
1268 | public Assignment getVariablesAssignment_2_1_1() { return cVariablesAssignment_2_1_1; } | ||
1269 | |||
1270 | //Variable | ||
1271 | public RuleCall getVariablesVariableParserRuleCall_2_1_1_0() { return cVariablesVariableParserRuleCall_2_1_1_0; } | ||
1272 | |||
1273 | //"]" | ||
1274 | public Keyword getRightSquareBracketKeyword_3() { return cRightSquareBracketKeyword_3; } | ||
1275 | } | ||
1276 | public class QuantifiedExpressionElements extends AbstractParserRuleElementFinder { | ||
1277 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.QuantifiedExpression"); | ||
1278 | private final Group cGroup = (Group)rule.eContents().get(1); | ||
1279 | private final Assignment cQuantifierAssignment_0 = (Assignment)cGroup.eContents().get(0); | ||
1280 | private final RuleCall cQuantifierQuantifierEnumRuleCall_0_0 = (RuleCall)cQuantifierAssignment_0.eContents().get(0); | ||
1281 | private final Assignment cLocalVariablesAssignment_1 = (Assignment)cGroup.eContents().get(1); | ||
1282 | private final RuleCall cLocalVariablesLocalVariablesParserRuleCall_1_0 = (RuleCall)cLocalVariablesAssignment_1.eContents().get(0); | ||
1283 | private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2); | ||
1284 | private final Assignment cBodyAssignment_3 = (Assignment)cGroup.eContents().get(3); | ||
1285 | private final RuleCall cBodyExpressionParserRuleCall_3_0 = (RuleCall)cBodyAssignment_3.eContents().get(0); | ||
1286 | private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4); | ||
1287 | |||
1288 | //QuantifiedExpression: | ||
1289 | // quantifier=Quantifier localVariables=LocalVariables? "{" body=Expression "}"; | ||
1290 | @Override public ParserRule getRule() { return rule; } | ||
1291 | |||
1292 | //quantifier=Quantifier localVariables=LocalVariables? "{" body=Expression "}" | ||
1293 | public Group getGroup() { return cGroup; } | ||
1294 | |||
1295 | //quantifier=Quantifier | ||
1296 | public Assignment getQuantifierAssignment_0() { return cQuantifierAssignment_0; } | ||
1297 | |||
1298 | //Quantifier | ||
1299 | public RuleCall getQuantifierQuantifierEnumRuleCall_0_0() { return cQuantifierQuantifierEnumRuleCall_0_0; } | ||
1300 | |||
1301 | //localVariables=LocalVariables? | ||
1302 | public Assignment getLocalVariablesAssignment_1() { return cLocalVariablesAssignment_1; } | ||
1303 | |||
1304 | //LocalVariables | ||
1305 | public RuleCall getLocalVariablesLocalVariablesParserRuleCall_1_0() { return cLocalVariablesLocalVariablesParserRuleCall_1_0; } | ||
892 | 1306 | ||
893 | //"{" | 1307 | //"{" |
894 | public Keyword getLeftCurlyBracketKeyword_1() { return cLeftCurlyBracketKeyword_1; } | 1308 | public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; } |
895 | 1309 | ||
896 | //body=Expression | 1310 | //body=Expression |
897 | public Assignment getBodyAssignment_2() { return cBodyAssignment_2; } | 1311 | public Assignment getBodyAssignment_3() { return cBodyAssignment_3; } |
898 | 1312 | ||
899 | //Expression | 1313 | //Expression |
900 | public RuleCall getBodyExpressionParserRuleCall_2_0() { return cBodyExpressionParserRuleCall_2_0; } | 1314 | public RuleCall getBodyExpressionParserRuleCall_3_0() { return cBodyExpressionParserRuleCall_3_0; } |
901 | 1315 | ||
902 | //"}" | 1316 | //"}" |
903 | public Keyword getRightCurlyBracketKeyword_3() { return cRightCurlyBracketKeyword_3; } | 1317 | public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; } |
904 | } | 1318 | } |
905 | public class AggregationElements extends AbstractParserRuleElementFinder { | 1319 | public class AggregationElements extends AbstractParserRuleElementFinder { |
906 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.Aggregation"); | 1320 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.Aggregation"); |
907 | private final Group cGroup = (Group)rule.eContents().get(1); | 1321 | private final Group cGroup = (Group)rule.eContents().get(1); |
908 | private final Assignment cOpAssignment_0 = (Assignment)cGroup.eContents().get(0); | 1322 | private final Assignment cOpAssignment_0 = (Assignment)cGroup.eContents().get(0); |
909 | private final RuleCall cOpAggregationOpEnumRuleCall_0_0 = (RuleCall)cOpAssignment_0.eContents().get(0); | 1323 | private final CrossReference cOpNamedElementCrossReference_0_0 = (CrossReference)cOpAssignment_0.eContents().get(0); |
910 | private final Keyword cLeftCurlyBracketKeyword_1 = (Keyword)cGroup.eContents().get(1); | 1324 | private final RuleCall cOpNamedElementQualifiedNameParserRuleCall_0_0_1 = (RuleCall)cOpNamedElementCrossReference_0_0.eContents().get(1); |
911 | private final Assignment cBodyAssignment_2 = (Assignment)cGroup.eContents().get(2); | 1325 | private final Assignment cLocalVariablesAssignment_1 = (Assignment)cGroup.eContents().get(1); |
912 | private final RuleCall cBodyExpressionParserRuleCall_2_0 = (RuleCall)cBodyAssignment_2.eContents().get(0); | 1326 | private final RuleCall cLocalVariablesLocalVariablesParserRuleCall_1_0 = (RuleCall)cLocalVariablesAssignment_1.eContents().get(0); |
913 | private final Keyword cVerticalLineKeyword_3 = (Keyword)cGroup.eContents().get(3); | 1327 | private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2); |
914 | private final Assignment cConditionAssignment_4 = (Assignment)cGroup.eContents().get(4); | 1328 | private final Assignment cBodyAssignment_3 = (Assignment)cGroup.eContents().get(3); |
915 | private final RuleCall cConditionExpressionParserRuleCall_4_0 = (RuleCall)cConditionAssignment_4.eContents().get(0); | 1329 | private final RuleCall cBodyExpressionParserRuleCall_3_0 = (RuleCall)cBodyAssignment_3.eContents().get(0); |
1330 | private final Group cGroup_4 = (Group)cGroup.eContents().get(4); | ||
1331 | private final Keyword cVerticalLineKeyword_4_0 = (Keyword)cGroup_4.eContents().get(0); | ||
1332 | private final Assignment cConditionAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1); | ||
1333 | private final RuleCall cConditionExpressionParserRuleCall_4_1_0 = (RuleCall)cConditionAssignment_4_1.eContents().get(0); | ||
916 | private final Keyword cRightCurlyBracketKeyword_5 = (Keyword)cGroup.eContents().get(5); | 1334 | private final Keyword cRightCurlyBracketKeyword_5 = (Keyword)cGroup.eContents().get(5); |
917 | 1335 | ||
918 | //Aggregation: | 1336 | //Aggregation: |
919 | // op=AggregationOp "{" body=Expression "|" condition=Expression "}"; | 1337 | // op=[NamedElement|QualifiedName] localVariables=LocalVariables? "{" body=Expression ("|" condition=Expression)? "}"; |
920 | @Override public ParserRule getRule() { return rule; } | 1338 | @Override public ParserRule getRule() { return rule; } |
921 | 1339 | ||
922 | //op=AggregationOp "{" body=Expression "|" condition=Expression "}" | 1340 | //op=[NamedElement|QualifiedName] localVariables=LocalVariables? "{" body=Expression ("|" condition=Expression)? "}" |
923 | public Group getGroup() { return cGroup; } | 1341 | public Group getGroup() { return cGroup; } |
924 | 1342 | ||
925 | //op=AggregationOp | 1343 | //op=[NamedElement|QualifiedName] |
926 | public Assignment getOpAssignment_0() { return cOpAssignment_0; } | 1344 | public Assignment getOpAssignment_0() { return cOpAssignment_0; } |
927 | 1345 | ||
928 | //AggregationOp | 1346 | //[NamedElement|QualifiedName] |
929 | public RuleCall getOpAggregationOpEnumRuleCall_0_0() { return cOpAggregationOpEnumRuleCall_0_0; } | 1347 | public CrossReference getOpNamedElementCrossReference_0_0() { return cOpNamedElementCrossReference_0_0; } |
1348 | |||
1349 | //QualifiedName | ||
1350 | public RuleCall getOpNamedElementQualifiedNameParserRuleCall_0_0_1() { return cOpNamedElementQualifiedNameParserRuleCall_0_0_1; } | ||
1351 | |||
1352 | //localVariables=LocalVariables? | ||
1353 | public Assignment getLocalVariablesAssignment_1() { return cLocalVariablesAssignment_1; } | ||
1354 | |||
1355 | //LocalVariables | ||
1356 | public RuleCall getLocalVariablesLocalVariablesParserRuleCall_1_0() { return cLocalVariablesLocalVariablesParserRuleCall_1_0; } | ||
930 | 1357 | ||
931 | //"{" | 1358 | //"{" |
932 | public Keyword getLeftCurlyBracketKeyword_1() { return cLeftCurlyBracketKeyword_1; } | 1359 | public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; } |
933 | 1360 | ||
934 | //body=Expression | 1361 | //body=Expression |
935 | public Assignment getBodyAssignment_2() { return cBodyAssignment_2; } | 1362 | public Assignment getBodyAssignment_3() { return cBodyAssignment_3; } |
936 | 1363 | ||
937 | //Expression | 1364 | //Expression |
938 | public RuleCall getBodyExpressionParserRuleCall_2_0() { return cBodyExpressionParserRuleCall_2_0; } | 1365 | public RuleCall getBodyExpressionParserRuleCall_3_0() { return cBodyExpressionParserRuleCall_3_0; } |
1366 | |||
1367 | //("|" condition=Expression)? | ||
1368 | public Group getGroup_4() { return cGroup_4; } | ||
939 | 1369 | ||
940 | //"|" | 1370 | //"|" |
941 | public Keyword getVerticalLineKeyword_3() { return cVerticalLineKeyword_3; } | 1371 | public Keyword getVerticalLineKeyword_4_0() { return cVerticalLineKeyword_4_0; } |
942 | 1372 | ||
943 | //condition=Expression | 1373 | //condition=Expression |
944 | public Assignment getConditionAssignment_4() { return cConditionAssignment_4; } | 1374 | public Assignment getConditionAssignment_4_1() { return cConditionAssignment_4_1; } |
945 | 1375 | ||
946 | //Expression | 1376 | //Expression |
947 | public RuleCall getConditionExpressionParserRuleCall_4_0() { return cConditionExpressionParserRuleCall_4_0; } | 1377 | public RuleCall getConditionExpressionParserRuleCall_4_1_0() { return cConditionExpressionParserRuleCall_4_1_0; } |
948 | 1378 | ||
949 | //"}" | 1379 | //"}" |
950 | public Keyword getRightCurlyBracketKeyword_5() { return cRightCurlyBracketKeyword_5; } | 1380 | public Keyword getRightCurlyBracketKeyword_5() { return cRightCurlyBracketKeyword_5; } |
@@ -2018,155 +2448,21 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2018 | //QUOTED_ID | 2448 | //QUOTED_ID |
2019 | public RuleCall getQUOTED_IDTerminalRuleCall_1() { return cQUOTED_IDTerminalRuleCall_1; } | 2449 | public RuleCall getQUOTED_IDTerminalRuleCall_1() { return cQUOTED_IDTerminalRuleCall_1; } |
2020 | } | 2450 | } |
2021 | public class NamedElementElements extends AbstractParserRuleElementFinder { | ||
2022 | private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.NamedElement"); | ||
2023 | private final Assignment cNameAssignment = (Assignment)rule.eContents().get(1); | ||
2024 | private final RuleCall cNameQualifiedNameParserRuleCall_0 = (RuleCall)cNameAssignment.eContents().get(0); | ||
2025 | |||
2026 | //NamedElement: | ||
2027 | // name=QualifiedName; | ||
2028 | @Override public ParserRule getRule() { return rule; } | ||
2029 | |||
2030 | //name=QualifiedName | ||
2031 | public Assignment getNameAssignment() { return cNameAssignment; } | ||
2032 | |||
2033 | //QualifiedName | ||
2034 | public RuleCall getNameQualifiedNameParserRuleCall_0() { return cNameQualifiedNameParserRuleCall_0; } | ||
2035 | } | ||
2036 | 2451 | ||
2037 | public class MetricTypeElements extends AbstractEnumRuleElementFinder { | 2452 | public class ImplicationOperatorElements extends AbstractEnumRuleElementFinder { |
2038 | private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.MetricType"); | 2453 | private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ImplicationOperator"); |
2039 | private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); | 2454 | private final EnumLiteralDeclaration cIMPLIESEnumLiteralDeclaration = (EnumLiteralDeclaration)rule.eContents().get(1); |
2040 | private final EnumLiteralDeclaration cINTEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0); | 2455 | private final Keyword cIMPLIESEqualsSignGreaterThanSignKeyword_0 = (Keyword)cIMPLIESEnumLiteralDeclaration.eContents().get(0); |
2041 | private final Keyword cINTIntKeyword_0_0 = (Keyword)cINTEnumLiteralDeclaration_0.eContents().get(0); | ||
2042 | private final EnumLiteralDeclaration cREALEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1); | ||
2043 | private final Keyword cREALRealKeyword_1_0 = (Keyword)cREALEnumLiteralDeclaration_1.eContents().get(0); | ||
2044 | 2456 | ||
2045 | //enum MetricType: | 2457 | //enum ImplicationOperator returns BinaryOperator: |
2046 | // INT="int" | REAL="real"; | 2458 | // IMPLIES="=>"; |
2047 | public EnumRule getRule() { return rule; } | 2459 | public EnumRule getRule() { return rule; } |
2048 | 2460 | ||
2049 | //INT="int" | REAL="real" | 2461 | //IMPLIES="=>" |
2050 | public Alternatives getAlternatives() { return cAlternatives; } | 2462 | public EnumLiteralDeclaration getIMPLIESEnumLiteralDeclaration() { return cIMPLIESEnumLiteralDeclaration; } |
2051 | |||
2052 | //INT="int" | ||
2053 | public EnumLiteralDeclaration getINTEnumLiteralDeclaration_0() { return cINTEnumLiteralDeclaration_0; } | ||
2054 | |||
2055 | //"int" | ||
2056 | public Keyword getINTIntKeyword_0_0() { return cINTIntKeyword_0_0; } | ||
2057 | 2463 | ||
2058 | //REAL="real" | 2464 | //"=>" |
2059 | public EnumLiteralDeclaration getREALEnumLiteralDeclaration_1() { return cREALEnumLiteralDeclaration_1; } | 2465 | public Keyword getIMPLIESEqualsSignGreaterThanSignKeyword_0() { return cIMPLIESEqualsSignGreaterThanSignKeyword_0; } |
2060 | |||
2061 | //"real" | ||
2062 | public Keyword getREALRealKeyword_1_0() { return cREALRealKeyword_1_0; } | ||
2063 | } | ||
2064 | public class BinaryOperatorElements extends AbstractEnumRuleElementFinder { | ||
2065 | private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.BinaryOperator"); | ||
2066 | private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); | ||
2067 | private final EnumLiteralDeclaration cEQEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0); | ||
2068 | private final Keyword cEQEQKeyword_0_0 = (Keyword)cEQEnumLiteralDeclaration_0.eContents().get(0); | ||
2069 | private final EnumLiteralDeclaration cNOT_EQEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1); | ||
2070 | private final Keyword cNOT_EQNOT_EQKeyword_1_0 = (Keyword)cNOT_EQEnumLiteralDeclaration_1.eContents().get(0); | ||
2071 | private final EnumLiteralDeclaration cLESSEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2); | ||
2072 | private final Keyword cLESSLESSKeyword_2_0 = (Keyword)cLESSEnumLiteralDeclaration_2.eContents().get(0); | ||
2073 | private final EnumLiteralDeclaration cLESS_EQEnumLiteralDeclaration_3 = (EnumLiteralDeclaration)cAlternatives.eContents().get(3); | ||
2074 | private final Keyword cLESS_EQLESS_EQKeyword_3_0 = (Keyword)cLESS_EQEnumLiteralDeclaration_3.eContents().get(0); | ||
2075 | private final EnumLiteralDeclaration cGREATEREnumLiteralDeclaration_4 = (EnumLiteralDeclaration)cAlternatives.eContents().get(4); | ||
2076 | private final Keyword cGREATERGREATERKeyword_4_0 = (Keyword)cGREATEREnumLiteralDeclaration_4.eContents().get(0); | ||
2077 | private final EnumLiteralDeclaration cGREATER_EQEnumLiteralDeclaration_5 = (EnumLiteralDeclaration)cAlternatives.eContents().get(5); | ||
2078 | private final Keyword cGREATER_EQGREATER_EQKeyword_5_0 = (Keyword)cGREATER_EQEnumLiteralDeclaration_5.eContents().get(0); | ||
2079 | private final EnumLiteralDeclaration cINEnumLiteralDeclaration_6 = (EnumLiteralDeclaration)cAlternatives.eContents().get(6); | ||
2080 | private final Keyword cININKeyword_6_0 = (Keyword)cINEnumLiteralDeclaration_6.eContents().get(0); | ||
2081 | private final EnumLiteralDeclaration cADDEnumLiteralDeclaration_7 = (EnumLiteralDeclaration)cAlternatives.eContents().get(7); | ||
2082 | private final Keyword cADDADDKeyword_7_0 = (Keyword)cADDEnumLiteralDeclaration_7.eContents().get(0); | ||
2083 | private final EnumLiteralDeclaration cSUBEnumLiteralDeclaration_8 = (EnumLiteralDeclaration)cAlternatives.eContents().get(8); | ||
2084 | private final Keyword cSUBSUBKeyword_8_0 = (Keyword)cSUBEnumLiteralDeclaration_8.eContents().get(0); | ||
2085 | private final EnumLiteralDeclaration cMULEnumLiteralDeclaration_9 = (EnumLiteralDeclaration)cAlternatives.eContents().get(9); | ||
2086 | private final Keyword cMULMULKeyword_9_0 = (Keyword)cMULEnumLiteralDeclaration_9.eContents().get(0); | ||
2087 | private final EnumLiteralDeclaration cDIVEnumLiteralDeclaration_10 = (EnumLiteralDeclaration)cAlternatives.eContents().get(10); | ||
2088 | private final Keyword cDIVDIVKeyword_10_0 = (Keyword)cDIVEnumLiteralDeclaration_10.eContents().get(0); | ||
2089 | private final EnumLiteralDeclaration cPOWEnumLiteralDeclaration_11 = (EnumLiteralDeclaration)cAlternatives.eContents().get(11); | ||
2090 | private final Keyword cPOWPOWKeyword_11_0 = (Keyword)cPOWEnumLiteralDeclaration_11.eContents().get(0); | ||
2091 | |||
2092 | //enum BinaryOperator: | ||
2093 | // EQ | NOT_EQ | LESS | LESS_EQ | GREATER | GREATER_EQ | IN | ADD | SUB | MUL | DIV | POW; | ||
2094 | public EnumRule getRule() { return rule; } | ||
2095 | |||
2096 | //EQ | NOT_EQ | LESS | LESS_EQ | GREATER | GREATER_EQ | IN | ADD | SUB | MUL | DIV | POW | ||
2097 | public Alternatives getAlternatives() { return cAlternatives; } | ||
2098 | |||
2099 | //EQ | ||
2100 | public EnumLiteralDeclaration getEQEnumLiteralDeclaration_0() { return cEQEnumLiteralDeclaration_0; } | ||
2101 | |||
2102 | //"EQ" | ||
2103 | public Keyword getEQEQKeyword_0_0() { return cEQEQKeyword_0_0; } | ||
2104 | |||
2105 | //NOT_EQ | ||
2106 | public EnumLiteralDeclaration getNOT_EQEnumLiteralDeclaration_1() { return cNOT_EQEnumLiteralDeclaration_1; } | ||
2107 | |||
2108 | //"NOT_EQ" | ||
2109 | public Keyword getNOT_EQNOT_EQKeyword_1_0() { return cNOT_EQNOT_EQKeyword_1_0; } | ||
2110 | |||
2111 | //LESS | ||
2112 | public EnumLiteralDeclaration getLESSEnumLiteralDeclaration_2() { return cLESSEnumLiteralDeclaration_2; } | ||
2113 | |||
2114 | //"LESS" | ||
2115 | public Keyword getLESSLESSKeyword_2_0() { return cLESSLESSKeyword_2_0; } | ||
2116 | |||
2117 | //LESS_EQ | ||
2118 | public EnumLiteralDeclaration getLESS_EQEnumLiteralDeclaration_3() { return cLESS_EQEnumLiteralDeclaration_3; } | ||
2119 | |||
2120 | //"LESS_EQ" | ||
2121 | public Keyword getLESS_EQLESS_EQKeyword_3_0() { return cLESS_EQLESS_EQKeyword_3_0; } | ||
2122 | |||
2123 | //GREATER | ||
2124 | public EnumLiteralDeclaration getGREATEREnumLiteralDeclaration_4() { return cGREATEREnumLiteralDeclaration_4; } | ||
2125 | |||
2126 | //"GREATER" | ||
2127 | public Keyword getGREATERGREATERKeyword_4_0() { return cGREATERGREATERKeyword_4_0; } | ||
2128 | |||
2129 | //GREATER_EQ | ||
2130 | public EnumLiteralDeclaration getGREATER_EQEnumLiteralDeclaration_5() { return cGREATER_EQEnumLiteralDeclaration_5; } | ||
2131 | |||
2132 | //"GREATER_EQ" | ||
2133 | public Keyword getGREATER_EQGREATER_EQKeyword_5_0() { return cGREATER_EQGREATER_EQKeyword_5_0; } | ||
2134 | |||
2135 | //IN | ||
2136 | public EnumLiteralDeclaration getINEnumLiteralDeclaration_6() { return cINEnumLiteralDeclaration_6; } | ||
2137 | |||
2138 | //"IN" | ||
2139 | public Keyword getININKeyword_6_0() { return cININKeyword_6_0; } | ||
2140 | |||
2141 | //ADD | ||
2142 | public EnumLiteralDeclaration getADDEnumLiteralDeclaration_7() { return cADDEnumLiteralDeclaration_7; } | ||
2143 | |||
2144 | //"ADD" | ||
2145 | public Keyword getADDADDKeyword_7_0() { return cADDADDKeyword_7_0; } | ||
2146 | |||
2147 | //SUB | ||
2148 | public EnumLiteralDeclaration getSUBEnumLiteralDeclaration_8() { return cSUBEnumLiteralDeclaration_8; } | ||
2149 | |||
2150 | //"SUB" | ||
2151 | public Keyword getSUBSUBKeyword_8_0() { return cSUBSUBKeyword_8_0; } | ||
2152 | |||
2153 | //MUL | ||
2154 | public EnumLiteralDeclaration getMULEnumLiteralDeclaration_9() { return cMULEnumLiteralDeclaration_9; } | ||
2155 | |||
2156 | //"MUL" | ||
2157 | public Keyword getMULMULKeyword_9_0() { return cMULMULKeyword_9_0; } | ||
2158 | |||
2159 | //DIV | ||
2160 | public EnumLiteralDeclaration getDIVEnumLiteralDeclaration_10() { return cDIVEnumLiteralDeclaration_10; } | ||
2161 | |||
2162 | //"DIV" | ||
2163 | public Keyword getDIVDIVKeyword_10_0() { return cDIVDIVKeyword_10_0; } | ||
2164 | |||
2165 | //POW | ||
2166 | public EnumLiteralDeclaration getPOWEnumLiteralDeclaration_11() { return cPOWEnumLiteralDeclaration_11; } | ||
2167 | |||
2168 | //"POW" | ||
2169 | public Keyword getPOWPOWKeyword_11_0() { return cPOWPOWKeyword_11_0; } | ||
2170 | } | 2466 | } |
2171 | public class ComparisonOperatorElements extends AbstractEnumRuleElementFinder { | 2467 | public class ComparisonOperatorElements extends AbstractEnumRuleElementFinder { |
2172 | private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonOperator"); | 2468 | private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonOperator"); |
@@ -2363,64 +2659,40 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2363 | //"current" | 2659 | //"current" |
2364 | public Keyword getCURRENTCurrentKeyword_5_0() { return cCURRENTCurrentKeyword_5_0; } | 2660 | public Keyword getCURRENTCurrentKeyword_5_0() { return cCURRENTCurrentKeyword_5_0; } |
2365 | } | 2661 | } |
2366 | public class AggregationOpElements extends AbstractEnumRuleElementFinder { | 2662 | public class QuantifierElements extends AbstractEnumRuleElementFinder { |
2367 | private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.AggregationOp"); | 2663 | private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.Quantifier"); |
2368 | private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); | 2664 | private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); |
2369 | private final EnumLiteralDeclaration cONLYEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0); | 2665 | private final EnumLiteralDeclaration cEXISTSEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0); |
2370 | private final Keyword cONLYOnlyKeyword_0_0 = (Keyword)cONLYEnumLiteralDeclaration_0.eContents().get(0); | 2666 | private final Keyword cEXISTSExistsKeyword_0_0 = (Keyword)cEXISTSEnumLiteralDeclaration_0.eContents().get(0); |
2371 | private final EnumLiteralDeclaration cSUMEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1); | 2667 | private final EnumLiteralDeclaration cFORALLEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1); |
2372 | private final Keyword cSUMSumKeyword_1_0 = (Keyword)cSUMEnumLiteralDeclaration_1.eContents().get(0); | 2668 | private final Keyword cFORALLForallKeyword_1_0 = (Keyword)cFORALLEnumLiteralDeclaration_1.eContents().get(0); |
2373 | private final EnumLiteralDeclaration cPRODEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2); | 2669 | private final EnumLiteralDeclaration cCOUNTEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2); |
2374 | private final Keyword cPRODProdKeyword_2_0 = (Keyword)cPRODEnumLiteralDeclaration_2.eContents().get(0); | 2670 | private final Keyword cCOUNTCountKeyword_2_0 = (Keyword)cCOUNTEnumLiteralDeclaration_2.eContents().get(0); |
2375 | private final EnumLiteralDeclaration cAVGEnumLiteralDeclaration_3 = (EnumLiteralDeclaration)cAlternatives.eContents().get(3); | 2671 | |
2376 | private final Keyword cAVGAvgKeyword_3_0 = (Keyword)cAVGEnumLiteralDeclaration_3.eContents().get(0); | 2672 | //enum Quantifier: |
2377 | private final EnumLiteralDeclaration cMINEnumLiteralDeclaration_4 = (EnumLiteralDeclaration)cAlternatives.eContents().get(4); | 2673 | // EXISTS="exists" | FORALL="forall" | COUNT="count"; |
2378 | private final Keyword cMINMinKeyword_4_0 = (Keyword)cMINEnumLiteralDeclaration_4.eContents().get(0); | ||
2379 | private final EnumLiteralDeclaration cMAXEnumLiteralDeclaration_5 = (EnumLiteralDeclaration)cAlternatives.eContents().get(5); | ||
2380 | private final Keyword cMAXMaxKeyword_5_0 = (Keyword)cMAXEnumLiteralDeclaration_5.eContents().get(0); | ||
2381 | |||
2382 | //enum AggregationOp: | ||
2383 | // ONLY="only" | SUM="sum" | PROD="prod" | AVG="avg" | MIN="min" | MAX="max"; | ||
2384 | public EnumRule getRule() { return rule; } | 2674 | public EnumRule getRule() { return rule; } |
2385 | 2675 | ||
2386 | //ONLY="only" | SUM="sum" | PROD="prod" | AVG="avg" | MIN="min" | MAX="max" | 2676 | //EXISTS="exists" | FORALL="forall" | COUNT="count" |
2387 | public Alternatives getAlternatives() { return cAlternatives; } | 2677 | public Alternatives getAlternatives() { return cAlternatives; } |
2388 | 2678 | ||
2389 | //ONLY="only" | 2679 | //EXISTS="exists" |
2390 | public EnumLiteralDeclaration getONLYEnumLiteralDeclaration_0() { return cONLYEnumLiteralDeclaration_0; } | 2680 | public EnumLiteralDeclaration getEXISTSEnumLiteralDeclaration_0() { return cEXISTSEnumLiteralDeclaration_0; } |
2391 | |||
2392 | //"only" | ||
2393 | public Keyword getONLYOnlyKeyword_0_0() { return cONLYOnlyKeyword_0_0; } | ||
2394 | 2681 | ||
2395 | //SUM="sum" | 2682 | //"exists" |
2396 | public EnumLiteralDeclaration getSUMEnumLiteralDeclaration_1() { return cSUMEnumLiteralDeclaration_1; } | 2683 | public Keyword getEXISTSExistsKeyword_0_0() { return cEXISTSExistsKeyword_0_0; } |
2397 | 2684 | ||
2398 | //"sum" | 2685 | //FORALL="forall" |
2399 | public Keyword getSUMSumKeyword_1_0() { return cSUMSumKeyword_1_0; } | 2686 | public EnumLiteralDeclaration getFORALLEnumLiteralDeclaration_1() { return cFORALLEnumLiteralDeclaration_1; } |
2400 | 2687 | ||
2401 | //PROD="prod" | 2688 | //"forall" |
2402 | public EnumLiteralDeclaration getPRODEnumLiteralDeclaration_2() { return cPRODEnumLiteralDeclaration_2; } | 2689 | public Keyword getFORALLForallKeyword_1_0() { return cFORALLForallKeyword_1_0; } |
2403 | 2690 | ||
2404 | //"prod" | 2691 | //COUNT="count" |
2405 | public Keyword getPRODProdKeyword_2_0() { return cPRODProdKeyword_2_0; } | 2692 | public EnumLiteralDeclaration getCOUNTEnumLiteralDeclaration_2() { return cCOUNTEnumLiteralDeclaration_2; } |
2406 | 2693 | ||
2407 | //AVG="avg" | 2694 | //"count" |
2408 | public EnumLiteralDeclaration getAVGEnumLiteralDeclaration_3() { return cAVGEnumLiteralDeclaration_3; } | 2695 | public Keyword getCOUNTCountKeyword_2_0() { return cCOUNTCountKeyword_2_0; } |
2409 | |||
2410 | //"avg" | ||
2411 | public Keyword getAVGAvgKeyword_3_0() { return cAVGAvgKeyword_3_0; } | ||
2412 | |||
2413 | //MIN="min" | ||
2414 | public EnumLiteralDeclaration getMINEnumLiteralDeclaration_4() { return cMINEnumLiteralDeclaration_4; } | ||
2415 | |||
2416 | //"min" | ||
2417 | public Keyword getMINMinKeyword_4_0() { return cMINMinKeyword_4_0; } | ||
2418 | |||
2419 | //MAX="max" | ||
2420 | public EnumLiteralDeclaration getMAXEnumLiteralDeclaration_5() { return cMAXEnumLiteralDeclaration_5; } | ||
2421 | |||
2422 | //"max" | ||
2423 | public Keyword getMAXMaxKeyword_5_0() { return cMAXMaxKeyword_5_0; } | ||
2424 | } | 2696 | } |
2425 | public class LogicValueElements extends AbstractEnumRuleElementFinder { | 2697 | public class LogicValueElements extends AbstractEnumRuleElementFinder { |
2426 | private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.LogicValue"); | 2698 | private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.LogicValue"); |
@@ -2499,16 +2771,21 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2499 | private final PredicateDefinitionElements pPredicateDefinition; | 2771 | private final PredicateDefinitionElements pPredicateDefinition; |
2500 | private final UnnamedErrorPrediateDefinitionElements pUnnamedErrorPrediateDefinition; | 2772 | private final UnnamedErrorPrediateDefinitionElements pUnnamedErrorPrediateDefinition; |
2501 | private final DefaultDefinitionElements pDefaultDefinition; | 2773 | private final DefaultDefinitionElements pDefaultDefinition; |
2502 | private final ExternPredicateDefinitionElements pExternPredicateDefinition; | ||
2503 | private final MetricTypeElements eMetricType; | ||
2504 | private final MetricDefinitionElements pMetricDefinition; | 2774 | private final MetricDefinitionElements pMetricDefinition; |
2775 | private final ExternPredicateDefinitionElements pExternPredicateDefinition; | ||
2505 | private final ExternMetricDefinitionElements pExternMetricDefinition; | 2776 | private final ExternMetricDefinitionElements pExternMetricDefinition; |
2777 | private final ExternAggregatorDefinitionElements pExternAggregatorDefinition; | ||
2778 | private final ExternDatatypeDefinitionElements pExternDatatypeDefinition; | ||
2779 | private final VariableElements pVariable; | ||
2506 | private final ExpressionElements pExpression; | 2780 | private final ExpressionElements pExpression; |
2507 | private final IfElseElements pIfElse; | 2781 | private final IfElseElements pIfElse; |
2782 | private final LetElements pLet; | ||
2783 | private final LetBindingElements pLetBinding; | ||
2784 | private final ImplicationOperatorElements eImplicationOperator; | ||
2785 | private final ImplicationExpressionElements pImplicationExpression; | ||
2508 | private final DisjunctiveExpressionElements pDisjunctiveExpression; | 2786 | private final DisjunctiveExpressionElements pDisjunctiveExpression; |
2509 | private final CaseElements pCase; | 2787 | private final CaseElements pCase; |
2510 | private final ConjunctiveExpressionElements pConjunctiveExpression; | 2788 | private final ConjunctiveExpressionElements pConjunctiveExpression; |
2511 | private final BinaryOperatorElements eBinaryOperator; | ||
2512 | private final ComparisonOperatorElements eComparisonOperator; | 2789 | private final ComparisonOperatorElements eComparisonOperator; |
2513 | private final ComparisonExpressionElements pComparisonExpression; | 2790 | private final ComparisonExpressionElements pComparisonExpression; |
2514 | private final AdditiveBinaryOperatorElements eAdditiveBinaryOperator; | 2791 | private final AdditiveBinaryOperatorElements eAdditiveBinaryOperator; |
@@ -2517,11 +2794,13 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2517 | private final MultiplicativeExpressionElements pMultiplicativeExpression; | 2794 | private final MultiplicativeExpressionElements pMultiplicativeExpression; |
2518 | private final ExponentialOpElements eExponentialOp; | 2795 | private final ExponentialOpElements eExponentialOp; |
2519 | private final ExponentialExpressionElements pExponentialExpression; | 2796 | private final ExponentialExpressionElements pExponentialExpression; |
2797 | private final CastExpressionElements pCastExpression; | ||
2520 | private final UnaryOpElements eUnaryOp; | 2798 | private final UnaryOpElements eUnaryOp; |
2521 | private final UnaryExpressionElements pUnaryExpression; | 2799 | private final UnaryExpressionElements pUnaryExpression; |
2522 | private final AggregationExpressionElements pAggregationExpression; | 2800 | private final AggregationExpressionElements pAggregationExpression; |
2523 | private final CountElements pCount; | 2801 | private final LocalVariablesElements pLocalVariables; |
2524 | private final AggregationOpElements eAggregationOp; | 2802 | private final QuantifierElements eQuantifier; |
2803 | private final QuantifiedExpressionElements pQuantifiedExpression; | ||
2525 | private final AggregationElements pAggregation; | 2804 | private final AggregationElements pAggregation; |
2526 | private final AtomicExpressionElements pAtomicExpression; | 2805 | private final AtomicExpressionElements pAtomicExpression; |
2527 | private final CallElements pCall; | 2806 | private final CallElements pCall; |
@@ -2561,7 +2840,6 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2561 | private final TerminalRule tTRANSITIVE_CLOSURE; | 2840 | private final TerminalRule tTRANSITIVE_CLOSURE; |
2562 | private final TerminalRule tREFLEXIVE_TRANSITIVE_CLOSURE; | 2841 | private final TerminalRule tREFLEXIVE_TRANSITIVE_CLOSURE; |
2563 | private final TerminalRule tFULL_STOP; | 2842 | private final TerminalRule tFULL_STOP; |
2564 | private final NamedElementElements pNamedElement; | ||
2565 | 2843 | ||
2566 | private final Grammar grammar; | 2844 | private final Grammar grammar; |
2567 | 2845 | ||
@@ -2578,16 +2856,21 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2578 | this.pPredicateDefinition = new PredicateDefinitionElements(); | 2856 | this.pPredicateDefinition = new PredicateDefinitionElements(); |
2579 | this.pUnnamedErrorPrediateDefinition = new UnnamedErrorPrediateDefinitionElements(); | 2857 | this.pUnnamedErrorPrediateDefinition = new UnnamedErrorPrediateDefinitionElements(); |
2580 | this.pDefaultDefinition = new DefaultDefinitionElements(); | 2858 | this.pDefaultDefinition = new DefaultDefinitionElements(); |
2581 | this.pExternPredicateDefinition = new ExternPredicateDefinitionElements(); | ||
2582 | this.eMetricType = new MetricTypeElements(); | ||
2583 | this.pMetricDefinition = new MetricDefinitionElements(); | 2859 | this.pMetricDefinition = new MetricDefinitionElements(); |
2860 | this.pExternPredicateDefinition = new ExternPredicateDefinitionElements(); | ||
2584 | this.pExternMetricDefinition = new ExternMetricDefinitionElements(); | 2861 | this.pExternMetricDefinition = new ExternMetricDefinitionElements(); |
2862 | this.pExternAggregatorDefinition = new ExternAggregatorDefinitionElements(); | ||
2863 | this.pExternDatatypeDefinition = new ExternDatatypeDefinitionElements(); | ||
2864 | this.pVariable = new VariableElements(); | ||
2585 | this.pExpression = new ExpressionElements(); | 2865 | this.pExpression = new ExpressionElements(); |
2586 | this.pIfElse = new IfElseElements(); | 2866 | this.pIfElse = new IfElseElements(); |
2867 | this.pLet = new LetElements(); | ||
2868 | this.pLetBinding = new LetBindingElements(); | ||
2869 | this.eImplicationOperator = new ImplicationOperatorElements(); | ||
2870 | this.pImplicationExpression = new ImplicationExpressionElements(); | ||
2587 | this.pDisjunctiveExpression = new DisjunctiveExpressionElements(); | 2871 | this.pDisjunctiveExpression = new DisjunctiveExpressionElements(); |
2588 | this.pCase = new CaseElements(); | 2872 | this.pCase = new CaseElements(); |
2589 | this.pConjunctiveExpression = new ConjunctiveExpressionElements(); | 2873 | this.pConjunctiveExpression = new ConjunctiveExpressionElements(); |
2590 | this.eBinaryOperator = new BinaryOperatorElements(); | ||
2591 | this.eComparisonOperator = new ComparisonOperatorElements(); | 2874 | this.eComparisonOperator = new ComparisonOperatorElements(); |
2592 | this.pComparisonExpression = new ComparisonExpressionElements(); | 2875 | this.pComparisonExpression = new ComparisonExpressionElements(); |
2593 | this.eAdditiveBinaryOperator = new AdditiveBinaryOperatorElements(); | 2876 | this.eAdditiveBinaryOperator = new AdditiveBinaryOperatorElements(); |
@@ -2596,11 +2879,13 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2596 | this.pMultiplicativeExpression = new MultiplicativeExpressionElements(); | 2879 | this.pMultiplicativeExpression = new MultiplicativeExpressionElements(); |
2597 | this.eExponentialOp = new ExponentialOpElements(); | 2880 | this.eExponentialOp = new ExponentialOpElements(); |
2598 | this.pExponentialExpression = new ExponentialExpressionElements(); | 2881 | this.pExponentialExpression = new ExponentialExpressionElements(); |
2882 | this.pCastExpression = new CastExpressionElements(); | ||
2599 | this.eUnaryOp = new UnaryOpElements(); | 2883 | this.eUnaryOp = new UnaryOpElements(); |
2600 | this.pUnaryExpression = new UnaryExpressionElements(); | 2884 | this.pUnaryExpression = new UnaryExpressionElements(); |
2601 | this.pAggregationExpression = new AggregationExpressionElements(); | 2885 | this.pAggregationExpression = new AggregationExpressionElements(); |
2602 | this.pCount = new CountElements(); | 2886 | this.pLocalVariables = new LocalVariablesElements(); |
2603 | this.eAggregationOp = new AggregationOpElements(); | 2887 | this.eQuantifier = new QuantifierElements(); |
2888 | this.pQuantifiedExpression = new QuantifiedExpressionElements(); | ||
2604 | this.pAggregation = new AggregationElements(); | 2889 | this.pAggregation = new AggregationElements(); |
2605 | this.pAtomicExpression = new AtomicExpressionElements(); | 2890 | this.pAtomicExpression = new AtomicExpressionElements(); |
2606 | this.pCall = new CallElements(); | 2891 | this.pCall = new CallElements(); |
@@ -2640,7 +2925,6 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2640 | this.tTRANSITIVE_CLOSURE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.TRANSITIVE_CLOSURE"); | 2925 | this.tTRANSITIVE_CLOSURE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.TRANSITIVE_CLOSURE"); |
2641 | this.tREFLEXIVE_TRANSITIVE_CLOSURE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.REFLEXIVE_TRANSITIVE_CLOSURE"); | 2926 | this.tREFLEXIVE_TRANSITIVE_CLOSURE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.REFLEXIVE_TRANSITIVE_CLOSURE"); |
2642 | this.tFULL_STOP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.FULL_STOP"); | 2927 | this.tFULL_STOP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.SolverLanguage.FULL_STOP"); |
2643 | this.pNamedElement = new NamedElementElements(); | ||
2644 | } | 2928 | } |
2645 | 2929 | ||
2646 | protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { | 2930 | protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { |
@@ -2681,9 +2965,9 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2681 | } | 2965 | } |
2682 | 2966 | ||
2683 | //Statement: | 2967 | //Statement: |
2684 | // (AssertionOrDefinition | PredicateDefinition | UnnamedErrorPrediateDefinition | DefaultDefinition | | 2968 | // (AssertionOrDefinition | PredicateDefinition | UnnamedErrorPrediateDefinition | DefaultDefinition | MetricDefinition |
2685 | // ExternPredicateDefinition | MetricDefinition | ExternMetricDefinition | ClassDefinition | ScopeDefinition | | 2969 | // | ExternPredicateDefinition | ExternMetricDefinition | ExternAggregatorDefinition | ExternDatatypeDefinition | |
2686 | // ObjectiveDefinition) FULL_STOP; | 2970 | // ClassDefinition | ScopeDefinition | ObjectiveDefinition) FULL_STOP; |
2687 | public StatementElements getStatementAccess() { | 2971 | public StatementElements getStatementAccess() { |
2688 | return pStatement; | 2972 | return pStatement; |
2689 | } | 2973 | } |
@@ -2693,8 +2977,8 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2693 | } | 2977 | } |
2694 | 2978 | ||
2695 | //AssertionOrDefinition Statement: | 2979 | //AssertionOrDefinition Statement: |
2696 | // Expression ({Assertion.body=current} (":" range=Expression)? | {PredicateDefinition.head=current} ":-" | 2980 | // Expression ({Interpretation.body=current} ":" range=Expression | {PredicateDefinition.head=current} ":-" |
2697 | // body=Expression | {MetricDefinition.head=current} "=" body=Expression); | 2981 | // body=Expression | {MetricDefinition.head=current} "=" body=Expression)?; |
2698 | public AssertionOrDefinitionElements getAssertionOrDefinitionAccess() { | 2982 | public AssertionOrDefinitionElements getAssertionOrDefinitionAccess() { |
2699 | return pAssertionOrDefinition; | 2983 | return pAssertionOrDefinition; |
2700 | } | 2984 | } |
@@ -2733,8 +3017,18 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2733 | return getDefaultDefinitionAccess().getRule(); | 3017 | return getDefaultDefinitionAccess().getRule(); |
2734 | } | 3018 | } |
2735 | 3019 | ||
3020 | //MetricDefinition: | ||
3021 | // type=[NamedElement|QualifiedName] head=Call "=" body=Expression; | ||
3022 | public MetricDefinitionElements getMetricDefinitionAccess() { | ||
3023 | return pMetricDefinition; | ||
3024 | } | ||
3025 | |||
3026 | public ParserRule getMetricDefinitionRule() { | ||
3027 | return getMetricDefinitionAccess().getRule(); | ||
3028 | } | ||
3029 | |||
2736 | //ExternPredicateDefinition: | 3030 | //ExternPredicateDefinition: |
2737 | // "extern" head=Call; | 3031 | // "extern" name=QualifiedName argumentList=ArgumentList; |
2738 | public ExternPredicateDefinitionElements getExternPredicateDefinitionAccess() { | 3032 | public ExternPredicateDefinitionElements getExternPredicateDefinitionAccess() { |
2739 | return pExternPredicateDefinition; | 3033 | return pExternPredicateDefinition; |
2740 | } | 3034 | } |
@@ -2743,38 +3037,49 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2743 | return getExternPredicateDefinitionAccess().getRule(); | 3037 | return getExternPredicateDefinitionAccess().getRule(); |
2744 | } | 3038 | } |
2745 | 3039 | ||
2746 | //enum MetricType: | 3040 | //ExternMetricDefinition: |
2747 | // INT="int" | REAL="real"; | 3041 | // "extern" type=[NamedElement|QualifiedName] name=QualifiedName argumentList=ArgumentList; |
2748 | public MetricTypeElements getMetricTypeAccess() { | 3042 | public ExternMetricDefinitionElements getExternMetricDefinitionAccess() { |
2749 | return eMetricType; | 3043 | return pExternMetricDefinition; |
2750 | } | 3044 | } |
2751 | 3045 | ||
2752 | public EnumRule getMetricTypeRule() { | 3046 | public ParserRule getExternMetricDefinitionRule() { |
2753 | return getMetricTypeAccess().getRule(); | 3047 | return getExternMetricDefinitionAccess().getRule(); |
2754 | } | 3048 | } |
2755 | 3049 | ||
2756 | //MetricDefinition: | 3050 | //ExternAggregatorDefinition: |
2757 | // type=MetricType head=Expression "=" body=Expression; | 3051 | // "extern" type=[NamedElement|QualifiedName] name=QualifiedName "{" inputType=[NamedElement|QualifiedName] "..." "}"; |
2758 | public MetricDefinitionElements getMetricDefinitionAccess() { | 3052 | public ExternAggregatorDefinitionElements getExternAggregatorDefinitionAccess() { |
2759 | return pMetricDefinition; | 3053 | return pExternAggregatorDefinition; |
2760 | } | 3054 | } |
2761 | 3055 | ||
2762 | public ParserRule getMetricDefinitionRule() { | 3056 | public ParserRule getExternAggregatorDefinitionRule() { |
2763 | return getMetricDefinitionAccess().getRule(); | 3057 | return getExternAggregatorDefinitionAccess().getRule(); |
2764 | } | 3058 | } |
2765 | 3059 | ||
2766 | //ExternMetricDefinition: | 3060 | //ExternDatatypeDefinition: |
2767 | // "extern" type=MetricType head=Call; | 3061 | // "extern" "datatype" name=QualifiedName ("extends" supertypes+=[NamedElement|QualifiedName] ("," |
2768 | public ExternMetricDefinitionElements getExternMetricDefinitionAccess() { | 3062 | // supertypes+=[NamedElement|QualifiedName])*); |
2769 | return pExternMetricDefinition; | 3063 | public ExternDatatypeDefinitionElements getExternDatatypeDefinitionAccess() { |
3064 | return pExternDatatypeDefinition; | ||
2770 | } | 3065 | } |
2771 | 3066 | ||
2772 | public ParserRule getExternMetricDefinitionRule() { | 3067 | public ParserRule getExternDatatypeDefinitionRule() { |
2773 | return getExternMetricDefinitionAccess().getRule(); | 3068 | return getExternDatatypeDefinitionAccess().getRule(); |
3069 | } | ||
3070 | |||
3071 | //Variable: | ||
3072 | // type=[NamedElement|QualifiedName]? name=ID; | ||
3073 | public VariableElements getVariableAccess() { | ||
3074 | return pVariable; | ||
3075 | } | ||
3076 | |||
3077 | public ParserRule getVariableRule() { | ||
3078 | return getVariableAccess().getRule(); | ||
2774 | } | 3079 | } |
2775 | 3080 | ||
2776 | //Expression: | 3081 | //Expression: |
2777 | // IfElse | DisjunctiveExpression; | 3082 | // IfElse | Let | ImplicationExpression; |
2778 | public ExpressionElements getExpressionAccess() { | 3083 | public ExpressionElements getExpressionAccess() { |
2779 | return pExpression; | 3084 | return pExpression; |
2780 | } | 3085 | } |
@@ -2793,6 +3098,46 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2793 | return getIfElseAccess().getRule(); | 3098 | return getIfElseAccess().getRule(); |
2794 | } | 3099 | } |
2795 | 3100 | ||
3101 | //Let: | ||
3102 | // "let" bindings+=LetBinding ("," bindings+=LetBinding)* "in" body=Expression; | ||
3103 | public LetElements getLetAccess() { | ||
3104 | return pLet; | ||
3105 | } | ||
3106 | |||
3107 | public ParserRule getLetRule() { | ||
3108 | return getLetAccess().getRule(); | ||
3109 | } | ||
3110 | |||
3111 | //LetBinding: | ||
3112 | // variable=Variable "=" value=AdditiveExpression; | ||
3113 | public LetBindingElements getLetBindingAccess() { | ||
3114 | return pLetBinding; | ||
3115 | } | ||
3116 | |||
3117 | public ParserRule getLetBindingRule() { | ||
3118 | return getLetBindingAccess().getRule(); | ||
3119 | } | ||
3120 | |||
3121 | //enum ImplicationOperator returns BinaryOperator: | ||
3122 | // IMPLIES="=>"; | ||
3123 | public ImplicationOperatorElements getImplicationOperatorAccess() { | ||
3124 | return eImplicationOperator; | ||
3125 | } | ||
3126 | |||
3127 | public EnumRule getImplicationOperatorRule() { | ||
3128 | return getImplicationOperatorAccess().getRule(); | ||
3129 | } | ||
3130 | |||
3131 | //ImplicationExpression Expression: | ||
3132 | // DisjunctiveExpression ({BinaryExpression.left=current} op=ImplicationOperator right=ImplicationExpression)?; | ||
3133 | public ImplicationExpressionElements getImplicationExpressionAccess() { | ||
3134 | return pImplicationExpression; | ||
3135 | } | ||
3136 | |||
3137 | public ParserRule getImplicationExpressionRule() { | ||
3138 | return getImplicationExpressionAccess().getRule(); | ||
3139 | } | ||
3140 | |||
2796 | //DisjunctiveExpression Expression: | 3141 | //DisjunctiveExpression Expression: |
2797 | // ConjunctiveExpression ({Disjunction.children+=current} (";" children+=ConjunctiveExpression)+ | | 3142 | // ConjunctiveExpression ({Disjunction.children+=current} (";" children+=ConjunctiveExpression)+ | |
2798 | // {Case.condition=current} "->" body=ConjunctiveExpression {Switch.cases+=current} (";" cases+=Case)*)?; | 3143 | // {Case.condition=current} "->" body=ConjunctiveExpression {Switch.cases+=current} (";" cases+=Case)*)?; |
@@ -2824,16 +3169,6 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2824 | return getConjunctiveExpressionAccess().getRule(); | 3169 | return getConjunctiveExpressionAccess().getRule(); |
2825 | } | 3170 | } |
2826 | 3171 | ||
2827 | //enum BinaryOperator: | ||
2828 | // EQ | NOT_EQ | LESS | LESS_EQ | GREATER | GREATER_EQ | IN | ADD | SUB | MUL | DIV | POW; | ||
2829 | public BinaryOperatorElements getBinaryOperatorAccess() { | ||
2830 | return eBinaryOperator; | ||
2831 | } | ||
2832 | |||
2833 | public EnumRule getBinaryOperatorRule() { | ||
2834 | return getBinaryOperatorAccess().getRule(); | ||
2835 | } | ||
2836 | |||
2837 | //enum ComparisonOperator returns BinaryOperator: | 3172 | //enum ComparisonOperator returns BinaryOperator: |
2838 | // EQ="==" | NOT_EQ="!=" | LESS="<" | LESS_EQ="<=" | GREATER=">" | GREATER_EQ=">=" | IN="in"; | 3173 | // EQ="==" | NOT_EQ="!=" | LESS="<" | LESS_EQ="<=" | GREATER=">" | GREATER_EQ=">=" | IN="in"; |
2839 | public ComparisonOperatorElements getComparisonOperatorAccess() { | 3174 | public ComparisonOperatorElements getComparisonOperatorAccess() { |
@@ -2905,7 +3240,7 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2905 | } | 3240 | } |
2906 | 3241 | ||
2907 | //ExponentialExpression Expression: | 3242 | //ExponentialExpression Expression: |
2908 | // UnaryExpression ({BinaryExpression.left=current} op=ExponentialOp right=ExponentialExpression)?; | 3243 | // CastExpression ({BinaryExpression.left=current} op=ExponentialOp right=CastExpression)?; |
2909 | public ExponentialExpressionElements getExponentialExpressionAccess() { | 3244 | public ExponentialExpressionElements getExponentialExpressionAccess() { |
2910 | return pExponentialExpression; | 3245 | return pExponentialExpression; |
2911 | } | 3246 | } |
@@ -2914,6 +3249,16 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2914 | return getExponentialExpressionAccess().getRule(); | 3249 | return getExponentialExpressionAccess().getRule(); |
2915 | } | 3250 | } |
2916 | 3251 | ||
3252 | //CastExpression Expression: | ||
3253 | // UnaryExpression ({CastExpression.body=current} "as" type=[NamedElement|QualifiedName])?; | ||
3254 | public CastExpressionElements getCastExpressionAccess() { | ||
3255 | return pCastExpression; | ||
3256 | } | ||
3257 | |||
3258 | public ParserRule getCastExpressionRule() { | ||
3259 | return getCastExpressionAccess().getRule(); | ||
3260 | } | ||
3261 | |||
2917 | //enum UnaryOp: | 3262 | //enum UnaryOp: |
2918 | // NEG="!" | PLUS="+" | MINUS="-" | MAY="may" | MUST="must" | CURRENT="current"; | 3263 | // NEG="!" | PLUS="+" | MINUS="-" | MAY="may" | MUST="must" | CURRENT="current"; |
2919 | public UnaryOpElements getUnaryOpAccess() { | 3264 | public UnaryOpElements getUnaryOpAccess() { |
@@ -2935,7 +3280,7 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2935 | } | 3280 | } |
2936 | 3281 | ||
2937 | //AggregationExpression Expression: | 3282 | //AggregationExpression Expression: |
2938 | // AtomicExpression | Count | Aggregation; | 3283 | // AtomicExpression | QuantifiedExpression | Aggregation; |
2939 | public AggregationExpressionElements getAggregationExpressionAccess() { | 3284 | public AggregationExpressionElements getAggregationExpressionAccess() { |
2940 | return pAggregationExpression; | 3285 | return pAggregationExpression; |
2941 | } | 3286 | } |
@@ -2944,28 +3289,38 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
2944 | return getAggregationExpressionAccess().getRule(); | 3289 | return getAggregationExpressionAccess().getRule(); |
2945 | } | 3290 | } |
2946 | 3291 | ||
2947 | //Count: | 3292 | //LocalVariables: |
2948 | // "count" "{" body=Expression "}"; | 3293 | // {LocalVariables} "[" (variables+=Variable ("," variables+=Variable)*)? "]"; |
2949 | public CountElements getCountAccess() { | 3294 | public LocalVariablesElements getLocalVariablesAccess() { |
2950 | return pCount; | 3295 | return pLocalVariables; |
3296 | } | ||
3297 | |||
3298 | public ParserRule getLocalVariablesRule() { | ||
3299 | return getLocalVariablesAccess().getRule(); | ||
3300 | } | ||
3301 | |||
3302 | //enum Quantifier: | ||
3303 | // EXISTS="exists" | FORALL="forall" | COUNT="count"; | ||
3304 | public QuantifierElements getQuantifierAccess() { | ||
3305 | return eQuantifier; | ||
2951 | } | 3306 | } |
2952 | 3307 | ||
2953 | public ParserRule getCountRule() { | 3308 | public EnumRule getQuantifierRule() { |
2954 | return getCountAccess().getRule(); | 3309 | return getQuantifierAccess().getRule(); |
2955 | } | 3310 | } |
2956 | 3311 | ||
2957 | //enum AggregationOp: | 3312 | //QuantifiedExpression: |
2958 | // ONLY="only" | SUM="sum" | PROD="prod" | AVG="avg" | MIN="min" | MAX="max"; | 3313 | // quantifier=Quantifier localVariables=LocalVariables? "{" body=Expression "}"; |
2959 | public AggregationOpElements getAggregationOpAccess() { | 3314 | public QuantifiedExpressionElements getQuantifiedExpressionAccess() { |
2960 | return eAggregationOp; | 3315 | return pQuantifiedExpression; |
2961 | } | 3316 | } |
2962 | 3317 | ||
2963 | public EnumRule getAggregationOpRule() { | 3318 | public ParserRule getQuantifiedExpressionRule() { |
2964 | return getAggregationOpAccess().getRule(); | 3319 | return getQuantifiedExpressionAccess().getRule(); |
2965 | } | 3320 | } |
2966 | 3321 | ||
2967 | //Aggregation: | 3322 | //Aggregation: |
2968 | // op=AggregationOp "{" body=Expression "|" condition=Expression "}"; | 3323 | // op=[NamedElement|QualifiedName] localVariables=LocalVariables? "{" body=Expression ("|" condition=Expression)? "}"; |
2969 | public AggregationElements getAggregationAccess() { | 3324 | public AggregationElements getAggregationAccess() { |
2970 | return pAggregation; | 3325 | return pAggregation; |
2971 | } | 3326 | } |
@@ -3338,16 +3693,6 @@ public class SolverLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
3338 | return tFULL_STOP; | 3693 | return tFULL_STOP; |
3339 | } | 3694 | } |
3340 | 3695 | ||
3341 | //NamedElement: | ||
3342 | // name=QualifiedName; | ||
3343 | public NamedElementElements getNamedElementAccess() { | ||
3344 | return pNamedElement; | ||
3345 | } | ||
3346 | |||
3347 | public ParserRule getNamedElementRule() { | ||
3348 | return getNamedElementAccess().getRule(); | ||
3349 | } | ||
3350 | |||
3351 | //terminal ID: | 3696 | //terminal ID: |
3352 | // '^'? ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*; | 3697 | // '^'? ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*; |
3353 | public TerminalRule getIDRule() { | 3698 | public TerminalRule getIDRule() { |