From baba88758a0ea5f671ab4a2aeacec374bed938c4 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 25 Jun 2021 17:12:45 +0200 Subject: Add initial prototype --- .../.gitignore | 1 + org.eclipse.viatra.solver.language.parent/.project | 17 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../build.gradle | 34 + .../gradle/source-layout.gradle | 28 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 55616 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + org.eclipse.viatra.solver.language.parent/gradlew | 188 + .../gradlew.bat | 100 + .../.classpath | 30 + .../.gitignore | 1 + .../.project | 29 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 10 + .../build.gradle | 23 + .../solver/language/ide/ProblemIdeModule.java | 17 + .../solver/language/ide/ProblemIdeSetup.java | 22 + .../ProblemSemanticHighlightingCalculator.java | 138 + .../META-INF/services/org.eclipse.xtext.ISetup | 1 + .../language/ide/AbstractProblemIdeModule.java | 60 + .../antlr/PartialProblemContentAssistParser.java | 33 + .../ide/contentassist/antlr/ProblemParser.java | 165 + .../contentassist/antlr/internal/InternalProblem.g | 4206 ++++++ .../antlr/internal/InternalProblem.tokens | 65 + .../antlr/internal/InternalProblemLexer.java | 1699 +++ .../antlr/internal/InternalProblemParser.java | 12761 +++++++++++++++++++ .../.classpath | 18 + .../.gitignore | 2 + .../.project | 41 + .../META-INF/MANIFEST.MF | 16 + .../build.gradle | 9 + .../build.properties | 10 + .../plugin.properties | 4 + .../plugin.xml | 17 + .../problem.aird | 1756 +++ .../solver/language/model/problem/Assertion.java | 85 + .../viatra/solver/language/model/problem/Atom.java | 82 + .../language/model/problem/ClassDeclaration.java | 72 + .../solver/language/model/problem/Conjunction.java | 36 + .../language/model/problem/ExactMultiplicity.java | 45 + .../model/problem/ExistentialQuantifier.java | 38 + .../language/model/problem/ImplicitVariable.java | 16 + .../solver/language/model/problem/Literal.java | 18 + .../solver/language/model/problem/LogicValue.java | 227 + .../language/model/problem/Multiplicity.java | 18 + .../language/model/problem/NamedElement.java | 46 + .../language/model/problem/NegativeLiteral.java | 44 + .../viatra/solver/language/model/problem/Node.java | 16 + .../solver/language/model/problem/Parameter.java | 44 + .../model/problem/PredicateDefinition.java | 72 + .../solver/language/model/problem/Problem.java | 51 + .../language/model/problem/ProblemFactory.java | 168 + .../language/model/problem/ProblemPackage.java | 2101 +++ .../language/model/problem/RangeMultiplicity.java | 69 + .../model/problem/ReferenceDeclaration.java | 113 + .../solver/language/model/problem/Relation.java | 16 + .../language/model/problem/ScopeDeclaration.java | 36 + .../solver/language/model/problem/Statement.java | 18 + .../solver/language/model/problem/TypeScope.java | 92 + .../solver/language/model/problem/Variable.java | 16 + .../language/model/problem/impl/AssertionImpl.java | 272 + .../language/model/problem/impl/AtomImpl.java | 271 + .../model/problem/impl/ClassDeclarationImpl.java | 260 + .../model/problem/impl/ConjunctionImpl.java | 189 + .../model/problem/impl/ExactMultiplicityImpl.java | 164 + .../model/problem/impl/ImplicitVariableImpl.java | 37 + .../language/model/problem/impl/LiteralImpl.java | 39 + .../model/problem/impl/MultiplicityImpl.java | 39 + .../model/problem/impl/NamedElementImpl.java | 164 + .../model/problem/impl/NegativeLiteralImpl.java | 228 + .../language/model/problem/impl/NodeImpl.java | 37 + .../language/model/problem/impl/ParameterImpl.java | 159 + .../problem/impl/PredicateDefinitionImpl.java | 262 + .../model/problem/impl/ProblemFactoryImpl.java | 317 + .../language/model/problem/impl/ProblemImpl.java | 189 + .../model/problem/impl/ProblemPackageImpl.java | 1061 ++ .../model/problem/impl/RangeMultiplicityImpl.java | 219 + .../problem/impl/ReferenceDeclarationImpl.java | 379 + .../language/model/problem/impl/RelationImpl.java | 37 + .../model/problem/impl/ScopeDeclarationImpl.java | 153 + .../language/model/problem/impl/TypeScopeImpl.java | 317 + .../language/model/problem/impl/VariableImpl.java | 37 + .../model/problem/util/ProblemAdapterFactory.java | 518 + .../language/model/problem/util/ProblemSwitch.java | 620 + .../src/main/resources/model/problem.ecore | 94 + .../src/main/resources/model/problem.genmodel | 87 + .../.classpath | 35 + .../.gitignore | 1 + .../.project | 40 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 10 + .../build.gradle | 35 + .../viatra/solver/language/web/ProblemServlet.java | 36 + .../solver/language/web/ProblemWebModule.java | 11 + .../solver/language/web/ProblemWebSetup.java | 23 + .../viatra/solver/language/web/ServerLauncher.java | 65 + .../src/main/webapp/index.html | 43 + .../src/main/webapp/script.js | 20 + .../src/main/webapp/style.css | 91 + .../xtext-resources/generated/mode-problem.js | 23 + .../language/web/AbstractProblemWebModule.java | 14 + .../org.eclipse.viatra.solver.language/.classpath | 58 + .../org.eclipse.viatra.solver.language/.gitignore | 1 + ...roblem (problem) Language Infrastructure.launch | 14 + .../org.eclipse.viatra.solver.language/.project | 29 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 10 + .../build.gradle | 42 + .../viatra/solver/language/GenerateProblem.mwe2 | 54 + .../eclipse/viatra/solver/language/Problem.xtext | 88 + .../solver/language/ProblemRuntimeModule.java | 86 + .../solver/language/ProblemStandaloneSetup.java | 26 + .../conversion/ProblemValueConverterService.java | 17 + .../conversion/UpperBoundValueConverter.java | 35 + .../language/generator/ProblemGenerator.xtend | 25 + .../naming/ProblemQualifiedNameConverter.java | 13 + .../naming/ProblemQualifiedNameProvider.java | 15 + .../resource/ProblemDerivedStateComputer.java | 218 + .../resource/ProblemLocationInFileProvider.java | 130 + .../ProblemResourceDescriptionStrategy.java | 39 + .../scoping/ProblemGlobalScopeProvider.java | 19 + .../language/scoping/ProblemScopeProvider.java | 74 + .../language/validation/ProblemValidator.java | 25 + .../eclipse/viatra/solver/language/library.problem | 4 + .../language/AbstractProblemRuntimeModule.java | 201 + .../viatra/solver/language/Problem.xtextbin | Bin 0 -> 5210 bytes .../language/ProblemStandaloneSetupGenerated.java | 37 + .../antlr/ProblemAntlrTokenFileProvider.java | 16 + .../language/parser/antlr/ProblemParser.java | 40 + .../parser/antlr/internal/InternalProblem.g | 1522 +++ .../parser/antlr/internal/InternalProblem.tokens | 65 + .../antlr/internal/InternalProblemLexer.java | 1699 +++ .../antlr/internal/InternalProblemParser.java | 4056 ++++++ .../scoping/AbstractProblemScopeProvider.java | 9 + .../serializer/ProblemSemanticSequencer.java | 296 + .../serializer/ProblemSyntacticSequencer.java | 77 + .../language/services/ProblemGrammarAccess.java | 1411 ++ .../validation/AbstractProblemValidator.java | 19 + .../ProblemConfigurableIssueCodesProvider.java | 22 + .../solver/language/tests/ProblemParsingTest.xtend | 30 + .../language/tests/ProblemInjectorProvider.java | 69 + .../settings.gradle | 4 + 142 files changed, 42244 insertions(+) create mode 100644 org.eclipse.viatra.solver.language.parent/.gitignore create mode 100644 org.eclipse.viatra.solver.language.parent/.project create mode 100644 org.eclipse.viatra.solver.language.parent/.settings/org.eclipse.core.resources.prefs create mode 100644 org.eclipse.viatra.solver.language.parent/build.gradle create mode 100644 org.eclipse.viatra.solver.language.parent/gradle/source-layout.gradle create mode 100644 org.eclipse.viatra.solver.language.parent/gradle/wrapper/gradle-wrapper.jar create mode 100644 org.eclipse.viatra.solver.language.parent/gradle/wrapper/gradle-wrapper.properties create mode 100755 org.eclipse.viatra.solver.language.parent/gradlew create mode 100644 org.eclipse.viatra.solver.language.parent/gradlew.bat create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.classpath create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.gitignore create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.project create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.settings/org.eclipse.core.resources.prefs create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/build.gradle create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/ProblemIdeModule.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/ProblemIdeSetup.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/META-INF/services/org.eclipse.xtext.ISetup create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/AbstractProblemIdeModule.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/PartialProblemContentAssistParser.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/ProblemParser.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblem.g create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblem.tokens create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblemLexer.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblemParser.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.classpath create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.gitignore create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.project create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/META-INF/MANIFEST.MF create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/build.gradle create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/build.properties create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/plugin.properties create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/plugin.xml create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/problem.aird create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Assertion.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Atom.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ClassDeclaration.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Conjunction.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ExactMultiplicity.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ExistentialQuantifier.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ImplicitVariable.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Literal.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/LogicValue.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Multiplicity.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/NamedElement.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/NegativeLiteral.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Node.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Parameter.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/PredicateDefinition.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Problem.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ProblemFactory.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ProblemPackage.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/RangeMultiplicity.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ReferenceDeclaration.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Relation.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ScopeDeclaration.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Statement.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/TypeScope.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Variable.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConjunctionImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ExactMultiplicityImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ImplicitVariableImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/LiteralImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/MultiplicityImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NamedElementImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NegativeLiteralImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ParameterImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/PredicateDefinitionImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RangeMultiplicityImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RelationImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ScopeDeclarationImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/TypeScopeImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableImpl.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/util/ProblemAdapterFactory.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/util/ProblemSwitch.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/resources/model/problem.ecore create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/resources/model/problem.genmodel create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.classpath create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.gitignore create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.project create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.settings/org.eclipse.core.resources.prefs create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/build.gradle create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemServlet.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemWebModule.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemWebSetup.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/index.html create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/script.js create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/style.css create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/xtext-resources/generated/mode-problem.js create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/xtext-gen/org/eclipse/viatra/solver/language/web/AbstractProblemWebModule.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.classpath create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.gitignore create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.launch/Generate Problem (problem) Language Infrastructure.launch create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.project create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.settings/org.eclipse.core.resources.prefs create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/build.gradle create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/GenerateProblem.mwe2 create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/Problem.xtext create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemRuntimeModule.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemStandaloneSetup.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/conversion/ProblemValueConverterService.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/conversion/UpperBoundValueConverter.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/generator/ProblemGenerator.xtend create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/naming/ProblemQualifiedNameConverter.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/naming/ProblemQualifiedNameProvider.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemDerivedStateComputer.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemLocationInFileProvider.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemResourceDescriptionStrategy.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemGlobalScopeProvider.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemScopeProvider.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/validation/ProblemValidator.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/resources/org/eclipse/viatra/solver/language/library.problem create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/AbstractProblemRuntimeModule.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/Problem.xtextbin create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/ProblemStandaloneSetupGenerated.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemAntlrTokenFileProvider.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemParser.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.tokens create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemLexer.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemParser.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/scoping/AbstractProblemScopeProvider.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSemanticSequencer.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSyntacticSequencer.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/services/ProblemGrammarAccess.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/validation/AbstractProblemValidator.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/validation/ProblemConfigurableIssueCodesProvider.java create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/test/java/org/eclipse/viatra/solver/language/tests/ProblemParsingTest.xtend create mode 100644 org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/test/xtext-gen/org/eclipse/viatra/solver/language/tests/ProblemInjectorProvider.java create mode 100644 org.eclipse.viatra.solver.language.parent/settings.gradle (limited to 'org.eclipse.viatra.solver.language.parent') diff --git a/org.eclipse.viatra.solver.language.parent/.gitignore b/org.eclipse.viatra.solver.language.parent/.gitignore new file mode 100644 index 00000000..da88288c --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/.gitignore @@ -0,0 +1 @@ +/.gradle/ diff --git a/org.eclipse.viatra.solver.language.parent/.project b/org.eclipse.viatra.solver.language.parent/.project new file mode 100644 index 00000000..21b452ad --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/.project @@ -0,0 +1,17 @@ + + + org.eclipse.viatra.solver.language.parent + + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/org.eclipse.viatra.solver.language.parent/.settings/org.eclipse.core.resources.prefs b/org.eclipse.viatra.solver.language.parent/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.viatra.solver.language.parent/build.gradle b/org.eclipse.viatra.solver.language.parent/build.gradle new file mode 100644 index 00000000..69c33a9d --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/build.gradle @@ -0,0 +1,34 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'org.xtext:xtext-gradle-plugin:2.0.9-alpha.3' + } +} + +subprojects { + ext.xtextVersion = '2.26.0.M1' + repositories { + mavenCentral() + } + + apply plugin: 'java' + dependencies { + compile platform("org.eclipse.xtext:xtext-dev-bom:${xtextVersion}") + } + + apply plugin: 'org.xtext.xtend' + apply from: "${rootDir}/gradle/source-layout.gradle" + apply plugin: 'eclipse' + + group = 'org.eclipse.viatra.solver.language' + version = '1.0.0-SNAPSHOT' + + sourceCompatibility = '11' + targetCompatibility = '11' + + configurations.all { + exclude group: 'asm' + } +} diff --git a/org.eclipse.viatra.solver.language.parent/gradle/source-layout.gradle b/org.eclipse.viatra.solver.language.parent/gradle/source-layout.gradle new file mode 100644 index 00000000..d347fb13 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/gradle/source-layout.gradle @@ -0,0 +1,28 @@ +sourceSets { + main { + java.srcDirs = ['src/main/java', 'src/main/xtext-gen'] + resources.srcDirs = ['src/main/resources', 'src/main/xtext-gen'] + xtendOutputDir = 'src/main/xtend-gen' + } + test { + java.srcDirs = ['src/test/java', 'src/test/xtext-gen'] + resources.srcDirs = ['src/test/resources', 'src/test/xtext-gen'] + xtendOutputDir = 'src/test/xtend-gen' + } +} + +jar { + from('model') { + into('model') + } + from(sourceSets.main.allSource) { + include '**/*.xtext' + } + manifest { + attributes 'Bundle-SymbolicName': project.name + } +} + +plugins.withId('war') { + webAppDirName = "src/main/webapp" +} diff --git a/org.eclipse.viatra.solver.language.parent/gradle/wrapper/gradle-wrapper.jar b/org.eclipse.viatra.solver.language.parent/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..5c2d1cf0 Binary files /dev/null and b/org.eclipse.viatra.solver.language.parent/gradle/wrapper/gradle-wrapper.jar differ diff --git a/org.eclipse.viatra.solver.language.parent/gradle/wrapper/gradle-wrapper.properties b/org.eclipse.viatra.solver.language.parent/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..f04d6a20 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/org.eclipse.viatra.solver.language.parent/gradlew b/org.eclipse.viatra.solver.language.parent/gradlew new file mode 100755 index 00000000..83f2acfd --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/gradlew @@ -0,0 +1,188 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/org.eclipse.viatra.solver.language.parent/gradlew.bat b/org.eclipse.viatra.solver.language.parent/gradlew.bat new file mode 100644 index 00000000..24467a14 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/gradlew.bat @@ -0,0 +1,100 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.classpath b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.classpath new file mode 100644 index 00000000..94600478 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.classpath @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.gitignore b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.gitignore new file mode 100644 index 00000000..84c048a7 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.project b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.project new file mode 100644 index 00000000..a931f0bf --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.project @@ -0,0 +1,29 @@ + + + org.eclipse.viatra.solver.language.ide + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.settings/org.eclipse.core.resources.prefs b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..7adc0fb9 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=11 diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/build.gradle b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/build.gradle new file mode 100644 index 00000000..1b060b13 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/build.gradle @@ -0,0 +1,23 @@ +plugins { + id 'com.github.johnrengelman.shadow' version '5.2.0' +} + +dependencies { + compile project(':org.eclipse.viatra.solver.language') + compile "org.eclipse.xtext:org.eclipse.xtext.ide:${xtextVersion}" + compile "org.eclipse.xtext:org.eclipse.xtext.xbase.ide:${xtextVersion}" +} + +apply plugin: 'application' +apply plugin: 'com.github.johnrengelman.shadow' +mainClassName = "org.eclipse.xtext.ide.server.ServerLauncher" + +shadowJar { + from(project.convention.getPlugin(JavaPluginConvention).sourceSets.main.output) + configurations = [project.configurations.runtime] + exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA','schema/*', + '.options', '.api_description', '*.profile', '*.html', 'about.*', 'about_files/*', + 'plugin.xml', 'systembundle.properties', 'profile.list') + classifier = 'ls' + append('plugin.properties') +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/ProblemIdeModule.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/ProblemIdeModule.java new file mode 100644 index 00000000..c6e41049 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/ProblemIdeModule.java @@ -0,0 +1,17 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language.ide; + +import org.eclipse.viatra.solver.language.ide.syntaxcoloring.ProblemSemanticHighlightingCalculator; +import org.eclipse.xtext.ide.editor.syntaxcoloring.ISemanticHighlightingCalculator; + +/** + * Use this class to register ide components. + */ +public class ProblemIdeModule extends AbstractProblemIdeModule { + + public Class bindISemanticHighlightingCalculator() { + return ProblemSemanticHighlightingCalculator.class; + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/ProblemIdeSetup.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/ProblemIdeSetup.java new file mode 100644 index 00000000..ca1fec30 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/ProblemIdeSetup.java @@ -0,0 +1,22 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language.ide; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.viatra.solver.language.ProblemRuntimeModule; +import org.eclipse.viatra.solver.language.ProblemStandaloneSetup; +import org.eclipse.xtext.util.Modules2; + +/** + * Initialization support for running Xtext languages as language servers. + */ +public class ProblemIdeSetup extends ProblemStandaloneSetup { + + @Override + public Injector createInjector() { + return Guice.createInjector(Modules2.mixin(new ProblemRuntimeModule(), new ProblemIdeModule())); + } + +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java new file mode 100644 index 00000000..f6a29457 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/java/org/eclipse/viatra/solver/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java @@ -0,0 +1,138 @@ +package org.eclipse.viatra.solver.language.ide.syntaxcoloring; + +import java.util.List; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Node; +import org.eclipse.viatra.solver.language.model.problem.Parameter; +import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition; +import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Variable; +import org.eclipse.viatra.solver.language.scoping.ProblemGlobalScopeProvider; +import org.eclipse.xtext.ide.editor.syntaxcoloring.DefaultSemanticHighlightingCalculator; +import org.eclipse.xtext.ide.editor.syntaxcoloring.IHighlightedPositionAcceptor; +import org.eclipse.xtext.nodemodel.INode; +import org.eclipse.xtext.nodemodel.util.NodeModelUtils; +import org.eclipse.xtext.service.OperationCanceledManager; +import org.eclipse.xtext.util.CancelIndicator; +import org.eclipse.xtext.util.SimpleAttributeResolver; + +import com.google.inject.Inject; + +public class ProblemSemanticHighlightingCalculator extends DefaultSemanticHighlightingCalculator { + private static final String BUILTIN_CLASS = "cm-keyword"; + private static final String CLASS_CLASS = "problem-class"; + private static final String ABSTRACT_CLASS = "problem-abstract"; + private static final String REFERENCE_CLASS = "problem-reference"; + private static final String CONTAINMENT_CLASS = "problem-containment"; + private static final String PREDICATE_CLASS = "problem-predicate"; + private static final String ERROR_CLASS = "problem-error"; + private static final String NODE_CLASS = "problem-node"; + private static final String PARAMETER_CLASS = "problem-parameter"; + private static final String VARIABLE_CLASS = "problem-variable"; + + @Inject + private OperationCanceledManager operationCanceledManager; + + @Override + protected boolean highlightElement(EObject object, IHighlightedPositionAcceptor acceptor, + CancelIndicator cancelIndicator) { + highlightName(object, acceptor, cancelIndicator); + highlightCrossReferences(object, acceptor, cancelIndicator); + return false; + } + + protected void highlightName(EObject object, IHighlightedPositionAcceptor acceptor, + CancelIndicator cancelIndicator) { + String highlightClass = getHighlightClass(object); + if (highlightClass != null) { + EAttribute nameAttribute = SimpleAttributeResolver.NAME_RESOLVER.getAttribute(object); + if (nameAttribute != null) { + highlightFeature(acceptor, object, nameAttribute, highlightClass); + } + } + } + + protected void highlightCrossReferences(EObject object, IHighlightedPositionAcceptor acceptor, + CancelIndicator cancelIndicator) { + for (EReference reference : object.eClass().getEAllReferences()) { + if (reference.isContainment()) { + continue; + } + operationCanceledManager.checkCanceled(cancelIndicator); + Object value = object.eGet(reference); + if (value instanceof EList) { + @SuppressWarnings("unchecked") + EList values = (EList) value; + List nodes = NodeModelUtils.findNodesForFeature(object, reference); + int size = Math.min(values.size(), nodes.size()); + for (int i = 0; i < size; i++) { + EObject valueInList = values.get(i); + INode node = nodes.get(i); + String highlightClass = getHighlightClass(valueInList); + if (highlightClass != null) { + highlightNode(acceptor, node, highlightClass); + } + } + } else if (value instanceof EObject) { + EObject valueObj = (EObject) value; + String highlightClass = getHighlightClass(valueObj); + if (highlightClass != null) { + highlightFeature(acceptor, object, reference, highlightClass); + } + } + } + } + + protected String getHighlightClass(EObject eObject) { + if (isBuiltIn(eObject)) { + return BUILTIN_CLASS; + } + if (eObject instanceof ClassDeclaration) { + ClassDeclaration classDeclaration = (ClassDeclaration) eObject; + if (classDeclaration.isAbstract()) { + return ABSTRACT_CLASS; + } + return CLASS_CLASS; + } + if (eObject instanceof ReferenceDeclaration) { + ReferenceDeclaration referenceDeclaration = (ReferenceDeclaration) eObject; + if (referenceDeclaration.isContainment()) { + return CONTAINMENT_CLASS; + } + return REFERENCE_CLASS; + } + if (eObject instanceof PredicateDefinition) { + PredicateDefinition predicateDefinition = (PredicateDefinition) eObject; + if (predicateDefinition.isError()) { + return ERROR_CLASS; + } + return PREDICATE_CLASS; + } + if (eObject instanceof Node) { + return NODE_CLASS; + } + if (eObject instanceof Parameter) { + return PARAMETER_CLASS; + } + if (eObject instanceof Variable) { + return VARIABLE_CLASS; + } + return null; + } + + protected boolean isBuiltIn(EObject eObject) { + if (eObject != null) { + Resource eResource = eObject.eResource(); + if (eResource != null) { + return ProblemGlobalScopeProvider.LIBRARY_URI.equals(eResource.getURI()); + } + } + return false; + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/META-INF/services/org.eclipse.xtext.ISetup b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/META-INF/services/org.eclipse.xtext.ISetup new file mode 100644 index 00000000..8e9ec892 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/META-INF/services/org.eclipse.xtext.ISetup @@ -0,0 +1 @@ +org.eclipse.viatra.solver.language.ide.ProblemIdeSetup diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/AbstractProblemIdeModule.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/AbstractProblemIdeModule.java new file mode 100644 index 00000000..a44461f9 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/AbstractProblemIdeModule.java @@ -0,0 +1,60 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.ide; + +import com.google.inject.Binder; +import com.google.inject.name.Names; +import org.eclipse.viatra.solver.language.ide.contentassist.antlr.ProblemParser; +import org.eclipse.viatra.solver.language.ide.contentassist.antlr.internal.InternalProblemLexer; +import org.eclipse.xtext.ide.DefaultIdeModule; +import org.eclipse.xtext.ide.LexerIdeBindings; +import org.eclipse.xtext.ide.editor.contentassist.FQNPrefixMatcher; +import org.eclipse.xtext.ide.editor.contentassist.IPrefixMatcher; +import org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper; +import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper; +import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer; +import org.eclipse.xtext.ide.refactoring.IRenameStrategy2; +import org.eclipse.xtext.ide.server.rename.IRenameService2; +import org.eclipse.xtext.ide.server.rename.RenameService2; + +/** + * Manual modifications go to {@link ProblemIdeModule}. + */ +@SuppressWarnings("all") +public abstract class AbstractProblemIdeModule extends DefaultIdeModule { + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public void configureContentAssistLexer(Binder binder) { + binder.bind(Lexer.class) + .annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST)) + .to(InternalProblemLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIContentAssistParser() { + return ProblemParser.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIProposalConflictHelper() { + return AntlrProposalConflictHelper.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 + public Class bindIPrefixMatcher() { + return FQNPrefixMatcher.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 + public Class bindIRenameService2() { + return RenameService2.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 + public Class bindIRenameStrategy2() { + return IRenameStrategy2.DefaultImpl.class; + } + +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/PartialProblemContentAssistParser.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/PartialProblemContentAssistParser.java new file mode 100644 index 00000000..890ab643 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/PartialProblemContentAssistParser.java @@ -0,0 +1,33 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.ide.contentassist.antlr; + +import java.util.Collection; +import java.util.Collections; +import org.eclipse.xtext.AbstractRule; +import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; +import org.eclipse.xtext.util.PolymorphicDispatcher; + +public class PartialProblemContentAssistParser extends ProblemParser { + + private AbstractRule rule; + + @Override + public void initializeFor(AbstractRule rule) { + this.rule = rule; + } + + @Override + protected Collection getFollowElements(AbstractInternalContentAssistParser parser) { + if (rule == null || rule.eIsProxy()) + return Collections.emptyList(); + String methodName = "entryRule" + rule.getName(); + PolymorphicDispatcher> dispatcher = + new PolymorphicDispatcher>(methodName, 0, 0, Collections.singletonList(parser)); + dispatcher.invoke(); + return parser.getFollowElements(); + } + +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/ProblemParser.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/ProblemParser.java new file mode 100644 index 00000000..78416e64 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/ProblemParser.java @@ -0,0 +1,165 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.ide.contentassist.antlr; + +import com.google.common.collect.ImmutableMap; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import java.util.Map; +import org.eclipse.viatra.solver.language.ide.contentassist.antlr.internal.InternalProblemParser; +import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; +import org.eclipse.xtext.AbstractElement; +import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser; + +public class ProblemParser extends AbstractContentAssistParser { + + @Singleton + public static final class NameMappings { + + private final Map mappings; + + @Inject + public NameMappings(ProblemGrammarAccess grammarAccess) { + ImmutableMap.Builder builder = ImmutableMap.builder(); + init(builder, grammarAccess); + this.mappings = builder.build(); + } + + public String getRuleName(AbstractElement element) { + return mappings.get(element); + } + + private static void init(ImmutableMap.Builder builder, ProblemGrammarAccess grammarAccess) { + builder.put(grammarAccess.getStatementAccess().getAlternatives(), "rule__Statement__Alternatives"); + builder.put(grammarAccess.getClassDeclarationAccess().getAlternatives_3(), "rule__ClassDeclaration__Alternatives_3"); + builder.put(grammarAccess.getClassDeclarationAccess().getAlternatives_3_0_1(), "rule__ClassDeclaration__Alternatives_3_0_1"); + builder.put(grammarAccess.getReferenceDeclarationAccess().getAlternatives_0(), "rule__ReferenceDeclaration__Alternatives_0"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getAlternatives_0(), "rule__PredicateDefinition__Alternatives_0"); + builder.put(grammarAccess.getLiteralAccess().getAlternatives(), "rule__Literal__Alternatives"); + builder.put(grammarAccess.getAssertionAccess().getAlternatives_0(), "rule__Assertion__Alternatives_0"); + builder.put(grammarAccess.getTypeScopeAccess().getAlternatives_1(), "rule__TypeScope__Alternatives_1"); + builder.put(grammarAccess.getMultiplicityAccess().getAlternatives(), "rule__Multiplicity__Alternatives"); + builder.put(grammarAccess.getUpperBoundAccess().getAlternatives(), "rule__UpperBound__Alternatives"); + builder.put(grammarAccess.getLogicValueAccess().getAlternatives(), "rule__LogicValue__Alternatives"); + builder.put(grammarAccess.getShortLogicValueAccess().getAlternatives(), "rule__ShortLogicValue__Alternatives"); + builder.put(grammarAccess.getClassDeclarationAccess().getGroup(), "rule__ClassDeclaration__Group__0"); + builder.put(grammarAccess.getClassDeclarationAccess().getGroup_3_0(), "rule__ClassDeclaration__Group_3_0__0"); + builder.put(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1(), "rule__ClassDeclaration__Group_3_0_1_1__0"); + builder.put(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1_1(), "rule__ClassDeclaration__Group_3_0_1_1_1__0"); + builder.put(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1_1_1(), "rule__ClassDeclaration__Group_3_0_1_1_1_1__0"); + builder.put(grammarAccess.getClassDeclarationAccess().getGroup_4(), "rule__ClassDeclaration__Group_4__0"); + builder.put(grammarAccess.getReferenceDeclarationAccess().getGroup(), "rule__ReferenceDeclaration__Group__0"); + builder.put(grammarAccess.getReferenceDeclarationAccess().getGroup_6(), "rule__ReferenceDeclaration__Group_6__0"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getGroup(), "rule__PredicateDefinition__Group__0"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getGroup_0_0(), "rule__PredicateDefinition__Group_0_0__0"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getGroup_3(), "rule__PredicateDefinition__Group_3__0"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getGroup_3_1(), "rule__PredicateDefinition__Group_3_1__0"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getGroup_5(), "rule__PredicateDefinition__Group_5__0"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getGroup_5_2(), "rule__PredicateDefinition__Group_5_2__0"); + builder.put(grammarAccess.getParameterAccess().getGroup(), "rule__Parameter__Group__0"); + builder.put(grammarAccess.getConjunctionAccess().getGroup(), "rule__Conjunction__Group__0"); + builder.put(grammarAccess.getConjunctionAccess().getGroup_1(), "rule__Conjunction__Group_1__0"); + builder.put(grammarAccess.getNegativeLiteralAccess().getGroup(), "rule__NegativeLiteral__Group__0"); + builder.put(grammarAccess.getAtomAccess().getGroup(), "rule__Atom__Group__0"); + builder.put(grammarAccess.getAtomAccess().getGroup_3(), "rule__Atom__Group_3__0"); + builder.put(grammarAccess.getAtomAccess().getGroup_3_1(), "rule__Atom__Group_3_1__0"); + builder.put(grammarAccess.getAssertionAccess().getGroup(), "rule__Assertion__Group__0"); + builder.put(grammarAccess.getAssertionAccess().getGroup_0_0(), "rule__Assertion__Group_0_0__0"); + builder.put(grammarAccess.getAssertionAccess().getGroup_0_0_2(), "rule__Assertion__Group_0_0_2__0"); + builder.put(grammarAccess.getAssertionAccess().getGroup_0_0_2_1(), "rule__Assertion__Group_0_0_2_1__0"); + builder.put(grammarAccess.getAssertionAccess().getGroup_0_1(), "rule__Assertion__Group_0_1__0"); + builder.put(grammarAccess.getAssertionAccess().getGroup_0_1_3(), "rule__Assertion__Group_0_1_3__0"); + builder.put(grammarAccess.getAssertionAccess().getGroup_0_1_3_1(), "rule__Assertion__Group_0_1_3_1__0"); + builder.put(grammarAccess.getScopeDeclarationAccess().getGroup(), "rule__ScopeDeclaration__Group__0"); + builder.put(grammarAccess.getScopeDeclarationAccess().getGroup_2(), "rule__ScopeDeclaration__Group_2__0"); + builder.put(grammarAccess.getTypeScopeAccess().getGroup(), "rule__TypeScope__Group__0"); + builder.put(grammarAccess.getRangeMultiplicityAccess().getGroup(), "rule__RangeMultiplicity__Group__0"); + builder.put(grammarAccess.getQualifiedNameAccess().getGroup(), "rule__QualifiedName__Group__0"); + builder.put(grammarAccess.getQualifiedNameAccess().getGroup_1(), "rule__QualifiedName__Group_1__0"); + builder.put(grammarAccess.getProblemAccess().getStatementsAssignment(), "rule__Problem__StatementsAssignment"); + builder.put(grammarAccess.getClassDeclarationAccess().getAbstractAssignment_0(), "rule__ClassDeclaration__AbstractAssignment_0"); + builder.put(grammarAccess.getClassDeclarationAccess().getNameAssignment_2(), "rule__ClassDeclaration__NameAssignment_2"); + builder.put(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_0(), "rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0"); + builder.put(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_1_1_0(), "rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0"); + builder.put(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_1_1_1_1(), "rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1"); + builder.put(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsAssignment_3_1(), "rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1"); + builder.put(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsAssignment_4_1(), "rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1"); + builder.put(grammarAccess.getReferenceDeclarationAccess().getContainmentAssignment_0_0(), "rule__ReferenceDeclaration__ContainmentAssignment_0_0"); + builder.put(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeAssignment_1(), "rule__ReferenceDeclaration__ReferenceTypeAssignment_1"); + builder.put(grammarAccess.getReferenceDeclarationAccess().getMultiplicityAssignment_3(), "rule__ReferenceDeclaration__MultiplicityAssignment_3"); + builder.put(grammarAccess.getReferenceDeclarationAccess().getNameAssignment_5(), "rule__ReferenceDeclaration__NameAssignment_5"); + builder.put(grammarAccess.getReferenceDeclarationAccess().getOppositeAssignment_6_1(), "rule__ReferenceDeclaration__OppositeAssignment_6_1"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getErrorAssignment_0_0_0(), "rule__PredicateDefinition__ErrorAssignment_0_0_0"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getNameAssignment_1(), "rule__PredicateDefinition__NameAssignment_1"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getParametersAssignment_3_0(), "rule__PredicateDefinition__ParametersAssignment_3_0"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getParametersAssignment_3_1_1(), "rule__PredicateDefinition__ParametersAssignment_3_1_1"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getBodiesAssignment_5_1(), "rule__PredicateDefinition__BodiesAssignment_5_1"); + builder.put(grammarAccess.getPredicateDefinitionAccess().getBodiesAssignment_5_2_1(), "rule__PredicateDefinition__BodiesAssignment_5_2_1"); + builder.put(grammarAccess.getParameterAccess().getParameterTypeAssignment_0(), "rule__Parameter__ParameterTypeAssignment_0"); + builder.put(grammarAccess.getParameterAccess().getNameAssignment_1(), "rule__Parameter__NameAssignment_1"); + builder.put(grammarAccess.getConjunctionAccess().getLiteralsAssignment_0(), "rule__Conjunction__LiteralsAssignment_0"); + builder.put(grammarAccess.getConjunctionAccess().getLiteralsAssignment_1_1(), "rule__Conjunction__LiteralsAssignment_1_1"); + builder.put(grammarAccess.getNegativeLiteralAccess().getAtomAssignment_1(), "rule__NegativeLiteral__AtomAssignment_1"); + builder.put(grammarAccess.getAtomAccess().getRelationAssignment_0(), "rule__Atom__RelationAssignment_0"); + builder.put(grammarAccess.getAtomAccess().getTransitiveClosureAssignment_1(), "rule__Atom__TransitiveClosureAssignment_1"); + builder.put(grammarAccess.getAtomAccess().getArgumentsAssignment_3_0(), "rule__Atom__ArgumentsAssignment_3_0"); + builder.put(grammarAccess.getAtomAccess().getArgumentsAssignment_3_1_1(), "rule__Atom__ArgumentsAssignment_3_1_1"); + builder.put(grammarAccess.getAssertionAccess().getRelationAssignment_0_0_0(), "rule__Assertion__RelationAssignment_0_0_0"); + builder.put(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_0_2_0(), "rule__Assertion__ArgumentsAssignment_0_0_2_0"); + builder.put(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_0_2_1_1(), "rule__Assertion__ArgumentsAssignment_0_0_2_1_1"); + builder.put(grammarAccess.getAssertionAccess().getValueAssignment_0_0_5(), "rule__Assertion__ValueAssignment_0_0_5"); + builder.put(grammarAccess.getAssertionAccess().getValueAssignment_0_1_0(), "rule__Assertion__ValueAssignment_0_1_0"); + builder.put(grammarAccess.getAssertionAccess().getRelationAssignment_0_1_1(), "rule__Assertion__RelationAssignment_0_1_1"); + builder.put(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_1_3_0(), "rule__Assertion__ArgumentsAssignment_0_1_3_0"); + builder.put(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_1_3_1_1(), "rule__Assertion__ArgumentsAssignment_0_1_3_1_1"); + builder.put(grammarAccess.getScopeDeclarationAccess().getTypeScopesAssignment_1(), "rule__ScopeDeclaration__TypeScopesAssignment_1"); + builder.put(grammarAccess.getScopeDeclarationAccess().getTypeScopesAssignment_2_1(), "rule__ScopeDeclaration__TypeScopesAssignment_2_1"); + builder.put(grammarAccess.getTypeScopeAccess().getTargetTypeAssignment_0(), "rule__TypeScope__TargetTypeAssignment_0"); + builder.put(grammarAccess.getTypeScopeAccess().getIncrementAssignment_1_0(), "rule__TypeScope__IncrementAssignment_1_0"); + builder.put(grammarAccess.getTypeScopeAccess().getMultiplicityAssignment_2(), "rule__TypeScope__MultiplicityAssignment_2"); + builder.put(grammarAccess.getRangeMultiplicityAccess().getLowerBoundAssignment_0(), "rule__RangeMultiplicity__LowerBoundAssignment_0"); + builder.put(grammarAccess.getRangeMultiplicityAccess().getUpperBoundAssignment_2(), "rule__RangeMultiplicity__UpperBoundAssignment_2"); + builder.put(grammarAccess.getExactMultiplicityAccess().getExactValueAssignment(), "rule__ExactMultiplicity__ExactValueAssignment"); + } + } + + @Inject + private NameMappings nameMappings; + + @Inject + private ProblemGrammarAccess grammarAccess; + + @Override + protected InternalProblemParser createParser() { + InternalProblemParser result = new InternalProblemParser(null); + result.setGrammarAccess(grammarAccess); + return result; + } + + @Override + protected String getRuleName(AbstractElement element) { + return nameMappings.getRuleName(element); + } + + @Override + protected String[] getInitialHiddenTokens() { + return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" }; + } + + public ProblemGrammarAccess getGrammarAccess() { + return this.grammarAccess; + } + + public void setGrammarAccess(ProblemGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } + + public NameMappings getNameMappings() { + return nameMappings; + } + + public void setNameMappings(NameMappings nameMappings) { + this.nameMappings = nameMappings; + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblem.g b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblem.g new file mode 100644 index 00000000..7dd99f99 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblem.g @@ -0,0 +1,4206 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +grammar InternalProblem; + +options { + superClass=AbstractInternalContentAssistParser; +} + +@lexer::header { +package org.eclipse.viatra.solver.language.ide.contentassist.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer; +} + +@parser::header { +package org.eclipse.viatra.solver.language.ide.contentassist.antlr.internal; + +import java.io.InputStream; +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.DFA; +import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; + +} +@parser::members { + private ProblemGrammarAccess grammarAccess; + + public void setGrammarAccess(ProblemGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } + + @Override + protected Grammar getGrammar() { + return grammarAccess.getGrammar(); + } + + @Override + protected String getValueForTokenName(String tokenName) { + return tokenName; + } +} + +// Entry rule entryRuleProblem +entryRuleProblem +: +{ before(grammarAccess.getProblemRule()); } + ruleProblem +{ after(grammarAccess.getProblemRule()); } + EOF +; + +// Rule Problem +ruleProblem + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getProblemAccess().getStatementsAssignment()); } + (rule__Problem__StatementsAssignment)* + { after(grammarAccess.getProblemAccess().getStatementsAssignment()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleStatement +entryRuleStatement +: +{ before(grammarAccess.getStatementRule()); } + ruleStatement +{ after(grammarAccess.getStatementRule()); } + EOF +; + +// Rule Statement +ruleStatement + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getStatementAccess().getAlternatives()); } + (rule__Statement__Alternatives) + { after(grammarAccess.getStatementAccess().getAlternatives()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleClassDeclaration +entryRuleClassDeclaration +: +{ before(grammarAccess.getClassDeclarationRule()); } + ruleClassDeclaration +{ after(grammarAccess.getClassDeclarationRule()); } + EOF +; + +// Rule ClassDeclaration +ruleClassDeclaration + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getClassDeclarationAccess().getGroup()); } + (rule__ClassDeclaration__Group__0) + { after(grammarAccess.getClassDeclarationAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleReferenceDeclaration +entryRuleReferenceDeclaration +: +{ before(grammarAccess.getReferenceDeclarationRule()); } + ruleReferenceDeclaration +{ after(grammarAccess.getReferenceDeclarationRule()); } + EOF +; + +// Rule ReferenceDeclaration +ruleReferenceDeclaration + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getReferenceDeclarationAccess().getGroup()); } + (rule__ReferenceDeclaration__Group__0) + { after(grammarAccess.getReferenceDeclarationAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRulePredicateDefinition +entryRulePredicateDefinition +: +{ before(grammarAccess.getPredicateDefinitionRule()); } + rulePredicateDefinition +{ after(grammarAccess.getPredicateDefinitionRule()); } + EOF +; + +// Rule PredicateDefinition +rulePredicateDefinition + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getPredicateDefinitionAccess().getGroup()); } + (rule__PredicateDefinition__Group__0) + { after(grammarAccess.getPredicateDefinitionAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleParameter +entryRuleParameter +: +{ before(grammarAccess.getParameterRule()); } + ruleParameter +{ after(grammarAccess.getParameterRule()); } + EOF +; + +// Rule Parameter +ruleParameter + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getParameterAccess().getGroup()); } + (rule__Parameter__Group__0) + { after(grammarAccess.getParameterAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleConjunction +entryRuleConjunction +: +{ before(grammarAccess.getConjunctionRule()); } + ruleConjunction +{ after(grammarAccess.getConjunctionRule()); } + EOF +; + +// Rule Conjunction +ruleConjunction + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getConjunctionAccess().getGroup()); } + (rule__Conjunction__Group__0) + { after(grammarAccess.getConjunctionAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleLiteral +entryRuleLiteral +: +{ before(grammarAccess.getLiteralRule()); } + ruleLiteral +{ after(grammarAccess.getLiteralRule()); } + EOF +; + +// Rule Literal +ruleLiteral + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getLiteralAccess().getAlternatives()); } + (rule__Literal__Alternatives) + { after(grammarAccess.getLiteralAccess().getAlternatives()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleNegativeLiteral +entryRuleNegativeLiteral +: +{ before(grammarAccess.getNegativeLiteralRule()); } + ruleNegativeLiteral +{ after(grammarAccess.getNegativeLiteralRule()); } + EOF +; + +// Rule NegativeLiteral +ruleNegativeLiteral + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getNegativeLiteralAccess().getGroup()); } + (rule__NegativeLiteral__Group__0) + { after(grammarAccess.getNegativeLiteralAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleAtom +entryRuleAtom +: +{ before(grammarAccess.getAtomRule()); } + ruleAtom +{ after(grammarAccess.getAtomRule()); } + EOF +; + +// Rule Atom +ruleAtom + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getAtomAccess().getGroup()); } + (rule__Atom__Group__0) + { after(grammarAccess.getAtomAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleAssertion +entryRuleAssertion +: +{ before(grammarAccess.getAssertionRule()); } + ruleAssertion +{ after(grammarAccess.getAssertionRule()); } + EOF +; + +// Rule Assertion +ruleAssertion + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getAssertionAccess().getGroup()); } + (rule__Assertion__Group__0) + { after(grammarAccess.getAssertionAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleScopeDeclaration +entryRuleScopeDeclaration +: +{ before(grammarAccess.getScopeDeclarationRule()); } + ruleScopeDeclaration +{ after(grammarAccess.getScopeDeclarationRule()); } + EOF +; + +// Rule ScopeDeclaration +ruleScopeDeclaration + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getScopeDeclarationAccess().getGroup()); } + (rule__ScopeDeclaration__Group__0) + { after(grammarAccess.getScopeDeclarationAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleTypeScope +entryRuleTypeScope +: +{ before(grammarAccess.getTypeScopeRule()); } + ruleTypeScope +{ after(grammarAccess.getTypeScopeRule()); } + EOF +; + +// Rule TypeScope +ruleTypeScope + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getTypeScopeAccess().getGroup()); } + (rule__TypeScope__Group__0) + { after(grammarAccess.getTypeScopeAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleMultiplicity +entryRuleMultiplicity +: +{ before(grammarAccess.getMultiplicityRule()); } + ruleMultiplicity +{ after(grammarAccess.getMultiplicityRule()); } + EOF +; + +// Rule Multiplicity +ruleMultiplicity + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getMultiplicityAccess().getAlternatives()); } + (rule__Multiplicity__Alternatives) + { after(grammarAccess.getMultiplicityAccess().getAlternatives()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleRangeMultiplicity +entryRuleRangeMultiplicity +: +{ before(grammarAccess.getRangeMultiplicityRule()); } + ruleRangeMultiplicity +{ after(grammarAccess.getRangeMultiplicityRule()); } + EOF +; + +// Rule RangeMultiplicity +ruleRangeMultiplicity + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getRangeMultiplicityAccess().getGroup()); } + (rule__RangeMultiplicity__Group__0) + { after(grammarAccess.getRangeMultiplicityAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleExactMultiplicity +entryRuleExactMultiplicity +: +{ before(grammarAccess.getExactMultiplicityRule()); } + ruleExactMultiplicity +{ after(grammarAccess.getExactMultiplicityRule()); } + EOF +; + +// Rule ExactMultiplicity +ruleExactMultiplicity + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getExactMultiplicityAccess().getExactValueAssignment()); } + (rule__ExactMultiplicity__ExactValueAssignment) + { after(grammarAccess.getExactMultiplicityAccess().getExactValueAssignment()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleUpperBound +entryRuleUpperBound +: +{ before(grammarAccess.getUpperBoundRule()); } + ruleUpperBound +{ after(grammarAccess.getUpperBoundRule()); } + EOF +; + +// Rule UpperBound +ruleUpperBound + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getUpperBoundAccess().getAlternatives()); } + (rule__UpperBound__Alternatives) + { after(grammarAccess.getUpperBoundAccess().getAlternatives()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleQualifiedName +entryRuleQualifiedName +: +{ before(grammarAccess.getQualifiedNameRule()); } + ruleQualifiedName +{ after(grammarAccess.getQualifiedNameRule()); } + EOF +; + +// Rule QualifiedName +ruleQualifiedName + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getQualifiedNameAccess().getGroup()); } + (rule__QualifiedName__Group__0) + { after(grammarAccess.getQualifiedNameAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Rule LogicValue +ruleLogicValue + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getLogicValueAccess().getAlternatives()); } + (rule__LogicValue__Alternatives) + { after(grammarAccess.getLogicValueAccess().getAlternatives()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Rule ShortLogicValue +ruleShortLogicValue + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getShortLogicValueAccess().getAlternatives()); } + (rule__ShortLogicValue__Alternatives) + { after(grammarAccess.getShortLogicValueAccess().getAlternatives()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Statement__Alternatives + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getStatementAccess().getClassDeclarationParserRuleCall_0()); } + ruleClassDeclaration + { after(grammarAccess.getStatementAccess().getClassDeclarationParserRuleCall_0()); } + ) + | + ( + { before(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_1()); } + rulePredicateDefinition + { after(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_1()); } + ) + | + ( + { before(grammarAccess.getStatementAccess().getAssertionParserRuleCall_2()); } + ruleAssertion + { after(grammarAccess.getStatementAccess().getAssertionParserRuleCall_2()); } + ) + | + ( + { before(grammarAccess.getStatementAccess().getScopeDeclarationParserRuleCall_3()); } + ruleScopeDeclaration + { after(grammarAccess.getStatementAccess().getScopeDeclarationParserRuleCall_3()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Alternatives_3 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getClassDeclarationAccess().getGroup_3_0()); } + (rule__ClassDeclaration__Group_3_0__0) + { after(grammarAccess.getClassDeclarationAccess().getGroup_3_0()); } + ) + | + ( + { before(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsAssignment_3_1()); } + (rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1) + { after(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsAssignment_3_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Alternatives_3_0_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_0()); } + (rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0) + { after(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_0()); } + ) + | + ( + { before(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1()); } + (rule__ClassDeclaration__Group_3_0_1_1__0) + { after(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Alternatives_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getReferenceDeclarationAccess().getContainmentAssignment_0_0()); } + (rule__ReferenceDeclaration__ContainmentAssignment_0_0) + { after(grammarAccess.getReferenceDeclarationAccess().getContainmentAssignment_0_0()); } + ) + | + ( + { before(grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); } + 'refers' + { after(grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Alternatives_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getPredicateDefinitionAccess().getGroup_0_0()); } + (rule__PredicateDefinition__Group_0_0__0) + { after(grammarAccess.getPredicateDefinitionAccess().getGroup_0_0()); } + ) + | + ( + { before(grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_1()); } + 'pred' + { after(grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Literal__Alternatives + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getLiteralAccess().getAtomParserRuleCall_0()); } + ruleAtom + { after(grammarAccess.getLiteralAccess().getAtomParserRuleCall_0()); } + ) + | + ( + { before(grammarAccess.getLiteralAccess().getNegativeLiteralParserRuleCall_1()); } + ruleNegativeLiteral + { after(grammarAccess.getLiteralAccess().getNegativeLiteralParserRuleCall_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Alternatives_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAssertionAccess().getGroup_0_0()); } + (rule__Assertion__Group_0_0__0) + { after(grammarAccess.getAssertionAccess().getGroup_0_0()); } + ) + | + ( + { before(grammarAccess.getAssertionAccess().getGroup_0_1()); } + (rule__Assertion__Group_0_1__0) + { after(grammarAccess.getAssertionAccess().getGroup_0_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__TypeScope__Alternatives_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getTypeScopeAccess().getIncrementAssignment_1_0()); } + (rule__TypeScope__IncrementAssignment_1_0) + { after(grammarAccess.getTypeScopeAccess().getIncrementAssignment_1_0()); } + ) + | + ( + { before(grammarAccess.getTypeScopeAccess().getEqualsSignKeyword_1_1()); } + '=' + { after(grammarAccess.getTypeScopeAccess().getEqualsSignKeyword_1_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Multiplicity__Alternatives + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getMultiplicityAccess().getRangeMultiplicityParserRuleCall_0()); } + ruleRangeMultiplicity + { after(grammarAccess.getMultiplicityAccess().getRangeMultiplicityParserRuleCall_0()); } + ) + | + ( + { before(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); } + ruleExactMultiplicity + { after(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__UpperBound__Alternatives + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getUpperBoundAccess().getINTTerminalRuleCall_0()); } + RULE_INT + { after(grammarAccess.getUpperBoundAccess().getINTTerminalRuleCall_0()); } + ) + | + ( + { before(grammarAccess.getUpperBoundAccess().getAsteriskKeyword_1()); } + '*' + { after(grammarAccess.getUpperBoundAccess().getAsteriskKeyword_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__LogicValue__Alternatives + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); } + ('true') + { after(grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); } + ) + | + ( + { before(grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); } + ('false') + { after(grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); } + ) + | + ( + { before(grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); } + ('unknown') + { after(grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ShortLogicValue__Alternatives + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0()); } + ('!') + { after(grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0()); } + ) + | + ( + { before(grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1()); } + ('?') + { after(grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group__0__Impl + rule__ClassDeclaration__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getAbstractAssignment_0()); } + (rule__ClassDeclaration__AbstractAssignment_0)? + { after(grammarAccess.getClassDeclarationAccess().getAbstractAssignment_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group__1__Impl + rule__ClassDeclaration__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getClassKeyword_1()); } + 'class' + { after(grammarAccess.getClassDeclarationAccess().getClassKeyword_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group__2__Impl + rule__ClassDeclaration__Group__3 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getNameAssignment_2()); } + (rule__ClassDeclaration__NameAssignment_2) + { after(grammarAccess.getClassDeclarationAccess().getNameAssignment_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__3 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group__3__Impl + rule__ClassDeclaration__Group__4 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__3__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getAlternatives_3()); } + (rule__ClassDeclaration__Alternatives_3)? + { after(grammarAccess.getClassDeclarationAccess().getAlternatives_3()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__4 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group__4__Impl + rule__ClassDeclaration__Group__5 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__4__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getGroup_4()); } + (rule__ClassDeclaration__Group_4__0)* + { after(grammarAccess.getClassDeclarationAccess().getGroup_4()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__5 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group__5__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group__5__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getFullStopKeyword_5()); } + '.' + { after(grammarAccess.getClassDeclarationAccess().getFullStopKeyword_5()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__ClassDeclaration__Group_3_0__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_3_0__0__Impl + rule__ClassDeclaration__Group_3_0__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0_0()); } + 'extends' + { after(grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_3_0__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getAlternatives_3_0_1()); } + (rule__ClassDeclaration__Alternatives_3_0_1) + { after(grammarAccess.getClassDeclarationAccess().getAlternatives_3_0_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__ClassDeclaration__Group_3_0_1_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_3_0_1_1__0__Impl + rule__ClassDeclaration__Group_3_0_1_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getLeftSquareBracketKeyword_3_0_1_1_0()); } + '[' + { after(grammarAccess.getClassDeclarationAccess().getLeftSquareBracketKeyword_3_0_1_1_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_3_0_1_1__1__Impl + rule__ClassDeclaration__Group_3_0_1_1__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1_1()); } + (rule__ClassDeclaration__Group_3_0_1_1_1__0)? + { after(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_3_0_1_1__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getRightSquareBracketKeyword_3_0_1_1_2()); } + ']' + { after(grammarAccess.getClassDeclarationAccess().getRightSquareBracketKeyword_3_0_1_1_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__ClassDeclaration__Group_3_0_1_1_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_3_0_1_1_1__0__Impl + rule__ClassDeclaration__Group_3_0_1_1_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_1_1_0()); } + (rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0) + { after(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_1_1_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_3_0_1_1_1__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1_1_1()); } + (rule__ClassDeclaration__Group_3_0_1_1_1_1__0)* + { after(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1_1_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__ClassDeclaration__Group_3_0_1_1_1_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_3_0_1_1_1_1__0__Impl + rule__ClassDeclaration__Group_3_0_1_1_1_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1_1_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getCommaKeyword_3_0_1_1_1_1_0()); } + ',' + { after(grammarAccess.getClassDeclarationAccess().getCommaKeyword_3_0_1_1_1_1_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1_1_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_3_0_1_1_1_1__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_3_0_1_1_1_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_1_1_1_1()); } + (rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1) + { after(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_1_1_1_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__ClassDeclaration__Group_4__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_4__0__Impl + rule__ClassDeclaration__Group_4__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_4__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getCommaKeyword_4_0()); } + ',' + { after(grammarAccess.getClassDeclarationAccess().getCommaKeyword_4_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_4__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ClassDeclaration__Group_4__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__Group_4__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsAssignment_4_1()); } + (rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1) + { after(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsAssignment_4_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__ReferenceDeclaration__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ReferenceDeclaration__Group__0__Impl + rule__ReferenceDeclaration__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getReferenceDeclarationAccess().getAlternatives_0()); } + (rule__ReferenceDeclaration__Alternatives_0) + { after(grammarAccess.getReferenceDeclarationAccess().getAlternatives_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ReferenceDeclaration__Group__1__Impl + rule__ReferenceDeclaration__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeAssignment_1()); } + (rule__ReferenceDeclaration__ReferenceTypeAssignment_1) + { after(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__ReferenceDeclaration__Group__2__Impl + rule__ReferenceDeclaration__Group__3 +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getReferenceDeclarationAccess().getLeftSquareBracketKeyword_2()); } + '[' + { after(grammarAccess.getReferenceDeclarationAccess().getLeftSquareBracketKeyword_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__3 + @init { + int stackSize = keepStackSize(); + } +: + rule__ReferenceDeclaration__Group__3__Impl + rule__ReferenceDeclaration__Group__4 +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__3__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getReferenceDeclarationAccess().getMultiplicityAssignment_3()); } + (rule__ReferenceDeclaration__MultiplicityAssignment_3) + { after(grammarAccess.getReferenceDeclarationAccess().getMultiplicityAssignment_3()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__4 + @init { + int stackSize = keepStackSize(); + } +: + rule__ReferenceDeclaration__Group__4__Impl + rule__ReferenceDeclaration__Group__5 +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__4__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getReferenceDeclarationAccess().getRightSquareBracketKeyword_4()); } + ']' + { after(grammarAccess.getReferenceDeclarationAccess().getRightSquareBracketKeyword_4()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__5 + @init { + int stackSize = keepStackSize(); + } +: + rule__ReferenceDeclaration__Group__5__Impl + rule__ReferenceDeclaration__Group__6 +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__5__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getReferenceDeclarationAccess().getNameAssignment_5()); } + (rule__ReferenceDeclaration__NameAssignment_5) + { after(grammarAccess.getReferenceDeclarationAccess().getNameAssignment_5()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__6 + @init { + int stackSize = keepStackSize(); + } +: + rule__ReferenceDeclaration__Group__6__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group__6__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getReferenceDeclarationAccess().getGroup_6()); } + (rule__ReferenceDeclaration__Group_6__0)? + { after(grammarAccess.getReferenceDeclarationAccess().getGroup_6()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__ReferenceDeclaration__Group_6__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ReferenceDeclaration__Group_6__0__Impl + rule__ReferenceDeclaration__Group_6__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group_6__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getReferenceDeclarationAccess().getOppositeKeyword_6_0()); } + 'opposite' + { after(grammarAccess.getReferenceDeclarationAccess().getOppositeKeyword_6_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group_6__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ReferenceDeclaration__Group_6__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__Group_6__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getReferenceDeclarationAccess().getOppositeAssignment_6_1()); } + (rule__ReferenceDeclaration__OppositeAssignment_6_1) + { after(grammarAccess.getReferenceDeclarationAccess().getOppositeAssignment_6_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__PredicateDefinition__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group__0__Impl + rule__PredicateDefinition__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getAlternatives_0()); } + (rule__PredicateDefinition__Alternatives_0) + { after(grammarAccess.getPredicateDefinitionAccess().getAlternatives_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group__1__Impl + rule__PredicateDefinition__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getNameAssignment_1()); } + (rule__PredicateDefinition__NameAssignment_1) + { after(grammarAccess.getPredicateDefinitionAccess().getNameAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group__2__Impl + rule__PredicateDefinition__Group__3 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getLeftParenthesisKeyword_2()); } + '(' + { after(grammarAccess.getPredicateDefinitionAccess().getLeftParenthesisKeyword_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__3 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group__3__Impl + rule__PredicateDefinition__Group__4 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__3__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getGroup_3()); } + (rule__PredicateDefinition__Group_3__0)? + { after(grammarAccess.getPredicateDefinitionAccess().getGroup_3()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__4 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group__4__Impl + rule__PredicateDefinition__Group__5 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__4__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getRightParenthesisKeyword_4()); } + ')' + { after(grammarAccess.getPredicateDefinitionAccess().getRightParenthesisKeyword_4()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__5 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group__5__Impl + rule__PredicateDefinition__Group__6 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__5__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getGroup_5()); } + (rule__PredicateDefinition__Group_5__0)? + { after(grammarAccess.getPredicateDefinitionAccess().getGroup_5()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__6 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group__6__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group__6__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getFullStopKeyword_6()); } + '.' + { after(grammarAccess.getPredicateDefinitionAccess().getFullStopKeyword_6()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__PredicateDefinition__Group_0_0__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_0_0__0__Impl + rule__PredicateDefinition__Group_0_0__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_0_0__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getErrorAssignment_0_0_0()); } + (rule__PredicateDefinition__ErrorAssignment_0_0_0) + { after(grammarAccess.getPredicateDefinitionAccess().getErrorAssignment_0_0_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_0_0__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_0_0__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_0_0__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); } + ('pred')? + { after(grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__PredicateDefinition__Group_3__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_3__0__Impl + rule__PredicateDefinition__Group_3__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_3__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getParametersAssignment_3_0()); } + (rule__PredicateDefinition__ParametersAssignment_3_0) + { after(grammarAccess.getPredicateDefinitionAccess().getParametersAssignment_3_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_3__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_3__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_3__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getGroup_3_1()); } + (rule__PredicateDefinition__Group_3_1__0)* + { after(grammarAccess.getPredicateDefinitionAccess().getGroup_3_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__PredicateDefinition__Group_3_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_3_1__0__Impl + rule__PredicateDefinition__Group_3_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_3_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getCommaKeyword_3_1_0()); } + ',' + { after(grammarAccess.getPredicateDefinitionAccess().getCommaKeyword_3_1_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_3_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_3_1__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_3_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getParametersAssignment_3_1_1()); } + (rule__PredicateDefinition__ParametersAssignment_3_1_1) + { after(grammarAccess.getPredicateDefinitionAccess().getParametersAssignment_3_1_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__PredicateDefinition__Group_5__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_5__0__Impl + rule__PredicateDefinition__Group_5__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_5__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getColonEqualsSignKeyword_5_0()); } + ':=' + { after(grammarAccess.getPredicateDefinitionAccess().getColonEqualsSignKeyword_5_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_5__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_5__1__Impl + rule__PredicateDefinition__Group_5__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_5__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getBodiesAssignment_5_1()); } + (rule__PredicateDefinition__BodiesAssignment_5_1) + { after(grammarAccess.getPredicateDefinitionAccess().getBodiesAssignment_5_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_5__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_5__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_5__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getGroup_5_2()); } + (rule__PredicateDefinition__Group_5_2__0)* + { after(grammarAccess.getPredicateDefinitionAccess().getGroup_5_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__PredicateDefinition__Group_5_2__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_5_2__0__Impl + rule__PredicateDefinition__Group_5_2__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_5_2__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getSemicolonKeyword_5_2_0()); } + ';' + { after(grammarAccess.getPredicateDefinitionAccess().getSemicolonKeyword_5_2_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_5_2__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__PredicateDefinition__Group_5_2__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__Group_5_2__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getPredicateDefinitionAccess().getBodiesAssignment_5_2_1()); } + (rule__PredicateDefinition__BodiesAssignment_5_2_1) + { after(grammarAccess.getPredicateDefinitionAccess().getBodiesAssignment_5_2_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Parameter__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Parameter__Group__0__Impl + rule__Parameter__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getParameterAccess().getParameterTypeAssignment_0()); } + (rule__Parameter__ParameterTypeAssignment_0) + { after(grammarAccess.getParameterAccess().getParameterTypeAssignment_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Parameter__Group__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getParameterAccess().getNameAssignment_1()); } + (rule__Parameter__NameAssignment_1) + { after(grammarAccess.getParameterAccess().getNameAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Conjunction__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Conjunction__Group__0__Impl + rule__Conjunction__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Conjunction__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConjunctionAccess().getLiteralsAssignment_0()); } + (rule__Conjunction__LiteralsAssignment_0) + { after(grammarAccess.getConjunctionAccess().getLiteralsAssignment_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Conjunction__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Conjunction__Group__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Conjunction__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConjunctionAccess().getGroup_1()); } + (rule__Conjunction__Group_1__0)* + { after(grammarAccess.getConjunctionAccess().getGroup_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Conjunction__Group_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Conjunction__Group_1__0__Impl + rule__Conjunction__Group_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Conjunction__Group_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConjunctionAccess().getCommaKeyword_1_0()); } + ',' + { after(grammarAccess.getConjunctionAccess().getCommaKeyword_1_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Conjunction__Group_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Conjunction__Group_1__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Conjunction__Group_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConjunctionAccess().getLiteralsAssignment_1_1()); } + (rule__Conjunction__LiteralsAssignment_1_1) + { after(grammarAccess.getConjunctionAccess().getLiteralsAssignment_1_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__NegativeLiteral__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__NegativeLiteral__Group__0__Impl + rule__NegativeLiteral__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__NegativeLiteral__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getNegativeLiteralAccess().getExclamationMarkKeyword_0()); } + '!' + { after(grammarAccess.getNegativeLiteralAccess().getExclamationMarkKeyword_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__NegativeLiteral__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__NegativeLiteral__Group__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__NegativeLiteral__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getNegativeLiteralAccess().getAtomAssignment_1()); } + (rule__NegativeLiteral__AtomAssignment_1) + { after(grammarAccess.getNegativeLiteralAccess().getAtomAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Atom__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Atom__Group__0__Impl + rule__Atom__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAtomAccess().getRelationAssignment_0()); } + (rule__Atom__RelationAssignment_0) + { after(grammarAccess.getAtomAccess().getRelationAssignment_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Atom__Group__1__Impl + rule__Atom__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAtomAccess().getTransitiveClosureAssignment_1()); } + (rule__Atom__TransitiveClosureAssignment_1)? + { after(grammarAccess.getAtomAccess().getTransitiveClosureAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__Atom__Group__2__Impl + rule__Atom__Group__3 +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAtomAccess().getLeftParenthesisKeyword_2()); } + '(' + { after(grammarAccess.getAtomAccess().getLeftParenthesisKeyword_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group__3 + @init { + int stackSize = keepStackSize(); + } +: + rule__Atom__Group__3__Impl + rule__Atom__Group__4 +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group__3__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAtomAccess().getGroup_3()); } + (rule__Atom__Group_3__0)? + { after(grammarAccess.getAtomAccess().getGroup_3()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group__4 + @init { + int stackSize = keepStackSize(); + } +: + rule__Atom__Group__4__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group__4__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAtomAccess().getRightParenthesisKeyword_4()); } + ')' + { after(grammarAccess.getAtomAccess().getRightParenthesisKeyword_4()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Atom__Group_3__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Atom__Group_3__0__Impl + rule__Atom__Group_3__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group_3__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAtomAccess().getArgumentsAssignment_3_0()); } + (rule__Atom__ArgumentsAssignment_3_0) + { after(grammarAccess.getAtomAccess().getArgumentsAssignment_3_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group_3__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Atom__Group_3__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group_3__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAtomAccess().getGroup_3_1()); } + (rule__Atom__Group_3_1__0)* + { after(grammarAccess.getAtomAccess().getGroup_3_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Atom__Group_3_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Atom__Group_3_1__0__Impl + rule__Atom__Group_3_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group_3_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAtomAccess().getCommaKeyword_3_1_0()); } + ',' + { after(grammarAccess.getAtomAccess().getCommaKeyword_3_1_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group_3_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Atom__Group_3_1__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__Group_3_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAtomAccess().getArgumentsAssignment_3_1_1()); } + (rule__Atom__ArgumentsAssignment_3_1_1) + { after(grammarAccess.getAtomAccess().getArgumentsAssignment_3_1_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Assertion__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group__0__Impl + rule__Assertion__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getAlternatives_0()); } + (rule__Assertion__Alternatives_0) + { after(grammarAccess.getAssertionAccess().getAlternatives_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getFullStopKeyword_1()); } + '.' + { after(grammarAccess.getAssertionAccess().getFullStopKeyword_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Assertion__Group_0_0__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_0__0__Impl + rule__Assertion__Group_0_0__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getRelationAssignment_0_0_0()); } + (rule__Assertion__RelationAssignment_0_0_0) + { after(grammarAccess.getAssertionAccess().getRelationAssignment_0_0_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_0__1__Impl + rule__Assertion__Group_0_0__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_0_1()); } + '(' + { after(grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_0_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_0__2__Impl + rule__Assertion__Group_0_0__3 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getGroup_0_0_2()); } + (rule__Assertion__Group_0_0_2__0)? + { after(grammarAccess.getAssertionAccess().getGroup_0_0_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__3 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_0__3__Impl + rule__Assertion__Group_0_0__4 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__3__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_0_3()); } + ')' + { after(grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_0_3()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__4 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_0__4__Impl + rule__Assertion__Group_0_0__5 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__4__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getColonKeyword_0_0_4()); } + ':' + { after(grammarAccess.getAssertionAccess().getColonKeyword_0_0_4()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__5 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_0__5__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0__5__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getValueAssignment_0_0_5()); } + (rule__Assertion__ValueAssignment_0_0_5) + { after(grammarAccess.getAssertionAccess().getValueAssignment_0_0_5()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Assertion__Group_0_0_2__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_0_2__0__Impl + rule__Assertion__Group_0_0_2__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0_2__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_0_2_0()); } + (rule__Assertion__ArgumentsAssignment_0_0_2_0) + { after(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_0_2_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0_2__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_0_2__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0_2__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getGroup_0_0_2_1()); } + (rule__Assertion__Group_0_0_2_1__0)* + { after(grammarAccess.getAssertionAccess().getGroup_0_0_2_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Assertion__Group_0_0_2_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_0_2_1__0__Impl + rule__Assertion__Group_0_0_2_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0_2_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getCommaKeyword_0_0_2_1_0()); } + ',' + { after(grammarAccess.getAssertionAccess().getCommaKeyword_0_0_2_1_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0_2_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_0_2_1__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_0_2_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_0_2_1_1()); } + (rule__Assertion__ArgumentsAssignment_0_0_2_1_1) + { after(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_0_2_1_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Assertion__Group_0_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_1__0__Impl + rule__Assertion__Group_0_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getValueAssignment_0_1_0()); } + (rule__Assertion__ValueAssignment_0_1_0)? + { after(grammarAccess.getAssertionAccess().getValueAssignment_0_1_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_1__1__Impl + rule__Assertion__Group_0_1__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getRelationAssignment_0_1_1()); } + (rule__Assertion__RelationAssignment_0_1_1) + { after(grammarAccess.getAssertionAccess().getRelationAssignment_0_1_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_1__2__Impl + rule__Assertion__Group_0_1__3 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_1_2()); } + '(' + { after(grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_1_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1__3 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_1__3__Impl + rule__Assertion__Group_0_1__4 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1__3__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getGroup_0_1_3()); } + (rule__Assertion__Group_0_1_3__0)? + { after(grammarAccess.getAssertionAccess().getGroup_0_1_3()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1__4 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_1__4__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1__4__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_1_4()); } + ')' + { after(grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_1_4()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Assertion__Group_0_1_3__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_1_3__0__Impl + rule__Assertion__Group_0_1_3__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1_3__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_1_3_0()); } + (rule__Assertion__ArgumentsAssignment_0_1_3_0) + { after(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_1_3_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1_3__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_1_3__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1_3__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getGroup_0_1_3_1()); } + (rule__Assertion__Group_0_1_3_1__0)* + { after(grammarAccess.getAssertionAccess().getGroup_0_1_3_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Assertion__Group_0_1_3_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_1_3_1__0__Impl + rule__Assertion__Group_0_1_3_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1_3_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getCommaKeyword_0_1_3_1_0()); } + ',' + { after(grammarAccess.getAssertionAccess().getCommaKeyword_0_1_3_1_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1_3_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Assertion__Group_0_1_3_1__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__Group_0_1_3_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_1_3_1_1()); } + (rule__Assertion__ArgumentsAssignment_0_1_3_1_1) + { after(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_1_3_1_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__ScopeDeclaration__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ScopeDeclaration__Group__0__Impl + rule__ScopeDeclaration__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getScopeDeclarationAccess().getScopeKeyword_0()); } + 'scope' + { after(grammarAccess.getScopeDeclarationAccess().getScopeKeyword_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ScopeDeclaration__Group__1__Impl + rule__ScopeDeclaration__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getScopeDeclarationAccess().getTypeScopesAssignment_1()); } + (rule__ScopeDeclaration__TypeScopesAssignment_1) + { after(grammarAccess.getScopeDeclarationAccess().getTypeScopesAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__ScopeDeclaration__Group__2__Impl + rule__ScopeDeclaration__Group__3 +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getScopeDeclarationAccess().getGroup_2()); } + (rule__ScopeDeclaration__Group_2__0)* + { after(grammarAccess.getScopeDeclarationAccess().getGroup_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__Group__3 + @init { + int stackSize = keepStackSize(); + } +: + rule__ScopeDeclaration__Group__3__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__Group__3__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getScopeDeclarationAccess().getFullStopKeyword_3()); } + '.' + { after(grammarAccess.getScopeDeclarationAccess().getFullStopKeyword_3()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__ScopeDeclaration__Group_2__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ScopeDeclaration__Group_2__0__Impl + rule__ScopeDeclaration__Group_2__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__Group_2__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getScopeDeclarationAccess().getCommaKeyword_2_0()); } + ',' + { after(grammarAccess.getScopeDeclarationAccess().getCommaKeyword_2_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__Group_2__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ScopeDeclaration__Group_2__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__Group_2__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getScopeDeclarationAccess().getTypeScopesAssignment_2_1()); } + (rule__ScopeDeclaration__TypeScopesAssignment_2_1) + { after(grammarAccess.getScopeDeclarationAccess().getTypeScopesAssignment_2_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__TypeScope__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__TypeScope__Group__0__Impl + rule__TypeScope__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__TypeScope__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getTypeScopeAccess().getTargetTypeAssignment_0()); } + (rule__TypeScope__TargetTypeAssignment_0) + { after(grammarAccess.getTypeScopeAccess().getTargetTypeAssignment_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__TypeScope__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__TypeScope__Group__1__Impl + rule__TypeScope__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__TypeScope__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getTypeScopeAccess().getAlternatives_1()); } + (rule__TypeScope__Alternatives_1) + { after(grammarAccess.getTypeScopeAccess().getAlternatives_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__TypeScope__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__TypeScope__Group__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__TypeScope__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getTypeScopeAccess().getMultiplicityAssignment_2()); } + (rule__TypeScope__MultiplicityAssignment_2) + { after(grammarAccess.getTypeScopeAccess().getMultiplicityAssignment_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__RangeMultiplicity__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__RangeMultiplicity__Group__0__Impl + rule__RangeMultiplicity__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__RangeMultiplicity__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getRangeMultiplicityAccess().getLowerBoundAssignment_0()); } + (rule__RangeMultiplicity__LowerBoundAssignment_0) + { after(grammarAccess.getRangeMultiplicityAccess().getLowerBoundAssignment_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__RangeMultiplicity__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__RangeMultiplicity__Group__1__Impl + rule__RangeMultiplicity__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__RangeMultiplicity__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getRangeMultiplicityAccess().getFullStopFullStopKeyword_1()); } + '..' + { after(grammarAccess.getRangeMultiplicityAccess().getFullStopFullStopKeyword_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__RangeMultiplicity__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__RangeMultiplicity__Group__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__RangeMultiplicity__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getRangeMultiplicityAccess().getUpperBoundAssignment_2()); } + (rule__RangeMultiplicity__UpperBoundAssignment_2) + { after(grammarAccess.getRangeMultiplicityAccess().getUpperBoundAssignment_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__QualifiedName__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__QualifiedName__Group__0__Impl + rule__QualifiedName__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__QualifiedName__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); } + RULE_ID + { after(grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__QualifiedName__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__QualifiedName__Group__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__QualifiedName__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getQualifiedNameAccess().getGroup_1()); } + (rule__QualifiedName__Group_1__0)* + { after(grammarAccess.getQualifiedNameAccess().getGroup_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__QualifiedName__Group_1__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__QualifiedName__Group_1__0__Impl + rule__QualifiedName__Group_1__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__QualifiedName__Group_1__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getQualifiedNameAccess().getColonColonKeyword_1_0()); } + '::' + { after(grammarAccess.getQualifiedNameAccess().getColonColonKeyword_1_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__QualifiedName__Group_1__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__QualifiedName__Group_1__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__QualifiedName__Group_1__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); } + RULE_ID + { after(grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Problem__StatementsAssignment + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); } + ruleStatement + { after(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__AbstractAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); } + ( + { before(grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); } + 'abstract' + { after(grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); } + ) + { after(grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__NameAssignment_2 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getClassDeclarationAccess().getNameIDTerminalRuleCall_2_0()); } + RULE_ID + { after(grammarAccess.getClassDeclarationAccess().getNameIDTerminalRuleCall_2_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_0_0()); } + ( + { before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_0_0_1()); } + RULE_ID + { after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_0_0_1()); } + ) + { after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0()); } + ( + { before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_0_0_1()); } + RULE_ID + { after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_0_0_1()); } + ) + { after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0()); } + ( + { before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_1_1_0_1()); } + RULE_ID + { after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_1_1_0_1()); } + ) + { after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0()); } + ruleReferenceDeclaration + { after(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0()); } + ruleReferenceDeclaration + { after(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__ContainmentAssignment_0_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); } + ( + { before(grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); } + 'contains' + { after(grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); } + ) + { after(grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__ReferenceTypeAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationCrossReference_1_0()); } + ( + { before(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationIDTerminalRuleCall_1_0_1()); } + RULE_ID + { after(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationIDTerminalRuleCall_1_0_1()); } + ) + { after(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationCrossReference_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__MultiplicityAssignment_3 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getReferenceDeclarationAccess().getMultiplicityMultiplicityParserRuleCall_3_0()); } + ruleMultiplicity + { after(grammarAccess.getReferenceDeclarationAccess().getMultiplicityMultiplicityParserRuleCall_3_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__NameAssignment_5 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getReferenceDeclarationAccess().getNameIDTerminalRuleCall_5_0()); } + RULE_ID + { after(grammarAccess.getReferenceDeclarationAccess().getNameIDTerminalRuleCall_5_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ReferenceDeclaration__OppositeAssignment_6_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationCrossReference_6_1_0()); } + ( + { before(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationQualifiedNameParserRuleCall_6_1_0_1()); } + ruleQualifiedName + { after(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationQualifiedNameParserRuleCall_6_1_0_1()); } + ) + { after(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationCrossReference_6_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__ErrorAssignment_0_0_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); } + ( + { before(grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); } + 'error' + { after(grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); } + ) + { after(grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__NameAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getPredicateDefinitionAccess().getNameIDTerminalRuleCall_1_0()); } + RULE_ID + { after(grammarAccess.getPredicateDefinitionAccess().getNameIDTerminalRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__ParametersAssignment_3_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_0_0()); } + ruleParameter + { after(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__ParametersAssignment_3_1_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_1_1_0()); } + ruleParameter + { after(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_1_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__BodiesAssignment_5_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_1_0()); } + ruleConjunction + { after(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__PredicateDefinition__BodiesAssignment_5_2_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_2_1_0()); } + ruleConjunction + { after(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_2_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__ParameterTypeAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getParameterAccess().getParameterTypeClassDeclarationCrossReference_0_0()); } + ( + { before(grammarAccess.getParameterAccess().getParameterTypeClassDeclarationIDTerminalRuleCall_0_0_1()); } + RULE_ID + { after(grammarAccess.getParameterAccess().getParameterTypeClassDeclarationIDTerminalRuleCall_0_0_1()); } + ) + { after(grammarAccess.getParameterAccess().getParameterTypeClassDeclarationCrossReference_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__NameAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_1_0()); } + RULE_ID + { after(grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Conjunction__LiteralsAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_0_0()); } + ruleLiteral + { after(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Conjunction__LiteralsAssignment_1_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_1_1_0()); } + ruleLiteral + { after(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_1_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__NegativeLiteral__AtomAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0()); } + ruleAtom + { after(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__RelationAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAtomAccess().getRelationRelationCrossReference_0_0()); } + ( + { before(grammarAccess.getAtomAccess().getRelationRelationQualifiedNameParserRuleCall_0_0_1()); } + ruleQualifiedName + { after(grammarAccess.getAtomAccess().getRelationRelationQualifiedNameParserRuleCall_0_0_1()); } + ) + { after(grammarAccess.getAtomAccess().getRelationRelationCrossReference_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__TransitiveClosureAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); } + ( + { before(grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); } + '+' + { after(grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); } + ) + { after(grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__ArgumentsAssignment_3_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_0_0()); } + ( + { before(grammarAccess.getAtomAccess().getArgumentsVariableIDTerminalRuleCall_3_0_0_1()); } + RULE_ID + { after(grammarAccess.getAtomAccess().getArgumentsVariableIDTerminalRuleCall_3_0_0_1()); } + ) + { after(grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Atom__ArgumentsAssignment_3_1_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_1_1_0()); } + ( + { before(grammarAccess.getAtomAccess().getArgumentsVariableIDTerminalRuleCall_3_1_1_0_1()); } + RULE_ID + { after(grammarAccess.getAtomAccess().getArgumentsVariableIDTerminalRuleCall_3_1_1_0_1()); } + ) + { after(grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_1_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__RelationAssignment_0_0_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_0_0_0()); } + ( + { before(grammarAccess.getAssertionAccess().getRelationRelationQualifiedNameParserRuleCall_0_0_0_0_1()); } + ruleQualifiedName + { after(grammarAccess.getAssertionAccess().getRelationRelationQualifiedNameParserRuleCall_0_0_0_0_1()); } + ) + { after(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_0_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__ArgumentsAssignment_0_0_2_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_0_0()); } + ( + { before(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_0_2_0_0_1()); } + ruleQualifiedName + { after(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_0_2_0_0_1()); } + ) + { after(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__ArgumentsAssignment_0_0_2_1_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_1_1_0()); } + ( + { before(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_0_2_1_1_0_1()); } + ruleQualifiedName + { after(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_0_2_1_1_0_1()); } + ) + { after(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_1_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__ValueAssignment_0_0_5 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAssertionAccess().getValueLogicValueEnumRuleCall_0_0_5_0()); } + ruleLogicValue + { after(grammarAccess.getAssertionAccess().getValueLogicValueEnumRuleCall_0_0_5_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__ValueAssignment_0_1_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAssertionAccess().getValueShortLogicValueEnumRuleCall_0_1_0_0()); } + ruleShortLogicValue + { after(grammarAccess.getAssertionAccess().getValueShortLogicValueEnumRuleCall_0_1_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__RelationAssignment_0_1_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_1_1_0()); } + ( + { before(grammarAccess.getAssertionAccess().getRelationRelationQualifiedNameParserRuleCall_0_1_1_0_1()); } + ruleQualifiedName + { after(grammarAccess.getAssertionAccess().getRelationRelationQualifiedNameParserRuleCall_0_1_1_0_1()); } + ) + { after(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_1_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__ArgumentsAssignment_0_1_3_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_0_0()); } + ( + { before(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_1_3_0_0_1()); } + ruleQualifiedName + { after(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_1_3_0_0_1()); } + ) + { after(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Assertion__ArgumentsAssignment_0_1_3_1_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_1_1_0()); } + ( + { before(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_1_3_1_1_0_1()); } + ruleQualifiedName + { after(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_1_3_1_1_0_1()); } + ) + { after(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_1_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__TypeScopesAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_1_0()); } + ruleTypeScope + { after(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ScopeDeclaration__TypeScopesAssignment_2_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_2_1_0()); } + ruleTypeScope + { after(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_2_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__TypeScope__TargetTypeAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationCrossReference_0_0()); } + ( + { before(grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationIDTerminalRuleCall_0_0_1()); } + RULE_ID + { after(grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationIDTerminalRuleCall_0_0_1()); } + ) + { after(grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationCrossReference_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__TypeScope__IncrementAssignment_1_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); } + ( + { before(grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); } + '+=' + { after(grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); } + ) + { after(grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__TypeScope__MultiplicityAssignment_2 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getTypeScopeAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); } + ruleMultiplicity + { after(grammarAccess.getTypeScopeAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__RangeMultiplicity__LowerBoundAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0()); } + RULE_INT + { after(grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__RangeMultiplicity__UpperBoundAssignment_2 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0()); } + ruleUpperBound + { after(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ExactMultiplicity__ExactValueAssignment + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0()); } + RULE_INT + { after(grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; + +RULE_INT : ('0'..'9')+; + +RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); + +RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; + +RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; + +RULE_WS : (' '|'\t'|'\r'|'\n')+; + +RULE_ANY_OTHER : .; diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblem.tokens b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblem.tokens new file mode 100644 index 00000000..b3c4a1ea --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblem.tokens @@ -0,0 +1,65 @@ +'!'=18 +'('=27 +')'=28 +'*'=14 +'+'=38 +'+='=39 +','=25 +'.'=21 +'..'=33 +':'=31 +'::'=34 +':='=29 +';'=30 +'='=13 +'?'=19 +'['=23 +']'=24 +'abstract'=35 +'class'=20 +'contains'=36 +'error'=37 +'extends'=22 +'false'=16 +'opposite'=26 +'pred'=12 +'refers'=11 +'scope'=32 +'true'=15 +'unknown'=17 +RULE_ANY_OTHER=10 +RULE_ID=5 +RULE_INT=4 +RULE_ML_COMMENT=7 +RULE_SL_COMMENT=8 +RULE_STRING=6 +RULE_WS=9 +T__11=11 +T__12=12 +T__13=13 +T__14=14 +T__15=15 +T__16=16 +T__17=17 +T__18=18 +T__19=19 +T__20=20 +T__21=21 +T__22=22 +T__23=23 +T__24=24 +T__25=25 +T__26=26 +T__27=27 +T__28=28 +T__29=29 +T__30=30 +T__31=31 +T__32=32 +T__33=33 +T__34=34 +T__35=35 +T__36=36 +T__37=37 +T__38=38 +T__39=39 diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblemLexer.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblemLexer.java new file mode 100644 index 00000000..0bd65406 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblemLexer.java @@ -0,0 +1,1699 @@ +package org.eclipse.viatra.solver.language.ide.contentassist.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer; + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalProblemLexer extends Lexer { + public static final int RULE_STRING=6; + public static final int RULE_SL_COMMENT=8; + public static final int T__19=19; + public static final int T__15=15; + public static final int T__37=37; + public static final int T__16=16; + public static final int T__38=38; + public static final int T__17=17; + public static final int T__39=39; + public static final int T__18=18; + public static final int T__11=11; + public static final int T__33=33; + public static final int T__12=12; + public static final int T__34=34; + public static final int T__13=13; + public static final int T__35=35; + public static final int T__14=14; + public static final int T__36=36; + public static final int EOF=-1; + public static final int T__30=30; + public static final int T__31=31; + public static final int T__32=32; + public static final int RULE_ID=5; + public static final int RULE_WS=9; + public static final int RULE_ANY_OTHER=10; + public static final int T__26=26; + public static final int T__27=27; + public static final int T__28=28; + public static final int RULE_INT=4; + public static final int T__29=29; + public static final int T__22=22; + public static final int RULE_ML_COMMENT=7; + public static final int T__23=23; + public static final int T__24=24; + public static final int T__25=25; + public static final int T__20=20; + public static final int T__21=21; + + // delegates + // delegators + + public InternalProblemLexer() {;} + public InternalProblemLexer(CharStream input) { + this(input, new RecognizerSharedState()); + } + public InternalProblemLexer(CharStream input, RecognizerSharedState state) { + super(input,state); + + } + public String getGrammarFileName() { return "InternalProblem.g"; } + + // $ANTLR start "T__11" + public final void mT__11() throws RecognitionException { + try { + int _type = T__11; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:11:7: ( 'refers' ) + // InternalProblem.g:11:9: 'refers' + { + match("refers"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__11" + + // $ANTLR start "T__12" + public final void mT__12() throws RecognitionException { + try { + int _type = T__12; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:12:7: ( 'pred' ) + // InternalProblem.g:12:9: 'pred' + { + match("pred"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__12" + + // $ANTLR start "T__13" + public final void mT__13() throws RecognitionException { + try { + int _type = T__13; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:13:7: ( '=' ) + // InternalProblem.g:13:9: '=' + { + match('='); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__13" + + // $ANTLR start "T__14" + public final void mT__14() throws RecognitionException { + try { + int _type = T__14; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:14:7: ( '*' ) + // InternalProblem.g:14:9: '*' + { + match('*'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__14" + + // $ANTLR start "T__15" + public final void mT__15() throws RecognitionException { + try { + int _type = T__15; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:15:7: ( 'true' ) + // InternalProblem.g:15:9: 'true' + { + match("true"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__15" + + // $ANTLR start "T__16" + public final void mT__16() throws RecognitionException { + try { + int _type = T__16; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:16:7: ( 'false' ) + // InternalProblem.g:16:9: 'false' + { + match("false"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__16" + + // $ANTLR start "T__17" + public final void mT__17() throws RecognitionException { + try { + int _type = T__17; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:17:7: ( 'unknown' ) + // InternalProblem.g:17:9: 'unknown' + { + match("unknown"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__17" + + // $ANTLR start "T__18" + public final void mT__18() throws RecognitionException { + try { + int _type = T__18; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:18:7: ( '!' ) + // InternalProblem.g:18:9: '!' + { + match('!'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__18" + + // $ANTLR start "T__19" + public final void mT__19() throws RecognitionException { + try { + int _type = T__19; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:19:7: ( '?' ) + // InternalProblem.g:19:9: '?' + { + match('?'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__19" + + // $ANTLR start "T__20" + public final void mT__20() throws RecognitionException { + try { + int _type = T__20; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:20:7: ( 'class' ) + // InternalProblem.g:20:9: 'class' + { + match("class"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__20" + + // $ANTLR start "T__21" + public final void mT__21() throws RecognitionException { + try { + int _type = T__21; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:21:7: ( '.' ) + // InternalProblem.g:21:9: '.' + { + match('.'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__21" + + // $ANTLR start "T__22" + public final void mT__22() throws RecognitionException { + try { + int _type = T__22; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:22:7: ( 'extends' ) + // InternalProblem.g:22:9: 'extends' + { + match("extends"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__22" + + // $ANTLR start "T__23" + public final void mT__23() throws RecognitionException { + try { + int _type = T__23; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:23:7: ( '[' ) + // InternalProblem.g:23:9: '[' + { + match('['); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__23" + + // $ANTLR start "T__24" + public final void mT__24() throws RecognitionException { + try { + int _type = T__24; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:24:7: ( ']' ) + // InternalProblem.g:24:9: ']' + { + match(']'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__24" + + // $ANTLR start "T__25" + public final void mT__25() throws RecognitionException { + try { + int _type = T__25; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:25:7: ( ',' ) + // InternalProblem.g:25:9: ',' + { + match(','); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__25" + + // $ANTLR start "T__26" + public final void mT__26() throws RecognitionException { + try { + int _type = T__26; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:26:7: ( 'opposite' ) + // InternalProblem.g:26:9: 'opposite' + { + match("opposite"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__26" + + // $ANTLR start "T__27" + public final void mT__27() throws RecognitionException { + try { + int _type = T__27; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:27:7: ( '(' ) + // InternalProblem.g:27:9: '(' + { + match('('); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__27" + + // $ANTLR start "T__28" + public final void mT__28() throws RecognitionException { + try { + int _type = T__28; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:28:7: ( ')' ) + // InternalProblem.g:28:9: ')' + { + match(')'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__28" + + // $ANTLR start "T__29" + public final void mT__29() throws RecognitionException { + try { + int _type = T__29; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:29:7: ( ':=' ) + // InternalProblem.g:29:9: ':=' + { + match(":="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__29" + + // $ANTLR start "T__30" + public final void mT__30() throws RecognitionException { + try { + int _type = T__30; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:30:7: ( ';' ) + // InternalProblem.g:30:9: ';' + { + match(';'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__30" + + // $ANTLR start "T__31" + public final void mT__31() throws RecognitionException { + try { + int _type = T__31; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:31:7: ( ':' ) + // InternalProblem.g:31:9: ':' + { + match(':'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__31" + + // $ANTLR start "T__32" + public final void mT__32() throws RecognitionException { + try { + int _type = T__32; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:32:7: ( 'scope' ) + // InternalProblem.g:32:9: 'scope' + { + match("scope"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__32" + + // $ANTLR start "T__33" + public final void mT__33() throws RecognitionException { + try { + int _type = T__33; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:33:7: ( '..' ) + // InternalProblem.g:33:9: '..' + { + match(".."); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__33" + + // $ANTLR start "T__34" + public final void mT__34() throws RecognitionException { + try { + int _type = T__34; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:34:7: ( '::' ) + // InternalProblem.g:34:9: '::' + { + match("::"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__34" + + // $ANTLR start "T__35" + public final void mT__35() throws RecognitionException { + try { + int _type = T__35; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:35:7: ( 'abstract' ) + // InternalProblem.g:35:9: 'abstract' + { + match("abstract"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__35" + + // $ANTLR start "T__36" + public final void mT__36() throws RecognitionException { + try { + int _type = T__36; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:36:7: ( 'contains' ) + // InternalProblem.g:36:9: 'contains' + { + match("contains"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__36" + + // $ANTLR start "T__37" + public final void mT__37() throws RecognitionException { + try { + int _type = T__37; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:37:7: ( 'error' ) + // InternalProblem.g:37:9: 'error' + { + match("error"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__37" + + // $ANTLR start "T__38" + public final void mT__38() throws RecognitionException { + try { + int _type = T__38; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:38:7: ( '+' ) + // InternalProblem.g:38:9: '+' + { + match('+'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__38" + + // $ANTLR start "T__39" + public final void mT__39() throws RecognitionException { + try { + int _type = T__39; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:39:7: ( '+=' ) + // InternalProblem.g:39:9: '+=' + { + match("+="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__39" + + // $ANTLR start "RULE_ID" + public final void mRULE_ID() throws RecognitionException { + try { + int _type = RULE_ID; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:4194:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // InternalProblem.g:4194:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + { + // InternalProblem.g:4194:11: ( '^' )? + int alt1=2; + int LA1_0 = input.LA(1); + + if ( (LA1_0=='^') ) { + alt1=1; + } + switch (alt1) { + case 1 : + // InternalProblem.g:4194:11: '^' + { + match('^'); + + } + break; + + } + + if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + // InternalProblem.g:4194:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + loop2: + do { + int alt2=2; + int LA2_0 = input.LA(1); + + if ( ((LA2_0>='0' && LA2_0<='9')||(LA2_0>='A' && LA2_0<='Z')||LA2_0=='_'||(LA2_0>='a' && LA2_0<='z')) ) { + alt2=1; + } + + + switch (alt2) { + case 1 : + // InternalProblem.g: + { + if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop2; + } + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ID" + + // $ANTLR start "RULE_INT" + public final void mRULE_INT() throws RecognitionException { + try { + int _type = RULE_INT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:4196:10: ( ( '0' .. '9' )+ ) + // InternalProblem.g:4196:12: ( '0' .. '9' )+ + { + // InternalProblem.g:4196:12: ( '0' .. '9' )+ + int cnt3=0; + loop3: + do { + int alt3=2; + int LA3_0 = input.LA(1); + + if ( ((LA3_0>='0' && LA3_0<='9')) ) { + alt3=1; + } + + + switch (alt3) { + case 1 : + // InternalProblem.g:4196:13: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt3 >= 1 ) break loop3; + EarlyExitException eee = + new EarlyExitException(3, input); + throw eee; + } + cnt3++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_INT" + + // $ANTLR start "RULE_STRING" + public final void mRULE_STRING() throws RecognitionException { + try { + int _type = RULE_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:4198:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // InternalProblem.g:4198:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + { + // InternalProblem.g:4198:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + int alt6=2; + int LA6_0 = input.LA(1); + + if ( (LA6_0=='\"') ) { + alt6=1; + } + else if ( (LA6_0=='\'') ) { + alt6=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 6, 0, input); + + throw nvae; + } + switch (alt6) { + case 1 : + // InternalProblem.g:4198:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + { + match('\"'); + // InternalProblem.g:4198:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + loop4: + do { + int alt4=3; + int LA4_0 = input.LA(1); + + if ( (LA4_0=='\\') ) { + alt4=1; + } + else if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\uFFFF')) ) { + alt4=2; + } + + + switch (alt4) { + case 1 : + // InternalProblem.g:4198:21: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalProblem.g:4198:28: ~ ( ( '\\\\' | '\"' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop4; + } + } while (true); + + match('\"'); + + } + break; + case 2 : + // InternalProblem.g:4198:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + { + match('\''); + // InternalProblem.g:4198:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + loop5: + do { + int alt5=3; + int LA5_0 = input.LA(1); + + if ( (LA5_0=='\\') ) { + alt5=1; + } + else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\uFFFF')) ) { + alt5=2; + } + + + switch (alt5) { + case 1 : + // InternalProblem.g:4198:54: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalProblem.g:4198:61: ~ ( ( '\\\\' | '\\'' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop5; + } + } while (true); + + match('\''); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_STRING" + + // $ANTLR start "RULE_ML_COMMENT" + public final void mRULE_ML_COMMENT() throws RecognitionException { + try { + int _type = RULE_ML_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:4200:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // InternalProblem.g:4200:19: '/*' ( options {greedy=false; } : . )* '*/' + { + match("/*"); + + // InternalProblem.g:4200:24: ( options {greedy=false; } : . )* + loop7: + do { + int alt7=2; + int LA7_0 = input.LA(1); + + if ( (LA7_0=='*') ) { + int LA7_1 = input.LA(2); + + if ( (LA7_1=='/') ) { + alt7=2; + } + else if ( ((LA7_1>='\u0000' && LA7_1<='.')||(LA7_1>='0' && LA7_1<='\uFFFF')) ) { + alt7=1; + } + + + } + else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFF')) ) { + alt7=1; + } + + + switch (alt7) { + case 1 : + // InternalProblem.g:4200:52: . + { + matchAny(); + + } + break; + + default : + break loop7; + } + } while (true); + + match("*/"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ML_COMMENT" + + // $ANTLR start "RULE_SL_COMMENT" + public final void mRULE_SL_COMMENT() throws RecognitionException { + try { + int _type = RULE_SL_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:4202:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // InternalProblem.g:4202:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + { + match("//"); + + // InternalProblem.g:4202:24: (~ ( ( '\\n' | '\\r' ) ) )* + loop8: + do { + int alt8=2; + int LA8_0 = input.LA(1); + + if ( ((LA8_0>='\u0000' && LA8_0<='\t')||(LA8_0>='\u000B' && LA8_0<='\f')||(LA8_0>='\u000E' && LA8_0<='\uFFFF')) ) { + alt8=1; + } + + + switch (alt8) { + case 1 : + // InternalProblem.g:4202:24: ~ ( ( '\\n' | '\\r' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop8; + } + } while (true); + + // InternalProblem.g:4202:40: ( ( '\\r' )? '\\n' )? + int alt10=2; + int LA10_0 = input.LA(1); + + if ( (LA10_0=='\n'||LA10_0=='\r') ) { + alt10=1; + } + switch (alt10) { + case 1 : + // InternalProblem.g:4202:41: ( '\\r' )? '\\n' + { + // InternalProblem.g:4202:41: ( '\\r' )? + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0=='\r') ) { + alt9=1; + } + switch (alt9) { + case 1 : + // InternalProblem.g:4202:41: '\\r' + { + match('\r'); + + } + break; + + } + + match('\n'); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SL_COMMENT" + + // $ANTLR start "RULE_WS" + public final void mRULE_WS() throws RecognitionException { + try { + int _type = RULE_WS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:4204:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) + // InternalProblem.g:4204:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + { + // InternalProblem.g:4204:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + int cnt11=0; + loop11: + do { + int alt11=2; + int LA11_0 = input.LA(1); + + if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) { + alt11=1; + } + + + switch (alt11) { + case 1 : + // InternalProblem.g: + { + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + if ( cnt11 >= 1 ) break loop11; + EarlyExitException eee = + new EarlyExitException(11, input); + throw eee; + } + cnt11++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_WS" + + // $ANTLR start "RULE_ANY_OTHER" + public final void mRULE_ANY_OTHER() throws RecognitionException { + try { + int _type = RULE_ANY_OTHER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:4206:16: ( . ) + // InternalProblem.g:4206:18: . + { + matchAny(); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ANY_OTHER" + + public void mTokens() throws RecognitionException { + // InternalProblem.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER ) + int alt12=36; + alt12 = dfa12.predict(input); + switch (alt12) { + case 1 : + // InternalProblem.g:1:10: T__11 + { + mT__11(); + + } + break; + case 2 : + // InternalProblem.g:1:16: T__12 + { + mT__12(); + + } + break; + case 3 : + // InternalProblem.g:1:22: T__13 + { + mT__13(); + + } + break; + case 4 : + // InternalProblem.g:1:28: T__14 + { + mT__14(); + + } + break; + case 5 : + // InternalProblem.g:1:34: T__15 + { + mT__15(); + + } + break; + case 6 : + // InternalProblem.g:1:40: T__16 + { + mT__16(); + + } + break; + case 7 : + // InternalProblem.g:1:46: T__17 + { + mT__17(); + + } + break; + case 8 : + // InternalProblem.g:1:52: T__18 + { + mT__18(); + + } + break; + case 9 : + // InternalProblem.g:1:58: T__19 + { + mT__19(); + + } + break; + case 10 : + // InternalProblem.g:1:64: T__20 + { + mT__20(); + + } + break; + case 11 : + // InternalProblem.g:1:70: T__21 + { + mT__21(); + + } + break; + case 12 : + // InternalProblem.g:1:76: T__22 + { + mT__22(); + + } + break; + case 13 : + // InternalProblem.g:1:82: T__23 + { + mT__23(); + + } + break; + case 14 : + // InternalProblem.g:1:88: T__24 + { + mT__24(); + + } + break; + case 15 : + // InternalProblem.g:1:94: T__25 + { + mT__25(); + + } + break; + case 16 : + // InternalProblem.g:1:100: T__26 + { + mT__26(); + + } + break; + case 17 : + // InternalProblem.g:1:106: T__27 + { + mT__27(); + + } + break; + case 18 : + // InternalProblem.g:1:112: T__28 + { + mT__28(); + + } + break; + case 19 : + // InternalProblem.g:1:118: T__29 + { + mT__29(); + + } + break; + case 20 : + // InternalProblem.g:1:124: T__30 + { + mT__30(); + + } + break; + case 21 : + // InternalProblem.g:1:130: T__31 + { + mT__31(); + + } + break; + case 22 : + // InternalProblem.g:1:136: T__32 + { + mT__32(); + + } + break; + case 23 : + // InternalProblem.g:1:142: T__33 + { + mT__33(); + + } + break; + case 24 : + // InternalProblem.g:1:148: T__34 + { + mT__34(); + + } + break; + case 25 : + // InternalProblem.g:1:154: T__35 + { + mT__35(); + + } + break; + case 26 : + // InternalProblem.g:1:160: T__36 + { + mT__36(); + + } + break; + case 27 : + // InternalProblem.g:1:166: T__37 + { + mT__37(); + + } + break; + case 28 : + // InternalProblem.g:1:172: T__38 + { + mT__38(); + + } + break; + case 29 : + // InternalProblem.g:1:178: T__39 + { + mT__39(); + + } + break; + case 30 : + // InternalProblem.g:1:184: RULE_ID + { + mRULE_ID(); + + } + break; + case 31 : + // InternalProblem.g:1:192: RULE_INT + { + mRULE_INT(); + + } + break; + case 32 : + // InternalProblem.g:1:201: RULE_STRING + { + mRULE_STRING(); + + } + break; + case 33 : + // InternalProblem.g:1:213: RULE_ML_COMMENT + { + mRULE_ML_COMMENT(); + + } + break; + case 34 : + // InternalProblem.g:1:229: RULE_SL_COMMENT + { + mRULE_SL_COMMENT(); + + } + break; + case 35 : + // InternalProblem.g:1:245: RULE_WS + { + mRULE_WS(); + + } + break; + case 36 : + // InternalProblem.g:1:253: RULE_ANY_OTHER + { + mRULE_ANY_OTHER(); + + } + break; + + } + + } + + + protected DFA12 dfa12 = new DFA12(this); + static final String DFA12_eotS = + "\1\uffff\2\41\2\uffff\3\41\2\uffff\1\41\1\55\1\41\3\uffff\1\41\2\uffff\1\70\1\uffff\2\41\1\75\1\37\2\uffff\3\37\2\uffff\1\41\1\uffff\1\41\2\uffff\3\41\2\uffff\2\41\2\uffff\2\41\3\uffff\1\41\6\uffff\2\41\7\uffff\15\41\1\134\1\135\12\41\2\uffff\1\150\1\41\1\152\2\41\1\155\1\41\1\157\1\41\1\161\1\uffff\1\41\1\uffff\2\41\1\uffff\1\41\1\uffff\1\41\1\uffff\1\167\1\41\1\171\2\41\1\uffff\1\174\1\uffff\1\175\1\176\3\uffff"; + static final String DFA12_eofS = + "\177\uffff"; + static final String DFA12_minS = + "\1\0\1\145\1\162\2\uffff\1\162\1\141\1\156\2\uffff\1\154\1\56\1\162\3\uffff\1\160\2\uffff\1\72\1\uffff\1\143\1\142\1\75\1\101\2\uffff\2\0\1\52\2\uffff\1\146\1\uffff\1\145\2\uffff\1\165\1\154\1\153\2\uffff\1\141\1\156\2\uffff\1\164\1\162\3\uffff\1\160\6\uffff\1\157\1\163\7\uffff\1\145\1\144\1\145\1\163\1\156\1\163\1\164\1\145\2\157\1\160\1\164\1\162\2\60\1\145\1\157\1\163\1\141\1\156\1\162\1\163\1\145\1\162\1\163\2\uffff\1\60\1\167\1\60\1\151\1\144\1\60\1\151\1\60\1\141\1\60\1\uffff\1\156\1\uffff\1\156\1\163\1\uffff\1\164\1\uffff\1\143\1\uffff\1\60\1\163\1\60\1\145\1\164\1\uffff\1\60\1\uffff\2\60\3\uffff"; + static final String DFA12_maxS = + "\1\uffff\1\145\1\162\2\uffff\1\162\1\141\1\156\2\uffff\1\157\1\56\1\170\3\uffff\1\160\2\uffff\1\75\1\uffff\1\143\1\142\1\75\1\172\2\uffff\2\uffff\1\57\2\uffff\1\146\1\uffff\1\145\2\uffff\1\165\1\154\1\153\2\uffff\1\141\1\156\2\uffff\1\164\1\162\3\uffff\1\160\6\uffff\1\157\1\163\7\uffff\1\145\1\144\1\145\1\163\1\156\1\163\1\164\1\145\2\157\1\160\1\164\1\162\2\172\1\145\1\157\1\163\1\141\1\156\1\162\1\163\1\145\1\162\1\163\2\uffff\1\172\1\167\1\172\1\151\1\144\1\172\1\151\1\172\1\141\1\172\1\uffff\1\156\1\uffff\1\156\1\163\1\uffff\1\164\1\uffff\1\143\1\uffff\1\172\1\163\1\172\1\145\1\164\1\uffff\1\172\1\uffff\2\172\3\uffff"; + static final String DFA12_acceptS = + "\3\uffff\1\3\1\4\3\uffff\1\10\1\11\3\uffff\1\15\1\16\1\17\1\uffff\1\21\1\22\1\uffff\1\24\4\uffff\1\36\1\37\3\uffff\1\43\1\44\1\uffff\1\36\1\uffff\1\3\1\4\3\uffff\1\10\1\11\2\uffff\1\27\1\13\2\uffff\1\15\1\16\1\17\1\uffff\1\21\1\22\1\23\1\30\1\25\1\24\2\uffff\1\35\1\34\1\37\1\40\1\41\1\42\1\43\31\uffff\1\2\1\5\12\uffff\1\6\1\uffff\1\12\2\uffff\1\33\1\uffff\1\26\1\uffff\1\1\5\uffff\1\7\1\uffff\1\14\2\uffff\1\32\1\20\1\31"; + static final String DFA12_specialS = + "\1\1\32\uffff\1\2\1\0\142\uffff}>"; + static final String[] DFA12_transitionS = { + "\11\37\2\36\2\37\1\36\22\37\1\36\1\10\1\33\4\37\1\34\1\21\1\22\1\4\1\27\1\17\1\37\1\13\1\35\12\32\1\23\1\24\1\37\1\3\1\37\1\11\1\37\32\31\1\15\1\37\1\16\1\30\1\31\1\37\1\26\1\31\1\12\1\31\1\14\1\6\10\31\1\20\1\2\1\31\1\1\1\25\1\5\1\7\5\31\uff85\37", + "\1\40", + "\1\42", + "", + "", + "\1\45", + "\1\46", + "\1\47", + "", + "", + "\1\52\2\uffff\1\53", + "\1\54", + "\1\57\5\uffff\1\56", + "", + "", + "", + "\1\63", + "", + "", + "\1\67\2\uffff\1\66", + "", + "\1\72", + "\1\73", + "\1\74", + "\32\41\4\uffff\1\41\1\uffff\32\41", + "", + "", + "\0\77", + "\0\77", + "\1\100\4\uffff\1\101", + "", + "", + "\1\103", + "", + "\1\104", + "", + "", + "\1\105", + "\1\106", + "\1\107", + "", + "", + "\1\110", + "\1\111", + "", + "", + "\1\112", + "\1\113", + "", + "", + "", + "\1\114", + "", + "", + "", + "", + "", + "", + "\1\115", + "\1\116", + "", + "", + "", + "", + "", + "", + "", + "\1\117", + "\1\120", + "\1\121", + "\1\122", + "\1\123", + "\1\124", + "\1\125", + "\1\126", + "\1\127", + "\1\130", + "\1\131", + "\1\132", + "\1\133", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\136", + "\1\137", + "\1\140", + "\1\141", + "\1\142", + "\1\143", + "\1\144", + "\1\145", + "\1\146", + "\1\147", + "", + "", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\151", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\153", + "\1\154", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\156", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\160", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "", + "\1\162", + "", + "\1\163", + "\1\164", + "", + "\1\165", + "", + "\1\166", + "", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\170", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\172", + "\1\173", + "", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "", + "", + "" + }; + + static final short[] DFA12_eot = DFA.unpackEncodedString(DFA12_eotS); + static final short[] DFA12_eof = DFA.unpackEncodedString(DFA12_eofS); + static final char[] DFA12_min = DFA.unpackEncodedStringToUnsignedChars(DFA12_minS); + static final char[] DFA12_max = DFA.unpackEncodedStringToUnsignedChars(DFA12_maxS); + static final short[] DFA12_accept = DFA.unpackEncodedString(DFA12_acceptS); + static final short[] DFA12_special = DFA.unpackEncodedString(DFA12_specialS); + static final short[][] DFA12_transition; + + static { + int numStates = DFA12_transitionS.length; + DFA12_transition = new short[numStates][]; + for (int i=0; i='\u0000' && LA12_28<='\uFFFF')) ) {s = 63;} + + else s = 31; + + if ( s>=0 ) return s; + break; + case 1 : + int LA12_0 = input.LA(1); + + s = -1; + if ( (LA12_0=='r') ) {s = 1;} + + else if ( (LA12_0=='p') ) {s = 2;} + + else if ( (LA12_0=='=') ) {s = 3;} + + else if ( (LA12_0=='*') ) {s = 4;} + + else if ( (LA12_0=='t') ) {s = 5;} + + else if ( (LA12_0=='f') ) {s = 6;} + + else if ( (LA12_0=='u') ) {s = 7;} + + else if ( (LA12_0=='!') ) {s = 8;} + + else if ( (LA12_0=='?') ) {s = 9;} + + else if ( (LA12_0=='c') ) {s = 10;} + + else if ( (LA12_0=='.') ) {s = 11;} + + else if ( (LA12_0=='e') ) {s = 12;} + + else if ( (LA12_0=='[') ) {s = 13;} + + else if ( (LA12_0==']') ) {s = 14;} + + else if ( (LA12_0==',') ) {s = 15;} + + else if ( (LA12_0=='o') ) {s = 16;} + + else if ( (LA12_0=='(') ) {s = 17;} + + else if ( (LA12_0==')') ) {s = 18;} + + else if ( (LA12_0==':') ) {s = 19;} + + else if ( (LA12_0==';') ) {s = 20;} + + else if ( (LA12_0=='s') ) {s = 21;} + + else if ( (LA12_0=='a') ) {s = 22;} + + else if ( (LA12_0=='+') ) {s = 23;} + + else if ( (LA12_0=='^') ) {s = 24;} + + else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||LA12_0=='b'||LA12_0=='d'||(LA12_0>='g' && LA12_0<='n')||LA12_0=='q'||(LA12_0>='v' && LA12_0<='z')) ) {s = 25;} + + else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 26;} + + else if ( (LA12_0=='\"') ) {s = 27;} + + else if ( (LA12_0=='\'') ) {s = 28;} + + else if ( (LA12_0=='/') ) {s = 29;} + + else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 30;} + + else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||(LA12_0>='#' && LA12_0<='&')||LA12_0=='-'||LA12_0=='<'||LA12_0=='>'||LA12_0=='@'||LA12_0=='\\'||LA12_0=='`'||(LA12_0>='{' && LA12_0<='\uFFFF')) ) {s = 31;} + + if ( s>=0 ) return s; + break; + case 2 : + int LA12_27 = input.LA(1); + + s = -1; + if ( ((LA12_27>='\u0000' && LA12_27<='\uFFFF')) ) {s = 63;} + + else s = 31; + + if ( s>=0 ) return s; + break; + } + NoViableAltException nvae = + new NoViableAltException(getDescription(), 12, _s, input); + error(nvae); + throw nvae; + } + } + + +} \ No newline at end of file diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblemParser.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblemParser.java new file mode 100644 index 00000000..1169b189 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.ide/src/main/xtext-gen/org/eclipse/viatra/solver/language/ide/contentassist/antlr/internal/InternalProblemParser.java @@ -0,0 +1,12761 @@ +package org.eclipse.viatra.solver.language.ide.contentassist.antlr.internal; + +import java.io.InputStream; +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.DFA; +import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; + + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalProblemParser extends AbstractInternalContentAssistParser { + public static final String[] tokenNames = new String[] { + "", "", "", "", "RULE_INT", "RULE_ID", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'refers'", "'pred'", "'='", "'*'", "'true'", "'false'", "'unknown'", "'!'", "'?'", "'class'", "'.'", "'extends'", "'['", "']'", "','", "'opposite'", "'('", "')'", "':='", "';'", "':'", "'scope'", "'..'", "'::'", "'abstract'", "'contains'", "'error'", "'+'", "'+='" + }; + public static final int RULE_STRING=6; + public static final int RULE_SL_COMMENT=8; + public static final int T__19=19; + public static final int T__15=15; + public static final int T__37=37; + public static final int T__16=16; + public static final int T__38=38; + public static final int T__17=17; + public static final int T__39=39; + public static final int T__18=18; + public static final int T__11=11; + public static final int T__33=33; + public static final int T__12=12; + public static final int T__34=34; + public static final int T__13=13; + public static final int T__35=35; + public static final int T__14=14; + public static final int T__36=36; + public static final int EOF=-1; + public static final int T__30=30; + public static final int T__31=31; + public static final int T__32=32; + public static final int RULE_ID=5; + public static final int RULE_WS=9; + public static final int RULE_ANY_OTHER=10; + public static final int T__26=26; + public static final int T__27=27; + public static final int T__28=28; + public static final int RULE_INT=4; + public static final int T__29=29; + public static final int T__22=22; + public static final int RULE_ML_COMMENT=7; + public static final int T__23=23; + public static final int T__24=24; + public static final int T__25=25; + public static final int T__20=20; + public static final int T__21=21; + + // delegates + // delegators + + + public InternalProblemParser(TokenStream input) { + this(input, new RecognizerSharedState()); + } + public InternalProblemParser(TokenStream input, RecognizerSharedState state) { + super(input, state); + + } + + + public String[] getTokenNames() { return InternalProblemParser.tokenNames; } + public String getGrammarFileName() { return "InternalProblem.g"; } + + + private ProblemGrammarAccess grammarAccess; + + public void setGrammarAccess(ProblemGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } + + @Override + protected Grammar getGrammar() { + return grammarAccess.getGrammar(); + } + + @Override + protected String getValueForTokenName(String tokenName) { + return tokenName; + } + + + + // $ANTLR start "entryRuleProblem" + // InternalProblem.g:53:1: entryRuleProblem : ruleProblem EOF ; + public final void entryRuleProblem() throws RecognitionException { + try { + // InternalProblem.g:54:1: ( ruleProblem EOF ) + // InternalProblem.g:55:1: ruleProblem EOF + { + before(grammarAccess.getProblemRule()); + pushFollow(FOLLOW_1); + ruleProblem(); + + state._fsp--; + + after(grammarAccess.getProblemRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleProblem" + + + // $ANTLR start "ruleProblem" + // InternalProblem.g:62:1: ruleProblem : ( ( rule__Problem__StatementsAssignment )* ) ; + public final void ruleProblem() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:66:2: ( ( ( rule__Problem__StatementsAssignment )* ) ) + // InternalProblem.g:67:2: ( ( rule__Problem__StatementsAssignment )* ) + { + // InternalProblem.g:67:2: ( ( rule__Problem__StatementsAssignment )* ) + // InternalProblem.g:68:3: ( rule__Problem__StatementsAssignment )* + { + before(grammarAccess.getProblemAccess().getStatementsAssignment()); + // InternalProblem.g:69:3: ( rule__Problem__StatementsAssignment )* + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); + + if ( (LA1_0==RULE_ID||LA1_0==12||(LA1_0>=18 && LA1_0<=20)||LA1_0==32||LA1_0==35||LA1_0==37) ) { + alt1=1; + } + + + switch (alt1) { + case 1 : + // InternalProblem.g:69:4: rule__Problem__StatementsAssignment + { + pushFollow(FOLLOW_3); + rule__Problem__StatementsAssignment(); + + state._fsp--; + + + } + break; + + default : + break loop1; + } + } while (true); + + after(grammarAccess.getProblemAccess().getStatementsAssignment()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleProblem" + + + // $ANTLR start "entryRuleStatement" + // InternalProblem.g:78:1: entryRuleStatement : ruleStatement EOF ; + public final void entryRuleStatement() throws RecognitionException { + try { + // InternalProblem.g:79:1: ( ruleStatement EOF ) + // InternalProblem.g:80:1: ruleStatement EOF + { + before(grammarAccess.getStatementRule()); + pushFollow(FOLLOW_1); + ruleStatement(); + + state._fsp--; + + after(grammarAccess.getStatementRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleStatement" + + + // $ANTLR start "ruleStatement" + // InternalProblem.g:87:1: ruleStatement : ( ( rule__Statement__Alternatives ) ) ; + public final void ruleStatement() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:91:2: ( ( ( rule__Statement__Alternatives ) ) ) + // InternalProblem.g:92:2: ( ( rule__Statement__Alternatives ) ) + { + // InternalProblem.g:92:2: ( ( rule__Statement__Alternatives ) ) + // InternalProblem.g:93:3: ( rule__Statement__Alternatives ) + { + before(grammarAccess.getStatementAccess().getAlternatives()); + // InternalProblem.g:94:3: ( rule__Statement__Alternatives ) + // InternalProblem.g:94:4: rule__Statement__Alternatives + { + pushFollow(FOLLOW_2); + rule__Statement__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getStatementAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleStatement" + + + // $ANTLR start "entryRuleClassDeclaration" + // InternalProblem.g:103:1: entryRuleClassDeclaration : ruleClassDeclaration EOF ; + public final void entryRuleClassDeclaration() throws RecognitionException { + try { + // InternalProblem.g:104:1: ( ruleClassDeclaration EOF ) + // InternalProblem.g:105:1: ruleClassDeclaration EOF + { + before(grammarAccess.getClassDeclarationRule()); + pushFollow(FOLLOW_1); + ruleClassDeclaration(); + + state._fsp--; + + after(grammarAccess.getClassDeclarationRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleClassDeclaration" + + + // $ANTLR start "ruleClassDeclaration" + // InternalProblem.g:112:1: ruleClassDeclaration : ( ( rule__ClassDeclaration__Group__0 ) ) ; + public final void ruleClassDeclaration() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:116:2: ( ( ( rule__ClassDeclaration__Group__0 ) ) ) + // InternalProblem.g:117:2: ( ( rule__ClassDeclaration__Group__0 ) ) + { + // InternalProblem.g:117:2: ( ( rule__ClassDeclaration__Group__0 ) ) + // InternalProblem.g:118:3: ( rule__ClassDeclaration__Group__0 ) + { + before(grammarAccess.getClassDeclarationAccess().getGroup()); + // InternalProblem.g:119:3: ( rule__ClassDeclaration__Group__0 ) + // InternalProblem.g:119:4: rule__ClassDeclaration__Group__0 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getClassDeclarationAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleClassDeclaration" + + + // $ANTLR start "entryRuleReferenceDeclaration" + // InternalProblem.g:128:1: entryRuleReferenceDeclaration : ruleReferenceDeclaration EOF ; + public final void entryRuleReferenceDeclaration() throws RecognitionException { + try { + // InternalProblem.g:129:1: ( ruleReferenceDeclaration EOF ) + // InternalProblem.g:130:1: ruleReferenceDeclaration EOF + { + before(grammarAccess.getReferenceDeclarationRule()); + pushFollow(FOLLOW_1); + ruleReferenceDeclaration(); + + state._fsp--; + + after(grammarAccess.getReferenceDeclarationRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleReferenceDeclaration" + + + // $ANTLR start "ruleReferenceDeclaration" + // InternalProblem.g:137:1: ruleReferenceDeclaration : ( ( rule__ReferenceDeclaration__Group__0 ) ) ; + public final void ruleReferenceDeclaration() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:141:2: ( ( ( rule__ReferenceDeclaration__Group__0 ) ) ) + // InternalProblem.g:142:2: ( ( rule__ReferenceDeclaration__Group__0 ) ) + { + // InternalProblem.g:142:2: ( ( rule__ReferenceDeclaration__Group__0 ) ) + // InternalProblem.g:143:3: ( rule__ReferenceDeclaration__Group__0 ) + { + before(grammarAccess.getReferenceDeclarationAccess().getGroup()); + // InternalProblem.g:144:3: ( rule__ReferenceDeclaration__Group__0 ) + // InternalProblem.g:144:4: rule__ReferenceDeclaration__Group__0 + { + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getReferenceDeclarationAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleReferenceDeclaration" + + + // $ANTLR start "entryRulePredicateDefinition" + // InternalProblem.g:153:1: entryRulePredicateDefinition : rulePredicateDefinition EOF ; + public final void entryRulePredicateDefinition() throws RecognitionException { + try { + // InternalProblem.g:154:1: ( rulePredicateDefinition EOF ) + // InternalProblem.g:155:1: rulePredicateDefinition EOF + { + before(grammarAccess.getPredicateDefinitionRule()); + pushFollow(FOLLOW_1); + rulePredicateDefinition(); + + state._fsp--; + + after(grammarAccess.getPredicateDefinitionRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRulePredicateDefinition" + + + // $ANTLR start "rulePredicateDefinition" + // InternalProblem.g:162:1: rulePredicateDefinition : ( ( rule__PredicateDefinition__Group__0 ) ) ; + public final void rulePredicateDefinition() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:166:2: ( ( ( rule__PredicateDefinition__Group__0 ) ) ) + // InternalProblem.g:167:2: ( ( rule__PredicateDefinition__Group__0 ) ) + { + // InternalProblem.g:167:2: ( ( rule__PredicateDefinition__Group__0 ) ) + // InternalProblem.g:168:3: ( rule__PredicateDefinition__Group__0 ) + { + before(grammarAccess.getPredicateDefinitionAccess().getGroup()); + // InternalProblem.g:169:3: ( rule__PredicateDefinition__Group__0 ) + // InternalProblem.g:169:4: rule__PredicateDefinition__Group__0 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getPredicateDefinitionAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rulePredicateDefinition" + + + // $ANTLR start "entryRuleParameter" + // InternalProblem.g:178:1: entryRuleParameter : ruleParameter EOF ; + public final void entryRuleParameter() throws RecognitionException { + try { + // InternalProblem.g:179:1: ( ruleParameter EOF ) + // InternalProblem.g:180:1: ruleParameter EOF + { + before(grammarAccess.getParameterRule()); + pushFollow(FOLLOW_1); + ruleParameter(); + + state._fsp--; + + after(grammarAccess.getParameterRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleParameter" + + + // $ANTLR start "ruleParameter" + // InternalProblem.g:187:1: ruleParameter : ( ( rule__Parameter__Group__0 ) ) ; + public final void ruleParameter() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:191:2: ( ( ( rule__Parameter__Group__0 ) ) ) + // InternalProblem.g:192:2: ( ( rule__Parameter__Group__0 ) ) + { + // InternalProblem.g:192:2: ( ( rule__Parameter__Group__0 ) ) + // InternalProblem.g:193:3: ( rule__Parameter__Group__0 ) + { + before(grammarAccess.getParameterAccess().getGroup()); + // InternalProblem.g:194:3: ( rule__Parameter__Group__0 ) + // InternalProblem.g:194:4: rule__Parameter__Group__0 + { + pushFollow(FOLLOW_2); + rule__Parameter__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getParameterAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleParameter" + + + // $ANTLR start "entryRuleConjunction" + // InternalProblem.g:203:1: entryRuleConjunction : ruleConjunction EOF ; + public final void entryRuleConjunction() throws RecognitionException { + try { + // InternalProblem.g:204:1: ( ruleConjunction EOF ) + // InternalProblem.g:205:1: ruleConjunction EOF + { + before(grammarAccess.getConjunctionRule()); + pushFollow(FOLLOW_1); + ruleConjunction(); + + state._fsp--; + + after(grammarAccess.getConjunctionRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleConjunction" + + + // $ANTLR start "ruleConjunction" + // InternalProblem.g:212:1: ruleConjunction : ( ( rule__Conjunction__Group__0 ) ) ; + public final void ruleConjunction() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:216:2: ( ( ( rule__Conjunction__Group__0 ) ) ) + // InternalProblem.g:217:2: ( ( rule__Conjunction__Group__0 ) ) + { + // InternalProblem.g:217:2: ( ( rule__Conjunction__Group__0 ) ) + // InternalProblem.g:218:3: ( rule__Conjunction__Group__0 ) + { + before(grammarAccess.getConjunctionAccess().getGroup()); + // InternalProblem.g:219:3: ( rule__Conjunction__Group__0 ) + // InternalProblem.g:219:4: rule__Conjunction__Group__0 + { + pushFollow(FOLLOW_2); + rule__Conjunction__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getConjunctionAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleConjunction" + + + // $ANTLR start "entryRuleLiteral" + // InternalProblem.g:228:1: entryRuleLiteral : ruleLiteral EOF ; + public final void entryRuleLiteral() throws RecognitionException { + try { + // InternalProblem.g:229:1: ( ruleLiteral EOF ) + // InternalProblem.g:230:1: ruleLiteral EOF + { + before(grammarAccess.getLiteralRule()); + pushFollow(FOLLOW_1); + ruleLiteral(); + + state._fsp--; + + after(grammarAccess.getLiteralRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleLiteral" + + + // $ANTLR start "ruleLiteral" + // InternalProblem.g:237:1: ruleLiteral : ( ( rule__Literal__Alternatives ) ) ; + public final void ruleLiteral() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:241:2: ( ( ( rule__Literal__Alternatives ) ) ) + // InternalProblem.g:242:2: ( ( rule__Literal__Alternatives ) ) + { + // InternalProblem.g:242:2: ( ( rule__Literal__Alternatives ) ) + // InternalProblem.g:243:3: ( rule__Literal__Alternatives ) + { + before(grammarAccess.getLiteralAccess().getAlternatives()); + // InternalProblem.g:244:3: ( rule__Literal__Alternatives ) + // InternalProblem.g:244:4: rule__Literal__Alternatives + { + pushFollow(FOLLOW_2); + rule__Literal__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getLiteralAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleLiteral" + + + // $ANTLR start "entryRuleNegativeLiteral" + // InternalProblem.g:253:1: entryRuleNegativeLiteral : ruleNegativeLiteral EOF ; + public final void entryRuleNegativeLiteral() throws RecognitionException { + try { + // InternalProblem.g:254:1: ( ruleNegativeLiteral EOF ) + // InternalProblem.g:255:1: ruleNegativeLiteral EOF + { + before(grammarAccess.getNegativeLiteralRule()); + pushFollow(FOLLOW_1); + ruleNegativeLiteral(); + + state._fsp--; + + after(grammarAccess.getNegativeLiteralRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleNegativeLiteral" + + + // $ANTLR start "ruleNegativeLiteral" + // InternalProblem.g:262:1: ruleNegativeLiteral : ( ( rule__NegativeLiteral__Group__0 ) ) ; + public final void ruleNegativeLiteral() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:266:2: ( ( ( rule__NegativeLiteral__Group__0 ) ) ) + // InternalProblem.g:267:2: ( ( rule__NegativeLiteral__Group__0 ) ) + { + // InternalProblem.g:267:2: ( ( rule__NegativeLiteral__Group__0 ) ) + // InternalProblem.g:268:3: ( rule__NegativeLiteral__Group__0 ) + { + before(grammarAccess.getNegativeLiteralAccess().getGroup()); + // InternalProblem.g:269:3: ( rule__NegativeLiteral__Group__0 ) + // InternalProblem.g:269:4: rule__NegativeLiteral__Group__0 + { + pushFollow(FOLLOW_2); + rule__NegativeLiteral__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getNegativeLiteralAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleNegativeLiteral" + + + // $ANTLR start "entryRuleAtom" + // InternalProblem.g:278:1: entryRuleAtom : ruleAtom EOF ; + public final void entryRuleAtom() throws RecognitionException { + try { + // InternalProblem.g:279:1: ( ruleAtom EOF ) + // InternalProblem.g:280:1: ruleAtom EOF + { + before(grammarAccess.getAtomRule()); + pushFollow(FOLLOW_1); + ruleAtom(); + + state._fsp--; + + after(grammarAccess.getAtomRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleAtom" + + + // $ANTLR start "ruleAtom" + // InternalProblem.g:287:1: ruleAtom : ( ( rule__Atom__Group__0 ) ) ; + public final void ruleAtom() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:291:2: ( ( ( rule__Atom__Group__0 ) ) ) + // InternalProblem.g:292:2: ( ( rule__Atom__Group__0 ) ) + { + // InternalProblem.g:292:2: ( ( rule__Atom__Group__0 ) ) + // InternalProblem.g:293:3: ( rule__Atom__Group__0 ) + { + before(grammarAccess.getAtomAccess().getGroup()); + // InternalProblem.g:294:3: ( rule__Atom__Group__0 ) + // InternalProblem.g:294:4: rule__Atom__Group__0 + { + pushFollow(FOLLOW_2); + rule__Atom__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getAtomAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleAtom" + + + // $ANTLR start "entryRuleAssertion" + // InternalProblem.g:303:1: entryRuleAssertion : ruleAssertion EOF ; + public final void entryRuleAssertion() throws RecognitionException { + try { + // InternalProblem.g:304:1: ( ruleAssertion EOF ) + // InternalProblem.g:305:1: ruleAssertion EOF + { + before(grammarAccess.getAssertionRule()); + pushFollow(FOLLOW_1); + ruleAssertion(); + + state._fsp--; + + after(grammarAccess.getAssertionRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleAssertion" + + + // $ANTLR start "ruleAssertion" + // InternalProblem.g:312:1: ruleAssertion : ( ( rule__Assertion__Group__0 ) ) ; + public final void ruleAssertion() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:316:2: ( ( ( rule__Assertion__Group__0 ) ) ) + // InternalProblem.g:317:2: ( ( rule__Assertion__Group__0 ) ) + { + // InternalProblem.g:317:2: ( ( rule__Assertion__Group__0 ) ) + // InternalProblem.g:318:3: ( rule__Assertion__Group__0 ) + { + before(grammarAccess.getAssertionAccess().getGroup()); + // InternalProblem.g:319:3: ( rule__Assertion__Group__0 ) + // InternalProblem.g:319:4: rule__Assertion__Group__0 + { + pushFollow(FOLLOW_2); + rule__Assertion__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleAssertion" + + + // $ANTLR start "entryRuleScopeDeclaration" + // InternalProblem.g:328:1: entryRuleScopeDeclaration : ruleScopeDeclaration EOF ; + public final void entryRuleScopeDeclaration() throws RecognitionException { + try { + // InternalProblem.g:329:1: ( ruleScopeDeclaration EOF ) + // InternalProblem.g:330:1: ruleScopeDeclaration EOF + { + before(grammarAccess.getScopeDeclarationRule()); + pushFollow(FOLLOW_1); + ruleScopeDeclaration(); + + state._fsp--; + + after(grammarAccess.getScopeDeclarationRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleScopeDeclaration" + + + // $ANTLR start "ruleScopeDeclaration" + // InternalProblem.g:337:1: ruleScopeDeclaration : ( ( rule__ScopeDeclaration__Group__0 ) ) ; + public final void ruleScopeDeclaration() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:341:2: ( ( ( rule__ScopeDeclaration__Group__0 ) ) ) + // InternalProblem.g:342:2: ( ( rule__ScopeDeclaration__Group__0 ) ) + { + // InternalProblem.g:342:2: ( ( rule__ScopeDeclaration__Group__0 ) ) + // InternalProblem.g:343:3: ( rule__ScopeDeclaration__Group__0 ) + { + before(grammarAccess.getScopeDeclarationAccess().getGroup()); + // InternalProblem.g:344:3: ( rule__ScopeDeclaration__Group__0 ) + // InternalProblem.g:344:4: rule__ScopeDeclaration__Group__0 + { + pushFollow(FOLLOW_2); + rule__ScopeDeclaration__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getScopeDeclarationAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleScopeDeclaration" + + + // $ANTLR start "entryRuleTypeScope" + // InternalProblem.g:353:1: entryRuleTypeScope : ruleTypeScope EOF ; + public final void entryRuleTypeScope() throws RecognitionException { + try { + // InternalProblem.g:354:1: ( ruleTypeScope EOF ) + // InternalProblem.g:355:1: ruleTypeScope EOF + { + before(grammarAccess.getTypeScopeRule()); + pushFollow(FOLLOW_1); + ruleTypeScope(); + + state._fsp--; + + after(grammarAccess.getTypeScopeRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleTypeScope" + + + // $ANTLR start "ruleTypeScope" + // InternalProblem.g:362:1: ruleTypeScope : ( ( rule__TypeScope__Group__0 ) ) ; + public final void ruleTypeScope() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:366:2: ( ( ( rule__TypeScope__Group__0 ) ) ) + // InternalProblem.g:367:2: ( ( rule__TypeScope__Group__0 ) ) + { + // InternalProblem.g:367:2: ( ( rule__TypeScope__Group__0 ) ) + // InternalProblem.g:368:3: ( rule__TypeScope__Group__0 ) + { + before(grammarAccess.getTypeScopeAccess().getGroup()); + // InternalProblem.g:369:3: ( rule__TypeScope__Group__0 ) + // InternalProblem.g:369:4: rule__TypeScope__Group__0 + { + pushFollow(FOLLOW_2); + rule__TypeScope__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getTypeScopeAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleTypeScope" + + + // $ANTLR start "entryRuleMultiplicity" + // InternalProblem.g:378:1: entryRuleMultiplicity : ruleMultiplicity EOF ; + public final void entryRuleMultiplicity() throws RecognitionException { + try { + // InternalProblem.g:379:1: ( ruleMultiplicity EOF ) + // InternalProblem.g:380:1: ruleMultiplicity EOF + { + before(grammarAccess.getMultiplicityRule()); + pushFollow(FOLLOW_1); + ruleMultiplicity(); + + state._fsp--; + + after(grammarAccess.getMultiplicityRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleMultiplicity" + + + // $ANTLR start "ruleMultiplicity" + // InternalProblem.g:387:1: ruleMultiplicity : ( ( rule__Multiplicity__Alternatives ) ) ; + public final void ruleMultiplicity() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:391:2: ( ( ( rule__Multiplicity__Alternatives ) ) ) + // InternalProblem.g:392:2: ( ( rule__Multiplicity__Alternatives ) ) + { + // InternalProblem.g:392:2: ( ( rule__Multiplicity__Alternatives ) ) + // InternalProblem.g:393:3: ( rule__Multiplicity__Alternatives ) + { + before(grammarAccess.getMultiplicityAccess().getAlternatives()); + // InternalProblem.g:394:3: ( rule__Multiplicity__Alternatives ) + // InternalProblem.g:394:4: rule__Multiplicity__Alternatives + { + pushFollow(FOLLOW_2); + rule__Multiplicity__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getMultiplicityAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleMultiplicity" + + + // $ANTLR start "entryRuleRangeMultiplicity" + // InternalProblem.g:403:1: entryRuleRangeMultiplicity : ruleRangeMultiplicity EOF ; + public final void entryRuleRangeMultiplicity() throws RecognitionException { + try { + // InternalProblem.g:404:1: ( ruleRangeMultiplicity EOF ) + // InternalProblem.g:405:1: ruleRangeMultiplicity EOF + { + before(grammarAccess.getRangeMultiplicityRule()); + pushFollow(FOLLOW_1); + ruleRangeMultiplicity(); + + state._fsp--; + + after(grammarAccess.getRangeMultiplicityRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleRangeMultiplicity" + + + // $ANTLR start "ruleRangeMultiplicity" + // InternalProblem.g:412:1: ruleRangeMultiplicity : ( ( rule__RangeMultiplicity__Group__0 ) ) ; + public final void ruleRangeMultiplicity() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:416:2: ( ( ( rule__RangeMultiplicity__Group__0 ) ) ) + // InternalProblem.g:417:2: ( ( rule__RangeMultiplicity__Group__0 ) ) + { + // InternalProblem.g:417:2: ( ( rule__RangeMultiplicity__Group__0 ) ) + // InternalProblem.g:418:3: ( rule__RangeMultiplicity__Group__0 ) + { + before(grammarAccess.getRangeMultiplicityAccess().getGroup()); + // InternalProblem.g:419:3: ( rule__RangeMultiplicity__Group__0 ) + // InternalProblem.g:419:4: rule__RangeMultiplicity__Group__0 + { + pushFollow(FOLLOW_2); + rule__RangeMultiplicity__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getRangeMultiplicityAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleRangeMultiplicity" + + + // $ANTLR start "entryRuleExactMultiplicity" + // InternalProblem.g:428:1: entryRuleExactMultiplicity : ruleExactMultiplicity EOF ; + public final void entryRuleExactMultiplicity() throws RecognitionException { + try { + // InternalProblem.g:429:1: ( ruleExactMultiplicity EOF ) + // InternalProblem.g:430:1: ruleExactMultiplicity EOF + { + before(grammarAccess.getExactMultiplicityRule()); + pushFollow(FOLLOW_1); + ruleExactMultiplicity(); + + state._fsp--; + + after(grammarAccess.getExactMultiplicityRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleExactMultiplicity" + + + // $ANTLR start "ruleExactMultiplicity" + // InternalProblem.g:437:1: ruleExactMultiplicity : ( ( rule__ExactMultiplicity__ExactValueAssignment ) ) ; + public final void ruleExactMultiplicity() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:441:2: ( ( ( rule__ExactMultiplicity__ExactValueAssignment ) ) ) + // InternalProblem.g:442:2: ( ( rule__ExactMultiplicity__ExactValueAssignment ) ) + { + // InternalProblem.g:442:2: ( ( rule__ExactMultiplicity__ExactValueAssignment ) ) + // InternalProblem.g:443:3: ( rule__ExactMultiplicity__ExactValueAssignment ) + { + before(grammarAccess.getExactMultiplicityAccess().getExactValueAssignment()); + // InternalProblem.g:444:3: ( rule__ExactMultiplicity__ExactValueAssignment ) + // InternalProblem.g:444:4: rule__ExactMultiplicity__ExactValueAssignment + { + pushFollow(FOLLOW_2); + rule__ExactMultiplicity__ExactValueAssignment(); + + state._fsp--; + + + } + + after(grammarAccess.getExactMultiplicityAccess().getExactValueAssignment()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleExactMultiplicity" + + + // $ANTLR start "entryRuleUpperBound" + // InternalProblem.g:453:1: entryRuleUpperBound : ruleUpperBound EOF ; + public final void entryRuleUpperBound() throws RecognitionException { + try { + // InternalProblem.g:454:1: ( ruleUpperBound EOF ) + // InternalProblem.g:455:1: ruleUpperBound EOF + { + before(grammarAccess.getUpperBoundRule()); + pushFollow(FOLLOW_1); + ruleUpperBound(); + + state._fsp--; + + after(grammarAccess.getUpperBoundRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleUpperBound" + + + // $ANTLR start "ruleUpperBound" + // InternalProblem.g:462:1: ruleUpperBound : ( ( rule__UpperBound__Alternatives ) ) ; + public final void ruleUpperBound() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:466:2: ( ( ( rule__UpperBound__Alternatives ) ) ) + // InternalProblem.g:467:2: ( ( rule__UpperBound__Alternatives ) ) + { + // InternalProblem.g:467:2: ( ( rule__UpperBound__Alternatives ) ) + // InternalProblem.g:468:3: ( rule__UpperBound__Alternatives ) + { + before(grammarAccess.getUpperBoundAccess().getAlternatives()); + // InternalProblem.g:469:3: ( rule__UpperBound__Alternatives ) + // InternalProblem.g:469:4: rule__UpperBound__Alternatives + { + pushFollow(FOLLOW_2); + rule__UpperBound__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getUpperBoundAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleUpperBound" + + + // $ANTLR start "entryRuleQualifiedName" + // InternalProblem.g:478:1: entryRuleQualifiedName : ruleQualifiedName EOF ; + public final void entryRuleQualifiedName() throws RecognitionException { + try { + // InternalProblem.g:479:1: ( ruleQualifiedName EOF ) + // InternalProblem.g:480:1: ruleQualifiedName EOF + { + before(grammarAccess.getQualifiedNameRule()); + pushFollow(FOLLOW_1); + ruleQualifiedName(); + + state._fsp--; + + after(grammarAccess.getQualifiedNameRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleQualifiedName" + + + // $ANTLR start "ruleQualifiedName" + // InternalProblem.g:487:1: ruleQualifiedName : ( ( rule__QualifiedName__Group__0 ) ) ; + public final void ruleQualifiedName() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:491:2: ( ( ( rule__QualifiedName__Group__0 ) ) ) + // InternalProblem.g:492:2: ( ( rule__QualifiedName__Group__0 ) ) + { + // InternalProblem.g:492:2: ( ( rule__QualifiedName__Group__0 ) ) + // InternalProblem.g:493:3: ( rule__QualifiedName__Group__0 ) + { + before(grammarAccess.getQualifiedNameAccess().getGroup()); + // InternalProblem.g:494:3: ( rule__QualifiedName__Group__0 ) + // InternalProblem.g:494:4: rule__QualifiedName__Group__0 + { + pushFollow(FOLLOW_2); + rule__QualifiedName__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getQualifiedNameAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleQualifiedName" + + + // $ANTLR start "ruleLogicValue" + // InternalProblem.g:503:1: ruleLogicValue : ( ( rule__LogicValue__Alternatives ) ) ; + public final void ruleLogicValue() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:507:1: ( ( ( rule__LogicValue__Alternatives ) ) ) + // InternalProblem.g:508:2: ( ( rule__LogicValue__Alternatives ) ) + { + // InternalProblem.g:508:2: ( ( rule__LogicValue__Alternatives ) ) + // InternalProblem.g:509:3: ( rule__LogicValue__Alternatives ) + { + before(grammarAccess.getLogicValueAccess().getAlternatives()); + // InternalProblem.g:510:3: ( rule__LogicValue__Alternatives ) + // InternalProblem.g:510:4: rule__LogicValue__Alternatives + { + pushFollow(FOLLOW_2); + rule__LogicValue__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getLogicValueAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleLogicValue" + + + // $ANTLR start "ruleShortLogicValue" + // InternalProblem.g:519:1: ruleShortLogicValue : ( ( rule__ShortLogicValue__Alternatives ) ) ; + public final void ruleShortLogicValue() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:523:1: ( ( ( rule__ShortLogicValue__Alternatives ) ) ) + // InternalProblem.g:524:2: ( ( rule__ShortLogicValue__Alternatives ) ) + { + // InternalProblem.g:524:2: ( ( rule__ShortLogicValue__Alternatives ) ) + // InternalProblem.g:525:3: ( rule__ShortLogicValue__Alternatives ) + { + before(grammarAccess.getShortLogicValueAccess().getAlternatives()); + // InternalProblem.g:526:3: ( rule__ShortLogicValue__Alternatives ) + // InternalProblem.g:526:4: rule__ShortLogicValue__Alternatives + { + pushFollow(FOLLOW_2); + rule__ShortLogicValue__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getShortLogicValueAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleShortLogicValue" + + + // $ANTLR start "rule__Statement__Alternatives" + // InternalProblem.g:534:1: rule__Statement__Alternatives : ( ( ruleClassDeclaration ) | ( rulePredicateDefinition ) | ( ruleAssertion ) | ( ruleScopeDeclaration ) ); + public final void rule__Statement__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:538:1: ( ( ruleClassDeclaration ) | ( rulePredicateDefinition ) | ( ruleAssertion ) | ( ruleScopeDeclaration ) ) + int alt2=4; + switch ( input.LA(1) ) { + case 20: + case 35: + { + alt2=1; + } + break; + case 12: + case 37: + { + alt2=2; + } + break; + case RULE_ID: + case 18: + case 19: + { + alt2=3; + } + break; + case 32: + { + alt2=4; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 2, 0, input); + + throw nvae; + } + + switch (alt2) { + case 1 : + // InternalProblem.g:539:2: ( ruleClassDeclaration ) + { + // InternalProblem.g:539:2: ( ruleClassDeclaration ) + // InternalProblem.g:540:3: ruleClassDeclaration + { + before(grammarAccess.getStatementAccess().getClassDeclarationParserRuleCall_0()); + pushFollow(FOLLOW_2); + ruleClassDeclaration(); + + state._fsp--; + + after(grammarAccess.getStatementAccess().getClassDeclarationParserRuleCall_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:545:2: ( rulePredicateDefinition ) + { + // InternalProblem.g:545:2: ( rulePredicateDefinition ) + // InternalProblem.g:546:3: rulePredicateDefinition + { + before(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_1()); + pushFollow(FOLLOW_2); + rulePredicateDefinition(); + + state._fsp--; + + after(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_1()); + + } + + + } + break; + case 3 : + // InternalProblem.g:551:2: ( ruleAssertion ) + { + // InternalProblem.g:551:2: ( ruleAssertion ) + // InternalProblem.g:552:3: ruleAssertion + { + before(grammarAccess.getStatementAccess().getAssertionParserRuleCall_2()); + pushFollow(FOLLOW_2); + ruleAssertion(); + + state._fsp--; + + after(grammarAccess.getStatementAccess().getAssertionParserRuleCall_2()); + + } + + + } + break; + case 4 : + // InternalProblem.g:557:2: ( ruleScopeDeclaration ) + { + // InternalProblem.g:557:2: ( ruleScopeDeclaration ) + // InternalProblem.g:558:3: ruleScopeDeclaration + { + before(grammarAccess.getStatementAccess().getScopeDeclarationParserRuleCall_3()); + pushFollow(FOLLOW_2); + ruleScopeDeclaration(); + + state._fsp--; + + after(grammarAccess.getStatementAccess().getScopeDeclarationParserRuleCall_3()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Statement__Alternatives" + + + // $ANTLR start "rule__ClassDeclaration__Alternatives_3" + // InternalProblem.g:567:1: rule__ClassDeclaration__Alternatives_3 : ( ( ( rule__ClassDeclaration__Group_3_0__0 ) ) | ( ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1 ) ) ); + public final void rule__ClassDeclaration__Alternatives_3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:571:1: ( ( ( rule__ClassDeclaration__Group_3_0__0 ) ) | ( ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1 ) ) ) + int alt3=2; + int LA3_0 = input.LA(1); + + if ( (LA3_0==22) ) { + alt3=1; + } + else if ( (LA3_0==11||LA3_0==36) ) { + alt3=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 3, 0, input); + + throw nvae; + } + switch (alt3) { + case 1 : + // InternalProblem.g:572:2: ( ( rule__ClassDeclaration__Group_3_0__0 ) ) + { + // InternalProblem.g:572:2: ( ( rule__ClassDeclaration__Group_3_0__0 ) ) + // InternalProblem.g:573:3: ( rule__ClassDeclaration__Group_3_0__0 ) + { + before(grammarAccess.getClassDeclarationAccess().getGroup_3_0()); + // InternalProblem.g:574:3: ( rule__ClassDeclaration__Group_3_0__0 ) + // InternalProblem.g:574:4: rule__ClassDeclaration__Group_3_0__0 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0__0(); + + state._fsp--; + + + } + + after(grammarAccess.getClassDeclarationAccess().getGroup_3_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:578:2: ( ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1 ) ) + { + // InternalProblem.g:578:2: ( ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1 ) ) + // InternalProblem.g:579:3: ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1 ) + { + before(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsAssignment_3_1()); + // InternalProblem.g:580:3: ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1 ) + // InternalProblem.g:580:4: rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1(); + + state._fsp--; + + + } + + after(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsAssignment_3_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Alternatives_3" + + + // $ANTLR start "rule__ClassDeclaration__Alternatives_3_0_1" + // InternalProblem.g:588:1: rule__ClassDeclaration__Alternatives_3_0_1 : ( ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0 ) ) | ( ( rule__ClassDeclaration__Group_3_0_1_1__0 ) ) ); + public final void rule__ClassDeclaration__Alternatives_3_0_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:592:1: ( ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0 ) ) | ( ( rule__ClassDeclaration__Group_3_0_1_1__0 ) ) ) + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0==RULE_ID) ) { + alt4=1; + } + else if ( (LA4_0==23) ) { + alt4=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 4, 0, input); + + throw nvae; + } + switch (alt4) { + case 1 : + // InternalProblem.g:593:2: ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0 ) ) + { + // InternalProblem.g:593:2: ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0 ) ) + // InternalProblem.g:594:3: ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0 ) + { + before(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_0()); + // InternalProblem.g:595:3: ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0 ) + // InternalProblem.g:595:4: rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0(); + + state._fsp--; + + + } + + after(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:599:2: ( ( rule__ClassDeclaration__Group_3_0_1_1__0 ) ) + { + // InternalProblem.g:599:2: ( ( rule__ClassDeclaration__Group_3_0_1_1__0 ) ) + // InternalProblem.g:600:3: ( rule__ClassDeclaration__Group_3_0_1_1__0 ) + { + before(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1()); + // InternalProblem.g:601:3: ( rule__ClassDeclaration__Group_3_0_1_1__0 ) + // InternalProblem.g:601:4: rule__ClassDeclaration__Group_3_0_1_1__0 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0_1_1__0(); + + state._fsp--; + + + } + + after(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Alternatives_3_0_1" + + + // $ANTLR start "rule__ReferenceDeclaration__Alternatives_0" + // InternalProblem.g:609:1: rule__ReferenceDeclaration__Alternatives_0 : ( ( ( rule__ReferenceDeclaration__ContainmentAssignment_0_0 ) ) | ( 'refers' ) ); + public final void rule__ReferenceDeclaration__Alternatives_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:613:1: ( ( ( rule__ReferenceDeclaration__ContainmentAssignment_0_0 ) ) | ( 'refers' ) ) + int alt5=2; + int LA5_0 = input.LA(1); + + if ( (LA5_0==36) ) { + alt5=1; + } + else if ( (LA5_0==11) ) { + alt5=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 5, 0, input); + + throw nvae; + } + switch (alt5) { + case 1 : + // InternalProblem.g:614:2: ( ( rule__ReferenceDeclaration__ContainmentAssignment_0_0 ) ) + { + // InternalProblem.g:614:2: ( ( rule__ReferenceDeclaration__ContainmentAssignment_0_0 ) ) + // InternalProblem.g:615:3: ( rule__ReferenceDeclaration__ContainmentAssignment_0_0 ) + { + before(grammarAccess.getReferenceDeclarationAccess().getContainmentAssignment_0_0()); + // InternalProblem.g:616:3: ( rule__ReferenceDeclaration__ContainmentAssignment_0_0 ) + // InternalProblem.g:616:4: rule__ReferenceDeclaration__ContainmentAssignment_0_0 + { + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__ContainmentAssignment_0_0(); + + state._fsp--; + + + } + + after(grammarAccess.getReferenceDeclarationAccess().getContainmentAssignment_0_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:620:2: ( 'refers' ) + { + // InternalProblem.g:620:2: ( 'refers' ) + // InternalProblem.g:621:3: 'refers' + { + before(grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); + match(input,11,FOLLOW_2); + after(grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Alternatives_0" + + + // $ANTLR start "rule__PredicateDefinition__Alternatives_0" + // InternalProblem.g:630:1: rule__PredicateDefinition__Alternatives_0 : ( ( ( rule__PredicateDefinition__Group_0_0__0 ) ) | ( 'pred' ) ); + public final void rule__PredicateDefinition__Alternatives_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:634:1: ( ( ( rule__PredicateDefinition__Group_0_0__0 ) ) | ( 'pred' ) ) + int alt6=2; + int LA6_0 = input.LA(1); + + if ( (LA6_0==37) ) { + alt6=1; + } + else if ( (LA6_0==12) ) { + alt6=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 6, 0, input); + + throw nvae; + } + switch (alt6) { + case 1 : + // InternalProblem.g:635:2: ( ( rule__PredicateDefinition__Group_0_0__0 ) ) + { + // InternalProblem.g:635:2: ( ( rule__PredicateDefinition__Group_0_0__0 ) ) + // InternalProblem.g:636:3: ( rule__PredicateDefinition__Group_0_0__0 ) + { + before(grammarAccess.getPredicateDefinitionAccess().getGroup_0_0()); + // InternalProblem.g:637:3: ( rule__PredicateDefinition__Group_0_0__0 ) + // InternalProblem.g:637:4: rule__PredicateDefinition__Group_0_0__0 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_0_0__0(); + + state._fsp--; + + + } + + after(grammarAccess.getPredicateDefinitionAccess().getGroup_0_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:641:2: ( 'pred' ) + { + // InternalProblem.g:641:2: ( 'pred' ) + // InternalProblem.g:642:3: 'pred' + { + before(grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_1()); + match(input,12,FOLLOW_2); + after(grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Alternatives_0" + + + // $ANTLR start "rule__Literal__Alternatives" + // InternalProblem.g:651:1: rule__Literal__Alternatives : ( ( ruleAtom ) | ( ruleNegativeLiteral ) ); + public final void rule__Literal__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:655:1: ( ( ruleAtom ) | ( ruleNegativeLiteral ) ) + int alt7=2; + int LA7_0 = input.LA(1); + + if ( (LA7_0==RULE_ID) ) { + alt7=1; + } + else if ( (LA7_0==18) ) { + alt7=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 7, 0, input); + + throw nvae; + } + switch (alt7) { + case 1 : + // InternalProblem.g:656:2: ( ruleAtom ) + { + // InternalProblem.g:656:2: ( ruleAtom ) + // InternalProblem.g:657:3: ruleAtom + { + before(grammarAccess.getLiteralAccess().getAtomParserRuleCall_0()); + pushFollow(FOLLOW_2); + ruleAtom(); + + state._fsp--; + + after(grammarAccess.getLiteralAccess().getAtomParserRuleCall_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:662:2: ( ruleNegativeLiteral ) + { + // InternalProblem.g:662:2: ( ruleNegativeLiteral ) + // InternalProblem.g:663:3: ruleNegativeLiteral + { + before(grammarAccess.getLiteralAccess().getNegativeLiteralParserRuleCall_1()); + pushFollow(FOLLOW_2); + ruleNegativeLiteral(); + + state._fsp--; + + after(grammarAccess.getLiteralAccess().getNegativeLiteralParserRuleCall_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Literal__Alternatives" + + + // $ANTLR start "rule__Assertion__Alternatives_0" + // InternalProblem.g:672:1: rule__Assertion__Alternatives_0 : ( ( ( rule__Assertion__Group_0_0__0 ) ) | ( ( rule__Assertion__Group_0_1__0 ) ) ); + public final void rule__Assertion__Alternatives_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:676:1: ( ( ( rule__Assertion__Group_0_0__0 ) ) | ( ( rule__Assertion__Group_0_1__0 ) ) ) + int alt8=2; + alt8 = dfa8.predict(input); + switch (alt8) { + case 1 : + // InternalProblem.g:677:2: ( ( rule__Assertion__Group_0_0__0 ) ) + { + // InternalProblem.g:677:2: ( ( rule__Assertion__Group_0_0__0 ) ) + // InternalProblem.g:678:3: ( rule__Assertion__Group_0_0__0 ) + { + before(grammarAccess.getAssertionAccess().getGroup_0_0()); + // InternalProblem.g:679:3: ( rule__Assertion__Group_0_0__0 ) + // InternalProblem.g:679:4: rule__Assertion__Group_0_0__0 + { + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0__0(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getGroup_0_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:683:2: ( ( rule__Assertion__Group_0_1__0 ) ) + { + // InternalProblem.g:683:2: ( ( rule__Assertion__Group_0_1__0 ) ) + // InternalProblem.g:684:3: ( rule__Assertion__Group_0_1__0 ) + { + before(grammarAccess.getAssertionAccess().getGroup_0_1()); + // InternalProblem.g:685:3: ( rule__Assertion__Group_0_1__0 ) + // InternalProblem.g:685:4: rule__Assertion__Group_0_1__0 + { + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1__0(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getGroup_0_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Alternatives_0" + + + // $ANTLR start "rule__TypeScope__Alternatives_1" + // InternalProblem.g:693:1: rule__TypeScope__Alternatives_1 : ( ( ( rule__TypeScope__IncrementAssignment_1_0 ) ) | ( '=' ) ); + public final void rule__TypeScope__Alternatives_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:697:1: ( ( ( rule__TypeScope__IncrementAssignment_1_0 ) ) | ( '=' ) ) + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0==39) ) { + alt9=1; + } + else if ( (LA9_0==13) ) { + alt9=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 9, 0, input); + + throw nvae; + } + switch (alt9) { + case 1 : + // InternalProblem.g:698:2: ( ( rule__TypeScope__IncrementAssignment_1_0 ) ) + { + // InternalProblem.g:698:2: ( ( rule__TypeScope__IncrementAssignment_1_0 ) ) + // InternalProblem.g:699:3: ( rule__TypeScope__IncrementAssignment_1_0 ) + { + before(grammarAccess.getTypeScopeAccess().getIncrementAssignment_1_0()); + // InternalProblem.g:700:3: ( rule__TypeScope__IncrementAssignment_1_0 ) + // InternalProblem.g:700:4: rule__TypeScope__IncrementAssignment_1_0 + { + pushFollow(FOLLOW_2); + rule__TypeScope__IncrementAssignment_1_0(); + + state._fsp--; + + + } + + after(grammarAccess.getTypeScopeAccess().getIncrementAssignment_1_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:704:2: ( '=' ) + { + // InternalProblem.g:704:2: ( '=' ) + // InternalProblem.g:705:3: '=' + { + before(grammarAccess.getTypeScopeAccess().getEqualsSignKeyword_1_1()); + match(input,13,FOLLOW_2); + after(grammarAccess.getTypeScopeAccess().getEqualsSignKeyword_1_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TypeScope__Alternatives_1" + + + // $ANTLR start "rule__Multiplicity__Alternatives" + // InternalProblem.g:714:1: rule__Multiplicity__Alternatives : ( ( ruleRangeMultiplicity ) | ( ruleExactMultiplicity ) ); + public final void rule__Multiplicity__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:718:1: ( ( ruleRangeMultiplicity ) | ( ruleExactMultiplicity ) ) + int alt10=2; + int LA10_0 = input.LA(1); + + if ( (LA10_0==RULE_INT) ) { + int LA10_1 = input.LA(2); + + if ( (LA10_1==33) ) { + alt10=1; + } + else if ( (LA10_1==EOF||LA10_1==21||(LA10_1>=24 && LA10_1<=25)) ) { + alt10=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 10, 1, input); + + throw nvae; + } + } + else { + NoViableAltException nvae = + new NoViableAltException("", 10, 0, input); + + throw nvae; + } + switch (alt10) { + case 1 : + // InternalProblem.g:719:2: ( ruleRangeMultiplicity ) + { + // InternalProblem.g:719:2: ( ruleRangeMultiplicity ) + // InternalProblem.g:720:3: ruleRangeMultiplicity + { + before(grammarAccess.getMultiplicityAccess().getRangeMultiplicityParserRuleCall_0()); + pushFollow(FOLLOW_2); + ruleRangeMultiplicity(); + + state._fsp--; + + after(grammarAccess.getMultiplicityAccess().getRangeMultiplicityParserRuleCall_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:725:2: ( ruleExactMultiplicity ) + { + // InternalProblem.g:725:2: ( ruleExactMultiplicity ) + // InternalProblem.g:726:3: ruleExactMultiplicity + { + before(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); + pushFollow(FOLLOW_2); + ruleExactMultiplicity(); + + state._fsp--; + + after(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Multiplicity__Alternatives" + + + // $ANTLR start "rule__UpperBound__Alternatives" + // InternalProblem.g:735:1: rule__UpperBound__Alternatives : ( ( RULE_INT ) | ( '*' ) ); + public final void rule__UpperBound__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:739:1: ( ( RULE_INT ) | ( '*' ) ) + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0==RULE_INT) ) { + alt11=1; + } + else if ( (LA11_0==14) ) { + alt11=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 11, 0, input); + + throw nvae; + } + switch (alt11) { + case 1 : + // InternalProblem.g:740:2: ( RULE_INT ) + { + // InternalProblem.g:740:2: ( RULE_INT ) + // InternalProblem.g:741:3: RULE_INT + { + before(grammarAccess.getUpperBoundAccess().getINTTerminalRuleCall_0()); + match(input,RULE_INT,FOLLOW_2); + after(grammarAccess.getUpperBoundAccess().getINTTerminalRuleCall_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:746:2: ( '*' ) + { + // InternalProblem.g:746:2: ( '*' ) + // InternalProblem.g:747:3: '*' + { + before(grammarAccess.getUpperBoundAccess().getAsteriskKeyword_1()); + match(input,14,FOLLOW_2); + after(grammarAccess.getUpperBoundAccess().getAsteriskKeyword_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__UpperBound__Alternatives" + + + // $ANTLR start "rule__LogicValue__Alternatives" + // InternalProblem.g:756:1: rule__LogicValue__Alternatives : ( ( ( 'true' ) ) | ( ( 'false' ) ) | ( ( 'unknown' ) ) ); + public final void rule__LogicValue__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:760:1: ( ( ( 'true' ) ) | ( ( 'false' ) ) | ( ( 'unknown' ) ) ) + int alt12=3; + switch ( input.LA(1) ) { + case 15: + { + alt12=1; + } + break; + case 16: + { + alt12=2; + } + break; + case 17: + { + alt12=3; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 12, 0, input); + + throw nvae; + } + + switch (alt12) { + case 1 : + // InternalProblem.g:761:2: ( ( 'true' ) ) + { + // InternalProblem.g:761:2: ( ( 'true' ) ) + // InternalProblem.g:762:3: ( 'true' ) + { + before(grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); + // InternalProblem.g:763:3: ( 'true' ) + // InternalProblem.g:763:4: 'true' + { + match(input,15,FOLLOW_2); + + } + + after(grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:767:2: ( ( 'false' ) ) + { + // InternalProblem.g:767:2: ( ( 'false' ) ) + // InternalProblem.g:768:3: ( 'false' ) + { + before(grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); + // InternalProblem.g:769:3: ( 'false' ) + // InternalProblem.g:769:4: 'false' + { + match(input,16,FOLLOW_2); + + } + + after(grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); + + } + + + } + break; + case 3 : + // InternalProblem.g:773:2: ( ( 'unknown' ) ) + { + // InternalProblem.g:773:2: ( ( 'unknown' ) ) + // InternalProblem.g:774:3: ( 'unknown' ) + { + before(grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); + // InternalProblem.g:775:3: ( 'unknown' ) + // InternalProblem.g:775:4: 'unknown' + { + match(input,17,FOLLOW_2); + + } + + after(grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__LogicValue__Alternatives" + + + // $ANTLR start "rule__ShortLogicValue__Alternatives" + // InternalProblem.g:783:1: rule__ShortLogicValue__Alternatives : ( ( ( '!' ) ) | ( ( '?' ) ) ); + public final void rule__ShortLogicValue__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:787:1: ( ( ( '!' ) ) | ( ( '?' ) ) ) + int alt13=2; + int LA13_0 = input.LA(1); + + if ( (LA13_0==18) ) { + alt13=1; + } + else if ( (LA13_0==19) ) { + alt13=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 13, 0, input); + + throw nvae; + } + switch (alt13) { + case 1 : + // InternalProblem.g:788:2: ( ( '!' ) ) + { + // InternalProblem.g:788:2: ( ( '!' ) ) + // InternalProblem.g:789:3: ( '!' ) + { + before(grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0()); + // InternalProblem.g:790:3: ( '!' ) + // InternalProblem.g:790:4: '!' + { + match(input,18,FOLLOW_2); + + } + + after(grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0()); + + } + + + } + break; + case 2 : + // InternalProblem.g:794:2: ( ( '?' ) ) + { + // InternalProblem.g:794:2: ( ( '?' ) ) + // InternalProblem.g:795:3: ( '?' ) + { + before(grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1()); + // InternalProblem.g:796:3: ( '?' ) + // InternalProblem.g:796:4: '?' + { + match(input,19,FOLLOW_2); + + } + + after(grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ShortLogicValue__Alternatives" + + + // $ANTLR start "rule__ClassDeclaration__Group__0" + // InternalProblem.g:804:1: rule__ClassDeclaration__Group__0 : rule__ClassDeclaration__Group__0__Impl rule__ClassDeclaration__Group__1 ; + public final void rule__ClassDeclaration__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:808:1: ( rule__ClassDeclaration__Group__0__Impl rule__ClassDeclaration__Group__1 ) + // InternalProblem.g:809:2: rule__ClassDeclaration__Group__0__Impl rule__ClassDeclaration__Group__1 + { + pushFollow(FOLLOW_4); + rule__ClassDeclaration__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__0" + + + // $ANTLR start "rule__ClassDeclaration__Group__0__Impl" + // InternalProblem.g:816:1: rule__ClassDeclaration__Group__0__Impl : ( ( rule__ClassDeclaration__AbstractAssignment_0 )? ) ; + public final void rule__ClassDeclaration__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:820:1: ( ( ( rule__ClassDeclaration__AbstractAssignment_0 )? ) ) + // InternalProblem.g:821:1: ( ( rule__ClassDeclaration__AbstractAssignment_0 )? ) + { + // InternalProblem.g:821:1: ( ( rule__ClassDeclaration__AbstractAssignment_0 )? ) + // InternalProblem.g:822:2: ( rule__ClassDeclaration__AbstractAssignment_0 )? + { + before(grammarAccess.getClassDeclarationAccess().getAbstractAssignment_0()); + // InternalProblem.g:823:2: ( rule__ClassDeclaration__AbstractAssignment_0 )? + int alt14=2; + int LA14_0 = input.LA(1); + + if ( (LA14_0==35) ) { + alt14=1; + } + switch (alt14) { + case 1 : + // InternalProblem.g:823:3: rule__ClassDeclaration__AbstractAssignment_0 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__AbstractAssignment_0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getClassDeclarationAccess().getAbstractAssignment_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__0__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group__1" + // InternalProblem.g:831:1: rule__ClassDeclaration__Group__1 : rule__ClassDeclaration__Group__1__Impl rule__ClassDeclaration__Group__2 ; + public final void rule__ClassDeclaration__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:835:1: ( rule__ClassDeclaration__Group__1__Impl rule__ClassDeclaration__Group__2 ) + // InternalProblem.g:836:2: rule__ClassDeclaration__Group__1__Impl rule__ClassDeclaration__Group__2 + { + pushFollow(FOLLOW_5); + rule__ClassDeclaration__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__1" + + + // $ANTLR start "rule__ClassDeclaration__Group__1__Impl" + // InternalProblem.g:843:1: rule__ClassDeclaration__Group__1__Impl : ( 'class' ) ; + public final void rule__ClassDeclaration__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:847:1: ( ( 'class' ) ) + // InternalProblem.g:848:1: ( 'class' ) + { + // InternalProblem.g:848:1: ( 'class' ) + // InternalProblem.g:849:2: 'class' + { + before(grammarAccess.getClassDeclarationAccess().getClassKeyword_1()); + match(input,20,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getClassKeyword_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__1__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group__2" + // InternalProblem.g:858:1: rule__ClassDeclaration__Group__2 : rule__ClassDeclaration__Group__2__Impl rule__ClassDeclaration__Group__3 ; + public final void rule__ClassDeclaration__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:862:1: ( rule__ClassDeclaration__Group__2__Impl rule__ClassDeclaration__Group__3 ) + // InternalProblem.g:863:2: rule__ClassDeclaration__Group__2__Impl rule__ClassDeclaration__Group__3 + { + pushFollow(FOLLOW_6); + rule__ClassDeclaration__Group__2__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group__3(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__2" + + + // $ANTLR start "rule__ClassDeclaration__Group__2__Impl" + // InternalProblem.g:870:1: rule__ClassDeclaration__Group__2__Impl : ( ( rule__ClassDeclaration__NameAssignment_2 ) ) ; + public final void rule__ClassDeclaration__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:874:1: ( ( ( rule__ClassDeclaration__NameAssignment_2 ) ) ) + // InternalProblem.g:875:1: ( ( rule__ClassDeclaration__NameAssignment_2 ) ) + { + // InternalProblem.g:875:1: ( ( rule__ClassDeclaration__NameAssignment_2 ) ) + // InternalProblem.g:876:2: ( rule__ClassDeclaration__NameAssignment_2 ) + { + before(grammarAccess.getClassDeclarationAccess().getNameAssignment_2()); + // InternalProblem.g:877:2: ( rule__ClassDeclaration__NameAssignment_2 ) + // InternalProblem.g:877:3: rule__ClassDeclaration__NameAssignment_2 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__NameAssignment_2(); + + state._fsp--; + + + } + + after(grammarAccess.getClassDeclarationAccess().getNameAssignment_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__2__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group__3" + // InternalProblem.g:885:1: rule__ClassDeclaration__Group__3 : rule__ClassDeclaration__Group__3__Impl rule__ClassDeclaration__Group__4 ; + public final void rule__ClassDeclaration__Group__3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:889:1: ( rule__ClassDeclaration__Group__3__Impl rule__ClassDeclaration__Group__4 ) + // InternalProblem.g:890:2: rule__ClassDeclaration__Group__3__Impl rule__ClassDeclaration__Group__4 + { + pushFollow(FOLLOW_6); + rule__ClassDeclaration__Group__3__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group__4(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__3" + + + // $ANTLR start "rule__ClassDeclaration__Group__3__Impl" + // InternalProblem.g:897:1: rule__ClassDeclaration__Group__3__Impl : ( ( rule__ClassDeclaration__Alternatives_3 )? ) ; + public final void rule__ClassDeclaration__Group__3__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:901:1: ( ( ( rule__ClassDeclaration__Alternatives_3 )? ) ) + // InternalProblem.g:902:1: ( ( rule__ClassDeclaration__Alternatives_3 )? ) + { + // InternalProblem.g:902:1: ( ( rule__ClassDeclaration__Alternatives_3 )? ) + // InternalProblem.g:903:2: ( rule__ClassDeclaration__Alternatives_3 )? + { + before(grammarAccess.getClassDeclarationAccess().getAlternatives_3()); + // InternalProblem.g:904:2: ( rule__ClassDeclaration__Alternatives_3 )? + int alt15=2; + int LA15_0 = input.LA(1); + + if ( (LA15_0==11||LA15_0==22||LA15_0==36) ) { + alt15=1; + } + switch (alt15) { + case 1 : + // InternalProblem.g:904:3: rule__ClassDeclaration__Alternatives_3 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Alternatives_3(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getClassDeclarationAccess().getAlternatives_3()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__3__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group__4" + // InternalProblem.g:912:1: rule__ClassDeclaration__Group__4 : rule__ClassDeclaration__Group__4__Impl rule__ClassDeclaration__Group__5 ; + public final void rule__ClassDeclaration__Group__4() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:916:1: ( rule__ClassDeclaration__Group__4__Impl rule__ClassDeclaration__Group__5 ) + // InternalProblem.g:917:2: rule__ClassDeclaration__Group__4__Impl rule__ClassDeclaration__Group__5 + { + pushFollow(FOLLOW_6); + rule__ClassDeclaration__Group__4__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group__5(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__4" + + + // $ANTLR start "rule__ClassDeclaration__Group__4__Impl" + // InternalProblem.g:924:1: rule__ClassDeclaration__Group__4__Impl : ( ( rule__ClassDeclaration__Group_4__0 )* ) ; + public final void rule__ClassDeclaration__Group__4__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:928:1: ( ( ( rule__ClassDeclaration__Group_4__0 )* ) ) + // InternalProblem.g:929:1: ( ( rule__ClassDeclaration__Group_4__0 )* ) + { + // InternalProblem.g:929:1: ( ( rule__ClassDeclaration__Group_4__0 )* ) + // InternalProblem.g:930:2: ( rule__ClassDeclaration__Group_4__0 )* + { + before(grammarAccess.getClassDeclarationAccess().getGroup_4()); + // InternalProblem.g:931:2: ( rule__ClassDeclaration__Group_4__0 )* + loop16: + do { + int alt16=2; + int LA16_0 = input.LA(1); + + if ( (LA16_0==25) ) { + alt16=1; + } + + + switch (alt16) { + case 1 : + // InternalProblem.g:931:3: rule__ClassDeclaration__Group_4__0 + { + pushFollow(FOLLOW_7); + rule__ClassDeclaration__Group_4__0(); + + state._fsp--; + + + } + break; + + default : + break loop16; + } + } while (true); + + after(grammarAccess.getClassDeclarationAccess().getGroup_4()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__4__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group__5" + // InternalProblem.g:939:1: rule__ClassDeclaration__Group__5 : rule__ClassDeclaration__Group__5__Impl ; + public final void rule__ClassDeclaration__Group__5() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:943:1: ( rule__ClassDeclaration__Group__5__Impl ) + // InternalProblem.g:944:2: rule__ClassDeclaration__Group__5__Impl + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group__5__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__5" + + + // $ANTLR start "rule__ClassDeclaration__Group__5__Impl" + // InternalProblem.g:950:1: rule__ClassDeclaration__Group__5__Impl : ( '.' ) ; + public final void rule__ClassDeclaration__Group__5__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:954:1: ( ( '.' ) ) + // InternalProblem.g:955:1: ( '.' ) + { + // InternalProblem.g:955:1: ( '.' ) + // InternalProblem.g:956:2: '.' + { + before(grammarAccess.getClassDeclarationAccess().getFullStopKeyword_5()); + match(input,21,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getFullStopKeyword_5()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group__5__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0__0" + // InternalProblem.g:966:1: rule__ClassDeclaration__Group_3_0__0 : rule__ClassDeclaration__Group_3_0__0__Impl rule__ClassDeclaration__Group_3_0__1 ; + public final void rule__ClassDeclaration__Group_3_0__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:970:1: ( rule__ClassDeclaration__Group_3_0__0__Impl rule__ClassDeclaration__Group_3_0__1 ) + // InternalProblem.g:971:2: rule__ClassDeclaration__Group_3_0__0__Impl rule__ClassDeclaration__Group_3_0__1 + { + pushFollow(FOLLOW_8); + rule__ClassDeclaration__Group_3_0__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0__0" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0__0__Impl" + // InternalProblem.g:978:1: rule__ClassDeclaration__Group_3_0__0__Impl : ( 'extends' ) ; + public final void rule__ClassDeclaration__Group_3_0__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:982:1: ( ( 'extends' ) ) + // InternalProblem.g:983:1: ( 'extends' ) + { + // InternalProblem.g:983:1: ( 'extends' ) + // InternalProblem.g:984:2: 'extends' + { + before(grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0_0()); + match(input,22,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0__0__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0__1" + // InternalProblem.g:993:1: rule__ClassDeclaration__Group_3_0__1 : rule__ClassDeclaration__Group_3_0__1__Impl ; + public final void rule__ClassDeclaration__Group_3_0__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:997:1: ( rule__ClassDeclaration__Group_3_0__1__Impl ) + // InternalProblem.g:998:2: rule__ClassDeclaration__Group_3_0__1__Impl + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0__1" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0__1__Impl" + // InternalProblem.g:1004:1: rule__ClassDeclaration__Group_3_0__1__Impl : ( ( rule__ClassDeclaration__Alternatives_3_0_1 ) ) ; + public final void rule__ClassDeclaration__Group_3_0__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1008:1: ( ( ( rule__ClassDeclaration__Alternatives_3_0_1 ) ) ) + // InternalProblem.g:1009:1: ( ( rule__ClassDeclaration__Alternatives_3_0_1 ) ) + { + // InternalProblem.g:1009:1: ( ( rule__ClassDeclaration__Alternatives_3_0_1 ) ) + // InternalProblem.g:1010:2: ( rule__ClassDeclaration__Alternatives_3_0_1 ) + { + before(grammarAccess.getClassDeclarationAccess().getAlternatives_3_0_1()); + // InternalProblem.g:1011:2: ( rule__ClassDeclaration__Alternatives_3_0_1 ) + // InternalProblem.g:1011:3: rule__ClassDeclaration__Alternatives_3_0_1 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Alternatives_3_0_1(); + + state._fsp--; + + + } + + after(grammarAccess.getClassDeclarationAccess().getAlternatives_3_0_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0__1__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1__0" + // InternalProblem.g:1020:1: rule__ClassDeclaration__Group_3_0_1_1__0 : rule__ClassDeclaration__Group_3_0_1_1__0__Impl rule__ClassDeclaration__Group_3_0_1_1__1 ; + public final void rule__ClassDeclaration__Group_3_0_1_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1024:1: ( rule__ClassDeclaration__Group_3_0_1_1__0__Impl rule__ClassDeclaration__Group_3_0_1_1__1 ) + // InternalProblem.g:1025:2: rule__ClassDeclaration__Group_3_0_1_1__0__Impl rule__ClassDeclaration__Group_3_0_1_1__1 + { + pushFollow(FOLLOW_9); + rule__ClassDeclaration__Group_3_0_1_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0_1_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1__0" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1__0__Impl" + // InternalProblem.g:1032:1: rule__ClassDeclaration__Group_3_0_1_1__0__Impl : ( '[' ) ; + public final void rule__ClassDeclaration__Group_3_0_1_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1036:1: ( ( '[' ) ) + // InternalProblem.g:1037:1: ( '[' ) + { + // InternalProblem.g:1037:1: ( '[' ) + // InternalProblem.g:1038:2: '[' + { + before(grammarAccess.getClassDeclarationAccess().getLeftSquareBracketKeyword_3_0_1_1_0()); + match(input,23,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getLeftSquareBracketKeyword_3_0_1_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1__0__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1__1" + // InternalProblem.g:1047:1: rule__ClassDeclaration__Group_3_0_1_1__1 : rule__ClassDeclaration__Group_3_0_1_1__1__Impl rule__ClassDeclaration__Group_3_0_1_1__2 ; + public final void rule__ClassDeclaration__Group_3_0_1_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1051:1: ( rule__ClassDeclaration__Group_3_0_1_1__1__Impl rule__ClassDeclaration__Group_3_0_1_1__2 ) + // InternalProblem.g:1052:2: rule__ClassDeclaration__Group_3_0_1_1__1__Impl rule__ClassDeclaration__Group_3_0_1_1__2 + { + pushFollow(FOLLOW_9); + rule__ClassDeclaration__Group_3_0_1_1__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0_1_1__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1__1" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1__1__Impl" + // InternalProblem.g:1059:1: rule__ClassDeclaration__Group_3_0_1_1__1__Impl : ( ( rule__ClassDeclaration__Group_3_0_1_1_1__0 )? ) ; + public final void rule__ClassDeclaration__Group_3_0_1_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1063:1: ( ( ( rule__ClassDeclaration__Group_3_0_1_1_1__0 )? ) ) + // InternalProblem.g:1064:1: ( ( rule__ClassDeclaration__Group_3_0_1_1_1__0 )? ) + { + // InternalProblem.g:1064:1: ( ( rule__ClassDeclaration__Group_3_0_1_1_1__0 )? ) + // InternalProblem.g:1065:2: ( rule__ClassDeclaration__Group_3_0_1_1_1__0 )? + { + before(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1_1()); + // InternalProblem.g:1066:2: ( rule__ClassDeclaration__Group_3_0_1_1_1__0 )? + int alt17=2; + int LA17_0 = input.LA(1); + + if ( (LA17_0==RULE_ID) ) { + alt17=1; + } + switch (alt17) { + case 1 : + // InternalProblem.g:1066:3: rule__ClassDeclaration__Group_3_0_1_1_1__0 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0_1_1_1__0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1__1__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1__2" + // InternalProblem.g:1074:1: rule__ClassDeclaration__Group_3_0_1_1__2 : rule__ClassDeclaration__Group_3_0_1_1__2__Impl ; + public final void rule__ClassDeclaration__Group_3_0_1_1__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1078:1: ( rule__ClassDeclaration__Group_3_0_1_1__2__Impl ) + // InternalProblem.g:1079:2: rule__ClassDeclaration__Group_3_0_1_1__2__Impl + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0_1_1__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1__2" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1__2__Impl" + // InternalProblem.g:1085:1: rule__ClassDeclaration__Group_3_0_1_1__2__Impl : ( ']' ) ; + public final void rule__ClassDeclaration__Group_3_0_1_1__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1089:1: ( ( ']' ) ) + // InternalProblem.g:1090:1: ( ']' ) + { + // InternalProblem.g:1090:1: ( ']' ) + // InternalProblem.g:1091:2: ']' + { + before(grammarAccess.getClassDeclarationAccess().getRightSquareBracketKeyword_3_0_1_1_2()); + match(input,24,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getRightSquareBracketKeyword_3_0_1_1_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1__2__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1_1__0" + // InternalProblem.g:1101:1: rule__ClassDeclaration__Group_3_0_1_1_1__0 : rule__ClassDeclaration__Group_3_0_1_1_1__0__Impl rule__ClassDeclaration__Group_3_0_1_1_1__1 ; + public final void rule__ClassDeclaration__Group_3_0_1_1_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1105:1: ( rule__ClassDeclaration__Group_3_0_1_1_1__0__Impl rule__ClassDeclaration__Group_3_0_1_1_1__1 ) + // InternalProblem.g:1106:2: rule__ClassDeclaration__Group_3_0_1_1_1__0__Impl rule__ClassDeclaration__Group_3_0_1_1_1__1 + { + pushFollow(FOLLOW_10); + rule__ClassDeclaration__Group_3_0_1_1_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0_1_1_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1_1__0" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1_1__0__Impl" + // InternalProblem.g:1113:1: rule__ClassDeclaration__Group_3_0_1_1_1__0__Impl : ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0 ) ) ; + public final void rule__ClassDeclaration__Group_3_0_1_1_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1117:1: ( ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0 ) ) ) + // InternalProblem.g:1118:1: ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0 ) ) + { + // InternalProblem.g:1118:1: ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0 ) ) + // InternalProblem.g:1119:2: ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0 ) + { + before(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_1_1_0()); + // InternalProblem.g:1120:2: ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0 ) + // InternalProblem.g:1120:3: rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0(); + + state._fsp--; + + + } + + after(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_1_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1_1__0__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1_1__1" + // InternalProblem.g:1128:1: rule__ClassDeclaration__Group_3_0_1_1_1__1 : rule__ClassDeclaration__Group_3_0_1_1_1__1__Impl ; + public final void rule__ClassDeclaration__Group_3_0_1_1_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1132:1: ( rule__ClassDeclaration__Group_3_0_1_1_1__1__Impl ) + // InternalProblem.g:1133:2: rule__ClassDeclaration__Group_3_0_1_1_1__1__Impl + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0_1_1_1__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1_1__1" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1_1__1__Impl" + // InternalProblem.g:1139:1: rule__ClassDeclaration__Group_3_0_1_1_1__1__Impl : ( ( rule__ClassDeclaration__Group_3_0_1_1_1_1__0 )* ) ; + public final void rule__ClassDeclaration__Group_3_0_1_1_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1143:1: ( ( ( rule__ClassDeclaration__Group_3_0_1_1_1_1__0 )* ) ) + // InternalProblem.g:1144:1: ( ( rule__ClassDeclaration__Group_3_0_1_1_1_1__0 )* ) + { + // InternalProblem.g:1144:1: ( ( rule__ClassDeclaration__Group_3_0_1_1_1_1__0 )* ) + // InternalProblem.g:1145:2: ( rule__ClassDeclaration__Group_3_0_1_1_1_1__0 )* + { + before(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1_1_1()); + // InternalProblem.g:1146:2: ( rule__ClassDeclaration__Group_3_0_1_1_1_1__0 )* + loop18: + do { + int alt18=2; + int LA18_0 = input.LA(1); + + if ( (LA18_0==25) ) { + alt18=1; + } + + + switch (alt18) { + case 1 : + // InternalProblem.g:1146:3: rule__ClassDeclaration__Group_3_0_1_1_1_1__0 + { + pushFollow(FOLLOW_7); + rule__ClassDeclaration__Group_3_0_1_1_1_1__0(); + + state._fsp--; + + + } + break; + + default : + break loop18; + } + } while (true); + + after(grammarAccess.getClassDeclarationAccess().getGroup_3_0_1_1_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1_1__1__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1_1_1__0" + // InternalProblem.g:1155:1: rule__ClassDeclaration__Group_3_0_1_1_1_1__0 : rule__ClassDeclaration__Group_3_0_1_1_1_1__0__Impl rule__ClassDeclaration__Group_3_0_1_1_1_1__1 ; + public final void rule__ClassDeclaration__Group_3_0_1_1_1_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1159:1: ( rule__ClassDeclaration__Group_3_0_1_1_1_1__0__Impl rule__ClassDeclaration__Group_3_0_1_1_1_1__1 ) + // InternalProblem.g:1160:2: rule__ClassDeclaration__Group_3_0_1_1_1_1__0__Impl rule__ClassDeclaration__Group_3_0_1_1_1_1__1 + { + pushFollow(FOLLOW_5); + rule__ClassDeclaration__Group_3_0_1_1_1_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0_1_1_1_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1_1_1__0" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1_1_1__0__Impl" + // InternalProblem.g:1167:1: rule__ClassDeclaration__Group_3_0_1_1_1_1__0__Impl : ( ',' ) ; + public final void rule__ClassDeclaration__Group_3_0_1_1_1_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1171:1: ( ( ',' ) ) + // InternalProblem.g:1172:1: ( ',' ) + { + // InternalProblem.g:1172:1: ( ',' ) + // InternalProblem.g:1173:2: ',' + { + before(grammarAccess.getClassDeclarationAccess().getCommaKeyword_3_0_1_1_1_1_0()); + match(input,25,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getCommaKeyword_3_0_1_1_1_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1_1_1__0__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1_1_1__1" + // InternalProblem.g:1182:1: rule__ClassDeclaration__Group_3_0_1_1_1_1__1 : rule__ClassDeclaration__Group_3_0_1_1_1_1__1__Impl ; + public final void rule__ClassDeclaration__Group_3_0_1_1_1_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1186:1: ( rule__ClassDeclaration__Group_3_0_1_1_1_1__1__Impl ) + // InternalProblem.g:1187:2: rule__ClassDeclaration__Group_3_0_1_1_1_1__1__Impl + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_3_0_1_1_1_1__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1_1_1__1" + + + // $ANTLR start "rule__ClassDeclaration__Group_3_0_1_1_1_1__1__Impl" + // InternalProblem.g:1193:1: rule__ClassDeclaration__Group_3_0_1_1_1_1__1__Impl : ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1 ) ) ; + public final void rule__ClassDeclaration__Group_3_0_1_1_1_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1197:1: ( ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1 ) ) ) + // InternalProblem.g:1198:1: ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1 ) ) + { + // InternalProblem.g:1198:1: ( ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1 ) ) + // InternalProblem.g:1199:2: ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1 ) + { + before(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_1_1_1_1()); + // InternalProblem.g:1200:2: ( rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1 ) + // InternalProblem.g:1200:3: rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1(); + + state._fsp--; + + + } + + after(grammarAccess.getClassDeclarationAccess().getSuperTypesAssignment_3_0_1_1_1_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_3_0_1_1_1_1__1__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_4__0" + // InternalProblem.g:1209:1: rule__ClassDeclaration__Group_4__0 : rule__ClassDeclaration__Group_4__0__Impl rule__ClassDeclaration__Group_4__1 ; + public final void rule__ClassDeclaration__Group_4__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1213:1: ( rule__ClassDeclaration__Group_4__0__Impl rule__ClassDeclaration__Group_4__1 ) + // InternalProblem.g:1214:2: rule__ClassDeclaration__Group_4__0__Impl rule__ClassDeclaration__Group_4__1 + { + pushFollow(FOLLOW_11); + rule__ClassDeclaration__Group_4__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_4__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_4__0" + + + // $ANTLR start "rule__ClassDeclaration__Group_4__0__Impl" + // InternalProblem.g:1221:1: rule__ClassDeclaration__Group_4__0__Impl : ( ',' ) ; + public final void rule__ClassDeclaration__Group_4__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1225:1: ( ( ',' ) ) + // InternalProblem.g:1226:1: ( ',' ) + { + // InternalProblem.g:1226:1: ( ',' ) + // InternalProblem.g:1227:2: ',' + { + before(grammarAccess.getClassDeclarationAccess().getCommaKeyword_4_0()); + match(input,25,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getCommaKeyword_4_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_4__0__Impl" + + + // $ANTLR start "rule__ClassDeclaration__Group_4__1" + // InternalProblem.g:1236:1: rule__ClassDeclaration__Group_4__1 : rule__ClassDeclaration__Group_4__1__Impl ; + public final void rule__ClassDeclaration__Group_4__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1240:1: ( rule__ClassDeclaration__Group_4__1__Impl ) + // InternalProblem.g:1241:2: rule__ClassDeclaration__Group_4__1__Impl + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__Group_4__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_4__1" + + + // $ANTLR start "rule__ClassDeclaration__Group_4__1__Impl" + // InternalProblem.g:1247:1: rule__ClassDeclaration__Group_4__1__Impl : ( ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1 ) ) ; + public final void rule__ClassDeclaration__Group_4__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1251:1: ( ( ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1 ) ) ) + // InternalProblem.g:1252:1: ( ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1 ) ) + { + // InternalProblem.g:1252:1: ( ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1 ) ) + // InternalProblem.g:1253:2: ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1 ) + { + before(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsAssignment_4_1()); + // InternalProblem.g:1254:2: ( rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1 ) + // InternalProblem.g:1254:3: rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1 + { + pushFollow(FOLLOW_2); + rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1(); + + state._fsp--; + + + } + + after(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsAssignment_4_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__Group_4__1__Impl" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__0" + // InternalProblem.g:1263:1: rule__ReferenceDeclaration__Group__0 : rule__ReferenceDeclaration__Group__0__Impl rule__ReferenceDeclaration__Group__1 ; + public final void rule__ReferenceDeclaration__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1267:1: ( rule__ReferenceDeclaration__Group__0__Impl rule__ReferenceDeclaration__Group__1 ) + // InternalProblem.g:1268:2: rule__ReferenceDeclaration__Group__0__Impl rule__ReferenceDeclaration__Group__1 + { + pushFollow(FOLLOW_5); + rule__ReferenceDeclaration__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__0" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__0__Impl" + // InternalProblem.g:1275:1: rule__ReferenceDeclaration__Group__0__Impl : ( ( rule__ReferenceDeclaration__Alternatives_0 ) ) ; + public final void rule__ReferenceDeclaration__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1279:1: ( ( ( rule__ReferenceDeclaration__Alternatives_0 ) ) ) + // InternalProblem.g:1280:1: ( ( rule__ReferenceDeclaration__Alternatives_0 ) ) + { + // InternalProblem.g:1280:1: ( ( rule__ReferenceDeclaration__Alternatives_0 ) ) + // InternalProblem.g:1281:2: ( rule__ReferenceDeclaration__Alternatives_0 ) + { + before(grammarAccess.getReferenceDeclarationAccess().getAlternatives_0()); + // InternalProblem.g:1282:2: ( rule__ReferenceDeclaration__Alternatives_0 ) + // InternalProblem.g:1282:3: rule__ReferenceDeclaration__Alternatives_0 + { + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Alternatives_0(); + + state._fsp--; + + + } + + after(grammarAccess.getReferenceDeclarationAccess().getAlternatives_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__0__Impl" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__1" + // InternalProblem.g:1290:1: rule__ReferenceDeclaration__Group__1 : rule__ReferenceDeclaration__Group__1__Impl rule__ReferenceDeclaration__Group__2 ; + public final void rule__ReferenceDeclaration__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1294:1: ( rule__ReferenceDeclaration__Group__1__Impl rule__ReferenceDeclaration__Group__2 ) + // InternalProblem.g:1295:2: rule__ReferenceDeclaration__Group__1__Impl rule__ReferenceDeclaration__Group__2 + { + pushFollow(FOLLOW_12); + rule__ReferenceDeclaration__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__1" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__1__Impl" + // InternalProblem.g:1302:1: rule__ReferenceDeclaration__Group__1__Impl : ( ( rule__ReferenceDeclaration__ReferenceTypeAssignment_1 ) ) ; + public final void rule__ReferenceDeclaration__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1306:1: ( ( ( rule__ReferenceDeclaration__ReferenceTypeAssignment_1 ) ) ) + // InternalProblem.g:1307:1: ( ( rule__ReferenceDeclaration__ReferenceTypeAssignment_1 ) ) + { + // InternalProblem.g:1307:1: ( ( rule__ReferenceDeclaration__ReferenceTypeAssignment_1 ) ) + // InternalProblem.g:1308:2: ( rule__ReferenceDeclaration__ReferenceTypeAssignment_1 ) + { + before(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeAssignment_1()); + // InternalProblem.g:1309:2: ( rule__ReferenceDeclaration__ReferenceTypeAssignment_1 ) + // InternalProblem.g:1309:3: rule__ReferenceDeclaration__ReferenceTypeAssignment_1 + { + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__ReferenceTypeAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__1__Impl" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__2" + // InternalProblem.g:1317:1: rule__ReferenceDeclaration__Group__2 : rule__ReferenceDeclaration__Group__2__Impl rule__ReferenceDeclaration__Group__3 ; + public final void rule__ReferenceDeclaration__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1321:1: ( rule__ReferenceDeclaration__Group__2__Impl rule__ReferenceDeclaration__Group__3 ) + // InternalProblem.g:1322:2: rule__ReferenceDeclaration__Group__2__Impl rule__ReferenceDeclaration__Group__3 + { + pushFollow(FOLLOW_13); + rule__ReferenceDeclaration__Group__2__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group__3(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__2" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__2__Impl" + // InternalProblem.g:1329:1: rule__ReferenceDeclaration__Group__2__Impl : ( '[' ) ; + public final void rule__ReferenceDeclaration__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1333:1: ( ( '[' ) ) + // InternalProblem.g:1334:1: ( '[' ) + { + // InternalProblem.g:1334:1: ( '[' ) + // InternalProblem.g:1335:2: '[' + { + before(grammarAccess.getReferenceDeclarationAccess().getLeftSquareBracketKeyword_2()); + match(input,23,FOLLOW_2); + after(grammarAccess.getReferenceDeclarationAccess().getLeftSquareBracketKeyword_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__2__Impl" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__3" + // InternalProblem.g:1344:1: rule__ReferenceDeclaration__Group__3 : rule__ReferenceDeclaration__Group__3__Impl rule__ReferenceDeclaration__Group__4 ; + public final void rule__ReferenceDeclaration__Group__3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1348:1: ( rule__ReferenceDeclaration__Group__3__Impl rule__ReferenceDeclaration__Group__4 ) + // InternalProblem.g:1349:2: rule__ReferenceDeclaration__Group__3__Impl rule__ReferenceDeclaration__Group__4 + { + pushFollow(FOLLOW_14); + rule__ReferenceDeclaration__Group__3__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group__4(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__3" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__3__Impl" + // InternalProblem.g:1356:1: rule__ReferenceDeclaration__Group__3__Impl : ( ( rule__ReferenceDeclaration__MultiplicityAssignment_3 ) ) ; + public final void rule__ReferenceDeclaration__Group__3__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1360:1: ( ( ( rule__ReferenceDeclaration__MultiplicityAssignment_3 ) ) ) + // InternalProblem.g:1361:1: ( ( rule__ReferenceDeclaration__MultiplicityAssignment_3 ) ) + { + // InternalProblem.g:1361:1: ( ( rule__ReferenceDeclaration__MultiplicityAssignment_3 ) ) + // InternalProblem.g:1362:2: ( rule__ReferenceDeclaration__MultiplicityAssignment_3 ) + { + before(grammarAccess.getReferenceDeclarationAccess().getMultiplicityAssignment_3()); + // InternalProblem.g:1363:2: ( rule__ReferenceDeclaration__MultiplicityAssignment_3 ) + // InternalProblem.g:1363:3: rule__ReferenceDeclaration__MultiplicityAssignment_3 + { + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__MultiplicityAssignment_3(); + + state._fsp--; + + + } + + after(grammarAccess.getReferenceDeclarationAccess().getMultiplicityAssignment_3()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__3__Impl" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__4" + // InternalProblem.g:1371:1: rule__ReferenceDeclaration__Group__4 : rule__ReferenceDeclaration__Group__4__Impl rule__ReferenceDeclaration__Group__5 ; + public final void rule__ReferenceDeclaration__Group__4() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1375:1: ( rule__ReferenceDeclaration__Group__4__Impl rule__ReferenceDeclaration__Group__5 ) + // InternalProblem.g:1376:2: rule__ReferenceDeclaration__Group__4__Impl rule__ReferenceDeclaration__Group__5 + { + pushFollow(FOLLOW_5); + rule__ReferenceDeclaration__Group__4__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group__5(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__4" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__4__Impl" + // InternalProblem.g:1383:1: rule__ReferenceDeclaration__Group__4__Impl : ( ']' ) ; + public final void rule__ReferenceDeclaration__Group__4__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1387:1: ( ( ']' ) ) + // InternalProblem.g:1388:1: ( ']' ) + { + // InternalProblem.g:1388:1: ( ']' ) + // InternalProblem.g:1389:2: ']' + { + before(grammarAccess.getReferenceDeclarationAccess().getRightSquareBracketKeyword_4()); + match(input,24,FOLLOW_2); + after(grammarAccess.getReferenceDeclarationAccess().getRightSquareBracketKeyword_4()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__4__Impl" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__5" + // InternalProblem.g:1398:1: rule__ReferenceDeclaration__Group__5 : rule__ReferenceDeclaration__Group__5__Impl rule__ReferenceDeclaration__Group__6 ; + public final void rule__ReferenceDeclaration__Group__5() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1402:1: ( rule__ReferenceDeclaration__Group__5__Impl rule__ReferenceDeclaration__Group__6 ) + // InternalProblem.g:1403:2: rule__ReferenceDeclaration__Group__5__Impl rule__ReferenceDeclaration__Group__6 + { + pushFollow(FOLLOW_15); + rule__ReferenceDeclaration__Group__5__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group__6(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__5" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__5__Impl" + // InternalProblem.g:1410:1: rule__ReferenceDeclaration__Group__5__Impl : ( ( rule__ReferenceDeclaration__NameAssignment_5 ) ) ; + public final void rule__ReferenceDeclaration__Group__5__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1414:1: ( ( ( rule__ReferenceDeclaration__NameAssignment_5 ) ) ) + // InternalProblem.g:1415:1: ( ( rule__ReferenceDeclaration__NameAssignment_5 ) ) + { + // InternalProblem.g:1415:1: ( ( rule__ReferenceDeclaration__NameAssignment_5 ) ) + // InternalProblem.g:1416:2: ( rule__ReferenceDeclaration__NameAssignment_5 ) + { + before(grammarAccess.getReferenceDeclarationAccess().getNameAssignment_5()); + // InternalProblem.g:1417:2: ( rule__ReferenceDeclaration__NameAssignment_5 ) + // InternalProblem.g:1417:3: rule__ReferenceDeclaration__NameAssignment_5 + { + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__NameAssignment_5(); + + state._fsp--; + + + } + + after(grammarAccess.getReferenceDeclarationAccess().getNameAssignment_5()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__5__Impl" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__6" + // InternalProblem.g:1425:1: rule__ReferenceDeclaration__Group__6 : rule__ReferenceDeclaration__Group__6__Impl ; + public final void rule__ReferenceDeclaration__Group__6() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1429:1: ( rule__ReferenceDeclaration__Group__6__Impl ) + // InternalProblem.g:1430:2: rule__ReferenceDeclaration__Group__6__Impl + { + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group__6__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__6" + + + // $ANTLR start "rule__ReferenceDeclaration__Group__6__Impl" + // InternalProblem.g:1436:1: rule__ReferenceDeclaration__Group__6__Impl : ( ( rule__ReferenceDeclaration__Group_6__0 )? ) ; + public final void rule__ReferenceDeclaration__Group__6__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1440:1: ( ( ( rule__ReferenceDeclaration__Group_6__0 )? ) ) + // InternalProblem.g:1441:1: ( ( rule__ReferenceDeclaration__Group_6__0 )? ) + { + // InternalProblem.g:1441:1: ( ( rule__ReferenceDeclaration__Group_6__0 )? ) + // InternalProblem.g:1442:2: ( rule__ReferenceDeclaration__Group_6__0 )? + { + before(grammarAccess.getReferenceDeclarationAccess().getGroup_6()); + // InternalProblem.g:1443:2: ( rule__ReferenceDeclaration__Group_6__0 )? + int alt19=2; + int LA19_0 = input.LA(1); + + if ( (LA19_0==26) ) { + alt19=1; + } + switch (alt19) { + case 1 : + // InternalProblem.g:1443:3: rule__ReferenceDeclaration__Group_6__0 + { + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group_6__0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getReferenceDeclarationAccess().getGroup_6()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group__6__Impl" + + + // $ANTLR start "rule__ReferenceDeclaration__Group_6__0" + // InternalProblem.g:1452:1: rule__ReferenceDeclaration__Group_6__0 : rule__ReferenceDeclaration__Group_6__0__Impl rule__ReferenceDeclaration__Group_6__1 ; + public final void rule__ReferenceDeclaration__Group_6__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1456:1: ( rule__ReferenceDeclaration__Group_6__0__Impl rule__ReferenceDeclaration__Group_6__1 ) + // InternalProblem.g:1457:2: rule__ReferenceDeclaration__Group_6__0__Impl rule__ReferenceDeclaration__Group_6__1 + { + pushFollow(FOLLOW_5); + rule__ReferenceDeclaration__Group_6__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group_6__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group_6__0" + + + // $ANTLR start "rule__ReferenceDeclaration__Group_6__0__Impl" + // InternalProblem.g:1464:1: rule__ReferenceDeclaration__Group_6__0__Impl : ( 'opposite' ) ; + public final void rule__ReferenceDeclaration__Group_6__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1468:1: ( ( 'opposite' ) ) + // InternalProblem.g:1469:1: ( 'opposite' ) + { + // InternalProblem.g:1469:1: ( 'opposite' ) + // InternalProblem.g:1470:2: 'opposite' + { + before(grammarAccess.getReferenceDeclarationAccess().getOppositeKeyword_6_0()); + match(input,26,FOLLOW_2); + after(grammarAccess.getReferenceDeclarationAccess().getOppositeKeyword_6_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group_6__0__Impl" + + + // $ANTLR start "rule__ReferenceDeclaration__Group_6__1" + // InternalProblem.g:1479:1: rule__ReferenceDeclaration__Group_6__1 : rule__ReferenceDeclaration__Group_6__1__Impl ; + public final void rule__ReferenceDeclaration__Group_6__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1483:1: ( rule__ReferenceDeclaration__Group_6__1__Impl ) + // InternalProblem.g:1484:2: rule__ReferenceDeclaration__Group_6__1__Impl + { + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__Group_6__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group_6__1" + + + // $ANTLR start "rule__ReferenceDeclaration__Group_6__1__Impl" + // InternalProblem.g:1490:1: rule__ReferenceDeclaration__Group_6__1__Impl : ( ( rule__ReferenceDeclaration__OppositeAssignment_6_1 ) ) ; + public final void rule__ReferenceDeclaration__Group_6__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1494:1: ( ( ( rule__ReferenceDeclaration__OppositeAssignment_6_1 ) ) ) + // InternalProblem.g:1495:1: ( ( rule__ReferenceDeclaration__OppositeAssignment_6_1 ) ) + { + // InternalProblem.g:1495:1: ( ( rule__ReferenceDeclaration__OppositeAssignment_6_1 ) ) + // InternalProblem.g:1496:2: ( rule__ReferenceDeclaration__OppositeAssignment_6_1 ) + { + before(grammarAccess.getReferenceDeclarationAccess().getOppositeAssignment_6_1()); + // InternalProblem.g:1497:2: ( rule__ReferenceDeclaration__OppositeAssignment_6_1 ) + // InternalProblem.g:1497:3: rule__ReferenceDeclaration__OppositeAssignment_6_1 + { + pushFollow(FOLLOW_2); + rule__ReferenceDeclaration__OppositeAssignment_6_1(); + + state._fsp--; + + + } + + after(grammarAccess.getReferenceDeclarationAccess().getOppositeAssignment_6_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__Group_6__1__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group__0" + // InternalProblem.g:1506:1: rule__PredicateDefinition__Group__0 : rule__PredicateDefinition__Group__0__Impl rule__PredicateDefinition__Group__1 ; + public final void rule__PredicateDefinition__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1510:1: ( rule__PredicateDefinition__Group__0__Impl rule__PredicateDefinition__Group__1 ) + // InternalProblem.g:1511:2: rule__PredicateDefinition__Group__0__Impl rule__PredicateDefinition__Group__1 + { + pushFollow(FOLLOW_5); + rule__PredicateDefinition__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__0" + + + // $ANTLR start "rule__PredicateDefinition__Group__0__Impl" + // InternalProblem.g:1518:1: rule__PredicateDefinition__Group__0__Impl : ( ( rule__PredicateDefinition__Alternatives_0 ) ) ; + public final void rule__PredicateDefinition__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1522:1: ( ( ( rule__PredicateDefinition__Alternatives_0 ) ) ) + // InternalProblem.g:1523:1: ( ( rule__PredicateDefinition__Alternatives_0 ) ) + { + // InternalProblem.g:1523:1: ( ( rule__PredicateDefinition__Alternatives_0 ) ) + // InternalProblem.g:1524:2: ( rule__PredicateDefinition__Alternatives_0 ) + { + before(grammarAccess.getPredicateDefinitionAccess().getAlternatives_0()); + // InternalProblem.g:1525:2: ( rule__PredicateDefinition__Alternatives_0 ) + // InternalProblem.g:1525:3: rule__PredicateDefinition__Alternatives_0 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Alternatives_0(); + + state._fsp--; + + + } + + after(grammarAccess.getPredicateDefinitionAccess().getAlternatives_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__0__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group__1" + // InternalProblem.g:1533:1: rule__PredicateDefinition__Group__1 : rule__PredicateDefinition__Group__1__Impl rule__PredicateDefinition__Group__2 ; + public final void rule__PredicateDefinition__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1537:1: ( rule__PredicateDefinition__Group__1__Impl rule__PredicateDefinition__Group__2 ) + // InternalProblem.g:1538:2: rule__PredicateDefinition__Group__1__Impl rule__PredicateDefinition__Group__2 + { + pushFollow(FOLLOW_16); + rule__PredicateDefinition__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__1" + + + // $ANTLR start "rule__PredicateDefinition__Group__1__Impl" + // InternalProblem.g:1545:1: rule__PredicateDefinition__Group__1__Impl : ( ( rule__PredicateDefinition__NameAssignment_1 ) ) ; + public final void rule__PredicateDefinition__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1549:1: ( ( ( rule__PredicateDefinition__NameAssignment_1 ) ) ) + // InternalProblem.g:1550:1: ( ( rule__PredicateDefinition__NameAssignment_1 ) ) + { + // InternalProblem.g:1550:1: ( ( rule__PredicateDefinition__NameAssignment_1 ) ) + // InternalProblem.g:1551:2: ( rule__PredicateDefinition__NameAssignment_1 ) + { + before(grammarAccess.getPredicateDefinitionAccess().getNameAssignment_1()); + // InternalProblem.g:1552:2: ( rule__PredicateDefinition__NameAssignment_1 ) + // InternalProblem.g:1552:3: rule__PredicateDefinition__NameAssignment_1 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__NameAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getPredicateDefinitionAccess().getNameAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__1__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group__2" + // InternalProblem.g:1560:1: rule__PredicateDefinition__Group__2 : rule__PredicateDefinition__Group__2__Impl rule__PredicateDefinition__Group__3 ; + public final void rule__PredicateDefinition__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1564:1: ( rule__PredicateDefinition__Group__2__Impl rule__PredicateDefinition__Group__3 ) + // InternalProblem.g:1565:2: rule__PredicateDefinition__Group__2__Impl rule__PredicateDefinition__Group__3 + { + pushFollow(FOLLOW_17); + rule__PredicateDefinition__Group__2__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group__3(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__2" + + + // $ANTLR start "rule__PredicateDefinition__Group__2__Impl" + // InternalProblem.g:1572:1: rule__PredicateDefinition__Group__2__Impl : ( '(' ) ; + public final void rule__PredicateDefinition__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1576:1: ( ( '(' ) ) + // InternalProblem.g:1577:1: ( '(' ) + { + // InternalProblem.g:1577:1: ( '(' ) + // InternalProblem.g:1578:2: '(' + { + before(grammarAccess.getPredicateDefinitionAccess().getLeftParenthesisKeyword_2()); + match(input,27,FOLLOW_2); + after(grammarAccess.getPredicateDefinitionAccess().getLeftParenthesisKeyword_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__2__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group__3" + // InternalProblem.g:1587:1: rule__PredicateDefinition__Group__3 : rule__PredicateDefinition__Group__3__Impl rule__PredicateDefinition__Group__4 ; + public final void rule__PredicateDefinition__Group__3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1591:1: ( rule__PredicateDefinition__Group__3__Impl rule__PredicateDefinition__Group__4 ) + // InternalProblem.g:1592:2: rule__PredicateDefinition__Group__3__Impl rule__PredicateDefinition__Group__4 + { + pushFollow(FOLLOW_17); + rule__PredicateDefinition__Group__3__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group__4(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__3" + + + // $ANTLR start "rule__PredicateDefinition__Group__3__Impl" + // InternalProblem.g:1599:1: rule__PredicateDefinition__Group__3__Impl : ( ( rule__PredicateDefinition__Group_3__0 )? ) ; + public final void rule__PredicateDefinition__Group__3__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1603:1: ( ( ( rule__PredicateDefinition__Group_3__0 )? ) ) + // InternalProblem.g:1604:1: ( ( rule__PredicateDefinition__Group_3__0 )? ) + { + // InternalProblem.g:1604:1: ( ( rule__PredicateDefinition__Group_3__0 )? ) + // InternalProblem.g:1605:2: ( rule__PredicateDefinition__Group_3__0 )? + { + before(grammarAccess.getPredicateDefinitionAccess().getGroup_3()); + // InternalProblem.g:1606:2: ( rule__PredicateDefinition__Group_3__0 )? + int alt20=2; + int LA20_0 = input.LA(1); + + if ( (LA20_0==RULE_ID) ) { + alt20=1; + } + switch (alt20) { + case 1 : + // InternalProblem.g:1606:3: rule__PredicateDefinition__Group_3__0 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_3__0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getPredicateDefinitionAccess().getGroup_3()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__3__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group__4" + // InternalProblem.g:1614:1: rule__PredicateDefinition__Group__4 : rule__PredicateDefinition__Group__4__Impl rule__PredicateDefinition__Group__5 ; + public final void rule__PredicateDefinition__Group__4() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1618:1: ( rule__PredicateDefinition__Group__4__Impl rule__PredicateDefinition__Group__5 ) + // InternalProblem.g:1619:2: rule__PredicateDefinition__Group__4__Impl rule__PredicateDefinition__Group__5 + { + pushFollow(FOLLOW_18); + rule__PredicateDefinition__Group__4__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group__5(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__4" + + + // $ANTLR start "rule__PredicateDefinition__Group__4__Impl" + // InternalProblem.g:1626:1: rule__PredicateDefinition__Group__4__Impl : ( ')' ) ; + public final void rule__PredicateDefinition__Group__4__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1630:1: ( ( ')' ) ) + // InternalProblem.g:1631:1: ( ')' ) + { + // InternalProblem.g:1631:1: ( ')' ) + // InternalProblem.g:1632:2: ')' + { + before(grammarAccess.getPredicateDefinitionAccess().getRightParenthesisKeyword_4()); + match(input,28,FOLLOW_2); + after(grammarAccess.getPredicateDefinitionAccess().getRightParenthesisKeyword_4()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__4__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group__5" + // InternalProblem.g:1641:1: rule__PredicateDefinition__Group__5 : rule__PredicateDefinition__Group__5__Impl rule__PredicateDefinition__Group__6 ; + public final void rule__PredicateDefinition__Group__5() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1645:1: ( rule__PredicateDefinition__Group__5__Impl rule__PredicateDefinition__Group__6 ) + // InternalProblem.g:1646:2: rule__PredicateDefinition__Group__5__Impl rule__PredicateDefinition__Group__6 + { + pushFollow(FOLLOW_18); + rule__PredicateDefinition__Group__5__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group__6(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__5" + + + // $ANTLR start "rule__PredicateDefinition__Group__5__Impl" + // InternalProblem.g:1653:1: rule__PredicateDefinition__Group__5__Impl : ( ( rule__PredicateDefinition__Group_5__0 )? ) ; + public final void rule__PredicateDefinition__Group__5__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1657:1: ( ( ( rule__PredicateDefinition__Group_5__0 )? ) ) + // InternalProblem.g:1658:1: ( ( rule__PredicateDefinition__Group_5__0 )? ) + { + // InternalProblem.g:1658:1: ( ( rule__PredicateDefinition__Group_5__0 )? ) + // InternalProblem.g:1659:2: ( rule__PredicateDefinition__Group_5__0 )? + { + before(grammarAccess.getPredicateDefinitionAccess().getGroup_5()); + // InternalProblem.g:1660:2: ( rule__PredicateDefinition__Group_5__0 )? + int alt21=2; + int LA21_0 = input.LA(1); + + if ( (LA21_0==29) ) { + alt21=1; + } + switch (alt21) { + case 1 : + // InternalProblem.g:1660:3: rule__PredicateDefinition__Group_5__0 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_5__0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getPredicateDefinitionAccess().getGroup_5()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__5__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group__6" + // InternalProblem.g:1668:1: rule__PredicateDefinition__Group__6 : rule__PredicateDefinition__Group__6__Impl ; + public final void rule__PredicateDefinition__Group__6() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1672:1: ( rule__PredicateDefinition__Group__6__Impl ) + // InternalProblem.g:1673:2: rule__PredicateDefinition__Group__6__Impl + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group__6__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__6" + + + // $ANTLR start "rule__PredicateDefinition__Group__6__Impl" + // InternalProblem.g:1679:1: rule__PredicateDefinition__Group__6__Impl : ( '.' ) ; + public final void rule__PredicateDefinition__Group__6__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1683:1: ( ( '.' ) ) + // InternalProblem.g:1684:1: ( '.' ) + { + // InternalProblem.g:1684:1: ( '.' ) + // InternalProblem.g:1685:2: '.' + { + before(grammarAccess.getPredicateDefinitionAccess().getFullStopKeyword_6()); + match(input,21,FOLLOW_2); + after(grammarAccess.getPredicateDefinitionAccess().getFullStopKeyword_6()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group__6__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_0_0__0" + // InternalProblem.g:1695:1: rule__PredicateDefinition__Group_0_0__0 : rule__PredicateDefinition__Group_0_0__0__Impl rule__PredicateDefinition__Group_0_0__1 ; + public final void rule__PredicateDefinition__Group_0_0__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1699:1: ( rule__PredicateDefinition__Group_0_0__0__Impl rule__PredicateDefinition__Group_0_0__1 ) + // InternalProblem.g:1700:2: rule__PredicateDefinition__Group_0_0__0__Impl rule__PredicateDefinition__Group_0_0__1 + { + pushFollow(FOLLOW_19); + rule__PredicateDefinition__Group_0_0__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_0_0__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_0_0__0" + + + // $ANTLR start "rule__PredicateDefinition__Group_0_0__0__Impl" + // InternalProblem.g:1707:1: rule__PredicateDefinition__Group_0_0__0__Impl : ( ( rule__PredicateDefinition__ErrorAssignment_0_0_0 ) ) ; + public final void rule__PredicateDefinition__Group_0_0__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1711:1: ( ( ( rule__PredicateDefinition__ErrorAssignment_0_0_0 ) ) ) + // InternalProblem.g:1712:1: ( ( rule__PredicateDefinition__ErrorAssignment_0_0_0 ) ) + { + // InternalProblem.g:1712:1: ( ( rule__PredicateDefinition__ErrorAssignment_0_0_0 ) ) + // InternalProblem.g:1713:2: ( rule__PredicateDefinition__ErrorAssignment_0_0_0 ) + { + before(grammarAccess.getPredicateDefinitionAccess().getErrorAssignment_0_0_0()); + // InternalProblem.g:1714:2: ( rule__PredicateDefinition__ErrorAssignment_0_0_0 ) + // InternalProblem.g:1714:3: rule__PredicateDefinition__ErrorAssignment_0_0_0 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__ErrorAssignment_0_0_0(); + + state._fsp--; + + + } + + after(grammarAccess.getPredicateDefinitionAccess().getErrorAssignment_0_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_0_0__0__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_0_0__1" + // InternalProblem.g:1722:1: rule__PredicateDefinition__Group_0_0__1 : rule__PredicateDefinition__Group_0_0__1__Impl ; + public final void rule__PredicateDefinition__Group_0_0__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1726:1: ( rule__PredicateDefinition__Group_0_0__1__Impl ) + // InternalProblem.g:1727:2: rule__PredicateDefinition__Group_0_0__1__Impl + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_0_0__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_0_0__1" + + + // $ANTLR start "rule__PredicateDefinition__Group_0_0__1__Impl" + // InternalProblem.g:1733:1: rule__PredicateDefinition__Group_0_0__1__Impl : ( ( 'pred' )? ) ; + public final void rule__PredicateDefinition__Group_0_0__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1737:1: ( ( ( 'pred' )? ) ) + // InternalProblem.g:1738:1: ( ( 'pred' )? ) + { + // InternalProblem.g:1738:1: ( ( 'pred' )? ) + // InternalProblem.g:1739:2: ( 'pred' )? + { + before(grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); + // InternalProblem.g:1740:2: ( 'pred' )? + int alt22=2; + int LA22_0 = input.LA(1); + + if ( (LA22_0==12) ) { + alt22=1; + } + switch (alt22) { + case 1 : + // InternalProblem.g:1740:3: 'pred' + { + match(input,12,FOLLOW_2); + + } + break; + + } + + after(grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_0_0__1__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_3__0" + // InternalProblem.g:1749:1: rule__PredicateDefinition__Group_3__0 : rule__PredicateDefinition__Group_3__0__Impl rule__PredicateDefinition__Group_3__1 ; + public final void rule__PredicateDefinition__Group_3__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1753:1: ( rule__PredicateDefinition__Group_3__0__Impl rule__PredicateDefinition__Group_3__1 ) + // InternalProblem.g:1754:2: rule__PredicateDefinition__Group_3__0__Impl rule__PredicateDefinition__Group_3__1 + { + pushFollow(FOLLOW_10); + rule__PredicateDefinition__Group_3__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_3__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_3__0" + + + // $ANTLR start "rule__PredicateDefinition__Group_3__0__Impl" + // InternalProblem.g:1761:1: rule__PredicateDefinition__Group_3__0__Impl : ( ( rule__PredicateDefinition__ParametersAssignment_3_0 ) ) ; + public final void rule__PredicateDefinition__Group_3__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1765:1: ( ( ( rule__PredicateDefinition__ParametersAssignment_3_0 ) ) ) + // InternalProblem.g:1766:1: ( ( rule__PredicateDefinition__ParametersAssignment_3_0 ) ) + { + // InternalProblem.g:1766:1: ( ( rule__PredicateDefinition__ParametersAssignment_3_0 ) ) + // InternalProblem.g:1767:2: ( rule__PredicateDefinition__ParametersAssignment_3_0 ) + { + before(grammarAccess.getPredicateDefinitionAccess().getParametersAssignment_3_0()); + // InternalProblem.g:1768:2: ( rule__PredicateDefinition__ParametersAssignment_3_0 ) + // InternalProblem.g:1768:3: rule__PredicateDefinition__ParametersAssignment_3_0 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__ParametersAssignment_3_0(); + + state._fsp--; + + + } + + after(grammarAccess.getPredicateDefinitionAccess().getParametersAssignment_3_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_3__0__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_3__1" + // InternalProblem.g:1776:1: rule__PredicateDefinition__Group_3__1 : rule__PredicateDefinition__Group_3__1__Impl ; + public final void rule__PredicateDefinition__Group_3__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1780:1: ( rule__PredicateDefinition__Group_3__1__Impl ) + // InternalProblem.g:1781:2: rule__PredicateDefinition__Group_3__1__Impl + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_3__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_3__1" + + + // $ANTLR start "rule__PredicateDefinition__Group_3__1__Impl" + // InternalProblem.g:1787:1: rule__PredicateDefinition__Group_3__1__Impl : ( ( rule__PredicateDefinition__Group_3_1__0 )* ) ; + public final void rule__PredicateDefinition__Group_3__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1791:1: ( ( ( rule__PredicateDefinition__Group_3_1__0 )* ) ) + // InternalProblem.g:1792:1: ( ( rule__PredicateDefinition__Group_3_1__0 )* ) + { + // InternalProblem.g:1792:1: ( ( rule__PredicateDefinition__Group_3_1__0 )* ) + // InternalProblem.g:1793:2: ( rule__PredicateDefinition__Group_3_1__0 )* + { + before(grammarAccess.getPredicateDefinitionAccess().getGroup_3_1()); + // InternalProblem.g:1794:2: ( rule__PredicateDefinition__Group_3_1__0 )* + loop23: + do { + int alt23=2; + int LA23_0 = input.LA(1); + + if ( (LA23_0==25) ) { + alt23=1; + } + + + switch (alt23) { + case 1 : + // InternalProblem.g:1794:3: rule__PredicateDefinition__Group_3_1__0 + { + pushFollow(FOLLOW_7); + rule__PredicateDefinition__Group_3_1__0(); + + state._fsp--; + + + } + break; + + default : + break loop23; + } + } while (true); + + after(grammarAccess.getPredicateDefinitionAccess().getGroup_3_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_3__1__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_3_1__0" + // InternalProblem.g:1803:1: rule__PredicateDefinition__Group_3_1__0 : rule__PredicateDefinition__Group_3_1__0__Impl rule__PredicateDefinition__Group_3_1__1 ; + public final void rule__PredicateDefinition__Group_3_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1807:1: ( rule__PredicateDefinition__Group_3_1__0__Impl rule__PredicateDefinition__Group_3_1__1 ) + // InternalProblem.g:1808:2: rule__PredicateDefinition__Group_3_1__0__Impl rule__PredicateDefinition__Group_3_1__1 + { + pushFollow(FOLLOW_5); + rule__PredicateDefinition__Group_3_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_3_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_3_1__0" + + + // $ANTLR start "rule__PredicateDefinition__Group_3_1__0__Impl" + // InternalProblem.g:1815:1: rule__PredicateDefinition__Group_3_1__0__Impl : ( ',' ) ; + public final void rule__PredicateDefinition__Group_3_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1819:1: ( ( ',' ) ) + // InternalProblem.g:1820:1: ( ',' ) + { + // InternalProblem.g:1820:1: ( ',' ) + // InternalProblem.g:1821:2: ',' + { + before(grammarAccess.getPredicateDefinitionAccess().getCommaKeyword_3_1_0()); + match(input,25,FOLLOW_2); + after(grammarAccess.getPredicateDefinitionAccess().getCommaKeyword_3_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_3_1__0__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_3_1__1" + // InternalProblem.g:1830:1: rule__PredicateDefinition__Group_3_1__1 : rule__PredicateDefinition__Group_3_1__1__Impl ; + public final void rule__PredicateDefinition__Group_3_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1834:1: ( rule__PredicateDefinition__Group_3_1__1__Impl ) + // InternalProblem.g:1835:2: rule__PredicateDefinition__Group_3_1__1__Impl + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_3_1__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_3_1__1" + + + // $ANTLR start "rule__PredicateDefinition__Group_3_1__1__Impl" + // InternalProblem.g:1841:1: rule__PredicateDefinition__Group_3_1__1__Impl : ( ( rule__PredicateDefinition__ParametersAssignment_3_1_1 ) ) ; + public final void rule__PredicateDefinition__Group_3_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1845:1: ( ( ( rule__PredicateDefinition__ParametersAssignment_3_1_1 ) ) ) + // InternalProblem.g:1846:1: ( ( rule__PredicateDefinition__ParametersAssignment_3_1_1 ) ) + { + // InternalProblem.g:1846:1: ( ( rule__PredicateDefinition__ParametersAssignment_3_1_1 ) ) + // InternalProblem.g:1847:2: ( rule__PredicateDefinition__ParametersAssignment_3_1_1 ) + { + before(grammarAccess.getPredicateDefinitionAccess().getParametersAssignment_3_1_1()); + // InternalProblem.g:1848:2: ( rule__PredicateDefinition__ParametersAssignment_3_1_1 ) + // InternalProblem.g:1848:3: rule__PredicateDefinition__ParametersAssignment_3_1_1 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__ParametersAssignment_3_1_1(); + + state._fsp--; + + + } + + after(grammarAccess.getPredicateDefinitionAccess().getParametersAssignment_3_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_3_1__1__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_5__0" + // InternalProblem.g:1857:1: rule__PredicateDefinition__Group_5__0 : rule__PredicateDefinition__Group_5__0__Impl rule__PredicateDefinition__Group_5__1 ; + public final void rule__PredicateDefinition__Group_5__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1861:1: ( rule__PredicateDefinition__Group_5__0__Impl rule__PredicateDefinition__Group_5__1 ) + // InternalProblem.g:1862:2: rule__PredicateDefinition__Group_5__0__Impl rule__PredicateDefinition__Group_5__1 + { + pushFollow(FOLLOW_20); + rule__PredicateDefinition__Group_5__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_5__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_5__0" + + + // $ANTLR start "rule__PredicateDefinition__Group_5__0__Impl" + // InternalProblem.g:1869:1: rule__PredicateDefinition__Group_5__0__Impl : ( ':=' ) ; + public final void rule__PredicateDefinition__Group_5__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1873:1: ( ( ':=' ) ) + // InternalProblem.g:1874:1: ( ':=' ) + { + // InternalProblem.g:1874:1: ( ':=' ) + // InternalProblem.g:1875:2: ':=' + { + before(grammarAccess.getPredicateDefinitionAccess().getColonEqualsSignKeyword_5_0()); + match(input,29,FOLLOW_2); + after(grammarAccess.getPredicateDefinitionAccess().getColonEqualsSignKeyword_5_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_5__0__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_5__1" + // InternalProblem.g:1884:1: rule__PredicateDefinition__Group_5__1 : rule__PredicateDefinition__Group_5__1__Impl rule__PredicateDefinition__Group_5__2 ; + public final void rule__PredicateDefinition__Group_5__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1888:1: ( rule__PredicateDefinition__Group_5__1__Impl rule__PredicateDefinition__Group_5__2 ) + // InternalProblem.g:1889:2: rule__PredicateDefinition__Group_5__1__Impl rule__PredicateDefinition__Group_5__2 + { + pushFollow(FOLLOW_21); + rule__PredicateDefinition__Group_5__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_5__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_5__1" + + + // $ANTLR start "rule__PredicateDefinition__Group_5__1__Impl" + // InternalProblem.g:1896:1: rule__PredicateDefinition__Group_5__1__Impl : ( ( rule__PredicateDefinition__BodiesAssignment_5_1 ) ) ; + public final void rule__PredicateDefinition__Group_5__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1900:1: ( ( ( rule__PredicateDefinition__BodiesAssignment_5_1 ) ) ) + // InternalProblem.g:1901:1: ( ( rule__PredicateDefinition__BodiesAssignment_5_1 ) ) + { + // InternalProblem.g:1901:1: ( ( rule__PredicateDefinition__BodiesAssignment_5_1 ) ) + // InternalProblem.g:1902:2: ( rule__PredicateDefinition__BodiesAssignment_5_1 ) + { + before(grammarAccess.getPredicateDefinitionAccess().getBodiesAssignment_5_1()); + // InternalProblem.g:1903:2: ( rule__PredicateDefinition__BodiesAssignment_5_1 ) + // InternalProblem.g:1903:3: rule__PredicateDefinition__BodiesAssignment_5_1 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__BodiesAssignment_5_1(); + + state._fsp--; + + + } + + after(grammarAccess.getPredicateDefinitionAccess().getBodiesAssignment_5_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_5__1__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_5__2" + // InternalProblem.g:1911:1: rule__PredicateDefinition__Group_5__2 : rule__PredicateDefinition__Group_5__2__Impl ; + public final void rule__PredicateDefinition__Group_5__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1915:1: ( rule__PredicateDefinition__Group_5__2__Impl ) + // InternalProblem.g:1916:2: rule__PredicateDefinition__Group_5__2__Impl + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_5__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_5__2" + + + // $ANTLR start "rule__PredicateDefinition__Group_5__2__Impl" + // InternalProblem.g:1922:1: rule__PredicateDefinition__Group_5__2__Impl : ( ( rule__PredicateDefinition__Group_5_2__0 )* ) ; + public final void rule__PredicateDefinition__Group_5__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1926:1: ( ( ( rule__PredicateDefinition__Group_5_2__0 )* ) ) + // InternalProblem.g:1927:1: ( ( rule__PredicateDefinition__Group_5_2__0 )* ) + { + // InternalProblem.g:1927:1: ( ( rule__PredicateDefinition__Group_5_2__0 )* ) + // InternalProblem.g:1928:2: ( rule__PredicateDefinition__Group_5_2__0 )* + { + before(grammarAccess.getPredicateDefinitionAccess().getGroup_5_2()); + // InternalProblem.g:1929:2: ( rule__PredicateDefinition__Group_5_2__0 )* + loop24: + do { + int alt24=2; + int LA24_0 = input.LA(1); + + if ( (LA24_0==30) ) { + alt24=1; + } + + + switch (alt24) { + case 1 : + // InternalProblem.g:1929:3: rule__PredicateDefinition__Group_5_2__0 + { + pushFollow(FOLLOW_22); + rule__PredicateDefinition__Group_5_2__0(); + + state._fsp--; + + + } + break; + + default : + break loop24; + } + } while (true); + + after(grammarAccess.getPredicateDefinitionAccess().getGroup_5_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_5__2__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_5_2__0" + // InternalProblem.g:1938:1: rule__PredicateDefinition__Group_5_2__0 : rule__PredicateDefinition__Group_5_2__0__Impl rule__PredicateDefinition__Group_5_2__1 ; + public final void rule__PredicateDefinition__Group_5_2__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1942:1: ( rule__PredicateDefinition__Group_5_2__0__Impl rule__PredicateDefinition__Group_5_2__1 ) + // InternalProblem.g:1943:2: rule__PredicateDefinition__Group_5_2__0__Impl rule__PredicateDefinition__Group_5_2__1 + { + pushFollow(FOLLOW_20); + rule__PredicateDefinition__Group_5_2__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_5_2__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_5_2__0" + + + // $ANTLR start "rule__PredicateDefinition__Group_5_2__0__Impl" + // InternalProblem.g:1950:1: rule__PredicateDefinition__Group_5_2__0__Impl : ( ';' ) ; + public final void rule__PredicateDefinition__Group_5_2__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1954:1: ( ( ';' ) ) + // InternalProblem.g:1955:1: ( ';' ) + { + // InternalProblem.g:1955:1: ( ';' ) + // InternalProblem.g:1956:2: ';' + { + before(grammarAccess.getPredicateDefinitionAccess().getSemicolonKeyword_5_2_0()); + match(input,30,FOLLOW_2); + after(grammarAccess.getPredicateDefinitionAccess().getSemicolonKeyword_5_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_5_2__0__Impl" + + + // $ANTLR start "rule__PredicateDefinition__Group_5_2__1" + // InternalProblem.g:1965:1: rule__PredicateDefinition__Group_5_2__1 : rule__PredicateDefinition__Group_5_2__1__Impl ; + public final void rule__PredicateDefinition__Group_5_2__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1969:1: ( rule__PredicateDefinition__Group_5_2__1__Impl ) + // InternalProblem.g:1970:2: rule__PredicateDefinition__Group_5_2__1__Impl + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__Group_5_2__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_5_2__1" + + + // $ANTLR start "rule__PredicateDefinition__Group_5_2__1__Impl" + // InternalProblem.g:1976:1: rule__PredicateDefinition__Group_5_2__1__Impl : ( ( rule__PredicateDefinition__BodiesAssignment_5_2_1 ) ) ; + public final void rule__PredicateDefinition__Group_5_2__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1980:1: ( ( ( rule__PredicateDefinition__BodiesAssignment_5_2_1 ) ) ) + // InternalProblem.g:1981:1: ( ( rule__PredicateDefinition__BodiesAssignment_5_2_1 ) ) + { + // InternalProblem.g:1981:1: ( ( rule__PredicateDefinition__BodiesAssignment_5_2_1 ) ) + // InternalProblem.g:1982:2: ( rule__PredicateDefinition__BodiesAssignment_5_2_1 ) + { + before(grammarAccess.getPredicateDefinitionAccess().getBodiesAssignment_5_2_1()); + // InternalProblem.g:1983:2: ( rule__PredicateDefinition__BodiesAssignment_5_2_1 ) + // InternalProblem.g:1983:3: rule__PredicateDefinition__BodiesAssignment_5_2_1 + { + pushFollow(FOLLOW_2); + rule__PredicateDefinition__BodiesAssignment_5_2_1(); + + state._fsp--; + + + } + + after(grammarAccess.getPredicateDefinitionAccess().getBodiesAssignment_5_2_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__Group_5_2__1__Impl" + + + // $ANTLR start "rule__Parameter__Group__0" + // InternalProblem.g:1992:1: rule__Parameter__Group__0 : rule__Parameter__Group__0__Impl rule__Parameter__Group__1 ; + public final void rule__Parameter__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:1996:1: ( rule__Parameter__Group__0__Impl rule__Parameter__Group__1 ) + // InternalProblem.g:1997:2: rule__Parameter__Group__0__Impl rule__Parameter__Group__1 + { + pushFollow(FOLLOW_5); + rule__Parameter__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Parameter__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__Group__0" + + + // $ANTLR start "rule__Parameter__Group__0__Impl" + // InternalProblem.g:2004:1: rule__Parameter__Group__0__Impl : ( ( rule__Parameter__ParameterTypeAssignment_0 ) ) ; + public final void rule__Parameter__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2008:1: ( ( ( rule__Parameter__ParameterTypeAssignment_0 ) ) ) + // InternalProblem.g:2009:1: ( ( rule__Parameter__ParameterTypeAssignment_0 ) ) + { + // InternalProblem.g:2009:1: ( ( rule__Parameter__ParameterTypeAssignment_0 ) ) + // InternalProblem.g:2010:2: ( rule__Parameter__ParameterTypeAssignment_0 ) + { + before(grammarAccess.getParameterAccess().getParameterTypeAssignment_0()); + // InternalProblem.g:2011:2: ( rule__Parameter__ParameterTypeAssignment_0 ) + // InternalProblem.g:2011:3: rule__Parameter__ParameterTypeAssignment_0 + { + pushFollow(FOLLOW_2); + rule__Parameter__ParameterTypeAssignment_0(); + + state._fsp--; + + + } + + after(grammarAccess.getParameterAccess().getParameterTypeAssignment_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__Group__0__Impl" + + + // $ANTLR start "rule__Parameter__Group__1" + // InternalProblem.g:2019:1: rule__Parameter__Group__1 : rule__Parameter__Group__1__Impl ; + public final void rule__Parameter__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2023:1: ( rule__Parameter__Group__1__Impl ) + // InternalProblem.g:2024:2: rule__Parameter__Group__1__Impl + { + pushFollow(FOLLOW_2); + rule__Parameter__Group__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__Group__1" + + + // $ANTLR start "rule__Parameter__Group__1__Impl" + // InternalProblem.g:2030:1: rule__Parameter__Group__1__Impl : ( ( rule__Parameter__NameAssignment_1 ) ) ; + public final void rule__Parameter__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2034:1: ( ( ( rule__Parameter__NameAssignment_1 ) ) ) + // InternalProblem.g:2035:1: ( ( rule__Parameter__NameAssignment_1 ) ) + { + // InternalProblem.g:2035:1: ( ( rule__Parameter__NameAssignment_1 ) ) + // InternalProblem.g:2036:2: ( rule__Parameter__NameAssignment_1 ) + { + before(grammarAccess.getParameterAccess().getNameAssignment_1()); + // InternalProblem.g:2037:2: ( rule__Parameter__NameAssignment_1 ) + // InternalProblem.g:2037:3: rule__Parameter__NameAssignment_1 + { + pushFollow(FOLLOW_2); + rule__Parameter__NameAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getParameterAccess().getNameAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__Group__1__Impl" + + + // $ANTLR start "rule__Conjunction__Group__0" + // InternalProblem.g:2046:1: rule__Conjunction__Group__0 : rule__Conjunction__Group__0__Impl rule__Conjunction__Group__1 ; + public final void rule__Conjunction__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2050:1: ( rule__Conjunction__Group__0__Impl rule__Conjunction__Group__1 ) + // InternalProblem.g:2051:2: rule__Conjunction__Group__0__Impl rule__Conjunction__Group__1 + { + pushFollow(FOLLOW_10); + rule__Conjunction__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Conjunction__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Conjunction__Group__0" + + + // $ANTLR start "rule__Conjunction__Group__0__Impl" + // InternalProblem.g:2058:1: rule__Conjunction__Group__0__Impl : ( ( rule__Conjunction__LiteralsAssignment_0 ) ) ; + public final void rule__Conjunction__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2062:1: ( ( ( rule__Conjunction__LiteralsAssignment_0 ) ) ) + // InternalProblem.g:2063:1: ( ( rule__Conjunction__LiteralsAssignment_0 ) ) + { + // InternalProblem.g:2063:1: ( ( rule__Conjunction__LiteralsAssignment_0 ) ) + // InternalProblem.g:2064:2: ( rule__Conjunction__LiteralsAssignment_0 ) + { + before(grammarAccess.getConjunctionAccess().getLiteralsAssignment_0()); + // InternalProblem.g:2065:2: ( rule__Conjunction__LiteralsAssignment_0 ) + // InternalProblem.g:2065:3: rule__Conjunction__LiteralsAssignment_0 + { + pushFollow(FOLLOW_2); + rule__Conjunction__LiteralsAssignment_0(); + + state._fsp--; + + + } + + after(grammarAccess.getConjunctionAccess().getLiteralsAssignment_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Conjunction__Group__0__Impl" + + + // $ANTLR start "rule__Conjunction__Group__1" + // InternalProblem.g:2073:1: rule__Conjunction__Group__1 : rule__Conjunction__Group__1__Impl ; + public final void rule__Conjunction__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2077:1: ( rule__Conjunction__Group__1__Impl ) + // InternalProblem.g:2078:2: rule__Conjunction__Group__1__Impl + { + pushFollow(FOLLOW_2); + rule__Conjunction__Group__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Conjunction__Group__1" + + + // $ANTLR start "rule__Conjunction__Group__1__Impl" + // InternalProblem.g:2084:1: rule__Conjunction__Group__1__Impl : ( ( rule__Conjunction__Group_1__0 )* ) ; + public final void rule__Conjunction__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2088:1: ( ( ( rule__Conjunction__Group_1__0 )* ) ) + // InternalProblem.g:2089:1: ( ( rule__Conjunction__Group_1__0 )* ) + { + // InternalProblem.g:2089:1: ( ( rule__Conjunction__Group_1__0 )* ) + // InternalProblem.g:2090:2: ( rule__Conjunction__Group_1__0 )* + { + before(grammarAccess.getConjunctionAccess().getGroup_1()); + // InternalProblem.g:2091:2: ( rule__Conjunction__Group_1__0 )* + loop25: + do { + int alt25=2; + int LA25_0 = input.LA(1); + + if ( (LA25_0==25) ) { + alt25=1; + } + + + switch (alt25) { + case 1 : + // InternalProblem.g:2091:3: rule__Conjunction__Group_1__0 + { + pushFollow(FOLLOW_7); + rule__Conjunction__Group_1__0(); + + state._fsp--; + + + } + break; + + default : + break loop25; + } + } while (true); + + after(grammarAccess.getConjunctionAccess().getGroup_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Conjunction__Group__1__Impl" + + + // $ANTLR start "rule__Conjunction__Group_1__0" + // InternalProblem.g:2100:1: rule__Conjunction__Group_1__0 : rule__Conjunction__Group_1__0__Impl rule__Conjunction__Group_1__1 ; + public final void rule__Conjunction__Group_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2104:1: ( rule__Conjunction__Group_1__0__Impl rule__Conjunction__Group_1__1 ) + // InternalProblem.g:2105:2: rule__Conjunction__Group_1__0__Impl rule__Conjunction__Group_1__1 + { + pushFollow(FOLLOW_20); + rule__Conjunction__Group_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Conjunction__Group_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Conjunction__Group_1__0" + + + // $ANTLR start "rule__Conjunction__Group_1__0__Impl" + // InternalProblem.g:2112:1: rule__Conjunction__Group_1__0__Impl : ( ',' ) ; + public final void rule__Conjunction__Group_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2116:1: ( ( ',' ) ) + // InternalProblem.g:2117:1: ( ',' ) + { + // InternalProblem.g:2117:1: ( ',' ) + // InternalProblem.g:2118:2: ',' + { + before(grammarAccess.getConjunctionAccess().getCommaKeyword_1_0()); + match(input,25,FOLLOW_2); + after(grammarAccess.getConjunctionAccess().getCommaKeyword_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Conjunction__Group_1__0__Impl" + + + // $ANTLR start "rule__Conjunction__Group_1__1" + // InternalProblem.g:2127:1: rule__Conjunction__Group_1__1 : rule__Conjunction__Group_1__1__Impl ; + public final void rule__Conjunction__Group_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2131:1: ( rule__Conjunction__Group_1__1__Impl ) + // InternalProblem.g:2132:2: rule__Conjunction__Group_1__1__Impl + { + pushFollow(FOLLOW_2); + rule__Conjunction__Group_1__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Conjunction__Group_1__1" + + + // $ANTLR start "rule__Conjunction__Group_1__1__Impl" + // InternalProblem.g:2138:1: rule__Conjunction__Group_1__1__Impl : ( ( rule__Conjunction__LiteralsAssignment_1_1 ) ) ; + public final void rule__Conjunction__Group_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2142:1: ( ( ( rule__Conjunction__LiteralsAssignment_1_1 ) ) ) + // InternalProblem.g:2143:1: ( ( rule__Conjunction__LiteralsAssignment_1_1 ) ) + { + // InternalProblem.g:2143:1: ( ( rule__Conjunction__LiteralsAssignment_1_1 ) ) + // InternalProblem.g:2144:2: ( rule__Conjunction__LiteralsAssignment_1_1 ) + { + before(grammarAccess.getConjunctionAccess().getLiteralsAssignment_1_1()); + // InternalProblem.g:2145:2: ( rule__Conjunction__LiteralsAssignment_1_1 ) + // InternalProblem.g:2145:3: rule__Conjunction__LiteralsAssignment_1_1 + { + pushFollow(FOLLOW_2); + rule__Conjunction__LiteralsAssignment_1_1(); + + state._fsp--; + + + } + + after(grammarAccess.getConjunctionAccess().getLiteralsAssignment_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Conjunction__Group_1__1__Impl" + + + // $ANTLR start "rule__NegativeLiteral__Group__0" + // InternalProblem.g:2154:1: rule__NegativeLiteral__Group__0 : rule__NegativeLiteral__Group__0__Impl rule__NegativeLiteral__Group__1 ; + public final void rule__NegativeLiteral__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2158:1: ( rule__NegativeLiteral__Group__0__Impl rule__NegativeLiteral__Group__1 ) + // InternalProblem.g:2159:2: rule__NegativeLiteral__Group__0__Impl rule__NegativeLiteral__Group__1 + { + pushFollow(FOLLOW_5); + rule__NegativeLiteral__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__NegativeLiteral__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__NegativeLiteral__Group__0" + + + // $ANTLR start "rule__NegativeLiteral__Group__0__Impl" + // InternalProblem.g:2166:1: rule__NegativeLiteral__Group__0__Impl : ( '!' ) ; + public final void rule__NegativeLiteral__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2170:1: ( ( '!' ) ) + // InternalProblem.g:2171:1: ( '!' ) + { + // InternalProblem.g:2171:1: ( '!' ) + // InternalProblem.g:2172:2: '!' + { + before(grammarAccess.getNegativeLiteralAccess().getExclamationMarkKeyword_0()); + match(input,18,FOLLOW_2); + after(grammarAccess.getNegativeLiteralAccess().getExclamationMarkKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__NegativeLiteral__Group__0__Impl" + + + // $ANTLR start "rule__NegativeLiteral__Group__1" + // InternalProblem.g:2181:1: rule__NegativeLiteral__Group__1 : rule__NegativeLiteral__Group__1__Impl ; + public final void rule__NegativeLiteral__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2185:1: ( rule__NegativeLiteral__Group__1__Impl ) + // InternalProblem.g:2186:2: rule__NegativeLiteral__Group__1__Impl + { + pushFollow(FOLLOW_2); + rule__NegativeLiteral__Group__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__NegativeLiteral__Group__1" + + + // $ANTLR start "rule__NegativeLiteral__Group__1__Impl" + // InternalProblem.g:2192:1: rule__NegativeLiteral__Group__1__Impl : ( ( rule__NegativeLiteral__AtomAssignment_1 ) ) ; + public final void rule__NegativeLiteral__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2196:1: ( ( ( rule__NegativeLiteral__AtomAssignment_1 ) ) ) + // InternalProblem.g:2197:1: ( ( rule__NegativeLiteral__AtomAssignment_1 ) ) + { + // InternalProblem.g:2197:1: ( ( rule__NegativeLiteral__AtomAssignment_1 ) ) + // InternalProblem.g:2198:2: ( rule__NegativeLiteral__AtomAssignment_1 ) + { + before(grammarAccess.getNegativeLiteralAccess().getAtomAssignment_1()); + // InternalProblem.g:2199:2: ( rule__NegativeLiteral__AtomAssignment_1 ) + // InternalProblem.g:2199:3: rule__NegativeLiteral__AtomAssignment_1 + { + pushFollow(FOLLOW_2); + rule__NegativeLiteral__AtomAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getNegativeLiteralAccess().getAtomAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__NegativeLiteral__Group__1__Impl" + + + // $ANTLR start "rule__Atom__Group__0" + // InternalProblem.g:2208:1: rule__Atom__Group__0 : rule__Atom__Group__0__Impl rule__Atom__Group__1 ; + public final void rule__Atom__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2212:1: ( rule__Atom__Group__0__Impl rule__Atom__Group__1 ) + // InternalProblem.g:2213:2: rule__Atom__Group__0__Impl rule__Atom__Group__1 + { + pushFollow(FOLLOW_23); + rule__Atom__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Atom__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group__0" + + + // $ANTLR start "rule__Atom__Group__0__Impl" + // InternalProblem.g:2220:1: rule__Atom__Group__0__Impl : ( ( rule__Atom__RelationAssignment_0 ) ) ; + public final void rule__Atom__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2224:1: ( ( ( rule__Atom__RelationAssignment_0 ) ) ) + // InternalProblem.g:2225:1: ( ( rule__Atom__RelationAssignment_0 ) ) + { + // InternalProblem.g:2225:1: ( ( rule__Atom__RelationAssignment_0 ) ) + // InternalProblem.g:2226:2: ( rule__Atom__RelationAssignment_0 ) + { + before(grammarAccess.getAtomAccess().getRelationAssignment_0()); + // InternalProblem.g:2227:2: ( rule__Atom__RelationAssignment_0 ) + // InternalProblem.g:2227:3: rule__Atom__RelationAssignment_0 + { + pushFollow(FOLLOW_2); + rule__Atom__RelationAssignment_0(); + + state._fsp--; + + + } + + after(grammarAccess.getAtomAccess().getRelationAssignment_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group__0__Impl" + + + // $ANTLR start "rule__Atom__Group__1" + // InternalProblem.g:2235:1: rule__Atom__Group__1 : rule__Atom__Group__1__Impl rule__Atom__Group__2 ; + public final void rule__Atom__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2239:1: ( rule__Atom__Group__1__Impl rule__Atom__Group__2 ) + // InternalProblem.g:2240:2: rule__Atom__Group__1__Impl rule__Atom__Group__2 + { + pushFollow(FOLLOW_23); + rule__Atom__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Atom__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group__1" + + + // $ANTLR start "rule__Atom__Group__1__Impl" + // InternalProblem.g:2247:1: rule__Atom__Group__1__Impl : ( ( rule__Atom__TransitiveClosureAssignment_1 )? ) ; + public final void rule__Atom__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2251:1: ( ( ( rule__Atom__TransitiveClosureAssignment_1 )? ) ) + // InternalProblem.g:2252:1: ( ( rule__Atom__TransitiveClosureAssignment_1 )? ) + { + // InternalProblem.g:2252:1: ( ( rule__Atom__TransitiveClosureAssignment_1 )? ) + // InternalProblem.g:2253:2: ( rule__Atom__TransitiveClosureAssignment_1 )? + { + before(grammarAccess.getAtomAccess().getTransitiveClosureAssignment_1()); + // InternalProblem.g:2254:2: ( rule__Atom__TransitiveClosureAssignment_1 )? + int alt26=2; + int LA26_0 = input.LA(1); + + if ( (LA26_0==38) ) { + alt26=1; + } + switch (alt26) { + case 1 : + // InternalProblem.g:2254:3: rule__Atom__TransitiveClosureAssignment_1 + { + pushFollow(FOLLOW_2); + rule__Atom__TransitiveClosureAssignment_1(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getAtomAccess().getTransitiveClosureAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group__1__Impl" + + + // $ANTLR start "rule__Atom__Group__2" + // InternalProblem.g:2262:1: rule__Atom__Group__2 : rule__Atom__Group__2__Impl rule__Atom__Group__3 ; + public final void rule__Atom__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2266:1: ( rule__Atom__Group__2__Impl rule__Atom__Group__3 ) + // InternalProblem.g:2267:2: rule__Atom__Group__2__Impl rule__Atom__Group__3 + { + pushFollow(FOLLOW_17); + rule__Atom__Group__2__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Atom__Group__3(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group__2" + + + // $ANTLR start "rule__Atom__Group__2__Impl" + // InternalProblem.g:2274:1: rule__Atom__Group__2__Impl : ( '(' ) ; + public final void rule__Atom__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2278:1: ( ( '(' ) ) + // InternalProblem.g:2279:1: ( '(' ) + { + // InternalProblem.g:2279:1: ( '(' ) + // InternalProblem.g:2280:2: '(' + { + before(grammarAccess.getAtomAccess().getLeftParenthesisKeyword_2()); + match(input,27,FOLLOW_2); + after(grammarAccess.getAtomAccess().getLeftParenthesisKeyword_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group__2__Impl" + + + // $ANTLR start "rule__Atom__Group__3" + // InternalProblem.g:2289:1: rule__Atom__Group__3 : rule__Atom__Group__3__Impl rule__Atom__Group__4 ; + public final void rule__Atom__Group__3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2293:1: ( rule__Atom__Group__3__Impl rule__Atom__Group__4 ) + // InternalProblem.g:2294:2: rule__Atom__Group__3__Impl rule__Atom__Group__4 + { + pushFollow(FOLLOW_17); + rule__Atom__Group__3__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Atom__Group__4(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group__3" + + + // $ANTLR start "rule__Atom__Group__3__Impl" + // InternalProblem.g:2301:1: rule__Atom__Group__3__Impl : ( ( rule__Atom__Group_3__0 )? ) ; + public final void rule__Atom__Group__3__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2305:1: ( ( ( rule__Atom__Group_3__0 )? ) ) + // InternalProblem.g:2306:1: ( ( rule__Atom__Group_3__0 )? ) + { + // InternalProblem.g:2306:1: ( ( rule__Atom__Group_3__0 )? ) + // InternalProblem.g:2307:2: ( rule__Atom__Group_3__0 )? + { + before(grammarAccess.getAtomAccess().getGroup_3()); + // InternalProblem.g:2308:2: ( rule__Atom__Group_3__0 )? + int alt27=2; + int LA27_0 = input.LA(1); + + if ( (LA27_0==RULE_ID) ) { + alt27=1; + } + switch (alt27) { + case 1 : + // InternalProblem.g:2308:3: rule__Atom__Group_3__0 + { + pushFollow(FOLLOW_2); + rule__Atom__Group_3__0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getAtomAccess().getGroup_3()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group__3__Impl" + + + // $ANTLR start "rule__Atom__Group__4" + // InternalProblem.g:2316:1: rule__Atom__Group__4 : rule__Atom__Group__4__Impl ; + public final void rule__Atom__Group__4() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2320:1: ( rule__Atom__Group__4__Impl ) + // InternalProblem.g:2321:2: rule__Atom__Group__4__Impl + { + pushFollow(FOLLOW_2); + rule__Atom__Group__4__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group__4" + + + // $ANTLR start "rule__Atom__Group__4__Impl" + // InternalProblem.g:2327:1: rule__Atom__Group__4__Impl : ( ')' ) ; + public final void rule__Atom__Group__4__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2331:1: ( ( ')' ) ) + // InternalProblem.g:2332:1: ( ')' ) + { + // InternalProblem.g:2332:1: ( ')' ) + // InternalProblem.g:2333:2: ')' + { + before(grammarAccess.getAtomAccess().getRightParenthesisKeyword_4()); + match(input,28,FOLLOW_2); + after(grammarAccess.getAtomAccess().getRightParenthesisKeyword_4()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group__4__Impl" + + + // $ANTLR start "rule__Atom__Group_3__0" + // InternalProblem.g:2343:1: rule__Atom__Group_3__0 : rule__Atom__Group_3__0__Impl rule__Atom__Group_3__1 ; + public final void rule__Atom__Group_3__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2347:1: ( rule__Atom__Group_3__0__Impl rule__Atom__Group_3__1 ) + // InternalProblem.g:2348:2: rule__Atom__Group_3__0__Impl rule__Atom__Group_3__1 + { + pushFollow(FOLLOW_10); + rule__Atom__Group_3__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Atom__Group_3__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group_3__0" + + + // $ANTLR start "rule__Atom__Group_3__0__Impl" + // InternalProblem.g:2355:1: rule__Atom__Group_3__0__Impl : ( ( rule__Atom__ArgumentsAssignment_3_0 ) ) ; + public final void rule__Atom__Group_3__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2359:1: ( ( ( rule__Atom__ArgumentsAssignment_3_0 ) ) ) + // InternalProblem.g:2360:1: ( ( rule__Atom__ArgumentsAssignment_3_0 ) ) + { + // InternalProblem.g:2360:1: ( ( rule__Atom__ArgumentsAssignment_3_0 ) ) + // InternalProblem.g:2361:2: ( rule__Atom__ArgumentsAssignment_3_0 ) + { + before(grammarAccess.getAtomAccess().getArgumentsAssignment_3_0()); + // InternalProblem.g:2362:2: ( rule__Atom__ArgumentsAssignment_3_0 ) + // InternalProblem.g:2362:3: rule__Atom__ArgumentsAssignment_3_0 + { + pushFollow(FOLLOW_2); + rule__Atom__ArgumentsAssignment_3_0(); + + state._fsp--; + + + } + + after(grammarAccess.getAtomAccess().getArgumentsAssignment_3_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group_3__0__Impl" + + + // $ANTLR start "rule__Atom__Group_3__1" + // InternalProblem.g:2370:1: rule__Atom__Group_3__1 : rule__Atom__Group_3__1__Impl ; + public final void rule__Atom__Group_3__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2374:1: ( rule__Atom__Group_3__1__Impl ) + // InternalProblem.g:2375:2: rule__Atom__Group_3__1__Impl + { + pushFollow(FOLLOW_2); + rule__Atom__Group_3__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group_3__1" + + + // $ANTLR start "rule__Atom__Group_3__1__Impl" + // InternalProblem.g:2381:1: rule__Atom__Group_3__1__Impl : ( ( rule__Atom__Group_3_1__0 )* ) ; + public final void rule__Atom__Group_3__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2385:1: ( ( ( rule__Atom__Group_3_1__0 )* ) ) + // InternalProblem.g:2386:1: ( ( rule__Atom__Group_3_1__0 )* ) + { + // InternalProblem.g:2386:1: ( ( rule__Atom__Group_3_1__0 )* ) + // InternalProblem.g:2387:2: ( rule__Atom__Group_3_1__0 )* + { + before(grammarAccess.getAtomAccess().getGroup_3_1()); + // InternalProblem.g:2388:2: ( rule__Atom__Group_3_1__0 )* + loop28: + do { + int alt28=2; + int LA28_0 = input.LA(1); + + if ( (LA28_0==25) ) { + alt28=1; + } + + + switch (alt28) { + case 1 : + // InternalProblem.g:2388:3: rule__Atom__Group_3_1__0 + { + pushFollow(FOLLOW_7); + rule__Atom__Group_3_1__0(); + + state._fsp--; + + + } + break; + + default : + break loop28; + } + } while (true); + + after(grammarAccess.getAtomAccess().getGroup_3_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group_3__1__Impl" + + + // $ANTLR start "rule__Atom__Group_3_1__0" + // InternalProblem.g:2397:1: rule__Atom__Group_3_1__0 : rule__Atom__Group_3_1__0__Impl rule__Atom__Group_3_1__1 ; + public final void rule__Atom__Group_3_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2401:1: ( rule__Atom__Group_3_1__0__Impl rule__Atom__Group_3_1__1 ) + // InternalProblem.g:2402:2: rule__Atom__Group_3_1__0__Impl rule__Atom__Group_3_1__1 + { + pushFollow(FOLLOW_5); + rule__Atom__Group_3_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Atom__Group_3_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group_3_1__0" + + + // $ANTLR start "rule__Atom__Group_3_1__0__Impl" + // InternalProblem.g:2409:1: rule__Atom__Group_3_1__0__Impl : ( ',' ) ; + public final void rule__Atom__Group_3_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2413:1: ( ( ',' ) ) + // InternalProblem.g:2414:1: ( ',' ) + { + // InternalProblem.g:2414:1: ( ',' ) + // InternalProblem.g:2415:2: ',' + { + before(grammarAccess.getAtomAccess().getCommaKeyword_3_1_0()); + match(input,25,FOLLOW_2); + after(grammarAccess.getAtomAccess().getCommaKeyword_3_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group_3_1__0__Impl" + + + // $ANTLR start "rule__Atom__Group_3_1__1" + // InternalProblem.g:2424:1: rule__Atom__Group_3_1__1 : rule__Atom__Group_3_1__1__Impl ; + public final void rule__Atom__Group_3_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2428:1: ( rule__Atom__Group_3_1__1__Impl ) + // InternalProblem.g:2429:2: rule__Atom__Group_3_1__1__Impl + { + pushFollow(FOLLOW_2); + rule__Atom__Group_3_1__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group_3_1__1" + + + // $ANTLR start "rule__Atom__Group_3_1__1__Impl" + // InternalProblem.g:2435:1: rule__Atom__Group_3_1__1__Impl : ( ( rule__Atom__ArgumentsAssignment_3_1_1 ) ) ; + public final void rule__Atom__Group_3_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2439:1: ( ( ( rule__Atom__ArgumentsAssignment_3_1_1 ) ) ) + // InternalProblem.g:2440:1: ( ( rule__Atom__ArgumentsAssignment_3_1_1 ) ) + { + // InternalProblem.g:2440:1: ( ( rule__Atom__ArgumentsAssignment_3_1_1 ) ) + // InternalProblem.g:2441:2: ( rule__Atom__ArgumentsAssignment_3_1_1 ) + { + before(grammarAccess.getAtomAccess().getArgumentsAssignment_3_1_1()); + // InternalProblem.g:2442:2: ( rule__Atom__ArgumentsAssignment_3_1_1 ) + // InternalProblem.g:2442:3: rule__Atom__ArgumentsAssignment_3_1_1 + { + pushFollow(FOLLOW_2); + rule__Atom__ArgumentsAssignment_3_1_1(); + + state._fsp--; + + + } + + after(grammarAccess.getAtomAccess().getArgumentsAssignment_3_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__Group_3_1__1__Impl" + + + // $ANTLR start "rule__Assertion__Group__0" + // InternalProblem.g:2451:1: rule__Assertion__Group__0 : rule__Assertion__Group__0__Impl rule__Assertion__Group__1 ; + public final void rule__Assertion__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2455:1: ( rule__Assertion__Group__0__Impl rule__Assertion__Group__1 ) + // InternalProblem.g:2456:2: rule__Assertion__Group__0__Impl rule__Assertion__Group__1 + { + pushFollow(FOLLOW_24); + rule__Assertion__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group__0" + + + // $ANTLR start "rule__Assertion__Group__0__Impl" + // InternalProblem.g:2463:1: rule__Assertion__Group__0__Impl : ( ( rule__Assertion__Alternatives_0 ) ) ; + public final void rule__Assertion__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2467:1: ( ( ( rule__Assertion__Alternatives_0 ) ) ) + // InternalProblem.g:2468:1: ( ( rule__Assertion__Alternatives_0 ) ) + { + // InternalProblem.g:2468:1: ( ( rule__Assertion__Alternatives_0 ) ) + // InternalProblem.g:2469:2: ( rule__Assertion__Alternatives_0 ) + { + before(grammarAccess.getAssertionAccess().getAlternatives_0()); + // InternalProblem.g:2470:2: ( rule__Assertion__Alternatives_0 ) + // InternalProblem.g:2470:3: rule__Assertion__Alternatives_0 + { + pushFollow(FOLLOW_2); + rule__Assertion__Alternatives_0(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getAlternatives_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group__0__Impl" + + + // $ANTLR start "rule__Assertion__Group__1" + // InternalProblem.g:2478:1: rule__Assertion__Group__1 : rule__Assertion__Group__1__Impl ; + public final void rule__Assertion__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2482:1: ( rule__Assertion__Group__1__Impl ) + // InternalProblem.g:2483:2: rule__Assertion__Group__1__Impl + { + pushFollow(FOLLOW_2); + rule__Assertion__Group__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group__1" + + + // $ANTLR start "rule__Assertion__Group__1__Impl" + // InternalProblem.g:2489:1: rule__Assertion__Group__1__Impl : ( '.' ) ; + public final void rule__Assertion__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2493:1: ( ( '.' ) ) + // InternalProblem.g:2494:1: ( '.' ) + { + // InternalProblem.g:2494:1: ( '.' ) + // InternalProblem.g:2495:2: '.' + { + before(grammarAccess.getAssertionAccess().getFullStopKeyword_1()); + match(input,21,FOLLOW_2); + after(grammarAccess.getAssertionAccess().getFullStopKeyword_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group__1__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_0__0" + // InternalProblem.g:2505:1: rule__Assertion__Group_0_0__0 : rule__Assertion__Group_0_0__0__Impl rule__Assertion__Group_0_0__1 ; + public final void rule__Assertion__Group_0_0__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2509:1: ( rule__Assertion__Group_0_0__0__Impl rule__Assertion__Group_0_0__1 ) + // InternalProblem.g:2510:2: rule__Assertion__Group_0_0__0__Impl rule__Assertion__Group_0_0__1 + { + pushFollow(FOLLOW_16); + rule__Assertion__Group_0_0__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__0" + + + // $ANTLR start "rule__Assertion__Group_0_0__0__Impl" + // InternalProblem.g:2517:1: rule__Assertion__Group_0_0__0__Impl : ( ( rule__Assertion__RelationAssignment_0_0_0 ) ) ; + public final void rule__Assertion__Group_0_0__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2521:1: ( ( ( rule__Assertion__RelationAssignment_0_0_0 ) ) ) + // InternalProblem.g:2522:1: ( ( rule__Assertion__RelationAssignment_0_0_0 ) ) + { + // InternalProblem.g:2522:1: ( ( rule__Assertion__RelationAssignment_0_0_0 ) ) + // InternalProblem.g:2523:2: ( rule__Assertion__RelationAssignment_0_0_0 ) + { + before(grammarAccess.getAssertionAccess().getRelationAssignment_0_0_0()); + // InternalProblem.g:2524:2: ( rule__Assertion__RelationAssignment_0_0_0 ) + // InternalProblem.g:2524:3: rule__Assertion__RelationAssignment_0_0_0 + { + pushFollow(FOLLOW_2); + rule__Assertion__RelationAssignment_0_0_0(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getRelationAssignment_0_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__0__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_0__1" + // InternalProblem.g:2532:1: rule__Assertion__Group_0_0__1 : rule__Assertion__Group_0_0__1__Impl rule__Assertion__Group_0_0__2 ; + public final void rule__Assertion__Group_0_0__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2536:1: ( rule__Assertion__Group_0_0__1__Impl rule__Assertion__Group_0_0__2 ) + // InternalProblem.g:2537:2: rule__Assertion__Group_0_0__1__Impl rule__Assertion__Group_0_0__2 + { + pushFollow(FOLLOW_17); + rule__Assertion__Group_0_0__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__1" + + + // $ANTLR start "rule__Assertion__Group_0_0__1__Impl" + // InternalProblem.g:2544:1: rule__Assertion__Group_0_0__1__Impl : ( '(' ) ; + public final void rule__Assertion__Group_0_0__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2548:1: ( ( '(' ) ) + // InternalProblem.g:2549:1: ( '(' ) + { + // InternalProblem.g:2549:1: ( '(' ) + // InternalProblem.g:2550:2: '(' + { + before(grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_0_1()); + match(input,27,FOLLOW_2); + after(grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_0_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__1__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_0__2" + // InternalProblem.g:2559:1: rule__Assertion__Group_0_0__2 : rule__Assertion__Group_0_0__2__Impl rule__Assertion__Group_0_0__3 ; + public final void rule__Assertion__Group_0_0__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2563:1: ( rule__Assertion__Group_0_0__2__Impl rule__Assertion__Group_0_0__3 ) + // InternalProblem.g:2564:2: rule__Assertion__Group_0_0__2__Impl rule__Assertion__Group_0_0__3 + { + pushFollow(FOLLOW_17); + rule__Assertion__Group_0_0__2__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0__3(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__2" + + + // $ANTLR start "rule__Assertion__Group_0_0__2__Impl" + // InternalProblem.g:2571:1: rule__Assertion__Group_0_0__2__Impl : ( ( rule__Assertion__Group_0_0_2__0 )? ) ; + public final void rule__Assertion__Group_0_0__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2575:1: ( ( ( rule__Assertion__Group_0_0_2__0 )? ) ) + // InternalProblem.g:2576:1: ( ( rule__Assertion__Group_0_0_2__0 )? ) + { + // InternalProblem.g:2576:1: ( ( rule__Assertion__Group_0_0_2__0 )? ) + // InternalProblem.g:2577:2: ( rule__Assertion__Group_0_0_2__0 )? + { + before(grammarAccess.getAssertionAccess().getGroup_0_0_2()); + // InternalProblem.g:2578:2: ( rule__Assertion__Group_0_0_2__0 )? + int alt29=2; + int LA29_0 = input.LA(1); + + if ( (LA29_0==RULE_ID) ) { + alt29=1; + } + switch (alt29) { + case 1 : + // InternalProblem.g:2578:3: rule__Assertion__Group_0_0_2__0 + { + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0_2__0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getAssertionAccess().getGroup_0_0_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__2__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_0__3" + // InternalProblem.g:2586:1: rule__Assertion__Group_0_0__3 : rule__Assertion__Group_0_0__3__Impl rule__Assertion__Group_0_0__4 ; + public final void rule__Assertion__Group_0_0__3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2590:1: ( rule__Assertion__Group_0_0__3__Impl rule__Assertion__Group_0_0__4 ) + // InternalProblem.g:2591:2: rule__Assertion__Group_0_0__3__Impl rule__Assertion__Group_0_0__4 + { + pushFollow(FOLLOW_25); + rule__Assertion__Group_0_0__3__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0__4(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__3" + + + // $ANTLR start "rule__Assertion__Group_0_0__3__Impl" + // InternalProblem.g:2598:1: rule__Assertion__Group_0_0__3__Impl : ( ')' ) ; + public final void rule__Assertion__Group_0_0__3__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2602:1: ( ( ')' ) ) + // InternalProblem.g:2603:1: ( ')' ) + { + // InternalProblem.g:2603:1: ( ')' ) + // InternalProblem.g:2604:2: ')' + { + before(grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_0_3()); + match(input,28,FOLLOW_2); + after(grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_0_3()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__3__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_0__4" + // InternalProblem.g:2613:1: rule__Assertion__Group_0_0__4 : rule__Assertion__Group_0_0__4__Impl rule__Assertion__Group_0_0__5 ; + public final void rule__Assertion__Group_0_0__4() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2617:1: ( rule__Assertion__Group_0_0__4__Impl rule__Assertion__Group_0_0__5 ) + // InternalProblem.g:2618:2: rule__Assertion__Group_0_0__4__Impl rule__Assertion__Group_0_0__5 + { + pushFollow(FOLLOW_26); + rule__Assertion__Group_0_0__4__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0__5(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__4" + + + // $ANTLR start "rule__Assertion__Group_0_0__4__Impl" + // InternalProblem.g:2625:1: rule__Assertion__Group_0_0__4__Impl : ( ':' ) ; + public final void rule__Assertion__Group_0_0__4__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2629:1: ( ( ':' ) ) + // InternalProblem.g:2630:1: ( ':' ) + { + // InternalProblem.g:2630:1: ( ':' ) + // InternalProblem.g:2631:2: ':' + { + before(grammarAccess.getAssertionAccess().getColonKeyword_0_0_4()); + match(input,31,FOLLOW_2); + after(grammarAccess.getAssertionAccess().getColonKeyword_0_0_4()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__4__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_0__5" + // InternalProblem.g:2640:1: rule__Assertion__Group_0_0__5 : rule__Assertion__Group_0_0__5__Impl ; + public final void rule__Assertion__Group_0_0__5() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2644:1: ( rule__Assertion__Group_0_0__5__Impl ) + // InternalProblem.g:2645:2: rule__Assertion__Group_0_0__5__Impl + { + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0__5__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__5" + + + // $ANTLR start "rule__Assertion__Group_0_0__5__Impl" + // InternalProblem.g:2651:1: rule__Assertion__Group_0_0__5__Impl : ( ( rule__Assertion__ValueAssignment_0_0_5 ) ) ; + public final void rule__Assertion__Group_0_0__5__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2655:1: ( ( ( rule__Assertion__ValueAssignment_0_0_5 ) ) ) + // InternalProblem.g:2656:1: ( ( rule__Assertion__ValueAssignment_0_0_5 ) ) + { + // InternalProblem.g:2656:1: ( ( rule__Assertion__ValueAssignment_0_0_5 ) ) + // InternalProblem.g:2657:2: ( rule__Assertion__ValueAssignment_0_0_5 ) + { + before(grammarAccess.getAssertionAccess().getValueAssignment_0_0_5()); + // InternalProblem.g:2658:2: ( rule__Assertion__ValueAssignment_0_0_5 ) + // InternalProblem.g:2658:3: rule__Assertion__ValueAssignment_0_0_5 + { + pushFollow(FOLLOW_2); + rule__Assertion__ValueAssignment_0_0_5(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getValueAssignment_0_0_5()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0__5__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_0_2__0" + // InternalProblem.g:2667:1: rule__Assertion__Group_0_0_2__0 : rule__Assertion__Group_0_0_2__0__Impl rule__Assertion__Group_0_0_2__1 ; + public final void rule__Assertion__Group_0_0_2__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2671:1: ( rule__Assertion__Group_0_0_2__0__Impl rule__Assertion__Group_0_0_2__1 ) + // InternalProblem.g:2672:2: rule__Assertion__Group_0_0_2__0__Impl rule__Assertion__Group_0_0_2__1 + { + pushFollow(FOLLOW_10); + rule__Assertion__Group_0_0_2__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0_2__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0_2__0" + + + // $ANTLR start "rule__Assertion__Group_0_0_2__0__Impl" + // InternalProblem.g:2679:1: rule__Assertion__Group_0_0_2__0__Impl : ( ( rule__Assertion__ArgumentsAssignment_0_0_2_0 ) ) ; + public final void rule__Assertion__Group_0_0_2__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2683:1: ( ( ( rule__Assertion__ArgumentsAssignment_0_0_2_0 ) ) ) + // InternalProblem.g:2684:1: ( ( rule__Assertion__ArgumentsAssignment_0_0_2_0 ) ) + { + // InternalProblem.g:2684:1: ( ( rule__Assertion__ArgumentsAssignment_0_0_2_0 ) ) + // InternalProblem.g:2685:2: ( rule__Assertion__ArgumentsAssignment_0_0_2_0 ) + { + before(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_0_2_0()); + // InternalProblem.g:2686:2: ( rule__Assertion__ArgumentsAssignment_0_0_2_0 ) + // InternalProblem.g:2686:3: rule__Assertion__ArgumentsAssignment_0_0_2_0 + { + pushFollow(FOLLOW_2); + rule__Assertion__ArgumentsAssignment_0_0_2_0(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_0_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0_2__0__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_0_2__1" + // InternalProblem.g:2694:1: rule__Assertion__Group_0_0_2__1 : rule__Assertion__Group_0_0_2__1__Impl ; + public final void rule__Assertion__Group_0_0_2__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2698:1: ( rule__Assertion__Group_0_0_2__1__Impl ) + // InternalProblem.g:2699:2: rule__Assertion__Group_0_0_2__1__Impl + { + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0_2__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0_2__1" + + + // $ANTLR start "rule__Assertion__Group_0_0_2__1__Impl" + // InternalProblem.g:2705:1: rule__Assertion__Group_0_0_2__1__Impl : ( ( rule__Assertion__Group_0_0_2_1__0 )* ) ; + public final void rule__Assertion__Group_0_0_2__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2709:1: ( ( ( rule__Assertion__Group_0_0_2_1__0 )* ) ) + // InternalProblem.g:2710:1: ( ( rule__Assertion__Group_0_0_2_1__0 )* ) + { + // InternalProblem.g:2710:1: ( ( rule__Assertion__Group_0_0_2_1__0 )* ) + // InternalProblem.g:2711:2: ( rule__Assertion__Group_0_0_2_1__0 )* + { + before(grammarAccess.getAssertionAccess().getGroup_0_0_2_1()); + // InternalProblem.g:2712:2: ( rule__Assertion__Group_0_0_2_1__0 )* + loop30: + do { + int alt30=2; + int LA30_0 = input.LA(1); + + if ( (LA30_0==25) ) { + alt30=1; + } + + + switch (alt30) { + case 1 : + // InternalProblem.g:2712:3: rule__Assertion__Group_0_0_2_1__0 + { + pushFollow(FOLLOW_7); + rule__Assertion__Group_0_0_2_1__0(); + + state._fsp--; + + + } + break; + + default : + break loop30; + } + } while (true); + + after(grammarAccess.getAssertionAccess().getGroup_0_0_2_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0_2__1__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_0_2_1__0" + // InternalProblem.g:2721:1: rule__Assertion__Group_0_0_2_1__0 : rule__Assertion__Group_0_0_2_1__0__Impl rule__Assertion__Group_0_0_2_1__1 ; + public final void rule__Assertion__Group_0_0_2_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2725:1: ( rule__Assertion__Group_0_0_2_1__0__Impl rule__Assertion__Group_0_0_2_1__1 ) + // InternalProblem.g:2726:2: rule__Assertion__Group_0_0_2_1__0__Impl rule__Assertion__Group_0_0_2_1__1 + { + pushFollow(FOLLOW_5); + rule__Assertion__Group_0_0_2_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0_2_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0_2_1__0" + + + // $ANTLR start "rule__Assertion__Group_0_0_2_1__0__Impl" + // InternalProblem.g:2733:1: rule__Assertion__Group_0_0_2_1__0__Impl : ( ',' ) ; + public final void rule__Assertion__Group_0_0_2_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2737:1: ( ( ',' ) ) + // InternalProblem.g:2738:1: ( ',' ) + { + // InternalProblem.g:2738:1: ( ',' ) + // InternalProblem.g:2739:2: ',' + { + before(grammarAccess.getAssertionAccess().getCommaKeyword_0_0_2_1_0()); + match(input,25,FOLLOW_2); + after(grammarAccess.getAssertionAccess().getCommaKeyword_0_0_2_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0_2_1__0__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_0_2_1__1" + // InternalProblem.g:2748:1: rule__Assertion__Group_0_0_2_1__1 : rule__Assertion__Group_0_0_2_1__1__Impl ; + public final void rule__Assertion__Group_0_0_2_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2752:1: ( rule__Assertion__Group_0_0_2_1__1__Impl ) + // InternalProblem.g:2753:2: rule__Assertion__Group_0_0_2_1__1__Impl + { + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_0_2_1__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0_2_1__1" + + + // $ANTLR start "rule__Assertion__Group_0_0_2_1__1__Impl" + // InternalProblem.g:2759:1: rule__Assertion__Group_0_0_2_1__1__Impl : ( ( rule__Assertion__ArgumentsAssignment_0_0_2_1_1 ) ) ; + public final void rule__Assertion__Group_0_0_2_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2763:1: ( ( ( rule__Assertion__ArgumentsAssignment_0_0_2_1_1 ) ) ) + // InternalProblem.g:2764:1: ( ( rule__Assertion__ArgumentsAssignment_0_0_2_1_1 ) ) + { + // InternalProblem.g:2764:1: ( ( rule__Assertion__ArgumentsAssignment_0_0_2_1_1 ) ) + // InternalProblem.g:2765:2: ( rule__Assertion__ArgumentsAssignment_0_0_2_1_1 ) + { + before(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_0_2_1_1()); + // InternalProblem.g:2766:2: ( rule__Assertion__ArgumentsAssignment_0_0_2_1_1 ) + // InternalProblem.g:2766:3: rule__Assertion__ArgumentsAssignment_0_0_2_1_1 + { + pushFollow(FOLLOW_2); + rule__Assertion__ArgumentsAssignment_0_0_2_1_1(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_0_2_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_0_2_1__1__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_1__0" + // InternalProblem.g:2775:1: rule__Assertion__Group_0_1__0 : rule__Assertion__Group_0_1__0__Impl rule__Assertion__Group_0_1__1 ; + public final void rule__Assertion__Group_0_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2779:1: ( rule__Assertion__Group_0_1__0__Impl rule__Assertion__Group_0_1__1 ) + // InternalProblem.g:2780:2: rule__Assertion__Group_0_1__0__Impl rule__Assertion__Group_0_1__1 + { + pushFollow(FOLLOW_27); + rule__Assertion__Group_0_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1__0" + + + // $ANTLR start "rule__Assertion__Group_0_1__0__Impl" + // InternalProblem.g:2787:1: rule__Assertion__Group_0_1__0__Impl : ( ( rule__Assertion__ValueAssignment_0_1_0 )? ) ; + public final void rule__Assertion__Group_0_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2791:1: ( ( ( rule__Assertion__ValueAssignment_0_1_0 )? ) ) + // InternalProblem.g:2792:1: ( ( rule__Assertion__ValueAssignment_0_1_0 )? ) + { + // InternalProblem.g:2792:1: ( ( rule__Assertion__ValueAssignment_0_1_0 )? ) + // InternalProblem.g:2793:2: ( rule__Assertion__ValueAssignment_0_1_0 )? + { + before(grammarAccess.getAssertionAccess().getValueAssignment_0_1_0()); + // InternalProblem.g:2794:2: ( rule__Assertion__ValueAssignment_0_1_0 )? + int alt31=2; + int LA31_0 = input.LA(1); + + if ( ((LA31_0>=18 && LA31_0<=19)) ) { + alt31=1; + } + switch (alt31) { + case 1 : + // InternalProblem.g:2794:3: rule__Assertion__ValueAssignment_0_1_0 + { + pushFollow(FOLLOW_2); + rule__Assertion__ValueAssignment_0_1_0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getAssertionAccess().getValueAssignment_0_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1__0__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_1__1" + // InternalProblem.g:2802:1: rule__Assertion__Group_0_1__1 : rule__Assertion__Group_0_1__1__Impl rule__Assertion__Group_0_1__2 ; + public final void rule__Assertion__Group_0_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2806:1: ( rule__Assertion__Group_0_1__1__Impl rule__Assertion__Group_0_1__2 ) + // InternalProblem.g:2807:2: rule__Assertion__Group_0_1__1__Impl rule__Assertion__Group_0_1__2 + { + pushFollow(FOLLOW_16); + rule__Assertion__Group_0_1__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1__1" + + + // $ANTLR start "rule__Assertion__Group_0_1__1__Impl" + // InternalProblem.g:2814:1: rule__Assertion__Group_0_1__1__Impl : ( ( rule__Assertion__RelationAssignment_0_1_1 ) ) ; + public final void rule__Assertion__Group_0_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2818:1: ( ( ( rule__Assertion__RelationAssignment_0_1_1 ) ) ) + // InternalProblem.g:2819:1: ( ( rule__Assertion__RelationAssignment_0_1_1 ) ) + { + // InternalProblem.g:2819:1: ( ( rule__Assertion__RelationAssignment_0_1_1 ) ) + // InternalProblem.g:2820:2: ( rule__Assertion__RelationAssignment_0_1_1 ) + { + before(grammarAccess.getAssertionAccess().getRelationAssignment_0_1_1()); + // InternalProblem.g:2821:2: ( rule__Assertion__RelationAssignment_0_1_1 ) + // InternalProblem.g:2821:3: rule__Assertion__RelationAssignment_0_1_1 + { + pushFollow(FOLLOW_2); + rule__Assertion__RelationAssignment_0_1_1(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getRelationAssignment_0_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1__1__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_1__2" + // InternalProblem.g:2829:1: rule__Assertion__Group_0_1__2 : rule__Assertion__Group_0_1__2__Impl rule__Assertion__Group_0_1__3 ; + public final void rule__Assertion__Group_0_1__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2833:1: ( rule__Assertion__Group_0_1__2__Impl rule__Assertion__Group_0_1__3 ) + // InternalProblem.g:2834:2: rule__Assertion__Group_0_1__2__Impl rule__Assertion__Group_0_1__3 + { + pushFollow(FOLLOW_17); + rule__Assertion__Group_0_1__2__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1__3(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1__2" + + + // $ANTLR start "rule__Assertion__Group_0_1__2__Impl" + // InternalProblem.g:2841:1: rule__Assertion__Group_0_1__2__Impl : ( '(' ) ; + public final void rule__Assertion__Group_0_1__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2845:1: ( ( '(' ) ) + // InternalProblem.g:2846:1: ( '(' ) + { + // InternalProblem.g:2846:1: ( '(' ) + // InternalProblem.g:2847:2: '(' + { + before(grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_1_2()); + match(input,27,FOLLOW_2); + after(grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_1_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1__2__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_1__3" + // InternalProblem.g:2856:1: rule__Assertion__Group_0_1__3 : rule__Assertion__Group_0_1__3__Impl rule__Assertion__Group_0_1__4 ; + public final void rule__Assertion__Group_0_1__3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2860:1: ( rule__Assertion__Group_0_1__3__Impl rule__Assertion__Group_0_1__4 ) + // InternalProblem.g:2861:2: rule__Assertion__Group_0_1__3__Impl rule__Assertion__Group_0_1__4 + { + pushFollow(FOLLOW_17); + rule__Assertion__Group_0_1__3__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1__4(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1__3" + + + // $ANTLR start "rule__Assertion__Group_0_1__3__Impl" + // InternalProblem.g:2868:1: rule__Assertion__Group_0_1__3__Impl : ( ( rule__Assertion__Group_0_1_3__0 )? ) ; + public final void rule__Assertion__Group_0_1__3__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2872:1: ( ( ( rule__Assertion__Group_0_1_3__0 )? ) ) + // InternalProblem.g:2873:1: ( ( rule__Assertion__Group_0_1_3__0 )? ) + { + // InternalProblem.g:2873:1: ( ( rule__Assertion__Group_0_1_3__0 )? ) + // InternalProblem.g:2874:2: ( rule__Assertion__Group_0_1_3__0 )? + { + before(grammarAccess.getAssertionAccess().getGroup_0_1_3()); + // InternalProblem.g:2875:2: ( rule__Assertion__Group_0_1_3__0 )? + int alt32=2; + int LA32_0 = input.LA(1); + + if ( (LA32_0==RULE_ID) ) { + alt32=1; + } + switch (alt32) { + case 1 : + // InternalProblem.g:2875:3: rule__Assertion__Group_0_1_3__0 + { + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1_3__0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getAssertionAccess().getGroup_0_1_3()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1__3__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_1__4" + // InternalProblem.g:2883:1: rule__Assertion__Group_0_1__4 : rule__Assertion__Group_0_1__4__Impl ; + public final void rule__Assertion__Group_0_1__4() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2887:1: ( rule__Assertion__Group_0_1__4__Impl ) + // InternalProblem.g:2888:2: rule__Assertion__Group_0_1__4__Impl + { + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1__4__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1__4" + + + // $ANTLR start "rule__Assertion__Group_0_1__4__Impl" + // InternalProblem.g:2894:1: rule__Assertion__Group_0_1__4__Impl : ( ')' ) ; + public final void rule__Assertion__Group_0_1__4__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2898:1: ( ( ')' ) ) + // InternalProblem.g:2899:1: ( ')' ) + { + // InternalProblem.g:2899:1: ( ')' ) + // InternalProblem.g:2900:2: ')' + { + before(grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_1_4()); + match(input,28,FOLLOW_2); + after(grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_1_4()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1__4__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_1_3__0" + // InternalProblem.g:2910:1: rule__Assertion__Group_0_1_3__0 : rule__Assertion__Group_0_1_3__0__Impl rule__Assertion__Group_0_1_3__1 ; + public final void rule__Assertion__Group_0_1_3__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2914:1: ( rule__Assertion__Group_0_1_3__0__Impl rule__Assertion__Group_0_1_3__1 ) + // InternalProblem.g:2915:2: rule__Assertion__Group_0_1_3__0__Impl rule__Assertion__Group_0_1_3__1 + { + pushFollow(FOLLOW_10); + rule__Assertion__Group_0_1_3__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1_3__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1_3__0" + + + // $ANTLR start "rule__Assertion__Group_0_1_3__0__Impl" + // InternalProblem.g:2922:1: rule__Assertion__Group_0_1_3__0__Impl : ( ( rule__Assertion__ArgumentsAssignment_0_1_3_0 ) ) ; + public final void rule__Assertion__Group_0_1_3__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2926:1: ( ( ( rule__Assertion__ArgumentsAssignment_0_1_3_0 ) ) ) + // InternalProblem.g:2927:1: ( ( rule__Assertion__ArgumentsAssignment_0_1_3_0 ) ) + { + // InternalProblem.g:2927:1: ( ( rule__Assertion__ArgumentsAssignment_0_1_3_0 ) ) + // InternalProblem.g:2928:2: ( rule__Assertion__ArgumentsAssignment_0_1_3_0 ) + { + before(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_1_3_0()); + // InternalProblem.g:2929:2: ( rule__Assertion__ArgumentsAssignment_0_1_3_0 ) + // InternalProblem.g:2929:3: rule__Assertion__ArgumentsAssignment_0_1_3_0 + { + pushFollow(FOLLOW_2); + rule__Assertion__ArgumentsAssignment_0_1_3_0(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_1_3_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1_3__0__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_1_3__1" + // InternalProblem.g:2937:1: rule__Assertion__Group_0_1_3__1 : rule__Assertion__Group_0_1_3__1__Impl ; + public final void rule__Assertion__Group_0_1_3__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2941:1: ( rule__Assertion__Group_0_1_3__1__Impl ) + // InternalProblem.g:2942:2: rule__Assertion__Group_0_1_3__1__Impl + { + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1_3__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1_3__1" + + + // $ANTLR start "rule__Assertion__Group_0_1_3__1__Impl" + // InternalProblem.g:2948:1: rule__Assertion__Group_0_1_3__1__Impl : ( ( rule__Assertion__Group_0_1_3_1__0 )* ) ; + public final void rule__Assertion__Group_0_1_3__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2952:1: ( ( ( rule__Assertion__Group_0_1_3_1__0 )* ) ) + // InternalProblem.g:2953:1: ( ( rule__Assertion__Group_0_1_3_1__0 )* ) + { + // InternalProblem.g:2953:1: ( ( rule__Assertion__Group_0_1_3_1__0 )* ) + // InternalProblem.g:2954:2: ( rule__Assertion__Group_0_1_3_1__0 )* + { + before(grammarAccess.getAssertionAccess().getGroup_0_1_3_1()); + // InternalProblem.g:2955:2: ( rule__Assertion__Group_0_1_3_1__0 )* + loop33: + do { + int alt33=2; + int LA33_0 = input.LA(1); + + if ( (LA33_0==25) ) { + alt33=1; + } + + + switch (alt33) { + case 1 : + // InternalProblem.g:2955:3: rule__Assertion__Group_0_1_3_1__0 + { + pushFollow(FOLLOW_7); + rule__Assertion__Group_0_1_3_1__0(); + + state._fsp--; + + + } + break; + + default : + break loop33; + } + } while (true); + + after(grammarAccess.getAssertionAccess().getGroup_0_1_3_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1_3__1__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_1_3_1__0" + // InternalProblem.g:2964:1: rule__Assertion__Group_0_1_3_1__0 : rule__Assertion__Group_0_1_3_1__0__Impl rule__Assertion__Group_0_1_3_1__1 ; + public final void rule__Assertion__Group_0_1_3_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2968:1: ( rule__Assertion__Group_0_1_3_1__0__Impl rule__Assertion__Group_0_1_3_1__1 ) + // InternalProblem.g:2969:2: rule__Assertion__Group_0_1_3_1__0__Impl rule__Assertion__Group_0_1_3_1__1 + { + pushFollow(FOLLOW_5); + rule__Assertion__Group_0_1_3_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1_3_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1_3_1__0" + + + // $ANTLR start "rule__Assertion__Group_0_1_3_1__0__Impl" + // InternalProblem.g:2976:1: rule__Assertion__Group_0_1_3_1__0__Impl : ( ',' ) ; + public final void rule__Assertion__Group_0_1_3_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2980:1: ( ( ',' ) ) + // InternalProblem.g:2981:1: ( ',' ) + { + // InternalProblem.g:2981:1: ( ',' ) + // InternalProblem.g:2982:2: ',' + { + before(grammarAccess.getAssertionAccess().getCommaKeyword_0_1_3_1_0()); + match(input,25,FOLLOW_2); + after(grammarAccess.getAssertionAccess().getCommaKeyword_0_1_3_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1_3_1__0__Impl" + + + // $ANTLR start "rule__Assertion__Group_0_1_3_1__1" + // InternalProblem.g:2991:1: rule__Assertion__Group_0_1_3_1__1 : rule__Assertion__Group_0_1_3_1__1__Impl ; + public final void rule__Assertion__Group_0_1_3_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:2995:1: ( rule__Assertion__Group_0_1_3_1__1__Impl ) + // InternalProblem.g:2996:2: rule__Assertion__Group_0_1_3_1__1__Impl + { + pushFollow(FOLLOW_2); + rule__Assertion__Group_0_1_3_1__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1_3_1__1" + + + // $ANTLR start "rule__Assertion__Group_0_1_3_1__1__Impl" + // InternalProblem.g:3002:1: rule__Assertion__Group_0_1_3_1__1__Impl : ( ( rule__Assertion__ArgumentsAssignment_0_1_3_1_1 ) ) ; + public final void rule__Assertion__Group_0_1_3_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3006:1: ( ( ( rule__Assertion__ArgumentsAssignment_0_1_3_1_1 ) ) ) + // InternalProblem.g:3007:1: ( ( rule__Assertion__ArgumentsAssignment_0_1_3_1_1 ) ) + { + // InternalProblem.g:3007:1: ( ( rule__Assertion__ArgumentsAssignment_0_1_3_1_1 ) ) + // InternalProblem.g:3008:2: ( rule__Assertion__ArgumentsAssignment_0_1_3_1_1 ) + { + before(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_1_3_1_1()); + // InternalProblem.g:3009:2: ( rule__Assertion__ArgumentsAssignment_0_1_3_1_1 ) + // InternalProblem.g:3009:3: rule__Assertion__ArgumentsAssignment_0_1_3_1_1 + { + pushFollow(FOLLOW_2); + rule__Assertion__ArgumentsAssignment_0_1_3_1_1(); + + state._fsp--; + + + } + + after(grammarAccess.getAssertionAccess().getArgumentsAssignment_0_1_3_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__Group_0_1_3_1__1__Impl" + + + // $ANTLR start "rule__ScopeDeclaration__Group__0" + // InternalProblem.g:3018:1: rule__ScopeDeclaration__Group__0 : rule__ScopeDeclaration__Group__0__Impl rule__ScopeDeclaration__Group__1 ; + public final void rule__ScopeDeclaration__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3022:1: ( rule__ScopeDeclaration__Group__0__Impl rule__ScopeDeclaration__Group__1 ) + // InternalProblem.g:3023:2: rule__ScopeDeclaration__Group__0__Impl rule__ScopeDeclaration__Group__1 + { + pushFollow(FOLLOW_5); + rule__ScopeDeclaration__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ScopeDeclaration__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group__0" + + + // $ANTLR start "rule__ScopeDeclaration__Group__0__Impl" + // InternalProblem.g:3030:1: rule__ScopeDeclaration__Group__0__Impl : ( 'scope' ) ; + public final void rule__ScopeDeclaration__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3034:1: ( ( 'scope' ) ) + // InternalProblem.g:3035:1: ( 'scope' ) + { + // InternalProblem.g:3035:1: ( 'scope' ) + // InternalProblem.g:3036:2: 'scope' + { + before(grammarAccess.getScopeDeclarationAccess().getScopeKeyword_0()); + match(input,32,FOLLOW_2); + after(grammarAccess.getScopeDeclarationAccess().getScopeKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group__0__Impl" + + + // $ANTLR start "rule__ScopeDeclaration__Group__1" + // InternalProblem.g:3045:1: rule__ScopeDeclaration__Group__1 : rule__ScopeDeclaration__Group__1__Impl rule__ScopeDeclaration__Group__2 ; + public final void rule__ScopeDeclaration__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3049:1: ( rule__ScopeDeclaration__Group__1__Impl rule__ScopeDeclaration__Group__2 ) + // InternalProblem.g:3050:2: rule__ScopeDeclaration__Group__1__Impl rule__ScopeDeclaration__Group__2 + { + pushFollow(FOLLOW_28); + rule__ScopeDeclaration__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ScopeDeclaration__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group__1" + + + // $ANTLR start "rule__ScopeDeclaration__Group__1__Impl" + // InternalProblem.g:3057:1: rule__ScopeDeclaration__Group__1__Impl : ( ( rule__ScopeDeclaration__TypeScopesAssignment_1 ) ) ; + public final void rule__ScopeDeclaration__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3061:1: ( ( ( rule__ScopeDeclaration__TypeScopesAssignment_1 ) ) ) + // InternalProblem.g:3062:1: ( ( rule__ScopeDeclaration__TypeScopesAssignment_1 ) ) + { + // InternalProblem.g:3062:1: ( ( rule__ScopeDeclaration__TypeScopesAssignment_1 ) ) + // InternalProblem.g:3063:2: ( rule__ScopeDeclaration__TypeScopesAssignment_1 ) + { + before(grammarAccess.getScopeDeclarationAccess().getTypeScopesAssignment_1()); + // InternalProblem.g:3064:2: ( rule__ScopeDeclaration__TypeScopesAssignment_1 ) + // InternalProblem.g:3064:3: rule__ScopeDeclaration__TypeScopesAssignment_1 + { + pushFollow(FOLLOW_2); + rule__ScopeDeclaration__TypeScopesAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getScopeDeclarationAccess().getTypeScopesAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group__1__Impl" + + + // $ANTLR start "rule__ScopeDeclaration__Group__2" + // InternalProblem.g:3072:1: rule__ScopeDeclaration__Group__2 : rule__ScopeDeclaration__Group__2__Impl rule__ScopeDeclaration__Group__3 ; + public final void rule__ScopeDeclaration__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3076:1: ( rule__ScopeDeclaration__Group__2__Impl rule__ScopeDeclaration__Group__3 ) + // InternalProblem.g:3077:2: rule__ScopeDeclaration__Group__2__Impl rule__ScopeDeclaration__Group__3 + { + pushFollow(FOLLOW_28); + rule__ScopeDeclaration__Group__2__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ScopeDeclaration__Group__3(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group__2" + + + // $ANTLR start "rule__ScopeDeclaration__Group__2__Impl" + // InternalProblem.g:3084:1: rule__ScopeDeclaration__Group__2__Impl : ( ( rule__ScopeDeclaration__Group_2__0 )* ) ; + public final void rule__ScopeDeclaration__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3088:1: ( ( ( rule__ScopeDeclaration__Group_2__0 )* ) ) + // InternalProblem.g:3089:1: ( ( rule__ScopeDeclaration__Group_2__0 )* ) + { + // InternalProblem.g:3089:1: ( ( rule__ScopeDeclaration__Group_2__0 )* ) + // InternalProblem.g:3090:2: ( rule__ScopeDeclaration__Group_2__0 )* + { + before(grammarAccess.getScopeDeclarationAccess().getGroup_2()); + // InternalProblem.g:3091:2: ( rule__ScopeDeclaration__Group_2__0 )* + loop34: + do { + int alt34=2; + int LA34_0 = input.LA(1); + + if ( (LA34_0==25) ) { + alt34=1; + } + + + switch (alt34) { + case 1 : + // InternalProblem.g:3091:3: rule__ScopeDeclaration__Group_2__0 + { + pushFollow(FOLLOW_7); + rule__ScopeDeclaration__Group_2__0(); + + state._fsp--; + + + } + break; + + default : + break loop34; + } + } while (true); + + after(grammarAccess.getScopeDeclarationAccess().getGroup_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group__2__Impl" + + + // $ANTLR start "rule__ScopeDeclaration__Group__3" + // InternalProblem.g:3099:1: rule__ScopeDeclaration__Group__3 : rule__ScopeDeclaration__Group__3__Impl ; + public final void rule__ScopeDeclaration__Group__3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3103:1: ( rule__ScopeDeclaration__Group__3__Impl ) + // InternalProblem.g:3104:2: rule__ScopeDeclaration__Group__3__Impl + { + pushFollow(FOLLOW_2); + rule__ScopeDeclaration__Group__3__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group__3" + + + // $ANTLR start "rule__ScopeDeclaration__Group__3__Impl" + // InternalProblem.g:3110:1: rule__ScopeDeclaration__Group__3__Impl : ( '.' ) ; + public final void rule__ScopeDeclaration__Group__3__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3114:1: ( ( '.' ) ) + // InternalProblem.g:3115:1: ( '.' ) + { + // InternalProblem.g:3115:1: ( '.' ) + // InternalProblem.g:3116:2: '.' + { + before(grammarAccess.getScopeDeclarationAccess().getFullStopKeyword_3()); + match(input,21,FOLLOW_2); + after(grammarAccess.getScopeDeclarationAccess().getFullStopKeyword_3()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group__3__Impl" + + + // $ANTLR start "rule__ScopeDeclaration__Group_2__0" + // InternalProblem.g:3126:1: rule__ScopeDeclaration__Group_2__0 : rule__ScopeDeclaration__Group_2__0__Impl rule__ScopeDeclaration__Group_2__1 ; + public final void rule__ScopeDeclaration__Group_2__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3130:1: ( rule__ScopeDeclaration__Group_2__0__Impl rule__ScopeDeclaration__Group_2__1 ) + // InternalProblem.g:3131:2: rule__ScopeDeclaration__Group_2__0__Impl rule__ScopeDeclaration__Group_2__1 + { + pushFollow(FOLLOW_5); + rule__ScopeDeclaration__Group_2__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ScopeDeclaration__Group_2__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group_2__0" + + + // $ANTLR start "rule__ScopeDeclaration__Group_2__0__Impl" + // InternalProblem.g:3138:1: rule__ScopeDeclaration__Group_2__0__Impl : ( ',' ) ; + public final void rule__ScopeDeclaration__Group_2__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3142:1: ( ( ',' ) ) + // InternalProblem.g:3143:1: ( ',' ) + { + // InternalProblem.g:3143:1: ( ',' ) + // InternalProblem.g:3144:2: ',' + { + before(grammarAccess.getScopeDeclarationAccess().getCommaKeyword_2_0()); + match(input,25,FOLLOW_2); + after(grammarAccess.getScopeDeclarationAccess().getCommaKeyword_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group_2__0__Impl" + + + // $ANTLR start "rule__ScopeDeclaration__Group_2__1" + // InternalProblem.g:3153:1: rule__ScopeDeclaration__Group_2__1 : rule__ScopeDeclaration__Group_2__1__Impl ; + public final void rule__ScopeDeclaration__Group_2__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3157:1: ( rule__ScopeDeclaration__Group_2__1__Impl ) + // InternalProblem.g:3158:2: rule__ScopeDeclaration__Group_2__1__Impl + { + pushFollow(FOLLOW_2); + rule__ScopeDeclaration__Group_2__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group_2__1" + + + // $ANTLR start "rule__ScopeDeclaration__Group_2__1__Impl" + // InternalProblem.g:3164:1: rule__ScopeDeclaration__Group_2__1__Impl : ( ( rule__ScopeDeclaration__TypeScopesAssignment_2_1 ) ) ; + public final void rule__ScopeDeclaration__Group_2__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3168:1: ( ( ( rule__ScopeDeclaration__TypeScopesAssignment_2_1 ) ) ) + // InternalProblem.g:3169:1: ( ( rule__ScopeDeclaration__TypeScopesAssignment_2_1 ) ) + { + // InternalProblem.g:3169:1: ( ( rule__ScopeDeclaration__TypeScopesAssignment_2_1 ) ) + // InternalProblem.g:3170:2: ( rule__ScopeDeclaration__TypeScopesAssignment_2_1 ) + { + before(grammarAccess.getScopeDeclarationAccess().getTypeScopesAssignment_2_1()); + // InternalProblem.g:3171:2: ( rule__ScopeDeclaration__TypeScopesAssignment_2_1 ) + // InternalProblem.g:3171:3: rule__ScopeDeclaration__TypeScopesAssignment_2_1 + { + pushFollow(FOLLOW_2); + rule__ScopeDeclaration__TypeScopesAssignment_2_1(); + + state._fsp--; + + + } + + after(grammarAccess.getScopeDeclarationAccess().getTypeScopesAssignment_2_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__Group_2__1__Impl" + + + // $ANTLR start "rule__TypeScope__Group__0" + // InternalProblem.g:3180:1: rule__TypeScope__Group__0 : rule__TypeScope__Group__0__Impl rule__TypeScope__Group__1 ; + public final void rule__TypeScope__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3184:1: ( rule__TypeScope__Group__0__Impl rule__TypeScope__Group__1 ) + // InternalProblem.g:3185:2: rule__TypeScope__Group__0__Impl rule__TypeScope__Group__1 + { + pushFollow(FOLLOW_29); + rule__TypeScope__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__TypeScope__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TypeScope__Group__0" + + + // $ANTLR start "rule__TypeScope__Group__0__Impl" + // InternalProblem.g:3192:1: rule__TypeScope__Group__0__Impl : ( ( rule__TypeScope__TargetTypeAssignment_0 ) ) ; + public final void rule__TypeScope__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3196:1: ( ( ( rule__TypeScope__TargetTypeAssignment_0 ) ) ) + // InternalProblem.g:3197:1: ( ( rule__TypeScope__TargetTypeAssignment_0 ) ) + { + // InternalProblem.g:3197:1: ( ( rule__TypeScope__TargetTypeAssignment_0 ) ) + // InternalProblem.g:3198:2: ( rule__TypeScope__TargetTypeAssignment_0 ) + { + before(grammarAccess.getTypeScopeAccess().getTargetTypeAssignment_0()); + // InternalProblem.g:3199:2: ( rule__TypeScope__TargetTypeAssignment_0 ) + // InternalProblem.g:3199:3: rule__TypeScope__TargetTypeAssignment_0 + { + pushFollow(FOLLOW_2); + rule__TypeScope__TargetTypeAssignment_0(); + + state._fsp--; + + + } + + after(grammarAccess.getTypeScopeAccess().getTargetTypeAssignment_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TypeScope__Group__0__Impl" + + + // $ANTLR start "rule__TypeScope__Group__1" + // InternalProblem.g:3207:1: rule__TypeScope__Group__1 : rule__TypeScope__Group__1__Impl rule__TypeScope__Group__2 ; + public final void rule__TypeScope__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3211:1: ( rule__TypeScope__Group__1__Impl rule__TypeScope__Group__2 ) + // InternalProblem.g:3212:2: rule__TypeScope__Group__1__Impl rule__TypeScope__Group__2 + { + pushFollow(FOLLOW_13); + rule__TypeScope__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__TypeScope__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TypeScope__Group__1" + + + // $ANTLR start "rule__TypeScope__Group__1__Impl" + // InternalProblem.g:3219:1: rule__TypeScope__Group__1__Impl : ( ( rule__TypeScope__Alternatives_1 ) ) ; + public final void rule__TypeScope__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3223:1: ( ( ( rule__TypeScope__Alternatives_1 ) ) ) + // InternalProblem.g:3224:1: ( ( rule__TypeScope__Alternatives_1 ) ) + { + // InternalProblem.g:3224:1: ( ( rule__TypeScope__Alternatives_1 ) ) + // InternalProblem.g:3225:2: ( rule__TypeScope__Alternatives_1 ) + { + before(grammarAccess.getTypeScopeAccess().getAlternatives_1()); + // InternalProblem.g:3226:2: ( rule__TypeScope__Alternatives_1 ) + // InternalProblem.g:3226:3: rule__TypeScope__Alternatives_1 + { + pushFollow(FOLLOW_2); + rule__TypeScope__Alternatives_1(); + + state._fsp--; + + + } + + after(grammarAccess.getTypeScopeAccess().getAlternatives_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TypeScope__Group__1__Impl" + + + // $ANTLR start "rule__TypeScope__Group__2" + // InternalProblem.g:3234:1: rule__TypeScope__Group__2 : rule__TypeScope__Group__2__Impl ; + public final void rule__TypeScope__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3238:1: ( rule__TypeScope__Group__2__Impl ) + // InternalProblem.g:3239:2: rule__TypeScope__Group__2__Impl + { + pushFollow(FOLLOW_2); + rule__TypeScope__Group__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TypeScope__Group__2" + + + // $ANTLR start "rule__TypeScope__Group__2__Impl" + // InternalProblem.g:3245:1: rule__TypeScope__Group__2__Impl : ( ( rule__TypeScope__MultiplicityAssignment_2 ) ) ; + public final void rule__TypeScope__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3249:1: ( ( ( rule__TypeScope__MultiplicityAssignment_2 ) ) ) + // InternalProblem.g:3250:1: ( ( rule__TypeScope__MultiplicityAssignment_2 ) ) + { + // InternalProblem.g:3250:1: ( ( rule__TypeScope__MultiplicityAssignment_2 ) ) + // InternalProblem.g:3251:2: ( rule__TypeScope__MultiplicityAssignment_2 ) + { + before(grammarAccess.getTypeScopeAccess().getMultiplicityAssignment_2()); + // InternalProblem.g:3252:2: ( rule__TypeScope__MultiplicityAssignment_2 ) + // InternalProblem.g:3252:3: rule__TypeScope__MultiplicityAssignment_2 + { + pushFollow(FOLLOW_2); + rule__TypeScope__MultiplicityAssignment_2(); + + state._fsp--; + + + } + + after(grammarAccess.getTypeScopeAccess().getMultiplicityAssignment_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TypeScope__Group__2__Impl" + + + // $ANTLR start "rule__RangeMultiplicity__Group__0" + // InternalProblem.g:3261:1: rule__RangeMultiplicity__Group__0 : rule__RangeMultiplicity__Group__0__Impl rule__RangeMultiplicity__Group__1 ; + public final void rule__RangeMultiplicity__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3265:1: ( rule__RangeMultiplicity__Group__0__Impl rule__RangeMultiplicity__Group__1 ) + // InternalProblem.g:3266:2: rule__RangeMultiplicity__Group__0__Impl rule__RangeMultiplicity__Group__1 + { + pushFollow(FOLLOW_30); + rule__RangeMultiplicity__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__RangeMultiplicity__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__RangeMultiplicity__Group__0" + + + // $ANTLR start "rule__RangeMultiplicity__Group__0__Impl" + // InternalProblem.g:3273:1: rule__RangeMultiplicity__Group__0__Impl : ( ( rule__RangeMultiplicity__LowerBoundAssignment_0 ) ) ; + public final void rule__RangeMultiplicity__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3277:1: ( ( ( rule__RangeMultiplicity__LowerBoundAssignment_0 ) ) ) + // InternalProblem.g:3278:1: ( ( rule__RangeMultiplicity__LowerBoundAssignment_0 ) ) + { + // InternalProblem.g:3278:1: ( ( rule__RangeMultiplicity__LowerBoundAssignment_0 ) ) + // InternalProblem.g:3279:2: ( rule__RangeMultiplicity__LowerBoundAssignment_0 ) + { + before(grammarAccess.getRangeMultiplicityAccess().getLowerBoundAssignment_0()); + // InternalProblem.g:3280:2: ( rule__RangeMultiplicity__LowerBoundAssignment_0 ) + // InternalProblem.g:3280:3: rule__RangeMultiplicity__LowerBoundAssignment_0 + { + pushFollow(FOLLOW_2); + rule__RangeMultiplicity__LowerBoundAssignment_0(); + + state._fsp--; + + + } + + after(grammarAccess.getRangeMultiplicityAccess().getLowerBoundAssignment_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__RangeMultiplicity__Group__0__Impl" + + + // $ANTLR start "rule__RangeMultiplicity__Group__1" + // InternalProblem.g:3288:1: rule__RangeMultiplicity__Group__1 : rule__RangeMultiplicity__Group__1__Impl rule__RangeMultiplicity__Group__2 ; + public final void rule__RangeMultiplicity__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3292:1: ( rule__RangeMultiplicity__Group__1__Impl rule__RangeMultiplicity__Group__2 ) + // InternalProblem.g:3293:2: rule__RangeMultiplicity__Group__1__Impl rule__RangeMultiplicity__Group__2 + { + pushFollow(FOLLOW_31); + rule__RangeMultiplicity__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__RangeMultiplicity__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__RangeMultiplicity__Group__1" + + + // $ANTLR start "rule__RangeMultiplicity__Group__1__Impl" + // InternalProblem.g:3300:1: rule__RangeMultiplicity__Group__1__Impl : ( '..' ) ; + public final void rule__RangeMultiplicity__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3304:1: ( ( '..' ) ) + // InternalProblem.g:3305:1: ( '..' ) + { + // InternalProblem.g:3305:1: ( '..' ) + // InternalProblem.g:3306:2: '..' + { + before(grammarAccess.getRangeMultiplicityAccess().getFullStopFullStopKeyword_1()); + match(input,33,FOLLOW_2); + after(grammarAccess.getRangeMultiplicityAccess().getFullStopFullStopKeyword_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__RangeMultiplicity__Group__1__Impl" + + + // $ANTLR start "rule__RangeMultiplicity__Group__2" + // InternalProblem.g:3315:1: rule__RangeMultiplicity__Group__2 : rule__RangeMultiplicity__Group__2__Impl ; + public final void rule__RangeMultiplicity__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3319:1: ( rule__RangeMultiplicity__Group__2__Impl ) + // InternalProblem.g:3320:2: rule__RangeMultiplicity__Group__2__Impl + { + pushFollow(FOLLOW_2); + rule__RangeMultiplicity__Group__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__RangeMultiplicity__Group__2" + + + // $ANTLR start "rule__RangeMultiplicity__Group__2__Impl" + // InternalProblem.g:3326:1: rule__RangeMultiplicity__Group__2__Impl : ( ( rule__RangeMultiplicity__UpperBoundAssignment_2 ) ) ; + public final void rule__RangeMultiplicity__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3330:1: ( ( ( rule__RangeMultiplicity__UpperBoundAssignment_2 ) ) ) + // InternalProblem.g:3331:1: ( ( rule__RangeMultiplicity__UpperBoundAssignment_2 ) ) + { + // InternalProblem.g:3331:1: ( ( rule__RangeMultiplicity__UpperBoundAssignment_2 ) ) + // InternalProblem.g:3332:2: ( rule__RangeMultiplicity__UpperBoundAssignment_2 ) + { + before(grammarAccess.getRangeMultiplicityAccess().getUpperBoundAssignment_2()); + // InternalProblem.g:3333:2: ( rule__RangeMultiplicity__UpperBoundAssignment_2 ) + // InternalProblem.g:3333:3: rule__RangeMultiplicity__UpperBoundAssignment_2 + { + pushFollow(FOLLOW_2); + rule__RangeMultiplicity__UpperBoundAssignment_2(); + + state._fsp--; + + + } + + after(grammarAccess.getRangeMultiplicityAccess().getUpperBoundAssignment_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__RangeMultiplicity__Group__2__Impl" + + + // $ANTLR start "rule__QualifiedName__Group__0" + // InternalProblem.g:3342:1: rule__QualifiedName__Group__0 : rule__QualifiedName__Group__0__Impl rule__QualifiedName__Group__1 ; + public final void rule__QualifiedName__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3346:1: ( rule__QualifiedName__Group__0__Impl rule__QualifiedName__Group__1 ) + // InternalProblem.g:3347:2: rule__QualifiedName__Group__0__Impl rule__QualifiedName__Group__1 + { + pushFollow(FOLLOW_32); + rule__QualifiedName__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__QualifiedName__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__QualifiedName__Group__0" + + + // $ANTLR start "rule__QualifiedName__Group__0__Impl" + // InternalProblem.g:3354:1: rule__QualifiedName__Group__0__Impl : ( RULE_ID ) ; + public final void rule__QualifiedName__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3358:1: ( ( RULE_ID ) ) + // InternalProblem.g:3359:1: ( RULE_ID ) + { + // InternalProblem.g:3359:1: ( RULE_ID ) + // InternalProblem.g:3360:2: RULE_ID + { + before(grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__QualifiedName__Group__0__Impl" + + + // $ANTLR start "rule__QualifiedName__Group__1" + // InternalProblem.g:3369:1: rule__QualifiedName__Group__1 : rule__QualifiedName__Group__1__Impl ; + public final void rule__QualifiedName__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3373:1: ( rule__QualifiedName__Group__1__Impl ) + // InternalProblem.g:3374:2: rule__QualifiedName__Group__1__Impl + { + pushFollow(FOLLOW_2); + rule__QualifiedName__Group__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__QualifiedName__Group__1" + + + // $ANTLR start "rule__QualifiedName__Group__1__Impl" + // InternalProblem.g:3380:1: rule__QualifiedName__Group__1__Impl : ( ( rule__QualifiedName__Group_1__0 )* ) ; + public final void rule__QualifiedName__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3384:1: ( ( ( rule__QualifiedName__Group_1__0 )* ) ) + // InternalProblem.g:3385:1: ( ( rule__QualifiedName__Group_1__0 )* ) + { + // InternalProblem.g:3385:1: ( ( rule__QualifiedName__Group_1__0 )* ) + // InternalProblem.g:3386:2: ( rule__QualifiedName__Group_1__0 )* + { + before(grammarAccess.getQualifiedNameAccess().getGroup_1()); + // InternalProblem.g:3387:2: ( rule__QualifiedName__Group_1__0 )* + loop35: + do { + int alt35=2; + int LA35_0 = input.LA(1); + + if ( (LA35_0==34) ) { + alt35=1; + } + + + switch (alt35) { + case 1 : + // InternalProblem.g:3387:3: rule__QualifiedName__Group_1__0 + { + pushFollow(FOLLOW_33); + rule__QualifiedName__Group_1__0(); + + state._fsp--; + + + } + break; + + default : + break loop35; + } + } while (true); + + after(grammarAccess.getQualifiedNameAccess().getGroup_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__QualifiedName__Group__1__Impl" + + + // $ANTLR start "rule__QualifiedName__Group_1__0" + // InternalProblem.g:3396:1: rule__QualifiedName__Group_1__0 : rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1 ; + public final void rule__QualifiedName__Group_1__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3400:1: ( rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1 ) + // InternalProblem.g:3401:2: rule__QualifiedName__Group_1__0__Impl rule__QualifiedName__Group_1__1 + { + pushFollow(FOLLOW_5); + rule__QualifiedName__Group_1__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__QualifiedName__Group_1__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__QualifiedName__Group_1__0" + + + // $ANTLR start "rule__QualifiedName__Group_1__0__Impl" + // InternalProblem.g:3408:1: rule__QualifiedName__Group_1__0__Impl : ( '::' ) ; + public final void rule__QualifiedName__Group_1__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3412:1: ( ( '::' ) ) + // InternalProblem.g:3413:1: ( '::' ) + { + // InternalProblem.g:3413:1: ( '::' ) + // InternalProblem.g:3414:2: '::' + { + before(grammarAccess.getQualifiedNameAccess().getColonColonKeyword_1_0()); + match(input,34,FOLLOW_2); + after(grammarAccess.getQualifiedNameAccess().getColonColonKeyword_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__QualifiedName__Group_1__0__Impl" + + + // $ANTLR start "rule__QualifiedName__Group_1__1" + // InternalProblem.g:3423:1: rule__QualifiedName__Group_1__1 : rule__QualifiedName__Group_1__1__Impl ; + public final void rule__QualifiedName__Group_1__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3427:1: ( rule__QualifiedName__Group_1__1__Impl ) + // InternalProblem.g:3428:2: rule__QualifiedName__Group_1__1__Impl + { + pushFollow(FOLLOW_2); + rule__QualifiedName__Group_1__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__QualifiedName__Group_1__1" + + + // $ANTLR start "rule__QualifiedName__Group_1__1__Impl" + // InternalProblem.g:3434:1: rule__QualifiedName__Group_1__1__Impl : ( RULE_ID ) ; + public final void rule__QualifiedName__Group_1__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3438:1: ( ( RULE_ID ) ) + // InternalProblem.g:3439:1: ( RULE_ID ) + { + // InternalProblem.g:3439:1: ( RULE_ID ) + // InternalProblem.g:3440:2: RULE_ID + { + before(grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__QualifiedName__Group_1__1__Impl" + + + // $ANTLR start "rule__Problem__StatementsAssignment" + // InternalProblem.g:3450:1: rule__Problem__StatementsAssignment : ( ruleStatement ) ; + public final void rule__Problem__StatementsAssignment() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3454:1: ( ( ruleStatement ) ) + // InternalProblem.g:3455:2: ( ruleStatement ) + { + // InternalProblem.g:3455:2: ( ruleStatement ) + // InternalProblem.g:3456:3: ruleStatement + { + before(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); + pushFollow(FOLLOW_2); + ruleStatement(); + + state._fsp--; + + after(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Problem__StatementsAssignment" + + + // $ANTLR start "rule__ClassDeclaration__AbstractAssignment_0" + // InternalProblem.g:3465:1: rule__ClassDeclaration__AbstractAssignment_0 : ( ( 'abstract' ) ) ; + public final void rule__ClassDeclaration__AbstractAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3469:1: ( ( ( 'abstract' ) ) ) + // InternalProblem.g:3470:2: ( ( 'abstract' ) ) + { + // InternalProblem.g:3470:2: ( ( 'abstract' ) ) + // InternalProblem.g:3471:3: ( 'abstract' ) + { + before(grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); + // InternalProblem.g:3472:3: ( 'abstract' ) + // InternalProblem.g:3473:4: 'abstract' + { + before(grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); + match(input,35,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); + + } + + after(grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__AbstractAssignment_0" + + + // $ANTLR start "rule__ClassDeclaration__NameAssignment_2" + // InternalProblem.g:3484:1: rule__ClassDeclaration__NameAssignment_2 : ( RULE_ID ) ; + public final void rule__ClassDeclaration__NameAssignment_2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3488:1: ( ( RULE_ID ) ) + // InternalProblem.g:3489:2: ( RULE_ID ) + { + // InternalProblem.g:3489:2: ( RULE_ID ) + // InternalProblem.g:3490:3: RULE_ID + { + before(grammarAccess.getClassDeclarationAccess().getNameIDTerminalRuleCall_2_0()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getNameIDTerminalRuleCall_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__NameAssignment_2" + + + // $ANTLR start "rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0" + // InternalProblem.g:3499:1: rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0 : ( ( RULE_ID ) ) ; + public final void rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3503:1: ( ( ( RULE_ID ) ) ) + // InternalProblem.g:3504:2: ( ( RULE_ID ) ) + { + // InternalProblem.g:3504:2: ( ( RULE_ID ) ) + // InternalProblem.g:3505:3: ( RULE_ID ) + { + before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_0_0()); + // InternalProblem.g:3506:3: ( RULE_ID ) + // InternalProblem.g:3507:4: RULE_ID + { + before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_0_0_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_0_0_1()); + + } + + after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__SuperTypesAssignment_3_0_1_0" + + + // $ANTLR start "rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0" + // InternalProblem.g:3518:1: rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0 : ( ( RULE_ID ) ) ; + public final void rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3522:1: ( ( ( RULE_ID ) ) ) + // InternalProblem.g:3523:2: ( ( RULE_ID ) ) + { + // InternalProblem.g:3523:2: ( ( RULE_ID ) ) + // InternalProblem.g:3524:3: ( RULE_ID ) + { + before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0()); + // InternalProblem.g:3525:3: ( RULE_ID ) + // InternalProblem.g:3526:4: RULE_ID + { + before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_0_0_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_0_0_1()); + + } + + after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_0" + + + // $ANTLR start "rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1" + // InternalProblem.g:3537:1: rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1 : ( ( RULE_ID ) ) ; + public final void rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3541:1: ( ( ( RULE_ID ) ) ) + // InternalProblem.g:3542:2: ( ( RULE_ID ) ) + { + // InternalProblem.g:3542:2: ( ( RULE_ID ) ) + // InternalProblem.g:3543:3: ( RULE_ID ) + { + before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0()); + // InternalProblem.g:3544:3: ( RULE_ID ) + // InternalProblem.g:3545:4: RULE_ID + { + before(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_1_1_0_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_1_1_0_1()); + + } + + after(grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__SuperTypesAssignment_3_0_1_1_1_1_1" + + + // $ANTLR start "rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1" + // InternalProblem.g:3556:1: rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1 : ( ruleReferenceDeclaration ) ; + public final void rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3560:1: ( ( ruleReferenceDeclaration ) ) + // InternalProblem.g:3561:2: ( ruleReferenceDeclaration ) + { + // InternalProblem.g:3561:2: ( ruleReferenceDeclaration ) + // InternalProblem.g:3562:3: ruleReferenceDeclaration + { + before(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0()); + pushFollow(FOLLOW_2); + ruleReferenceDeclaration(); + + state._fsp--; + + after(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__ReferenceDeclarationsAssignment_3_1" + + + // $ANTLR start "rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1" + // InternalProblem.g:3571:1: rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1 : ( ruleReferenceDeclaration ) ; + public final void rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3575:1: ( ( ruleReferenceDeclaration ) ) + // InternalProblem.g:3576:2: ( ruleReferenceDeclaration ) + { + // InternalProblem.g:3576:2: ( ruleReferenceDeclaration ) + // InternalProblem.g:3577:3: ruleReferenceDeclaration + { + before(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0()); + pushFollow(FOLLOW_2); + ruleReferenceDeclaration(); + + state._fsp--; + + after(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ClassDeclaration__ReferenceDeclarationsAssignment_4_1" + + + // $ANTLR start "rule__ReferenceDeclaration__ContainmentAssignment_0_0" + // InternalProblem.g:3586:1: rule__ReferenceDeclaration__ContainmentAssignment_0_0 : ( ( 'contains' ) ) ; + public final void rule__ReferenceDeclaration__ContainmentAssignment_0_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3590:1: ( ( ( 'contains' ) ) ) + // InternalProblem.g:3591:2: ( ( 'contains' ) ) + { + // InternalProblem.g:3591:2: ( ( 'contains' ) ) + // InternalProblem.g:3592:3: ( 'contains' ) + { + before(grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); + // InternalProblem.g:3593:3: ( 'contains' ) + // InternalProblem.g:3594:4: 'contains' + { + before(grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); + match(input,36,FOLLOW_2); + after(grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); + + } + + after(grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__ContainmentAssignment_0_0" + + + // $ANTLR start "rule__ReferenceDeclaration__ReferenceTypeAssignment_1" + // InternalProblem.g:3605:1: rule__ReferenceDeclaration__ReferenceTypeAssignment_1 : ( ( RULE_ID ) ) ; + public final void rule__ReferenceDeclaration__ReferenceTypeAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3609:1: ( ( ( RULE_ID ) ) ) + // InternalProblem.g:3610:2: ( ( RULE_ID ) ) + { + // InternalProblem.g:3610:2: ( ( RULE_ID ) ) + // InternalProblem.g:3611:3: ( RULE_ID ) + { + before(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationCrossReference_1_0()); + // InternalProblem.g:3612:3: ( RULE_ID ) + // InternalProblem.g:3613:4: RULE_ID + { + before(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationIDTerminalRuleCall_1_0_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationIDTerminalRuleCall_1_0_1()); + + } + + after(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationCrossReference_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__ReferenceTypeAssignment_1" + + + // $ANTLR start "rule__ReferenceDeclaration__MultiplicityAssignment_3" + // InternalProblem.g:3624:1: rule__ReferenceDeclaration__MultiplicityAssignment_3 : ( ruleMultiplicity ) ; + public final void rule__ReferenceDeclaration__MultiplicityAssignment_3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3628:1: ( ( ruleMultiplicity ) ) + // InternalProblem.g:3629:2: ( ruleMultiplicity ) + { + // InternalProblem.g:3629:2: ( ruleMultiplicity ) + // InternalProblem.g:3630:3: ruleMultiplicity + { + before(grammarAccess.getReferenceDeclarationAccess().getMultiplicityMultiplicityParserRuleCall_3_0()); + pushFollow(FOLLOW_2); + ruleMultiplicity(); + + state._fsp--; + + after(grammarAccess.getReferenceDeclarationAccess().getMultiplicityMultiplicityParserRuleCall_3_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__MultiplicityAssignment_3" + + + // $ANTLR start "rule__ReferenceDeclaration__NameAssignment_5" + // InternalProblem.g:3639:1: rule__ReferenceDeclaration__NameAssignment_5 : ( RULE_ID ) ; + public final void rule__ReferenceDeclaration__NameAssignment_5() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3643:1: ( ( RULE_ID ) ) + // InternalProblem.g:3644:2: ( RULE_ID ) + { + // InternalProblem.g:3644:2: ( RULE_ID ) + // InternalProblem.g:3645:3: RULE_ID + { + before(grammarAccess.getReferenceDeclarationAccess().getNameIDTerminalRuleCall_5_0()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getReferenceDeclarationAccess().getNameIDTerminalRuleCall_5_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__NameAssignment_5" + + + // $ANTLR start "rule__ReferenceDeclaration__OppositeAssignment_6_1" + // InternalProblem.g:3654:1: rule__ReferenceDeclaration__OppositeAssignment_6_1 : ( ( ruleQualifiedName ) ) ; + public final void rule__ReferenceDeclaration__OppositeAssignment_6_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3658:1: ( ( ( ruleQualifiedName ) ) ) + // InternalProblem.g:3659:2: ( ( ruleQualifiedName ) ) + { + // InternalProblem.g:3659:2: ( ( ruleQualifiedName ) ) + // InternalProblem.g:3660:3: ( ruleQualifiedName ) + { + before(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationCrossReference_6_1_0()); + // InternalProblem.g:3661:3: ( ruleQualifiedName ) + // InternalProblem.g:3662:4: ruleQualifiedName + { + before(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationQualifiedNameParserRuleCall_6_1_0_1()); + pushFollow(FOLLOW_2); + ruleQualifiedName(); + + state._fsp--; + + after(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationQualifiedNameParserRuleCall_6_1_0_1()); + + } + + after(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationCrossReference_6_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ReferenceDeclaration__OppositeAssignment_6_1" + + + // $ANTLR start "rule__PredicateDefinition__ErrorAssignment_0_0_0" + // InternalProblem.g:3673:1: rule__PredicateDefinition__ErrorAssignment_0_0_0 : ( ( 'error' ) ) ; + public final void rule__PredicateDefinition__ErrorAssignment_0_0_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3677:1: ( ( ( 'error' ) ) ) + // InternalProblem.g:3678:2: ( ( 'error' ) ) + { + // InternalProblem.g:3678:2: ( ( 'error' ) ) + // InternalProblem.g:3679:3: ( 'error' ) + { + before(grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); + // InternalProblem.g:3680:3: ( 'error' ) + // InternalProblem.g:3681:4: 'error' + { + before(grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); + match(input,37,FOLLOW_2); + after(grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); + + } + + after(grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__ErrorAssignment_0_0_0" + + + // $ANTLR start "rule__PredicateDefinition__NameAssignment_1" + // InternalProblem.g:3692:1: rule__PredicateDefinition__NameAssignment_1 : ( RULE_ID ) ; + public final void rule__PredicateDefinition__NameAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3696:1: ( ( RULE_ID ) ) + // InternalProblem.g:3697:2: ( RULE_ID ) + { + // InternalProblem.g:3697:2: ( RULE_ID ) + // InternalProblem.g:3698:3: RULE_ID + { + before(grammarAccess.getPredicateDefinitionAccess().getNameIDTerminalRuleCall_1_0()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getPredicateDefinitionAccess().getNameIDTerminalRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__NameAssignment_1" + + + // $ANTLR start "rule__PredicateDefinition__ParametersAssignment_3_0" + // InternalProblem.g:3707:1: rule__PredicateDefinition__ParametersAssignment_3_0 : ( ruleParameter ) ; + public final void rule__PredicateDefinition__ParametersAssignment_3_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3711:1: ( ( ruleParameter ) ) + // InternalProblem.g:3712:2: ( ruleParameter ) + { + // InternalProblem.g:3712:2: ( ruleParameter ) + // InternalProblem.g:3713:3: ruleParameter + { + before(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_0_0()); + pushFollow(FOLLOW_2); + ruleParameter(); + + state._fsp--; + + after(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__ParametersAssignment_3_0" + + + // $ANTLR start "rule__PredicateDefinition__ParametersAssignment_3_1_1" + // InternalProblem.g:3722:1: rule__PredicateDefinition__ParametersAssignment_3_1_1 : ( ruleParameter ) ; + public final void rule__PredicateDefinition__ParametersAssignment_3_1_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3726:1: ( ( ruleParameter ) ) + // InternalProblem.g:3727:2: ( ruleParameter ) + { + // InternalProblem.g:3727:2: ( ruleParameter ) + // InternalProblem.g:3728:3: ruleParameter + { + before(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_1_1_0()); + pushFollow(FOLLOW_2); + ruleParameter(); + + state._fsp--; + + after(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_1_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__ParametersAssignment_3_1_1" + + + // $ANTLR start "rule__PredicateDefinition__BodiesAssignment_5_1" + // InternalProblem.g:3737:1: rule__PredicateDefinition__BodiesAssignment_5_1 : ( ruleConjunction ) ; + public final void rule__PredicateDefinition__BodiesAssignment_5_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3741:1: ( ( ruleConjunction ) ) + // InternalProblem.g:3742:2: ( ruleConjunction ) + { + // InternalProblem.g:3742:2: ( ruleConjunction ) + // InternalProblem.g:3743:3: ruleConjunction + { + before(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_1_0()); + pushFollow(FOLLOW_2); + ruleConjunction(); + + state._fsp--; + + after(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__BodiesAssignment_5_1" + + + // $ANTLR start "rule__PredicateDefinition__BodiesAssignment_5_2_1" + // InternalProblem.g:3752:1: rule__PredicateDefinition__BodiesAssignment_5_2_1 : ( ruleConjunction ) ; + public final void rule__PredicateDefinition__BodiesAssignment_5_2_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3756:1: ( ( ruleConjunction ) ) + // InternalProblem.g:3757:2: ( ruleConjunction ) + { + // InternalProblem.g:3757:2: ( ruleConjunction ) + // InternalProblem.g:3758:3: ruleConjunction + { + before(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_2_1_0()); + pushFollow(FOLLOW_2); + ruleConjunction(); + + state._fsp--; + + after(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_2_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__PredicateDefinition__BodiesAssignment_5_2_1" + + + // $ANTLR start "rule__Parameter__ParameterTypeAssignment_0" + // InternalProblem.g:3767:1: rule__Parameter__ParameterTypeAssignment_0 : ( ( RULE_ID ) ) ; + public final void rule__Parameter__ParameterTypeAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3771:1: ( ( ( RULE_ID ) ) ) + // InternalProblem.g:3772:2: ( ( RULE_ID ) ) + { + // InternalProblem.g:3772:2: ( ( RULE_ID ) ) + // InternalProblem.g:3773:3: ( RULE_ID ) + { + before(grammarAccess.getParameterAccess().getParameterTypeClassDeclarationCrossReference_0_0()); + // InternalProblem.g:3774:3: ( RULE_ID ) + // InternalProblem.g:3775:4: RULE_ID + { + before(grammarAccess.getParameterAccess().getParameterTypeClassDeclarationIDTerminalRuleCall_0_0_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getParameterAccess().getParameterTypeClassDeclarationIDTerminalRuleCall_0_0_1()); + + } + + after(grammarAccess.getParameterAccess().getParameterTypeClassDeclarationCrossReference_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__ParameterTypeAssignment_0" + + + // $ANTLR start "rule__Parameter__NameAssignment_1" + // InternalProblem.g:3786:1: rule__Parameter__NameAssignment_1 : ( RULE_ID ) ; + public final void rule__Parameter__NameAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3790:1: ( ( RULE_ID ) ) + // InternalProblem.g:3791:2: ( RULE_ID ) + { + // InternalProblem.g:3791:2: ( RULE_ID ) + // InternalProblem.g:3792:3: RULE_ID + { + before(grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_1_0()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__NameAssignment_1" + + + // $ANTLR start "rule__Conjunction__LiteralsAssignment_0" + // InternalProblem.g:3801:1: rule__Conjunction__LiteralsAssignment_0 : ( ruleLiteral ) ; + public final void rule__Conjunction__LiteralsAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3805:1: ( ( ruleLiteral ) ) + // InternalProblem.g:3806:2: ( ruleLiteral ) + { + // InternalProblem.g:3806:2: ( ruleLiteral ) + // InternalProblem.g:3807:3: ruleLiteral + { + before(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_0_0()); + pushFollow(FOLLOW_2); + ruleLiteral(); + + state._fsp--; + + after(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Conjunction__LiteralsAssignment_0" + + + // $ANTLR start "rule__Conjunction__LiteralsAssignment_1_1" + // InternalProblem.g:3816:1: rule__Conjunction__LiteralsAssignment_1_1 : ( ruleLiteral ) ; + public final void rule__Conjunction__LiteralsAssignment_1_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3820:1: ( ( ruleLiteral ) ) + // InternalProblem.g:3821:2: ( ruleLiteral ) + { + // InternalProblem.g:3821:2: ( ruleLiteral ) + // InternalProblem.g:3822:3: ruleLiteral + { + before(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_1_1_0()); + pushFollow(FOLLOW_2); + ruleLiteral(); + + state._fsp--; + + after(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_1_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Conjunction__LiteralsAssignment_1_1" + + + // $ANTLR start "rule__NegativeLiteral__AtomAssignment_1" + // InternalProblem.g:3831:1: rule__NegativeLiteral__AtomAssignment_1 : ( ruleAtom ) ; + public final void rule__NegativeLiteral__AtomAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3835:1: ( ( ruleAtom ) ) + // InternalProblem.g:3836:2: ( ruleAtom ) + { + // InternalProblem.g:3836:2: ( ruleAtom ) + // InternalProblem.g:3837:3: ruleAtom + { + before(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0()); + pushFollow(FOLLOW_2); + ruleAtom(); + + state._fsp--; + + after(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__NegativeLiteral__AtomAssignment_1" + + + // $ANTLR start "rule__Atom__RelationAssignment_0" + // InternalProblem.g:3846:1: rule__Atom__RelationAssignment_0 : ( ( ruleQualifiedName ) ) ; + public final void rule__Atom__RelationAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3850:1: ( ( ( ruleQualifiedName ) ) ) + // InternalProblem.g:3851:2: ( ( ruleQualifiedName ) ) + { + // InternalProblem.g:3851:2: ( ( ruleQualifiedName ) ) + // InternalProblem.g:3852:3: ( ruleQualifiedName ) + { + before(grammarAccess.getAtomAccess().getRelationRelationCrossReference_0_0()); + // InternalProblem.g:3853:3: ( ruleQualifiedName ) + // InternalProblem.g:3854:4: ruleQualifiedName + { + before(grammarAccess.getAtomAccess().getRelationRelationQualifiedNameParserRuleCall_0_0_1()); + pushFollow(FOLLOW_2); + ruleQualifiedName(); + + state._fsp--; + + after(grammarAccess.getAtomAccess().getRelationRelationQualifiedNameParserRuleCall_0_0_1()); + + } + + after(grammarAccess.getAtomAccess().getRelationRelationCrossReference_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__RelationAssignment_0" + + + // $ANTLR start "rule__Atom__TransitiveClosureAssignment_1" + // InternalProblem.g:3865:1: rule__Atom__TransitiveClosureAssignment_1 : ( ( '+' ) ) ; + public final void rule__Atom__TransitiveClosureAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3869:1: ( ( ( '+' ) ) ) + // InternalProblem.g:3870:2: ( ( '+' ) ) + { + // InternalProblem.g:3870:2: ( ( '+' ) ) + // InternalProblem.g:3871:3: ( '+' ) + { + before(grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); + // InternalProblem.g:3872:3: ( '+' ) + // InternalProblem.g:3873:4: '+' + { + before(grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); + match(input,38,FOLLOW_2); + after(grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); + + } + + after(grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__TransitiveClosureAssignment_1" + + + // $ANTLR start "rule__Atom__ArgumentsAssignment_3_0" + // InternalProblem.g:3884:1: rule__Atom__ArgumentsAssignment_3_0 : ( ( RULE_ID ) ) ; + public final void rule__Atom__ArgumentsAssignment_3_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3888:1: ( ( ( RULE_ID ) ) ) + // InternalProblem.g:3889:2: ( ( RULE_ID ) ) + { + // InternalProblem.g:3889:2: ( ( RULE_ID ) ) + // InternalProblem.g:3890:3: ( RULE_ID ) + { + before(grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_0_0()); + // InternalProblem.g:3891:3: ( RULE_ID ) + // InternalProblem.g:3892:4: RULE_ID + { + before(grammarAccess.getAtomAccess().getArgumentsVariableIDTerminalRuleCall_3_0_0_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getAtomAccess().getArgumentsVariableIDTerminalRuleCall_3_0_0_1()); + + } + + after(grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__ArgumentsAssignment_3_0" + + + // $ANTLR start "rule__Atom__ArgumentsAssignment_3_1_1" + // InternalProblem.g:3903:1: rule__Atom__ArgumentsAssignment_3_1_1 : ( ( RULE_ID ) ) ; + public final void rule__Atom__ArgumentsAssignment_3_1_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3907:1: ( ( ( RULE_ID ) ) ) + // InternalProblem.g:3908:2: ( ( RULE_ID ) ) + { + // InternalProblem.g:3908:2: ( ( RULE_ID ) ) + // InternalProblem.g:3909:3: ( RULE_ID ) + { + before(grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_1_1_0()); + // InternalProblem.g:3910:3: ( RULE_ID ) + // InternalProblem.g:3911:4: RULE_ID + { + before(grammarAccess.getAtomAccess().getArgumentsVariableIDTerminalRuleCall_3_1_1_0_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getAtomAccess().getArgumentsVariableIDTerminalRuleCall_3_1_1_0_1()); + + } + + after(grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_1_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Atom__ArgumentsAssignment_3_1_1" + + + // $ANTLR start "rule__Assertion__RelationAssignment_0_0_0" + // InternalProblem.g:3922:1: rule__Assertion__RelationAssignment_0_0_0 : ( ( ruleQualifiedName ) ) ; + public final void rule__Assertion__RelationAssignment_0_0_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3926:1: ( ( ( ruleQualifiedName ) ) ) + // InternalProblem.g:3927:2: ( ( ruleQualifiedName ) ) + { + // InternalProblem.g:3927:2: ( ( ruleQualifiedName ) ) + // InternalProblem.g:3928:3: ( ruleQualifiedName ) + { + before(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_0_0_0()); + // InternalProblem.g:3929:3: ( ruleQualifiedName ) + // InternalProblem.g:3930:4: ruleQualifiedName + { + before(grammarAccess.getAssertionAccess().getRelationRelationQualifiedNameParserRuleCall_0_0_0_0_1()); + pushFollow(FOLLOW_2); + ruleQualifiedName(); + + state._fsp--; + + after(grammarAccess.getAssertionAccess().getRelationRelationQualifiedNameParserRuleCall_0_0_0_0_1()); + + } + + after(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_0_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__RelationAssignment_0_0_0" + + + // $ANTLR start "rule__Assertion__ArgumentsAssignment_0_0_2_0" + // InternalProblem.g:3941:1: rule__Assertion__ArgumentsAssignment_0_0_2_0 : ( ( ruleQualifiedName ) ) ; + public final void rule__Assertion__ArgumentsAssignment_0_0_2_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3945:1: ( ( ( ruleQualifiedName ) ) ) + // InternalProblem.g:3946:2: ( ( ruleQualifiedName ) ) + { + // InternalProblem.g:3946:2: ( ( ruleQualifiedName ) ) + // InternalProblem.g:3947:3: ( ruleQualifiedName ) + { + before(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_0_0()); + // InternalProblem.g:3948:3: ( ruleQualifiedName ) + // InternalProblem.g:3949:4: ruleQualifiedName + { + before(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_0_2_0_0_1()); + pushFollow(FOLLOW_2); + ruleQualifiedName(); + + state._fsp--; + + after(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_0_2_0_0_1()); + + } + + after(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__ArgumentsAssignment_0_0_2_0" + + + // $ANTLR start "rule__Assertion__ArgumentsAssignment_0_0_2_1_1" + // InternalProblem.g:3960:1: rule__Assertion__ArgumentsAssignment_0_0_2_1_1 : ( ( ruleQualifiedName ) ) ; + public final void rule__Assertion__ArgumentsAssignment_0_0_2_1_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3964:1: ( ( ( ruleQualifiedName ) ) ) + // InternalProblem.g:3965:2: ( ( ruleQualifiedName ) ) + { + // InternalProblem.g:3965:2: ( ( ruleQualifiedName ) ) + // InternalProblem.g:3966:3: ( ruleQualifiedName ) + { + before(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_1_1_0()); + // InternalProblem.g:3967:3: ( ruleQualifiedName ) + // InternalProblem.g:3968:4: ruleQualifiedName + { + before(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_0_2_1_1_0_1()); + pushFollow(FOLLOW_2); + ruleQualifiedName(); + + state._fsp--; + + after(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_0_2_1_1_0_1()); + + } + + after(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_1_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__ArgumentsAssignment_0_0_2_1_1" + + + // $ANTLR start "rule__Assertion__ValueAssignment_0_0_5" + // InternalProblem.g:3979:1: rule__Assertion__ValueAssignment_0_0_5 : ( ruleLogicValue ) ; + public final void rule__Assertion__ValueAssignment_0_0_5() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3983:1: ( ( ruleLogicValue ) ) + // InternalProblem.g:3984:2: ( ruleLogicValue ) + { + // InternalProblem.g:3984:2: ( ruleLogicValue ) + // InternalProblem.g:3985:3: ruleLogicValue + { + before(grammarAccess.getAssertionAccess().getValueLogicValueEnumRuleCall_0_0_5_0()); + pushFollow(FOLLOW_2); + ruleLogicValue(); + + state._fsp--; + + after(grammarAccess.getAssertionAccess().getValueLogicValueEnumRuleCall_0_0_5_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__ValueAssignment_0_0_5" + + + // $ANTLR start "rule__Assertion__ValueAssignment_0_1_0" + // InternalProblem.g:3994:1: rule__Assertion__ValueAssignment_0_1_0 : ( ruleShortLogicValue ) ; + public final void rule__Assertion__ValueAssignment_0_1_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:3998:1: ( ( ruleShortLogicValue ) ) + // InternalProblem.g:3999:2: ( ruleShortLogicValue ) + { + // InternalProblem.g:3999:2: ( ruleShortLogicValue ) + // InternalProblem.g:4000:3: ruleShortLogicValue + { + before(grammarAccess.getAssertionAccess().getValueShortLogicValueEnumRuleCall_0_1_0_0()); + pushFollow(FOLLOW_2); + ruleShortLogicValue(); + + state._fsp--; + + after(grammarAccess.getAssertionAccess().getValueShortLogicValueEnumRuleCall_0_1_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__ValueAssignment_0_1_0" + + + // $ANTLR start "rule__Assertion__RelationAssignment_0_1_1" + // InternalProblem.g:4009:1: rule__Assertion__RelationAssignment_0_1_1 : ( ( ruleQualifiedName ) ) ; + public final void rule__Assertion__RelationAssignment_0_1_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4013:1: ( ( ( ruleQualifiedName ) ) ) + // InternalProblem.g:4014:2: ( ( ruleQualifiedName ) ) + { + // InternalProblem.g:4014:2: ( ( ruleQualifiedName ) ) + // InternalProblem.g:4015:3: ( ruleQualifiedName ) + { + before(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_1_1_0()); + // InternalProblem.g:4016:3: ( ruleQualifiedName ) + // InternalProblem.g:4017:4: ruleQualifiedName + { + before(grammarAccess.getAssertionAccess().getRelationRelationQualifiedNameParserRuleCall_0_1_1_0_1()); + pushFollow(FOLLOW_2); + ruleQualifiedName(); + + state._fsp--; + + after(grammarAccess.getAssertionAccess().getRelationRelationQualifiedNameParserRuleCall_0_1_1_0_1()); + + } + + after(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_1_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__RelationAssignment_0_1_1" + + + // $ANTLR start "rule__Assertion__ArgumentsAssignment_0_1_3_0" + // InternalProblem.g:4028:1: rule__Assertion__ArgumentsAssignment_0_1_3_0 : ( ( ruleQualifiedName ) ) ; + public final void rule__Assertion__ArgumentsAssignment_0_1_3_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4032:1: ( ( ( ruleQualifiedName ) ) ) + // InternalProblem.g:4033:2: ( ( ruleQualifiedName ) ) + { + // InternalProblem.g:4033:2: ( ( ruleQualifiedName ) ) + // InternalProblem.g:4034:3: ( ruleQualifiedName ) + { + before(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_0_0()); + // InternalProblem.g:4035:3: ( ruleQualifiedName ) + // InternalProblem.g:4036:4: ruleQualifiedName + { + before(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_1_3_0_0_1()); + pushFollow(FOLLOW_2); + ruleQualifiedName(); + + state._fsp--; + + after(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_1_3_0_0_1()); + + } + + after(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__ArgumentsAssignment_0_1_3_0" + + + // $ANTLR start "rule__Assertion__ArgumentsAssignment_0_1_3_1_1" + // InternalProblem.g:4047:1: rule__Assertion__ArgumentsAssignment_0_1_3_1_1 : ( ( ruleQualifiedName ) ) ; + public final void rule__Assertion__ArgumentsAssignment_0_1_3_1_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4051:1: ( ( ( ruleQualifiedName ) ) ) + // InternalProblem.g:4052:2: ( ( ruleQualifiedName ) ) + { + // InternalProblem.g:4052:2: ( ( ruleQualifiedName ) ) + // InternalProblem.g:4053:3: ( ruleQualifiedName ) + { + before(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_1_1_0()); + // InternalProblem.g:4054:3: ( ruleQualifiedName ) + // InternalProblem.g:4055:4: ruleQualifiedName + { + before(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_1_3_1_1_0_1()); + pushFollow(FOLLOW_2); + ruleQualifiedName(); + + state._fsp--; + + after(grammarAccess.getAssertionAccess().getArgumentsNodeQualifiedNameParserRuleCall_0_1_3_1_1_0_1()); + + } + + after(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_1_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Assertion__ArgumentsAssignment_0_1_3_1_1" + + + // $ANTLR start "rule__ScopeDeclaration__TypeScopesAssignment_1" + // InternalProblem.g:4066:1: rule__ScopeDeclaration__TypeScopesAssignment_1 : ( ruleTypeScope ) ; + public final void rule__ScopeDeclaration__TypeScopesAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4070:1: ( ( ruleTypeScope ) ) + // InternalProblem.g:4071:2: ( ruleTypeScope ) + { + // InternalProblem.g:4071:2: ( ruleTypeScope ) + // InternalProblem.g:4072:3: ruleTypeScope + { + before(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_1_0()); + pushFollow(FOLLOW_2); + ruleTypeScope(); + + state._fsp--; + + after(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__TypeScopesAssignment_1" + + + // $ANTLR start "rule__ScopeDeclaration__TypeScopesAssignment_2_1" + // InternalProblem.g:4081:1: rule__ScopeDeclaration__TypeScopesAssignment_2_1 : ( ruleTypeScope ) ; + public final void rule__ScopeDeclaration__TypeScopesAssignment_2_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4085:1: ( ( ruleTypeScope ) ) + // InternalProblem.g:4086:2: ( ruleTypeScope ) + { + // InternalProblem.g:4086:2: ( ruleTypeScope ) + // InternalProblem.g:4087:3: ruleTypeScope + { + before(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_2_1_0()); + pushFollow(FOLLOW_2); + ruleTypeScope(); + + state._fsp--; + + after(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_2_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ScopeDeclaration__TypeScopesAssignment_2_1" + + + // $ANTLR start "rule__TypeScope__TargetTypeAssignment_0" + // InternalProblem.g:4096:1: rule__TypeScope__TargetTypeAssignment_0 : ( ( RULE_ID ) ) ; + public final void rule__TypeScope__TargetTypeAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4100:1: ( ( ( RULE_ID ) ) ) + // InternalProblem.g:4101:2: ( ( RULE_ID ) ) + { + // InternalProblem.g:4101:2: ( ( RULE_ID ) ) + // InternalProblem.g:4102:3: ( RULE_ID ) + { + before(grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationCrossReference_0_0()); + // InternalProblem.g:4103:3: ( RULE_ID ) + // InternalProblem.g:4104:4: RULE_ID + { + before(grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationIDTerminalRuleCall_0_0_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationIDTerminalRuleCall_0_0_1()); + + } + + after(grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationCrossReference_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TypeScope__TargetTypeAssignment_0" + + + // $ANTLR start "rule__TypeScope__IncrementAssignment_1_0" + // InternalProblem.g:4115:1: rule__TypeScope__IncrementAssignment_1_0 : ( ( '+=' ) ) ; + public final void rule__TypeScope__IncrementAssignment_1_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4119:1: ( ( ( '+=' ) ) ) + // InternalProblem.g:4120:2: ( ( '+=' ) ) + { + // InternalProblem.g:4120:2: ( ( '+=' ) ) + // InternalProblem.g:4121:3: ( '+=' ) + { + before(grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); + // InternalProblem.g:4122:3: ( '+=' ) + // InternalProblem.g:4123:4: '+=' + { + before(grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); + match(input,39,FOLLOW_2); + after(grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); + + } + + after(grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TypeScope__IncrementAssignment_1_0" + + + // $ANTLR start "rule__TypeScope__MultiplicityAssignment_2" + // InternalProblem.g:4134:1: rule__TypeScope__MultiplicityAssignment_2 : ( ruleMultiplicity ) ; + public final void rule__TypeScope__MultiplicityAssignment_2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4138:1: ( ( ruleMultiplicity ) ) + // InternalProblem.g:4139:2: ( ruleMultiplicity ) + { + // InternalProblem.g:4139:2: ( ruleMultiplicity ) + // InternalProblem.g:4140:3: ruleMultiplicity + { + before(grammarAccess.getTypeScopeAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); + pushFollow(FOLLOW_2); + ruleMultiplicity(); + + state._fsp--; + + after(grammarAccess.getTypeScopeAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TypeScope__MultiplicityAssignment_2" + + + // $ANTLR start "rule__RangeMultiplicity__LowerBoundAssignment_0" + // InternalProblem.g:4149:1: rule__RangeMultiplicity__LowerBoundAssignment_0 : ( RULE_INT ) ; + public final void rule__RangeMultiplicity__LowerBoundAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4153:1: ( ( RULE_INT ) ) + // InternalProblem.g:4154:2: ( RULE_INT ) + { + // InternalProblem.g:4154:2: ( RULE_INT ) + // InternalProblem.g:4155:3: RULE_INT + { + before(grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0()); + match(input,RULE_INT,FOLLOW_2); + after(grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__RangeMultiplicity__LowerBoundAssignment_0" + + + // $ANTLR start "rule__RangeMultiplicity__UpperBoundAssignment_2" + // InternalProblem.g:4164:1: rule__RangeMultiplicity__UpperBoundAssignment_2 : ( ruleUpperBound ) ; + public final void rule__RangeMultiplicity__UpperBoundAssignment_2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4168:1: ( ( ruleUpperBound ) ) + // InternalProblem.g:4169:2: ( ruleUpperBound ) + { + // InternalProblem.g:4169:2: ( ruleUpperBound ) + // InternalProblem.g:4170:3: ruleUpperBound + { + before(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0()); + pushFollow(FOLLOW_2); + ruleUpperBound(); + + state._fsp--; + + after(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__RangeMultiplicity__UpperBoundAssignment_2" + + + // $ANTLR start "rule__ExactMultiplicity__ExactValueAssignment" + // InternalProblem.g:4179:1: rule__ExactMultiplicity__ExactValueAssignment : ( RULE_INT ) ; + public final void rule__ExactMultiplicity__ExactValueAssignment() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalProblem.g:4183:1: ( ( RULE_INT ) ) + // InternalProblem.g:4184:2: ( RULE_INT ) + { + // InternalProblem.g:4184:2: ( RULE_INT ) + // InternalProblem.g:4185:3: RULE_INT + { + before(grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0()); + match(input,RULE_INT,FOLLOW_2); + after(grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ExactMultiplicity__ExactValueAssignment" + + // Delegated rules + + + protected DFA8 dfa8 = new DFA8(this); + static final String dfa_1s = "\17\uffff"; + static final String dfa_2s = "\1\5\1\33\1\uffff\2\5\1\33\1\31\1\25\2\5\1\uffff\2\31\1\5\1\31"; + static final String dfa_3s = "\1\23\1\42\1\uffff\1\5\1\34\2\42\1\37\2\5\1\uffff\2\42\1\5\1\42"; + static final String dfa_4s = "\2\uffff\1\2\7\uffff\1\1\4\uffff"; + static final String dfa_5s = "\17\uffff}>"; + static final String[] dfa_6s = { + "\1\1\14\uffff\2\2", + "\1\4\6\uffff\1\3", + "", + "\1\5", + "\1\6\26\uffff\1\7", + "\1\4\6\uffff\1\3", + "\1\11\2\uffff\1\7\5\uffff\1\10", + "\1\2\11\uffff\1\12", + "\1\13", + "\1\14", + "", + "\1\11\2\uffff\1\7\5\uffff\1\10", + "\1\11\2\uffff\1\7\5\uffff\1\15", + "\1\16", + "\1\11\2\uffff\1\7\5\uffff\1\15" + }; + + static final short[] dfa_1 = DFA.unpackEncodedString(dfa_1s); + static final char[] dfa_2 = DFA.unpackEncodedStringToUnsignedChars(dfa_2s); + static final char[] dfa_3 = DFA.unpackEncodedStringToUnsignedChars(dfa_3s); + static final short[] dfa_4 = DFA.unpackEncodedString(dfa_4s); + static final short[] dfa_5 = DFA.unpackEncodedString(dfa_5s); + static final short[][] dfa_6 = unpackEncodedStringArray(dfa_6s); + + class DFA8 extends DFA { + + public DFA8(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 8; + this.eot = dfa_1; + this.eof = dfa_1; + this.min = dfa_2; + this.max = dfa_3; + this.accept = dfa_4; + this.special = dfa_5; + this.transition = dfa_6; + } + public String getDescription() { + return "672:1: rule__Assertion__Alternatives_0 : ( ( ( rule__Assertion__Group_0_0__0 ) ) | ( ( rule__Assertion__Group_0_1__0 ) ) );"; + } + } + + + public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x00000029001C1022L}); + public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000800100000L}); + public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000000020L}); + public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000001002600800L}); + public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000002000002L}); + public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000800020L}); + public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000001000020L}); + public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000002000000L}); + public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000001000400800L}); + public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000800000L}); + public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000000010L}); + public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000001000000L}); + public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000008000000L}); + public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000000010000020L}); + public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000020200000L}); + public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000000001000L}); + public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x0000000000040020L}); + public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000040000000L}); + public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x0000000040000002L}); + public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000004008000000L}); + public static final BitSet FOLLOW_24 = new BitSet(new long[]{0x0000000000200000L}); + public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000000000038000L}); + public static final BitSet FOLLOW_27 = new BitSet(new long[]{0x00000000000C0020L}); + public static final BitSet FOLLOW_28 = new BitSet(new long[]{0x0000000002200000L}); + public static final BitSet FOLLOW_29 = new BitSet(new long[]{0x0000008000002000L}); + public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x0000000200000000L}); + public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000000000004010L}); + public static final BitSet FOLLOW_32 = new BitSet(new long[]{0x0000000400000000L}); + public static final BitSet FOLLOW_33 = new BitSet(new long[]{0x0000000400000002L}); + +} \ No newline at end of file diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.classpath b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.classpath new file mode 100644 index 00000000..7d85f131 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.classpath @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.gitignore b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.gitignore new file mode 100644 index 00000000..4a95481e --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/build/ diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.project b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.project new file mode 100644 index 00000000..45632ed8 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/.project @@ -0,0 +1,41 @@ + + + org.eclipse.viatra.solver.language.model + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.sirius.nature.modelingproject + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.buildship.core.gradleprojectnature + org.eclipse.pde.PluginNature + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/META-INF/MANIFEST.MF b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/META-INF/MANIFEST.MF new file mode 100644 index 00000000..e1ec0cd4 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.viatra.solver.language.model;singleton:=true +Automatic-Module-Name: org.eclipse.viatra.solver.language.model +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-11 +Export-Package: org.eclipse.viatra.solver.language.model.problem, + org.eclipse.viatra.solver.language.model.problem.impl, + org.eclipse.viatra.solver.language.model.problem.util +Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.core.runtime +Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/build.gradle b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/build.gradle new file mode 100644 index 00000000..2f9e3257 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/build.gradle @@ -0,0 +1,9 @@ +dependencies { + compile 'org.eclipse.emf:org.eclipse.emf.ecore' +} + +sourceSets { + main { + java.srcDirs += ['src/main/emf-gen'] + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/build.properties b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/build.properties new file mode 100644 index 00000000..97e1d1b5 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/build.properties @@ -0,0 +1,10 @@ +# + +bin.includes = .,\ + src/main/resources/model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/emf-gen/,\ + src/main/resources/ diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/plugin.properties b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/plugin.properties new file mode 100644 index 00000000..9050bf16 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = org.eclipse.viatra.solver.language.model +providerName = www.example.org diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/plugin.xml b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/plugin.xml new file mode 100644 index 00000000..af07e296 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/plugin.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/problem.aird b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/problem.aird new file mode 100644 index 00000000..7a8e3134 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/problem.aird @@ -0,0 +1,1756 @@ + + + + src/main/resources/model/problem.ecore + src/main/resources/model/problem.genmodel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + italic + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + italic + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Assertion.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Assertion.java new file mode 100644 index 00000000..758212fb --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Assertion.java @@ -0,0 +1,85 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Assertion'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.Assertion#getRelation Relation}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.Assertion#getArguments Arguments}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.Assertion#getValue Value}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getAssertion() + * @model + * @generated + */ +public interface Assertion extends Statement { + /** + * Returns the value of the 'Relation' reference. + * + * + * @return the value of the 'Relation' reference. + * @see #setRelation(Relation) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getAssertion_Relation() + * @model + * @generated + */ + Relation getRelation(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.Assertion#getRelation Relation}' reference. + * + * + * @param value the new value of the 'Relation' reference. + * @see #getRelation() + * @generated + */ + void setRelation(Relation value); + + /** + * Returns the value of the 'Arguments' reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.Node}. + * + * + * @return the value of the 'Arguments' reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getAssertion_Arguments() + * @model + * @generated + */ + EList getArguments(); + + /** + * Returns the value of the 'Value' attribute. + * The literals are from the enumeration {@link org.eclipse.viatra.solver.language.model.problem.LogicValue}. + * + * + * @return the value of the 'Value' attribute. + * @see org.eclipse.viatra.solver.language.model.problem.LogicValue + * @see #setValue(LogicValue) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getAssertion_Value() + * @model + * @generated + */ + LogicValue getValue(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.Assertion#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see org.eclipse.viatra.solver.language.model.problem.LogicValue + * @see #getValue() + * @generated + */ + void setValue(LogicValue value); + +} // Assertion diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Atom.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Atom.java new file mode 100644 index 00000000..bee08d8d --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Atom.java @@ -0,0 +1,82 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Atom'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.Atom#getRelation Relation}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.Atom#getArguments Arguments}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.Atom#isTransitiveClosure Transitive Closure}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getAtom() + * @model + * @generated + */ +public interface Atom extends Literal { + /** + * Returns the value of the 'Relation' reference. + * + * + * @return the value of the 'Relation' reference. + * @see #setRelation(Relation) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getAtom_Relation() + * @model + * @generated + */ + Relation getRelation(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.Atom#getRelation Relation}' reference. + * + * + * @param value the new value of the 'Relation' reference. + * @see #getRelation() + * @generated + */ + void setRelation(Relation value); + + /** + * Returns the value of the 'Arguments' reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.Variable}. + * + * + * @return the value of the 'Arguments' reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getAtom_Arguments() + * @model + * @generated + */ + EList getArguments(); + + /** + * Returns the value of the 'Transitive Closure' attribute. + * + * + * @return the value of the 'Transitive Closure' attribute. + * @see #setTransitiveClosure(boolean) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getAtom_TransitiveClosure() + * @model + * @generated + */ + boolean isTransitiveClosure(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.Atom#isTransitiveClosure Transitive Closure}' attribute. + * + * + * @param value the new value of the 'Transitive Closure' attribute. + * @see #isTransitiveClosure() + * @generated + */ + void setTransitiveClosure(boolean value); + +} // Atom diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ClassDeclaration.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ClassDeclaration.java new file mode 100644 index 00000000..7212d006 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ClassDeclaration.java @@ -0,0 +1,72 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Class Declaration'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.ClassDeclaration#isAbstract Abstract}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.ClassDeclaration#getSuperTypes Super Types}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.ClassDeclaration#getReferenceDeclarations Reference Declarations}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getClassDeclaration() + * @model + * @generated + */ +public interface ClassDeclaration extends Relation, Statement { + /** + * Returns the value of the 'Abstract' attribute. + * + * + * @return the value of the 'Abstract' attribute. + * @see #setAbstract(boolean) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getClassDeclaration_Abstract() + * @model + * @generated + */ + boolean isAbstract(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.ClassDeclaration#isAbstract Abstract}' attribute. + * + * + * @param value the new value of the 'Abstract' attribute. + * @see #isAbstract() + * @generated + */ + void setAbstract(boolean value); + + /** + * Returns the value of the 'Super Types' reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.ClassDeclaration}. + * + * + * @return the value of the 'Super Types' reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getClassDeclaration_SuperTypes() + * @model + * @generated + */ + EList getSuperTypes(); + + /** + * Returns the value of the 'Reference Declarations' containment reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration}. + * + * + * @return the value of the 'Reference Declarations' containment reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getClassDeclaration_ReferenceDeclarations() + * @model containment="true" + * @generated + */ + EList getReferenceDeclarations(); + +} // ClassDeclaration diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Conjunction.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Conjunction.java new file mode 100644 index 00000000..df8e0cef --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Conjunction.java @@ -0,0 +1,36 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Conjunction'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.Conjunction#getLiterals Literals}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getConjunction() + * @model + * @generated + */ +public interface Conjunction extends ExistentialQuantifier { + /** + * Returns the value of the 'Literals' containment reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.Literal}. + * + * + * @return the value of the 'Literals' containment reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getConjunction_Literals() + * @model containment="true" + * @generated + */ + EList getLiterals(); + +} // Conjunction diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ExactMultiplicity.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ExactMultiplicity.java new file mode 100644 index 00000000..413c2ad1 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ExactMultiplicity.java @@ -0,0 +1,45 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +/** + * + * A representation of the model object 'Exact Multiplicity'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity#getExactValue Exact Value}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getExactMultiplicity() + * @model + * @generated + */ +public interface ExactMultiplicity extends Multiplicity { + /** + * Returns the value of the 'Exact Value' attribute. + * The default value is "1". + * + * + * @return the value of the 'Exact Value' attribute. + * @see #setExactValue(int) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getExactMultiplicity_ExactValue() + * @model default="1" + * @generated + */ + int getExactValue(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity#getExactValue Exact Value}' attribute. + * + * + * @param value the new value of the 'Exact Value' attribute. + * @see #getExactValue() + * @generated + */ + void setExactValue(int value); + +} // ExactMultiplicity diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ExistentialQuantifier.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ExistentialQuantifier.java new file mode 100644 index 00000000..1a1d5f8a --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ExistentialQuantifier.java @@ -0,0 +1,38 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Existential Quantifier'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier#getImplicitVariables Implicit Variables}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getExistentialQuantifier() + * @model interface="true" abstract="true" + * @generated + */ +public interface ExistentialQuantifier extends EObject { + /** + * Returns the value of the 'Implicit Variables' containment reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.ImplicitVariable}. + * + * + * @return the value of the 'Implicit Variables' containment reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getExistentialQuantifier_ImplicitVariables() + * @model containment="true" + * @generated + */ + EList getImplicitVariables(); + +} // ExistentialQuantifier diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ImplicitVariable.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ImplicitVariable.java new file mode 100644 index 00000000..6d1793c6 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ImplicitVariable.java @@ -0,0 +1,16 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +/** + * + * A representation of the model object 'Implicit Variable'. + * + * + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getImplicitVariable() + * @model + * @generated + */ +public interface ImplicitVariable extends Variable { +} // ImplicitVariable diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Literal.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Literal.java new file mode 100644 index 00000000..acccf79b --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Literal.java @@ -0,0 +1,18 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Literal'. + * + * + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getLiteral() + * @model abstract="true" + * @generated + */ +public interface Literal extends EObject { +} // Literal diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/LogicValue.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/LogicValue.java new file mode 100644 index 00000000..2efbd25a --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/LogicValue.java @@ -0,0 +1,227 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Logic Value', + * and utility methods for working with them. + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getLogicValue() + * @model + * @generated + */ +public enum LogicValue implements Enumerator { + /** + * The 'TRUE' literal object. + * + * + * @see #TRUE_VALUE + * @generated + * @ordered + */ + TRUE(0, "TRUE", "TRUE"), + + /** + * The 'FALSE' literal object. + * + * + * @see #FALSE_VALUE + * @generated + * @ordered + */ + FALSE(1, "FALSE", "FALSE"), + + /** + * The 'UNKNOWN' literal object. + * + * + * @see #UNKNOWN_VALUE + * @generated + * @ordered + */ + UNKNOWN(2, "UNKNOWN", "UNKNOWN"); + + /** + * The 'TRUE' literal value. + * + * + * @see #TRUE + * @model + * @generated + * @ordered + */ + public static final int TRUE_VALUE = 0; + + /** + * The 'FALSE' literal value. + * + * + * @see #FALSE + * @model + * @generated + * @ordered + */ + public static final int FALSE_VALUE = 1; + + /** + * The 'UNKNOWN' literal value. + * + * + * @see #UNKNOWN + * @model + * @generated + * @ordered + */ + public static final int UNKNOWN_VALUE = 2; + + /** + * An array of all the 'Logic Value' enumerators. + * + * + * @generated + */ + private static final LogicValue[] VALUES_ARRAY = new LogicValue[] { TRUE, FALSE, UNKNOWN, }; + + /** + * A public read-only list of all the 'Logic Value' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Logic Value' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static LogicValue get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LogicValue result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Logic Value' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static LogicValue getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LogicValue result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Logic Value' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static LogicValue get(int value) { + switch (value) { + case TRUE_VALUE: + return TRUE; + case FALSE_VALUE: + return FALSE; + case UNKNOWN_VALUE: + return UNKNOWN; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private LogicValue(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //LogicValue diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Multiplicity.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Multiplicity.java new file mode 100644 index 00000000..d3d573fa --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Multiplicity.java @@ -0,0 +1,18 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Multiplicity'. + * + * + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getMultiplicity() + * @model abstract="true" + * @generated + */ +public interface Multiplicity extends EObject { +} // Multiplicity diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/NamedElement.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/NamedElement.java new file mode 100644 index 00000000..3302b041 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/NamedElement.java @@ -0,0 +1,46 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Named Element'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.NamedElement#getName Name}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getNamedElement() + * @model abstract="true" + * @generated + */ +public interface NamedElement extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getNamedElement_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.NamedElement#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // NamedElement diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/NegativeLiteral.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/NegativeLiteral.java new file mode 100644 index 00000000..ac3aa2b9 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/NegativeLiteral.java @@ -0,0 +1,44 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +/** + * + * A representation of the model object 'Negative Literal'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.NegativeLiteral#getAtom Atom}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getNegativeLiteral() + * @model + * @generated + */ +public interface NegativeLiteral extends ExistentialQuantifier, Literal { + /** + * Returns the value of the 'Atom' containment reference. + * + * + * @return the value of the 'Atom' containment reference. + * @see #setAtom(Atom) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getNegativeLiteral_Atom() + * @model containment="true" + * @generated + */ + Atom getAtom(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.NegativeLiteral#getAtom Atom}' containment reference. + * + * + * @param value the new value of the 'Atom' containment reference. + * @see #getAtom() + * @generated + */ + void setAtom(Atom value); + +} // NegativeLiteral diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Node.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Node.java new file mode 100644 index 00000000..e6547083 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Node.java @@ -0,0 +1,16 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +/** + * + * A representation of the model object 'Node'. + * + * + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getNode() + * @model + * @generated + */ +public interface Node extends NamedElement { +} // Node diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Parameter.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Parameter.java new file mode 100644 index 00000000..5ed8ac3c --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Parameter.java @@ -0,0 +1,44 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +/** + * + * A representation of the model object 'Parameter'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.Parameter#getParameterType Parameter Type}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getParameter() + * @model + * @generated + */ +public interface Parameter extends Variable { + /** + * Returns the value of the 'Parameter Type' reference. + * + * + * @return the value of the 'Parameter Type' reference. + * @see #setParameterType(ClassDeclaration) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getParameter_ParameterType() + * @model + * @generated + */ + ClassDeclaration getParameterType(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.Parameter#getParameterType Parameter Type}' reference. + * + * + * @param value the new value of the 'Parameter Type' reference. + * @see #getParameterType() + * @generated + */ + void setParameterType(ClassDeclaration value); + +} // Parameter diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/PredicateDefinition.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/PredicateDefinition.java new file mode 100644 index 00000000..175d5fff --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/PredicateDefinition.java @@ -0,0 +1,72 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Predicate Definition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.PredicateDefinition#isError Error}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.PredicateDefinition#getParameters Parameters}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.PredicateDefinition#getBodies Bodies}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getPredicateDefinition() + * @model + * @generated + */ +public interface PredicateDefinition extends Relation, Statement { + /** + * Returns the value of the 'Error' attribute. + * + * + * @return the value of the 'Error' attribute. + * @see #setError(boolean) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getPredicateDefinition_Error() + * @model + * @generated + */ + boolean isError(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.PredicateDefinition#isError Error}' attribute. + * + * + * @param value the new value of the 'Error' attribute. + * @see #isError() + * @generated + */ + void setError(boolean value); + + /** + * Returns the value of the 'Parameters' containment reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.Parameter}. + * + * + * @return the value of the 'Parameters' containment reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getPredicateDefinition_Parameters() + * @model containment="true" + * @generated + */ + EList getParameters(); + + /** + * Returns the value of the 'Bodies' containment reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.Conjunction}. + * + * + * @return the value of the 'Bodies' containment reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getPredicateDefinition_Bodies() + * @model containment="true" + * @generated + */ + EList getBodies(); + +} // PredicateDefinition diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Problem.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Problem.java new file mode 100644 index 00000000..3342767d --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Problem.java @@ -0,0 +1,51 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Problem'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.Problem#getNodes Nodes}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.Problem#getStatements Statements}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getProblem() + * @model + * @generated + */ +public interface Problem extends EObject { + /** + * Returns the value of the 'Nodes' containment reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.Node}. + * + * + * @return the value of the 'Nodes' containment reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getProblem_Nodes() + * @model containment="true" + * @generated + */ + EList getNodes(); + + /** + * Returns the value of the 'Statements' containment reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.Statement}. + * + * + * @return the value of the 'Statements' containment reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getProblem_Statements() + * @model containment="true" + * @generated + */ + EList getStatements(); + +} // Problem diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ProblemFactory.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ProblemFactory.java new file mode 100644 index 00000000..301f7cce --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ProblemFactory.java @@ -0,0 +1,168 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage + * @generated + */ +public interface ProblemFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ProblemFactory eINSTANCE = org.eclipse.viatra.solver.language.model.problem.impl.ProblemFactoryImpl.init(); + + /** + * Returns a new object of class 'Problem'. + * + * + * @return a new object of class 'Problem'. + * @generated + */ + Problem createProblem(); + + /** + * Returns a new object of class 'Class Declaration'. + * + * + * @return a new object of class 'Class Declaration'. + * @generated + */ + ClassDeclaration createClassDeclaration(); + + /** + * Returns a new object of class 'Reference Declaration'. + * + * + * @return a new object of class 'Reference Declaration'. + * @generated + */ + ReferenceDeclaration createReferenceDeclaration(); + + /** + * Returns a new object of class 'Predicate Definition'. + * + * + * @return a new object of class 'Predicate Definition'. + * @generated + */ + PredicateDefinition createPredicateDefinition(); + + /** + * Returns a new object of class 'Parameter'. + * + * + * @return a new object of class 'Parameter'. + * @generated + */ + Parameter createParameter(); + + /** + * Returns a new object of class 'Conjunction'. + * + * + * @return a new object of class 'Conjunction'. + * @generated + */ + Conjunction createConjunction(); + + /** + * Returns a new object of class 'Atom'. + * + * + * @return a new object of class 'Atom'. + * @generated + */ + Atom createAtom(); + + /** + * Returns a new object of class 'Implicit Variable'. + * + * + * @return a new object of class 'Implicit Variable'. + * @generated + */ + ImplicitVariable createImplicitVariable(); + + /** + * Returns a new object of class 'Negative Literal'. + * + * + * @return a new object of class 'Negative Literal'. + * @generated + */ + NegativeLiteral createNegativeLiteral(); + + /** + * Returns a new object of class 'Assertion'. + * + * + * @return a new object of class 'Assertion'. + * @generated + */ + Assertion createAssertion(); + + /** + * Returns a new object of class 'Node'. + * + * + * @return a new object of class 'Node'. + * @generated + */ + Node createNode(); + + /** + * Returns a new object of class 'Scope Declaration'. + * + * + * @return a new object of class 'Scope Declaration'. + * @generated + */ + ScopeDeclaration createScopeDeclaration(); + + /** + * Returns a new object of class 'Type Scope'. + * + * + * @return a new object of class 'Type Scope'. + * @generated + */ + TypeScope createTypeScope(); + + /** + * Returns a new object of class 'Range Multiplicity'. + * + * + * @return a new object of class 'Range Multiplicity'. + * @generated + */ + RangeMultiplicity createRangeMultiplicity(); + + /** + * Returns a new object of class 'Exact Multiplicity'. + * + * + * @return a new object of class 'Exact Multiplicity'. + * @generated + */ + ExactMultiplicity createExactMultiplicity(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ProblemPackage getProblemPackage(); + +} //ProblemFactory diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ProblemPackage.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ProblemPackage.java new file mode 100644 index 00000000..59906b1f --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ProblemPackage.java @@ -0,0 +1,2101 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemFactory + * @model kind="package" + * @generated + */ +public interface ProblemPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "problem"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/viatra/solver/language/model/Problem"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "problem"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ProblemPackage eINSTANCE = org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ProblemImpl Problem}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getProblem() + * @generated + */ + int PROBLEM = 0; + + /** + * The feature id for the 'Nodes' containment reference list. + * + * + * @generated + * @ordered + */ + int PROBLEM__NODES = 0; + + /** + * The feature id for the 'Statements' containment reference list. + * + * + * @generated + * @ordered + */ + int PROBLEM__STATEMENTS = 1; + + /** + * The number of structural features of the 'Problem' class. + * + * + * @generated + * @ordered + */ + int PROBLEM_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Problem' class. + * + * + * @generated + * @ordered + */ + int PROBLEM_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.NamedElementImpl Named Element}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.NamedElementImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getNamedElement() + * @generated + */ + int NAMED_ELEMENT = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__NAME = 0; + + /** + * The number of structural features of the 'Named Element' class. + * + * + * @generated + * @ordered + */ + int NAMED_ELEMENT_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Named Element' class. + * + * + * @generated + * @ordered + */ + int NAMED_ELEMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.RelationImpl Relation}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.RelationImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getRelation() + * @generated + */ + int RELATION = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int RELATION__NAME = NAMED_ELEMENT__NAME; + + /** + * The number of structural features of the 'Relation' class. + * + * + * @generated + * @ordered + */ + int RELATION_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Relation' class. + * + * + * @generated + * @ordered + */ + int RELATION_OPERATION_COUNT = NAMED_ELEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl Class Declaration}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getClassDeclaration() + * @generated + */ + int CLASS_DECLARATION = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CLASS_DECLARATION__NAME = RELATION__NAME; + + /** + * The feature id for the 'Abstract' attribute. + * + * + * @generated + * @ordered + */ + int CLASS_DECLARATION__ABSTRACT = RELATION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Super Types' reference list. + * + * + * @generated + * @ordered + */ + int CLASS_DECLARATION__SUPER_TYPES = RELATION_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Reference Declarations' containment reference list. + * + * + * @generated + * @ordered + */ + int CLASS_DECLARATION__REFERENCE_DECLARATIONS = RELATION_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Class Declaration' class. + * + * + * @generated + * @ordered + */ + int CLASS_DECLARATION_FEATURE_COUNT = RELATION_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Class Declaration' class. + * + * + * @generated + * @ordered + */ + int CLASS_DECLARATION_OPERATION_COUNT = RELATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl Reference Declaration}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getReferenceDeclaration() + * @generated + */ + int REFERENCE_DECLARATION = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int REFERENCE_DECLARATION__NAME = RELATION__NAME; + + /** + * The feature id for the 'Reference Type' reference. + * + * + * @generated + * @ordered + */ + int REFERENCE_DECLARATION__REFERENCE_TYPE = RELATION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Opposite' reference. + * + * + * @generated + * @ordered + */ + int REFERENCE_DECLARATION__OPPOSITE = RELATION_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Containment' attribute. + * + * + * @generated + * @ordered + */ + int REFERENCE_DECLARATION__CONTAINMENT = RELATION_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Multiplicity' containment reference. + * + * + * @generated + * @ordered + */ + int REFERENCE_DECLARATION__MULTIPLICITY = RELATION_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Reference Declaration' class. + * + * + * @generated + * @ordered + */ + int REFERENCE_DECLARATION_FEATURE_COUNT = RELATION_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Reference Declaration' class. + * + * + * @generated + * @ordered + */ + int REFERENCE_DECLARATION_OPERATION_COUNT = RELATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.PredicateDefinitionImpl Predicate Definition}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.PredicateDefinitionImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getPredicateDefinition() + * @generated + */ + int PREDICATE_DEFINITION = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int PREDICATE_DEFINITION__NAME = RELATION__NAME; + + /** + * The feature id for the 'Error' attribute. + * + * + * @generated + * @ordered + */ + int PREDICATE_DEFINITION__ERROR = RELATION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Parameters' containment reference list. + * + * + * @generated + * @ordered + */ + int PREDICATE_DEFINITION__PARAMETERS = RELATION_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Bodies' containment reference list. + * + * + * @generated + * @ordered + */ + int PREDICATE_DEFINITION__BODIES = RELATION_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Predicate Definition' class. + * + * + * @generated + * @ordered + */ + int PREDICATE_DEFINITION_FEATURE_COUNT = RELATION_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Predicate Definition' class. + * + * + * @generated + * @ordered + */ + int PREDICATE_DEFINITION_OPERATION_COUNT = RELATION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.VariableImpl Variable}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.VariableImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getVariable() + * @generated + */ + int VARIABLE = 7; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int VARIABLE__NAME = NAMED_ELEMENT__NAME; + + /** + * The number of structural features of the 'Variable' class. + * + * + * @generated + * @ordered + */ + int VARIABLE_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Variable' class. + * + * + * @generated + * @ordered + */ + int VARIABLE_OPERATION_COUNT = NAMED_ELEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ParameterImpl Parameter}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ParameterImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getParameter() + * @generated + */ + int PARAMETER = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int PARAMETER__NAME = VARIABLE__NAME; + + /** + * The feature id for the 'Parameter Type' reference. + * + * + * @generated + * @ordered + */ + int PARAMETER__PARAMETER_TYPE = VARIABLE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Parameter' class. + * + * + * @generated + * @ordered + */ + int PARAMETER_FEATURE_COUNT = VARIABLE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Parameter' class. + * + * + * @generated + * @ordered + */ + int PARAMETER_OPERATION_COUNT = VARIABLE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier Existential Quantifier}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getExistentialQuantifier() + * @generated + */ + int EXISTENTIAL_QUANTIFIER = 13; + + /** + * The feature id for the 'Implicit Variables' containment reference list. + * + * + * @generated + * @ordered + */ + int EXISTENTIAL_QUANTIFIER__IMPLICIT_VARIABLES = 0; + + /** + * The number of structural features of the 'Existential Quantifier' class. + * + * + * @generated + * @ordered + */ + int EXISTENTIAL_QUANTIFIER_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Existential Quantifier' class. + * + * + * @generated + * @ordered + */ + int EXISTENTIAL_QUANTIFIER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ConjunctionImpl Conjunction}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ConjunctionImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getConjunction() + * @generated + */ + int CONJUNCTION = 8; + + /** + * The feature id for the 'Implicit Variables' containment reference list. + * + * + * @generated + * @ordered + */ + int CONJUNCTION__IMPLICIT_VARIABLES = EXISTENTIAL_QUANTIFIER__IMPLICIT_VARIABLES; + + /** + * The feature id for the 'Literals' containment reference list. + * + * + * @generated + * @ordered + */ + int CONJUNCTION__LITERALS = EXISTENTIAL_QUANTIFIER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Conjunction' class. + * + * + * @generated + * @ordered + */ + int CONJUNCTION_FEATURE_COUNT = EXISTENTIAL_QUANTIFIER_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Conjunction' class. + * + * + * @generated + * @ordered + */ + int CONJUNCTION_OPERATION_COUNT = EXISTENTIAL_QUANTIFIER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.LiteralImpl Literal}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.LiteralImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getLiteral() + * @generated + */ + int LITERAL = 9; + + /** + * The number of structural features of the 'Literal' class. + * + * + * @generated + * @ordered + */ + int LITERAL_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Literal' class. + * + * + * @generated + * @ordered + */ + int LITERAL_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl Atom}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getAtom() + * @generated + */ + int ATOM = 10; + + /** + * The feature id for the 'Relation' reference. + * + * + * @generated + * @ordered + */ + int ATOM__RELATION = LITERAL_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Arguments' reference list. + * + * + * @generated + * @ordered + */ + int ATOM__ARGUMENTS = LITERAL_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Transitive Closure' attribute. + * + * + * @generated + * @ordered + */ + int ATOM__TRANSITIVE_CLOSURE = LITERAL_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Atom' class. + * + * + * @generated + * @ordered + */ + int ATOM_FEATURE_COUNT = LITERAL_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Atom' class. + * + * + * @generated + * @ordered + */ + int ATOM_OPERATION_COUNT = LITERAL_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ImplicitVariableImpl Implicit Variable}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ImplicitVariableImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getImplicitVariable() + * @generated + */ + int IMPLICIT_VARIABLE = 11; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int IMPLICIT_VARIABLE__NAME = VARIABLE__NAME; + + /** + * The number of structural features of the 'Implicit Variable' class. + * + * + * @generated + * @ordered + */ + int IMPLICIT_VARIABLE_FEATURE_COUNT = VARIABLE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Implicit Variable' class. + * + * + * @generated + * @ordered + */ + int IMPLICIT_VARIABLE_OPERATION_COUNT = VARIABLE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.NegativeLiteralImpl Negative Literal}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.NegativeLiteralImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getNegativeLiteral() + * @generated + */ + int NEGATIVE_LITERAL = 12; + + /** + * The feature id for the 'Implicit Variables' containment reference list. + * + * + * @generated + * @ordered + */ + int NEGATIVE_LITERAL__IMPLICIT_VARIABLES = EXISTENTIAL_QUANTIFIER__IMPLICIT_VARIABLES; + + /** + * The feature id for the 'Atom' containment reference. + * + * + * @generated + * @ordered + */ + int NEGATIVE_LITERAL__ATOM = EXISTENTIAL_QUANTIFIER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Negative Literal' class. + * + * + * @generated + * @ordered + */ + int NEGATIVE_LITERAL_FEATURE_COUNT = EXISTENTIAL_QUANTIFIER_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Negative Literal' class. + * + * + * @generated + * @ordered + */ + int NEGATIVE_LITERAL_OPERATION_COUNT = EXISTENTIAL_QUANTIFIER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.Statement Statement}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.Statement + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getStatement() + * @generated + */ + int STATEMENT = 17; + + /** + * The number of structural features of the 'Statement' class. + * + * + * @generated + * @ordered + */ + int STATEMENT_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Statement' class. + * + * + * @generated + * @ordered + */ + int STATEMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl Assertion}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getAssertion() + * @generated + */ + int ASSERTION = 14; + + /** + * The feature id for the 'Relation' reference. + * + * + * @generated + * @ordered + */ + int ASSERTION__RELATION = STATEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Arguments' reference list. + * + * + * @generated + * @ordered + */ + int ASSERTION__ARGUMENTS = STATEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int ASSERTION__VALUE = STATEMENT_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Assertion' class. + * + * + * @generated + * @ordered + */ + int ASSERTION_FEATURE_COUNT = STATEMENT_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Assertion' class. + * + * + * @generated + * @ordered + */ + int ASSERTION_OPERATION_COUNT = STATEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.NodeImpl Node}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.NodeImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getNode() + * @generated + */ + int NODE = 15; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NODE__NAME = NAMED_ELEMENT__NAME; + + /** + * The number of structural features of the 'Node' class. + * + * + * @generated + * @ordered + */ + int NODE_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Node' class. + * + * + * @generated + * @ordered + */ + int NODE_OPERATION_COUNT = NAMED_ELEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ScopeDeclarationImpl Scope Declaration}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ScopeDeclarationImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getScopeDeclaration() + * @generated + */ + int SCOPE_DECLARATION = 16; + + /** + * The feature id for the 'Type Scopes' containment reference list. + * + * + * @generated + * @ordered + */ + int SCOPE_DECLARATION__TYPE_SCOPES = STATEMENT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Scope Declaration' class. + * + * + * @generated + * @ordered + */ + int SCOPE_DECLARATION_FEATURE_COUNT = STATEMENT_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Scope Declaration' class. + * + * + * @generated + * @ordered + */ + int SCOPE_DECLARATION_OPERATION_COUNT = STATEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.TypeScopeImpl Type Scope}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.TypeScopeImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getTypeScope() + * @generated + */ + int TYPE_SCOPE = 18; + + /** + * The feature id for the 'Target Type' reference. + * + * + * @generated + * @ordered + */ + int TYPE_SCOPE__TARGET_TYPE = 0; + + /** + * The feature id for the 'Increment' attribute. + * + * + * @generated + * @ordered + */ + int TYPE_SCOPE__INCREMENT = 1; + + /** + * The feature id for the 'Multiplicity' containment reference. + * + * + * @generated + * @ordered + */ + int TYPE_SCOPE__MULTIPLICITY = 2; + + /** + * The number of structural features of the 'Type Scope' class. + * + * + * @generated + * @ordered + */ + int TYPE_SCOPE_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Type Scope' class. + * + * + * @generated + * @ordered + */ + int TYPE_SCOPE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.MultiplicityImpl Multiplicity}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.MultiplicityImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getMultiplicity() + * @generated + */ + int MULTIPLICITY = 19; + + /** + * The number of structural features of the 'Multiplicity' class. + * + * + * @generated + * @ordered + */ + int MULTIPLICITY_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Multiplicity' class. + * + * + * @generated + * @ordered + */ + int MULTIPLICITY_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.RangeMultiplicityImpl Range Multiplicity}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.RangeMultiplicityImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getRangeMultiplicity() + * @generated + */ + int RANGE_MULTIPLICITY = 20; + + /** + * The feature id for the 'Lower Bound' attribute. + * + * + * @generated + * @ordered + */ + int RANGE_MULTIPLICITY__LOWER_BOUND = MULTIPLICITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Upper Bound' attribute. + * + * + * @generated + * @ordered + */ + int RANGE_MULTIPLICITY__UPPER_BOUND = MULTIPLICITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Range Multiplicity' class. + * + * + * @generated + * @ordered + */ + int RANGE_MULTIPLICITY_FEATURE_COUNT = MULTIPLICITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Range Multiplicity' class. + * + * + * @generated + * @ordered + */ + int RANGE_MULTIPLICITY_OPERATION_COUNT = MULTIPLICITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ExactMultiplicityImpl Exact Multiplicity}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ExactMultiplicityImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getExactMultiplicity() + * @generated + */ + int EXACT_MULTIPLICITY = 21; + + /** + * The feature id for the 'Exact Value' attribute. + * + * + * @generated + * @ordered + */ + int EXACT_MULTIPLICITY__EXACT_VALUE = MULTIPLICITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Exact Multiplicity' class. + * + * + * @generated + * @ordered + */ + int EXACT_MULTIPLICITY_FEATURE_COUNT = MULTIPLICITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Exact Multiplicity' class. + * + * + * @generated + * @ordered + */ + int EXACT_MULTIPLICITY_OPERATION_COUNT = MULTIPLICITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.viatra.solver.language.model.problem.LogicValue Logic Value}' enum. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.LogicValue + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getLogicValue() + * @generated + */ + int LOGIC_VALUE = 22; + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Problem Problem}'. + * + * + * @return the meta object for class 'Problem'. + * @see org.eclipse.viatra.solver.language.model.problem.Problem + * @generated + */ + EClass getProblem(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.solver.language.model.problem.Problem#getNodes Nodes}'. + * + * + * @return the meta object for the containment reference list 'Nodes'. + * @see org.eclipse.viatra.solver.language.model.problem.Problem#getNodes() + * @see #getProblem() + * @generated + */ + EReference getProblem_Nodes(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.solver.language.model.problem.Problem#getStatements Statements}'. + * + * + * @return the meta object for the containment reference list 'Statements'. + * @see org.eclipse.viatra.solver.language.model.problem.Problem#getStatements() + * @see #getProblem() + * @generated + */ + EReference getProblem_Statements(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Relation Relation}'. + * + * + * @return the meta object for class 'Relation'. + * @see org.eclipse.viatra.solver.language.model.problem.Relation + * @generated + */ + EClass getRelation(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.ClassDeclaration Class Declaration}'. + * + * + * @return the meta object for class 'Class Declaration'. + * @see org.eclipse.viatra.solver.language.model.problem.ClassDeclaration + * @generated + */ + EClass getClassDeclaration(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.viatra.solver.language.model.problem.ClassDeclaration#isAbstract Abstract}'. + * + * + * @return the meta object for the attribute 'Abstract'. + * @see org.eclipse.viatra.solver.language.model.problem.ClassDeclaration#isAbstract() + * @see #getClassDeclaration() + * @generated + */ + EAttribute getClassDeclaration_Abstract(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.viatra.solver.language.model.problem.ClassDeclaration#getSuperTypes Super Types}'. + * + * + * @return the meta object for the reference list 'Super Types'. + * @see org.eclipse.viatra.solver.language.model.problem.ClassDeclaration#getSuperTypes() + * @see #getClassDeclaration() + * @generated + */ + EReference getClassDeclaration_SuperTypes(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.solver.language.model.problem.ClassDeclaration#getReferenceDeclarations Reference Declarations}'. + * + * + * @return the meta object for the containment reference list 'Reference Declarations'. + * @see org.eclipse.viatra.solver.language.model.problem.ClassDeclaration#getReferenceDeclarations() + * @see #getClassDeclaration() + * @generated + */ + EReference getClassDeclaration_ReferenceDeclarations(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration Reference Declaration}'. + * + * + * @return the meta object for class 'Reference Declaration'. + * @see org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration + * @generated + */ + EClass getReferenceDeclaration(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getReferenceType Reference Type}'. + * + * + * @return the meta object for the reference 'Reference Type'. + * @see org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getReferenceType() + * @see #getReferenceDeclaration() + * @generated + */ + EReference getReferenceDeclaration_ReferenceType(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getOpposite Opposite}'. + * + * + * @return the meta object for the reference 'Opposite'. + * @see org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getOpposite() + * @see #getReferenceDeclaration() + * @generated + */ + EReference getReferenceDeclaration_Opposite(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#isContainment Containment}'. + * + * + * @return the meta object for the attribute 'Containment'. + * @see org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#isContainment() + * @see #getReferenceDeclaration() + * @generated + */ + EAttribute getReferenceDeclaration_Containment(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getMultiplicity Multiplicity}'. + * + * + * @return the meta object for the containment reference 'Multiplicity'. + * @see org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getMultiplicity() + * @see #getReferenceDeclaration() + * @generated + */ + EReference getReferenceDeclaration_Multiplicity(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.NamedElement Named Element}'. + * + * + * @return the meta object for class 'Named Element'. + * @see org.eclipse.viatra.solver.language.model.problem.NamedElement + * @generated + */ + EClass getNamedElement(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.viatra.solver.language.model.problem.NamedElement#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.viatra.solver.language.model.problem.NamedElement#getName() + * @see #getNamedElement() + * @generated + */ + EAttribute getNamedElement_Name(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.PredicateDefinition Predicate Definition}'. + * + * + * @return the meta object for class 'Predicate Definition'. + * @see org.eclipse.viatra.solver.language.model.problem.PredicateDefinition + * @generated + */ + EClass getPredicateDefinition(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.viatra.solver.language.model.problem.PredicateDefinition#isError Error}'. + * + * + * @return the meta object for the attribute 'Error'. + * @see org.eclipse.viatra.solver.language.model.problem.PredicateDefinition#isError() + * @see #getPredicateDefinition() + * @generated + */ + EAttribute getPredicateDefinition_Error(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.solver.language.model.problem.PredicateDefinition#getParameters Parameters}'. + * + * + * @return the meta object for the containment reference list 'Parameters'. + * @see org.eclipse.viatra.solver.language.model.problem.PredicateDefinition#getParameters() + * @see #getPredicateDefinition() + * @generated + */ + EReference getPredicateDefinition_Parameters(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.solver.language.model.problem.PredicateDefinition#getBodies Bodies}'. + * + * + * @return the meta object for the containment reference list 'Bodies'. + * @see org.eclipse.viatra.solver.language.model.problem.PredicateDefinition#getBodies() + * @see #getPredicateDefinition() + * @generated + */ + EReference getPredicateDefinition_Bodies(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Parameter Parameter}'. + * + * + * @return the meta object for class 'Parameter'. + * @see org.eclipse.viatra.solver.language.model.problem.Parameter + * @generated + */ + EClass getParameter(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.viatra.solver.language.model.problem.Parameter#getParameterType Parameter Type}'. + * + * + * @return the meta object for the reference 'Parameter Type'. + * @see org.eclipse.viatra.solver.language.model.problem.Parameter#getParameterType() + * @see #getParameter() + * @generated + */ + EReference getParameter_ParameterType(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Variable Variable}'. + * + * + * @return the meta object for class 'Variable'. + * @see org.eclipse.viatra.solver.language.model.problem.Variable + * @generated + */ + EClass getVariable(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Conjunction Conjunction}'. + * + * + * @return the meta object for class 'Conjunction'. + * @see org.eclipse.viatra.solver.language.model.problem.Conjunction + * @generated + */ + EClass getConjunction(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.solver.language.model.problem.Conjunction#getLiterals Literals}'. + * + * + * @return the meta object for the containment reference list 'Literals'. + * @see org.eclipse.viatra.solver.language.model.problem.Conjunction#getLiterals() + * @see #getConjunction() + * @generated + */ + EReference getConjunction_Literals(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Literal Literal}'. + * + * + * @return the meta object for class 'Literal'. + * @see org.eclipse.viatra.solver.language.model.problem.Literal + * @generated + */ + EClass getLiteral(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Atom Atom}'. + * + * + * @return the meta object for class 'Atom'. + * @see org.eclipse.viatra.solver.language.model.problem.Atom + * @generated + */ + EClass getAtom(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.viatra.solver.language.model.problem.Atom#getRelation Relation}'. + * + * + * @return the meta object for the reference 'Relation'. + * @see org.eclipse.viatra.solver.language.model.problem.Atom#getRelation() + * @see #getAtom() + * @generated + */ + EReference getAtom_Relation(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.viatra.solver.language.model.problem.Atom#getArguments Arguments}'. + * + * + * @return the meta object for the reference list 'Arguments'. + * @see org.eclipse.viatra.solver.language.model.problem.Atom#getArguments() + * @see #getAtom() + * @generated + */ + EReference getAtom_Arguments(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.viatra.solver.language.model.problem.Atom#isTransitiveClosure Transitive Closure}'. + * + * + * @return the meta object for the attribute 'Transitive Closure'. + * @see org.eclipse.viatra.solver.language.model.problem.Atom#isTransitiveClosure() + * @see #getAtom() + * @generated + */ + EAttribute getAtom_TransitiveClosure(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.ImplicitVariable Implicit Variable}'. + * + * + * @return the meta object for class 'Implicit Variable'. + * @see org.eclipse.viatra.solver.language.model.problem.ImplicitVariable + * @generated + */ + EClass getImplicitVariable(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.NegativeLiteral Negative Literal}'. + * + * + * @return the meta object for class 'Negative Literal'. + * @see org.eclipse.viatra.solver.language.model.problem.NegativeLiteral + * @generated + */ + EClass getNegativeLiteral(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.viatra.solver.language.model.problem.NegativeLiteral#getAtom Atom}'. + * + * + * @return the meta object for the containment reference 'Atom'. + * @see org.eclipse.viatra.solver.language.model.problem.NegativeLiteral#getAtom() + * @see #getNegativeLiteral() + * @generated + */ + EReference getNegativeLiteral_Atom(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier Existential Quantifier}'. + * + * + * @return the meta object for class 'Existential Quantifier'. + * @see org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier + * @generated + */ + EClass getExistentialQuantifier(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier#getImplicitVariables Implicit Variables}'. + * + * + * @return the meta object for the containment reference list 'Implicit Variables'. + * @see org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier#getImplicitVariables() + * @see #getExistentialQuantifier() + * @generated + */ + EReference getExistentialQuantifier_ImplicitVariables(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Assertion Assertion}'. + * + * + * @return the meta object for class 'Assertion'. + * @see org.eclipse.viatra.solver.language.model.problem.Assertion + * @generated + */ + EClass getAssertion(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.viatra.solver.language.model.problem.Assertion#getRelation Relation}'. + * + * + * @return the meta object for the reference 'Relation'. + * @see org.eclipse.viatra.solver.language.model.problem.Assertion#getRelation() + * @see #getAssertion() + * @generated + */ + EReference getAssertion_Relation(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.viatra.solver.language.model.problem.Assertion#getArguments Arguments}'. + * + * + * @return the meta object for the reference list 'Arguments'. + * @see org.eclipse.viatra.solver.language.model.problem.Assertion#getArguments() + * @see #getAssertion() + * @generated + */ + EReference getAssertion_Arguments(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.viatra.solver.language.model.problem.Assertion#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.viatra.solver.language.model.problem.Assertion#getValue() + * @see #getAssertion() + * @generated + */ + EAttribute getAssertion_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Node Node}'. + * + * + * @return the meta object for class 'Node'. + * @see org.eclipse.viatra.solver.language.model.problem.Node + * @generated + */ + EClass getNode(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration Scope Declaration}'. + * + * + * @return the meta object for class 'Scope Declaration'. + * @see org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration + * @generated + */ + EClass getScopeDeclaration(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration#getTypeScopes Type Scopes}'. + * + * + * @return the meta object for the containment reference list 'Type Scopes'. + * @see org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration#getTypeScopes() + * @see #getScopeDeclaration() + * @generated + */ + EReference getScopeDeclaration_TypeScopes(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Statement Statement}'. + * + * + * @return the meta object for class 'Statement'. + * @see org.eclipse.viatra.solver.language.model.problem.Statement + * @generated + */ + EClass getStatement(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.TypeScope Type Scope}'. + * + * + * @return the meta object for class 'Type Scope'. + * @see org.eclipse.viatra.solver.language.model.problem.TypeScope + * @generated + */ + EClass getTypeScope(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.viatra.solver.language.model.problem.TypeScope#getTargetType Target Type}'. + * + * + * @return the meta object for the reference 'Target Type'. + * @see org.eclipse.viatra.solver.language.model.problem.TypeScope#getTargetType() + * @see #getTypeScope() + * @generated + */ + EReference getTypeScope_TargetType(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.viatra.solver.language.model.problem.TypeScope#isIncrement Increment}'. + * + * + * @return the meta object for the attribute 'Increment'. + * @see org.eclipse.viatra.solver.language.model.problem.TypeScope#isIncrement() + * @see #getTypeScope() + * @generated + */ + EAttribute getTypeScope_Increment(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.viatra.solver.language.model.problem.TypeScope#getMultiplicity Multiplicity}'. + * + * + * @return the meta object for the containment reference 'Multiplicity'. + * @see org.eclipse.viatra.solver.language.model.problem.TypeScope#getMultiplicity() + * @see #getTypeScope() + * @generated + */ + EReference getTypeScope_Multiplicity(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.Multiplicity Multiplicity}'. + * + * + * @return the meta object for class 'Multiplicity'. + * @see org.eclipse.viatra.solver.language.model.problem.Multiplicity + * @generated + */ + EClass getMultiplicity(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity Range Multiplicity}'. + * + * + * @return the meta object for class 'Range Multiplicity'. + * @see org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity + * @generated + */ + EClass getRangeMultiplicity(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity#getLowerBound Lower Bound}'. + * + * + * @return the meta object for the attribute 'Lower Bound'. + * @see org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity#getLowerBound() + * @see #getRangeMultiplicity() + * @generated + */ + EAttribute getRangeMultiplicity_LowerBound(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity#getUpperBound Upper Bound}'. + * + * + * @return the meta object for the attribute 'Upper Bound'. + * @see org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity#getUpperBound() + * @see #getRangeMultiplicity() + * @generated + */ + EAttribute getRangeMultiplicity_UpperBound(); + + /** + * Returns the meta object for class '{@link org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity Exact Multiplicity}'. + * + * + * @return the meta object for class 'Exact Multiplicity'. + * @see org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity + * @generated + */ + EClass getExactMultiplicity(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity#getExactValue Exact Value}'. + * + * + * @return the meta object for the attribute 'Exact Value'. + * @see org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity#getExactValue() + * @see #getExactMultiplicity() + * @generated + */ + EAttribute getExactMultiplicity_ExactValue(); + + /** + * Returns the meta object for enum '{@link org.eclipse.viatra.solver.language.model.problem.LogicValue Logic Value}'. + * + * + * @return the meta object for enum 'Logic Value'. + * @see org.eclipse.viatra.solver.language.model.problem.LogicValue + * @generated + */ + EEnum getLogicValue(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ProblemFactory getProblemFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ProblemImpl Problem}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getProblem() + * @generated + */ + EClass PROBLEM = eINSTANCE.getProblem(); + + /** + * The meta object literal for the 'Nodes' containment reference list feature. + * + * + * @generated + */ + EReference PROBLEM__NODES = eINSTANCE.getProblem_Nodes(); + + /** + * The meta object literal for the 'Statements' containment reference list feature. + * + * + * @generated + */ + EReference PROBLEM__STATEMENTS = eINSTANCE.getProblem_Statements(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.RelationImpl Relation}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.RelationImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getRelation() + * @generated + */ + EClass RELATION = eINSTANCE.getRelation(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl Class Declaration}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getClassDeclaration() + * @generated + */ + EClass CLASS_DECLARATION = eINSTANCE.getClassDeclaration(); + + /** + * The meta object literal for the 'Abstract' attribute feature. + * + * + * @generated + */ + EAttribute CLASS_DECLARATION__ABSTRACT = eINSTANCE.getClassDeclaration_Abstract(); + + /** + * The meta object literal for the 'Super Types' reference list feature. + * + * + * @generated + */ + EReference CLASS_DECLARATION__SUPER_TYPES = eINSTANCE.getClassDeclaration_SuperTypes(); + + /** + * The meta object literal for the 'Reference Declarations' containment reference list feature. + * + * + * @generated + */ + EReference CLASS_DECLARATION__REFERENCE_DECLARATIONS = eINSTANCE.getClassDeclaration_ReferenceDeclarations(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl Reference Declaration}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getReferenceDeclaration() + * @generated + */ + EClass REFERENCE_DECLARATION = eINSTANCE.getReferenceDeclaration(); + + /** + * The meta object literal for the 'Reference Type' reference feature. + * + * + * @generated + */ + EReference REFERENCE_DECLARATION__REFERENCE_TYPE = eINSTANCE.getReferenceDeclaration_ReferenceType(); + + /** + * The meta object literal for the 'Opposite' reference feature. + * + * + * @generated + */ + EReference REFERENCE_DECLARATION__OPPOSITE = eINSTANCE.getReferenceDeclaration_Opposite(); + + /** + * The meta object literal for the 'Containment' attribute feature. + * + * + * @generated + */ + EAttribute REFERENCE_DECLARATION__CONTAINMENT = eINSTANCE.getReferenceDeclaration_Containment(); + + /** + * The meta object literal for the 'Multiplicity' containment reference feature. + * + * + * @generated + */ + EReference REFERENCE_DECLARATION__MULTIPLICITY = eINSTANCE.getReferenceDeclaration_Multiplicity(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.NamedElementImpl Named Element}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.NamedElementImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getNamedElement() + * @generated + */ + EClass NAMED_ELEMENT = eINSTANCE.getNamedElement(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute NAMED_ELEMENT__NAME = eINSTANCE.getNamedElement_Name(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.PredicateDefinitionImpl Predicate Definition}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.PredicateDefinitionImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getPredicateDefinition() + * @generated + */ + EClass PREDICATE_DEFINITION = eINSTANCE.getPredicateDefinition(); + + /** + * The meta object literal for the 'Error' attribute feature. + * + * + * @generated + */ + EAttribute PREDICATE_DEFINITION__ERROR = eINSTANCE.getPredicateDefinition_Error(); + + /** + * The meta object literal for the 'Parameters' containment reference list feature. + * + * + * @generated + */ + EReference PREDICATE_DEFINITION__PARAMETERS = eINSTANCE.getPredicateDefinition_Parameters(); + + /** + * The meta object literal for the 'Bodies' containment reference list feature. + * + * + * @generated + */ + EReference PREDICATE_DEFINITION__BODIES = eINSTANCE.getPredicateDefinition_Bodies(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ParameterImpl Parameter}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ParameterImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getParameter() + * @generated + */ + EClass PARAMETER = eINSTANCE.getParameter(); + + /** + * The meta object literal for the 'Parameter Type' reference feature. + * + * + * @generated + */ + EReference PARAMETER__PARAMETER_TYPE = eINSTANCE.getParameter_ParameterType(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.VariableImpl Variable}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.VariableImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getVariable() + * @generated + */ + EClass VARIABLE = eINSTANCE.getVariable(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ConjunctionImpl Conjunction}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ConjunctionImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getConjunction() + * @generated + */ + EClass CONJUNCTION = eINSTANCE.getConjunction(); + + /** + * The meta object literal for the 'Literals' containment reference list feature. + * + * + * @generated + */ + EReference CONJUNCTION__LITERALS = eINSTANCE.getConjunction_Literals(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.LiteralImpl Literal}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.LiteralImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getLiteral() + * @generated + */ + EClass LITERAL = eINSTANCE.getLiteral(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl Atom}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getAtom() + * @generated + */ + EClass ATOM = eINSTANCE.getAtom(); + + /** + * The meta object literal for the 'Relation' reference feature. + * + * + * @generated + */ + EReference ATOM__RELATION = eINSTANCE.getAtom_Relation(); + + /** + * The meta object literal for the 'Arguments' reference list feature. + * + * + * @generated + */ + EReference ATOM__ARGUMENTS = eINSTANCE.getAtom_Arguments(); + + /** + * The meta object literal for the 'Transitive Closure' attribute feature. + * + * + * @generated + */ + EAttribute ATOM__TRANSITIVE_CLOSURE = eINSTANCE.getAtom_TransitiveClosure(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ImplicitVariableImpl Implicit Variable}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ImplicitVariableImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getImplicitVariable() + * @generated + */ + EClass IMPLICIT_VARIABLE = eINSTANCE.getImplicitVariable(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.NegativeLiteralImpl Negative Literal}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.NegativeLiteralImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getNegativeLiteral() + * @generated + */ + EClass NEGATIVE_LITERAL = eINSTANCE.getNegativeLiteral(); + + /** + * The meta object literal for the 'Atom' containment reference feature. + * + * + * @generated + */ + EReference NEGATIVE_LITERAL__ATOM = eINSTANCE.getNegativeLiteral_Atom(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier Existential Quantifier}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getExistentialQuantifier() + * @generated + */ + EClass EXISTENTIAL_QUANTIFIER = eINSTANCE.getExistentialQuantifier(); + + /** + * The meta object literal for the 'Implicit Variables' containment reference list feature. + * + * + * @generated + */ + EReference EXISTENTIAL_QUANTIFIER__IMPLICIT_VARIABLES = eINSTANCE.getExistentialQuantifier_ImplicitVariables(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl Assertion}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getAssertion() + * @generated + */ + EClass ASSERTION = eINSTANCE.getAssertion(); + + /** + * The meta object literal for the 'Relation' reference feature. + * + * + * @generated + */ + EReference ASSERTION__RELATION = eINSTANCE.getAssertion_Relation(); + + /** + * The meta object literal for the 'Arguments' reference list feature. + * + * + * @generated + */ + EReference ASSERTION__ARGUMENTS = eINSTANCE.getAssertion_Arguments(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute ASSERTION__VALUE = eINSTANCE.getAssertion_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.NodeImpl Node}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.NodeImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getNode() + * @generated + */ + EClass NODE = eINSTANCE.getNode(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ScopeDeclarationImpl Scope Declaration}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ScopeDeclarationImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getScopeDeclaration() + * @generated + */ + EClass SCOPE_DECLARATION = eINSTANCE.getScopeDeclaration(); + + /** + * The meta object literal for the 'Type Scopes' containment reference list feature. + * + * + * @generated + */ + EReference SCOPE_DECLARATION__TYPE_SCOPES = eINSTANCE.getScopeDeclaration_TypeScopes(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.Statement Statement}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.Statement + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getStatement() + * @generated + */ + EClass STATEMENT = eINSTANCE.getStatement(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.TypeScopeImpl Type Scope}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.TypeScopeImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getTypeScope() + * @generated + */ + EClass TYPE_SCOPE = eINSTANCE.getTypeScope(); + + /** + * The meta object literal for the 'Target Type' reference feature. + * + * + * @generated + */ + EReference TYPE_SCOPE__TARGET_TYPE = eINSTANCE.getTypeScope_TargetType(); + + /** + * The meta object literal for the 'Increment' attribute feature. + * + * + * @generated + */ + EAttribute TYPE_SCOPE__INCREMENT = eINSTANCE.getTypeScope_Increment(); + + /** + * The meta object literal for the 'Multiplicity' containment reference feature. + * + * + * @generated + */ + EReference TYPE_SCOPE__MULTIPLICITY = eINSTANCE.getTypeScope_Multiplicity(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.MultiplicityImpl Multiplicity}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.MultiplicityImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getMultiplicity() + * @generated + */ + EClass MULTIPLICITY = eINSTANCE.getMultiplicity(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.RangeMultiplicityImpl Range Multiplicity}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.RangeMultiplicityImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getRangeMultiplicity() + * @generated + */ + EClass RANGE_MULTIPLICITY = eINSTANCE.getRangeMultiplicity(); + + /** + * The meta object literal for the 'Lower Bound' attribute feature. + * + * + * @generated + */ + EAttribute RANGE_MULTIPLICITY__LOWER_BOUND = eINSTANCE.getRangeMultiplicity_LowerBound(); + + /** + * The meta object literal for the 'Upper Bound' attribute feature. + * + * + * @generated + */ + EAttribute RANGE_MULTIPLICITY__UPPER_BOUND = eINSTANCE.getRangeMultiplicity_UpperBound(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.impl.ExactMultiplicityImpl Exact Multiplicity}' class. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.impl.ExactMultiplicityImpl + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getExactMultiplicity() + * @generated + */ + EClass EXACT_MULTIPLICITY = eINSTANCE.getExactMultiplicity(); + + /** + * The meta object literal for the 'Exact Value' attribute feature. + * + * + * @generated + */ + EAttribute EXACT_MULTIPLICITY__EXACT_VALUE = eINSTANCE.getExactMultiplicity_ExactValue(); + + /** + * The meta object literal for the '{@link org.eclipse.viatra.solver.language.model.problem.LogicValue Logic Value}' enum. + * + * + * @see org.eclipse.viatra.solver.language.model.problem.LogicValue + * @see org.eclipse.viatra.solver.language.model.problem.impl.ProblemPackageImpl#getLogicValue() + * @generated + */ + EEnum LOGIC_VALUE = eINSTANCE.getLogicValue(); + + } + +} //ProblemPackage diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/RangeMultiplicity.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/RangeMultiplicity.java new file mode 100644 index 00000000..65bcc440 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/RangeMultiplicity.java @@ -0,0 +1,69 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +/** + * + * A representation of the model object 'Range Multiplicity'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity#getLowerBound Lower Bound}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity#getUpperBound Upper Bound}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getRangeMultiplicity() + * @model + * @generated + */ +public interface RangeMultiplicity extends Multiplicity { + /** + * Returns the value of the 'Lower Bound' attribute. + * The default value is "0". + * + * + * @return the value of the 'Lower Bound' attribute. + * @see #setLowerBound(int) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getRangeMultiplicity_LowerBound() + * @model default="0" + * @generated + */ + int getLowerBound(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity#getLowerBound Lower Bound}' attribute. + * + * + * @param value the new value of the 'Lower Bound' attribute. + * @see #getLowerBound() + * @generated + */ + void setLowerBound(int value); + + /** + * Returns the value of the 'Upper Bound' attribute. + * The default value is "-1". + * + * + * @return the value of the 'Upper Bound' attribute. + * @see #setUpperBound(int) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getRangeMultiplicity_UpperBound() + * @model default="-1" + * @generated + */ + int getUpperBound(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity#getUpperBound Upper Bound}' attribute. + * + * + * @param value the new value of the 'Upper Bound' attribute. + * @see #getUpperBound() + * @generated + */ + void setUpperBound(int value); + +} // RangeMultiplicity diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ReferenceDeclaration.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ReferenceDeclaration.java new file mode 100644 index 00000000..f07ee7d1 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ReferenceDeclaration.java @@ -0,0 +1,113 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +/** + * + * A representation of the model object 'Reference Declaration'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getReferenceType Reference Type}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getOpposite Opposite}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#isContainment Containment}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getMultiplicity Multiplicity}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getReferenceDeclaration() + * @model + * @generated + */ +public interface ReferenceDeclaration extends Relation { + /** + * Returns the value of the 'Reference Type' reference. + * + * + * @return the value of the 'Reference Type' reference. + * @see #setReferenceType(ClassDeclaration) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getReferenceDeclaration_ReferenceType() + * @model + * @generated + */ + ClassDeclaration getReferenceType(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getReferenceType Reference Type}' reference. + * + * + * @param value the new value of the 'Reference Type' reference. + * @see #getReferenceType() + * @generated + */ + void setReferenceType(ClassDeclaration value); + + /** + * Returns the value of the 'Opposite' reference. + * + * + * @return the value of the 'Opposite' reference. + * @see #setOpposite(ReferenceDeclaration) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getReferenceDeclaration_Opposite() + * @model + * @generated + */ + ReferenceDeclaration getOpposite(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getOpposite Opposite}' reference. + * + * + * @param value the new value of the 'Opposite' reference. + * @see #getOpposite() + * @generated + */ + void setOpposite(ReferenceDeclaration value); + + /** + * Returns the value of the 'Containment' attribute. + * + * + * @return the value of the 'Containment' attribute. + * @see #setContainment(boolean) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getReferenceDeclaration_Containment() + * @model + * @generated + */ + boolean isContainment(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#isContainment Containment}' attribute. + * + * + * @param value the new value of the 'Containment' attribute. + * @see #isContainment() + * @generated + */ + void setContainment(boolean value); + + /** + * Returns the value of the 'Multiplicity' containment reference. + * + * + * @return the value of the 'Multiplicity' containment reference. + * @see #setMultiplicity(Multiplicity) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getReferenceDeclaration_Multiplicity() + * @model containment="true" + * @generated + */ + Multiplicity getMultiplicity(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration#getMultiplicity Multiplicity}' containment reference. + * + * + * @param value the new value of the 'Multiplicity' containment reference. + * @see #getMultiplicity() + * @generated + */ + void setMultiplicity(Multiplicity value); + +} // ReferenceDeclaration diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Relation.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Relation.java new file mode 100644 index 00000000..2754e9d0 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Relation.java @@ -0,0 +1,16 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +/** + * + * A representation of the model object 'Relation'. + * + * + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getRelation() + * @model abstract="true" + * @generated + */ +public interface Relation extends NamedElement { +} // Relation diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ScopeDeclaration.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ScopeDeclaration.java new file mode 100644 index 00000000..f728589d --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/ScopeDeclaration.java @@ -0,0 +1,36 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Scope Declaration'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration#getTypeScopes Type Scopes}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getScopeDeclaration() + * @model + * @generated + */ +public interface ScopeDeclaration extends Statement { + /** + * Returns the value of the 'Type Scopes' containment reference list. + * The list contents are of type {@link org.eclipse.viatra.solver.language.model.problem.TypeScope}. + * + * + * @return the value of the 'Type Scopes' containment reference list. + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getScopeDeclaration_TypeScopes() + * @model containment="true" + * @generated + */ + EList getTypeScopes(); + +} // ScopeDeclaration diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Statement.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Statement.java new file mode 100644 index 00000000..90303639 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Statement.java @@ -0,0 +1,18 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Statement'. + * + * + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getStatement() + * @model interface="true" abstract="true" + * @generated + */ +public interface Statement extends EObject { +} // Statement diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/TypeScope.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/TypeScope.java new file mode 100644 index 00000000..76a95dd5 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/TypeScope.java @@ -0,0 +1,92 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Type Scope'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.TypeScope#getTargetType Target Type}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.TypeScope#isIncrement Increment}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.TypeScope#getMultiplicity Multiplicity}
  • + *
+ * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getTypeScope() + * @model + * @generated + */ +public interface TypeScope extends EObject { + /** + * Returns the value of the 'Target Type' reference. + * + * + * @return the value of the 'Target Type' reference. + * @see #setTargetType(ClassDeclaration) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getTypeScope_TargetType() + * @model + * @generated + */ + ClassDeclaration getTargetType(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.TypeScope#getTargetType Target Type}' reference. + * + * + * @param value the new value of the 'Target Type' reference. + * @see #getTargetType() + * @generated + */ + void setTargetType(ClassDeclaration value); + + /** + * Returns the value of the 'Increment' attribute. + * + * + * @return the value of the 'Increment' attribute. + * @see #setIncrement(boolean) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getTypeScope_Increment() + * @model + * @generated + */ + boolean isIncrement(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.TypeScope#isIncrement Increment}' attribute. + * + * + * @param value the new value of the 'Increment' attribute. + * @see #isIncrement() + * @generated + */ + void setIncrement(boolean value); + + /** + * Returns the value of the 'Multiplicity' containment reference. + * + * + * @return the value of the 'Multiplicity' containment reference. + * @see #setMultiplicity(Multiplicity) + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getTypeScope_Multiplicity() + * @model containment="true" + * @generated + */ + Multiplicity getMultiplicity(); + + /** + * Sets the value of the '{@link org.eclipse.viatra.solver.language.model.problem.TypeScope#getMultiplicity Multiplicity}' containment reference. + * + * + * @param value the new value of the 'Multiplicity' containment reference. + * @see #getMultiplicity() + * @generated + */ + void setMultiplicity(Multiplicity value); + +} // TypeScope diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Variable.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Variable.java new file mode 100644 index 00000000..26637a35 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/Variable.java @@ -0,0 +1,16 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem; + +/** + * + * A representation of the model object 'Variable'. + * + * + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#getVariable() + * @model abstract="true" + * @generated + */ +public interface Variable extends NamedElement { +} // Variable diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java new file mode 100644 index 00000000..5856a276 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java @@ -0,0 +1,272 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +import org.eclipse.viatra.solver.language.model.problem.Assertion; +import org.eclipse.viatra.solver.language.model.problem.LogicValue; +import org.eclipse.viatra.solver.language.model.problem.Node; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.Relation; + +/** + * + * An implementation of the model object 'Assertion'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getRelation Relation}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getArguments Arguments}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getValue Value}
  • + *
+ * + * @generated + */ +public class AssertionImpl extends MinimalEObjectImpl.Container implements Assertion { + /** + * The cached value of the '{@link #getRelation() Relation}' reference. + * + * + * @see #getRelation() + * @generated + * @ordered + */ + protected Relation relation; + + /** + * The cached value of the '{@link #getArguments() Arguments}' reference list. + * + * + * @see #getArguments() + * @generated + * @ordered + */ + protected EList arguments; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final LogicValue VALUE_EDEFAULT = LogicValue.TRUE; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected LogicValue value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected AssertionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.ASSERTION; + } + + /** + * + * + * @generated + */ + public Relation getRelation() { + if (relation != null && relation.eIsProxy()) { + InternalEObject oldRelation = (InternalEObject) relation; + relation = (Relation) eResolveProxy(oldRelation); + if (relation != oldRelation) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.ASSERTION__RELATION, + oldRelation, relation)); + } + } + return relation; + } + + /** + * + * + * @generated + */ + public Relation basicGetRelation() { + return relation; + } + + /** + * + * + * @generated + */ + public void setRelation(Relation newRelation) { + Relation oldRelation = relation; + relation = newRelation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ASSERTION__RELATION, oldRelation, + relation)); + } + + /** + * + * + * @generated + */ + public EList getArguments() { + if (arguments == null) { + arguments = new EObjectResolvingEList(Node.class, this, ProblemPackage.ASSERTION__ARGUMENTS); + } + return arguments; + } + + /** + * + * + * @generated + */ + public LogicValue getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(LogicValue newValue) { + LogicValue oldValue = value; + value = newValue == null ? VALUE_EDEFAULT : newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ASSERTION__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.ASSERTION__RELATION: + if (resolve) + return getRelation(); + return basicGetRelation(); + case ProblemPackage.ASSERTION__ARGUMENTS: + return getArguments(); + case ProblemPackage.ASSERTION__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.ASSERTION__RELATION: + setRelation((Relation) newValue); + return; + case ProblemPackage.ASSERTION__ARGUMENTS: + getArguments().clear(); + getArguments().addAll((Collection) newValue); + return; + case ProblemPackage.ASSERTION__VALUE: + setValue((LogicValue) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.ASSERTION__RELATION: + setRelation((Relation) null); + return; + case ProblemPackage.ASSERTION__ARGUMENTS: + getArguments().clear(); + return; + case ProblemPackage.ASSERTION__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.ASSERTION__RELATION: + return relation != null; + case ProblemPackage.ASSERTION__ARGUMENTS: + return arguments != null && !arguments.isEmpty(); + case ProblemPackage.ASSERTION__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //AssertionImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java new file mode 100644 index 00000000..4571db14 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java @@ -0,0 +1,271 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +import org.eclipse.viatra.solver.language.model.problem.Atom; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.Relation; +import org.eclipse.viatra.solver.language.model.problem.Variable; + +/** + * + * An implementation of the model object 'Atom'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl#getRelation Relation}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl#getArguments Arguments}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl#isTransitiveClosure Transitive Closure}
  • + *
+ * + * @generated + */ +public class AtomImpl extends LiteralImpl implements Atom { + /** + * The cached value of the '{@link #getRelation() Relation}' reference. + * + * + * @see #getRelation() + * @generated + * @ordered + */ + protected Relation relation; + + /** + * The cached value of the '{@link #getArguments() Arguments}' reference list. + * + * + * @see #getArguments() + * @generated + * @ordered + */ + protected EList arguments; + + /** + * The default value of the '{@link #isTransitiveClosure() Transitive Closure}' attribute. + * + * + * @see #isTransitiveClosure() + * @generated + * @ordered + */ + protected static final boolean TRANSITIVE_CLOSURE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isTransitiveClosure() Transitive Closure}' attribute. + * + * + * @see #isTransitiveClosure() + * @generated + * @ordered + */ + protected boolean transitiveClosure = TRANSITIVE_CLOSURE_EDEFAULT; + + /** + * + * + * @generated + */ + protected AtomImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.ATOM; + } + + /** + * + * + * @generated + */ + public Relation getRelation() { + if (relation != null && relation.eIsProxy()) { + InternalEObject oldRelation = (InternalEObject) relation; + relation = (Relation) eResolveProxy(oldRelation); + if (relation != oldRelation) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.ATOM__RELATION, + oldRelation, relation)); + } + } + return relation; + } + + /** + * + * + * @generated + */ + public Relation basicGetRelation() { + return relation; + } + + /** + * + * + * @generated + */ + public void setRelation(Relation newRelation) { + Relation oldRelation = relation; + relation = newRelation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ATOM__RELATION, oldRelation, + relation)); + } + + /** + * + * + * @generated + */ + public EList getArguments() { + if (arguments == null) { + arguments = new EObjectResolvingEList(Variable.class, this, ProblemPackage.ATOM__ARGUMENTS); + } + return arguments; + } + + /** + * + * + * @generated + */ + public boolean isTransitiveClosure() { + return transitiveClosure; + } + + /** + * + * + * @generated + */ + public void setTransitiveClosure(boolean newTransitiveClosure) { + boolean oldTransitiveClosure = transitiveClosure; + transitiveClosure = newTransitiveClosure; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ATOM__TRANSITIVE_CLOSURE, + oldTransitiveClosure, transitiveClosure)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.ATOM__RELATION: + if (resolve) + return getRelation(); + return basicGetRelation(); + case ProblemPackage.ATOM__ARGUMENTS: + return getArguments(); + case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: + return isTransitiveClosure(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.ATOM__RELATION: + setRelation((Relation) newValue); + return; + case ProblemPackage.ATOM__ARGUMENTS: + getArguments().clear(); + getArguments().addAll((Collection) newValue); + return; + case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: + setTransitiveClosure((Boolean) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.ATOM__RELATION: + setRelation((Relation) null); + return; + case ProblemPackage.ATOM__ARGUMENTS: + getArguments().clear(); + return; + case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: + setTransitiveClosure(TRANSITIVE_CLOSURE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.ATOM__RELATION: + return relation != null; + case ProblemPackage.ATOM__ARGUMENTS: + return arguments != null && !arguments.isEmpty(); + case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: + return transitiveClosure != TRANSITIVE_CLOSURE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (transitiveClosure: "); + result.append(transitiveClosure); + result.append(')'); + return result.toString(); + } + +} //AtomImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java new file mode 100644 index 00000000..e1d07071 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java @@ -0,0 +1,260 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; + +/** + * + * An implementation of the model object 'Class Declaration'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl#isAbstract Abstract}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl#getSuperTypes Super Types}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl#getReferenceDeclarations Reference Declarations}
  • + *
+ * + * @generated + */ +public class ClassDeclarationImpl extends RelationImpl implements ClassDeclaration { + /** + * The default value of the '{@link #isAbstract() Abstract}' attribute. + * + * + * @see #isAbstract() + * @generated + * @ordered + */ + protected static final boolean ABSTRACT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isAbstract() Abstract}' attribute. + * + * + * @see #isAbstract() + * @generated + * @ordered + */ + protected boolean abstract_ = ABSTRACT_EDEFAULT; + + /** + * The cached value of the '{@link #getSuperTypes() Super Types}' reference list. + * + * + * @see #getSuperTypes() + * @generated + * @ordered + */ + protected EList superTypes; + + /** + * The cached value of the '{@link #getReferenceDeclarations() Reference Declarations}' containment reference list. + * + * + * @see #getReferenceDeclarations() + * @generated + * @ordered + */ + protected EList referenceDeclarations; + + /** + * + * + * @generated + */ + protected ClassDeclarationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.CLASS_DECLARATION; + } + + /** + * + * + * @generated + */ + public boolean isAbstract() { + return abstract_; + } + + /** + * + * + * @generated + */ + public void setAbstract(boolean newAbstract) { + boolean oldAbstract = abstract_; + abstract_ = newAbstract; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.CLASS_DECLARATION__ABSTRACT, + oldAbstract, abstract_)); + } + + /** + * + * + * @generated + */ + public EList getSuperTypes() { + if (superTypes == null) { + superTypes = new EObjectResolvingEList(ClassDeclaration.class, this, + ProblemPackage.CLASS_DECLARATION__SUPER_TYPES); + } + return superTypes; + } + + /** + * + * + * @generated + */ + public EList getReferenceDeclarations() { + if (referenceDeclarations == null) { + referenceDeclarations = new EObjectContainmentEList(ReferenceDeclaration.class, this, + ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS); + } + return referenceDeclarations; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: + return ((InternalEList) getReferenceDeclarations()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.CLASS_DECLARATION__ABSTRACT: + return isAbstract(); + case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES: + return getSuperTypes(); + case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: + return getReferenceDeclarations(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.CLASS_DECLARATION__ABSTRACT: + setAbstract((Boolean) newValue); + return; + case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES: + getSuperTypes().clear(); + getSuperTypes().addAll((Collection) newValue); + return; + case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: + getReferenceDeclarations().clear(); + getReferenceDeclarations().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.CLASS_DECLARATION__ABSTRACT: + setAbstract(ABSTRACT_EDEFAULT); + return; + case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES: + getSuperTypes().clear(); + return; + case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: + getReferenceDeclarations().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.CLASS_DECLARATION__ABSTRACT: + return abstract_ != ABSTRACT_EDEFAULT; + case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES: + return superTypes != null && !superTypes.isEmpty(); + case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: + return referenceDeclarations != null && !referenceDeclarations.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (abstract: "); + result.append(abstract_); + result.append(')'); + return result.toString(); + } + +} //ClassDeclarationImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConjunctionImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConjunctionImpl.java new file mode 100644 index 00000000..3bdf887f --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ConjunctionImpl.java @@ -0,0 +1,189 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.viatra.solver.language.model.problem.Conjunction; +import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; +import org.eclipse.viatra.solver.language.model.problem.Literal; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Conjunction'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ConjunctionImpl#getImplicitVariables Implicit Variables}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ConjunctionImpl#getLiterals Literals}
  • + *
+ * + * @generated + */ +public class ConjunctionImpl extends MinimalEObjectImpl.Container implements Conjunction { + /** + * The cached value of the '{@link #getImplicitVariables() Implicit Variables}' containment reference list. + * + * + * @see #getImplicitVariables() + * @generated + * @ordered + */ + protected EList implicitVariables; + /** + * The cached value of the '{@link #getLiterals() Literals}' containment reference list. + * + * + * @see #getLiterals() + * @generated + * @ordered + */ + protected EList literals; + + /** + * + * + * @generated + */ + protected ConjunctionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.CONJUNCTION; + } + + /** + * + * + * @generated + */ + public EList getImplicitVariables() { + if (implicitVariables == null) { + implicitVariables = new EObjectContainmentEList(ImplicitVariable.class, this, + ProblemPackage.CONJUNCTION__IMPLICIT_VARIABLES); + } + return implicitVariables; + } + + /** + * + * + * @generated + */ + public EList getLiterals() { + if (literals == null) { + literals = new EObjectContainmentEList(Literal.class, this, ProblemPackage.CONJUNCTION__LITERALS); + } + return literals; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ProblemPackage.CONJUNCTION__IMPLICIT_VARIABLES: + return ((InternalEList) getImplicitVariables()).basicRemove(otherEnd, msgs); + case ProblemPackage.CONJUNCTION__LITERALS: + return ((InternalEList) getLiterals()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.CONJUNCTION__IMPLICIT_VARIABLES: + return getImplicitVariables(); + case ProblemPackage.CONJUNCTION__LITERALS: + return getLiterals(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.CONJUNCTION__IMPLICIT_VARIABLES: + getImplicitVariables().clear(); + getImplicitVariables().addAll((Collection) newValue); + return; + case ProblemPackage.CONJUNCTION__LITERALS: + getLiterals().clear(); + getLiterals().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.CONJUNCTION__IMPLICIT_VARIABLES: + getImplicitVariables().clear(); + return; + case ProblemPackage.CONJUNCTION__LITERALS: + getLiterals().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.CONJUNCTION__IMPLICIT_VARIABLES: + return implicitVariables != null && !implicitVariables.isEmpty(); + case ProblemPackage.CONJUNCTION__LITERALS: + return literals != null && !literals.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ConjunctionImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ExactMultiplicityImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ExactMultiplicityImpl.java new file mode 100644 index 00000000..b3896ac2 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ExactMultiplicityImpl.java @@ -0,0 +1,164 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Exact Multiplicity'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ExactMultiplicityImpl#getExactValue Exact Value}
  • + *
+ * + * @generated + */ +public class ExactMultiplicityImpl extends MultiplicityImpl implements ExactMultiplicity { + /** + * The default value of the '{@link #getExactValue() Exact Value}' attribute. + * + * + * @see #getExactValue() + * @generated + * @ordered + */ + protected static final int EXACT_VALUE_EDEFAULT = 1; + + /** + * The cached value of the '{@link #getExactValue() Exact Value}' attribute. + * + * + * @see #getExactValue() + * @generated + * @ordered + */ + protected int exactValue = EXACT_VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected ExactMultiplicityImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.EXACT_MULTIPLICITY; + } + + /** + * + * + * @generated + */ + public int getExactValue() { + return exactValue; + } + + /** + * + * + * @generated + */ + public void setExactValue(int newExactValue) { + int oldExactValue = exactValue; + exactValue = newExactValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.EXACT_MULTIPLICITY__EXACT_VALUE, + oldExactValue, exactValue)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.EXACT_MULTIPLICITY__EXACT_VALUE: + return getExactValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.EXACT_MULTIPLICITY__EXACT_VALUE: + setExactValue((Integer) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.EXACT_MULTIPLICITY__EXACT_VALUE: + setExactValue(EXACT_VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.EXACT_MULTIPLICITY__EXACT_VALUE: + return exactValue != EXACT_VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (exactValue: "); + result.append(exactValue); + result.append(')'); + return result.toString(); + } + +} //ExactMultiplicityImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ImplicitVariableImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ImplicitVariableImpl.java new file mode 100644 index 00000000..03a31a16 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ImplicitVariableImpl.java @@ -0,0 +1,37 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Implicit Variable'. + * + * + * @generated + */ +public class ImplicitVariableImpl extends VariableImpl implements ImplicitVariable { + /** + * + * + * @generated + */ + protected ImplicitVariableImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.IMPLICIT_VARIABLE; + } + +} //ImplicitVariableImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/LiteralImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/LiteralImpl.java new file mode 100644 index 00000000..c48bdb0b --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/LiteralImpl.java @@ -0,0 +1,39 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.viatra.solver.language.model.problem.Literal; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Literal'. + * + * + * @generated + */ +public abstract class LiteralImpl extends MinimalEObjectImpl.Container implements Literal { + /** + * + * + * @generated + */ + protected LiteralImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.LITERAL; + } + +} //LiteralImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/MultiplicityImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/MultiplicityImpl.java new file mode 100644 index 00000000..8d769eb0 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/MultiplicityImpl.java @@ -0,0 +1,39 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.viatra.solver.language.model.problem.Multiplicity; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Multiplicity'. + * + * + * @generated + */ +public abstract class MultiplicityImpl extends MinimalEObjectImpl.Container implements Multiplicity { + /** + * + * + * @generated + */ + protected MultiplicityImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.MULTIPLICITY; + } + +} //MultiplicityImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NamedElementImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NamedElementImpl.java new file mode 100644 index 00000000..b414013b --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NamedElementImpl.java @@ -0,0 +1,164 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.viatra.solver.language.model.problem.NamedElement; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Named Element'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.NamedElementImpl#getName Name}
  • + *
+ * + * @generated + */ +public abstract class NamedElementImpl extends MinimalEObjectImpl.Container implements NamedElement { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected NamedElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.NAMED_ELEMENT; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.NAMED_ELEMENT__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.NAMED_ELEMENT__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.NAMED_ELEMENT__NAME: + setName((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.NAMED_ELEMENT__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.NAMED_ELEMENT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //NamedElementImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NegativeLiteralImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NegativeLiteralImpl.java new file mode 100644 index 00000000..5295406b --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NegativeLiteralImpl.java @@ -0,0 +1,228 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.viatra.solver.language.model.problem.Atom; +import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; +import org.eclipse.viatra.solver.language.model.problem.NegativeLiteral; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Negative Literal'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.NegativeLiteralImpl#getImplicitVariables Implicit Variables}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.NegativeLiteralImpl#getAtom Atom}
  • + *
+ * + * @generated + */ +public class NegativeLiteralImpl extends MinimalEObjectImpl.Container implements NegativeLiteral { + /** + * The cached value of the '{@link #getImplicitVariables() Implicit Variables}' containment reference list. + * + * + * @see #getImplicitVariables() + * @generated + * @ordered + */ + protected EList implicitVariables; + /** + * The cached value of the '{@link #getAtom() Atom}' containment reference. + * + * + * @see #getAtom() + * @generated + * @ordered + */ + protected Atom atom; + + /** + * + * + * @generated + */ + protected NegativeLiteralImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.NEGATIVE_LITERAL; + } + + /** + * + * + * @generated + */ + public EList getImplicitVariables() { + if (implicitVariables == null) { + implicitVariables = new EObjectContainmentEList(ImplicitVariable.class, this, + ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES); + } + return implicitVariables; + } + + /** + * + * + * @generated + */ + public Atom getAtom() { + return atom; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetAtom(Atom newAtom, NotificationChain msgs) { + Atom oldAtom = atom; + atom = newAtom; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + ProblemPackage.NEGATIVE_LITERAL__ATOM, oldAtom, newAtom); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setAtom(Atom newAtom) { + if (newAtom != atom) { + NotificationChain msgs = null; + if (atom != null) + msgs = ((InternalEObject) atom).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - ProblemPackage.NEGATIVE_LITERAL__ATOM, null, msgs); + if (newAtom != null) + msgs = ((InternalEObject) newAtom).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - ProblemPackage.NEGATIVE_LITERAL__ATOM, null, msgs); + msgs = basicSetAtom(newAtom, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.NEGATIVE_LITERAL__ATOM, newAtom, + newAtom)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES: + return ((InternalEList) getImplicitVariables()).basicRemove(otherEnd, msgs); + case ProblemPackage.NEGATIVE_LITERAL__ATOM: + return basicSetAtom(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES: + return getImplicitVariables(); + case ProblemPackage.NEGATIVE_LITERAL__ATOM: + return getAtom(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES: + getImplicitVariables().clear(); + getImplicitVariables().addAll((Collection) newValue); + return; + case ProblemPackage.NEGATIVE_LITERAL__ATOM: + setAtom((Atom) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES: + getImplicitVariables().clear(); + return; + case ProblemPackage.NEGATIVE_LITERAL__ATOM: + setAtom((Atom) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES: + return implicitVariables != null && !implicitVariables.isEmpty(); + case ProblemPackage.NEGATIVE_LITERAL__ATOM: + return atom != null; + } + return super.eIsSet(featureID); + } + +} //NegativeLiteralImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeImpl.java new file mode 100644 index 00000000..23b85a9c --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeImpl.java @@ -0,0 +1,37 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.viatra.solver.language.model.problem.Node; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Node'. + * + * + * @generated + */ +public class NodeImpl extends NamedElementImpl implements Node { + /** + * + * + * @generated + */ + protected NodeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.NODE; + } + +} //NodeImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ParameterImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ParameterImpl.java new file mode 100644 index 00000000..cfbf25b0 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ParameterImpl.java @@ -0,0 +1,159 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Parameter; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Parameter'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ParameterImpl#getParameterType Parameter Type}
  • + *
+ * + * @generated + */ +public class ParameterImpl extends VariableImpl implements Parameter { + /** + * The cached value of the '{@link #getParameterType() Parameter Type}' reference. + * + * + * @see #getParameterType() + * @generated + * @ordered + */ + protected ClassDeclaration parameterType; + + /** + * + * + * @generated + */ + protected ParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.PARAMETER; + } + + /** + * + * + * @generated + */ + public ClassDeclaration getParameterType() { + if (parameterType != null && parameterType.eIsProxy()) { + InternalEObject oldParameterType = (InternalEObject) parameterType; + parameterType = (ClassDeclaration) eResolveProxy(oldParameterType); + if (parameterType != oldParameterType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.PARAMETER__PARAMETER_TYPE, + oldParameterType, parameterType)); + } + } + return parameterType; + } + + /** + * + * + * @generated + */ + public ClassDeclaration basicGetParameterType() { + return parameterType; + } + + /** + * + * + * @generated + */ + public void setParameterType(ClassDeclaration newParameterType) { + ClassDeclaration oldParameterType = parameterType; + parameterType = newParameterType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.PARAMETER__PARAMETER_TYPE, + oldParameterType, parameterType)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.PARAMETER__PARAMETER_TYPE: + if (resolve) + return getParameterType(); + return basicGetParameterType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.PARAMETER__PARAMETER_TYPE: + setParameterType((ClassDeclaration) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.PARAMETER__PARAMETER_TYPE: + setParameterType((ClassDeclaration) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.PARAMETER__PARAMETER_TYPE: + return parameterType != null; + } + return super.eIsSet(featureID); + } + +} //ParameterImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/PredicateDefinitionImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/PredicateDefinitionImpl.java new file mode 100644 index 00000000..968b6de1 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/PredicateDefinitionImpl.java @@ -0,0 +1,262 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.viatra.solver.language.model.problem.Conjunction; +import org.eclipse.viatra.solver.language.model.problem.Parameter; +import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Predicate Definition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.PredicateDefinitionImpl#isError Error}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.PredicateDefinitionImpl#getParameters Parameters}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.PredicateDefinitionImpl#getBodies Bodies}
  • + *
+ * + * @generated + */ +public class PredicateDefinitionImpl extends RelationImpl implements PredicateDefinition { + /** + * The default value of the '{@link #isError() Error}' attribute. + * + * + * @see #isError() + * @generated + * @ordered + */ + protected static final boolean ERROR_EDEFAULT = false; + + /** + * The cached value of the '{@link #isError() Error}' attribute. + * + * + * @see #isError() + * @generated + * @ordered + */ + protected boolean error = ERROR_EDEFAULT; + + /** + * The cached value of the '{@link #getParameters() Parameters}' containment reference list. + * + * + * @see #getParameters() + * @generated + * @ordered + */ + protected EList parameters; + + /** + * The cached value of the '{@link #getBodies() Bodies}' containment reference list. + * + * + * @see #getBodies() + * @generated + * @ordered + */ + protected EList bodies; + + /** + * + * + * @generated + */ + protected PredicateDefinitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.PREDICATE_DEFINITION; + } + + /** + * + * + * @generated + */ + public boolean isError() { + return error; + } + + /** + * + * + * @generated + */ + public void setError(boolean newError) { + boolean oldError = error; + error = newError; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.PREDICATE_DEFINITION__ERROR, oldError, + error)); + } + + /** + * + * + * @generated + */ + public EList getParameters() { + if (parameters == null) { + parameters = new EObjectContainmentEList(Parameter.class, this, + ProblemPackage.PREDICATE_DEFINITION__PARAMETERS); + } + return parameters; + } + + /** + * + * + * @generated + */ + public EList getBodies() { + if (bodies == null) { + bodies = new EObjectContainmentEList(Conjunction.class, this, + ProblemPackage.PREDICATE_DEFINITION__BODIES); + } + return bodies; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ProblemPackage.PREDICATE_DEFINITION__PARAMETERS: + return ((InternalEList) getParameters()).basicRemove(otherEnd, msgs); + case ProblemPackage.PREDICATE_DEFINITION__BODIES: + return ((InternalEList) getBodies()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.PREDICATE_DEFINITION__ERROR: + return isError(); + case ProblemPackage.PREDICATE_DEFINITION__PARAMETERS: + return getParameters(); + case ProblemPackage.PREDICATE_DEFINITION__BODIES: + return getBodies(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.PREDICATE_DEFINITION__ERROR: + setError((Boolean) newValue); + return; + case ProblemPackage.PREDICATE_DEFINITION__PARAMETERS: + getParameters().clear(); + getParameters().addAll((Collection) newValue); + return; + case ProblemPackage.PREDICATE_DEFINITION__BODIES: + getBodies().clear(); + getBodies().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.PREDICATE_DEFINITION__ERROR: + setError(ERROR_EDEFAULT); + return; + case ProblemPackage.PREDICATE_DEFINITION__PARAMETERS: + getParameters().clear(); + return; + case ProblemPackage.PREDICATE_DEFINITION__BODIES: + getBodies().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.PREDICATE_DEFINITION__ERROR: + return error != ERROR_EDEFAULT; + case ProblemPackage.PREDICATE_DEFINITION__PARAMETERS: + return parameters != null && !parameters.isEmpty(); + case ProblemPackage.PREDICATE_DEFINITION__BODIES: + return bodies != null && !bodies.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (error: "); + result.append(error); + result.append(')'); + return result.toString(); + } + +} //PredicateDefinitionImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java new file mode 100644 index 00000000..563f8b05 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemFactoryImpl.java @@ -0,0 +1,317 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.viatra.solver.language.model.problem.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ProblemFactoryImpl extends EFactoryImpl implements ProblemFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ProblemFactory init() { + try { + ProblemFactory theProblemFactory = (ProblemFactory) EPackage.Registry.INSTANCE + .getEFactory(ProblemPackage.eNS_URI); + if (theProblemFactory != null) { + return theProblemFactory; + } + } catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ProblemFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ProblemFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ProblemPackage.PROBLEM: + return createProblem(); + case ProblemPackage.CLASS_DECLARATION: + return createClassDeclaration(); + case ProblemPackage.REFERENCE_DECLARATION: + return createReferenceDeclaration(); + case ProblemPackage.PREDICATE_DEFINITION: + return createPredicateDefinition(); + case ProblemPackage.PARAMETER: + return createParameter(); + case ProblemPackage.CONJUNCTION: + return createConjunction(); + case ProblemPackage.ATOM: + return createAtom(); + case ProblemPackage.IMPLICIT_VARIABLE: + return createImplicitVariable(); + case ProblemPackage.NEGATIVE_LITERAL: + return createNegativeLiteral(); + case ProblemPackage.ASSERTION: + return createAssertion(); + case ProblemPackage.NODE: + return createNode(); + case ProblemPackage.SCOPE_DECLARATION: + return createScopeDeclaration(); + case ProblemPackage.TYPE_SCOPE: + return createTypeScope(); + case ProblemPackage.RANGE_MULTIPLICITY: + return createRangeMultiplicity(); + case ProblemPackage.EXACT_MULTIPLICITY: + return createExactMultiplicity(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case ProblemPackage.LOGIC_VALUE: + return createLogicValueFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case ProblemPackage.LOGIC_VALUE: + return convertLogicValueToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Problem createProblem() { + ProblemImpl problem = new ProblemImpl(); + return problem; + } + + /** + * + * + * @generated + */ + public ClassDeclaration createClassDeclaration() { + ClassDeclarationImpl classDeclaration = new ClassDeclarationImpl(); + return classDeclaration; + } + + /** + * + * + * @generated + */ + public ReferenceDeclaration createReferenceDeclaration() { + ReferenceDeclarationImpl referenceDeclaration = new ReferenceDeclarationImpl(); + return referenceDeclaration; + } + + /** + * + * + * @generated + */ + public PredicateDefinition createPredicateDefinition() { + PredicateDefinitionImpl predicateDefinition = new PredicateDefinitionImpl(); + return predicateDefinition; + } + + /** + * + * + * @generated + */ + public Parameter createParameter() { + ParameterImpl parameter = new ParameterImpl(); + return parameter; + } + + /** + * + * + * @generated + */ + public Conjunction createConjunction() { + ConjunctionImpl conjunction = new ConjunctionImpl(); + return conjunction; + } + + /** + * + * + * @generated + */ + public Atom createAtom() { + AtomImpl atom = new AtomImpl(); + return atom; + } + + /** + * + * + * @generated + */ + public ImplicitVariable createImplicitVariable() { + ImplicitVariableImpl implicitVariable = new ImplicitVariableImpl(); + return implicitVariable; + } + + /** + * + * + * @generated + */ + public NegativeLiteral createNegativeLiteral() { + NegativeLiteralImpl negativeLiteral = new NegativeLiteralImpl(); + return negativeLiteral; + } + + /** + * + * + * @generated + */ + public Assertion createAssertion() { + AssertionImpl assertion = new AssertionImpl(); + return assertion; + } + + /** + * + * + * @generated + */ + public Node createNode() { + NodeImpl node = new NodeImpl(); + return node; + } + + /** + * + * + * @generated + */ + public ScopeDeclaration createScopeDeclaration() { + ScopeDeclarationImpl scopeDeclaration = new ScopeDeclarationImpl(); + return scopeDeclaration; + } + + /** + * + * + * @generated + */ + public TypeScope createTypeScope() { + TypeScopeImpl typeScope = new TypeScopeImpl(); + return typeScope; + } + + /** + * + * + * @generated + */ + public RangeMultiplicity createRangeMultiplicity() { + RangeMultiplicityImpl rangeMultiplicity = new RangeMultiplicityImpl(); + return rangeMultiplicity; + } + + /** + * + * + * @generated + */ + public ExactMultiplicity createExactMultiplicity() { + ExactMultiplicityImpl exactMultiplicity = new ExactMultiplicityImpl(); + return exactMultiplicity; + } + + /** + * + * + * @generated + */ + public LogicValue createLogicValueFromString(EDataType eDataType, String initialValue) { + LogicValue result = LogicValue.get(initialValue); + if (result == null) + throw new IllegalArgumentException( + "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertLogicValueToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public ProblemPackage getProblemPackage() { + return (ProblemPackage) getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ProblemPackage getPackage() { + return ProblemPackage.eINSTANCE; + } + +} //ProblemFactoryImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemImpl.java new file mode 100644 index 00000000..32bba265 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemImpl.java @@ -0,0 +1,189 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.viatra.solver.language.model.problem.Node; +import org.eclipse.viatra.solver.language.model.problem.Problem; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.Statement; + +/** + * + * An implementation of the model object 'Problem'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ProblemImpl#getNodes Nodes}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ProblemImpl#getStatements Statements}
  • + *
+ * + * @generated + */ +public class ProblemImpl extends MinimalEObjectImpl.Container implements Problem { + /** + * The cached value of the '{@link #getNodes() Nodes}' containment reference list. + * + * + * @see #getNodes() + * @generated + * @ordered + */ + protected EList nodes; + /** + * The cached value of the '{@link #getStatements() Statements}' containment reference list. + * + * + * @see #getStatements() + * @generated + * @ordered + */ + protected EList statements; + + /** + * + * + * @generated + */ + protected ProblemImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.PROBLEM; + } + + /** + * + * + * @generated + */ + public EList getNodes() { + if (nodes == null) { + nodes = new EObjectContainmentEList(Node.class, this, ProblemPackage.PROBLEM__NODES); + } + return nodes; + } + + /** + * + * + * @generated + */ + public EList getStatements() { + if (statements == null) { + statements = new EObjectContainmentEList(Statement.class, this, + ProblemPackage.PROBLEM__STATEMENTS); + } + return statements; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ProblemPackage.PROBLEM__NODES: + return ((InternalEList) getNodes()).basicRemove(otherEnd, msgs); + case ProblemPackage.PROBLEM__STATEMENTS: + return ((InternalEList) getStatements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.PROBLEM__NODES: + return getNodes(); + case ProblemPackage.PROBLEM__STATEMENTS: + return getStatements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.PROBLEM__NODES: + getNodes().clear(); + getNodes().addAll((Collection) newValue); + return; + case ProblemPackage.PROBLEM__STATEMENTS: + getStatements().clear(); + getStatements().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.PROBLEM__NODES: + getNodes().clear(); + return; + case ProblemPackage.PROBLEM__STATEMENTS: + getStatements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.PROBLEM__NODES: + return nodes != null && !nodes.isEmpty(); + case ProblemPackage.PROBLEM__STATEMENTS: + return statements != null && !statements.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ProblemImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java new file mode 100644 index 00000000..de0aa595 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ProblemPackageImpl.java @@ -0,0 +1,1061 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.viatra.solver.language.model.problem.Assertion; +import org.eclipse.viatra.solver.language.model.problem.Atom; +import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Conjunction; +import org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity; +import org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier; +import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; +import org.eclipse.viatra.solver.language.model.problem.Literal; +import org.eclipse.viatra.solver.language.model.problem.LogicValue; +import org.eclipse.viatra.solver.language.model.problem.Multiplicity; +import org.eclipse.viatra.solver.language.model.problem.NamedElement; +import org.eclipse.viatra.solver.language.model.problem.NegativeLiteral; +import org.eclipse.viatra.solver.language.model.problem.Node; +import org.eclipse.viatra.solver.language.model.problem.Parameter; +import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition; +import org.eclipse.viatra.solver.language.model.problem.Problem; +import org.eclipse.viatra.solver.language.model.problem.ProblemFactory; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity; +import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Relation; +import org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Statement; +import org.eclipse.viatra.solver.language.model.problem.TypeScope; +import org.eclipse.viatra.solver.language.model.problem.Variable; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ProblemPackageImpl extends EPackageImpl implements ProblemPackage { + /** + * + * + * @generated + */ + private EClass problemEClass = null; + + /** + * + * + * @generated + */ + private EClass relationEClass = null; + + /** + * + * + * @generated + */ + private EClass classDeclarationEClass = null; + + /** + * + * + * @generated + */ + private EClass referenceDeclarationEClass = null; + + /** + * + * + * @generated + */ + private EClass namedElementEClass = null; + + /** + * + * + * @generated + */ + private EClass predicateDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass parameterEClass = null; + + /** + * + * + * @generated + */ + private EClass variableEClass = null; + + /** + * + * + * @generated + */ + private EClass conjunctionEClass = null; + + /** + * + * + * @generated + */ + private EClass literalEClass = null; + + /** + * + * + * @generated + */ + private EClass atomEClass = null; + + /** + * + * + * @generated + */ + private EClass implicitVariableEClass = null; + + /** + * + * + * @generated + */ + private EClass negativeLiteralEClass = null; + + /** + * + * + * @generated + */ + private EClass existentialQuantifierEClass = null; + + /** + * + * + * @generated + */ + private EClass assertionEClass = null; + + /** + * + * + * @generated + */ + private EClass nodeEClass = null; + + /** + * + * + * @generated + */ + private EClass scopeDeclarationEClass = null; + + /** + * + * + * @generated + */ + private EClass statementEClass = null; + + /** + * + * + * @generated + */ + private EClass typeScopeEClass = null; + + /** + * + * + * @generated + */ + private EClass multiplicityEClass = null; + + /** + * + * + * @generated + */ + private EClass rangeMultiplicityEClass = null; + + /** + * + * + * @generated + */ + private EClass exactMultiplicityEClass = null; + + /** + * + * + * @generated + */ + private EEnum logicValueEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage#eNS_URI + * @see #init() + * @generated + */ + private ProblemPackageImpl() { + super(eNS_URI, ProblemFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ProblemPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ProblemPackage init() { + if (isInited) + return (ProblemPackage) EPackage.Registry.INSTANCE.getEPackage(ProblemPackage.eNS_URI); + + // Obtain or create and register package + Object registeredProblemPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + ProblemPackageImpl theProblemPackage = registeredProblemPackage instanceof ProblemPackageImpl + ? (ProblemPackageImpl) registeredProblemPackage + : new ProblemPackageImpl(); + + isInited = true; + + // Create package meta-data objects + theProblemPackage.createPackageContents(); + + // Initialize created meta-data + theProblemPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theProblemPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ProblemPackage.eNS_URI, theProblemPackage); + return theProblemPackage; + } + + /** + * + * + * @generated + */ + public EClass getProblem() { + return problemEClass; + } + + /** + * + * + * @generated + */ + public EReference getProblem_Nodes() { + return (EReference) problemEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getProblem_Statements() { + return (EReference) problemEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getRelation() { + return relationEClass; + } + + /** + * + * + * @generated + */ + public EClass getClassDeclaration() { + return classDeclarationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getClassDeclaration_Abstract() { + return (EAttribute) classDeclarationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getClassDeclaration_SuperTypes() { + return (EReference) classDeclarationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getClassDeclaration_ReferenceDeclarations() { + return (EReference) classDeclarationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getReferenceDeclaration() { + return referenceDeclarationEClass; + } + + /** + * + * + * @generated + */ + public EReference getReferenceDeclaration_ReferenceType() { + return (EReference) referenceDeclarationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getReferenceDeclaration_Opposite() { + return (EReference) referenceDeclarationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getReferenceDeclaration_Containment() { + return (EAttribute) referenceDeclarationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getReferenceDeclaration_Multiplicity() { + return (EReference) referenceDeclarationEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getNamedElement() { + return namedElementEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getNamedElement_Name() { + return (EAttribute) namedElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getPredicateDefinition() { + return predicateDefinitionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPredicateDefinition_Error() { + return (EAttribute) predicateDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getPredicateDefinition_Parameters() { + return (EReference) predicateDefinitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getPredicateDefinition_Bodies() { + return (EReference) predicateDefinitionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getParameter() { + return parameterEClass; + } + + /** + * + * + * @generated + */ + public EReference getParameter_ParameterType() { + return (EReference) parameterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getVariable() { + return variableEClass; + } + + /** + * + * + * @generated + */ + public EClass getConjunction() { + return conjunctionEClass; + } + + /** + * + * + * @generated + */ + public EReference getConjunction_Literals() { + return (EReference) conjunctionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getLiteral() { + return literalEClass; + } + + /** + * + * + * @generated + */ + public EClass getAtom() { + return atomEClass; + } + + /** + * + * + * @generated + */ + public EReference getAtom_Relation() { + return (EReference) atomEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getAtom_Arguments() { + return (EReference) atomEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getAtom_TransitiveClosure() { + return (EAttribute) atomEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getImplicitVariable() { + return implicitVariableEClass; + } + + /** + * + * + * @generated + */ + public EClass getNegativeLiteral() { + return negativeLiteralEClass; + } + + /** + * + * + * @generated + */ + public EReference getNegativeLiteral_Atom() { + return (EReference) negativeLiteralEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getExistentialQuantifier() { + return existentialQuantifierEClass; + } + + /** + * + * + * @generated + */ + public EReference getExistentialQuantifier_ImplicitVariables() { + return (EReference) existentialQuantifierEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getAssertion() { + return assertionEClass; + } + + /** + * + * + * @generated + */ + public EReference getAssertion_Relation() { + return (EReference) assertionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getAssertion_Arguments() { + return (EReference) assertionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getAssertion_Value() { + return (EAttribute) assertionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getNode() { + return nodeEClass; + } + + /** + * + * + * @generated + */ + public EClass getScopeDeclaration() { + return scopeDeclarationEClass; + } + + /** + * + * + * @generated + */ + public EReference getScopeDeclaration_TypeScopes() { + return (EReference) scopeDeclarationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getStatement() { + return statementEClass; + } + + /** + * + * + * @generated + */ + public EClass getTypeScope() { + return typeScopeEClass; + } + + /** + * + * + * @generated + */ + public EReference getTypeScope_TargetType() { + return (EReference) typeScopeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getTypeScope_Increment() { + return (EAttribute) typeScopeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getTypeScope_Multiplicity() { + return (EReference) typeScopeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getMultiplicity() { + return multiplicityEClass; + } + + /** + * + * + * @generated + */ + public EClass getRangeMultiplicity() { + return rangeMultiplicityEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getRangeMultiplicity_LowerBound() { + return (EAttribute) rangeMultiplicityEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getRangeMultiplicity_UpperBound() { + return (EAttribute) rangeMultiplicityEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getExactMultiplicity() { + return exactMultiplicityEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getExactMultiplicity_ExactValue() { + return (EAttribute) exactMultiplicityEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EEnum getLogicValue() { + return logicValueEEnum; + } + + /** + * + * + * @generated + */ + public ProblemFactory getProblemFactory() { + return (ProblemFactory) getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) + return; + isCreated = true; + + // Create classes and their features + problemEClass = createEClass(PROBLEM); + createEReference(problemEClass, PROBLEM__NODES); + createEReference(problemEClass, PROBLEM__STATEMENTS); + + relationEClass = createEClass(RELATION); + + classDeclarationEClass = createEClass(CLASS_DECLARATION); + createEAttribute(classDeclarationEClass, CLASS_DECLARATION__ABSTRACT); + createEReference(classDeclarationEClass, CLASS_DECLARATION__SUPER_TYPES); + createEReference(classDeclarationEClass, CLASS_DECLARATION__REFERENCE_DECLARATIONS); + + referenceDeclarationEClass = createEClass(REFERENCE_DECLARATION); + createEReference(referenceDeclarationEClass, REFERENCE_DECLARATION__REFERENCE_TYPE); + createEReference(referenceDeclarationEClass, REFERENCE_DECLARATION__OPPOSITE); + createEAttribute(referenceDeclarationEClass, REFERENCE_DECLARATION__CONTAINMENT); + createEReference(referenceDeclarationEClass, REFERENCE_DECLARATION__MULTIPLICITY); + + namedElementEClass = createEClass(NAMED_ELEMENT); + createEAttribute(namedElementEClass, NAMED_ELEMENT__NAME); + + predicateDefinitionEClass = createEClass(PREDICATE_DEFINITION); + createEAttribute(predicateDefinitionEClass, PREDICATE_DEFINITION__ERROR); + createEReference(predicateDefinitionEClass, PREDICATE_DEFINITION__PARAMETERS); + createEReference(predicateDefinitionEClass, PREDICATE_DEFINITION__BODIES); + + parameterEClass = createEClass(PARAMETER); + createEReference(parameterEClass, PARAMETER__PARAMETER_TYPE); + + variableEClass = createEClass(VARIABLE); + + conjunctionEClass = createEClass(CONJUNCTION); + createEReference(conjunctionEClass, CONJUNCTION__LITERALS); + + literalEClass = createEClass(LITERAL); + + atomEClass = createEClass(ATOM); + createEReference(atomEClass, ATOM__RELATION); + createEReference(atomEClass, ATOM__ARGUMENTS); + createEAttribute(atomEClass, ATOM__TRANSITIVE_CLOSURE); + + implicitVariableEClass = createEClass(IMPLICIT_VARIABLE); + + negativeLiteralEClass = createEClass(NEGATIVE_LITERAL); + createEReference(negativeLiteralEClass, NEGATIVE_LITERAL__ATOM); + + existentialQuantifierEClass = createEClass(EXISTENTIAL_QUANTIFIER); + createEReference(existentialQuantifierEClass, EXISTENTIAL_QUANTIFIER__IMPLICIT_VARIABLES); + + assertionEClass = createEClass(ASSERTION); + createEReference(assertionEClass, ASSERTION__RELATION); + createEReference(assertionEClass, ASSERTION__ARGUMENTS); + createEAttribute(assertionEClass, ASSERTION__VALUE); + + nodeEClass = createEClass(NODE); + + scopeDeclarationEClass = createEClass(SCOPE_DECLARATION); + createEReference(scopeDeclarationEClass, SCOPE_DECLARATION__TYPE_SCOPES); + + statementEClass = createEClass(STATEMENT); + + typeScopeEClass = createEClass(TYPE_SCOPE); + createEReference(typeScopeEClass, TYPE_SCOPE__TARGET_TYPE); + createEAttribute(typeScopeEClass, TYPE_SCOPE__INCREMENT); + createEReference(typeScopeEClass, TYPE_SCOPE__MULTIPLICITY); + + multiplicityEClass = createEClass(MULTIPLICITY); + + rangeMultiplicityEClass = createEClass(RANGE_MULTIPLICITY); + createEAttribute(rangeMultiplicityEClass, RANGE_MULTIPLICITY__LOWER_BOUND); + createEAttribute(rangeMultiplicityEClass, RANGE_MULTIPLICITY__UPPER_BOUND); + + exactMultiplicityEClass = createEClass(EXACT_MULTIPLICITY); + createEAttribute(exactMultiplicityEClass, EXACT_MULTIPLICITY__EXACT_VALUE); + + // Create enums + logicValueEEnum = createEEnum(LOGIC_VALUE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) + return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + relationEClass.getESuperTypes().add(this.getNamedElement()); + classDeclarationEClass.getESuperTypes().add(this.getRelation()); + classDeclarationEClass.getESuperTypes().add(this.getStatement()); + referenceDeclarationEClass.getESuperTypes().add(this.getRelation()); + predicateDefinitionEClass.getESuperTypes().add(this.getRelation()); + predicateDefinitionEClass.getESuperTypes().add(this.getStatement()); + parameterEClass.getESuperTypes().add(this.getVariable()); + variableEClass.getESuperTypes().add(this.getNamedElement()); + conjunctionEClass.getESuperTypes().add(this.getExistentialQuantifier()); + atomEClass.getESuperTypes().add(this.getLiteral()); + implicitVariableEClass.getESuperTypes().add(this.getVariable()); + negativeLiteralEClass.getESuperTypes().add(this.getExistentialQuantifier()); + negativeLiteralEClass.getESuperTypes().add(this.getLiteral()); + assertionEClass.getESuperTypes().add(this.getStatement()); + nodeEClass.getESuperTypes().add(this.getNamedElement()); + scopeDeclarationEClass.getESuperTypes().add(this.getStatement()); + rangeMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); + exactMultiplicityEClass.getESuperTypes().add(this.getMultiplicity()); + + // Initialize classes, features, and operations; add parameters + initEClass(problemEClass, Problem.class, "Problem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getProblem_Nodes(), this.getNode(), null, "nodes", null, 0, -1, Problem.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEReference(getProblem_Statements(), this.getStatement(), null, "statements", null, 0, -1, Problem.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(relationEClass, Relation.class, "Relation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(classDeclarationEClass, ClassDeclaration.class, "ClassDeclaration", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getClassDeclaration_Abstract(), ecorePackage.getEBoolean(), "abstract", null, 0, 1, + ClassDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getClassDeclaration_SuperTypes(), this.getClassDeclaration(), null, "superTypes", null, 0, -1, + ClassDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getClassDeclaration_ReferenceDeclarations(), this.getReferenceDeclaration(), null, + "referenceDeclarations", null, 0, -1, ClassDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(referenceDeclarationEClass, ReferenceDeclaration.class, "ReferenceDeclaration", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getReferenceDeclaration_ReferenceType(), this.getClassDeclaration(), null, "referenceType", null, + 0, 1, ReferenceDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getReferenceDeclaration_Opposite(), this.getReferenceDeclaration(), null, "opposite", null, 0, 1, + ReferenceDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getReferenceDeclaration_Containment(), ecorePackage.getEBoolean(), "containment", null, 0, 1, + ReferenceDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getReferenceDeclaration_Multiplicity(), this.getMultiplicity(), null, "multiplicity", null, 0, 1, + ReferenceDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(namedElementEClass, NamedElement.class, "NamedElement", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getNamedElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedElement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(predicateDefinitionEClass, PredicateDefinition.class, "PredicateDefinition", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPredicateDefinition_Error(), ecorePackage.getEBoolean(), "error", null, 0, 1, + PredicateDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPredicateDefinition_Parameters(), this.getParameter(), null, "parameters", null, 0, -1, + PredicateDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPredicateDefinition_Bodies(), this.getConjunction(), null, "bodies", null, 0, -1, + PredicateDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(parameterEClass, Parameter.class, "Parameter", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getParameter_ParameterType(), this.getClassDeclaration(), null, "parameterType", null, 0, 1, + Parameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(variableEClass, Variable.class, "Variable", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(conjunctionEClass, Conjunction.class, "Conjunction", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getConjunction_Literals(), this.getLiteral(), null, "literals", null, 0, -1, Conjunction.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(literalEClass, Literal.class, "Literal", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(atomEClass, Atom.class, "Atom", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAtom_Relation(), this.getRelation(), null, "relation", null, 0, 1, Atom.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEReference(getAtom_Arguments(), this.getVariable(), null, "arguments", null, 0, -1, Atom.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAtom_TransitiveClosure(), ecorePackage.getEBoolean(), "transitiveClosure", null, 0, 1, + Atom.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + initEClass(implicitVariableEClass, ImplicitVariable.class, "ImplicitVariable", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(negativeLiteralEClass, NegativeLiteral.class, "NegativeLiteral", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getNegativeLiteral_Atom(), this.getAtom(), null, "atom", null, 0, 1, NegativeLiteral.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(existentialQuantifierEClass, ExistentialQuantifier.class, "ExistentialQuantifier", IS_ABSTRACT, + IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getExistentialQuantifier_ImplicitVariables(), this.getImplicitVariable(), null, + "implicitVariables", null, 0, -1, ExistentialQuantifier.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(assertionEClass, Assertion.class, "Assertion", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getAssertion_Relation(), this.getRelation(), null, "relation", null, 0, 1, Assertion.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAssertion_Arguments(), this.getNode(), null, "arguments", null, 0, -1, Assertion.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAssertion_Value(), this.getLogicValue(), "value", null, 0, 1, Assertion.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(nodeEClass, Node.class, "Node", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(scopeDeclarationEClass, ScopeDeclaration.class, "ScopeDeclaration", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getScopeDeclaration_TypeScopes(), this.getTypeScope(), null, "typeScopes", null, 0, -1, + ScopeDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(statementEClass, Statement.class, "Statement", IS_ABSTRACT, IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(typeScopeEClass, TypeScope.class, "TypeScope", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getTypeScope_TargetType(), this.getClassDeclaration(), null, "targetType", null, 0, 1, + TypeScope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTypeScope_Increment(), ecorePackage.getEBoolean(), "increment", null, 0, 1, TypeScope.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getTypeScope_Multiplicity(), this.getMultiplicity(), null, "multiplicity", null, 0, 1, + TypeScope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(multiplicityEClass, Multiplicity.class, "Multiplicity", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(rangeMultiplicityEClass, RangeMultiplicity.class, "RangeMultiplicity", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getRangeMultiplicity_LowerBound(), ecorePackage.getEInt(), "lowerBound", "0", 0, 1, + RangeMultiplicity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getRangeMultiplicity_UpperBound(), ecorePackage.getEInt(), "upperBound", "-1", 0, 1, + RangeMultiplicity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + initEClass(exactMultiplicityEClass, ExactMultiplicity.class, "ExactMultiplicity", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getExactMultiplicity_ExactValue(), ecorePackage.getEInt(), "exactValue", "1", 0, 1, + ExactMultiplicity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(logicValueEEnum, LogicValue.class, "LogicValue"); + addEEnumLiteral(logicValueEEnum, LogicValue.TRUE); + addEEnumLiteral(logicValueEEnum, LogicValue.FALSE); + addEEnumLiteral(logicValueEEnum, LogicValue.UNKNOWN); + + // Create resource + createResource(eNS_URI); + } + +} //ProblemPackageImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RangeMultiplicityImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RangeMultiplicityImpl.java new file mode 100644 index 00000000..1122b5be --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RangeMultiplicityImpl.java @@ -0,0 +1,219 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity; + +/** + * + * An implementation of the model object 'Range Multiplicity'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.RangeMultiplicityImpl#getLowerBound Lower Bound}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.RangeMultiplicityImpl#getUpperBound Upper Bound}
  • + *
+ * + * @generated + */ +public class RangeMultiplicityImpl extends MultiplicityImpl implements RangeMultiplicity { + /** + * The default value of the '{@link #getLowerBound() Lower Bound}' attribute. + * + * + * @see #getLowerBound() + * @generated + * @ordered + */ + protected static final int LOWER_BOUND_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getLowerBound() Lower Bound}' attribute. + * + * + * @see #getLowerBound() + * @generated + * @ordered + */ + protected int lowerBound = LOWER_BOUND_EDEFAULT; + + /** + * The default value of the '{@link #getUpperBound() Upper Bound}' attribute. + * + * + * @see #getUpperBound() + * @generated + * @ordered + */ + protected static final int UPPER_BOUND_EDEFAULT = -1; + + /** + * The cached value of the '{@link #getUpperBound() Upper Bound}' attribute. + * + * + * @see #getUpperBound() + * @generated + * @ordered + */ + protected int upperBound = UPPER_BOUND_EDEFAULT; + + /** + * + * + * @generated + */ + protected RangeMultiplicityImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.RANGE_MULTIPLICITY; + } + + /** + * + * + * @generated + */ + public int getLowerBound() { + return lowerBound; + } + + /** + * + * + * @generated + */ + public void setLowerBound(int newLowerBound) { + int oldLowerBound = lowerBound; + lowerBound = newLowerBound; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.RANGE_MULTIPLICITY__LOWER_BOUND, + oldLowerBound, lowerBound)); + } + + /** + * + * + * @generated + */ + public int getUpperBound() { + return upperBound; + } + + /** + * + * + * @generated + */ + public void setUpperBound(int newUpperBound) { + int oldUpperBound = upperBound; + upperBound = newUpperBound; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.RANGE_MULTIPLICITY__UPPER_BOUND, + oldUpperBound, upperBound)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.RANGE_MULTIPLICITY__LOWER_BOUND: + return getLowerBound(); + case ProblemPackage.RANGE_MULTIPLICITY__UPPER_BOUND: + return getUpperBound(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.RANGE_MULTIPLICITY__LOWER_BOUND: + setLowerBound((Integer) newValue); + return; + case ProblemPackage.RANGE_MULTIPLICITY__UPPER_BOUND: + setUpperBound((Integer) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.RANGE_MULTIPLICITY__LOWER_BOUND: + setLowerBound(LOWER_BOUND_EDEFAULT); + return; + case ProblemPackage.RANGE_MULTIPLICITY__UPPER_BOUND: + setUpperBound(UPPER_BOUND_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.RANGE_MULTIPLICITY__LOWER_BOUND: + return lowerBound != LOWER_BOUND_EDEFAULT; + case ProblemPackage.RANGE_MULTIPLICITY__UPPER_BOUND: + return upperBound != UPPER_BOUND_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (lowerBound: "); + result.append(lowerBound); + result.append(", upperBound: "); + result.append(upperBound); + result.append(')'); + return result.toString(); + } + +} //RangeMultiplicityImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java new file mode 100644 index 00000000..424db23d --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java @@ -0,0 +1,379 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Multiplicity; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; + +/** + * + * An implementation of the model object 'Reference Declaration'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl#getReferenceType Reference Type}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl#getOpposite Opposite}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl#isContainment Containment}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl#getMultiplicity Multiplicity}
  • + *
+ * + * @generated + */ +public class ReferenceDeclarationImpl extends RelationImpl implements ReferenceDeclaration { + /** + * The cached value of the '{@link #getReferenceType() Reference Type}' reference. + * + * + * @see #getReferenceType() + * @generated + * @ordered + */ + protected ClassDeclaration referenceType; + + /** + * The cached value of the '{@link #getOpposite() Opposite}' reference. + * + * + * @see #getOpposite() + * @generated + * @ordered + */ + protected ReferenceDeclaration opposite; + + /** + * The default value of the '{@link #isContainment() Containment}' attribute. + * + * + * @see #isContainment() + * @generated + * @ordered + */ + protected static final boolean CONTAINMENT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isContainment() Containment}' attribute. + * + * + * @see #isContainment() + * @generated + * @ordered + */ + protected boolean containment = CONTAINMENT_EDEFAULT; + + /** + * The cached value of the '{@link #getMultiplicity() Multiplicity}' containment reference. + * + * + * @see #getMultiplicity() + * @generated + * @ordered + */ + protected Multiplicity multiplicity; + + /** + * + * + * @generated + */ + protected ReferenceDeclarationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.REFERENCE_DECLARATION; + } + + /** + * + * + * @generated + */ + public ClassDeclaration getReferenceType() { + if (referenceType != null && referenceType.eIsProxy()) { + InternalEObject oldReferenceType = (InternalEObject) referenceType; + referenceType = (ClassDeclaration) eResolveProxy(oldReferenceType); + if (referenceType != oldReferenceType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE, oldReferenceType, referenceType)); + } + } + return referenceType; + } + + /** + * + * + * @generated + */ + public ClassDeclaration basicGetReferenceType() { + return referenceType; + } + + /** + * + * + * @generated + */ + public void setReferenceType(ClassDeclaration newReferenceType) { + ClassDeclaration oldReferenceType = referenceType; + referenceType = newReferenceType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE, + oldReferenceType, referenceType)); + } + + /** + * + * + * @generated + */ + public ReferenceDeclaration getOpposite() { + if (opposite != null && opposite.eIsProxy()) { + InternalEObject oldOpposite = (InternalEObject) opposite; + opposite = (ReferenceDeclaration) eResolveProxy(oldOpposite); + if (opposite != oldOpposite) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + ProblemPackage.REFERENCE_DECLARATION__OPPOSITE, oldOpposite, opposite)); + } + } + return opposite; + } + + /** + * + * + * @generated + */ + public ReferenceDeclaration basicGetOpposite() { + return opposite; + } + + /** + * + * + * @generated + */ + public void setOpposite(ReferenceDeclaration newOpposite) { + ReferenceDeclaration oldOpposite = opposite; + opposite = newOpposite; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REFERENCE_DECLARATION__OPPOSITE, + oldOpposite, opposite)); + } + + /** + * + * + * @generated + */ + public boolean isContainment() { + return containment; + } + + /** + * + * + * @generated + */ + public void setContainment(boolean newContainment) { + boolean oldContainment = containment; + containment = newContainment; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REFERENCE_DECLARATION__CONTAINMENT, + oldContainment, containment)); + } + + /** + * + * + * @generated + */ + public Multiplicity getMultiplicity() { + return multiplicity; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetMultiplicity(Multiplicity newMultiplicity, NotificationChain msgs) { + Multiplicity oldMultiplicity = multiplicity; + multiplicity = newMultiplicity; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY, oldMultiplicity, newMultiplicity); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setMultiplicity(Multiplicity newMultiplicity) { + if (newMultiplicity != multiplicity) { + NotificationChain msgs = null; + if (multiplicity != null) + msgs = ((InternalEObject) multiplicity).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY, null, msgs); + if (newMultiplicity != null) + msgs = ((InternalEObject) newMultiplicity).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY, null, msgs); + msgs = basicSetMultiplicity(newMultiplicity, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY, + newMultiplicity, newMultiplicity)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY: + return basicSetMultiplicity(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: + if (resolve) + return getReferenceType(); + return basicGetReferenceType(); + case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: + if (resolve) + return getOpposite(); + return basicGetOpposite(); + case ProblemPackage.REFERENCE_DECLARATION__CONTAINMENT: + return isContainment(); + case ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY: + return getMultiplicity(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: + setReferenceType((ClassDeclaration) newValue); + return; + case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: + setOpposite((ReferenceDeclaration) newValue); + return; + case ProblemPackage.REFERENCE_DECLARATION__CONTAINMENT: + setContainment((Boolean) newValue); + return; + case ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY: + setMultiplicity((Multiplicity) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: + setReferenceType((ClassDeclaration) null); + return; + case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: + setOpposite((ReferenceDeclaration) null); + return; + case ProblemPackage.REFERENCE_DECLARATION__CONTAINMENT: + setContainment(CONTAINMENT_EDEFAULT); + return; + case ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY: + setMultiplicity((Multiplicity) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: + return referenceType != null; + case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: + return opposite != null; + case ProblemPackage.REFERENCE_DECLARATION__CONTAINMENT: + return containment != CONTAINMENT_EDEFAULT; + case ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY: + return multiplicity != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (containment: "); + result.append(containment); + result.append(')'); + return result.toString(); + } + +} //ReferenceDeclarationImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RelationImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RelationImpl.java new file mode 100644 index 00000000..20d43043 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/RelationImpl.java @@ -0,0 +1,37 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.Relation; + +/** + * + * An implementation of the model object 'Relation'. + * + * + * @generated + */ +public abstract class RelationImpl extends NamedElementImpl implements Relation { + /** + * + * + * @generated + */ + protected RelationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.RELATION; + } + +} //RelationImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ScopeDeclarationImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ScopeDeclarationImpl.java new file mode 100644 index 00000000..f178d9e0 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ScopeDeclarationImpl.java @@ -0,0 +1,153 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration; +import org.eclipse.viatra.solver.language.model.problem.TypeScope; + +/** + * + * An implementation of the model object 'Scope Declaration'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.ScopeDeclarationImpl#getTypeScopes Type Scopes}
  • + *
+ * + * @generated + */ +public class ScopeDeclarationImpl extends MinimalEObjectImpl.Container implements ScopeDeclaration { + /** + * The cached value of the '{@link #getTypeScopes() Type Scopes}' containment reference list. + * + * + * @see #getTypeScopes() + * @generated + * @ordered + */ + protected EList typeScopes; + + /** + * + * + * @generated + */ + protected ScopeDeclarationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.SCOPE_DECLARATION; + } + + /** + * + * + * @generated + */ + public EList getTypeScopes() { + if (typeScopes == null) { + typeScopes = new EObjectContainmentEList(TypeScope.class, this, + ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES); + } + return typeScopes; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES: + return ((InternalEList) getTypeScopes()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES: + return getTypeScopes(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES: + getTypeScopes().clear(); + getTypeScopes().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES: + getTypeScopes().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES: + return typeScopes != null && !typeScopes.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ScopeDeclarationImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/TypeScopeImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/TypeScopeImpl.java new file mode 100644 index 00000000..608cc015 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/TypeScopeImpl.java @@ -0,0 +1,317 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Multiplicity; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.TypeScope; + +/** + * + * An implementation of the model object 'Type Scope'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.TypeScopeImpl#getTargetType Target Type}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.TypeScopeImpl#isIncrement Increment}
  • + *
  • {@link org.eclipse.viatra.solver.language.model.problem.impl.TypeScopeImpl#getMultiplicity Multiplicity}
  • + *
+ * + * @generated + */ +public class TypeScopeImpl extends MinimalEObjectImpl.Container implements TypeScope { + /** + * The cached value of the '{@link #getTargetType() Target Type}' reference. + * + * + * @see #getTargetType() + * @generated + * @ordered + */ + protected ClassDeclaration targetType; + + /** + * The default value of the '{@link #isIncrement() Increment}' attribute. + * + * + * @see #isIncrement() + * @generated + * @ordered + */ + protected static final boolean INCREMENT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isIncrement() Increment}' attribute. + * + * + * @see #isIncrement() + * @generated + * @ordered + */ + protected boolean increment = INCREMENT_EDEFAULT; + + /** + * The cached value of the '{@link #getMultiplicity() Multiplicity}' containment reference. + * + * + * @see #getMultiplicity() + * @generated + * @ordered + */ + protected Multiplicity multiplicity; + + /** + * + * + * @generated + */ + protected TypeScopeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.TYPE_SCOPE; + } + + /** + * + * + * @generated + */ + public ClassDeclaration getTargetType() { + if (targetType != null && targetType.eIsProxy()) { + InternalEObject oldTargetType = (InternalEObject) targetType; + targetType = (ClassDeclaration) eResolveProxy(oldTargetType); + if (targetType != oldTargetType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.TYPE_SCOPE__TARGET_TYPE, + oldTargetType, targetType)); + } + } + return targetType; + } + + /** + * + * + * @generated + */ + public ClassDeclaration basicGetTargetType() { + return targetType; + } + + /** + * + * + * @generated + */ + public void setTargetType(ClassDeclaration newTargetType) { + ClassDeclaration oldTargetType = targetType; + targetType = newTargetType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.TYPE_SCOPE__TARGET_TYPE, oldTargetType, + targetType)); + } + + /** + * + * + * @generated + */ + public boolean isIncrement() { + return increment; + } + + /** + * + * + * @generated + */ + public void setIncrement(boolean newIncrement) { + boolean oldIncrement = increment; + increment = newIncrement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.TYPE_SCOPE__INCREMENT, oldIncrement, + increment)); + } + + /** + * + * + * @generated + */ + public Multiplicity getMultiplicity() { + return multiplicity; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetMultiplicity(Multiplicity newMultiplicity, NotificationChain msgs) { + Multiplicity oldMultiplicity = multiplicity; + multiplicity = newMultiplicity; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + ProblemPackage.TYPE_SCOPE__MULTIPLICITY, oldMultiplicity, newMultiplicity); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setMultiplicity(Multiplicity newMultiplicity) { + if (newMultiplicity != multiplicity) { + NotificationChain msgs = null; + if (multiplicity != null) + msgs = ((InternalEObject) multiplicity).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - ProblemPackage.TYPE_SCOPE__MULTIPLICITY, null, msgs); + if (newMultiplicity != null) + msgs = ((InternalEObject) newMultiplicity).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - ProblemPackage.TYPE_SCOPE__MULTIPLICITY, null, msgs); + msgs = basicSetMultiplicity(newMultiplicity, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.TYPE_SCOPE__MULTIPLICITY, + newMultiplicity, newMultiplicity)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ProblemPackage.TYPE_SCOPE__MULTIPLICITY: + return basicSetMultiplicity(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.TYPE_SCOPE__TARGET_TYPE: + if (resolve) + return getTargetType(); + return basicGetTargetType(); + case ProblemPackage.TYPE_SCOPE__INCREMENT: + return isIncrement(); + case ProblemPackage.TYPE_SCOPE__MULTIPLICITY: + return getMultiplicity(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.TYPE_SCOPE__TARGET_TYPE: + setTargetType((ClassDeclaration) newValue); + return; + case ProblemPackage.TYPE_SCOPE__INCREMENT: + setIncrement((Boolean) newValue); + return; + case ProblemPackage.TYPE_SCOPE__MULTIPLICITY: + setMultiplicity((Multiplicity) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.TYPE_SCOPE__TARGET_TYPE: + setTargetType((ClassDeclaration) null); + return; + case ProblemPackage.TYPE_SCOPE__INCREMENT: + setIncrement(INCREMENT_EDEFAULT); + return; + case ProblemPackage.TYPE_SCOPE__MULTIPLICITY: + setMultiplicity((Multiplicity) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.TYPE_SCOPE__TARGET_TYPE: + return targetType != null; + case ProblemPackage.TYPE_SCOPE__INCREMENT: + return increment != INCREMENT_EDEFAULT; + case ProblemPackage.TYPE_SCOPE__MULTIPLICITY: + return multiplicity != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (increment: "); + result.append(increment); + result.append(')'); + return result.toString(); + } + +} //TypeScopeImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableImpl.java new file mode 100644 index 00000000..0a8cde48 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/VariableImpl.java @@ -0,0 +1,37 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.Variable; + +/** + * + * An implementation of the model object 'Variable'. + * + * + * @generated + */ +public abstract class VariableImpl extends NamedElementImpl implements Variable { + /** + * + * + * @generated + */ + protected VariableImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.VARIABLE; + } + +} //VariableImpl diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/util/ProblemAdapterFactory.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/util/ProblemAdapterFactory.java new file mode 100644 index 00000000..f228f54a --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/util/ProblemAdapterFactory.java @@ -0,0 +1,518 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.viatra.solver.language.model.problem.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage + * @generated + */ +public class ProblemAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ProblemPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ProblemAdapterFactory() { + if (modelPackage == null) { + modelPackage = ProblemPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject) object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ProblemSwitch modelSwitch = new ProblemSwitch() { + @Override + public Adapter caseProblem(Problem object) { + return createProblemAdapter(); + } + + @Override + public Adapter caseRelation(Relation object) { + return createRelationAdapter(); + } + + @Override + public Adapter caseClassDeclaration(ClassDeclaration object) { + return createClassDeclarationAdapter(); + } + + @Override + public Adapter caseReferenceDeclaration(ReferenceDeclaration object) { + return createReferenceDeclarationAdapter(); + } + + @Override + public Adapter caseNamedElement(NamedElement object) { + return createNamedElementAdapter(); + } + + @Override + public Adapter casePredicateDefinition(PredicateDefinition object) { + return createPredicateDefinitionAdapter(); + } + + @Override + public Adapter caseParameter(Parameter object) { + return createParameterAdapter(); + } + + @Override + public Adapter caseVariable(Variable object) { + return createVariableAdapter(); + } + + @Override + public Adapter caseConjunction(Conjunction object) { + return createConjunctionAdapter(); + } + + @Override + public Adapter caseLiteral(Literal object) { + return createLiteralAdapter(); + } + + @Override + public Adapter caseAtom(Atom object) { + return createAtomAdapter(); + } + + @Override + public Adapter caseImplicitVariable(ImplicitVariable object) { + return createImplicitVariableAdapter(); + } + + @Override + public Adapter caseNegativeLiteral(NegativeLiteral object) { + return createNegativeLiteralAdapter(); + } + + @Override + public Adapter caseExistentialQuantifier(ExistentialQuantifier object) { + return createExistentialQuantifierAdapter(); + } + + @Override + public Adapter caseAssertion(Assertion object) { + return createAssertionAdapter(); + } + + @Override + public Adapter caseNode(Node object) { + return createNodeAdapter(); + } + + @Override + public Adapter caseScopeDeclaration(ScopeDeclaration object) { + return createScopeDeclarationAdapter(); + } + + @Override + public Adapter caseStatement(Statement object) { + return createStatementAdapter(); + } + + @Override + public Adapter caseTypeScope(TypeScope object) { + return createTypeScopeAdapter(); + } + + @Override + public Adapter caseMultiplicity(Multiplicity object) { + return createMultiplicityAdapter(); + } + + @Override + public Adapter caseRangeMultiplicity(RangeMultiplicity object) { + return createRangeMultiplicityAdapter(); + } + + @Override + public Adapter caseExactMultiplicity(ExactMultiplicity object) { + return createExactMultiplicityAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject) target); + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Problem Problem}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Problem + * @generated + */ + public Adapter createProblemAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Relation Relation}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Relation + * @generated + */ + public Adapter createRelationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.ClassDeclaration Class Declaration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.ClassDeclaration + * @generated + */ + public Adapter createClassDeclarationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration Reference Declaration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration + * @generated + */ + public Adapter createReferenceDeclarationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.NamedElement Named Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.NamedElement + * @generated + */ + public Adapter createNamedElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.PredicateDefinition Predicate Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.PredicateDefinition + * @generated + */ + public Adapter createPredicateDefinitionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Parameter Parameter}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Parameter + * @generated + */ + public Adapter createParameterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Variable Variable}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Variable + * @generated + */ + public Adapter createVariableAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Conjunction Conjunction}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Conjunction + * @generated + */ + public Adapter createConjunctionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Literal Literal}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Literal + * @generated + */ + public Adapter createLiteralAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Atom Atom}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Atom + * @generated + */ + public Adapter createAtomAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.ImplicitVariable Implicit Variable}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.ImplicitVariable + * @generated + */ + public Adapter createImplicitVariableAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.NegativeLiteral Negative Literal}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.NegativeLiteral + * @generated + */ + public Adapter createNegativeLiteralAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier Existential Quantifier}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier + * @generated + */ + public Adapter createExistentialQuantifierAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Assertion Assertion}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Assertion + * @generated + */ + public Adapter createAssertionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Node Node}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Node + * @generated + */ + public Adapter createNodeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration Scope Declaration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration + * @generated + */ + public Adapter createScopeDeclarationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Statement Statement}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Statement + * @generated + */ + public Adapter createStatementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.TypeScope Type Scope}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.TypeScope + * @generated + */ + public Adapter createTypeScopeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.Multiplicity Multiplicity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.Multiplicity + * @generated + */ + public Adapter createMultiplicityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity Range Multiplicity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity + * @generated + */ + public Adapter createRangeMultiplicityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity Exact Multiplicity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity + * @generated + */ + public Adapter createExactMultiplicityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ProblemAdapterFactory diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/util/ProblemSwitch.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/util/ProblemSwitch.java new file mode 100644 index 00000000..a9e1455b --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/util/ProblemSwitch.java @@ -0,0 +1,620 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.viatra.solver.language.model.problem.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.viatra.solver.language.model.problem.ProblemPackage + * @generated + */ +public class ProblemSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ProblemPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ProblemSwitch() { + if (modelPackage == null) { + modelPackage = ProblemPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ProblemPackage.PROBLEM: { + Problem problem = (Problem) theEObject; + T result = caseProblem(problem); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.RELATION: { + Relation relation = (Relation) theEObject; + T result = caseRelation(relation); + if (result == null) + result = caseNamedElement(relation); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.CLASS_DECLARATION: { + ClassDeclaration classDeclaration = (ClassDeclaration) theEObject; + T result = caseClassDeclaration(classDeclaration); + if (result == null) + result = caseRelation(classDeclaration); + if (result == null) + result = caseStatement(classDeclaration); + if (result == null) + result = caseNamedElement(classDeclaration); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.REFERENCE_DECLARATION: { + ReferenceDeclaration referenceDeclaration = (ReferenceDeclaration) theEObject; + T result = caseReferenceDeclaration(referenceDeclaration); + if (result == null) + result = caseRelation(referenceDeclaration); + if (result == null) + result = caseNamedElement(referenceDeclaration); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.NAMED_ELEMENT: { + NamedElement namedElement = (NamedElement) theEObject; + T result = caseNamedElement(namedElement); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.PREDICATE_DEFINITION: { + PredicateDefinition predicateDefinition = (PredicateDefinition) theEObject; + T result = casePredicateDefinition(predicateDefinition); + if (result == null) + result = caseRelation(predicateDefinition); + if (result == null) + result = caseStatement(predicateDefinition); + if (result == null) + result = caseNamedElement(predicateDefinition); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.PARAMETER: { + Parameter parameter = (Parameter) theEObject; + T result = caseParameter(parameter); + if (result == null) + result = caseVariable(parameter); + if (result == null) + result = caseNamedElement(parameter); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.VARIABLE: { + Variable variable = (Variable) theEObject; + T result = caseVariable(variable); + if (result == null) + result = caseNamedElement(variable); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.CONJUNCTION: { + Conjunction conjunction = (Conjunction) theEObject; + T result = caseConjunction(conjunction); + if (result == null) + result = caseExistentialQuantifier(conjunction); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.LITERAL: { + Literal literal = (Literal) theEObject; + T result = caseLiteral(literal); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.ATOM: { + Atom atom = (Atom) theEObject; + T result = caseAtom(atom); + if (result == null) + result = caseLiteral(atom); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.IMPLICIT_VARIABLE: { + ImplicitVariable implicitVariable = (ImplicitVariable) theEObject; + T result = caseImplicitVariable(implicitVariable); + if (result == null) + result = caseVariable(implicitVariable); + if (result == null) + result = caseNamedElement(implicitVariable); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.NEGATIVE_LITERAL: { + NegativeLiteral negativeLiteral = (NegativeLiteral) theEObject; + T result = caseNegativeLiteral(negativeLiteral); + if (result == null) + result = caseExistentialQuantifier(negativeLiteral); + if (result == null) + result = caseLiteral(negativeLiteral); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.EXISTENTIAL_QUANTIFIER: { + ExistentialQuantifier existentialQuantifier = (ExistentialQuantifier) theEObject; + T result = caseExistentialQuantifier(existentialQuantifier); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.ASSERTION: { + Assertion assertion = (Assertion) theEObject; + T result = caseAssertion(assertion); + if (result == null) + result = caseStatement(assertion); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.NODE: { + Node node = (Node) theEObject; + T result = caseNode(node); + if (result == null) + result = caseNamedElement(node); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.SCOPE_DECLARATION: { + ScopeDeclaration scopeDeclaration = (ScopeDeclaration) theEObject; + T result = caseScopeDeclaration(scopeDeclaration); + if (result == null) + result = caseStatement(scopeDeclaration); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.STATEMENT: { + Statement statement = (Statement) theEObject; + T result = caseStatement(statement); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.TYPE_SCOPE: { + TypeScope typeScope = (TypeScope) theEObject; + T result = caseTypeScope(typeScope); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.MULTIPLICITY: { + Multiplicity multiplicity = (Multiplicity) theEObject; + T result = caseMultiplicity(multiplicity); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.RANGE_MULTIPLICITY: { + RangeMultiplicity rangeMultiplicity = (RangeMultiplicity) theEObject; + T result = caseRangeMultiplicity(rangeMultiplicity); + if (result == null) + result = caseMultiplicity(rangeMultiplicity); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ProblemPackage.EXACT_MULTIPLICITY: { + ExactMultiplicity exactMultiplicity = (ExactMultiplicity) theEObject; + T result = caseExactMultiplicity(exactMultiplicity); + if (result == null) + result = caseMultiplicity(exactMultiplicity); + if (result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Problem'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Problem'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseProblem(Problem object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Relation'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Relation'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRelation(Relation object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Class Declaration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Class Declaration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseClassDeclaration(ClassDeclaration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Reference Declaration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Reference Declaration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseReferenceDeclaration(ReferenceDeclaration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedElement(NamedElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Predicate Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Predicate Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePredicateDefinition(PredicateDefinition object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Parameter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseParameter(Parameter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Variable'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Variable'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVariable(Variable object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Conjunction'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Conjunction'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConjunction(Conjunction object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Literal'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Literal'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLiteral(Literal object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Atom'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Atom'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAtom(Atom object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Implicit Variable'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Implicit Variable'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseImplicitVariable(ImplicitVariable object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Negative Literal'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Negative Literal'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNegativeLiteral(NegativeLiteral object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Existential Quantifier'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Existential Quantifier'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseExistentialQuantifier(ExistentialQuantifier object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Assertion'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Assertion'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAssertion(Assertion object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Node'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Node'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNode(Node object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Scope Declaration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Scope Declaration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseScopeDeclaration(ScopeDeclaration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Statement'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Statement'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStatement(Statement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Type Scope'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Type Scope'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTypeScope(TypeScope object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Multiplicity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Multiplicity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMultiplicity(Multiplicity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Range Multiplicity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Range Multiplicity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRangeMultiplicity(RangeMultiplicity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Exact Multiplicity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Exact Multiplicity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseExactMultiplicity(ExactMultiplicity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ProblemSwitch diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/resources/model/problem.ecore b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/resources/model/problem.ecore new file mode 100644 index 00000000..9b87280d --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/resources/model/problem.ecore @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/resources/model/problem.genmodel b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/resources/model/problem.genmodel new file mode 100644 index 00000000..2dfe62e6 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/resources/model/problem.genmodel @@ -0,0 +1,87 @@ + + + problem.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.classpath b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.classpath new file mode 100644 index 00000000..659559e1 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.classpath @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.gitignore b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.gitignore new file mode 100644 index 00000000..84c048a7 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.project b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.project new file mode 100644 index 00000000..9b5a8e63 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.project @@ -0,0 +1,40 @@ + + + org.eclipse.viatra.solver.language.web + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.settings/org.eclipse.core.resources.prefs b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..7adc0fb9 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=11 diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/build.gradle b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/build.gradle new file mode 100644 index 00000000..a3bfc039 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/build.gradle @@ -0,0 +1,35 @@ +plugins { + id 'war' +} + +dependencies { + compile project(':org.eclipse.viatra.solver.language') + compile project(':org.eclipse.viatra.solver.language.ide') + compile "org.eclipse.xtext:org.eclipse.xtext.xbase.web:${xtextVersion}" + compile "org.eclipse.xtext:org.eclipse.xtext.web.servlet:${xtextVersion}" + compile "org.eclipse.xtend:org.eclipse.xtend.lib:${xtextVersion}" + compile "org.webjars:requirejs:2.3.6" + compile "org.webjars:requirejs-text:2.0.15" + compile "org.webjars:jquery:3.6.0" + compile "org.webjars:codemirror:5.41.0" + providedCompile "org.eclipse.jetty:jetty-annotations:9.4.42.v20210604" + providedCompile "org.eclipse.jetty:jetty-rewrite:9.4.42.v20210604" + providedCompile "org.slf4j:slf4j-simple:1.7.31" +} + +task jettyRun(type:JavaExec) { + dependsOn(sourceSets.main.runtimeClasspath) + classpath = sourceSets.main.runtimeClasspath.filter{it.exists()} + main = 'org.eclipse.viatra.solver.language.web.ServerLauncher' + standardInput = System.in + group = 'run' + description = 'Starts an example Jetty server with your language' +} + +eclipse { + project { + file.whenMerged { + natures.remove('org.eclipse.wst.common.modulecore.ModuleCoreNature') + } + } +} \ No newline at end of file diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemServlet.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemServlet.java new file mode 100644 index 00000000..5de708f0 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemServlet.java @@ -0,0 +1,36 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language.web; + +import com.google.inject.Injector; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import org.eclipse.xtext.util.DisposableRegistry; +import org.eclipse.xtext.web.servlet.XtextServlet; + +/** + * Deploy this class into a servlet container to enable DSL-specific services. + */ +@WebServlet(name = "XtextServices", urlPatterns = "/xtext-service/*") +public class ProblemServlet extends XtextServlet { + + private static final long serialVersionUID = 1L; + + DisposableRegistry disposableRegistry; + + public void init() throws ServletException { + super.init(); + Injector injector = new ProblemWebSetup().createInjectorAndDoEMFRegistration(); + this.disposableRegistry = injector.getInstance(DisposableRegistry.class); + } + + public void destroy() { + if (disposableRegistry != null) { + disposableRegistry.dispose(); + disposableRegistry = null; + } + super.destroy(); + } + +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemWebModule.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemWebModule.java new file mode 100644 index 00000000..0eea7f1e --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemWebModule.java @@ -0,0 +1,11 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language.web; + + +/** + * Use this class to register additional components to be used within the web application. + */ +public class ProblemWebModule extends AbstractProblemWebModule { +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemWebSetup.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemWebSetup.java new file mode 100644 index 00000000..8d5778af --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ProblemWebSetup.java @@ -0,0 +1,23 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language.web; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.viatra.solver.language.ProblemRuntimeModule; +import org.eclipse.viatra.solver.language.ProblemStandaloneSetup; +import org.eclipse.viatra.solver.language.ide.ProblemIdeModule; +import org.eclipse.xtext.util.Modules2; + +/** + * Initialization support for running Xtext languages in web applications. + */ +public class ProblemWebSetup extends ProblemStandaloneSetup { + + @Override + public Injector createInjector() { + return Guice.createInjector(Modules2.mixin(new ProblemRuntimeModule(), new ProblemIdeModule(), new ProblemWebModule())); + } + +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java new file mode 100644 index 00000000..d25f4ae9 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java @@ -0,0 +1,65 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language.web; + +import java.net.InetSocketAddress; +import org.eclipse.jetty.annotations.AnnotationConfiguration; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.util.log.Slf4jLog; +import org.eclipse.jetty.webapp.Configuration; +import org.eclipse.jetty.webapp.MetaInfConfiguration; +import org.eclipse.jetty.webapp.WebAppContext; +import org.eclipse.jetty.webapp.WebInfConfiguration; +import org.eclipse.jetty.webapp.WebXmlConfiguration; + +/** + * This program starts an HTTP server for testing the web integration of your DSL. + * Just execute it and point a web browser to http://localhost:8080/ + */ +public class ServerLauncher { + public static void main(String[] args) { + Server server = new Server(new InetSocketAddress("localhost", 1313)); + WebAppContext ctx = new WebAppContext(); + ctx.setResourceBase("src/main/webapp"); + ctx.setWelcomeFiles(new String[] {"index.html"}); + ctx.setContextPath("/"); + ctx.setConfigurations(new Configuration[] { + new AnnotationConfiguration(), + new WebXmlConfiguration(), + new WebInfConfiguration(), + new MetaInfConfiguration() + }); + ctx.setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, + ".*/org\\.eclipse\\.viatra\\.solver\\.language\\.web/.*,.*\\.jar"); + ctx.setInitParameter("org.eclipse.jetty.servlet.Default.useFileMappedBuffer", "false"); + server.setHandler(ctx); + Slf4jLog log = new Slf4jLog(ServerLauncher.class.getName()); + try { + server.start(); + log.info("Server started " + server.getURI() + "..."); + new Thread() { + + public void run() { + try { + log.info("Press enter to stop the server..."); + int key = System.in.read(); + if (key != -1) { + server.stop(); + } else { + log.warn( + "Console input is not available. In order to stop the server, you need to cancel process manually."); + } + } catch (Exception e) { + log.warn(e); + } + } + + }.start(); + server.join(); + } catch (Exception exception) { + log.warn(exception.getMessage()); + System.exit(1); + } + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/index.html b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/index.html new file mode 100644 index 00000000..bf55f237 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/index.html @@ -0,0 +1,43 @@ + + + +Example Web Editor + + + + + +
+
+

Example Problem Web Editor

+
+
+
class Family
+    contains Person[0..*] members.
+
+class Person
+    refers Person[0..*] children opposite parent,
+    refers Person[0..1] parent opposite children.
+
+error loop(Person p) := children+(p, p).
+
+error multipleRoots(Person p, Person q) :=
+    !equals(p, q), !parent(p, _), !parent(q, _).
+
+Family(family).
+members(family, anne).
+members(family, bob).
+members(family, ciri).
+children(anne, ciri).
+?children(bob, ciri).
+
+scope Family = 1, Person += 5..10.
+
+
+ + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/script.js b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/script.js new file mode 100644 index 00000000..fcaca4a4 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/script.js @@ -0,0 +1,20 @@ +var baseUrl = window.location.pathname; +var fileIndex = baseUrl.indexOf("index.html"); +if (fileIndex > 0) + baseUrl = baseUrl.slice(0, fileIndex) +require.config({ + baseUrl: baseUrl, + paths: { + "text": "webjars/requirejs-text/2.26.0.M1/text", + "jquery": "webjars/jquery/3.6.0/jquery.min", + "xtext/xtext-codemirror": "xtext/2.26.0.M1/xtext-codemirror", + }, + packages: [{ + name: "codemirror", + location: "webjars/codemirror/5.41.0", + main: "lib/codemirror" + }] +}); +require(["xtext-resources/generated/mode-problem", "xtext/xtext-codemirror"], function(mode, xtext) { + window.xtextEditor = xtext.createEditor({baseUrl: baseUrl,}); +}); diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/style.css b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/style.css new file mode 100644 index 00000000..f1551c3d --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/style.css @@ -0,0 +1,91 @@ +body { + width: 100%; + height: 100%; + overflow: hidden; + font: 16px Helvetica,sans-serif; +} + +a { + color: #22a; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.container { + display: block; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + margin: 24px 24px 36px 24px; +} + +.header { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + padding: 16px; + background: #dbdbdb; + border-radius: 16px; + color: #383838; +} + +.header h1 { + font-size: 36px; + margin: 0; +} + +.content { + display: block; + position: absolute; + top: 108px; + bottom: 0; + left: 0; + width: 50%; + box-shadow: 0 0 8px rgba(80, 10, 98, .25), 0 10px 24px rgba(80, 10, 98, .35); + border-radius: 16px; +} + +.xtext-editor { + display: block; + position: absolute; + top: 16px; + bottom: 16px; + left: 16px; + right: 16px; + border: 1px solid #aaa; +} + +.problem-class { + color: #005032; +} + +.problem-abstract { + color: #8b8816; +} + +.problem-reference, .problem-containment, .problem-predicate { + color: #0000c0; +} + +.problem-error { + color: #ab3000; +} + +.problem-containment { + font-weight: bold; +} + +.problem-parameter, .problem-variable { + color: #6a3e3e; +} + +.problem-node { + text-decoration: underline; +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/xtext-resources/generated/mode-problem.js b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/xtext-resources/generated/mode-problem.js new file mode 100644 index 00000000..ab748b03 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/webapp/xtext-resources/generated/mode-problem.js @@ -0,0 +1,23 @@ +define(["codemirror", "codemirror/addon/mode/simple"], function(CodeMirror, SimpleMode) { + var keywords = "abstract|class|contains|error|extends|false|opposite|pred|refers|scope|true|unknown"; + CodeMirror.defineSimpleMode("xtext/problem", { + start: [ + {token: "comment", regex: "\\/\\/.*$"}, + {token: "comment", regex: "\\/\\*", next : "comment"}, + {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, + {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, + {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, + {token: "lparen", regex: "[\\[(]"}, + {token: "rparen", regex: "[\\])]"}, + {token: "keyword", regex: "\\b(?:" + keywords + ")\\b"} + ], + comment: [ + {token: "comment", regex: ".*?\\*\\/", next : "start"}, + {token: "comment", regex: ".+"} + ], + meta: { + dontIndentStates: ["comment"], + lineComment: "//" + } + }); +}); diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/xtext-gen/org/eclipse/viatra/solver/language/web/AbstractProblemWebModule.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/xtext-gen/org/eclipse/viatra/solver/language/web/AbstractProblemWebModule.java new file mode 100644 index 00000000..fefb7da3 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.web/src/main/xtext-gen/org/eclipse/viatra/solver/language/web/AbstractProblemWebModule.java @@ -0,0 +1,14 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.web; + +import org.eclipse.xtext.web.server.DefaultWebModule; + +/** + * Manual modifications go to {@link ProblemWebModule}. + */ +@SuppressWarnings("all") +public abstract class AbstractProblemWebModule extends DefaultWebModule { + +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.classpath b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.classpath new file mode 100644 index 00000000..01bce195 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.classpath @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.gitignore b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.gitignore new file mode 100644 index 00000000..84c048a7 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.launch/Generate Problem (problem) Language Infrastructure.launch b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.launch/Generate Problem (problem) Language Infrastructure.launch new file mode 100644 index 00000000..042ecc17 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.launch/Generate Problem (problem) Language Infrastructure.launch @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.project b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.project new file mode 100644 index 00000000..bbe16f36 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.project @@ -0,0 +1,29 @@ + + + org.eclipse.viatra.solver.language + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + + diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.settings/org.eclipse.core.resources.prefs b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..7adc0fb9 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=11 diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/build.gradle b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/build.gradle new file mode 100644 index 00000000..558f08bb --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/build.gradle @@ -0,0 +1,42 @@ +dependencies { + testCompile 'org.junit.jupiter:junit-jupiter-api' + testRuntime 'org.junit.jupiter:junit-jupiter-engine' + testCompile "org.eclipse.xtext:org.eclipse.xtext.testing:${xtextVersion}" + testCompile "org.eclipse.xtext:org.eclipse.xtext.xbase.testing:${xtextVersion}" + compile "org.eclipse.xtext:org.eclipse.xtext:${xtextVersion}" + compile "org.eclipse.xtext:org.eclipse.xtext.xbase:${xtextVersion}" + compile 'org.eclipse.emf:org.eclipse.emf.ecore' + compile project(':org.eclipse.viatra.solver.language.model') +} + +configurations { + mwe2 { + extendsFrom compile + } +} + +dependencies { + mwe2 'org.eclipse.emf:org.eclipse.emf.mwe2.launch' + mwe2 "org.eclipse.xtext:org.eclipse.xtext.common.types:${xtextVersion}" + mwe2 "org.eclipse.xtext:org.eclipse.xtext.xtext.generator:${xtextVersion}" + mwe2 'org.eclipse.xtext:xtext-antlr-generator' +} + +task generateXtextLanguage(type: JavaExec) { + main = 'org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher' + classpath = configurations.mwe2 + inputs.file "src/main/java/org/eclipse/viatra/solver/language/GenerateProblem.mwe2" + inputs.file "src/main/java/org/eclipse/viatra/solver/language/Problem.xtext" + outputs.dir "src/main/xtext-gen" + args += "src/main/java/org/eclipse/viatra/solver/language/GenerateProblem.mwe2" + args += "-p" + args += "rootPath=/${projectDir}/.." +} + +test { + useJUnitPlatform() +} + +generateXtext.dependsOn(generateXtextLanguage) +clean.dependsOn(cleanGenerateXtextLanguage) +eclipse.classpath.plusConfigurations += [configurations.mwe2] diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/GenerateProblem.mwe2 b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/GenerateProblem.mwe2 new file mode 100644 index 00000000..46812355 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/GenerateProblem.mwe2 @@ -0,0 +1,54 @@ +module org.eclipse.viatra.solver.language.GenerateProblem + +import org.eclipse.xtext.xtext.generator.* +import org.eclipse.xtext.xtext.generator.model.project.* + +var rootPath = ".." + +Workflow { + component = XtextGenerator { + configuration = { + project = StandardProjectConfig { + baseName = "org.eclipse.viatra.solver.language" + rootPath = rootPath + runtimeTest = { + enabled = true + } + web = { + enabled = true + } + mavenLayout = true + } + code = { + encoding = "UTF-8" + lineDelimiter = "\n" + fileHeader = "/*\n * generated by Xtext \${version}\n */" + preferXtendStubs = false + } + } + + language = StandardLanguage { + name = "org.eclipse.viatra.solver.language.Problem" + fileExtensions = "problem" + referencedResource = "platform:/resource/org.eclipse.viatra.solver.language.model/model/problem.genmodel" + + serializer = { + generateStub = false + } + validator = { + // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" + // Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage + generateDeprecationValidation = true + } + generator = { + generateXtendStub = true + } + junitSupport = { + junitVersion = "5" + } + webSupport = { + framework = "CodeMirror" + } + } + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/Problem.xtext b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/Problem.xtext new file mode 100644 index 00000000..81c18d0d --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/Problem.xtext @@ -0,0 +1,88 @@ +grammar org.eclipse.viatra.solver.language.Problem with org.eclipse.xtext.common.Terminals + +import "http://www.eclipse.org/emf/2002/Ecore" as ecore +import "http://www.eclipse.org/viatra/solver/language/model/Problem" + +Problem: + statements+=Statement*; + +Statement: + ClassDeclaration | PredicateDefinition | Assertion | ScopeDeclaration; + +ClassDeclaration: + abstract?="abstract"? "class" + name=ID + ("extends" (superTypes+=[ClassDeclaration] | + "[" (superTypes+=[ClassDeclaration] ("," superTypes+=[ClassDeclaration])*)? "]") | + referenceDeclarations+=ReferenceDeclaration)? + ("," referenceDeclarations+=ReferenceDeclaration)* + "."; + +ReferenceDeclaration: + (containment?="contains" | "refers") + referenceType=[ClassDeclaration] + "[" multiplicity=Multiplicity "]" + name=ID + ("opposite" opposite=[ReferenceDeclaration|QualifiedName])?; + +PredicateDefinition: + (error?="error" "pred"? | "pred") + name=ID + "(" (parameters+=Parameter ("," parameters+=Parameter)*)? ")" + (":=" bodies+=Conjunction (";" bodies+=Conjunction)*)? + "."; + +Parameter: + parameterType=[ClassDeclaration] name=ID; + +Conjunction: + literals+=Literal ("," literals+=Literal)*; + +Literal: + Atom | NegativeLiteral; + +NegativeLiteral: + "!" atom=Atom; + +Atom: + relation=[Relation|QualifiedName] + transitiveClosure?="+"? + "(" (arguments+=[Variable] ("," arguments+=[Variable])*)? ")"; + +Assertion: + (relation=[Relation|QualifiedName] + "(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")" + ":" value=LogicValue | + value=ShortLogicValue? + relation=[Relation|QualifiedName] + "(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")") + "."; + +enum LogicValue: + TRUE="true" | FALSE="false" | UNKNOWN="unknown"; + +enum ShortLogicValue returns LogicValue: + FALSE="!" | UNKNOWN="?"; + +ScopeDeclaration: + "scope" typeScopes+=TypeScope ("," typeScopes+=TypeScope)* "."; + +TypeScope: + targetType=[ClassDeclaration] + (increment?="+=" | "=") + multiplicity=Multiplicity; + +Multiplicity: + RangeMultiplicity | ExactMultiplicity; + +RangeMultiplicity: + lowerBound=INT ".." upperBound=UpperBound; + +ExactMultiplicity: + exactValue=INT; + +UpperBound returns ecore::EInt: + INT | "*"; + +QualifiedName: + ID ("::" ID)*; diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemRuntimeModule.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemRuntimeModule.java new file mode 100644 index 00000000..b2a3218c --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemRuntimeModule.java @@ -0,0 +1,86 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language; + +import org.eclipse.viatra.solver.language.conversion.ProblemValueConverterService; +import org.eclipse.viatra.solver.language.naming.ProblemQualifiedNameConverter; +import org.eclipse.viatra.solver.language.naming.ProblemQualifiedNameProvider; +import org.eclipse.viatra.solver.language.resource.ProblemDerivedStateComputer; +import org.eclipse.viatra.solver.language.resource.ProblemLocationInFileProvider; +import org.eclipse.viatra.solver.language.resource.ProblemResourceDescriptionStrategy; +import org.eclipse.viatra.solver.language.scoping.ProblemGlobalScopeProvider; +import org.eclipse.xtext.conversion.IValueConverterService; +import org.eclipse.xtext.naming.IQualifiedNameConverter; +import org.eclipse.xtext.naming.IQualifiedNameProvider; +import org.eclipse.xtext.resource.DerivedStateAwareResource; +import org.eclipse.xtext.resource.DerivedStateAwareResourceDescriptionManager; +import org.eclipse.xtext.resource.IDefaultResourceDescriptionStrategy; +import org.eclipse.xtext.resource.IDerivedStateComputer; +import org.eclipse.xtext.resource.ILocationInFileProvider; +import org.eclipse.xtext.resource.IResourceDescription; +import org.eclipse.xtext.resource.XtextResource; +import org.eclipse.xtext.scoping.IGlobalScopeProvider; +import org.eclipse.xtext.scoping.IScopeProvider; +import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; +import org.eclipse.xtext.scoping.impl.SimpleLocalScopeProvider; +import org.eclipse.xtext.validation.IResourceValidator; +import org.eclipse.xtext.xbase.annotations.validation.DerivedStateAwareResourceValidator; + +import com.google.inject.Binder; +import com.google.inject.name.Names; + +/** + * Use this class to register components to be used at runtime / without the + * Equinox extension registry. + */ +public class ProblemRuntimeModule extends AbstractProblemRuntimeModule { + public Class bindIQualifiedNameConverter() { + return ProblemQualifiedNameConverter.class; + } + + public Class bindIQualifiedNameProvider() { + return ProblemQualifiedNameProvider.class; + } + + public Class bindIDefaultResourceDescriptionStrategy() { + return ProblemResourceDescriptionStrategy.class; + } + + @Override + public Class bindIValueConverterService() { + return ProblemValueConverterService.class; + } + + @Override + public void configureIScopeProviderDelegate(Binder binder) { + binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)) + .to(SimpleLocalScopeProvider.class); + } + + @Override + public Class bindIGlobalScopeProvider() { + return ProblemGlobalScopeProvider.class; + } + + @Override + public Class bindXtextResource() { + return DerivedStateAwareResource.class; + } + + public Class bindIResourceDescription$Manager() { + return DerivedStateAwareResourceDescriptionManager.class; + } + + public Class bindIResourceValidator() { + return DerivedStateAwareResourceValidator.class; + } + + public Class bindIDerivedStateComputer() { + return ProblemDerivedStateComputer.class; + } + + public Class bindILocationInFileProvider() { + return ProblemLocationInFileProvider.class; + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemStandaloneSetup.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemStandaloneSetup.java new file mode 100644 index 00000000..5652f859 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemStandaloneSetup.java @@ -0,0 +1,26 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language; + +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +import com.google.inject.Injector; + +/** + * Initialization support for running Xtext languages without Equinox extension registry. + */ +public class ProblemStandaloneSetup extends ProblemStandaloneSetupGenerated { + + public static void doSetup() { + new ProblemStandaloneSetup().createInjectorAndDoEMFRegistration(); + } + + @Override + public Injector createInjectorAndDoEMFRegistration() { + if (!EPackage.Registry.INSTANCE.containsKey(ProblemPackage.eNS_URI)) + EPackage.Registry.INSTANCE.put(ProblemPackage.eNS_URI, ProblemPackage.eINSTANCE); + return super.createInjectorAndDoEMFRegistration(); + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/conversion/ProblemValueConverterService.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/conversion/ProblemValueConverterService.java new file mode 100644 index 00000000..4f5fd069 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/conversion/ProblemValueConverterService.java @@ -0,0 +1,17 @@ +package org.eclipse.viatra.solver.language.conversion; + +import org.eclipse.xtext.common.services.DefaultTerminalConverters; +import org.eclipse.xtext.conversion.IValueConverter; +import org.eclipse.xtext.conversion.ValueConverter; + +import com.google.inject.Inject; + +public class ProblemValueConverterService extends DefaultTerminalConverters { + @Inject + private UpperBoundValueConverter upperBoundValueConverter; + + @ValueConverter(rule = "UpperBound") + public IValueConverter UpperBound() { + return upperBoundValueConverter; + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/conversion/UpperBoundValueConverter.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/conversion/UpperBoundValueConverter.java new file mode 100644 index 00000000..3111b69b --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/conversion/UpperBoundValueConverter.java @@ -0,0 +1,35 @@ +package org.eclipse.viatra.solver.language.conversion; + +import org.eclipse.xtext.conversion.ValueConverterException; +import org.eclipse.xtext.conversion.impl.AbstractValueConverter; +import org.eclipse.xtext.conversion.impl.INTValueConverter; +import org.eclipse.xtext.nodemodel.INode; + +import com.google.inject.Inject; +import com.google.inject.Singleton; + +@Singleton +public class UpperBoundValueConverter extends AbstractValueConverter { + public static final String INFINITY = "*"; + + @Inject + private INTValueConverter intValueConverter; + + @Override + public Integer toValue(String string, INode node) throws ValueConverterException { + if (INFINITY.equals(string)) { + return -1; + } else { + return intValueConverter.toValue(string, node); + } + } + + @Override + public String toString(Integer value) throws ValueConverterException { + if (value < 0) { + return INFINITY; + } else { + return intValueConverter.toString(value); + } + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/generator/ProblemGenerator.xtend b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/generator/ProblemGenerator.xtend new file mode 100644 index 00000000..0930f244 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/generator/ProblemGenerator.xtend @@ -0,0 +1,25 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language.generator + +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.xtext.generator.AbstractGenerator +import org.eclipse.xtext.generator.IFileSystemAccess2 +import org.eclipse.xtext.generator.IGeneratorContext + +/** + * Generates code from your model files on save. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation + */ +class ProblemGenerator extends AbstractGenerator { + + override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { +// fsa.generateFile('greetings.txt', 'People to greet: ' + +// resource.allContents +// .filter(Greeting) +// .map[name] +// .join(', ')) + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/naming/ProblemQualifiedNameConverter.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/naming/ProblemQualifiedNameConverter.java new file mode 100644 index 00000000..ebb7e7b4 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/naming/ProblemQualifiedNameConverter.java @@ -0,0 +1,13 @@ +package org.eclipse.viatra.solver.language.naming; + +import org.eclipse.xtext.naming.IQualifiedNameConverter; + +import com.google.inject.Singleton; + +@Singleton +public class ProblemQualifiedNameConverter extends IQualifiedNameConverter.DefaultImpl { + @Override + public String getDelimiter() { + return "::"; + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/naming/ProblemQualifiedNameProvider.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/naming/ProblemQualifiedNameProvider.java new file mode 100644 index 00000000..81365724 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/naming/ProblemQualifiedNameProvider.java @@ -0,0 +1,15 @@ +package org.eclipse.viatra.solver.language.naming; + +import org.eclipse.viatra.solver.language.model.problem.Node; +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; +import org.eclipse.xtext.naming.QualifiedName; + +public class ProblemQualifiedNameProvider extends DefaultDeclarativeQualifiedNameProvider { + public QualifiedName qualifiedName(Node node) { + String name = node.getName(); + if (name == null || name.isEmpty()) { + return null; + } + return getConverter().toQualifiedName(name); + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemDerivedStateComputer.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemDerivedStateComputer.java new file mode 100644 index 00000000..571b5745 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemDerivedStateComputer.java @@ -0,0 +1,218 @@ +package org.eclipse.viatra.solver.language.resource; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.regex.Pattern; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.viatra.solver.language.model.problem.Assertion; +import org.eclipse.viatra.solver.language.model.problem.Atom; +import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Conjunction; +import org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier; +import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; +import org.eclipse.viatra.solver.language.model.problem.Literal; +import org.eclipse.viatra.solver.language.model.problem.NegativeLiteral; +import org.eclipse.viatra.solver.language.model.problem.Node; +import org.eclipse.viatra.solver.language.model.problem.Parameter; +import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition; +import org.eclipse.viatra.solver.language.model.problem.Problem; +import org.eclipse.viatra.solver.language.model.problem.ProblemFactory; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.Statement; +import org.eclipse.xtext.linking.impl.LinkingHelper; +import org.eclipse.xtext.naming.IQualifiedNameConverter; +import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.xtext.nodemodel.INode; +import org.eclipse.xtext.nodemodel.util.NodeModelUtils; +import org.eclipse.xtext.resource.DerivedStateAwareResource; +import org.eclipse.xtext.resource.IDerivedStateComputer; +import org.eclipse.xtext.scoping.IGlobalScopeProvider; +import org.eclipse.xtext.scoping.IScope; + +import com.google.common.base.Predicates; +import com.google.inject.Inject; +import com.google.inject.Singleton; + +@Singleton +public class ProblemDerivedStateComputer implements IDerivedStateComputer { + public static final String NEW_NODE = "new"; + + private static final String ID_REGEX_STRING = "[_a-zA-Z][_0-9a-zA-Z]*"; + + private static final Pattern ID_REGEX = Pattern.compile(ID_REGEX_STRING); + + private static final Pattern QUALIFIED_NAME_REGEX = Pattern + .compile(ID_REGEX_STRING + "(::" + ID_REGEX_STRING + ")*"); + + @Inject + private LinkingHelper linkingHelper; + + @Inject + private IQualifiedNameConverter qualifiedNameConverter; + + @Inject + private IGlobalScopeProvider scopeProvider; + + @Override + public void installDerivedState(DerivedStateAwareResource resource, boolean preLinkingPhase) { + for (EObject object : resource.getContents()) { + if (object instanceof Problem) { + installDerivedProblemState((Problem) object, preLinkingPhase); + } + } + } + + protected void installDerivedProblemState(Problem problem, boolean preLinkingPhase) { + Set nodeNames = new HashSet<>(); + if (!preLinkingPhase) { + installDerivedNodes(problem); + } + for (Statement statement : problem.getStatements()) { + if (statement instanceof PredicateDefinition) { + PredicateDefinition definition = (PredicateDefinition) statement; + installDerivedPredicateDefinitionState(definition); + } + } + List grapNodes = problem.getNodes(); + for (String nodeName : nodeNames) { + Node graphNode = ProblemFactory.eINSTANCE.createNode(); + graphNode.setName(nodeName); + grapNodes.add(graphNode); + } + } + + protected void installDerivedNodes(Problem problem) { + IScope nodeScope = scopeProvider.getScope(problem.eResource(), ProblemPackage.Literals.ASSERTION__ARGUMENTS, + Predicates.alwaysTrue()); + Set nodeNames = new HashSet<>(); + for (Statement statement : problem.getStatements()) { + if (statement instanceof ClassDeclaration) { + ClassDeclaration declaration = (ClassDeclaration) statement; + if (!declaration.isAbstract()) { + String className = declaration.getName(); + if (validId(className)) { + QualifiedName qualifiedName = QualifiedName.create(className, NEW_NODE); + String nodeName = qualifiedNameConverter.toString(qualifiedName); + nodeNames.add(nodeName); + } + } + } + } + for (Statement statement : problem.getStatements()) { + if (statement instanceof Assertion) { + Assertion assertion = (Assertion) statement; + List nodes = NodeModelUtils.findNodesForFeature(assertion, + ProblemPackage.Literals.ASSERTION__ARGUMENTS); + for (INode node : nodes) { + String nodeName = linkingHelper.getCrossRefNodeAsString(node, true); + if (validQualifiedName(nodeName)) { + QualifiedName qualifiedName = qualifiedNameConverter.toQualifiedName(nodeName); + if (nodeScope.getSingleElement(qualifiedName) == null) { + nodeNames.add(nodeName); + } + } + } + } + } + List grapNodes = problem.getNodes(); + for (String nodeName : nodeNames) { + Node graphNode = ProblemFactory.eINSTANCE.createNode(); + graphNode.setName(nodeName); + grapNodes.add(graphNode); + } + } + + protected void installDerivedPredicateDefinitionState(PredicateDefinition definition) { + Set parameterNames = new HashSet<>(); + for (Parameter parameter : definition.getParameters()) { + String name = parameter.getName(); + if (name != null) { + parameterNames.add(name); + } + } + for (Conjunction body : definition.getBodies()) { + installDeriveConjunctionState(body, parameterNames); + } + } + + protected void installDeriveConjunctionState(Conjunction conjunction, Set knownVariables) { + Set newVariables = new HashSet<>(); + for (Literal literal : conjunction.getLiterals()) { + if (literal instanceof Atom) { + Atom atom = (Atom) literal; + collectVariables(atom, knownVariables, newVariables); + } + } + createVariables(conjunction, newVariables); + newVariables.addAll(knownVariables); + for (Literal literal : conjunction.getLiterals()) { + if (literal instanceof NegativeLiteral) { + NegativeLiteral negativeLiteral = (NegativeLiteral) literal; + installDeriveNegativeLiteralState(negativeLiteral, newVariables); + } + } + } + + protected void installDeriveNegativeLiteralState(NegativeLiteral negativeLiteral, Set knownVariables) { + Set newVariables = new HashSet<>(); + collectVariables(negativeLiteral.getAtom(), knownVariables, newVariables); + createVariables(negativeLiteral, newVariables); + } + + protected void collectVariables(Atom atom, Set knownVariables, Set newVariables) { + List nodes = NodeModelUtils.findNodesForFeature(atom, ProblemPackage.Literals.ATOM__ARGUMENTS); + for (INode node : nodes) { + String variableName = linkingHelper.getCrossRefNodeAsString(node, true); + if (!knownVariables.contains(variableName)) { + newVariables.add(variableName); + } + } + } + + protected void createVariables(ExistentialQuantifier quantifier, Set newVariables) { + for (String variableName : newVariables) { + if (validId(variableName)) { + ImplicitVariable variable = ProblemFactory.eINSTANCE.createImplicitVariable(); + variable.setName(variableName); + quantifier.getImplicitVariables().add(variable); + } + } + } + + @Override + public void discardDerivedState(DerivedStateAwareResource resource) { + for (EObject object : resource.getContents()) { + if (object instanceof Problem) { + discardDerivedProblemState((Problem) object); + } + } + } + + protected void discardDerivedProblemState(Problem problem) { + problem.getNodes().clear(); + for (Statement statement : problem.getStatements()) { + if (statement instanceof PredicateDefinition) { + PredicateDefinition definition = (PredicateDefinition) statement; + for (Conjunction body : definition.getBodies()) { + body.getImplicitVariables().clear(); + for (Literal literal : body.getLiterals()) { + if (literal instanceof NegativeLiteral) { + NegativeLiteral negativeLiteral = (NegativeLiteral) literal; + negativeLiteral.getImplicitVariables().clear(); + } + } + } + } + } + } + + protected static boolean validId(String name) { + return name != null && ID_REGEX.matcher(name).matches(); + } + + protected static boolean validQualifiedName(String name) { + return name != null && QUALIFIED_NAME_REGEX.matcher(name).matches(); + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemLocationInFileProvider.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemLocationInFileProvider.java new file mode 100644 index 00000000..dfffc7ef --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemLocationInFileProvider.java @@ -0,0 +1,130 @@ +package org.eclipse.viatra.solver.language.resource; + +import java.util.Iterator; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.viatra.solver.language.model.problem.Assertion; +import org.eclipse.viatra.solver.language.model.problem.Atom; +import org.eclipse.viatra.solver.language.model.problem.Conjunction; +import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; +import org.eclipse.viatra.solver.language.model.problem.Literal; +import org.eclipse.viatra.solver.language.model.problem.NegativeLiteral; +import org.eclipse.viatra.solver.language.model.problem.Node; +import org.eclipse.viatra.solver.language.model.problem.Problem; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.Statement; +import org.eclipse.xtext.EcoreUtil2; +import org.eclipse.xtext.naming.IQualifiedNameProvider; +import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.xtext.resource.DefaultLocationInFileProvider; +import org.eclipse.xtext.resource.IEObjectDescription; +import org.eclipse.xtext.scoping.IScope; +import org.eclipse.xtext.scoping.IScopeProvider; +import org.eclipse.xtext.util.ITextRegion; + +import com.google.inject.Inject; + +public class ProblemLocationInFileProvider extends DefaultLocationInFileProvider { + @Inject + private IQualifiedNameProvider qualifiedNameProvider; + + @Inject + private IScopeProvider scopeProvider; + + @Override + protected ITextRegion doGetTextRegion(EObject obj, RegionDescription query) { + if (obj instanceof Node) { + return getNodeTextRegion((Node) obj, query); + } + if (obj instanceof ImplicitVariable) { + return getVariableTextRegion((ImplicitVariable) obj, query); + } + return super.doGetTextRegion(obj, query); + } + + protected ITextRegion getNodeTextRegion(Node node, RegionDescription query) { + ITextRegion newNodeRegion = getNewNodeTextRegion(node, query); + if (newNodeRegion != null) { + return newNodeRegion; + } + return getNodeFirstReferenceTextRegion(node, query); + } + + protected ITextRegion getNewNodeTextRegion(Node node, RegionDescription query) { + QualifiedName nodeName = qualifiedNameProvider.getFullyQualifiedName(node); + if (nodeName == null || nodeName.getSegmentCount() <= 1) { + return null; + } + if (ProblemDerivedStateComputer.NEW_NODE.equals(nodeName.getLastSegment())) { + QualifiedName className = nodeName.skipLast(1); + IScope classScope = scopeProvider.getScope(node, ProblemPackage.Literals.ASSERTION__RELATION); + IEObjectDescription description = classScope.getSingleElement(className); + if (description == null) { + return null; + } + EObject classDeclaration = description.getEObjectOrProxy(); + if (!classDeclaration.eIsProxy()) { + return doGetTextRegion(classDeclaration, query); + } + } + return null; + } + + protected ITextRegion getNodeFirstReferenceTextRegion(Node node, RegionDescription query) { + Problem problem = EcoreUtil2.getContainerOfType(node, Problem.class); + if (problem == null) { + return ITextRegion.EMPTY_REGION; + } + for (Statement statement : problem.getStatements()) { + if (statement instanceof Assertion) { + Assertion assertion = (Assertion) statement; + int index = assertion.getArguments().indexOf(node); + if (index >= 0) { + return doGetLocationOfFeature(assertion, ProblemPackage.Literals.ASSERTION__ARGUMENTS, index, + query); + } + } + } + return ITextRegion.EMPTY_REGION; + } + + protected ITextRegion getVariableTextRegion(ImplicitVariable variable, RegionDescription query) { + EObject container = variable.eContainer(); + if (container instanceof Conjunction) { + return getFirstReferenceToVariableInConjunction(variable, (Conjunction) container, query); + } + if (container instanceof NegativeLiteral) { + return getFirstReferenceToVariableInNegativeLiteral(variable, (NegativeLiteral) container, query); + } + return ITextRegion.EMPTY_REGION; + } + + protected ITextRegion getFirstReferenceToVariableInConjunction(ImplicitVariable variable, Conjunction conjunction, + RegionDescription query) { + Iterator iterator = conjunction.getLiterals().iterator(); + ITextRegion found = ITextRegion.EMPTY_REGION; + while (found == ITextRegion.EMPTY_REGION && iterator.hasNext()) { + Literal literal = iterator.next(); + if (literal instanceof Atom) { + found = getFirstReferenceToVariableInAtom(variable, (Atom) literal, query); + } else if (literal instanceof NegativeLiteral) { + found = getFirstReferenceToVariableInNegativeLiteral(variable, (NegativeLiteral) literal, query); + } + } + return found; + } + + protected ITextRegion getFirstReferenceToVariableInNegativeLiteral(ImplicitVariable variable, + NegativeLiteral literal, RegionDescription query) { + return getFirstReferenceToVariableInAtom(variable, literal.getAtom(), query); + } + + protected ITextRegion getFirstReferenceToVariableInAtom(ImplicitVariable variable, Atom atom, + RegionDescription query) { + int index = atom.getArguments().indexOf(variable); + if (index >= 0) { + return doGetLocationOfFeature(atom, ProblemPackage.Literals.ATOM__ARGUMENTS, index, query); + } + return ITextRegion.EMPTY_REGION; + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemResourceDescriptionStrategy.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemResourceDescriptionStrategy.java new file mode 100644 index 00000000..7b37ffd6 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/resource/ProblemResourceDescriptionStrategy.java @@ -0,0 +1,39 @@ +package org.eclipse.viatra.solver.language.resource; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Variable; +import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.xtext.resource.IEObjectDescription; +import org.eclipse.xtext.resource.impl.AliasedEObjectDescription; +import org.eclipse.xtext.resource.impl.DefaultResourceDescriptionStrategy; +import org.eclipse.xtext.util.IAcceptor; + +import com.google.inject.Singleton; + +@Singleton +public class ProblemResourceDescriptionStrategy extends DefaultResourceDescriptionStrategy { + @Override + public boolean createEObjectDescriptions(EObject eObject, IAcceptor acceptor) { + IAcceptor wrappedAcceptor; + if (eObject instanceof Variable) { + return false; + } + if (eObject instanceof ReferenceDeclaration) { + wrappedAcceptor = new IAcceptor() { + public void accept(IEObjectDescription description) { + acceptor.accept(description); + QualifiedName qualifiedName = description.getQualifiedName(); + if (qualifiedName.getSegmentCount() >= 2) { + QualifiedName simpleName = QualifiedName.create(qualifiedName.getLastSegment()); + IEObjectDescription aliasedDescription = new AliasedEObjectDescription(simpleName, description); + acceptor.accept(aliasedDescription); + } + }; + }; + } else { + wrappedAcceptor = acceptor; + } + return super.createEObjectDescriptions(eObject, wrappedAcceptor); + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemGlobalScopeProvider.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemGlobalScopeProvider.java new file mode 100644 index 00000000..cf01999a --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemGlobalScopeProvider.java @@ -0,0 +1,19 @@ +package org.eclipse.viatra.solver.language.scoping; + +import java.util.LinkedHashSet; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.xtext.scoping.impl.ImportUriGlobalScopeProvider; + +public class ProblemGlobalScopeProvider extends ImportUriGlobalScopeProvider { + public static final URI LIBRARY_URI = URI.createURI(ProblemGlobalScopeProvider.class.getClassLoader() + .getResource("org/eclipse/viatra/solver/language/library.problem").toString()); + + @Override + protected LinkedHashSet getImportedUris(Resource resource) { + LinkedHashSet importedUris = super.getImportedUris(resource); + importedUris.add(LIBRARY_URI); + return importedUris; + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemScopeProvider.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemScopeProvider.java new file mode 100644 index 00000000..254284a8 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemScopeProvider.java @@ -0,0 +1,74 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language.scoping; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; +import org.eclipse.viatra.solver.language.model.problem.ExistentialQuantifier; +import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition; +import org.eclipse.viatra.solver.language.model.problem.Problem; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Statement; +import org.eclipse.viatra.solver.language.model.problem.Variable; +import org.eclipse.xtext.EcoreUtil2; +import org.eclipse.xtext.naming.QualifiedName; +import org.eclipse.xtext.scoping.IScope; +import org.eclipse.xtext.scoping.Scopes; + +import com.google.common.collect.ImmutableList; + +/** + * This class contains custom scoping description. + * + * See + * https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping + * on how and when to use it. + */ +public class ProblemScopeProvider extends AbstractProblemScopeProvider { + + @Override + public IScope getScope(EObject context, EReference reference) { + IScope scope = super.getScope(context, reference); + if (reference == ProblemPackage.Literals.ATOM__ARGUMENTS) { + return getVariableScope(context, scope); + } else if (EcoreUtil2.isAssignableFrom(reference.getEReferenceType(), + ProblemPackage.Literals.REFERENCE_DECLARATION)) { + Problem problem = EcoreUtil2.getContainerOfType(context, Problem.class); + if (problem == null) { + return scope; + } + ImmutableList.Builder builder = ImmutableList.builder(); + for (Statement statement : problem.getStatements()) { + if (statement instanceof ClassDeclaration) { + ClassDeclaration classDeclaration = (ClassDeclaration) statement; + builder.addAll(classDeclaration.getReferenceDeclarations()); + } + } + return Scopes.scopeFor(builder.build(), scope); + } + return scope; + } + + protected IScope getVariableScope(EObject context, IScope delegateScope) { + List variables = new ArrayList<>(); + EObject currentContext = context; + while (currentContext != null && !(currentContext instanceof PredicateDefinition)) { + if (currentContext instanceof ExistentialQuantifier) { + ExistentialQuantifier quantifier = (ExistentialQuantifier) currentContext; + variables.addAll(quantifier.getImplicitVariables()); + } + currentContext = currentContext.eContainer(); + } + if (currentContext instanceof PredicateDefinition) { + PredicateDefinition definition = (PredicateDefinition) currentContext; + variables.addAll(definition.getParameters()); + } + return Scopes.scopeFor(variables); + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/validation/ProblemValidator.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/validation/ProblemValidator.java new file mode 100644 index 00000000..2b17e222 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/validation/ProblemValidator.java @@ -0,0 +1,25 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language.validation; + + +/** + * This class contains custom validation rules. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation + */ +public class ProblemValidator extends AbstractProblemValidator { + +// public static final String INVALID_NAME = "invalidName"; +// +// @Check +// public void checkGreetingStartsWithCapital(Greeting greeting) { +// if (!Character.isUpperCase(greeting.getName().charAt(0))) { +// warning("Name should start with a capital", +// ProblemPackage.Literals.GREETING__NAME, +// INVALID_NAME); +// } +// } + +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/resources/org/eclipse/viatra/solver/language/library.problem b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/resources/org/eclipse/viatra/solver/language/library.problem new file mode 100644 index 00000000..77f26b70 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/resources/org/eclipse/viatra/solver/language/library.problem @@ -0,0 +1,4 @@ +abstract class node + refers node[0..*] equals opposite equals. + +predicate exists(node node). \ No newline at end of file diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/AbstractProblemRuntimeModule.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/AbstractProblemRuntimeModule.java new file mode 100644 index 00000000..642b465b --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/AbstractProblemRuntimeModule.java @@ -0,0 +1,201 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language; + +import com.google.inject.Binder; +import com.google.inject.Provider; +import com.google.inject.name.Names; +import java.util.Properties; +import org.eclipse.viatra.solver.language.generator.ProblemGenerator; +import org.eclipse.viatra.solver.language.parser.antlr.ProblemAntlrTokenFileProvider; +import org.eclipse.viatra.solver.language.parser.antlr.ProblemParser; +import org.eclipse.viatra.solver.language.parser.antlr.internal.InternalProblemLexer; +import org.eclipse.viatra.solver.language.scoping.ProblemScopeProvider; +import org.eclipse.viatra.solver.language.serializer.ProblemSemanticSequencer; +import org.eclipse.viatra.solver.language.serializer.ProblemSyntacticSequencer; +import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; +import org.eclipse.viatra.solver.language.validation.ProblemConfigurableIssueCodesProvider; +import org.eclipse.viatra.solver.language.validation.ProblemValidator; +import org.eclipse.xtext.Constants; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.generator.IGenerator2; +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; +import org.eclipse.xtext.naming.IQualifiedNameProvider; +import org.eclipse.xtext.parser.IParser; +import org.eclipse.xtext.parser.ITokenToStringConverter; +import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider; +import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter; +import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; +import org.eclipse.xtext.parser.antlr.ITokenDefProvider; +import org.eclipse.xtext.parser.antlr.Lexer; +import org.eclipse.xtext.parser.antlr.LexerBindings; +import org.eclipse.xtext.parser.antlr.LexerProvider; +import org.eclipse.xtext.resource.IContainer; +import org.eclipse.xtext.resource.IResourceDescriptions; +import org.eclipse.xtext.resource.containers.IAllContainersState; +import org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider; +import org.eclipse.xtext.resource.containers.StateBasedContainerManager; +import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider; +import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; +import org.eclipse.xtext.scoping.IGlobalScopeProvider; +import org.eclipse.xtext.scoping.IScopeProvider; +import org.eclipse.xtext.scoping.IgnoreCaseLinking; +import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; +import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider; +import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider; +import org.eclipse.xtext.serializer.ISerializer; +import org.eclipse.xtext.serializer.impl.Serializer; +import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer; +import org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer; +import org.eclipse.xtext.service.DefaultRuntimeModule; +import org.eclipse.xtext.service.SingletonBinding; +import org.eclipse.xtext.validation.ConfigurableIssueCodesProvider; + +/** + * Manual modifications go to {@link ProblemRuntimeModule}. + */ +@SuppressWarnings("all") +public abstract class AbstractProblemRuntimeModule extends DefaultRuntimeModule { + + protected Properties properties = null; + + @Override + public void configure(Binder binder) { + properties = tryBindProperties(binder, "org/eclipse/viatra/solver/language/Problem.properties"); + super.configure(binder); + } + + public void configureLanguageName(Binder binder) { + binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.viatra.solver.language.Problem"); + } + + public void configureFileExtensions(Binder binder) { + if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null) + binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("problem"); + } + + // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2 + public ClassLoader bindClassLoaderToInstance() { + return getClass().getClassLoader(); + } + + // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2 + public Class bindIGrammarAccess() { + return ProblemGrammarAccess.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISemanticSequencer() { + return ProblemSemanticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISyntacticSequencer() { + return ProblemSyntacticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISerializer() { + return Serializer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIParser() { + return ProblemParser.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenToStringConverter() { + return AntlrTokenToStringConverter.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIAntlrTokenFileProvider() { + return ProblemAntlrTokenFileProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindLexer() { + return InternalProblemLexer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenDefProvider() { + return AntlrTokenDefProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Provider provideInternalProblemLexer() { + return LexerProvider.create(InternalProblemLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public void configureRuntimeLexer(Binder binder) { + binder.bind(Lexer.class) + .annotatedWith(Names.named(LexerBindings.RUNTIME)) + .to(InternalProblemLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 + @SingletonBinding(eager=true) + public Class bindProblemValidator() { + return ProblemValidator.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 + public Class bindConfigurableIssueCodesProvider() { + return ProblemConfigurableIssueCodesProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public Class bindIScopeProvider() { + return ProblemScopeProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public void configureIScopeProviderDelegate(Binder binder) { + binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(ImportedNamespaceAwareLocalScopeProvider.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public Class bindIGlobalScopeProvider() { + return DefaultGlobalScopeProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public void configureIgnoreCaseLinking(Binder binder) { + binder.bindConstant().annotatedWith(IgnoreCaseLinking.class).to(false); + } + + // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 + public Class bindIQualifiedNameProvider() { + return DefaultDeclarativeQualifiedNameProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIContainer$Manager() { + return StateBasedContainerManager.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIAllContainersState$Provider() { + return ResourceSetBasedAllContainersStateProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public void configureIResourceDescriptions(Binder binder) { + binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public void configureIResourceDescriptionsPersisted(Binder binder) { + binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 + public Class bindIGenerator2() { + return ProblemGenerator.class; + } + +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/Problem.xtextbin b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/Problem.xtextbin new file mode 100644 index 00000000..d16365d7 Binary files /dev/null and b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/Problem.xtextbin differ diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/ProblemStandaloneSetupGenerated.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/ProblemStandaloneSetupGenerated.java new file mode 100644 index 00000000..0366f9cd --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/ProblemStandaloneSetupGenerated.java @@ -0,0 +1,37 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.xtext.ISetup; +import org.eclipse.xtext.common.TerminalsStandaloneSetup; +import org.eclipse.xtext.resource.IResourceFactory; +import org.eclipse.xtext.resource.IResourceServiceProvider; + +@SuppressWarnings("all") +public class ProblemStandaloneSetupGenerated implements ISetup { + + @Override + public Injector createInjectorAndDoEMFRegistration() { + TerminalsStandaloneSetup.doSetup(); + + Injector injector = createInjector(); + register(injector); + return injector; + } + + public Injector createInjector() { + return Guice.createInjector(new ProblemRuntimeModule()); + } + + public void register(Injector injector) { + IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); + IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); + + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("problem", resourceFactory); + IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("problem", serviceProvider); + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemAntlrTokenFileProvider.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemAntlrTokenFileProvider.java new file mode 100644 index 00000000..b7ecf3f6 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemAntlrTokenFileProvider.java @@ -0,0 +1,16 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.parser.antlr; + +import java.io.InputStream; +import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; + +public class ProblemAntlrTokenFileProvider implements IAntlrTokenFileProvider { + + @Override + public InputStream getAntlrTokenFile() { + ClassLoader classLoader = getClass().getClassLoader(); + return classLoader.getResourceAsStream("org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.tokens"); + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemParser.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemParser.java new file mode 100644 index 00000000..3af86cab --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemParser.java @@ -0,0 +1,40 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.parser.antlr; + +import com.google.inject.Inject; +import org.eclipse.viatra.solver.language.parser.antlr.internal.InternalProblemParser; +import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; +import org.eclipse.xtext.parser.antlr.AbstractAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; + +public class ProblemParser extends AbstractAntlrParser { + + @Inject + private ProblemGrammarAccess grammarAccess; + + @Override + protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { + tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); + } + + + @Override + protected InternalProblemParser createParser(XtextTokenStream stream) { + return new InternalProblemParser(stream, getGrammarAccess()); + } + + @Override + protected String getDefaultRuleName() { + return "Problem"; + } + + public ProblemGrammarAccess getGrammarAccess() { + return this.grammarAccess; + } + + public void setGrammarAccess(ProblemGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g new file mode 100644 index 00000000..61b76835 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g @@ -0,0 +1,1522 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +grammar InternalProblem; + +options { + superClass=AbstractInternalAntlrParser; +} + +@lexer::header { +package org.eclipse.viatra.solver.language.parser.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; +} + +@parser::header { +package org.eclipse.viatra.solver.language.parser.antlr.internal; + +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.common.util.Enumerator; +import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; +import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; + +} + +@parser::members { + + private ProblemGrammarAccess grammarAccess; + + public InternalProblemParser(TokenStream input, ProblemGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "Problem"; + } + + @Override + protected ProblemGrammarAccess getGrammarAccess() { + return grammarAccess; + } + +} + +@rulecatch { + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } +} + +// Entry rule entryRuleProblem +entryRuleProblem returns [EObject current=null]: + { newCompositeNode(grammarAccess.getProblemRule()); } + iv_ruleProblem=ruleProblem + { $current=$iv_ruleProblem.current; } + EOF; + +// Rule Problem +ruleProblem returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + { + newCompositeNode(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); + } + lv_statements_0_0=ruleStatement + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getProblemRule()); + } + add( + $current, + "statements", + lv_statements_0_0, + "org.eclipse.viatra.solver.language.Problem.Statement"); + afterParserOrEnumRuleCall(); + } + ) + )* +; + +// Entry rule entryRuleStatement +entryRuleStatement returns [EObject current=null]: + { newCompositeNode(grammarAccess.getStatementRule()); } + iv_ruleStatement=ruleStatement + { $current=$iv_ruleStatement.current; } + EOF; + +// Rule Statement +ruleStatement returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + newCompositeNode(grammarAccess.getStatementAccess().getClassDeclarationParserRuleCall_0()); + } + this_ClassDeclaration_0=ruleClassDeclaration + { + $current = $this_ClassDeclaration_0.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_1()); + } + this_PredicateDefinition_1=rulePredicateDefinition + { + $current = $this_PredicateDefinition_1.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getStatementAccess().getAssertionParserRuleCall_2()); + } + this_Assertion_2=ruleAssertion + { + $current = $this_Assertion_2.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getStatementAccess().getScopeDeclarationParserRuleCall_3()); + } + this_ScopeDeclaration_3=ruleScopeDeclaration + { + $current = $this_ScopeDeclaration_3.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleClassDeclaration +entryRuleClassDeclaration returns [EObject current=null]: + { newCompositeNode(grammarAccess.getClassDeclarationRule()); } + iv_ruleClassDeclaration=ruleClassDeclaration + { $current=$iv_ruleClassDeclaration.current; } + EOF; + +// Rule ClassDeclaration +ruleClassDeclaration returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_abstract_0_0='abstract' + { + newLeafNode(lv_abstract_0_0, grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getClassDeclarationRule()); + } + setWithLastConsumed($current, "abstract", lv_abstract_0_0 != null, "abstract"); + } + ) + )? + otherlv_1='class' + { + newLeafNode(otherlv_1, grammarAccess.getClassDeclarationAccess().getClassKeyword_1()); + } + ( + ( + lv_name_2_0=RULE_ID + { + newLeafNode(lv_name_2_0, grammarAccess.getClassDeclarationAccess().getNameIDTerminalRuleCall_2_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getClassDeclarationRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_2_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + ( + ( + otherlv_3='extends' + { + newLeafNode(otherlv_3, grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0_0()); + } + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getClassDeclarationRule()); + } + } + otherlv_4=RULE_ID + { + newLeafNode(otherlv_4, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_0_0()); + } + ) + ) + | + ( + otherlv_5='[' + { + newLeafNode(otherlv_5, grammarAccess.getClassDeclarationAccess().getLeftSquareBracketKeyword_3_0_1_1_0()); + } + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getClassDeclarationRule()); + } + } + otherlv_6=RULE_ID + { + newLeafNode(otherlv_6, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0()); + } + ) + ) + ( + otherlv_7=',' + { + newLeafNode(otherlv_7, grammarAccess.getClassDeclarationAccess().getCommaKeyword_3_0_1_1_1_1_0()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getClassDeclarationRule()); + } + } + otherlv_8=RULE_ID + { + newLeafNode(otherlv_8, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0()); + } + ) + ) + )* + )? + otherlv_9=']' + { + newLeafNode(otherlv_9, grammarAccess.getClassDeclarationAccess().getRightSquareBracketKeyword_3_0_1_1_2()); + } + ) + ) + ) + | + ( + ( + { + newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0()); + } + lv_referenceDeclarations_10_0=ruleReferenceDeclaration + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); + } + add( + $current, + "referenceDeclarations", + lv_referenceDeclarations_10_0, + "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); + afterParserOrEnumRuleCall(); + } + ) + ) + )? + ( + otherlv_11=',' + { + newLeafNode(otherlv_11, grammarAccess.getClassDeclarationAccess().getCommaKeyword_4_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0()); + } + lv_referenceDeclarations_12_0=ruleReferenceDeclaration + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); + } + add( + $current, + "referenceDeclarations", + lv_referenceDeclarations_12_0, + "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + otherlv_13='.' + { + newLeafNode(otherlv_13, grammarAccess.getClassDeclarationAccess().getFullStopKeyword_5()); + } + ) +; + +// Entry rule entryRuleReferenceDeclaration +entryRuleReferenceDeclaration returns [EObject current=null]: + { newCompositeNode(grammarAccess.getReferenceDeclarationRule()); } + iv_ruleReferenceDeclaration=ruleReferenceDeclaration + { $current=$iv_ruleReferenceDeclaration.current; } + EOF; + +// Rule ReferenceDeclaration +ruleReferenceDeclaration returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + ( + lv_containment_0_0='contains' + { + newLeafNode(lv_containment_0_0, grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); + } + setWithLastConsumed($current, "containment", lv_containment_0_0 != null, "contains"); + } + ) + ) + | + otherlv_1='refers' + { + newLeafNode(otherlv_1, grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); + } + ) + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); + } + } + otherlv_2=RULE_ID + { + newLeafNode(otherlv_2, grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationCrossReference_1_0()); + } + ) + ) + otherlv_3='[' + { + newLeafNode(otherlv_3, grammarAccess.getReferenceDeclarationAccess().getLeftSquareBracketKeyword_2()); + } + ( + ( + { + newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getMultiplicityMultiplicityParserRuleCall_3_0()); + } + lv_multiplicity_4_0=ruleMultiplicity + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getReferenceDeclarationRule()); + } + set( + $current, + "multiplicity", + lv_multiplicity_4_0, + "org.eclipse.viatra.solver.language.Problem.Multiplicity"); + afterParserOrEnumRuleCall(); + } + ) + ) + otherlv_5=']' + { + newLeafNode(otherlv_5, grammarAccess.getReferenceDeclarationAccess().getRightSquareBracketKeyword_4()); + } + ( + ( + lv_name_6_0=RULE_ID + { + newLeafNode(lv_name_6_0, grammarAccess.getReferenceDeclarationAccess().getNameIDTerminalRuleCall_5_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_6_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + ( + otherlv_7='opposite' + { + newLeafNode(otherlv_7, grammarAccess.getReferenceDeclarationAccess().getOppositeKeyword_6_0()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); + } + } + { + newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationCrossReference_6_1_0()); + } + ruleQualifiedName + { + afterParserOrEnumRuleCall(); + } + ) + ) + )? + ) +; + +// Entry rule entryRulePredicateDefinition +entryRulePredicateDefinition returns [EObject current=null]: + { newCompositeNode(grammarAccess.getPredicateDefinitionRule()); } + iv_rulePredicateDefinition=rulePredicateDefinition + { $current=$iv_rulePredicateDefinition.current; } + EOF; + +// Rule PredicateDefinition +rulePredicateDefinition returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + ( + ( + lv_error_0_0='error' + { + newLeafNode(lv_error_0_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); + } + setWithLastConsumed($current, "error", lv_error_0_0 != null, "error"); + } + ) + ) + ( + otherlv_1='pred' + { + newLeafNode(otherlv_1, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); + } + )? + ) + | + otherlv_2='pred' + { + newLeafNode(otherlv_2, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_1()); + } + ) + ( + ( + lv_name_3_0=RULE_ID + { + newLeafNode(lv_name_3_0, grammarAccess.getPredicateDefinitionAccess().getNameIDTerminalRuleCall_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_3_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + otherlv_4='(' + { + newLeafNode(otherlv_4, grammarAccess.getPredicateDefinitionAccess().getLeftParenthesisKeyword_2()); + } + ( + ( + ( + { + newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_0_0()); + } + lv_parameters_5_0=ruleParameter + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); + } + add( + $current, + "parameters", + lv_parameters_5_0, + "org.eclipse.viatra.solver.language.Problem.Parameter"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_6=',' + { + newLeafNode(otherlv_6, grammarAccess.getPredicateDefinitionAccess().getCommaKeyword_3_1_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_1_1_0()); + } + lv_parameters_7_0=ruleParameter + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); + } + add( + $current, + "parameters", + lv_parameters_7_0, + "org.eclipse.viatra.solver.language.Problem.Parameter"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + )? + otherlv_8=')' + { + newLeafNode(otherlv_8, grammarAccess.getPredicateDefinitionAccess().getRightParenthesisKeyword_4()); + } + ( + otherlv_9=':=' + { + newLeafNode(otherlv_9, grammarAccess.getPredicateDefinitionAccess().getColonEqualsSignKeyword_5_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_1_0()); + } + lv_bodies_10_0=ruleConjunction + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); + } + add( + $current, + "bodies", + lv_bodies_10_0, + "org.eclipse.viatra.solver.language.Problem.Conjunction"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_11=';' + { + newLeafNode(otherlv_11, grammarAccess.getPredicateDefinitionAccess().getSemicolonKeyword_5_2_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_2_1_0()); + } + lv_bodies_12_0=ruleConjunction + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); + } + add( + $current, + "bodies", + lv_bodies_12_0, + "org.eclipse.viatra.solver.language.Problem.Conjunction"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + )? + otherlv_13='.' + { + newLeafNode(otherlv_13, grammarAccess.getPredicateDefinitionAccess().getFullStopKeyword_6()); + } + ) +; + +// Entry rule entryRuleParameter +entryRuleParameter returns [EObject current=null]: + { newCompositeNode(grammarAccess.getParameterRule()); } + iv_ruleParameter=ruleParameter + { $current=$iv_ruleParameter.current; } + EOF; + +// Rule Parameter +ruleParameter returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getParameterRule()); + } + } + otherlv_0=RULE_ID + { + newLeafNode(otherlv_0, grammarAccess.getParameterAccess().getParameterTypeClassDeclarationCrossReference_0_0()); + } + ) + ) + ( + ( + lv_name_1_0=RULE_ID + { + newLeafNode(lv_name_1_0, grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getParameterRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_1_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + ) +; + +// Entry rule entryRuleConjunction +entryRuleConjunction returns [EObject current=null]: + { newCompositeNode(grammarAccess.getConjunctionRule()); } + iv_ruleConjunction=ruleConjunction + { $current=$iv_ruleConjunction.current; } + EOF; + +// Rule Conjunction +ruleConjunction returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_0_0()); + } + lv_literals_0_0=ruleLiteral + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getConjunctionRule()); + } + add( + $current, + "literals", + lv_literals_0_0, + "org.eclipse.viatra.solver.language.Problem.Literal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_1=',' + { + newLeafNode(otherlv_1, grammarAccess.getConjunctionAccess().getCommaKeyword_1_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_1_1_0()); + } + lv_literals_2_0=ruleLiteral + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getConjunctionRule()); + } + add( + $current, + "literals", + lv_literals_2_0, + "org.eclipse.viatra.solver.language.Problem.Literal"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ) +; + +// Entry rule entryRuleLiteral +entryRuleLiteral returns [EObject current=null]: + { newCompositeNode(grammarAccess.getLiteralRule()); } + iv_ruleLiteral=ruleLiteral + { $current=$iv_ruleLiteral.current; } + EOF; + +// Rule Literal +ruleLiteral returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + newCompositeNode(grammarAccess.getLiteralAccess().getAtomParserRuleCall_0()); + } + this_Atom_0=ruleAtom + { + $current = $this_Atom_0.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getLiteralAccess().getNegativeLiteralParserRuleCall_1()); + } + this_NegativeLiteral_1=ruleNegativeLiteral + { + $current = $this_NegativeLiteral_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleNegativeLiteral +entryRuleNegativeLiteral returns [EObject current=null]: + { newCompositeNode(grammarAccess.getNegativeLiteralRule()); } + iv_ruleNegativeLiteral=ruleNegativeLiteral + { $current=$iv_ruleNegativeLiteral.current; } + EOF; + +// Rule NegativeLiteral +ruleNegativeLiteral returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='!' + { + newLeafNode(otherlv_0, grammarAccess.getNegativeLiteralAccess().getExclamationMarkKeyword_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0()); + } + lv_atom_1_0=ruleAtom + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getNegativeLiteralRule()); + } + set( + $current, + "atom", + lv_atom_1_0, + "org.eclipse.viatra.solver.language.Problem.Atom"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleAtom +entryRuleAtom returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAtomRule()); } + iv_ruleAtom=ruleAtom + { $current=$iv_ruleAtom.current; } + EOF; + +// Rule Atom +ruleAtom returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAtomRule()); + } + } + { + newCompositeNode(grammarAccess.getAtomAccess().getRelationRelationCrossReference_0_0()); + } + ruleQualifiedName + { + afterParserOrEnumRuleCall(); + } + ) + ) + ( + ( + lv_transitiveClosure_1_0='+' + { + newLeafNode(lv_transitiveClosure_1_0, grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAtomRule()); + } + setWithLastConsumed($current, "transitiveClosure", lv_transitiveClosure_1_0 != null, "+"); + } + ) + )? + otherlv_2='(' + { + newLeafNode(otherlv_2, grammarAccess.getAtomAccess().getLeftParenthesisKeyword_2()); + } + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAtomRule()); + } + } + otherlv_3=RULE_ID + { + newLeafNode(otherlv_3, grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_0_0()); + } + ) + ) + ( + otherlv_4=',' + { + newLeafNode(otherlv_4, grammarAccess.getAtomAccess().getCommaKeyword_3_1_0()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAtomRule()); + } + } + otherlv_5=RULE_ID + { + newLeafNode(otherlv_5, grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_1_1_0()); + } + ) + ) + )* + )? + otherlv_6=')' + { + newLeafNode(otherlv_6, grammarAccess.getAtomAccess().getRightParenthesisKeyword_4()); + } + ) +; + +// Entry rule entryRuleAssertion +entryRuleAssertion returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAssertionRule()); } + iv_ruleAssertion=ruleAssertion + { $current=$iv_ruleAssertion.current; } + EOF; + +// Rule Assertion +ruleAssertion returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAssertionRule()); + } + } + { + newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_0_0_0()); + } + ruleQualifiedName + { + afterParserOrEnumRuleCall(); + } + ) + ) + otherlv_1='(' + { + newLeafNode(otherlv_1, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_0_1()); + } + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAssertionRule()); + } + } + { + newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_0_0()); + } + ruleQualifiedName + { + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_3=',' + { + newLeafNode(otherlv_3, grammarAccess.getAssertionAccess().getCommaKeyword_0_0_2_1_0()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAssertionRule()); + } + } + { + newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_1_1_0()); + } + ruleQualifiedName + { + afterParserOrEnumRuleCall(); + } + ) + ) + )* + )? + otherlv_5=')' + { + newLeafNode(otherlv_5, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_0_3()); + } + otherlv_6=':' + { + newLeafNode(otherlv_6, grammarAccess.getAssertionAccess().getColonKeyword_0_0_4()); + } + ( + ( + { + newCompositeNode(grammarAccess.getAssertionAccess().getValueLogicValueEnumRuleCall_0_0_5_0()); + } + lv_value_7_0=ruleLogicValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAssertionRule()); + } + set( + $current, + "value", + lv_value_7_0, + "org.eclipse.viatra.solver.language.Problem.LogicValue"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) + | + ( + ( + ( + { + newCompositeNode(grammarAccess.getAssertionAccess().getValueShortLogicValueEnumRuleCall_0_1_0_0()); + } + lv_value_8_0=ruleShortLogicValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAssertionRule()); + } + set( + $current, + "value", + lv_value_8_0, + "org.eclipse.viatra.solver.language.Problem.ShortLogicValue"); + afterParserOrEnumRuleCall(); + } + ) + )? + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAssertionRule()); + } + } + { + newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_1_1_0()); + } + ruleQualifiedName + { + afterParserOrEnumRuleCall(); + } + ) + ) + otherlv_10='(' + { + newLeafNode(otherlv_10, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_1_2()); + } + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAssertionRule()); + } + } + { + newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_0_0()); + } + ruleQualifiedName + { + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_12=',' + { + newLeafNode(otherlv_12, grammarAccess.getAssertionAccess().getCommaKeyword_0_1_3_1_0()); + } + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAssertionRule()); + } + } + { + newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_1_1_0()); + } + ruleQualifiedName + { + afterParserOrEnumRuleCall(); + } + ) + ) + )* + )? + otherlv_14=')' + { + newLeafNode(otherlv_14, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_1_4()); + } + ) + ) + otherlv_15='.' + { + newLeafNode(otherlv_15, grammarAccess.getAssertionAccess().getFullStopKeyword_1()); + } + ) +; + +// Entry rule entryRuleScopeDeclaration +entryRuleScopeDeclaration returns [EObject current=null]: + { newCompositeNode(grammarAccess.getScopeDeclarationRule()); } + iv_ruleScopeDeclaration=ruleScopeDeclaration + { $current=$iv_ruleScopeDeclaration.current; } + EOF; + +// Rule ScopeDeclaration +ruleScopeDeclaration returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='scope' + { + newLeafNode(otherlv_0, grammarAccess.getScopeDeclarationAccess().getScopeKeyword_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_1_0()); + } + lv_typeScopes_1_0=ruleTypeScope + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); + } + add( + $current, + "typeScopes", + lv_typeScopes_1_0, + "org.eclipse.viatra.solver.language.Problem.TypeScope"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_2=',' + { + newLeafNode(otherlv_2, grammarAccess.getScopeDeclarationAccess().getCommaKeyword_2_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_2_1_0()); + } + lv_typeScopes_3_0=ruleTypeScope + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); + } + add( + $current, + "typeScopes", + lv_typeScopes_3_0, + "org.eclipse.viatra.solver.language.Problem.TypeScope"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + otherlv_4='.' + { + newLeafNode(otherlv_4, grammarAccess.getScopeDeclarationAccess().getFullStopKeyword_3()); + } + ) +; + +// Entry rule entryRuleTypeScope +entryRuleTypeScope returns [EObject current=null]: + { newCompositeNode(grammarAccess.getTypeScopeRule()); } + iv_ruleTypeScope=ruleTypeScope + { $current=$iv_ruleTypeScope.current; } + EOF; + +// Rule TypeScope +ruleTypeScope returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getTypeScopeRule()); + } + } + otherlv_0=RULE_ID + { + newLeafNode(otherlv_0, grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationCrossReference_0_0()); + } + ) + ) + ( + ( + ( + lv_increment_1_0='+=' + { + newLeafNode(lv_increment_1_0, grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getTypeScopeRule()); + } + setWithLastConsumed($current, "increment", lv_increment_1_0 != null, "+="); + } + ) + ) + | + otherlv_2='=' + { + newLeafNode(otherlv_2, grammarAccess.getTypeScopeAccess().getEqualsSignKeyword_1_1()); + } + ) + ( + ( + { + newCompositeNode(grammarAccess.getTypeScopeAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); + } + lv_multiplicity_3_0=ruleMultiplicity + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getTypeScopeRule()); + } + set( + $current, + "multiplicity", + lv_multiplicity_3_0, + "org.eclipse.viatra.solver.language.Problem.Multiplicity"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleMultiplicity +entryRuleMultiplicity returns [EObject current=null]: + { newCompositeNode(grammarAccess.getMultiplicityRule()); } + iv_ruleMultiplicity=ruleMultiplicity + { $current=$iv_ruleMultiplicity.current; } + EOF; + +// Rule Multiplicity +ruleMultiplicity returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + newCompositeNode(grammarAccess.getMultiplicityAccess().getRangeMultiplicityParserRuleCall_0()); + } + this_RangeMultiplicity_0=ruleRangeMultiplicity + { + $current = $this_RangeMultiplicity_0.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); + } + this_ExactMultiplicity_1=ruleExactMultiplicity + { + $current = $this_ExactMultiplicity_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleRangeMultiplicity +entryRuleRangeMultiplicity returns [EObject current=null]: + { newCompositeNode(grammarAccess.getRangeMultiplicityRule()); } + iv_ruleRangeMultiplicity=ruleRangeMultiplicity + { $current=$iv_ruleRangeMultiplicity.current; } + EOF; + +// Rule RangeMultiplicity +ruleRangeMultiplicity returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_lowerBound_0_0=RULE_INT + { + newLeafNode(lv_lowerBound_0_0, grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getRangeMultiplicityRule()); + } + setWithLastConsumed( + $current, + "lowerBound", + lv_lowerBound_0_0, + "org.eclipse.xtext.common.Terminals.INT"); + } + ) + ) + otherlv_1='..' + { + newLeafNode(otherlv_1, grammarAccess.getRangeMultiplicityAccess().getFullStopFullStopKeyword_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0()); + } + lv_upperBound_2_0=ruleUpperBound + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getRangeMultiplicityRule()); + } + set( + $current, + "upperBound", + lv_upperBound_2_0, + "org.eclipse.viatra.solver.language.Problem.UpperBound"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleExactMultiplicity +entryRuleExactMultiplicity returns [EObject current=null]: + { newCompositeNode(grammarAccess.getExactMultiplicityRule()); } + iv_ruleExactMultiplicity=ruleExactMultiplicity + { $current=$iv_ruleExactMultiplicity.current; } + EOF; + +// Rule ExactMultiplicity +ruleExactMultiplicity returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + lv_exactValue_0_0=RULE_INT + { + newLeafNode(lv_exactValue_0_0, grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getExactMultiplicityRule()); + } + setWithLastConsumed( + $current, + "exactValue", + lv_exactValue_0_0, + "org.eclipse.xtext.common.Terminals.INT"); + } + ) + ) +; + +// Entry rule entryRuleUpperBound +entryRuleUpperBound returns [String current=null]: + { newCompositeNode(grammarAccess.getUpperBoundRule()); } + iv_ruleUpperBound=ruleUpperBound + { $current=$iv_ruleUpperBound.current.getText(); } + EOF; + +// Rule UpperBound +ruleUpperBound returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_INT_0=RULE_INT + { + $current.merge(this_INT_0); + } + { + newLeafNode(this_INT_0, grammarAccess.getUpperBoundAccess().getINTTerminalRuleCall_0()); + } + | + kw='*' + { + $current.merge(kw); + newLeafNode(kw, grammarAccess.getUpperBoundAccess().getAsteriskKeyword_1()); + } + ) +; + +// Entry rule entryRuleQualifiedName +entryRuleQualifiedName returns [String current=null]: + { newCompositeNode(grammarAccess.getQualifiedNameRule()); } + iv_ruleQualifiedName=ruleQualifiedName + { $current=$iv_ruleQualifiedName.current.getText(); } + EOF; + +// Rule QualifiedName +ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_ID_0=RULE_ID + { + $current.merge(this_ID_0); + } + { + newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); + } + ( + kw='::' + { + $current.merge(kw); + newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getColonColonKeyword_1_0()); + } + this_ID_2=RULE_ID + { + $current.merge(this_ID_2); + } + { + newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); + } + )* + ) +; + +// Rule LogicValue +ruleLogicValue returns [Enumerator current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + enumLiteral_0='true' + { + $current = grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_0, grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); + } + ) + | + ( + enumLiteral_1='false' + { + $current = grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_1, grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); + } + ) + | + ( + enumLiteral_2='unknown' + { + $current = grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_2, grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); + } + ) + ) +; + +// Rule ShortLogicValue +ruleShortLogicValue returns [Enumerator current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + enumLiteral_0='!' + { + $current = grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_0, grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0()); + } + ) + | + ( + enumLiteral_1='?' + { + $current = grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_1, grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1()); + } + ) + ) +; + +RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; + +RULE_INT : ('0'..'9')+; + +RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); + +RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; + +RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; + +RULE_WS : (' '|'\t'|'\r'|'\n')+; + +RULE_ANY_OTHER : .; diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.tokens b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.tokens new file mode 100644 index 00000000..22ef662c --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.tokens @@ -0,0 +1,65 @@ +'!'=27 +'('=23 +')'=24 +'*'=34 +'+'=28 +'+='=31 +','=15 +'.'=17 +'..'=33 +':'=29 +'::'=35 +':='=25 +';'=26 +'='=32 +'?'=39 +'['=14 +']'=16 +'abstract'=11 +'class'=12 +'contains'=18 +'error'=21 +'extends'=13 +'false'=37 +'opposite'=20 +'pred'=22 +'refers'=19 +'scope'=30 +'true'=36 +'unknown'=38 +RULE_ANY_OTHER=10 +RULE_ID=4 +RULE_INT=5 +RULE_ML_COMMENT=7 +RULE_SL_COMMENT=8 +RULE_STRING=6 +RULE_WS=9 +T__11=11 +T__12=12 +T__13=13 +T__14=14 +T__15=15 +T__16=16 +T__17=17 +T__18=18 +T__19=19 +T__20=20 +T__21=21 +T__22=22 +T__23=23 +T__24=24 +T__25=25 +T__26=26 +T__27=27 +T__28=28 +T__29=29 +T__30=30 +T__31=31 +T__32=32 +T__33=33 +T__34=34 +T__35=35 +T__36=36 +T__37=37 +T__38=38 +T__39=39 diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemLexer.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemLexer.java new file mode 100644 index 00000000..a0b530c8 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemLexer.java @@ -0,0 +1,1699 @@ +package org.eclipse.viatra.solver.language.parser.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalProblemLexer extends Lexer { + public static final int RULE_STRING=6; + public static final int RULE_SL_COMMENT=8; + public static final int T__19=19; + public static final int T__15=15; + public static final int T__37=37; + public static final int T__16=16; + public static final int T__38=38; + public static final int T__17=17; + public static final int T__39=39; + public static final int T__18=18; + public static final int T__11=11; + public static final int T__33=33; + public static final int T__12=12; + public static final int T__34=34; + public static final int T__13=13; + public static final int T__35=35; + public static final int T__14=14; + public static final int T__36=36; + public static final int EOF=-1; + public static final int T__30=30; + public static final int T__31=31; + public static final int T__32=32; + public static final int RULE_ID=4; + public static final int RULE_WS=9; + public static final int RULE_ANY_OTHER=10; + public static final int T__26=26; + public static final int T__27=27; + public static final int T__28=28; + public static final int RULE_INT=5; + public static final int T__29=29; + public static final int T__22=22; + public static final int RULE_ML_COMMENT=7; + public static final int T__23=23; + public static final int T__24=24; + public static final int T__25=25; + public static final int T__20=20; + public static final int T__21=21; + + // delegates + // delegators + + public InternalProblemLexer() {;} + public InternalProblemLexer(CharStream input) { + this(input, new RecognizerSharedState()); + } + public InternalProblemLexer(CharStream input, RecognizerSharedState state) { + super(input,state); + + } + public String getGrammarFileName() { return "InternalProblem.g"; } + + // $ANTLR start "T__11" + public final void mT__11() throws RecognitionException { + try { + int _type = T__11; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:11:7: ( 'abstract' ) + // InternalProblem.g:11:9: 'abstract' + { + match("abstract"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__11" + + // $ANTLR start "T__12" + public final void mT__12() throws RecognitionException { + try { + int _type = T__12; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:12:7: ( 'class' ) + // InternalProblem.g:12:9: 'class' + { + match("class"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__12" + + // $ANTLR start "T__13" + public final void mT__13() throws RecognitionException { + try { + int _type = T__13; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:13:7: ( 'extends' ) + // InternalProblem.g:13:9: 'extends' + { + match("extends"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__13" + + // $ANTLR start "T__14" + public final void mT__14() throws RecognitionException { + try { + int _type = T__14; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:14:7: ( '[' ) + // InternalProblem.g:14:9: '[' + { + match('['); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__14" + + // $ANTLR start "T__15" + public final void mT__15() throws RecognitionException { + try { + int _type = T__15; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:15:7: ( ',' ) + // InternalProblem.g:15:9: ',' + { + match(','); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__15" + + // $ANTLR start "T__16" + public final void mT__16() throws RecognitionException { + try { + int _type = T__16; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:16:7: ( ']' ) + // InternalProblem.g:16:9: ']' + { + match(']'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__16" + + // $ANTLR start "T__17" + public final void mT__17() throws RecognitionException { + try { + int _type = T__17; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:17:7: ( '.' ) + // InternalProblem.g:17:9: '.' + { + match('.'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__17" + + // $ANTLR start "T__18" + public final void mT__18() throws RecognitionException { + try { + int _type = T__18; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:18:7: ( 'contains' ) + // InternalProblem.g:18:9: 'contains' + { + match("contains"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__18" + + // $ANTLR start "T__19" + public final void mT__19() throws RecognitionException { + try { + int _type = T__19; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:19:7: ( 'refers' ) + // InternalProblem.g:19:9: 'refers' + { + match("refers"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__19" + + // $ANTLR start "T__20" + public final void mT__20() throws RecognitionException { + try { + int _type = T__20; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:20:7: ( 'opposite' ) + // InternalProblem.g:20:9: 'opposite' + { + match("opposite"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__20" + + // $ANTLR start "T__21" + public final void mT__21() throws RecognitionException { + try { + int _type = T__21; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:21:7: ( 'error' ) + // InternalProblem.g:21:9: 'error' + { + match("error"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__21" + + // $ANTLR start "T__22" + public final void mT__22() throws RecognitionException { + try { + int _type = T__22; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:22:7: ( 'pred' ) + // InternalProblem.g:22:9: 'pred' + { + match("pred"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__22" + + // $ANTLR start "T__23" + public final void mT__23() throws RecognitionException { + try { + int _type = T__23; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:23:7: ( '(' ) + // InternalProblem.g:23:9: '(' + { + match('('); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__23" + + // $ANTLR start "T__24" + public final void mT__24() throws RecognitionException { + try { + int _type = T__24; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:24:7: ( ')' ) + // InternalProblem.g:24:9: ')' + { + match(')'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__24" + + // $ANTLR start "T__25" + public final void mT__25() throws RecognitionException { + try { + int _type = T__25; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:25:7: ( ':=' ) + // InternalProblem.g:25:9: ':=' + { + match(":="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__25" + + // $ANTLR start "T__26" + public final void mT__26() throws RecognitionException { + try { + int _type = T__26; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:26:7: ( ';' ) + // InternalProblem.g:26:9: ';' + { + match(';'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__26" + + // $ANTLR start "T__27" + public final void mT__27() throws RecognitionException { + try { + int _type = T__27; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:27:7: ( '!' ) + // InternalProblem.g:27:9: '!' + { + match('!'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__27" + + // $ANTLR start "T__28" + public final void mT__28() throws RecognitionException { + try { + int _type = T__28; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:28:7: ( '+' ) + // InternalProblem.g:28:9: '+' + { + match('+'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__28" + + // $ANTLR start "T__29" + public final void mT__29() throws RecognitionException { + try { + int _type = T__29; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:29:7: ( ':' ) + // InternalProblem.g:29:9: ':' + { + match(':'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__29" + + // $ANTLR start "T__30" + public final void mT__30() throws RecognitionException { + try { + int _type = T__30; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:30:7: ( 'scope' ) + // InternalProblem.g:30:9: 'scope' + { + match("scope"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__30" + + // $ANTLR start "T__31" + public final void mT__31() throws RecognitionException { + try { + int _type = T__31; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:31:7: ( '+=' ) + // InternalProblem.g:31:9: '+=' + { + match("+="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__31" + + // $ANTLR start "T__32" + public final void mT__32() throws RecognitionException { + try { + int _type = T__32; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:32:7: ( '=' ) + // InternalProblem.g:32:9: '=' + { + match('='); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__32" + + // $ANTLR start "T__33" + public final void mT__33() throws RecognitionException { + try { + int _type = T__33; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:33:7: ( '..' ) + // InternalProblem.g:33:9: '..' + { + match(".."); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__33" + + // $ANTLR start "T__34" + public final void mT__34() throws RecognitionException { + try { + int _type = T__34; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:34:7: ( '*' ) + // InternalProblem.g:34:9: '*' + { + match('*'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__34" + + // $ANTLR start "T__35" + public final void mT__35() throws RecognitionException { + try { + int _type = T__35; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:35:7: ( '::' ) + // InternalProblem.g:35:9: '::' + { + match("::"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__35" + + // $ANTLR start "T__36" + public final void mT__36() throws RecognitionException { + try { + int _type = T__36; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:36:7: ( 'true' ) + // InternalProblem.g:36:9: 'true' + { + match("true"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__36" + + // $ANTLR start "T__37" + public final void mT__37() throws RecognitionException { + try { + int _type = T__37; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:37:7: ( 'false' ) + // InternalProblem.g:37:9: 'false' + { + match("false"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__37" + + // $ANTLR start "T__38" + public final void mT__38() throws RecognitionException { + try { + int _type = T__38; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:38:7: ( 'unknown' ) + // InternalProblem.g:38:9: 'unknown' + { + match("unknown"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__38" + + // $ANTLR start "T__39" + public final void mT__39() throws RecognitionException { + try { + int _type = T__39; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:39:7: ( '?' ) + // InternalProblem.g:39:9: '?' + { + match('?'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__39" + + // $ANTLR start "RULE_ID" + public final void mRULE_ID() throws RecognitionException { + try { + int _type = RULE_ID; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:1510:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // InternalProblem.g:1510:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + { + // InternalProblem.g:1510:11: ( '^' )? + int alt1=2; + int LA1_0 = input.LA(1); + + if ( (LA1_0=='^') ) { + alt1=1; + } + switch (alt1) { + case 1 : + // InternalProblem.g:1510:11: '^' + { + match('^'); + + } + break; + + } + + if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + // InternalProblem.g:1510:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + loop2: + do { + int alt2=2; + int LA2_0 = input.LA(1); + + if ( ((LA2_0>='0' && LA2_0<='9')||(LA2_0>='A' && LA2_0<='Z')||LA2_0=='_'||(LA2_0>='a' && LA2_0<='z')) ) { + alt2=1; + } + + + switch (alt2) { + case 1 : + // InternalProblem.g: + { + if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop2; + } + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ID" + + // $ANTLR start "RULE_INT" + public final void mRULE_INT() throws RecognitionException { + try { + int _type = RULE_INT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:1512:10: ( ( '0' .. '9' )+ ) + // InternalProblem.g:1512:12: ( '0' .. '9' )+ + { + // InternalProblem.g:1512:12: ( '0' .. '9' )+ + int cnt3=0; + loop3: + do { + int alt3=2; + int LA3_0 = input.LA(1); + + if ( ((LA3_0>='0' && LA3_0<='9')) ) { + alt3=1; + } + + + switch (alt3) { + case 1 : + // InternalProblem.g:1512:13: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt3 >= 1 ) break loop3; + EarlyExitException eee = + new EarlyExitException(3, input); + throw eee; + } + cnt3++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_INT" + + // $ANTLR start "RULE_STRING" + public final void mRULE_STRING() throws RecognitionException { + try { + int _type = RULE_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:1514:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // InternalProblem.g:1514:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + { + // InternalProblem.g:1514:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + int alt6=2; + int LA6_0 = input.LA(1); + + if ( (LA6_0=='\"') ) { + alt6=1; + } + else if ( (LA6_0=='\'') ) { + alt6=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 6, 0, input); + + throw nvae; + } + switch (alt6) { + case 1 : + // InternalProblem.g:1514:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + { + match('\"'); + // InternalProblem.g:1514:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + loop4: + do { + int alt4=3; + int LA4_0 = input.LA(1); + + if ( (LA4_0=='\\') ) { + alt4=1; + } + else if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\uFFFF')) ) { + alt4=2; + } + + + switch (alt4) { + case 1 : + // InternalProblem.g:1514:21: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalProblem.g:1514:28: ~ ( ( '\\\\' | '\"' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop4; + } + } while (true); + + match('\"'); + + } + break; + case 2 : + // InternalProblem.g:1514:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + { + match('\''); + // InternalProblem.g:1514:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + loop5: + do { + int alt5=3; + int LA5_0 = input.LA(1); + + if ( (LA5_0=='\\') ) { + alt5=1; + } + else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\uFFFF')) ) { + alt5=2; + } + + + switch (alt5) { + case 1 : + // InternalProblem.g:1514:54: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalProblem.g:1514:61: ~ ( ( '\\\\' | '\\'' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop5; + } + } while (true); + + match('\''); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_STRING" + + // $ANTLR start "RULE_ML_COMMENT" + public final void mRULE_ML_COMMENT() throws RecognitionException { + try { + int _type = RULE_ML_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:1516:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // InternalProblem.g:1516:19: '/*' ( options {greedy=false; } : . )* '*/' + { + match("/*"); + + // InternalProblem.g:1516:24: ( options {greedy=false; } : . )* + loop7: + do { + int alt7=2; + int LA7_0 = input.LA(1); + + if ( (LA7_0=='*') ) { + int LA7_1 = input.LA(2); + + if ( (LA7_1=='/') ) { + alt7=2; + } + else if ( ((LA7_1>='\u0000' && LA7_1<='.')||(LA7_1>='0' && LA7_1<='\uFFFF')) ) { + alt7=1; + } + + + } + else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFF')) ) { + alt7=1; + } + + + switch (alt7) { + case 1 : + // InternalProblem.g:1516:52: . + { + matchAny(); + + } + break; + + default : + break loop7; + } + } while (true); + + match("*/"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ML_COMMENT" + + // $ANTLR start "RULE_SL_COMMENT" + public final void mRULE_SL_COMMENT() throws RecognitionException { + try { + int _type = RULE_SL_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:1518:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // InternalProblem.g:1518:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + { + match("//"); + + // InternalProblem.g:1518:24: (~ ( ( '\\n' | '\\r' ) ) )* + loop8: + do { + int alt8=2; + int LA8_0 = input.LA(1); + + if ( ((LA8_0>='\u0000' && LA8_0<='\t')||(LA8_0>='\u000B' && LA8_0<='\f')||(LA8_0>='\u000E' && LA8_0<='\uFFFF')) ) { + alt8=1; + } + + + switch (alt8) { + case 1 : + // InternalProblem.g:1518:24: ~ ( ( '\\n' | '\\r' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop8; + } + } while (true); + + // InternalProblem.g:1518:40: ( ( '\\r' )? '\\n' )? + int alt10=2; + int LA10_0 = input.LA(1); + + if ( (LA10_0=='\n'||LA10_0=='\r') ) { + alt10=1; + } + switch (alt10) { + case 1 : + // InternalProblem.g:1518:41: ( '\\r' )? '\\n' + { + // InternalProblem.g:1518:41: ( '\\r' )? + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0=='\r') ) { + alt9=1; + } + switch (alt9) { + case 1 : + // InternalProblem.g:1518:41: '\\r' + { + match('\r'); + + } + break; + + } + + match('\n'); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SL_COMMENT" + + // $ANTLR start "RULE_WS" + public final void mRULE_WS() throws RecognitionException { + try { + int _type = RULE_WS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:1520:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) + // InternalProblem.g:1520:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + { + // InternalProblem.g:1520:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + int cnt11=0; + loop11: + do { + int alt11=2; + int LA11_0 = input.LA(1); + + if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) { + alt11=1; + } + + + switch (alt11) { + case 1 : + // InternalProblem.g: + { + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + if ( cnt11 >= 1 ) break loop11; + EarlyExitException eee = + new EarlyExitException(11, input); + throw eee; + } + cnt11++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_WS" + + // $ANTLR start "RULE_ANY_OTHER" + public final void mRULE_ANY_OTHER() throws RecognitionException { + try { + int _type = RULE_ANY_OTHER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalProblem.g:1522:16: ( . ) + // InternalProblem.g:1522:18: . + { + matchAny(); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ANY_OTHER" + + public void mTokens() throws RecognitionException { + // InternalProblem.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER ) + int alt12=36; + alt12 = dfa12.predict(input); + switch (alt12) { + case 1 : + // InternalProblem.g:1:10: T__11 + { + mT__11(); + + } + break; + case 2 : + // InternalProblem.g:1:16: T__12 + { + mT__12(); + + } + break; + case 3 : + // InternalProblem.g:1:22: T__13 + { + mT__13(); + + } + break; + case 4 : + // InternalProblem.g:1:28: T__14 + { + mT__14(); + + } + break; + case 5 : + // InternalProblem.g:1:34: T__15 + { + mT__15(); + + } + break; + case 6 : + // InternalProblem.g:1:40: T__16 + { + mT__16(); + + } + break; + case 7 : + // InternalProblem.g:1:46: T__17 + { + mT__17(); + + } + break; + case 8 : + // InternalProblem.g:1:52: T__18 + { + mT__18(); + + } + break; + case 9 : + // InternalProblem.g:1:58: T__19 + { + mT__19(); + + } + break; + case 10 : + // InternalProblem.g:1:64: T__20 + { + mT__20(); + + } + break; + case 11 : + // InternalProblem.g:1:70: T__21 + { + mT__21(); + + } + break; + case 12 : + // InternalProblem.g:1:76: T__22 + { + mT__22(); + + } + break; + case 13 : + // InternalProblem.g:1:82: T__23 + { + mT__23(); + + } + break; + case 14 : + // InternalProblem.g:1:88: T__24 + { + mT__24(); + + } + break; + case 15 : + // InternalProblem.g:1:94: T__25 + { + mT__25(); + + } + break; + case 16 : + // InternalProblem.g:1:100: T__26 + { + mT__26(); + + } + break; + case 17 : + // InternalProblem.g:1:106: T__27 + { + mT__27(); + + } + break; + case 18 : + // InternalProblem.g:1:112: T__28 + { + mT__28(); + + } + break; + case 19 : + // InternalProblem.g:1:118: T__29 + { + mT__29(); + + } + break; + case 20 : + // InternalProblem.g:1:124: T__30 + { + mT__30(); + + } + break; + case 21 : + // InternalProblem.g:1:130: T__31 + { + mT__31(); + + } + break; + case 22 : + // InternalProblem.g:1:136: T__32 + { + mT__32(); + + } + break; + case 23 : + // InternalProblem.g:1:142: T__33 + { + mT__33(); + + } + break; + case 24 : + // InternalProblem.g:1:148: T__34 + { + mT__34(); + + } + break; + case 25 : + // InternalProblem.g:1:154: T__35 + { + mT__35(); + + } + break; + case 26 : + // InternalProblem.g:1:160: T__36 + { + mT__36(); + + } + break; + case 27 : + // InternalProblem.g:1:166: T__37 + { + mT__37(); + + } + break; + case 28 : + // InternalProblem.g:1:172: T__38 + { + mT__38(); + + } + break; + case 29 : + // InternalProblem.g:1:178: T__39 + { + mT__39(); + + } + break; + case 30 : + // InternalProblem.g:1:184: RULE_ID + { + mRULE_ID(); + + } + break; + case 31 : + // InternalProblem.g:1:192: RULE_INT + { + mRULE_INT(); + + } + break; + case 32 : + // InternalProblem.g:1:201: RULE_STRING + { + mRULE_STRING(); + + } + break; + case 33 : + // InternalProblem.g:1:213: RULE_ML_COMMENT + { + mRULE_ML_COMMENT(); + + } + break; + case 34 : + // InternalProblem.g:1:229: RULE_SL_COMMENT + { + mRULE_SL_COMMENT(); + + } + break; + case 35 : + // InternalProblem.g:1:245: RULE_WS + { + mRULE_WS(); + + } + break; + case 36 : + // InternalProblem.g:1:253: RULE_ANY_OTHER + { + mRULE_ANY_OTHER(); + + } + break; + + } + + } + + + protected DFA12 dfa12 = new DFA12(this); + static final String DFA12_eotS = + "\1\uffff\3\41\3\uffff\1\52\3\41\2\uffff\1\62\2\uffff\1\66\1\41\2\uffff\3\41\1\uffff\1\37\2\uffff\3\37\2\uffff\1\41\1\uffff\4\41\5\uffff\3\41\11\uffff\1\41\2\uffff\3\41\6\uffff\23\41\1\142\1\41\1\144\3\41\1\150\2\41\1\153\2\41\1\uffff\1\156\1\uffff\1\157\2\41\1\uffff\2\41\1\uffff\1\164\1\41\2\uffff\3\41\1\171\1\uffff\1\41\1\173\1\174\1\175\1\uffff\1\176\4\uffff"; + static final String DFA12_eofS = + "\177\uffff"; + static final String DFA12_minS = + "\1\0\1\142\1\154\1\162\3\uffff\1\56\1\145\1\160\1\162\2\uffff\1\72\2\uffff\1\75\1\143\2\uffff\1\162\1\141\1\156\1\uffff\1\101\2\uffff\2\0\1\52\2\uffff\1\163\1\uffff\1\141\1\156\1\164\1\162\5\uffff\1\146\1\160\1\145\11\uffff\1\157\2\uffff\1\165\1\154\1\153\6\uffff\1\164\1\163\1\164\1\145\1\157\1\145\1\157\1\144\1\160\1\145\1\163\1\156\1\162\1\163\1\141\1\156\2\162\1\163\1\60\1\145\1\60\1\145\1\157\1\141\1\60\1\151\1\144\1\60\1\163\1\151\1\uffff\1\60\1\uffff\1\60\1\167\1\143\1\uffff\1\156\1\163\1\uffff\1\60\1\164\2\uffff\1\156\1\164\1\163\1\60\1\uffff\1\145\3\60\1\uffff\1\60\4\uffff"; + static final String DFA12_maxS = + "\1\uffff\1\142\1\157\1\170\3\uffff\1\56\1\145\1\160\1\162\2\uffff\1\75\2\uffff\1\75\1\143\2\uffff\1\162\1\141\1\156\1\uffff\1\172\2\uffff\2\uffff\1\57\2\uffff\1\163\1\uffff\1\141\1\156\1\164\1\162\5\uffff\1\146\1\160\1\145\11\uffff\1\157\2\uffff\1\165\1\154\1\153\6\uffff\1\164\1\163\1\164\1\145\1\157\1\145\1\157\1\144\1\160\1\145\1\163\1\156\1\162\1\163\1\141\1\156\2\162\1\163\1\172\1\145\1\172\1\145\1\157\1\141\1\172\1\151\1\144\1\172\1\163\1\151\1\uffff\1\172\1\uffff\1\172\1\167\1\143\1\uffff\1\156\1\163\1\uffff\1\172\1\164\2\uffff\1\156\1\164\1\163\1\172\1\uffff\1\145\3\172\1\uffff\1\172\4\uffff"; + static final String DFA12_acceptS = + "\4\uffff\1\4\1\5\1\6\4\uffff\1\15\1\16\1\uffff\1\20\1\21\2\uffff\1\26\1\30\3\uffff\1\35\1\uffff\1\36\1\37\3\uffff\1\43\1\44\1\uffff\1\36\4\uffff\1\4\1\5\1\6\1\27\1\7\3\uffff\1\15\1\16\1\17\1\31\1\23\1\20\1\21\1\25\1\22\1\uffff\1\26\1\30\3\uffff\1\35\1\37\1\40\1\41\1\42\1\43\37\uffff\1\14\1\uffff\1\32\3\uffff\1\2\2\uffff\1\13\2\uffff\1\24\1\33\4\uffff\1\11\4\uffff\1\3\1\uffff\1\34\1\1\1\10\1\12"; + static final String DFA12_specialS = + "\1\1\32\uffff\1\2\1\0\142\uffff}>"; + static final String[] DFA12_transitionS = { + "\11\37\2\36\2\37\1\36\22\37\1\36\1\17\1\33\4\37\1\34\1\13\1\14\1\23\1\20\1\5\1\37\1\7\1\35\12\32\1\15\1\16\1\37\1\22\1\37\1\27\1\37\32\31\1\4\1\37\1\6\1\30\1\31\1\37\1\1\1\31\1\2\1\31\1\3\1\25\10\31\1\11\1\12\1\31\1\10\1\21\1\24\1\26\5\31\uff85\37", + "\1\40", + "\1\42\2\uffff\1\43", + "\1\45\5\uffff\1\44", + "", + "", + "", + "\1\51", + "\1\53", + "\1\54", + "\1\55", + "", + "", + "\1\61\2\uffff\1\60", + "", + "", + "\1\65", + "\1\67", + "", + "", + "\1\72", + "\1\73", + "\1\74", + "", + "\32\41\4\uffff\1\41\1\uffff\32\41", + "", + "", + "\0\77", + "\0\77", + "\1\100\4\uffff\1\101", + "", + "", + "\1\103", + "", + "\1\104", + "\1\105", + "\1\106", + "\1\107", + "", + "", + "", + "", + "", + "\1\110", + "\1\111", + "\1\112", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\1\113", + "", + "", + "\1\114", + "\1\115", + "\1\116", + "", + "", + "", + "", + "", + "", + "\1\117", + "\1\120", + "\1\121", + "\1\122", + "\1\123", + "\1\124", + "\1\125", + "\1\126", + "\1\127", + "\1\130", + "\1\131", + "\1\132", + "\1\133", + "\1\134", + "\1\135", + "\1\136", + "\1\137", + "\1\140", + "\1\141", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\143", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\145", + "\1\146", + "\1\147", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\151", + "\1\152", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\154", + "\1\155", + "", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\160", + "\1\161", + "", + "\1\162", + "\1\163", + "", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\1\165", + "", + "", + "\1\166", + "\1\167", + "\1\170", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "", + "\1\172", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "", + "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", + "", + "", + "", + "" + }; + + static final short[] DFA12_eot = DFA.unpackEncodedString(DFA12_eotS); + static final short[] DFA12_eof = DFA.unpackEncodedString(DFA12_eofS); + static final char[] DFA12_min = DFA.unpackEncodedStringToUnsignedChars(DFA12_minS); + static final char[] DFA12_max = DFA.unpackEncodedStringToUnsignedChars(DFA12_maxS); + static final short[] DFA12_accept = DFA.unpackEncodedString(DFA12_acceptS); + static final short[] DFA12_special = DFA.unpackEncodedString(DFA12_specialS); + static final short[][] DFA12_transition; + + static { + int numStates = DFA12_transitionS.length; + DFA12_transition = new short[numStates][]; + for (int i=0; i='\u0000' && LA12_28<='\uFFFF')) ) {s = 63;} + + else s = 31; + + if ( s>=0 ) return s; + break; + case 1 : + int LA12_0 = input.LA(1); + + s = -1; + if ( (LA12_0=='a') ) {s = 1;} + + else if ( (LA12_0=='c') ) {s = 2;} + + else if ( (LA12_0=='e') ) {s = 3;} + + else if ( (LA12_0=='[') ) {s = 4;} + + else if ( (LA12_0==',') ) {s = 5;} + + else if ( (LA12_0==']') ) {s = 6;} + + else if ( (LA12_0=='.') ) {s = 7;} + + else if ( (LA12_0=='r') ) {s = 8;} + + else if ( (LA12_0=='o') ) {s = 9;} + + else if ( (LA12_0=='p') ) {s = 10;} + + else if ( (LA12_0=='(') ) {s = 11;} + + else if ( (LA12_0==')') ) {s = 12;} + + else if ( (LA12_0==':') ) {s = 13;} + + else if ( (LA12_0==';') ) {s = 14;} + + else if ( (LA12_0=='!') ) {s = 15;} + + else if ( (LA12_0=='+') ) {s = 16;} + + else if ( (LA12_0=='s') ) {s = 17;} + + else if ( (LA12_0=='=') ) {s = 18;} + + else if ( (LA12_0=='*') ) {s = 19;} + + else if ( (LA12_0=='t') ) {s = 20;} + + else if ( (LA12_0=='f') ) {s = 21;} + + else if ( (LA12_0=='u') ) {s = 22;} + + else if ( (LA12_0=='?') ) {s = 23;} + + else if ( (LA12_0=='^') ) {s = 24;} + + else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||LA12_0=='b'||LA12_0=='d'||(LA12_0>='g' && LA12_0<='n')||LA12_0=='q'||(LA12_0>='v' && LA12_0<='z')) ) {s = 25;} + + else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 26;} + + else if ( (LA12_0=='\"') ) {s = 27;} + + else if ( (LA12_0=='\'') ) {s = 28;} + + else if ( (LA12_0=='/') ) {s = 29;} + + else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 30;} + + else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||(LA12_0>='#' && LA12_0<='&')||LA12_0=='-'||LA12_0=='<'||LA12_0=='>'||LA12_0=='@'||LA12_0=='\\'||LA12_0=='`'||(LA12_0>='{' && LA12_0<='\uFFFF')) ) {s = 31;} + + if ( s>=0 ) return s; + break; + case 2 : + int LA12_27 = input.LA(1); + + s = -1; + if ( ((LA12_27>='\u0000' && LA12_27<='\uFFFF')) ) {s = 63;} + + else s = 31; + + if ( s>=0 ) return s; + break; + } + NoViableAltException nvae = + new NoViableAltException(getDescription(), 12, _s, input); + error(nvae); + throw nvae; + } + } + + +} \ No newline at end of file diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemParser.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemParser.java new file mode 100644 index 00000000..9bfeb079 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemParser.java @@ -0,0 +1,4056 @@ +package org.eclipse.viatra.solver.language.parser.antlr.internal; + +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.common.util.Enumerator; +import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; +import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; + + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalProblemParser extends AbstractInternalAntlrParser { + public static final String[] tokenNames = new String[] { + "", "", "", "", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'abstract'", "'class'", "'extends'", "'['", "','", "']'", "'.'", "'contains'", "'refers'", "'opposite'", "'error'", "'pred'", "'('", "')'", "':='", "';'", "'!'", "'+'", "':'", "'scope'", "'+='", "'='", "'..'", "'*'", "'::'", "'true'", "'false'", "'unknown'", "'?'" + }; + public static final int RULE_STRING=6; + public static final int RULE_SL_COMMENT=8; + public static final int T__19=19; + public static final int T__15=15; + public static final int T__37=37; + public static final int T__16=16; + public static final int T__38=38; + public static final int T__17=17; + public static final int T__39=39; + public static final int T__18=18; + public static final int T__11=11; + public static final int T__33=33; + public static final int T__12=12; + public static final int T__34=34; + public static final int T__13=13; + public static final int T__35=35; + public static final int T__14=14; + public static final int T__36=36; + public static final int EOF=-1; + public static final int T__30=30; + public static final int T__31=31; + public static final int T__32=32; + public static final int RULE_ID=4; + public static final int RULE_WS=9; + public static final int RULE_ANY_OTHER=10; + public static final int T__26=26; + public static final int T__27=27; + public static final int T__28=28; + public static final int RULE_INT=5; + public static final int T__29=29; + public static final int T__22=22; + public static final int RULE_ML_COMMENT=7; + public static final int T__23=23; + public static final int T__24=24; + public static final int T__25=25; + public static final int T__20=20; + public static final int T__21=21; + + // delegates + // delegators + + + public InternalProblemParser(TokenStream input) { + this(input, new RecognizerSharedState()); + } + public InternalProblemParser(TokenStream input, RecognizerSharedState state) { + super(input, state); + + } + + + public String[] getTokenNames() { return InternalProblemParser.tokenNames; } + public String getGrammarFileName() { return "InternalProblem.g"; } + + + + private ProblemGrammarAccess grammarAccess; + + public InternalProblemParser(TokenStream input, ProblemGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "Problem"; + } + + @Override + protected ProblemGrammarAccess getGrammarAccess() { + return grammarAccess; + } + + + + + // $ANTLR start "entryRuleProblem" + // InternalProblem.g:65:1: entryRuleProblem returns [EObject current=null] : iv_ruleProblem= ruleProblem EOF ; + public final EObject entryRuleProblem() throws RecognitionException { + EObject current = null; + + EObject iv_ruleProblem = null; + + + try { + // InternalProblem.g:65:48: (iv_ruleProblem= ruleProblem EOF ) + // InternalProblem.g:66:2: iv_ruleProblem= ruleProblem EOF + { + newCompositeNode(grammarAccess.getProblemRule()); + pushFollow(FOLLOW_1); + iv_ruleProblem=ruleProblem(); + + state._fsp--; + + current =iv_ruleProblem; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleProblem" + + + // $ANTLR start "ruleProblem" + // InternalProblem.g:72:1: ruleProblem returns [EObject current=null] : ( (lv_statements_0_0= ruleStatement ) )* ; + public final EObject ruleProblem() throws RecognitionException { + EObject current = null; + + EObject lv_statements_0_0 = null; + + + + enterRule(); + + try { + // InternalProblem.g:78:2: ( ( (lv_statements_0_0= ruleStatement ) )* ) + // InternalProblem.g:79:2: ( (lv_statements_0_0= ruleStatement ) )* + { + // InternalProblem.g:79:2: ( (lv_statements_0_0= ruleStatement ) )* + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); + + if ( (LA1_0==RULE_ID||(LA1_0>=11 && LA1_0<=12)||(LA1_0>=21 && LA1_0<=22)||LA1_0==27||LA1_0==30||LA1_0==39) ) { + alt1=1; + } + + + switch (alt1) { + case 1 : + // InternalProblem.g:80:3: (lv_statements_0_0= ruleStatement ) + { + // InternalProblem.g:80:3: (lv_statements_0_0= ruleStatement ) + // InternalProblem.g:81:4: lv_statements_0_0= ruleStatement + { + + newCompositeNode(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); + + pushFollow(FOLLOW_3); + lv_statements_0_0=ruleStatement(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getProblemRule()); + } + add( + current, + "statements", + lv_statements_0_0, + "org.eclipse.viatra.solver.language.Problem.Statement"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + default : + break loop1; + } + } while (true); + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleProblem" + + + // $ANTLR start "entryRuleStatement" + // InternalProblem.g:101:1: entryRuleStatement returns [EObject current=null] : iv_ruleStatement= ruleStatement EOF ; + public final EObject entryRuleStatement() throws RecognitionException { + EObject current = null; + + EObject iv_ruleStatement = null; + + + try { + // InternalProblem.g:101:50: (iv_ruleStatement= ruleStatement EOF ) + // InternalProblem.g:102:2: iv_ruleStatement= ruleStatement EOF + { + newCompositeNode(grammarAccess.getStatementRule()); + pushFollow(FOLLOW_1); + iv_ruleStatement=ruleStatement(); + + state._fsp--; + + current =iv_ruleStatement; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleStatement" + + + // $ANTLR start "ruleStatement" + // InternalProblem.g:108:1: ruleStatement returns [EObject current=null] : (this_ClassDeclaration_0= ruleClassDeclaration | this_PredicateDefinition_1= rulePredicateDefinition | this_Assertion_2= ruleAssertion | this_ScopeDeclaration_3= ruleScopeDeclaration ) ; + public final EObject ruleStatement() throws RecognitionException { + EObject current = null; + + EObject this_ClassDeclaration_0 = null; + + EObject this_PredicateDefinition_1 = null; + + EObject this_Assertion_2 = null; + + EObject this_ScopeDeclaration_3 = null; + + + + enterRule(); + + try { + // InternalProblem.g:114:2: ( (this_ClassDeclaration_0= ruleClassDeclaration | this_PredicateDefinition_1= rulePredicateDefinition | this_Assertion_2= ruleAssertion | this_ScopeDeclaration_3= ruleScopeDeclaration ) ) + // InternalProblem.g:115:2: (this_ClassDeclaration_0= ruleClassDeclaration | this_PredicateDefinition_1= rulePredicateDefinition | this_Assertion_2= ruleAssertion | this_ScopeDeclaration_3= ruleScopeDeclaration ) + { + // InternalProblem.g:115:2: (this_ClassDeclaration_0= ruleClassDeclaration | this_PredicateDefinition_1= rulePredicateDefinition | this_Assertion_2= ruleAssertion | this_ScopeDeclaration_3= ruleScopeDeclaration ) + int alt2=4; + switch ( input.LA(1) ) { + case 11: + case 12: + { + alt2=1; + } + break; + case 21: + case 22: + { + alt2=2; + } + break; + case RULE_ID: + case 27: + case 39: + { + alt2=3; + } + break; + case 30: + { + alt2=4; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 2, 0, input); + + throw nvae; + } + + switch (alt2) { + case 1 : + // InternalProblem.g:116:3: this_ClassDeclaration_0= ruleClassDeclaration + { + + newCompositeNode(grammarAccess.getStatementAccess().getClassDeclarationParserRuleCall_0()); + + pushFollow(FOLLOW_2); + this_ClassDeclaration_0=ruleClassDeclaration(); + + state._fsp--; + + + current = this_ClassDeclaration_0; + afterParserOrEnumRuleCall(); + + + } + break; + case 2 : + // InternalProblem.g:125:3: this_PredicateDefinition_1= rulePredicateDefinition + { + + newCompositeNode(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_1()); + + pushFollow(FOLLOW_2); + this_PredicateDefinition_1=rulePredicateDefinition(); + + state._fsp--; + + + current = this_PredicateDefinition_1; + afterParserOrEnumRuleCall(); + + + } + break; + case 3 : + // InternalProblem.g:134:3: this_Assertion_2= ruleAssertion + { + + newCompositeNode(grammarAccess.getStatementAccess().getAssertionParserRuleCall_2()); + + pushFollow(FOLLOW_2); + this_Assertion_2=ruleAssertion(); + + state._fsp--; + + + current = this_Assertion_2; + afterParserOrEnumRuleCall(); + + + } + break; + case 4 : + // InternalProblem.g:143:3: this_ScopeDeclaration_3= ruleScopeDeclaration + { + + newCompositeNode(grammarAccess.getStatementAccess().getScopeDeclarationParserRuleCall_3()); + + pushFollow(FOLLOW_2); + this_ScopeDeclaration_3=ruleScopeDeclaration(); + + state._fsp--; + + + current = this_ScopeDeclaration_3; + afterParserOrEnumRuleCall(); + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleStatement" + + + // $ANTLR start "entryRuleClassDeclaration" + // InternalProblem.g:155:1: entryRuleClassDeclaration returns [EObject current=null] : iv_ruleClassDeclaration= ruleClassDeclaration EOF ; + public final EObject entryRuleClassDeclaration() throws RecognitionException { + EObject current = null; + + EObject iv_ruleClassDeclaration = null; + + + try { + // InternalProblem.g:155:57: (iv_ruleClassDeclaration= ruleClassDeclaration EOF ) + // InternalProblem.g:156:2: iv_ruleClassDeclaration= ruleClassDeclaration EOF + { + newCompositeNode(grammarAccess.getClassDeclarationRule()); + pushFollow(FOLLOW_1); + iv_ruleClassDeclaration=ruleClassDeclaration(); + + state._fsp--; + + current =iv_ruleClassDeclaration; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleClassDeclaration" + + + // $ANTLR start "ruleClassDeclaration" + // InternalProblem.g:162:1: ruleClassDeclaration returns [EObject current=null] : ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_name_2_0= RULE_ID ) ) ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* otherlv_13= '.' ) ; + public final EObject ruleClassDeclaration() throws RecognitionException { + EObject current = null; + + Token lv_abstract_0_0=null; + Token otherlv_1=null; + Token lv_name_2_0=null; + Token otherlv_3=null; + Token otherlv_4=null; + Token otherlv_5=null; + Token otherlv_6=null; + Token otherlv_7=null; + Token otherlv_8=null; + Token otherlv_9=null; + Token otherlv_11=null; + Token otherlv_13=null; + EObject lv_referenceDeclarations_10_0 = null; + + EObject lv_referenceDeclarations_12_0 = null; + + + + enterRule(); + + try { + // InternalProblem.g:168:2: ( ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_name_2_0= RULE_ID ) ) ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* otherlv_13= '.' ) ) + // InternalProblem.g:169:2: ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_name_2_0= RULE_ID ) ) ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* otherlv_13= '.' ) + { + // InternalProblem.g:169:2: ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_name_2_0= RULE_ID ) ) ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* otherlv_13= '.' ) + // InternalProblem.g:170:3: ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_name_2_0= RULE_ID ) ) ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* otherlv_13= '.' + { + // InternalProblem.g:170:3: ( (lv_abstract_0_0= 'abstract' ) )? + int alt3=2; + int LA3_0 = input.LA(1); + + if ( (LA3_0==11) ) { + alt3=1; + } + switch (alt3) { + case 1 : + // InternalProblem.g:171:4: (lv_abstract_0_0= 'abstract' ) + { + // InternalProblem.g:171:4: (lv_abstract_0_0= 'abstract' ) + // InternalProblem.g:172:5: lv_abstract_0_0= 'abstract' + { + lv_abstract_0_0=(Token)match(input,11,FOLLOW_4); + + newLeafNode(lv_abstract_0_0, grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getClassDeclarationRule()); + } + setWithLastConsumed(current, "abstract", lv_abstract_0_0 != null, "abstract"); + + + } + + + } + break; + + } + + otherlv_1=(Token)match(input,12,FOLLOW_5); + + newLeafNode(otherlv_1, grammarAccess.getClassDeclarationAccess().getClassKeyword_1()); + + // InternalProblem.g:188:3: ( (lv_name_2_0= RULE_ID ) ) + // InternalProblem.g:189:4: (lv_name_2_0= RULE_ID ) + { + // InternalProblem.g:189:4: (lv_name_2_0= RULE_ID ) + // InternalProblem.g:190:5: lv_name_2_0= RULE_ID + { + lv_name_2_0=(Token)match(input,RULE_ID,FOLLOW_6); + + newLeafNode(lv_name_2_0, grammarAccess.getClassDeclarationAccess().getNameIDTerminalRuleCall_2_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getClassDeclarationRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_2_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + // InternalProblem.g:206:3: ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? + int alt7=3; + int LA7_0 = input.LA(1); + + if ( (LA7_0==13) ) { + alt7=1; + } + else if ( ((LA7_0>=18 && LA7_0<=19)) ) { + alt7=2; + } + switch (alt7) { + case 1 : + // InternalProblem.g:207:4: (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) + { + // InternalProblem.g:207:4: (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) + // InternalProblem.g:208:5: otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) + { + otherlv_3=(Token)match(input,13,FOLLOW_7); + + newLeafNode(otherlv_3, grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0_0()); + + // InternalProblem.g:212:5: ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) + int alt6=2; + int LA6_0 = input.LA(1); + + if ( (LA6_0==RULE_ID) ) { + alt6=1; + } + else if ( (LA6_0==14) ) { + alt6=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 6, 0, input); + + throw nvae; + } + switch (alt6) { + case 1 : + // InternalProblem.g:213:6: ( (otherlv_4= RULE_ID ) ) + { + // InternalProblem.g:213:6: ( (otherlv_4= RULE_ID ) ) + // InternalProblem.g:214:7: (otherlv_4= RULE_ID ) + { + // InternalProblem.g:214:7: (otherlv_4= RULE_ID ) + // InternalProblem.g:215:8: otherlv_4= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getClassDeclarationRule()); + } + + otherlv_4=(Token)match(input,RULE_ID,FOLLOW_8); + + newLeafNode(otherlv_4, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_0_0()); + + + } + + + } + + + } + break; + case 2 : + // InternalProblem.g:227:6: (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) + { + // InternalProblem.g:227:6: (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) + // InternalProblem.g:228:7: otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' + { + otherlv_5=(Token)match(input,14,FOLLOW_9); + + newLeafNode(otherlv_5, grammarAccess.getClassDeclarationAccess().getLeftSquareBracketKeyword_3_0_1_1_0()); + + // InternalProblem.g:232:7: ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? + int alt5=2; + int LA5_0 = input.LA(1); + + if ( (LA5_0==RULE_ID) ) { + alt5=1; + } + switch (alt5) { + case 1 : + // InternalProblem.g:233:8: ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* + { + // InternalProblem.g:233:8: ( (otherlv_6= RULE_ID ) ) + // InternalProblem.g:234:9: (otherlv_6= RULE_ID ) + { + // InternalProblem.g:234:9: (otherlv_6= RULE_ID ) + // InternalProblem.g:235:10: otherlv_6= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getClassDeclarationRule()); + } + + otherlv_6=(Token)match(input,RULE_ID,FOLLOW_10); + + newLeafNode(otherlv_6, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0()); + + + } + + + } + + // InternalProblem.g:246:8: (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* + loop4: + do { + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0==15) ) { + alt4=1; + } + + + switch (alt4) { + case 1 : + // InternalProblem.g:247:9: otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) + { + otherlv_7=(Token)match(input,15,FOLLOW_5); + + newLeafNode(otherlv_7, grammarAccess.getClassDeclarationAccess().getCommaKeyword_3_0_1_1_1_1_0()); + + // InternalProblem.g:251:9: ( (otherlv_8= RULE_ID ) ) + // InternalProblem.g:252:10: (otherlv_8= RULE_ID ) + { + // InternalProblem.g:252:10: (otherlv_8= RULE_ID ) + // InternalProblem.g:253:11: otherlv_8= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getClassDeclarationRule()); + } + + otherlv_8=(Token)match(input,RULE_ID,FOLLOW_10); + + newLeafNode(otherlv_8, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0()); + + + } + + + } + + + } + break; + + default : + break loop4; + } + } while (true); + + + } + break; + + } + + otherlv_9=(Token)match(input,16,FOLLOW_8); + + newLeafNode(otherlv_9, grammarAccess.getClassDeclarationAccess().getRightSquareBracketKeyword_3_0_1_1_2()); + + + } + + + } + break; + + } + + + } + + + } + break; + case 2 : + // InternalProblem.g:274:4: ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) + { + // InternalProblem.g:274:4: ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) + // InternalProblem.g:275:5: (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) + { + // InternalProblem.g:275:5: (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) + // InternalProblem.g:276:6: lv_referenceDeclarations_10_0= ruleReferenceDeclaration + { + + newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0()); + + pushFollow(FOLLOW_8); + lv_referenceDeclarations_10_0=ruleReferenceDeclaration(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); + } + add( + current, + "referenceDeclarations", + lv_referenceDeclarations_10_0, + "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + } + + // InternalProblem.g:294:3: (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* + loop8: + do { + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0==15) ) { + alt8=1; + } + + + switch (alt8) { + case 1 : + // InternalProblem.g:295:4: otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) + { + otherlv_11=(Token)match(input,15,FOLLOW_11); + + newLeafNode(otherlv_11, grammarAccess.getClassDeclarationAccess().getCommaKeyword_4_0()); + + // InternalProblem.g:299:4: ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) + // InternalProblem.g:300:5: (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) + { + // InternalProblem.g:300:5: (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) + // InternalProblem.g:301:6: lv_referenceDeclarations_12_0= ruleReferenceDeclaration + { + + newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0()); + + pushFollow(FOLLOW_8); + lv_referenceDeclarations_12_0=ruleReferenceDeclaration(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); + } + add( + current, + "referenceDeclarations", + lv_referenceDeclarations_12_0, + "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop8; + } + } while (true); + + otherlv_13=(Token)match(input,17,FOLLOW_2); + + newLeafNode(otherlv_13, grammarAccess.getClassDeclarationAccess().getFullStopKeyword_5()); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleClassDeclaration" + + + // $ANTLR start "entryRuleReferenceDeclaration" + // InternalProblem.g:327:1: entryRuleReferenceDeclaration returns [EObject current=null] : iv_ruleReferenceDeclaration= ruleReferenceDeclaration EOF ; + public final EObject entryRuleReferenceDeclaration() throws RecognitionException { + EObject current = null; + + EObject iv_ruleReferenceDeclaration = null; + + + try { + // InternalProblem.g:327:61: (iv_ruleReferenceDeclaration= ruleReferenceDeclaration EOF ) + // InternalProblem.g:328:2: iv_ruleReferenceDeclaration= ruleReferenceDeclaration EOF + { + newCompositeNode(grammarAccess.getReferenceDeclarationRule()); + pushFollow(FOLLOW_1); + iv_ruleReferenceDeclaration=ruleReferenceDeclaration(); + + state._fsp--; + + current =iv_ruleReferenceDeclaration; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleReferenceDeclaration" + + + // $ANTLR start "ruleReferenceDeclaration" + // InternalProblem.g:334:1: ruleReferenceDeclaration returns [EObject current=null] : ( ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) ( (otherlv_2= RULE_ID ) ) otherlv_3= '[' ( (lv_multiplicity_4_0= ruleMultiplicity ) ) otherlv_5= ']' ( (lv_name_6_0= RULE_ID ) ) (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? ) ; + public final EObject ruleReferenceDeclaration() throws RecognitionException { + EObject current = null; + + Token lv_containment_0_0=null; + Token otherlv_1=null; + Token otherlv_2=null; + Token otherlv_3=null; + Token otherlv_5=null; + Token lv_name_6_0=null; + Token otherlv_7=null; + EObject lv_multiplicity_4_0 = null; + + + + enterRule(); + + try { + // InternalProblem.g:340:2: ( ( ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) ( (otherlv_2= RULE_ID ) ) otherlv_3= '[' ( (lv_multiplicity_4_0= ruleMultiplicity ) ) otherlv_5= ']' ( (lv_name_6_0= RULE_ID ) ) (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? ) ) + // InternalProblem.g:341:2: ( ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) ( (otherlv_2= RULE_ID ) ) otherlv_3= '[' ( (lv_multiplicity_4_0= ruleMultiplicity ) ) otherlv_5= ']' ( (lv_name_6_0= RULE_ID ) ) (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? ) + { + // InternalProblem.g:341:2: ( ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) ( (otherlv_2= RULE_ID ) ) otherlv_3= '[' ( (lv_multiplicity_4_0= ruleMultiplicity ) ) otherlv_5= ']' ( (lv_name_6_0= RULE_ID ) ) (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? ) + // InternalProblem.g:342:3: ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) ( (otherlv_2= RULE_ID ) ) otherlv_3= '[' ( (lv_multiplicity_4_0= ruleMultiplicity ) ) otherlv_5= ']' ( (lv_name_6_0= RULE_ID ) ) (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? + { + // InternalProblem.g:342:3: ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0==18) ) { + alt9=1; + } + else if ( (LA9_0==19) ) { + alt9=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 9, 0, input); + + throw nvae; + } + switch (alt9) { + case 1 : + // InternalProblem.g:343:4: ( (lv_containment_0_0= 'contains' ) ) + { + // InternalProblem.g:343:4: ( (lv_containment_0_0= 'contains' ) ) + // InternalProblem.g:344:5: (lv_containment_0_0= 'contains' ) + { + // InternalProblem.g:344:5: (lv_containment_0_0= 'contains' ) + // InternalProblem.g:345:6: lv_containment_0_0= 'contains' + { + lv_containment_0_0=(Token)match(input,18,FOLLOW_5); + + newLeafNode(lv_containment_0_0, grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getReferenceDeclarationRule()); + } + setWithLastConsumed(current, "containment", lv_containment_0_0 != null, "contains"); + + + } + + + } + + + } + break; + case 2 : + // InternalProblem.g:358:4: otherlv_1= 'refers' + { + otherlv_1=(Token)match(input,19,FOLLOW_5); + + newLeafNode(otherlv_1, grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); + + + } + break; + + } + + // InternalProblem.g:363:3: ( (otherlv_2= RULE_ID ) ) + // InternalProblem.g:364:4: (otherlv_2= RULE_ID ) + { + // InternalProblem.g:364:4: (otherlv_2= RULE_ID ) + // InternalProblem.g:365:5: otherlv_2= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getReferenceDeclarationRule()); + } + + otherlv_2=(Token)match(input,RULE_ID,FOLLOW_12); + + newLeafNode(otherlv_2, grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationCrossReference_1_0()); + + + } + + + } + + otherlv_3=(Token)match(input,14,FOLLOW_13); + + newLeafNode(otherlv_3, grammarAccess.getReferenceDeclarationAccess().getLeftSquareBracketKeyword_2()); + + // InternalProblem.g:380:3: ( (lv_multiplicity_4_0= ruleMultiplicity ) ) + // InternalProblem.g:381:4: (lv_multiplicity_4_0= ruleMultiplicity ) + { + // InternalProblem.g:381:4: (lv_multiplicity_4_0= ruleMultiplicity ) + // InternalProblem.g:382:5: lv_multiplicity_4_0= ruleMultiplicity + { + + newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getMultiplicityMultiplicityParserRuleCall_3_0()); + + pushFollow(FOLLOW_14); + lv_multiplicity_4_0=ruleMultiplicity(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getReferenceDeclarationRule()); + } + set( + current, + "multiplicity", + lv_multiplicity_4_0, + "org.eclipse.viatra.solver.language.Problem.Multiplicity"); + afterParserOrEnumRuleCall(); + + + } + + + } + + otherlv_5=(Token)match(input,16,FOLLOW_5); + + newLeafNode(otherlv_5, grammarAccess.getReferenceDeclarationAccess().getRightSquareBracketKeyword_4()); + + // InternalProblem.g:403:3: ( (lv_name_6_0= RULE_ID ) ) + // InternalProblem.g:404:4: (lv_name_6_0= RULE_ID ) + { + // InternalProblem.g:404:4: (lv_name_6_0= RULE_ID ) + // InternalProblem.g:405:5: lv_name_6_0= RULE_ID + { + lv_name_6_0=(Token)match(input,RULE_ID,FOLLOW_15); + + newLeafNode(lv_name_6_0, grammarAccess.getReferenceDeclarationAccess().getNameIDTerminalRuleCall_5_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getReferenceDeclarationRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_6_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + // InternalProblem.g:421:3: (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? + int alt10=2; + int LA10_0 = input.LA(1); + + if ( (LA10_0==20) ) { + alt10=1; + } + switch (alt10) { + case 1 : + // InternalProblem.g:422:4: otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) + { + otherlv_7=(Token)match(input,20,FOLLOW_5); + + newLeafNode(otherlv_7, grammarAccess.getReferenceDeclarationAccess().getOppositeKeyword_6_0()); + + // InternalProblem.g:426:4: ( ( ruleQualifiedName ) ) + // InternalProblem.g:427:5: ( ruleQualifiedName ) + { + // InternalProblem.g:427:5: ( ruleQualifiedName ) + // InternalProblem.g:428:6: ruleQualifiedName + { + + if (current==null) { + current = createModelElement(grammarAccess.getReferenceDeclarationRule()); + } + + + newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationCrossReference_6_1_0()); + + pushFollow(FOLLOW_2); + ruleQualifiedName(); + + state._fsp--; + + + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleReferenceDeclaration" + + + // $ANTLR start "entryRulePredicateDefinition" + // InternalProblem.g:447:1: entryRulePredicateDefinition returns [EObject current=null] : iv_rulePredicateDefinition= rulePredicateDefinition EOF ; + public final EObject entryRulePredicateDefinition() throws RecognitionException { + EObject current = null; + + EObject iv_rulePredicateDefinition = null; + + + try { + // InternalProblem.g:447:60: (iv_rulePredicateDefinition= rulePredicateDefinition EOF ) + // InternalProblem.g:448:2: iv_rulePredicateDefinition= rulePredicateDefinition EOF + { + newCompositeNode(grammarAccess.getPredicateDefinitionRule()); + pushFollow(FOLLOW_1); + iv_rulePredicateDefinition=rulePredicateDefinition(); + + state._fsp--; + + current =iv_rulePredicateDefinition; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRulePredicateDefinition" + + + // $ANTLR start "rulePredicateDefinition" + // InternalProblem.g:454:1: rulePredicateDefinition returns [EObject current=null] : ( ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) ( (lv_name_3_0= RULE_ID ) ) otherlv_4= '(' ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? otherlv_8= ')' (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? otherlv_13= '.' ) ; + public final EObject rulePredicateDefinition() throws RecognitionException { + EObject current = null; + + Token lv_error_0_0=null; + Token otherlv_1=null; + Token otherlv_2=null; + Token lv_name_3_0=null; + Token otherlv_4=null; + Token otherlv_6=null; + Token otherlv_8=null; + Token otherlv_9=null; + Token otherlv_11=null; + Token otherlv_13=null; + EObject lv_parameters_5_0 = null; + + EObject lv_parameters_7_0 = null; + + EObject lv_bodies_10_0 = null; + + EObject lv_bodies_12_0 = null; + + + + enterRule(); + + try { + // InternalProblem.g:460:2: ( ( ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) ( (lv_name_3_0= RULE_ID ) ) otherlv_4= '(' ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? otherlv_8= ')' (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? otherlv_13= '.' ) ) + // InternalProblem.g:461:2: ( ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) ( (lv_name_3_0= RULE_ID ) ) otherlv_4= '(' ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? otherlv_8= ')' (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? otherlv_13= '.' ) + { + // InternalProblem.g:461:2: ( ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) ( (lv_name_3_0= RULE_ID ) ) otherlv_4= '(' ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? otherlv_8= ')' (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? otherlv_13= '.' ) + // InternalProblem.g:462:3: ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) ( (lv_name_3_0= RULE_ID ) ) otherlv_4= '(' ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? otherlv_8= ')' (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? otherlv_13= '.' + { + // InternalProblem.g:462:3: ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) + int alt12=2; + int LA12_0 = input.LA(1); + + if ( (LA12_0==21) ) { + alt12=1; + } + else if ( (LA12_0==22) ) { + alt12=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 12, 0, input); + + throw nvae; + } + switch (alt12) { + case 1 : + // InternalProblem.g:463:4: ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) + { + // InternalProblem.g:463:4: ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) + // InternalProblem.g:464:5: ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? + { + // InternalProblem.g:464:5: ( (lv_error_0_0= 'error' ) ) + // InternalProblem.g:465:6: (lv_error_0_0= 'error' ) + { + // InternalProblem.g:465:6: (lv_error_0_0= 'error' ) + // InternalProblem.g:466:7: lv_error_0_0= 'error' + { + lv_error_0_0=(Token)match(input,21,FOLLOW_16); + + newLeafNode(lv_error_0_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getPredicateDefinitionRule()); + } + setWithLastConsumed(current, "error", lv_error_0_0 != null, "error"); + + + } + + + } + + // InternalProblem.g:478:5: (otherlv_1= 'pred' )? + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0==22) ) { + alt11=1; + } + switch (alt11) { + case 1 : + // InternalProblem.g:479:6: otherlv_1= 'pred' + { + otherlv_1=(Token)match(input,22,FOLLOW_5); + + newLeafNode(otherlv_1, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); + + + } + break; + + } + + + } + + + } + break; + case 2 : + // InternalProblem.g:486:4: otherlv_2= 'pred' + { + otherlv_2=(Token)match(input,22,FOLLOW_5); + + newLeafNode(otherlv_2, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_1()); + + + } + break; + + } + + // InternalProblem.g:491:3: ( (lv_name_3_0= RULE_ID ) ) + // InternalProblem.g:492:4: (lv_name_3_0= RULE_ID ) + { + // InternalProblem.g:492:4: (lv_name_3_0= RULE_ID ) + // InternalProblem.g:493:5: lv_name_3_0= RULE_ID + { + lv_name_3_0=(Token)match(input,RULE_ID,FOLLOW_17); + + newLeafNode(lv_name_3_0, grammarAccess.getPredicateDefinitionAccess().getNameIDTerminalRuleCall_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getPredicateDefinitionRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_3_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + otherlv_4=(Token)match(input,23,FOLLOW_18); + + newLeafNode(otherlv_4, grammarAccess.getPredicateDefinitionAccess().getLeftParenthesisKeyword_2()); + + // InternalProblem.g:513:3: ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? + int alt14=2; + int LA14_0 = input.LA(1); + + if ( (LA14_0==RULE_ID) ) { + alt14=1; + } + switch (alt14) { + case 1 : + // InternalProblem.g:514:4: ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* + { + // InternalProblem.g:514:4: ( (lv_parameters_5_0= ruleParameter ) ) + // InternalProblem.g:515:5: (lv_parameters_5_0= ruleParameter ) + { + // InternalProblem.g:515:5: (lv_parameters_5_0= ruleParameter ) + // InternalProblem.g:516:6: lv_parameters_5_0= ruleParameter + { + + newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_0_0()); + + pushFollow(FOLLOW_19); + lv_parameters_5_0=ruleParameter(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); + } + add( + current, + "parameters", + lv_parameters_5_0, + "org.eclipse.viatra.solver.language.Problem.Parameter"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalProblem.g:533:4: (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* + loop13: + do { + int alt13=2; + int LA13_0 = input.LA(1); + + if ( (LA13_0==15) ) { + alt13=1; + } + + + switch (alt13) { + case 1 : + // InternalProblem.g:534:5: otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) + { + otherlv_6=(Token)match(input,15,FOLLOW_5); + + newLeafNode(otherlv_6, grammarAccess.getPredicateDefinitionAccess().getCommaKeyword_3_1_0()); + + // InternalProblem.g:538:5: ( (lv_parameters_7_0= ruleParameter ) ) + // InternalProblem.g:539:6: (lv_parameters_7_0= ruleParameter ) + { + // InternalProblem.g:539:6: (lv_parameters_7_0= ruleParameter ) + // InternalProblem.g:540:7: lv_parameters_7_0= ruleParameter + { + + newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_1_1_0()); + + pushFollow(FOLLOW_19); + lv_parameters_7_0=ruleParameter(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); + } + add( + current, + "parameters", + lv_parameters_7_0, + "org.eclipse.viatra.solver.language.Problem.Parameter"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop13; + } + } while (true); + + + } + break; + + } + + otherlv_8=(Token)match(input,24,FOLLOW_20); + + newLeafNode(otherlv_8, grammarAccess.getPredicateDefinitionAccess().getRightParenthesisKeyword_4()); + + // InternalProblem.g:563:3: (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? + int alt16=2; + int LA16_0 = input.LA(1); + + if ( (LA16_0==25) ) { + alt16=1; + } + switch (alt16) { + case 1 : + // InternalProblem.g:564:4: otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* + { + otherlv_9=(Token)match(input,25,FOLLOW_21); + + newLeafNode(otherlv_9, grammarAccess.getPredicateDefinitionAccess().getColonEqualsSignKeyword_5_0()); + + // InternalProblem.g:568:4: ( (lv_bodies_10_0= ruleConjunction ) ) + // InternalProblem.g:569:5: (lv_bodies_10_0= ruleConjunction ) + { + // InternalProblem.g:569:5: (lv_bodies_10_0= ruleConjunction ) + // InternalProblem.g:570:6: lv_bodies_10_0= ruleConjunction + { + + newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_1_0()); + + pushFollow(FOLLOW_22); + lv_bodies_10_0=ruleConjunction(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); + } + add( + current, + "bodies", + lv_bodies_10_0, + "org.eclipse.viatra.solver.language.Problem.Conjunction"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalProblem.g:587:4: (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* + loop15: + do { + int alt15=2; + int LA15_0 = input.LA(1); + + if ( (LA15_0==26) ) { + alt15=1; + } + + + switch (alt15) { + case 1 : + // InternalProblem.g:588:5: otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) + { + otherlv_11=(Token)match(input,26,FOLLOW_21); + + newLeafNode(otherlv_11, grammarAccess.getPredicateDefinitionAccess().getSemicolonKeyword_5_2_0()); + + // InternalProblem.g:592:5: ( (lv_bodies_12_0= ruleConjunction ) ) + // InternalProblem.g:593:6: (lv_bodies_12_0= ruleConjunction ) + { + // InternalProblem.g:593:6: (lv_bodies_12_0= ruleConjunction ) + // InternalProblem.g:594:7: lv_bodies_12_0= ruleConjunction + { + + newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_2_1_0()); + + pushFollow(FOLLOW_22); + lv_bodies_12_0=ruleConjunction(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); + } + add( + current, + "bodies", + lv_bodies_12_0, + "org.eclipse.viatra.solver.language.Problem.Conjunction"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop15; + } + } while (true); + + + } + break; + + } + + otherlv_13=(Token)match(input,17,FOLLOW_2); + + newLeafNode(otherlv_13, grammarAccess.getPredicateDefinitionAccess().getFullStopKeyword_6()); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "rulePredicateDefinition" + + + // $ANTLR start "entryRuleParameter" + // InternalProblem.g:621:1: entryRuleParameter returns [EObject current=null] : iv_ruleParameter= ruleParameter EOF ; + public final EObject entryRuleParameter() throws RecognitionException { + EObject current = null; + + EObject iv_ruleParameter = null; + + + try { + // InternalProblem.g:621:50: (iv_ruleParameter= ruleParameter EOF ) + // InternalProblem.g:622:2: iv_ruleParameter= ruleParameter EOF + { + newCompositeNode(grammarAccess.getParameterRule()); + pushFollow(FOLLOW_1); + iv_ruleParameter=ruleParameter(); + + state._fsp--; + + current =iv_ruleParameter; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleParameter" + + + // $ANTLR start "ruleParameter" + // InternalProblem.g:628:1: ruleParameter returns [EObject current=null] : ( ( (otherlv_0= RULE_ID ) ) ( (lv_name_1_0= RULE_ID ) ) ) ; + public final EObject ruleParameter() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_name_1_0=null; + + + enterRule(); + + try { + // InternalProblem.g:634:2: ( ( ( (otherlv_0= RULE_ID ) ) ( (lv_name_1_0= RULE_ID ) ) ) ) + // InternalProblem.g:635:2: ( ( (otherlv_0= RULE_ID ) ) ( (lv_name_1_0= RULE_ID ) ) ) + { + // InternalProblem.g:635:2: ( ( (otherlv_0= RULE_ID ) ) ( (lv_name_1_0= RULE_ID ) ) ) + // InternalProblem.g:636:3: ( (otherlv_0= RULE_ID ) ) ( (lv_name_1_0= RULE_ID ) ) + { + // InternalProblem.g:636:3: ( (otherlv_0= RULE_ID ) ) + // InternalProblem.g:637:4: (otherlv_0= RULE_ID ) + { + // InternalProblem.g:637:4: (otherlv_0= RULE_ID ) + // InternalProblem.g:638:5: otherlv_0= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getParameterRule()); + } + + otherlv_0=(Token)match(input,RULE_ID,FOLLOW_5); + + newLeafNode(otherlv_0, grammarAccess.getParameterAccess().getParameterTypeClassDeclarationCrossReference_0_0()); + + + } + + + } + + // InternalProblem.g:649:3: ( (lv_name_1_0= RULE_ID ) ) + // InternalProblem.g:650:4: (lv_name_1_0= RULE_ID ) + { + // InternalProblem.g:650:4: (lv_name_1_0= RULE_ID ) + // InternalProblem.g:651:5: lv_name_1_0= RULE_ID + { + lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_2); + + newLeafNode(lv_name_1_0, grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getParameterRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_1_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleParameter" + + + // $ANTLR start "entryRuleConjunction" + // InternalProblem.g:671:1: entryRuleConjunction returns [EObject current=null] : iv_ruleConjunction= ruleConjunction EOF ; + public final EObject entryRuleConjunction() throws RecognitionException { + EObject current = null; + + EObject iv_ruleConjunction = null; + + + try { + // InternalProblem.g:671:52: (iv_ruleConjunction= ruleConjunction EOF ) + // InternalProblem.g:672:2: iv_ruleConjunction= ruleConjunction EOF + { + newCompositeNode(grammarAccess.getConjunctionRule()); + pushFollow(FOLLOW_1); + iv_ruleConjunction=ruleConjunction(); + + state._fsp--; + + current =iv_ruleConjunction; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleConjunction" + + + // $ANTLR start "ruleConjunction" + // InternalProblem.g:678:1: ruleConjunction returns [EObject current=null] : ( ( (lv_literals_0_0= ruleLiteral ) ) (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* ) ; + public final EObject ruleConjunction() throws RecognitionException { + EObject current = null; + + Token otherlv_1=null; + EObject lv_literals_0_0 = null; + + EObject lv_literals_2_0 = null; + + + + enterRule(); + + try { + // InternalProblem.g:684:2: ( ( ( (lv_literals_0_0= ruleLiteral ) ) (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* ) ) + // InternalProblem.g:685:2: ( ( (lv_literals_0_0= ruleLiteral ) ) (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* ) + { + // InternalProblem.g:685:2: ( ( (lv_literals_0_0= ruleLiteral ) ) (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* ) + // InternalProblem.g:686:3: ( (lv_literals_0_0= ruleLiteral ) ) (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* + { + // InternalProblem.g:686:3: ( (lv_literals_0_0= ruleLiteral ) ) + // InternalProblem.g:687:4: (lv_literals_0_0= ruleLiteral ) + { + // InternalProblem.g:687:4: (lv_literals_0_0= ruleLiteral ) + // InternalProblem.g:688:5: lv_literals_0_0= ruleLiteral + { + + newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_0_0()); + + pushFollow(FOLLOW_23); + lv_literals_0_0=ruleLiteral(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConjunctionRule()); + } + add( + current, + "literals", + lv_literals_0_0, + "org.eclipse.viatra.solver.language.Problem.Literal"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalProblem.g:705:3: (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* + loop17: + do { + int alt17=2; + int LA17_0 = input.LA(1); + + if ( (LA17_0==15) ) { + alt17=1; + } + + + switch (alt17) { + case 1 : + // InternalProblem.g:706:4: otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) + { + otherlv_1=(Token)match(input,15,FOLLOW_21); + + newLeafNode(otherlv_1, grammarAccess.getConjunctionAccess().getCommaKeyword_1_0()); + + // InternalProblem.g:710:4: ( (lv_literals_2_0= ruleLiteral ) ) + // InternalProblem.g:711:5: (lv_literals_2_0= ruleLiteral ) + { + // InternalProblem.g:711:5: (lv_literals_2_0= ruleLiteral ) + // InternalProblem.g:712:6: lv_literals_2_0= ruleLiteral + { + + newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_1_1_0()); + + pushFollow(FOLLOW_23); + lv_literals_2_0=ruleLiteral(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConjunctionRule()); + } + add( + current, + "literals", + lv_literals_2_0, + "org.eclipse.viatra.solver.language.Problem.Literal"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop17; + } + } while (true); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleConjunction" + + + // $ANTLR start "entryRuleLiteral" + // InternalProblem.g:734:1: entryRuleLiteral returns [EObject current=null] : iv_ruleLiteral= ruleLiteral EOF ; + public final EObject entryRuleLiteral() throws RecognitionException { + EObject current = null; + + EObject iv_ruleLiteral = null; + + + try { + // InternalProblem.g:734:48: (iv_ruleLiteral= ruleLiteral EOF ) + // InternalProblem.g:735:2: iv_ruleLiteral= ruleLiteral EOF + { + newCompositeNode(grammarAccess.getLiteralRule()); + pushFollow(FOLLOW_1); + iv_ruleLiteral=ruleLiteral(); + + state._fsp--; + + current =iv_ruleLiteral; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleLiteral" + + + // $ANTLR start "ruleLiteral" + // InternalProblem.g:741:1: ruleLiteral returns [EObject current=null] : (this_Atom_0= ruleAtom | this_NegativeLiteral_1= ruleNegativeLiteral ) ; + public final EObject ruleLiteral() throws RecognitionException { + EObject current = null; + + EObject this_Atom_0 = null; + + EObject this_NegativeLiteral_1 = null; + + + + enterRule(); + + try { + // InternalProblem.g:747:2: ( (this_Atom_0= ruleAtom | this_NegativeLiteral_1= ruleNegativeLiteral ) ) + // InternalProblem.g:748:2: (this_Atom_0= ruleAtom | this_NegativeLiteral_1= ruleNegativeLiteral ) + { + // InternalProblem.g:748:2: (this_Atom_0= ruleAtom | this_NegativeLiteral_1= ruleNegativeLiteral ) + int alt18=2; + int LA18_0 = input.LA(1); + + if ( (LA18_0==RULE_ID) ) { + alt18=1; + } + else if ( (LA18_0==27) ) { + alt18=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 18, 0, input); + + throw nvae; + } + switch (alt18) { + case 1 : + // InternalProblem.g:749:3: this_Atom_0= ruleAtom + { + + newCompositeNode(grammarAccess.getLiteralAccess().getAtomParserRuleCall_0()); + + pushFollow(FOLLOW_2); + this_Atom_0=ruleAtom(); + + state._fsp--; + + + current = this_Atom_0; + afterParserOrEnumRuleCall(); + + + } + break; + case 2 : + // InternalProblem.g:758:3: this_NegativeLiteral_1= ruleNegativeLiteral + { + + newCompositeNode(grammarAccess.getLiteralAccess().getNegativeLiteralParserRuleCall_1()); + + pushFollow(FOLLOW_2); + this_NegativeLiteral_1=ruleNegativeLiteral(); + + state._fsp--; + + + current = this_NegativeLiteral_1; + afterParserOrEnumRuleCall(); + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleLiteral" + + + // $ANTLR start "entryRuleNegativeLiteral" + // InternalProblem.g:770:1: entryRuleNegativeLiteral returns [EObject current=null] : iv_ruleNegativeLiteral= ruleNegativeLiteral EOF ; + public final EObject entryRuleNegativeLiteral() throws RecognitionException { + EObject current = null; + + EObject iv_ruleNegativeLiteral = null; + + + try { + // InternalProblem.g:770:56: (iv_ruleNegativeLiteral= ruleNegativeLiteral EOF ) + // InternalProblem.g:771:2: iv_ruleNegativeLiteral= ruleNegativeLiteral EOF + { + newCompositeNode(grammarAccess.getNegativeLiteralRule()); + pushFollow(FOLLOW_1); + iv_ruleNegativeLiteral=ruleNegativeLiteral(); + + state._fsp--; + + current =iv_ruleNegativeLiteral; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleNegativeLiteral" + + + // $ANTLR start "ruleNegativeLiteral" + // InternalProblem.g:777:1: ruleNegativeLiteral returns [EObject current=null] : (otherlv_0= '!' ( (lv_atom_1_0= ruleAtom ) ) ) ; + public final EObject ruleNegativeLiteral() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + EObject lv_atom_1_0 = null; + + + + enterRule(); + + try { + // InternalProblem.g:783:2: ( (otherlv_0= '!' ( (lv_atom_1_0= ruleAtom ) ) ) ) + // InternalProblem.g:784:2: (otherlv_0= '!' ( (lv_atom_1_0= ruleAtom ) ) ) + { + // InternalProblem.g:784:2: (otherlv_0= '!' ( (lv_atom_1_0= ruleAtom ) ) ) + // InternalProblem.g:785:3: otherlv_0= '!' ( (lv_atom_1_0= ruleAtom ) ) + { + otherlv_0=(Token)match(input,27,FOLLOW_5); + + newLeafNode(otherlv_0, grammarAccess.getNegativeLiteralAccess().getExclamationMarkKeyword_0()); + + // InternalProblem.g:789:3: ( (lv_atom_1_0= ruleAtom ) ) + // InternalProblem.g:790:4: (lv_atom_1_0= ruleAtom ) + { + // InternalProblem.g:790:4: (lv_atom_1_0= ruleAtom ) + // InternalProblem.g:791:5: lv_atom_1_0= ruleAtom + { + + newCompositeNode(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0()); + + pushFollow(FOLLOW_2); + lv_atom_1_0=ruleAtom(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getNegativeLiteralRule()); + } + set( + current, + "atom", + lv_atom_1_0, + "org.eclipse.viatra.solver.language.Problem.Atom"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleNegativeLiteral" + + + // $ANTLR start "entryRuleAtom" + // InternalProblem.g:812:1: entryRuleAtom returns [EObject current=null] : iv_ruleAtom= ruleAtom EOF ; + public final EObject entryRuleAtom() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAtom = null; + + + try { + // InternalProblem.g:812:45: (iv_ruleAtom= ruleAtom EOF ) + // InternalProblem.g:813:2: iv_ruleAtom= ruleAtom EOF + { + newCompositeNode(grammarAccess.getAtomRule()); + pushFollow(FOLLOW_1); + iv_ruleAtom=ruleAtom(); + + state._fsp--; + + current =iv_ruleAtom; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAtom" + + + // $ANTLR start "ruleAtom" + // InternalProblem.g:819:1: ruleAtom returns [EObject current=null] : ( ( ( ruleQualifiedName ) ) ( (lv_transitiveClosure_1_0= '+' ) )? otherlv_2= '(' ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? otherlv_6= ')' ) ; + public final EObject ruleAtom() throws RecognitionException { + EObject current = null; + + Token lv_transitiveClosure_1_0=null; + Token otherlv_2=null; + Token otherlv_3=null; + Token otherlv_4=null; + Token otherlv_5=null; + Token otherlv_6=null; + + + enterRule(); + + try { + // InternalProblem.g:825:2: ( ( ( ( ruleQualifiedName ) ) ( (lv_transitiveClosure_1_0= '+' ) )? otherlv_2= '(' ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? otherlv_6= ')' ) ) + // InternalProblem.g:826:2: ( ( ( ruleQualifiedName ) ) ( (lv_transitiveClosure_1_0= '+' ) )? otherlv_2= '(' ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? otherlv_6= ')' ) + { + // InternalProblem.g:826:2: ( ( ( ruleQualifiedName ) ) ( (lv_transitiveClosure_1_0= '+' ) )? otherlv_2= '(' ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? otherlv_6= ')' ) + // InternalProblem.g:827:3: ( ( ruleQualifiedName ) ) ( (lv_transitiveClosure_1_0= '+' ) )? otherlv_2= '(' ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? otherlv_6= ')' + { + // InternalProblem.g:827:3: ( ( ruleQualifiedName ) ) + // InternalProblem.g:828:4: ( ruleQualifiedName ) + { + // InternalProblem.g:828:4: ( ruleQualifiedName ) + // InternalProblem.g:829:5: ruleQualifiedName + { + + if (current==null) { + current = createModelElement(grammarAccess.getAtomRule()); + } + + + newCompositeNode(grammarAccess.getAtomAccess().getRelationRelationCrossReference_0_0()); + + pushFollow(FOLLOW_24); + ruleQualifiedName(); + + state._fsp--; + + + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalProblem.g:843:3: ( (lv_transitiveClosure_1_0= '+' ) )? + int alt19=2; + int LA19_0 = input.LA(1); + + if ( (LA19_0==28) ) { + alt19=1; + } + switch (alt19) { + case 1 : + // InternalProblem.g:844:4: (lv_transitiveClosure_1_0= '+' ) + { + // InternalProblem.g:844:4: (lv_transitiveClosure_1_0= '+' ) + // InternalProblem.g:845:5: lv_transitiveClosure_1_0= '+' + { + lv_transitiveClosure_1_0=(Token)match(input,28,FOLLOW_17); + + newLeafNode(lv_transitiveClosure_1_0, grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getAtomRule()); + } + setWithLastConsumed(current, "transitiveClosure", lv_transitiveClosure_1_0 != null, "+"); + + + } + + + } + break; + + } + + otherlv_2=(Token)match(input,23,FOLLOW_18); + + newLeafNode(otherlv_2, grammarAccess.getAtomAccess().getLeftParenthesisKeyword_2()); + + // InternalProblem.g:861:3: ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? + int alt21=2; + int LA21_0 = input.LA(1); + + if ( (LA21_0==RULE_ID) ) { + alt21=1; + } + switch (alt21) { + case 1 : + // InternalProblem.g:862:4: ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* + { + // InternalProblem.g:862:4: ( (otherlv_3= RULE_ID ) ) + // InternalProblem.g:863:5: (otherlv_3= RULE_ID ) + { + // InternalProblem.g:863:5: (otherlv_3= RULE_ID ) + // InternalProblem.g:864:6: otherlv_3= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getAtomRule()); + } + + otherlv_3=(Token)match(input,RULE_ID,FOLLOW_19); + + newLeafNode(otherlv_3, grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_0_0()); + + + } + + + } + + // InternalProblem.g:875:4: (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* + loop20: + do { + int alt20=2; + int LA20_0 = input.LA(1); + + if ( (LA20_0==15) ) { + alt20=1; + } + + + switch (alt20) { + case 1 : + // InternalProblem.g:876:5: otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) + { + otherlv_4=(Token)match(input,15,FOLLOW_5); + + newLeafNode(otherlv_4, grammarAccess.getAtomAccess().getCommaKeyword_3_1_0()); + + // InternalProblem.g:880:5: ( (otherlv_5= RULE_ID ) ) + // InternalProblem.g:881:6: (otherlv_5= RULE_ID ) + { + // InternalProblem.g:881:6: (otherlv_5= RULE_ID ) + // InternalProblem.g:882:7: otherlv_5= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getAtomRule()); + } + + otherlv_5=(Token)match(input,RULE_ID,FOLLOW_19); + + newLeafNode(otherlv_5, grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_1_1_0()); + + + } + + + } + + + } + break; + + default : + break loop20; + } + } while (true); + + + } + break; + + } + + otherlv_6=(Token)match(input,24,FOLLOW_2); + + newLeafNode(otherlv_6, grammarAccess.getAtomAccess().getRightParenthesisKeyword_4()); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAtom" + + + // $ANTLR start "entryRuleAssertion" + // InternalProblem.g:903:1: entryRuleAssertion returns [EObject current=null] : iv_ruleAssertion= ruleAssertion EOF ; + public final EObject entryRuleAssertion() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAssertion = null; + + + try { + // InternalProblem.g:903:50: (iv_ruleAssertion= ruleAssertion EOF ) + // InternalProblem.g:904:2: iv_ruleAssertion= ruleAssertion EOF + { + newCompositeNode(grammarAccess.getAssertionRule()); + pushFollow(FOLLOW_1); + iv_ruleAssertion=ruleAssertion(); + + state._fsp--; + + current =iv_ruleAssertion; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAssertion" + + + // $ANTLR start "ruleAssertion" + // InternalProblem.g:910:1: ruleAssertion returns [EObject current=null] : ( ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) otherlv_15= '.' ) ; + public final EObject ruleAssertion() throws RecognitionException { + EObject current = null; + + Token otherlv_1=null; + Token otherlv_3=null; + Token otherlv_5=null; + Token otherlv_6=null; + Token otherlv_10=null; + Token otherlv_12=null; + Token otherlv_14=null; + Token otherlv_15=null; + Enumerator lv_value_7_0 = null; + + Enumerator lv_value_8_0 = null; + + + + enterRule(); + + try { + // InternalProblem.g:916:2: ( ( ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) otherlv_15= '.' ) ) + // InternalProblem.g:917:2: ( ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) otherlv_15= '.' ) + { + // InternalProblem.g:917:2: ( ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) otherlv_15= '.' ) + // InternalProblem.g:918:3: ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) otherlv_15= '.' + { + // InternalProblem.g:918:3: ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) + int alt27=2; + alt27 = dfa27.predict(input); + switch (alt27) { + case 1 : + // InternalProblem.g:919:4: ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) + { + // InternalProblem.g:919:4: ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) + // InternalProblem.g:920:5: ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) + { + // InternalProblem.g:920:5: ( ( ruleQualifiedName ) ) + // InternalProblem.g:921:6: ( ruleQualifiedName ) + { + // InternalProblem.g:921:6: ( ruleQualifiedName ) + // InternalProblem.g:922:7: ruleQualifiedName + { + + if (current==null) { + current = createModelElement(grammarAccess.getAssertionRule()); + } + + + newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_0_0_0()); + + pushFollow(FOLLOW_17); + ruleQualifiedName(); + + state._fsp--; + + + afterParserOrEnumRuleCall(); + + + } + + + } + + otherlv_1=(Token)match(input,23,FOLLOW_18); + + newLeafNode(otherlv_1, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_0_1()); + + // InternalProblem.g:940:5: ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? + int alt23=2; + int LA23_0 = input.LA(1); + + if ( (LA23_0==RULE_ID) ) { + alt23=1; + } + switch (alt23) { + case 1 : + // InternalProblem.g:941:6: ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* + { + // InternalProblem.g:941:6: ( ( ruleQualifiedName ) ) + // InternalProblem.g:942:7: ( ruleQualifiedName ) + { + // InternalProblem.g:942:7: ( ruleQualifiedName ) + // InternalProblem.g:943:8: ruleQualifiedName + { + + if (current==null) { + current = createModelElement(grammarAccess.getAssertionRule()); + } + + + newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_0_0()); + + pushFollow(FOLLOW_19); + ruleQualifiedName(); + + state._fsp--; + + + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalProblem.g:957:6: (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* + loop22: + do { + int alt22=2; + int LA22_0 = input.LA(1); + + if ( (LA22_0==15) ) { + alt22=1; + } + + + switch (alt22) { + case 1 : + // InternalProblem.g:958:7: otherlv_3= ',' ( ( ruleQualifiedName ) ) + { + otherlv_3=(Token)match(input,15,FOLLOW_5); + + newLeafNode(otherlv_3, grammarAccess.getAssertionAccess().getCommaKeyword_0_0_2_1_0()); + + // InternalProblem.g:962:7: ( ( ruleQualifiedName ) ) + // InternalProblem.g:963:8: ( ruleQualifiedName ) + { + // InternalProblem.g:963:8: ( ruleQualifiedName ) + // InternalProblem.g:964:9: ruleQualifiedName + { + + if (current==null) { + current = createModelElement(grammarAccess.getAssertionRule()); + } + + + newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_1_1_0()); + + pushFollow(FOLLOW_19); + ruleQualifiedName(); + + state._fsp--; + + + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop22; + } + } while (true); + + + } + break; + + } + + otherlv_5=(Token)match(input,24,FOLLOW_25); + + newLeafNode(otherlv_5, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_0_3()); + + otherlv_6=(Token)match(input,29,FOLLOW_26); + + newLeafNode(otherlv_6, grammarAccess.getAssertionAccess().getColonKeyword_0_0_4()); + + // InternalProblem.g:988:5: ( (lv_value_7_0= ruleLogicValue ) ) + // InternalProblem.g:989:6: (lv_value_7_0= ruleLogicValue ) + { + // InternalProblem.g:989:6: (lv_value_7_0= ruleLogicValue ) + // InternalProblem.g:990:7: lv_value_7_0= ruleLogicValue + { + + newCompositeNode(grammarAccess.getAssertionAccess().getValueLogicValueEnumRuleCall_0_0_5_0()); + + pushFollow(FOLLOW_27); + lv_value_7_0=ruleLogicValue(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAssertionRule()); + } + set( + current, + "value", + lv_value_7_0, + "org.eclipse.viatra.solver.language.Problem.LogicValue"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + + + } + break; + case 2 : + // InternalProblem.g:1009:4: ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) + { + // InternalProblem.g:1009:4: ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) + // InternalProblem.g:1010:5: ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' + { + // InternalProblem.g:1010:5: ( (lv_value_8_0= ruleShortLogicValue ) )? + int alt24=2; + int LA24_0 = input.LA(1); + + if ( (LA24_0==27||LA24_0==39) ) { + alt24=1; + } + switch (alt24) { + case 1 : + // InternalProblem.g:1011:6: (lv_value_8_0= ruleShortLogicValue ) + { + // InternalProblem.g:1011:6: (lv_value_8_0= ruleShortLogicValue ) + // InternalProblem.g:1012:7: lv_value_8_0= ruleShortLogicValue + { + + newCompositeNode(grammarAccess.getAssertionAccess().getValueShortLogicValueEnumRuleCall_0_1_0_0()); + + pushFollow(FOLLOW_5); + lv_value_8_0=ruleShortLogicValue(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAssertionRule()); + } + set( + current, + "value", + lv_value_8_0, + "org.eclipse.viatra.solver.language.Problem.ShortLogicValue"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + } + + // InternalProblem.g:1029:5: ( ( ruleQualifiedName ) ) + // InternalProblem.g:1030:6: ( ruleQualifiedName ) + { + // InternalProblem.g:1030:6: ( ruleQualifiedName ) + // InternalProblem.g:1031:7: ruleQualifiedName + { + + if (current==null) { + current = createModelElement(grammarAccess.getAssertionRule()); + } + + + newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_1_1_0()); + + pushFollow(FOLLOW_17); + ruleQualifiedName(); + + state._fsp--; + + + afterParserOrEnumRuleCall(); + + + } + + + } + + otherlv_10=(Token)match(input,23,FOLLOW_18); + + newLeafNode(otherlv_10, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_1_2()); + + // InternalProblem.g:1049:5: ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? + int alt26=2; + int LA26_0 = input.LA(1); + + if ( (LA26_0==RULE_ID) ) { + alt26=1; + } + switch (alt26) { + case 1 : + // InternalProblem.g:1050:6: ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* + { + // InternalProblem.g:1050:6: ( ( ruleQualifiedName ) ) + // InternalProblem.g:1051:7: ( ruleQualifiedName ) + { + // InternalProblem.g:1051:7: ( ruleQualifiedName ) + // InternalProblem.g:1052:8: ruleQualifiedName + { + + if (current==null) { + current = createModelElement(grammarAccess.getAssertionRule()); + } + + + newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_0_0()); + + pushFollow(FOLLOW_19); + ruleQualifiedName(); + + state._fsp--; + + + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalProblem.g:1066:6: (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* + loop25: + do { + int alt25=2; + int LA25_0 = input.LA(1); + + if ( (LA25_0==15) ) { + alt25=1; + } + + + switch (alt25) { + case 1 : + // InternalProblem.g:1067:7: otherlv_12= ',' ( ( ruleQualifiedName ) ) + { + otherlv_12=(Token)match(input,15,FOLLOW_5); + + newLeafNode(otherlv_12, grammarAccess.getAssertionAccess().getCommaKeyword_0_1_3_1_0()); + + // InternalProblem.g:1071:7: ( ( ruleQualifiedName ) ) + // InternalProblem.g:1072:8: ( ruleQualifiedName ) + { + // InternalProblem.g:1072:8: ( ruleQualifiedName ) + // InternalProblem.g:1073:9: ruleQualifiedName + { + + if (current==null) { + current = createModelElement(grammarAccess.getAssertionRule()); + } + + + newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_1_1_0()); + + pushFollow(FOLLOW_19); + ruleQualifiedName(); + + state._fsp--; + + + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop25; + } + } while (true); + + + } + break; + + } + + otherlv_14=(Token)match(input,24,FOLLOW_27); + + newLeafNode(otherlv_14, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_1_4()); + + + } + + + } + break; + + } + + otherlv_15=(Token)match(input,17,FOLLOW_2); + + newLeafNode(otherlv_15, grammarAccess.getAssertionAccess().getFullStopKeyword_1()); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAssertion" + + + // $ANTLR start "entryRuleScopeDeclaration" + // InternalProblem.g:1103:1: entryRuleScopeDeclaration returns [EObject current=null] : iv_ruleScopeDeclaration= ruleScopeDeclaration EOF ; + public final EObject entryRuleScopeDeclaration() throws RecognitionException { + EObject current = null; + + EObject iv_ruleScopeDeclaration = null; + + + try { + // InternalProblem.g:1103:57: (iv_ruleScopeDeclaration= ruleScopeDeclaration EOF ) + // InternalProblem.g:1104:2: iv_ruleScopeDeclaration= ruleScopeDeclaration EOF + { + newCompositeNode(grammarAccess.getScopeDeclarationRule()); + pushFollow(FOLLOW_1); + iv_ruleScopeDeclaration=ruleScopeDeclaration(); + + state._fsp--; + + current =iv_ruleScopeDeclaration; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleScopeDeclaration" + + + // $ANTLR start "ruleScopeDeclaration" + // InternalProblem.g:1110:1: ruleScopeDeclaration returns [EObject current=null] : (otherlv_0= 'scope' ( (lv_typeScopes_1_0= ruleTypeScope ) ) (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* otherlv_4= '.' ) ; + public final EObject ruleScopeDeclaration() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token otherlv_2=null; + Token otherlv_4=null; + EObject lv_typeScopes_1_0 = null; + + EObject lv_typeScopes_3_0 = null; + + + + enterRule(); + + try { + // InternalProblem.g:1116:2: ( (otherlv_0= 'scope' ( (lv_typeScopes_1_0= ruleTypeScope ) ) (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* otherlv_4= '.' ) ) + // InternalProblem.g:1117:2: (otherlv_0= 'scope' ( (lv_typeScopes_1_0= ruleTypeScope ) ) (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* otherlv_4= '.' ) + { + // InternalProblem.g:1117:2: (otherlv_0= 'scope' ( (lv_typeScopes_1_0= ruleTypeScope ) ) (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* otherlv_4= '.' ) + // InternalProblem.g:1118:3: otherlv_0= 'scope' ( (lv_typeScopes_1_0= ruleTypeScope ) ) (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* otherlv_4= '.' + { + otherlv_0=(Token)match(input,30,FOLLOW_5); + + newLeafNode(otherlv_0, grammarAccess.getScopeDeclarationAccess().getScopeKeyword_0()); + + // InternalProblem.g:1122:3: ( (lv_typeScopes_1_0= ruleTypeScope ) ) + // InternalProblem.g:1123:4: (lv_typeScopes_1_0= ruleTypeScope ) + { + // InternalProblem.g:1123:4: (lv_typeScopes_1_0= ruleTypeScope ) + // InternalProblem.g:1124:5: lv_typeScopes_1_0= ruleTypeScope + { + + newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_1_0()); + + pushFollow(FOLLOW_8); + lv_typeScopes_1_0=ruleTypeScope(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); + } + add( + current, + "typeScopes", + lv_typeScopes_1_0, + "org.eclipse.viatra.solver.language.Problem.TypeScope"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalProblem.g:1141:3: (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* + loop28: + do { + int alt28=2; + int LA28_0 = input.LA(1); + + if ( (LA28_0==15) ) { + alt28=1; + } + + + switch (alt28) { + case 1 : + // InternalProblem.g:1142:4: otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) + { + otherlv_2=(Token)match(input,15,FOLLOW_5); + + newLeafNode(otherlv_2, grammarAccess.getScopeDeclarationAccess().getCommaKeyword_2_0()); + + // InternalProblem.g:1146:4: ( (lv_typeScopes_3_0= ruleTypeScope ) ) + // InternalProblem.g:1147:5: (lv_typeScopes_3_0= ruleTypeScope ) + { + // InternalProblem.g:1147:5: (lv_typeScopes_3_0= ruleTypeScope ) + // InternalProblem.g:1148:6: lv_typeScopes_3_0= ruleTypeScope + { + + newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_2_1_0()); + + pushFollow(FOLLOW_8); + lv_typeScopes_3_0=ruleTypeScope(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); + } + add( + current, + "typeScopes", + lv_typeScopes_3_0, + "org.eclipse.viatra.solver.language.Problem.TypeScope"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop28; + } + } while (true); + + otherlv_4=(Token)match(input,17,FOLLOW_2); + + newLeafNode(otherlv_4, grammarAccess.getScopeDeclarationAccess().getFullStopKeyword_3()); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleScopeDeclaration" + + + // $ANTLR start "entryRuleTypeScope" + // InternalProblem.g:1174:1: entryRuleTypeScope returns [EObject current=null] : iv_ruleTypeScope= ruleTypeScope EOF ; + public final EObject entryRuleTypeScope() throws RecognitionException { + EObject current = null; + + EObject iv_ruleTypeScope = null; + + + try { + // InternalProblem.g:1174:50: (iv_ruleTypeScope= ruleTypeScope EOF ) + // InternalProblem.g:1175:2: iv_ruleTypeScope= ruleTypeScope EOF + { + newCompositeNode(grammarAccess.getTypeScopeRule()); + pushFollow(FOLLOW_1); + iv_ruleTypeScope=ruleTypeScope(); + + state._fsp--; + + current =iv_ruleTypeScope; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleTypeScope" + + + // $ANTLR start "ruleTypeScope" + // InternalProblem.g:1181:1: ruleTypeScope returns [EObject current=null] : ( ( (otherlv_0= RULE_ID ) ) ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) ( (lv_multiplicity_3_0= ruleMultiplicity ) ) ) ; + public final EObject ruleTypeScope() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_increment_1_0=null; + Token otherlv_2=null; + EObject lv_multiplicity_3_0 = null; + + + + enterRule(); + + try { + // InternalProblem.g:1187:2: ( ( ( (otherlv_0= RULE_ID ) ) ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) ( (lv_multiplicity_3_0= ruleMultiplicity ) ) ) ) + // InternalProblem.g:1188:2: ( ( (otherlv_0= RULE_ID ) ) ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) ( (lv_multiplicity_3_0= ruleMultiplicity ) ) ) + { + // InternalProblem.g:1188:2: ( ( (otherlv_0= RULE_ID ) ) ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) ( (lv_multiplicity_3_0= ruleMultiplicity ) ) ) + // InternalProblem.g:1189:3: ( (otherlv_0= RULE_ID ) ) ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) ( (lv_multiplicity_3_0= ruleMultiplicity ) ) + { + // InternalProblem.g:1189:3: ( (otherlv_0= RULE_ID ) ) + // InternalProblem.g:1190:4: (otherlv_0= RULE_ID ) + { + // InternalProblem.g:1190:4: (otherlv_0= RULE_ID ) + // InternalProblem.g:1191:5: otherlv_0= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getTypeScopeRule()); + } + + otherlv_0=(Token)match(input,RULE_ID,FOLLOW_28); + + newLeafNode(otherlv_0, grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationCrossReference_0_0()); + + + } + + + } + + // InternalProblem.g:1202:3: ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) + int alt29=2; + int LA29_0 = input.LA(1); + + if ( (LA29_0==31) ) { + alt29=1; + } + else if ( (LA29_0==32) ) { + alt29=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 29, 0, input); + + throw nvae; + } + switch (alt29) { + case 1 : + // InternalProblem.g:1203:4: ( (lv_increment_1_0= '+=' ) ) + { + // InternalProblem.g:1203:4: ( (lv_increment_1_0= '+=' ) ) + // InternalProblem.g:1204:5: (lv_increment_1_0= '+=' ) + { + // InternalProblem.g:1204:5: (lv_increment_1_0= '+=' ) + // InternalProblem.g:1205:6: lv_increment_1_0= '+=' + { + lv_increment_1_0=(Token)match(input,31,FOLLOW_13); + + newLeafNode(lv_increment_1_0, grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getTypeScopeRule()); + } + setWithLastConsumed(current, "increment", lv_increment_1_0 != null, "+="); + + + } + + + } + + + } + break; + case 2 : + // InternalProblem.g:1218:4: otherlv_2= '=' + { + otherlv_2=(Token)match(input,32,FOLLOW_13); + + newLeafNode(otherlv_2, grammarAccess.getTypeScopeAccess().getEqualsSignKeyword_1_1()); + + + } + break; + + } + + // InternalProblem.g:1223:3: ( (lv_multiplicity_3_0= ruleMultiplicity ) ) + // InternalProblem.g:1224:4: (lv_multiplicity_3_0= ruleMultiplicity ) + { + // InternalProblem.g:1224:4: (lv_multiplicity_3_0= ruleMultiplicity ) + // InternalProblem.g:1225:5: lv_multiplicity_3_0= ruleMultiplicity + { + + newCompositeNode(grammarAccess.getTypeScopeAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); + + pushFollow(FOLLOW_2); + lv_multiplicity_3_0=ruleMultiplicity(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getTypeScopeRule()); + } + set( + current, + "multiplicity", + lv_multiplicity_3_0, + "org.eclipse.viatra.solver.language.Problem.Multiplicity"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleTypeScope" + + + // $ANTLR start "entryRuleMultiplicity" + // InternalProblem.g:1246:1: entryRuleMultiplicity returns [EObject current=null] : iv_ruleMultiplicity= ruleMultiplicity EOF ; + public final EObject entryRuleMultiplicity() throws RecognitionException { + EObject current = null; + + EObject iv_ruleMultiplicity = null; + + + try { + // InternalProblem.g:1246:53: (iv_ruleMultiplicity= ruleMultiplicity EOF ) + // InternalProblem.g:1247:2: iv_ruleMultiplicity= ruleMultiplicity EOF + { + newCompositeNode(grammarAccess.getMultiplicityRule()); + pushFollow(FOLLOW_1); + iv_ruleMultiplicity=ruleMultiplicity(); + + state._fsp--; + + current =iv_ruleMultiplicity; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleMultiplicity" + + + // $ANTLR start "ruleMultiplicity" + // InternalProblem.g:1253:1: ruleMultiplicity returns [EObject current=null] : (this_RangeMultiplicity_0= ruleRangeMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity ) ; + public final EObject ruleMultiplicity() throws RecognitionException { + EObject current = null; + + EObject this_RangeMultiplicity_0 = null; + + EObject this_ExactMultiplicity_1 = null; + + + + enterRule(); + + try { + // InternalProblem.g:1259:2: ( (this_RangeMultiplicity_0= ruleRangeMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity ) ) + // InternalProblem.g:1260:2: (this_RangeMultiplicity_0= ruleRangeMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity ) + { + // InternalProblem.g:1260:2: (this_RangeMultiplicity_0= ruleRangeMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity ) + int alt30=2; + int LA30_0 = input.LA(1); + + if ( (LA30_0==RULE_INT) ) { + int LA30_1 = input.LA(2); + + if ( (LA30_1==33) ) { + alt30=1; + } + else if ( (LA30_1==EOF||(LA30_1>=15 && LA30_1<=17)) ) { + alt30=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 30, 1, input); + + throw nvae; + } + } + else { + NoViableAltException nvae = + new NoViableAltException("", 30, 0, input); + + throw nvae; + } + switch (alt30) { + case 1 : + // InternalProblem.g:1261:3: this_RangeMultiplicity_0= ruleRangeMultiplicity + { + + newCompositeNode(grammarAccess.getMultiplicityAccess().getRangeMultiplicityParserRuleCall_0()); + + pushFollow(FOLLOW_2); + this_RangeMultiplicity_0=ruleRangeMultiplicity(); + + state._fsp--; + + + current = this_RangeMultiplicity_0; + afterParserOrEnumRuleCall(); + + + } + break; + case 2 : + // InternalProblem.g:1270:3: this_ExactMultiplicity_1= ruleExactMultiplicity + { + + newCompositeNode(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); + + pushFollow(FOLLOW_2); + this_ExactMultiplicity_1=ruleExactMultiplicity(); + + state._fsp--; + + + current = this_ExactMultiplicity_1; + afterParserOrEnumRuleCall(); + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleMultiplicity" + + + // $ANTLR start "entryRuleRangeMultiplicity" + // InternalProblem.g:1282:1: entryRuleRangeMultiplicity returns [EObject current=null] : iv_ruleRangeMultiplicity= ruleRangeMultiplicity EOF ; + public final EObject entryRuleRangeMultiplicity() throws RecognitionException { + EObject current = null; + + EObject iv_ruleRangeMultiplicity = null; + + + try { + // InternalProblem.g:1282:58: (iv_ruleRangeMultiplicity= ruleRangeMultiplicity EOF ) + // InternalProblem.g:1283:2: iv_ruleRangeMultiplicity= ruleRangeMultiplicity EOF + { + newCompositeNode(grammarAccess.getRangeMultiplicityRule()); + pushFollow(FOLLOW_1); + iv_ruleRangeMultiplicity=ruleRangeMultiplicity(); + + state._fsp--; + + current =iv_ruleRangeMultiplicity; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleRangeMultiplicity" + + + // $ANTLR start "ruleRangeMultiplicity" + // InternalProblem.g:1289:1: ruleRangeMultiplicity returns [EObject current=null] : ( ( (lv_lowerBound_0_0= RULE_INT ) ) otherlv_1= '..' ( (lv_upperBound_2_0= ruleUpperBound ) ) ) ; + public final EObject ruleRangeMultiplicity() throws RecognitionException { + EObject current = null; + + Token lv_lowerBound_0_0=null; + Token otherlv_1=null; + AntlrDatatypeRuleToken lv_upperBound_2_0 = null; + + + + enterRule(); + + try { + // InternalProblem.g:1295:2: ( ( ( (lv_lowerBound_0_0= RULE_INT ) ) otherlv_1= '..' ( (lv_upperBound_2_0= ruleUpperBound ) ) ) ) + // InternalProblem.g:1296:2: ( ( (lv_lowerBound_0_0= RULE_INT ) ) otherlv_1= '..' ( (lv_upperBound_2_0= ruleUpperBound ) ) ) + { + // InternalProblem.g:1296:2: ( ( (lv_lowerBound_0_0= RULE_INT ) ) otherlv_1= '..' ( (lv_upperBound_2_0= ruleUpperBound ) ) ) + // InternalProblem.g:1297:3: ( (lv_lowerBound_0_0= RULE_INT ) ) otherlv_1= '..' ( (lv_upperBound_2_0= ruleUpperBound ) ) + { + // InternalProblem.g:1297:3: ( (lv_lowerBound_0_0= RULE_INT ) ) + // InternalProblem.g:1298:4: (lv_lowerBound_0_0= RULE_INT ) + { + // InternalProblem.g:1298:4: (lv_lowerBound_0_0= RULE_INT ) + // InternalProblem.g:1299:5: lv_lowerBound_0_0= RULE_INT + { + lv_lowerBound_0_0=(Token)match(input,RULE_INT,FOLLOW_29); + + newLeafNode(lv_lowerBound_0_0, grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getRangeMultiplicityRule()); + } + setWithLastConsumed( + current, + "lowerBound", + lv_lowerBound_0_0, + "org.eclipse.xtext.common.Terminals.INT"); + + + } + + + } + + otherlv_1=(Token)match(input,33,FOLLOW_30); + + newLeafNode(otherlv_1, grammarAccess.getRangeMultiplicityAccess().getFullStopFullStopKeyword_1()); + + // InternalProblem.g:1319:3: ( (lv_upperBound_2_0= ruleUpperBound ) ) + // InternalProblem.g:1320:4: (lv_upperBound_2_0= ruleUpperBound ) + { + // InternalProblem.g:1320:4: (lv_upperBound_2_0= ruleUpperBound ) + // InternalProblem.g:1321:5: lv_upperBound_2_0= ruleUpperBound + { + + newCompositeNode(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0()); + + pushFollow(FOLLOW_2); + lv_upperBound_2_0=ruleUpperBound(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getRangeMultiplicityRule()); + } + set( + current, + "upperBound", + lv_upperBound_2_0, + "org.eclipse.viatra.solver.language.Problem.UpperBound"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleRangeMultiplicity" + + + // $ANTLR start "entryRuleExactMultiplicity" + // InternalProblem.g:1342:1: entryRuleExactMultiplicity returns [EObject current=null] : iv_ruleExactMultiplicity= ruleExactMultiplicity EOF ; + public final EObject entryRuleExactMultiplicity() throws RecognitionException { + EObject current = null; + + EObject iv_ruleExactMultiplicity = null; + + + try { + // InternalProblem.g:1342:58: (iv_ruleExactMultiplicity= ruleExactMultiplicity EOF ) + // InternalProblem.g:1343:2: iv_ruleExactMultiplicity= ruleExactMultiplicity EOF + { + newCompositeNode(grammarAccess.getExactMultiplicityRule()); + pushFollow(FOLLOW_1); + iv_ruleExactMultiplicity=ruleExactMultiplicity(); + + state._fsp--; + + current =iv_ruleExactMultiplicity; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleExactMultiplicity" + + + // $ANTLR start "ruleExactMultiplicity" + // InternalProblem.g:1349:1: ruleExactMultiplicity returns [EObject current=null] : ( (lv_exactValue_0_0= RULE_INT ) ) ; + public final EObject ruleExactMultiplicity() throws RecognitionException { + EObject current = null; + + Token lv_exactValue_0_0=null; + + + enterRule(); + + try { + // InternalProblem.g:1355:2: ( ( (lv_exactValue_0_0= RULE_INT ) ) ) + // InternalProblem.g:1356:2: ( (lv_exactValue_0_0= RULE_INT ) ) + { + // InternalProblem.g:1356:2: ( (lv_exactValue_0_0= RULE_INT ) ) + // InternalProblem.g:1357:3: (lv_exactValue_0_0= RULE_INT ) + { + // InternalProblem.g:1357:3: (lv_exactValue_0_0= RULE_INT ) + // InternalProblem.g:1358:4: lv_exactValue_0_0= RULE_INT + { + lv_exactValue_0_0=(Token)match(input,RULE_INT,FOLLOW_2); + + newLeafNode(lv_exactValue_0_0, grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getExactMultiplicityRule()); + } + setWithLastConsumed( + current, + "exactValue", + lv_exactValue_0_0, + "org.eclipse.xtext.common.Terminals.INT"); + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleExactMultiplicity" + + + // $ANTLR start "entryRuleUpperBound" + // InternalProblem.g:1377:1: entryRuleUpperBound returns [String current=null] : iv_ruleUpperBound= ruleUpperBound EOF ; + public final String entryRuleUpperBound() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleUpperBound = null; + + + try { + // InternalProblem.g:1377:50: (iv_ruleUpperBound= ruleUpperBound EOF ) + // InternalProblem.g:1378:2: iv_ruleUpperBound= ruleUpperBound EOF + { + newCompositeNode(grammarAccess.getUpperBoundRule()); + pushFollow(FOLLOW_1); + iv_ruleUpperBound=ruleUpperBound(); + + state._fsp--; + + current =iv_ruleUpperBound.getText(); + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleUpperBound" + + + // $ANTLR start "ruleUpperBound" + // InternalProblem.g:1384:1: ruleUpperBound returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_INT_0= RULE_INT | kw= '*' ) ; + public final AntlrDatatypeRuleToken ruleUpperBound() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_INT_0=null; + Token kw=null; + + + enterRule(); + + try { + // InternalProblem.g:1390:2: ( (this_INT_0= RULE_INT | kw= '*' ) ) + // InternalProblem.g:1391:2: (this_INT_0= RULE_INT | kw= '*' ) + { + // InternalProblem.g:1391:2: (this_INT_0= RULE_INT | kw= '*' ) + int alt31=2; + int LA31_0 = input.LA(1); + + if ( (LA31_0==RULE_INT) ) { + alt31=1; + } + else if ( (LA31_0==34) ) { + alt31=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 31, 0, input); + + throw nvae; + } + switch (alt31) { + case 1 : + // InternalProblem.g:1392:3: this_INT_0= RULE_INT + { + this_INT_0=(Token)match(input,RULE_INT,FOLLOW_2); + + current.merge(this_INT_0); + + + newLeafNode(this_INT_0, grammarAccess.getUpperBoundAccess().getINTTerminalRuleCall_0()); + + + } + break; + case 2 : + // InternalProblem.g:1400:3: kw= '*' + { + kw=(Token)match(input,34,FOLLOW_2); + + current.merge(kw); + newLeafNode(kw, grammarAccess.getUpperBoundAccess().getAsteriskKeyword_1()); + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleUpperBound" + + + // $ANTLR start "entryRuleQualifiedName" + // InternalProblem.g:1409:1: entryRuleQualifiedName returns [String current=null] : iv_ruleQualifiedName= ruleQualifiedName EOF ; + public final String entryRuleQualifiedName() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleQualifiedName = null; + + + try { + // InternalProblem.g:1409:53: (iv_ruleQualifiedName= ruleQualifiedName EOF ) + // InternalProblem.g:1410:2: iv_ruleQualifiedName= ruleQualifiedName EOF + { + newCompositeNode(grammarAccess.getQualifiedNameRule()); + pushFollow(FOLLOW_1); + iv_ruleQualifiedName=ruleQualifiedName(); + + state._fsp--; + + current =iv_ruleQualifiedName.getText(); + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleQualifiedName" + + + // $ANTLR start "ruleQualifiedName" + // InternalProblem.g:1416:1: ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (kw= '::' this_ID_2= RULE_ID )* ) ; + public final AntlrDatatypeRuleToken ruleQualifiedName() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_ID_0=null; + Token kw=null; + Token this_ID_2=null; + + + enterRule(); + + try { + // InternalProblem.g:1422:2: ( (this_ID_0= RULE_ID (kw= '::' this_ID_2= RULE_ID )* ) ) + // InternalProblem.g:1423:2: (this_ID_0= RULE_ID (kw= '::' this_ID_2= RULE_ID )* ) + { + // InternalProblem.g:1423:2: (this_ID_0= RULE_ID (kw= '::' this_ID_2= RULE_ID )* ) + // InternalProblem.g:1424:3: this_ID_0= RULE_ID (kw= '::' this_ID_2= RULE_ID )* + { + this_ID_0=(Token)match(input,RULE_ID,FOLLOW_31); + + current.merge(this_ID_0); + + + newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); + + // InternalProblem.g:1431:3: (kw= '::' this_ID_2= RULE_ID )* + loop32: + do { + int alt32=2; + int LA32_0 = input.LA(1); + + if ( (LA32_0==35) ) { + alt32=1; + } + + + switch (alt32) { + case 1 : + // InternalProblem.g:1432:4: kw= '::' this_ID_2= RULE_ID + { + kw=(Token)match(input,35,FOLLOW_5); + + current.merge(kw); + newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getColonColonKeyword_1_0()); + + this_ID_2=(Token)match(input,RULE_ID,FOLLOW_31); + + current.merge(this_ID_2); + + + newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); + + + } + break; + + default : + break loop32; + } + } while (true); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleQualifiedName" + + + // $ANTLR start "ruleLogicValue" + // InternalProblem.g:1449:1: ruleLogicValue returns [Enumerator current=null] : ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) | (enumLiteral_2= 'unknown' ) ) ; + public final Enumerator ruleLogicValue() throws RecognitionException { + Enumerator current = null; + + Token enumLiteral_0=null; + Token enumLiteral_1=null; + Token enumLiteral_2=null; + + + enterRule(); + + try { + // InternalProblem.g:1455:2: ( ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) | (enumLiteral_2= 'unknown' ) ) ) + // InternalProblem.g:1456:2: ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) | (enumLiteral_2= 'unknown' ) ) + { + // InternalProblem.g:1456:2: ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) | (enumLiteral_2= 'unknown' ) ) + int alt33=3; + switch ( input.LA(1) ) { + case 36: + { + alt33=1; + } + break; + case 37: + { + alt33=2; + } + break; + case 38: + { + alt33=3; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 33, 0, input); + + throw nvae; + } + + switch (alt33) { + case 1 : + // InternalProblem.g:1457:3: (enumLiteral_0= 'true' ) + { + // InternalProblem.g:1457:3: (enumLiteral_0= 'true' ) + // InternalProblem.g:1458:4: enumLiteral_0= 'true' + { + enumLiteral_0=(Token)match(input,36,FOLLOW_2); + + current = grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_0, grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); + + + } + + + } + break; + case 2 : + // InternalProblem.g:1465:3: (enumLiteral_1= 'false' ) + { + // InternalProblem.g:1465:3: (enumLiteral_1= 'false' ) + // InternalProblem.g:1466:4: enumLiteral_1= 'false' + { + enumLiteral_1=(Token)match(input,37,FOLLOW_2); + + current = grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_1, grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); + + + } + + + } + break; + case 3 : + // InternalProblem.g:1473:3: (enumLiteral_2= 'unknown' ) + { + // InternalProblem.g:1473:3: (enumLiteral_2= 'unknown' ) + // InternalProblem.g:1474:4: enumLiteral_2= 'unknown' + { + enumLiteral_2=(Token)match(input,38,FOLLOW_2); + + current = grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_2, grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); + + + } + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleLogicValue" + + + // $ANTLR start "ruleShortLogicValue" + // InternalProblem.g:1484:1: ruleShortLogicValue returns [Enumerator current=null] : ( (enumLiteral_0= '!' ) | (enumLiteral_1= '?' ) ) ; + public final Enumerator ruleShortLogicValue() throws RecognitionException { + Enumerator current = null; + + Token enumLiteral_0=null; + Token enumLiteral_1=null; + + + enterRule(); + + try { + // InternalProblem.g:1490:2: ( ( (enumLiteral_0= '!' ) | (enumLiteral_1= '?' ) ) ) + // InternalProblem.g:1491:2: ( (enumLiteral_0= '!' ) | (enumLiteral_1= '?' ) ) + { + // InternalProblem.g:1491:2: ( (enumLiteral_0= '!' ) | (enumLiteral_1= '?' ) ) + int alt34=2; + int LA34_0 = input.LA(1); + + if ( (LA34_0==27) ) { + alt34=1; + } + else if ( (LA34_0==39) ) { + alt34=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 34, 0, input); + + throw nvae; + } + switch (alt34) { + case 1 : + // InternalProblem.g:1492:3: (enumLiteral_0= '!' ) + { + // InternalProblem.g:1492:3: (enumLiteral_0= '!' ) + // InternalProblem.g:1493:4: enumLiteral_0= '!' + { + enumLiteral_0=(Token)match(input,27,FOLLOW_2); + + current = grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_0, grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0()); + + + } + + + } + break; + case 2 : + // InternalProblem.g:1500:3: (enumLiteral_1= '?' ) + { + // InternalProblem.g:1500:3: (enumLiteral_1= '?' ) + // InternalProblem.g:1501:4: enumLiteral_1= '?' + { + enumLiteral_1=(Token)match(input,39,FOLLOW_2); + + current = grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_1, grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1()); + + + } + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleShortLogicValue" + + // Delegated rules + + + protected DFA27 dfa27 = new DFA27(this); + static final String dfa_1s = "\17\uffff"; + static final String dfa_2s = "\1\4\1\27\1\uffff\2\4\1\27\1\17\1\21\2\4\1\uffff\2\17\1\4\1\17"; + static final String dfa_3s = "\1\47\1\43\1\uffff\1\4\1\30\2\43\1\35\2\4\1\uffff\2\43\1\4\1\43"; + static final String dfa_4s = "\2\uffff\1\2\7\uffff\1\1\4\uffff"; + static final String dfa_5s = "\17\uffff}>"; + static final String[] dfa_6s = { + "\1\1\26\uffff\1\2\13\uffff\1\2", + "\1\4\13\uffff\1\3", + "", + "\1\5", + "\1\6\23\uffff\1\7", + "\1\4\13\uffff\1\3", + "\1\11\10\uffff\1\7\12\uffff\1\10", + "\1\2\13\uffff\1\12", + "\1\13", + "\1\14", + "", + "\1\11\10\uffff\1\7\12\uffff\1\10", + "\1\11\10\uffff\1\7\12\uffff\1\15", + "\1\16", + "\1\11\10\uffff\1\7\12\uffff\1\15" + }; + + static final short[] dfa_1 = DFA.unpackEncodedString(dfa_1s); + static final char[] dfa_2 = DFA.unpackEncodedStringToUnsignedChars(dfa_2s); + static final char[] dfa_3 = DFA.unpackEncodedStringToUnsignedChars(dfa_3s); + static final short[] dfa_4 = DFA.unpackEncodedString(dfa_4s); + static final short[] dfa_5 = DFA.unpackEncodedString(dfa_5s); + static final short[][] dfa_6 = unpackEncodedStringArray(dfa_6s); + + class DFA27 extends DFA { + + public DFA27(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 27; + this.eot = dfa_1; + this.eof = dfa_1; + this.min = dfa_2; + this.max = dfa_3; + this.accept = dfa_4; + this.special = dfa_5; + this.transition = dfa_6; + } + public String getDescription() { + return "918:3: ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) )"; + } + } + + + public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000008048601812L}); + public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000001000L}); + public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000000010L}); + public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x00000000000EA000L}); + public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000004010L}); + public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000028000L}); + public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000010010L}); + public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000018000L}); + public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x00000000000C0000L}); + public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000004000L}); + public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000000020L}); + public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000010000L}); + public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000000100002L}); + public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000000400010L}); + public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000000000800000L}); + public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000001000010L}); + public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000001008000L}); + public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x0000000002020000L}); + public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000008000010L}); + public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x0000000004020000L}); + public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000000000008002L}); + public static final BitSet FOLLOW_24 = new BitSet(new long[]{0x0000000010800000L}); + public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x0000000020000000L}); + public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000007000000000L}); + public static final BitSet FOLLOW_27 = new BitSet(new long[]{0x0000000000020000L}); + public static final BitSet FOLLOW_28 = new BitSet(new long[]{0x0000000180000000L}); + public static final BitSet FOLLOW_29 = new BitSet(new long[]{0x0000000200000000L}); + public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x0000000400000020L}); + public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000000800000002L}); + +} \ No newline at end of file diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/scoping/AbstractProblemScopeProvider.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/scoping/AbstractProblemScopeProvider.java new file mode 100644 index 00000000..5b024d47 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/scoping/AbstractProblemScopeProvider.java @@ -0,0 +1,9 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.scoping; + +import org.eclipse.xtext.scoping.impl.DelegatingScopeProvider; + +public abstract class AbstractProblemScopeProvider extends DelegatingScopeProvider { +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSemanticSequencer.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSemanticSequencer.java new file mode 100644 index 00000000..a857b997 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSemanticSequencer.java @@ -0,0 +1,296 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.serializer; + +import com.google.inject.Inject; +import java.util.Set; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.viatra.solver.language.model.problem.Assertion; +import org.eclipse.viatra.solver.language.model.problem.Atom; +import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; +import org.eclipse.viatra.solver.language.model.problem.Conjunction; +import org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity; +import org.eclipse.viatra.solver.language.model.problem.NegativeLiteral; +import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition; +import org.eclipse.viatra.solver.language.model.problem.Problem; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; +import org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity; +import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; +import org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration; +import org.eclipse.viatra.solver.language.model.problem.TypeScope; +import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; +import org.eclipse.xtext.Action; +import org.eclipse.xtext.Parameter; +import org.eclipse.xtext.ParserRule; +import org.eclipse.xtext.serializer.ISerializationContext; +import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; +import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer; +import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient; + +@SuppressWarnings("all") +public class ProblemSemanticSequencer extends AbstractDelegatingSemanticSequencer { + + @Inject + private ProblemGrammarAccess grammarAccess; + + @Override + public void sequence(ISerializationContext context, EObject semanticObject) { + EPackage epackage = semanticObject.eClass().getEPackage(); + ParserRule rule = context.getParserRule(); + Action action = context.getAssignedAction(); + Set parameters = context.getEnabledBooleanParameters(); + if (epackage == ProblemPackage.eINSTANCE) + switch (semanticObject.eClass().getClassifierID()) { + case ProblemPackage.ASSERTION: + sequence_Assertion(context, (Assertion) semanticObject); + return; + case ProblemPackage.ATOM: + sequence_Atom(context, (Atom) semanticObject); + return; + case ProblemPackage.CLASS_DECLARATION: + sequence_ClassDeclaration(context, (ClassDeclaration) semanticObject); + return; + case ProblemPackage.CONJUNCTION: + sequence_Conjunction(context, (Conjunction) semanticObject); + return; + case ProblemPackage.EXACT_MULTIPLICITY: + sequence_ExactMultiplicity(context, (ExactMultiplicity) semanticObject); + return; + case ProblemPackage.NEGATIVE_LITERAL: + sequence_NegativeLiteral(context, (NegativeLiteral) semanticObject); + return; + case ProblemPackage.PARAMETER: + sequence_Parameter(context, (org.eclipse.viatra.solver.language.model.problem.Parameter) semanticObject); + return; + case ProblemPackage.PREDICATE_DEFINITION: + sequence_PredicateDefinition(context, (PredicateDefinition) semanticObject); + return; + case ProblemPackage.PROBLEM: + sequence_Problem(context, (Problem) semanticObject); + return; + case ProblemPackage.RANGE_MULTIPLICITY: + sequence_RangeMultiplicity(context, (RangeMultiplicity) semanticObject); + return; + case ProblemPackage.REFERENCE_DECLARATION: + sequence_ReferenceDeclaration(context, (ReferenceDeclaration) semanticObject); + return; + case ProblemPackage.SCOPE_DECLARATION: + sequence_ScopeDeclaration(context, (ScopeDeclaration) semanticObject); + return; + case ProblemPackage.TYPE_SCOPE: + sequence_TypeScope(context, (TypeScope) semanticObject); + return; + } + if (errorAcceptor != null) + errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context)); + } + + /** + * Contexts: + * Statement returns Assertion + * Assertion returns Assertion + * + * Constraint: + * ( + * (relation=[Relation|QualifiedName] (arguments+=[Node|QualifiedName] arguments+=[Node|QualifiedName]*)? value=LogicValue) | + * (value=ShortLogicValue? relation=[Relation|QualifiedName] (arguments+=[Node|QualifiedName] arguments+=[Node|QualifiedName]*)?) + * ) + */ + protected void sequence_Assertion(ISerializationContext context, Assertion semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Literal returns Atom + * Atom returns Atom + * + * Constraint: + * (relation=[Relation|QualifiedName] transitiveClosure?='+'? (arguments+=[Variable|ID] arguments+=[Variable|ID]*)?) + */ + protected void sequence_Atom(ISerializationContext context, Atom semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Statement returns ClassDeclaration + * ClassDeclaration returns ClassDeclaration + * + * Constraint: + * ( + * abstract?='abstract'? + * name=ID + * ( + * superTypes+=[ClassDeclaration|ID] | + * (superTypes+=[ClassDeclaration|ID] superTypes+=[ClassDeclaration|ID]*) | + * referenceDeclarations+=ReferenceDeclaration + * )? + * referenceDeclarations+=ReferenceDeclaration* + * ) + */ + protected void sequence_ClassDeclaration(ISerializationContext context, ClassDeclaration semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Conjunction returns Conjunction + * + * Constraint: + * (literals+=Literal literals+=Literal*) + */ + protected void sequence_Conjunction(ISerializationContext context, Conjunction semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Multiplicity returns ExactMultiplicity + * ExactMultiplicity returns ExactMultiplicity + * + * Constraint: + * exactValue=INT + */ + protected void sequence_ExactMultiplicity(ISerializationContext context, ExactMultiplicity semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.EXACT_MULTIPLICITY__EXACT_VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.EXACT_MULTIPLICITY__EXACT_VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0(), semanticObject.getExactValue()); + feeder.finish(); + } + + + /** + * Contexts: + * Literal returns NegativeLiteral + * NegativeLiteral returns NegativeLiteral + * + * Constraint: + * atom=Atom + */ + protected void sequence_NegativeLiteral(ISerializationContext context, NegativeLiteral semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.NEGATIVE_LITERAL__ATOM) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.NEGATIVE_LITERAL__ATOM)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0(), semanticObject.getAtom()); + feeder.finish(); + } + + + /** + * Contexts: + * Parameter returns Parameter + * + * Constraint: + * (parameterType=[ClassDeclaration|ID] name=ID) + */ + protected void sequence_Parameter(ISerializationContext context, org.eclipse.viatra.solver.language.model.problem.Parameter semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.PARAMETER__PARAMETER_TYPE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.PARAMETER__PARAMETER_TYPE)); + if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.NAMED_ELEMENT__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.NAMED_ELEMENT__NAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getParameterAccess().getParameterTypeClassDeclarationIDTerminalRuleCall_0_0_1(), semanticObject.eGet(ProblemPackage.Literals.PARAMETER__PARAMETER_TYPE, false)); + feeder.accept(grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName()); + feeder.finish(); + } + + + /** + * Contexts: + * Statement returns PredicateDefinition + * PredicateDefinition returns PredicateDefinition + * + * Constraint: + * (error?='error'? name=ID (parameters+=Parameter parameters+=Parameter*)? (bodies+=Conjunction bodies+=Conjunction*)?) + */ + protected void sequence_PredicateDefinition(ISerializationContext context, PredicateDefinition semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Problem returns Problem + * + * Constraint: + * statements+=Statement+ + */ + protected void sequence_Problem(ISerializationContext context, Problem semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Multiplicity returns RangeMultiplicity + * RangeMultiplicity returns RangeMultiplicity + * + * Constraint: + * (lowerBound=INT upperBound=UpperBound) + */ + protected void sequence_RangeMultiplicity(ISerializationContext context, RangeMultiplicity semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.RANGE_MULTIPLICITY__LOWER_BOUND) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.RANGE_MULTIPLICITY__LOWER_BOUND)); + if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.RANGE_MULTIPLICITY__UPPER_BOUND) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.RANGE_MULTIPLICITY__UPPER_BOUND)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0(), semanticObject.getLowerBound()); + feeder.accept(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0(), semanticObject.getUpperBound()); + feeder.finish(); + } + + + /** + * Contexts: + * ReferenceDeclaration returns ReferenceDeclaration + * + * Constraint: + * (containment?='contains'? referenceType=[ClassDeclaration|ID] multiplicity=Multiplicity name=ID opposite=[ReferenceDeclaration|QualifiedName]?) + */ + protected void sequence_ReferenceDeclaration(ISerializationContext context, ReferenceDeclaration semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Statement returns ScopeDeclaration + * ScopeDeclaration returns ScopeDeclaration + * + * Constraint: + * (typeScopes+=TypeScope typeScopes+=TypeScope*) + */ + protected void sequence_ScopeDeclaration(ISerializationContext context, ScopeDeclaration semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * TypeScope returns TypeScope + * + * Constraint: + * (targetType=[ClassDeclaration|ID] increment?='+='? multiplicity=Multiplicity) + */ + protected void sequence_TypeScope(ISerializationContext context, TypeScope semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSyntacticSequencer.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSyntacticSequencer.java new file mode 100644 index 00000000..3ffb6315 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSyntacticSequencer.java @@ -0,0 +1,77 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.serializer; + +import com.google.inject.Inject; +import java.util.List; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.nodemodel.INode; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.GroupAlias; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; +import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; + +@SuppressWarnings("all") +public class ProblemSyntacticSequencer extends AbstractSyntacticSequencer { + + protected ProblemGrammarAccess grammarAccess; + protected AbstractElementAlias match_ClassDeclaration___ExtendsKeyword_3_0_0_LeftSquareBracketKeyword_3_0_1_1_0_RightSquareBracketKeyword_3_0_1_1_2__q; + protected AbstractElementAlias match_PredicateDefinition_PredKeyword_0_0_1_q; + + @Inject + protected void init(IGrammarAccess access) { + grammarAccess = (ProblemGrammarAccess) access; + match_ClassDeclaration___ExtendsKeyword_3_0_0_LeftSquareBracketKeyword_3_0_1_1_0_RightSquareBracketKeyword_3_0_1_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0_0()), new TokenAlias(false, false, grammarAccess.getClassDeclarationAccess().getLeftSquareBracketKeyword_3_0_1_1_0()), new TokenAlias(false, false, grammarAccess.getClassDeclarationAccess().getRightSquareBracketKeyword_3_0_1_1_2())); + match_PredicateDefinition_PredKeyword_0_0_1_q = new TokenAlias(false, true, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); + } + + @Override + protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { + return ""; + } + + + @Override + protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { + if (transition.getAmbiguousSyntaxes().isEmpty()) return; + List transitionNodes = collectNodes(fromNode, toNode); + for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { + List syntaxNodes = getNodesFor(transitionNodes, syntax); + if (match_ClassDeclaration___ExtendsKeyword_3_0_0_LeftSquareBracketKeyword_3_0_1_1_0_RightSquareBracketKeyword_3_0_1_1_2__q.equals(syntax)) + emit_ClassDeclaration___ExtendsKeyword_3_0_0_LeftSquareBracketKeyword_3_0_1_1_0_RightSquareBracketKeyword_3_0_1_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_PredicateDefinition_PredKeyword_0_0_1_q.equals(syntax)) + emit_PredicateDefinition_PredKeyword_0_0_1_q(semanticObject, getLastNavigableState(), syntaxNodes); + else acceptNodes(getLastNavigableState(), syntaxNodes); + } + } + + /** + * Ambiguous syntax: + * ('extends' '[' ']')? + * + * This ambiguous syntax occurs at: + * name=ID (ambiguity) ',' referenceDeclarations+=ReferenceDeclaration + * name=ID (ambiguity) '.' (rule end) + */ + protected void emit_ClassDeclaration___ExtendsKeyword_3_0_0_LeftSquareBracketKeyword_3_0_1_1_0_RightSquareBracketKeyword_3_0_1_1_2__q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * 'pred'? + * + * This ambiguous syntax occurs at: + * error?='error' (ambiguity) name=ID + */ + protected void emit_PredicateDefinition_PredKeyword_0_0_1_q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/services/ProblemGrammarAccess.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/services/ProblemGrammarAccess.java new file mode 100644 index 00000000..7d6b7013 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/services/ProblemGrammarAccess.java @@ -0,0 +1,1411 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.services; + +import com.google.inject.Inject; +import com.google.inject.Singleton; +import java.util.List; +import org.eclipse.xtext.Alternatives; +import org.eclipse.xtext.Assignment; +import org.eclipse.xtext.CrossReference; +import org.eclipse.xtext.EnumLiteralDeclaration; +import org.eclipse.xtext.EnumRule; +import org.eclipse.xtext.Grammar; +import org.eclipse.xtext.GrammarUtil; +import org.eclipse.xtext.Group; +import org.eclipse.xtext.Keyword; +import org.eclipse.xtext.ParserRule; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.TerminalRule; +import org.eclipse.xtext.common.services.TerminalsGrammarAccess; +import org.eclipse.xtext.service.AbstractElementFinder; +import org.eclipse.xtext.service.GrammarProvider; + +@Singleton +public class ProblemGrammarAccess extends AbstractElementFinder.AbstractGrammarElementFinder { + + public class ProblemElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.Problem"); + private final Assignment cStatementsAssignment = (Assignment)rule.eContents().get(1); + private final RuleCall cStatementsStatementParserRuleCall_0 = (RuleCall)cStatementsAssignment.eContents().get(0); + + //Problem: + // statements+=Statement*; + @Override public ParserRule getRule() { return rule; } + + //statements+=Statement* + public Assignment getStatementsAssignment() { return cStatementsAssignment; } + + //Statement + public RuleCall getStatementsStatementParserRuleCall_0() { return cStatementsStatementParserRuleCall_0; } + } + public class StatementElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.Statement"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cClassDeclarationParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cPredicateDefinitionParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + private final RuleCall cAssertionParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); + private final RuleCall cScopeDeclarationParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3); + + //Statement: + // ClassDeclaration | PredicateDefinition | Assertion | ScopeDeclaration; + @Override public ParserRule getRule() { return rule; } + + //ClassDeclaration | PredicateDefinition | Assertion | ScopeDeclaration + public Alternatives getAlternatives() { return cAlternatives; } + + //ClassDeclaration + public RuleCall getClassDeclarationParserRuleCall_0() { return cClassDeclarationParserRuleCall_0; } + + //PredicateDefinition + public RuleCall getPredicateDefinitionParserRuleCall_1() { return cPredicateDefinitionParserRuleCall_1; } + + //Assertion + public RuleCall getAssertionParserRuleCall_2() { return cAssertionParserRuleCall_2; } + + //ScopeDeclaration + public RuleCall getScopeDeclarationParserRuleCall_3() { return cScopeDeclarationParserRuleCall_3; } + } + public class ClassDeclarationElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.ClassDeclaration"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cAbstractAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final Keyword cAbstractAbstractKeyword_0_0 = (Keyword)cAbstractAssignment_0.eContents().get(0); + private final Keyword cClassKeyword_1 = (Keyword)cGroup.eContents().get(1); + private final Assignment cNameAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cNameIDTerminalRuleCall_2_0 = (RuleCall)cNameAssignment_2.eContents().get(0); + private final Alternatives cAlternatives_3 = (Alternatives)cGroup.eContents().get(3); + private final Group cGroup_3_0 = (Group)cAlternatives_3.eContents().get(0); + private final Keyword cExtendsKeyword_3_0_0 = (Keyword)cGroup_3_0.eContents().get(0); + private final Alternatives cAlternatives_3_0_1 = (Alternatives)cGroup_3_0.eContents().get(1); + private final Assignment cSuperTypesAssignment_3_0_1_0 = (Assignment)cAlternatives_3_0_1.eContents().get(0); + private final CrossReference cSuperTypesClassDeclarationCrossReference_3_0_1_0_0 = (CrossReference)cSuperTypesAssignment_3_0_1_0.eContents().get(0); + private final RuleCall cSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_0_0_1 = (RuleCall)cSuperTypesClassDeclarationCrossReference_3_0_1_0_0.eContents().get(1); + private final Group cGroup_3_0_1_1 = (Group)cAlternatives_3_0_1.eContents().get(1); + private final Keyword cLeftSquareBracketKeyword_3_0_1_1_0 = (Keyword)cGroup_3_0_1_1.eContents().get(0); + private final Group cGroup_3_0_1_1_1 = (Group)cGroup_3_0_1_1.eContents().get(1); + private final Assignment cSuperTypesAssignment_3_0_1_1_1_0 = (Assignment)cGroup_3_0_1_1_1.eContents().get(0); + private final CrossReference cSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0 = (CrossReference)cSuperTypesAssignment_3_0_1_1_1_0.eContents().get(0); + private final RuleCall cSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_0_0_1 = (RuleCall)cSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0.eContents().get(1); + private final Group cGroup_3_0_1_1_1_1 = (Group)cGroup_3_0_1_1_1.eContents().get(1); + private final Keyword cCommaKeyword_3_0_1_1_1_1_0 = (Keyword)cGroup_3_0_1_1_1_1.eContents().get(0); + private final Assignment cSuperTypesAssignment_3_0_1_1_1_1_1 = (Assignment)cGroup_3_0_1_1_1_1.eContents().get(1); + private final CrossReference cSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0 = (CrossReference)cSuperTypesAssignment_3_0_1_1_1_1_1.eContents().get(0); + private final RuleCall cSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_1_1_0_1 = (RuleCall)cSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0.eContents().get(1); + private final Keyword cRightSquareBracketKeyword_3_0_1_1_2 = (Keyword)cGroup_3_0_1_1.eContents().get(2); + private final Assignment cReferenceDeclarationsAssignment_3_1 = (Assignment)cAlternatives_3.eContents().get(1); + private final RuleCall cReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0 = (RuleCall)cReferenceDeclarationsAssignment_3_1.eContents().get(0); + private final Group cGroup_4 = (Group)cGroup.eContents().get(4); + private final Keyword cCommaKeyword_4_0 = (Keyword)cGroup_4.eContents().get(0); + private final Assignment cReferenceDeclarationsAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1); + private final RuleCall cReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0 = (RuleCall)cReferenceDeclarationsAssignment_4_1.eContents().get(0); + private final Keyword cFullStopKeyword_5 = (Keyword)cGroup.eContents().get(5); + + //ClassDeclaration: + // abstract?="abstract"? "class" + // name=ID + // ("extends" (superTypes+=[ClassDeclaration] | + // "[" (superTypes+=[ClassDeclaration] ("," superTypes+=[ClassDeclaration])*)? "]") | + // referenceDeclarations+=ReferenceDeclaration)? + // ("," referenceDeclarations+=ReferenceDeclaration)* + // "."; + @Override public ParserRule getRule() { return rule; } + + //abstract?="abstract"? "class" + //name=ID + //("extends" (superTypes+=[ClassDeclaration] | + //"[" (superTypes+=[ClassDeclaration] ("," superTypes+=[ClassDeclaration])*)? "]") | + //referenceDeclarations+=ReferenceDeclaration)? + //("," referenceDeclarations+=ReferenceDeclaration)* + //"." + public Group getGroup() { return cGroup; } + + //abstract?="abstract"? + public Assignment getAbstractAssignment_0() { return cAbstractAssignment_0; } + + //"abstract" + public Keyword getAbstractAbstractKeyword_0_0() { return cAbstractAbstractKeyword_0_0; } + + //"class" + public Keyword getClassKeyword_1() { return cClassKeyword_1; } + + //name=ID + public Assignment getNameAssignment_2() { return cNameAssignment_2; } + + //ID + public RuleCall getNameIDTerminalRuleCall_2_0() { return cNameIDTerminalRuleCall_2_0; } + + //("extends" (superTypes+=[ClassDeclaration] | + //"[" (superTypes+=[ClassDeclaration] ("," superTypes+=[ClassDeclaration])*)? "]") | + //referenceDeclarations+=ReferenceDeclaration)? + public Alternatives getAlternatives_3() { return cAlternatives_3; } + + //"extends" (superTypes+=[ClassDeclaration] | + // "[" (superTypes+=[ClassDeclaration] ("," superTypes+=[ClassDeclaration])*)? "]") + public Group getGroup_3_0() { return cGroup_3_0; } + + //"extends" + public Keyword getExtendsKeyword_3_0_0() { return cExtendsKeyword_3_0_0; } + + //(superTypes+=[ClassDeclaration] | + // "[" (superTypes+=[ClassDeclaration] ("," superTypes+=[ClassDeclaration])*)? "]") + public Alternatives getAlternatives_3_0_1() { return cAlternatives_3_0_1; } + + //superTypes+=[ClassDeclaration] + public Assignment getSuperTypesAssignment_3_0_1_0() { return cSuperTypesAssignment_3_0_1_0; } + + //[ClassDeclaration] + public CrossReference getSuperTypesClassDeclarationCrossReference_3_0_1_0_0() { return cSuperTypesClassDeclarationCrossReference_3_0_1_0_0; } + + //ID + public RuleCall getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_0_0_1() { return cSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_0_0_1; } + + //"[" (superTypes+=[ClassDeclaration] ("," superTypes+=[ClassDeclaration])*)? "]" + public Group getGroup_3_0_1_1() { return cGroup_3_0_1_1; } + + //"[" + public Keyword getLeftSquareBracketKeyword_3_0_1_1_0() { return cLeftSquareBracketKeyword_3_0_1_1_0; } + + //(superTypes+=[ClassDeclaration] ("," superTypes+=[ClassDeclaration])*)? + public Group getGroup_3_0_1_1_1() { return cGroup_3_0_1_1_1; } + + //superTypes+=[ClassDeclaration] + public Assignment getSuperTypesAssignment_3_0_1_1_1_0() { return cSuperTypesAssignment_3_0_1_1_1_0; } + + //[ClassDeclaration] + public CrossReference getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0() { return cSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0; } + + //ID + public RuleCall getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_0_0_1() { return cSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_0_0_1; } + + //("," superTypes+=[ClassDeclaration])* + public Group getGroup_3_0_1_1_1_1() { return cGroup_3_0_1_1_1_1; } + + //"," + public Keyword getCommaKeyword_3_0_1_1_1_1_0() { return cCommaKeyword_3_0_1_1_1_1_0; } + + //superTypes+=[ClassDeclaration] + public Assignment getSuperTypesAssignment_3_0_1_1_1_1_1() { return cSuperTypesAssignment_3_0_1_1_1_1_1; } + + //[ClassDeclaration] + public CrossReference getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0() { return cSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0; } + + //ID + public RuleCall getSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_1_1_0_1() { return cSuperTypesClassDeclarationIDTerminalRuleCall_3_0_1_1_1_1_1_0_1; } + + //"]" + public Keyword getRightSquareBracketKeyword_3_0_1_1_2() { return cRightSquareBracketKeyword_3_0_1_1_2; } + + //referenceDeclarations+=ReferenceDeclaration + public Assignment getReferenceDeclarationsAssignment_3_1() { return cReferenceDeclarationsAssignment_3_1; } + + //ReferenceDeclaration + public RuleCall getReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0() { return cReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0; } + + //("," referenceDeclarations+=ReferenceDeclaration)* + public Group getGroup_4() { return cGroup_4; } + + //"," + public Keyword getCommaKeyword_4_0() { return cCommaKeyword_4_0; } + + //referenceDeclarations+=ReferenceDeclaration + public Assignment getReferenceDeclarationsAssignment_4_1() { return cReferenceDeclarationsAssignment_4_1; } + + //ReferenceDeclaration + public RuleCall getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0() { return cReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0; } + + //"." + public Keyword getFullStopKeyword_5() { return cFullStopKeyword_5; } + } + public class ReferenceDeclarationElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0); + private final Assignment cContainmentAssignment_0_0 = (Assignment)cAlternatives_0.eContents().get(0); + private final Keyword cContainmentContainsKeyword_0_0_0 = (Keyword)cContainmentAssignment_0_0.eContents().get(0); + private final Keyword cRefersKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1); + private final Assignment cReferenceTypeAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final CrossReference cReferenceTypeClassDeclarationCrossReference_1_0 = (CrossReference)cReferenceTypeAssignment_1.eContents().get(0); + private final RuleCall cReferenceTypeClassDeclarationIDTerminalRuleCall_1_0_1 = (RuleCall)cReferenceTypeClassDeclarationCrossReference_1_0.eContents().get(1); + private final Keyword cLeftSquareBracketKeyword_2 = (Keyword)cGroup.eContents().get(2); + private final Assignment cMultiplicityAssignment_3 = (Assignment)cGroup.eContents().get(3); + private final RuleCall cMultiplicityMultiplicityParserRuleCall_3_0 = (RuleCall)cMultiplicityAssignment_3.eContents().get(0); + private final Keyword cRightSquareBracketKeyword_4 = (Keyword)cGroup.eContents().get(4); + private final Assignment cNameAssignment_5 = (Assignment)cGroup.eContents().get(5); + private final RuleCall cNameIDTerminalRuleCall_5_0 = (RuleCall)cNameAssignment_5.eContents().get(0); + private final Group cGroup_6 = (Group)cGroup.eContents().get(6); + private final Keyword cOppositeKeyword_6_0 = (Keyword)cGroup_6.eContents().get(0); + private final Assignment cOppositeAssignment_6_1 = (Assignment)cGroup_6.eContents().get(1); + private final CrossReference cOppositeReferenceDeclarationCrossReference_6_1_0 = (CrossReference)cOppositeAssignment_6_1.eContents().get(0); + private final RuleCall cOppositeReferenceDeclarationQualifiedNameParserRuleCall_6_1_0_1 = (RuleCall)cOppositeReferenceDeclarationCrossReference_6_1_0.eContents().get(1); + + //ReferenceDeclaration: + // (containment?="contains" | "refers") + // referenceType=[ClassDeclaration] + // "[" multiplicity=Multiplicity "]" + // name=ID + // ("opposite" opposite=[ReferenceDeclaration|QualifiedName])?; + @Override public ParserRule getRule() { return rule; } + + //(containment?="contains" | "refers") + //referenceType=[ClassDeclaration] + //"[" multiplicity=Multiplicity "]" + //name=ID + //("opposite" opposite=[ReferenceDeclaration|QualifiedName])? + public Group getGroup() { return cGroup; } + + //(containment?="contains" | "refers") + public Alternatives getAlternatives_0() { return cAlternatives_0; } + + //containment?="contains" + public Assignment getContainmentAssignment_0_0() { return cContainmentAssignment_0_0; } + + //"contains" + public Keyword getContainmentContainsKeyword_0_0_0() { return cContainmentContainsKeyword_0_0_0; } + + //"refers" + public Keyword getRefersKeyword_0_1() { return cRefersKeyword_0_1; } + + //referenceType=[ClassDeclaration] + public Assignment getReferenceTypeAssignment_1() { return cReferenceTypeAssignment_1; } + + //[ClassDeclaration] + public CrossReference getReferenceTypeClassDeclarationCrossReference_1_0() { return cReferenceTypeClassDeclarationCrossReference_1_0; } + + //ID + public RuleCall getReferenceTypeClassDeclarationIDTerminalRuleCall_1_0_1() { return cReferenceTypeClassDeclarationIDTerminalRuleCall_1_0_1; } + + //"[" + public Keyword getLeftSquareBracketKeyword_2() { return cLeftSquareBracketKeyword_2; } + + //multiplicity=Multiplicity + public Assignment getMultiplicityAssignment_3() { return cMultiplicityAssignment_3; } + + //Multiplicity + public RuleCall getMultiplicityMultiplicityParserRuleCall_3_0() { return cMultiplicityMultiplicityParserRuleCall_3_0; } + + //"]" + public Keyword getRightSquareBracketKeyword_4() { return cRightSquareBracketKeyword_4; } + + //name=ID + public Assignment getNameAssignment_5() { return cNameAssignment_5; } + + //ID + public RuleCall getNameIDTerminalRuleCall_5_0() { return cNameIDTerminalRuleCall_5_0; } + + //("opposite" opposite=[ReferenceDeclaration|QualifiedName])? + public Group getGroup_6() { return cGroup_6; } + + //"opposite" + public Keyword getOppositeKeyword_6_0() { return cOppositeKeyword_6_0; } + + //opposite=[ReferenceDeclaration|QualifiedName] + public Assignment getOppositeAssignment_6_1() { return cOppositeAssignment_6_1; } + + //[ReferenceDeclaration|QualifiedName] + public CrossReference getOppositeReferenceDeclarationCrossReference_6_1_0() { return cOppositeReferenceDeclarationCrossReference_6_1_0; } + + //QualifiedName + public RuleCall getOppositeReferenceDeclarationQualifiedNameParserRuleCall_6_1_0_1() { return cOppositeReferenceDeclarationQualifiedNameParserRuleCall_6_1_0_1; } + } + public class PredicateDefinitionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.PredicateDefinition"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0); + private final Group cGroup_0_0 = (Group)cAlternatives_0.eContents().get(0); + private final Assignment cErrorAssignment_0_0_0 = (Assignment)cGroup_0_0.eContents().get(0); + private final Keyword cErrorErrorKeyword_0_0_0_0 = (Keyword)cErrorAssignment_0_0_0.eContents().get(0); + private final Keyword cPredKeyword_0_0_1 = (Keyword)cGroup_0_0.eContents().get(1); + private final Keyword cPredKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1); + private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0); + private final Keyword cLeftParenthesisKeyword_2 = (Keyword)cGroup.eContents().get(2); + private final Group cGroup_3 = (Group)cGroup.eContents().get(3); + private final Assignment cParametersAssignment_3_0 = (Assignment)cGroup_3.eContents().get(0); + private final RuleCall cParametersParameterParserRuleCall_3_0_0 = (RuleCall)cParametersAssignment_3_0.eContents().get(0); + private final Group cGroup_3_1 = (Group)cGroup_3.eContents().get(1); + private final Keyword cCommaKeyword_3_1_0 = (Keyword)cGroup_3_1.eContents().get(0); + private final Assignment cParametersAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1); + private final RuleCall cParametersParameterParserRuleCall_3_1_1_0 = (RuleCall)cParametersAssignment_3_1_1.eContents().get(0); + private final Keyword cRightParenthesisKeyword_4 = (Keyword)cGroup.eContents().get(4); + private final Group cGroup_5 = (Group)cGroup.eContents().get(5); + private final Keyword cColonEqualsSignKeyword_5_0 = (Keyword)cGroup_5.eContents().get(0); + private final Assignment cBodiesAssignment_5_1 = (Assignment)cGroup_5.eContents().get(1); + private final RuleCall cBodiesConjunctionParserRuleCall_5_1_0 = (RuleCall)cBodiesAssignment_5_1.eContents().get(0); + private final Group cGroup_5_2 = (Group)cGroup_5.eContents().get(2); + private final Keyword cSemicolonKeyword_5_2_0 = (Keyword)cGroup_5_2.eContents().get(0); + private final Assignment cBodiesAssignment_5_2_1 = (Assignment)cGroup_5_2.eContents().get(1); + private final RuleCall cBodiesConjunctionParserRuleCall_5_2_1_0 = (RuleCall)cBodiesAssignment_5_2_1.eContents().get(0); + private final Keyword cFullStopKeyword_6 = (Keyword)cGroup.eContents().get(6); + + //PredicateDefinition: + // (error?="error" "pred"? | "pred") + // name=ID + // "(" (parameters+=Parameter ("," parameters+=Parameter)*)? ")" + // (":=" bodies+=Conjunction (";" bodies+=Conjunction)*)? + // "."; + @Override public ParserRule getRule() { return rule; } + + //(error?="error" "pred"? | "pred") + //name=ID + //"(" (parameters+=Parameter ("," parameters+=Parameter)*)? ")" + //(":=" bodies+=Conjunction (";" bodies+=Conjunction)*)? + //"." + public Group getGroup() { return cGroup; } + + //(error?="error" "pred"? | "pred") + public Alternatives getAlternatives_0() { return cAlternatives_0; } + + //error?="error" "pred"? + public Group getGroup_0_0() { return cGroup_0_0; } + + //error?="error" + public Assignment getErrorAssignment_0_0_0() { return cErrorAssignment_0_0_0; } + + //"error" + public Keyword getErrorErrorKeyword_0_0_0_0() { return cErrorErrorKeyword_0_0_0_0; } + + //"pred"? + public Keyword getPredKeyword_0_0_1() { return cPredKeyword_0_0_1; } + + //"pred" + public Keyword getPredKeyword_0_1() { return cPredKeyword_0_1; } + + //name=ID + public Assignment getNameAssignment_1() { return cNameAssignment_1; } + + //ID + public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; } + + //"(" + public Keyword getLeftParenthesisKeyword_2() { return cLeftParenthesisKeyword_2; } + + //(parameters+=Parameter ("," parameters+=Parameter)*)? + public Group getGroup_3() { return cGroup_3; } + + //parameters+=Parameter + public Assignment getParametersAssignment_3_0() { return cParametersAssignment_3_0; } + + //Parameter + public RuleCall getParametersParameterParserRuleCall_3_0_0() { return cParametersParameterParserRuleCall_3_0_0; } + + //("," parameters+=Parameter)* + public Group getGroup_3_1() { return cGroup_3_1; } + + //"," + public Keyword getCommaKeyword_3_1_0() { return cCommaKeyword_3_1_0; } + + //parameters+=Parameter + public Assignment getParametersAssignment_3_1_1() { return cParametersAssignment_3_1_1; } + + //Parameter + public RuleCall getParametersParameterParserRuleCall_3_1_1_0() { return cParametersParameterParserRuleCall_3_1_1_0; } + + //")" + public Keyword getRightParenthesisKeyword_4() { return cRightParenthesisKeyword_4; } + + //(":=" bodies+=Conjunction (";" bodies+=Conjunction)*)? + public Group getGroup_5() { return cGroup_5; } + + //":=" + public Keyword getColonEqualsSignKeyword_5_0() { return cColonEqualsSignKeyword_5_0; } + + //bodies+=Conjunction + public Assignment getBodiesAssignment_5_1() { return cBodiesAssignment_5_1; } + + //Conjunction + public RuleCall getBodiesConjunctionParserRuleCall_5_1_0() { return cBodiesConjunctionParserRuleCall_5_1_0; } + + //(";" bodies+=Conjunction)* + public Group getGroup_5_2() { return cGroup_5_2; } + + //";" + public Keyword getSemicolonKeyword_5_2_0() { return cSemicolonKeyword_5_2_0; } + + //bodies+=Conjunction + public Assignment getBodiesAssignment_5_2_1() { return cBodiesAssignment_5_2_1; } + + //Conjunction + public RuleCall getBodiesConjunctionParserRuleCall_5_2_1_0() { return cBodiesConjunctionParserRuleCall_5_2_1_0; } + + //"." + public Keyword getFullStopKeyword_6() { return cFullStopKeyword_6; } + } + public class ParameterElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.Parameter"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cParameterTypeAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final CrossReference cParameterTypeClassDeclarationCrossReference_0_0 = (CrossReference)cParameterTypeAssignment_0.eContents().get(0); + private final RuleCall cParameterTypeClassDeclarationIDTerminalRuleCall_0_0_1 = (RuleCall)cParameterTypeClassDeclarationCrossReference_0_0.eContents().get(1); + private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0); + + //Parameter: + // parameterType=[ClassDeclaration] name=ID; + @Override public ParserRule getRule() { return rule; } + + //parameterType=[ClassDeclaration] name=ID + public Group getGroup() { return cGroup; } + + //parameterType=[ClassDeclaration] + public Assignment getParameterTypeAssignment_0() { return cParameterTypeAssignment_0; } + + //[ClassDeclaration] + public CrossReference getParameterTypeClassDeclarationCrossReference_0_0() { return cParameterTypeClassDeclarationCrossReference_0_0; } + + //ID + public RuleCall getParameterTypeClassDeclarationIDTerminalRuleCall_0_0_1() { return cParameterTypeClassDeclarationIDTerminalRuleCall_0_0_1; } + + //name=ID + public Assignment getNameAssignment_1() { return cNameAssignment_1; } + + //ID + public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; } + } + public class ConjunctionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.Conjunction"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cLiteralsAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cLiteralsLiteralParserRuleCall_0_0 = (RuleCall)cLiteralsAssignment_0.eContents().get(0); + private final Group cGroup_1 = (Group)cGroup.eContents().get(1); + private final Keyword cCommaKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0); + private final Assignment cLiteralsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); + private final RuleCall cLiteralsLiteralParserRuleCall_1_1_0 = (RuleCall)cLiteralsAssignment_1_1.eContents().get(0); + + //Conjunction: + // literals+=Literal ("," literals+=Literal)*; + @Override public ParserRule getRule() { return rule; } + + //literals+=Literal ("," literals+=Literal)* + public Group getGroup() { return cGroup; } + + //literals+=Literal + public Assignment getLiteralsAssignment_0() { return cLiteralsAssignment_0; } + + //Literal + public RuleCall getLiteralsLiteralParserRuleCall_0_0() { return cLiteralsLiteralParserRuleCall_0_0; } + + //("," literals+=Literal)* + public Group getGroup_1() { return cGroup_1; } + + //"," + public Keyword getCommaKeyword_1_0() { return cCommaKeyword_1_0; } + + //literals+=Literal + public Assignment getLiteralsAssignment_1_1() { return cLiteralsAssignment_1_1; } + + //Literal + public RuleCall getLiteralsLiteralParserRuleCall_1_1_0() { return cLiteralsLiteralParserRuleCall_1_1_0; } + } + public class LiteralElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.Literal"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cAtomParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cNegativeLiteralParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //Literal: + // Atom | NegativeLiteral; + @Override public ParserRule getRule() { return rule; } + + //Atom | NegativeLiteral + public Alternatives getAlternatives() { return cAlternatives; } + + //Atom + public RuleCall getAtomParserRuleCall_0() { return cAtomParserRuleCall_0; } + + //NegativeLiteral + public RuleCall getNegativeLiteralParserRuleCall_1() { return cNegativeLiteralParserRuleCall_1; } + } + public class NegativeLiteralElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.NegativeLiteral"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cExclamationMarkKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cAtomAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cAtomAtomParserRuleCall_1_0 = (RuleCall)cAtomAssignment_1.eContents().get(0); + + //NegativeLiteral: + // "!" atom=Atom; + @Override public ParserRule getRule() { return rule; } + + //"!" atom=Atom + public Group getGroup() { return cGroup; } + + //"!" + public Keyword getExclamationMarkKeyword_0() { return cExclamationMarkKeyword_0; } + + //atom=Atom + public Assignment getAtomAssignment_1() { return cAtomAssignment_1; } + + //Atom + public RuleCall getAtomAtomParserRuleCall_1_0() { return cAtomAtomParserRuleCall_1_0; } + } + public class AtomElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.Atom"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cRelationAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final CrossReference cRelationRelationCrossReference_0_0 = (CrossReference)cRelationAssignment_0.eContents().get(0); + private final RuleCall cRelationRelationQualifiedNameParserRuleCall_0_0_1 = (RuleCall)cRelationRelationCrossReference_0_0.eContents().get(1); + private final Assignment cTransitiveClosureAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final Keyword cTransitiveClosurePlusSignKeyword_1_0 = (Keyword)cTransitiveClosureAssignment_1.eContents().get(0); + private final Keyword cLeftParenthesisKeyword_2 = (Keyword)cGroup.eContents().get(2); + private final Group cGroup_3 = (Group)cGroup.eContents().get(3); + private final Assignment cArgumentsAssignment_3_0 = (Assignment)cGroup_3.eContents().get(0); + private final CrossReference cArgumentsVariableCrossReference_3_0_0 = (CrossReference)cArgumentsAssignment_3_0.eContents().get(0); + private final RuleCall cArgumentsVariableIDTerminalRuleCall_3_0_0_1 = (RuleCall)cArgumentsVariableCrossReference_3_0_0.eContents().get(1); + private final Group cGroup_3_1 = (Group)cGroup_3.eContents().get(1); + private final Keyword cCommaKeyword_3_1_0 = (Keyword)cGroup_3_1.eContents().get(0); + private final Assignment cArgumentsAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1); + private final CrossReference cArgumentsVariableCrossReference_3_1_1_0 = (CrossReference)cArgumentsAssignment_3_1_1.eContents().get(0); + private final RuleCall cArgumentsVariableIDTerminalRuleCall_3_1_1_0_1 = (RuleCall)cArgumentsVariableCrossReference_3_1_1_0.eContents().get(1); + private final Keyword cRightParenthesisKeyword_4 = (Keyword)cGroup.eContents().get(4); + + //Atom: + // relation=[Relation|QualifiedName] + // transitiveClosure?="+"? + // "(" (arguments+=[Variable] ("," arguments+=[Variable])*)? ")"; + @Override public ParserRule getRule() { return rule; } + + //relation=[Relation|QualifiedName] + //transitiveClosure?="+"? + //"(" (arguments+=[Variable] ("," arguments+=[Variable])*)? ")" + public Group getGroup() { return cGroup; } + + //relation=[Relation|QualifiedName] + public Assignment getRelationAssignment_0() { return cRelationAssignment_0; } + + //[Relation|QualifiedName] + public CrossReference getRelationRelationCrossReference_0_0() { return cRelationRelationCrossReference_0_0; } + + //QualifiedName + public RuleCall getRelationRelationQualifiedNameParserRuleCall_0_0_1() { return cRelationRelationQualifiedNameParserRuleCall_0_0_1; } + + //transitiveClosure?="+"? + public Assignment getTransitiveClosureAssignment_1() { return cTransitiveClosureAssignment_1; } + + //"+" + public Keyword getTransitiveClosurePlusSignKeyword_1_0() { return cTransitiveClosurePlusSignKeyword_1_0; } + + //"(" + public Keyword getLeftParenthesisKeyword_2() { return cLeftParenthesisKeyword_2; } + + //(arguments+=[Variable] ("," arguments+=[Variable])*)? + public Group getGroup_3() { return cGroup_3; } + + //arguments+=[Variable] + public Assignment getArgumentsAssignment_3_0() { return cArgumentsAssignment_3_0; } + + //[Variable] + public CrossReference getArgumentsVariableCrossReference_3_0_0() { return cArgumentsVariableCrossReference_3_0_0; } + + //ID + public RuleCall getArgumentsVariableIDTerminalRuleCall_3_0_0_1() { return cArgumentsVariableIDTerminalRuleCall_3_0_0_1; } + + //("," arguments+=[Variable])* + public Group getGroup_3_1() { return cGroup_3_1; } + + //"," + public Keyword getCommaKeyword_3_1_0() { return cCommaKeyword_3_1_0; } + + //arguments+=[Variable] + public Assignment getArgumentsAssignment_3_1_1() { return cArgumentsAssignment_3_1_1; } + + //[Variable] + public CrossReference getArgumentsVariableCrossReference_3_1_1_0() { return cArgumentsVariableCrossReference_3_1_1_0; } + + //ID + public RuleCall getArgumentsVariableIDTerminalRuleCall_3_1_1_0_1() { return cArgumentsVariableIDTerminalRuleCall_3_1_1_0_1; } + + //")" + public Keyword getRightParenthesisKeyword_4() { return cRightParenthesisKeyword_4; } + } + public class AssertionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.Assertion"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0); + private final Group cGroup_0_0 = (Group)cAlternatives_0.eContents().get(0); + private final Assignment cRelationAssignment_0_0_0 = (Assignment)cGroup_0_0.eContents().get(0); + private final CrossReference cRelationRelationCrossReference_0_0_0_0 = (CrossReference)cRelationAssignment_0_0_0.eContents().get(0); + private final RuleCall cRelationRelationQualifiedNameParserRuleCall_0_0_0_0_1 = (RuleCall)cRelationRelationCrossReference_0_0_0_0.eContents().get(1); + private final Keyword cLeftParenthesisKeyword_0_0_1 = (Keyword)cGroup_0_0.eContents().get(1); + private final Group cGroup_0_0_2 = (Group)cGroup_0_0.eContents().get(2); + private final Assignment cArgumentsAssignment_0_0_2_0 = (Assignment)cGroup_0_0_2.eContents().get(0); + private final CrossReference cArgumentsNodeCrossReference_0_0_2_0_0 = (CrossReference)cArgumentsAssignment_0_0_2_0.eContents().get(0); + private final RuleCall cArgumentsNodeQualifiedNameParserRuleCall_0_0_2_0_0_1 = (RuleCall)cArgumentsNodeCrossReference_0_0_2_0_0.eContents().get(1); + private final Group cGroup_0_0_2_1 = (Group)cGroup_0_0_2.eContents().get(1); + private final Keyword cCommaKeyword_0_0_2_1_0 = (Keyword)cGroup_0_0_2_1.eContents().get(0); + private final Assignment cArgumentsAssignment_0_0_2_1_1 = (Assignment)cGroup_0_0_2_1.eContents().get(1); + private final CrossReference cArgumentsNodeCrossReference_0_0_2_1_1_0 = (CrossReference)cArgumentsAssignment_0_0_2_1_1.eContents().get(0); + private final RuleCall cArgumentsNodeQualifiedNameParserRuleCall_0_0_2_1_1_0_1 = (RuleCall)cArgumentsNodeCrossReference_0_0_2_1_1_0.eContents().get(1); + private final Keyword cRightParenthesisKeyword_0_0_3 = (Keyword)cGroup_0_0.eContents().get(3); + private final Keyword cColonKeyword_0_0_4 = (Keyword)cGroup_0_0.eContents().get(4); + private final Assignment cValueAssignment_0_0_5 = (Assignment)cGroup_0_0.eContents().get(5); + private final RuleCall cValueLogicValueEnumRuleCall_0_0_5_0 = (RuleCall)cValueAssignment_0_0_5.eContents().get(0); + private final Group cGroup_0_1 = (Group)cAlternatives_0.eContents().get(1); + private final Assignment cValueAssignment_0_1_0 = (Assignment)cGroup_0_1.eContents().get(0); + private final RuleCall cValueShortLogicValueEnumRuleCall_0_1_0_0 = (RuleCall)cValueAssignment_0_1_0.eContents().get(0); + private final Assignment cRelationAssignment_0_1_1 = (Assignment)cGroup_0_1.eContents().get(1); + private final CrossReference cRelationRelationCrossReference_0_1_1_0 = (CrossReference)cRelationAssignment_0_1_1.eContents().get(0); + private final RuleCall cRelationRelationQualifiedNameParserRuleCall_0_1_1_0_1 = (RuleCall)cRelationRelationCrossReference_0_1_1_0.eContents().get(1); + private final Keyword cLeftParenthesisKeyword_0_1_2 = (Keyword)cGroup_0_1.eContents().get(2); + private final Group cGroup_0_1_3 = (Group)cGroup_0_1.eContents().get(3); + private final Assignment cArgumentsAssignment_0_1_3_0 = (Assignment)cGroup_0_1_3.eContents().get(0); + private final CrossReference cArgumentsNodeCrossReference_0_1_3_0_0 = (CrossReference)cArgumentsAssignment_0_1_3_0.eContents().get(0); + private final RuleCall cArgumentsNodeQualifiedNameParserRuleCall_0_1_3_0_0_1 = (RuleCall)cArgumentsNodeCrossReference_0_1_3_0_0.eContents().get(1); + private final Group cGroup_0_1_3_1 = (Group)cGroup_0_1_3.eContents().get(1); + private final Keyword cCommaKeyword_0_1_3_1_0 = (Keyword)cGroup_0_1_3_1.eContents().get(0); + private final Assignment cArgumentsAssignment_0_1_3_1_1 = (Assignment)cGroup_0_1_3_1.eContents().get(1); + private final CrossReference cArgumentsNodeCrossReference_0_1_3_1_1_0 = (CrossReference)cArgumentsAssignment_0_1_3_1_1.eContents().get(0); + private final RuleCall cArgumentsNodeQualifiedNameParserRuleCall_0_1_3_1_1_0_1 = (RuleCall)cArgumentsNodeCrossReference_0_1_3_1_1_0.eContents().get(1); + private final Keyword cRightParenthesisKeyword_0_1_4 = (Keyword)cGroup_0_1.eContents().get(4); + private final Keyword cFullStopKeyword_1 = (Keyword)cGroup.eContents().get(1); + + //Assertion: + // (relation=[Relation|QualifiedName] + // "(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")" + // ":" value=LogicValue | + // value=ShortLogicValue? + // relation=[Relation|QualifiedName] + // "(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")") + // "."; + @Override public ParserRule getRule() { return rule; } + + //(relation=[Relation|QualifiedName] + //"(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")" + //":" value=LogicValue | + //value=ShortLogicValue? + //relation=[Relation|QualifiedName] + //"(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")") + //"." + public Group getGroup() { return cGroup; } + + //(relation=[Relation|QualifiedName] + //"(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")" + //":" value=LogicValue | + //value=ShortLogicValue? + //relation=[Relation|QualifiedName] + //"(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")") + public Alternatives getAlternatives_0() { return cAlternatives_0; } + + //relation=[Relation|QualifiedName] + // "(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")" + // ":" value=LogicValue + public Group getGroup_0_0() { return cGroup_0_0; } + + //relation=[Relation|QualifiedName] + public Assignment getRelationAssignment_0_0_0() { return cRelationAssignment_0_0_0; } + + //[Relation|QualifiedName] + public CrossReference getRelationRelationCrossReference_0_0_0_0() { return cRelationRelationCrossReference_0_0_0_0; } + + //QualifiedName + public RuleCall getRelationRelationQualifiedNameParserRuleCall_0_0_0_0_1() { return cRelationRelationQualifiedNameParserRuleCall_0_0_0_0_1; } + + //"(" + public Keyword getLeftParenthesisKeyword_0_0_1() { return cLeftParenthesisKeyword_0_0_1; } + + //(arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? + public Group getGroup_0_0_2() { return cGroup_0_0_2; } + + //arguments+=[Node|QualifiedName] + public Assignment getArgumentsAssignment_0_0_2_0() { return cArgumentsAssignment_0_0_2_0; } + + //[Node|QualifiedName] + public CrossReference getArgumentsNodeCrossReference_0_0_2_0_0() { return cArgumentsNodeCrossReference_0_0_2_0_0; } + + //QualifiedName + public RuleCall getArgumentsNodeQualifiedNameParserRuleCall_0_0_2_0_0_1() { return cArgumentsNodeQualifiedNameParserRuleCall_0_0_2_0_0_1; } + + //("," arguments+=[Node|QualifiedName])* + public Group getGroup_0_0_2_1() { return cGroup_0_0_2_1; } + + //"," + public Keyword getCommaKeyword_0_0_2_1_0() { return cCommaKeyword_0_0_2_1_0; } + + //arguments+=[Node|QualifiedName] + public Assignment getArgumentsAssignment_0_0_2_1_1() { return cArgumentsAssignment_0_0_2_1_1; } + + //[Node|QualifiedName] + public CrossReference getArgumentsNodeCrossReference_0_0_2_1_1_0() { return cArgumentsNodeCrossReference_0_0_2_1_1_0; } + + //QualifiedName + public RuleCall getArgumentsNodeQualifiedNameParserRuleCall_0_0_2_1_1_0_1() { return cArgumentsNodeQualifiedNameParserRuleCall_0_0_2_1_1_0_1; } + + //")" + public Keyword getRightParenthesisKeyword_0_0_3() { return cRightParenthesisKeyword_0_0_3; } + + //":" + public Keyword getColonKeyword_0_0_4() { return cColonKeyword_0_0_4; } + + //value=LogicValue + public Assignment getValueAssignment_0_0_5() { return cValueAssignment_0_0_5; } + + //LogicValue + public RuleCall getValueLogicValueEnumRuleCall_0_0_5_0() { return cValueLogicValueEnumRuleCall_0_0_5_0; } + + //value=ShortLogicValue? + //relation=[Relation|QualifiedName] + //"(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")" + public Group getGroup_0_1() { return cGroup_0_1; } + + //value=ShortLogicValue? + public Assignment getValueAssignment_0_1_0() { return cValueAssignment_0_1_0; } + + //ShortLogicValue + public RuleCall getValueShortLogicValueEnumRuleCall_0_1_0_0() { return cValueShortLogicValueEnumRuleCall_0_1_0_0; } + + //relation=[Relation|QualifiedName] + public Assignment getRelationAssignment_0_1_1() { return cRelationAssignment_0_1_1; } + + //[Relation|QualifiedName] + public CrossReference getRelationRelationCrossReference_0_1_1_0() { return cRelationRelationCrossReference_0_1_1_0; } + + //QualifiedName + public RuleCall getRelationRelationQualifiedNameParserRuleCall_0_1_1_0_1() { return cRelationRelationQualifiedNameParserRuleCall_0_1_1_0_1; } + + //"(" + public Keyword getLeftParenthesisKeyword_0_1_2() { return cLeftParenthesisKeyword_0_1_2; } + + //(arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? + public Group getGroup_0_1_3() { return cGroup_0_1_3; } + + //arguments+=[Node|QualifiedName] + public Assignment getArgumentsAssignment_0_1_3_0() { return cArgumentsAssignment_0_1_3_0; } + + //[Node|QualifiedName] + public CrossReference getArgumentsNodeCrossReference_0_1_3_0_0() { return cArgumentsNodeCrossReference_0_1_3_0_0; } + + //QualifiedName + public RuleCall getArgumentsNodeQualifiedNameParserRuleCall_0_1_3_0_0_1() { return cArgumentsNodeQualifiedNameParserRuleCall_0_1_3_0_0_1; } + + //("," arguments+=[Node|QualifiedName])* + public Group getGroup_0_1_3_1() { return cGroup_0_1_3_1; } + + //"," + public Keyword getCommaKeyword_0_1_3_1_0() { return cCommaKeyword_0_1_3_1_0; } + + //arguments+=[Node|QualifiedName] + public Assignment getArgumentsAssignment_0_1_3_1_1() { return cArgumentsAssignment_0_1_3_1_1; } + + //[Node|QualifiedName] + public CrossReference getArgumentsNodeCrossReference_0_1_3_1_1_0() { return cArgumentsNodeCrossReference_0_1_3_1_1_0; } + + //QualifiedName + public RuleCall getArgumentsNodeQualifiedNameParserRuleCall_0_1_3_1_1_0_1() { return cArgumentsNodeQualifiedNameParserRuleCall_0_1_3_1_1_0_1; } + + //")" + public Keyword getRightParenthesisKeyword_0_1_4() { return cRightParenthesisKeyword_0_1_4; } + + //"." + public Keyword getFullStopKeyword_1() { return cFullStopKeyword_1; } + } + public class ScopeDeclarationElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.ScopeDeclaration"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cScopeKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cTypeScopesAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cTypeScopesTypeScopeParserRuleCall_1_0 = (RuleCall)cTypeScopesAssignment_1.eContents().get(0); + private final Group cGroup_2 = (Group)cGroup.eContents().get(2); + private final Keyword cCommaKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0); + private final Assignment cTypeScopesAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); + private final RuleCall cTypeScopesTypeScopeParserRuleCall_2_1_0 = (RuleCall)cTypeScopesAssignment_2_1.eContents().get(0); + private final Keyword cFullStopKeyword_3 = (Keyword)cGroup.eContents().get(3); + + //ScopeDeclaration: + // "scope" typeScopes+=TypeScope ("," typeScopes+=TypeScope)* "."; + @Override public ParserRule getRule() { return rule; } + + //"scope" typeScopes+=TypeScope ("," typeScopes+=TypeScope)* "." + public Group getGroup() { return cGroup; } + + //"scope" + public Keyword getScopeKeyword_0() { return cScopeKeyword_0; } + + //typeScopes+=TypeScope + public Assignment getTypeScopesAssignment_1() { return cTypeScopesAssignment_1; } + + //TypeScope + public RuleCall getTypeScopesTypeScopeParserRuleCall_1_0() { return cTypeScopesTypeScopeParserRuleCall_1_0; } + + //("," typeScopes+=TypeScope)* + public Group getGroup_2() { return cGroup_2; } + + //"," + public Keyword getCommaKeyword_2_0() { return cCommaKeyword_2_0; } + + //typeScopes+=TypeScope + public Assignment getTypeScopesAssignment_2_1() { return cTypeScopesAssignment_2_1; } + + //TypeScope + public RuleCall getTypeScopesTypeScopeParserRuleCall_2_1_0() { return cTypeScopesTypeScopeParserRuleCall_2_1_0; } + + //"." + public Keyword getFullStopKeyword_3() { return cFullStopKeyword_3; } + } + public class TypeScopeElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.TypeScope"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cTargetTypeAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final CrossReference cTargetTypeClassDeclarationCrossReference_0_0 = (CrossReference)cTargetTypeAssignment_0.eContents().get(0); + private final RuleCall cTargetTypeClassDeclarationIDTerminalRuleCall_0_0_1 = (RuleCall)cTargetTypeClassDeclarationCrossReference_0_0.eContents().get(1); + private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1); + private final Assignment cIncrementAssignment_1_0 = (Assignment)cAlternatives_1.eContents().get(0); + private final Keyword cIncrementPlusSignEqualsSignKeyword_1_0_0 = (Keyword)cIncrementAssignment_1_0.eContents().get(0); + private final Keyword cEqualsSignKeyword_1_1 = (Keyword)cAlternatives_1.eContents().get(1); + private final Assignment cMultiplicityAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cMultiplicityMultiplicityParserRuleCall_2_0 = (RuleCall)cMultiplicityAssignment_2.eContents().get(0); + + //TypeScope: + // targetType=[ClassDeclaration] + // (increment?="+=" | "=") + // multiplicity=Multiplicity; + @Override public ParserRule getRule() { return rule; } + + //targetType=[ClassDeclaration] + //(increment?="+=" | "=") + //multiplicity=Multiplicity + public Group getGroup() { return cGroup; } + + //targetType=[ClassDeclaration] + public Assignment getTargetTypeAssignment_0() { return cTargetTypeAssignment_0; } + + //[ClassDeclaration] + public CrossReference getTargetTypeClassDeclarationCrossReference_0_0() { return cTargetTypeClassDeclarationCrossReference_0_0; } + + //ID + public RuleCall getTargetTypeClassDeclarationIDTerminalRuleCall_0_0_1() { return cTargetTypeClassDeclarationIDTerminalRuleCall_0_0_1; } + + //(increment?="+=" | "=") + public Alternatives getAlternatives_1() { return cAlternatives_1; } + + //increment?="+=" + public Assignment getIncrementAssignment_1_0() { return cIncrementAssignment_1_0; } + + //"+=" + public Keyword getIncrementPlusSignEqualsSignKeyword_1_0_0() { return cIncrementPlusSignEqualsSignKeyword_1_0_0; } + + //"=" + public Keyword getEqualsSignKeyword_1_1() { return cEqualsSignKeyword_1_1; } + + //multiplicity=Multiplicity + public Assignment getMultiplicityAssignment_2() { return cMultiplicityAssignment_2; } + + //Multiplicity + public RuleCall getMultiplicityMultiplicityParserRuleCall_2_0() { return cMultiplicityMultiplicityParserRuleCall_2_0; } + } + public class MultiplicityElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.Multiplicity"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cRangeMultiplicityParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cExactMultiplicityParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //Multiplicity: + // RangeMultiplicity | ExactMultiplicity; + @Override public ParserRule getRule() { return rule; } + + //RangeMultiplicity | ExactMultiplicity + public Alternatives getAlternatives() { return cAlternatives; } + + //RangeMultiplicity + public RuleCall getRangeMultiplicityParserRuleCall_0() { return cRangeMultiplicityParserRuleCall_0; } + + //ExactMultiplicity + public RuleCall getExactMultiplicityParserRuleCall_1() { return cExactMultiplicityParserRuleCall_1; } + } + public class RangeMultiplicityElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.RangeMultiplicity"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cLowerBoundAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cLowerBoundINTTerminalRuleCall_0_0 = (RuleCall)cLowerBoundAssignment_0.eContents().get(0); + private final Keyword cFullStopFullStopKeyword_1 = (Keyword)cGroup.eContents().get(1); + private final Assignment cUpperBoundAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cUpperBoundUpperBoundParserRuleCall_2_0 = (RuleCall)cUpperBoundAssignment_2.eContents().get(0); + + //RangeMultiplicity: + // lowerBound=INT ".." upperBound=UpperBound; + @Override public ParserRule getRule() { return rule; } + + //lowerBound=INT ".." upperBound=UpperBound + public Group getGroup() { return cGroup; } + + //lowerBound=INT + public Assignment getLowerBoundAssignment_0() { return cLowerBoundAssignment_0; } + + //INT + public RuleCall getLowerBoundINTTerminalRuleCall_0_0() { return cLowerBoundINTTerminalRuleCall_0_0; } + + //".." + public Keyword getFullStopFullStopKeyword_1() { return cFullStopFullStopKeyword_1; } + + //upperBound=UpperBound + public Assignment getUpperBoundAssignment_2() { return cUpperBoundAssignment_2; } + + //UpperBound + public RuleCall getUpperBoundUpperBoundParserRuleCall_2_0() { return cUpperBoundUpperBoundParserRuleCall_2_0; } + } + public class ExactMultiplicityElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.ExactMultiplicity"); + private final Assignment cExactValueAssignment = (Assignment)rule.eContents().get(1); + private final RuleCall cExactValueINTTerminalRuleCall_0 = (RuleCall)cExactValueAssignment.eContents().get(0); + + //ExactMultiplicity: + // exactValue=INT; + @Override public ParserRule getRule() { return rule; } + + //exactValue=INT + public Assignment getExactValueAssignment() { return cExactValueAssignment; } + + //INT + public RuleCall getExactValueINTTerminalRuleCall_0() { return cExactValueINTTerminalRuleCall_0; } + } + public class UpperBoundElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.UpperBound"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cINTTerminalRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final Keyword cAsteriskKeyword_1 = (Keyword)cAlternatives.eContents().get(1); + + //UpperBound returns ecore::EInt: + // INT | "*"; + @Override public ParserRule getRule() { return rule; } + + //INT | "*" + public Alternatives getAlternatives() { return cAlternatives; } + + //INT + public RuleCall getINTTerminalRuleCall_0() { return cINTTerminalRuleCall_0; } + + //"*" + public Keyword getAsteriskKeyword_1() { return cAsteriskKeyword_1; } + } + public class QualifiedNameElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.QualifiedName"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cIDTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Group cGroup_1 = (Group)cGroup.eContents().get(1); + private final Keyword cColonColonKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0); + private final RuleCall cIDTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); + + //QualifiedName: + // ID ("::" ID)*; + @Override public ParserRule getRule() { return rule; } + + //ID ("::" ID)* + public Group getGroup() { return cGroup; } + + //ID + public RuleCall getIDTerminalRuleCall_0() { return cIDTerminalRuleCall_0; } + + //("::" ID)* + public Group getGroup_1() { return cGroup_1; } + + //"::" + public Keyword getColonColonKeyword_1_0() { return cColonColonKeyword_1_0; } + + //ID + public RuleCall getIDTerminalRuleCall_1_1() { return cIDTerminalRuleCall_1_1; } + } + + public class LogicValueElements extends AbstractElementFinder.AbstractEnumRuleElementFinder { + private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.LogicValue"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final EnumLiteralDeclaration cTRUEEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0); + private final Keyword cTRUETrueKeyword_0_0 = (Keyword)cTRUEEnumLiteralDeclaration_0.eContents().get(0); + private final EnumLiteralDeclaration cFALSEEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1); + private final Keyword cFALSEFalseKeyword_1_0 = (Keyword)cFALSEEnumLiteralDeclaration_1.eContents().get(0); + private final EnumLiteralDeclaration cUNKNOWNEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2); + private final Keyword cUNKNOWNUnknownKeyword_2_0 = (Keyword)cUNKNOWNEnumLiteralDeclaration_2.eContents().get(0); + + //enum LogicValue: + // TRUE="true" | FALSE="false" | UNKNOWN="unknown"; + public EnumRule getRule() { return rule; } + + //TRUE="true" | FALSE="false" | UNKNOWN="unknown" + public Alternatives getAlternatives() { return cAlternatives; } + + //TRUE="true" + public EnumLiteralDeclaration getTRUEEnumLiteralDeclaration_0() { return cTRUEEnumLiteralDeclaration_0; } + + //"true" + public Keyword getTRUETrueKeyword_0_0() { return cTRUETrueKeyword_0_0; } + + //FALSE="false" + public EnumLiteralDeclaration getFALSEEnumLiteralDeclaration_1() { return cFALSEEnumLiteralDeclaration_1; } + + //"false" + public Keyword getFALSEFalseKeyword_1_0() { return cFALSEFalseKeyword_1_0; } + + //UNKNOWN="unknown" + public EnumLiteralDeclaration getUNKNOWNEnumLiteralDeclaration_2() { return cUNKNOWNEnumLiteralDeclaration_2; } + + //"unknown" + public Keyword getUNKNOWNUnknownKeyword_2_0() { return cUNKNOWNUnknownKeyword_2_0; } + } + public class ShortLogicValueElements extends AbstractElementFinder.AbstractEnumRuleElementFinder { + private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.viatra.solver.language.Problem.ShortLogicValue"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final EnumLiteralDeclaration cFALSEEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0); + private final Keyword cFALSEExclamationMarkKeyword_0_0 = (Keyword)cFALSEEnumLiteralDeclaration_0.eContents().get(0); + private final EnumLiteralDeclaration cUNKNOWNEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1); + private final Keyword cUNKNOWNQuestionMarkKeyword_1_0 = (Keyword)cUNKNOWNEnumLiteralDeclaration_1.eContents().get(0); + + //enum ShortLogicValue returns LogicValue: + // FALSE="!" | UNKNOWN="?"; + public EnumRule getRule() { return rule; } + + //FALSE="!" | UNKNOWN="?" + public Alternatives getAlternatives() { return cAlternatives; } + + //FALSE="!" + public EnumLiteralDeclaration getFALSEEnumLiteralDeclaration_0() { return cFALSEEnumLiteralDeclaration_0; } + + //"!" + public Keyword getFALSEExclamationMarkKeyword_0_0() { return cFALSEExclamationMarkKeyword_0_0; } + + //UNKNOWN="?" + public EnumLiteralDeclaration getUNKNOWNEnumLiteralDeclaration_1() { return cUNKNOWNEnumLiteralDeclaration_1; } + + //"?" + public Keyword getUNKNOWNQuestionMarkKeyword_1_0() { return cUNKNOWNQuestionMarkKeyword_1_0; } + } + + private final ProblemElements pProblem; + private final StatementElements pStatement; + private final ClassDeclarationElements pClassDeclaration; + private final ReferenceDeclarationElements pReferenceDeclaration; + private final PredicateDefinitionElements pPredicateDefinition; + private final ParameterElements pParameter; + private final ConjunctionElements pConjunction; + private final LiteralElements pLiteral; + private final NegativeLiteralElements pNegativeLiteral; + private final AtomElements pAtom; + private final AssertionElements pAssertion; + private final LogicValueElements eLogicValue; + private final ShortLogicValueElements eShortLogicValue; + private final ScopeDeclarationElements pScopeDeclaration; + private final TypeScopeElements pTypeScope; + private final MultiplicityElements pMultiplicity; + private final RangeMultiplicityElements pRangeMultiplicity; + private final ExactMultiplicityElements pExactMultiplicity; + private final UpperBoundElements pUpperBound; + private final QualifiedNameElements pQualifiedName; + + private final Grammar grammar; + + private final TerminalsGrammarAccess gaTerminals; + + @Inject + public ProblemGrammarAccess(GrammarProvider grammarProvider, + TerminalsGrammarAccess gaTerminals) { + this.grammar = internalFindGrammar(grammarProvider); + this.gaTerminals = gaTerminals; + this.pProblem = new ProblemElements(); + this.pStatement = new StatementElements(); + this.pClassDeclaration = new ClassDeclarationElements(); + this.pReferenceDeclaration = new ReferenceDeclarationElements(); + this.pPredicateDefinition = new PredicateDefinitionElements(); + this.pParameter = new ParameterElements(); + this.pConjunction = new ConjunctionElements(); + this.pLiteral = new LiteralElements(); + this.pNegativeLiteral = new NegativeLiteralElements(); + this.pAtom = new AtomElements(); + this.pAssertion = new AssertionElements(); + this.eLogicValue = new LogicValueElements(); + this.eShortLogicValue = new ShortLogicValueElements(); + this.pScopeDeclaration = new ScopeDeclarationElements(); + this.pTypeScope = new TypeScopeElements(); + this.pMultiplicity = new MultiplicityElements(); + this.pRangeMultiplicity = new RangeMultiplicityElements(); + this.pExactMultiplicity = new ExactMultiplicityElements(); + this.pUpperBound = new UpperBoundElements(); + this.pQualifiedName = new QualifiedNameElements(); + } + + protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { + Grammar grammar = grammarProvider.getGrammar(this); + while (grammar != null) { + if ("org.eclipse.viatra.solver.language.Problem".equals(grammar.getName())) { + return grammar; + } + List grammars = grammar.getUsedGrammars(); + if (!grammars.isEmpty()) { + grammar = grammars.iterator().next(); + } else { + return null; + } + } + return grammar; + } + + @Override + public Grammar getGrammar() { + return grammar; + } + + + public TerminalsGrammarAccess getTerminalsGrammarAccess() { + return gaTerminals; + } + + + //Problem: + // statements+=Statement*; + public ProblemElements getProblemAccess() { + return pProblem; + } + + public ParserRule getProblemRule() { + return getProblemAccess().getRule(); + } + + //Statement: + // ClassDeclaration | PredicateDefinition | Assertion | ScopeDeclaration; + public StatementElements getStatementAccess() { + return pStatement; + } + + public ParserRule getStatementRule() { + return getStatementAccess().getRule(); + } + + //ClassDeclaration: + // abstract?="abstract"? "class" + // name=ID + // ("extends" (superTypes+=[ClassDeclaration] | + // "[" (superTypes+=[ClassDeclaration] ("," superTypes+=[ClassDeclaration])*)? "]") | + // referenceDeclarations+=ReferenceDeclaration)? + // ("," referenceDeclarations+=ReferenceDeclaration)* + // "."; + public ClassDeclarationElements getClassDeclarationAccess() { + return pClassDeclaration; + } + + public ParserRule getClassDeclarationRule() { + return getClassDeclarationAccess().getRule(); + } + + //ReferenceDeclaration: + // (containment?="contains" | "refers") + // referenceType=[ClassDeclaration] + // "[" multiplicity=Multiplicity "]" + // name=ID + // ("opposite" opposite=[ReferenceDeclaration|QualifiedName])?; + public ReferenceDeclarationElements getReferenceDeclarationAccess() { + return pReferenceDeclaration; + } + + public ParserRule getReferenceDeclarationRule() { + return getReferenceDeclarationAccess().getRule(); + } + + //PredicateDefinition: + // (error?="error" "pred"? | "pred") + // name=ID + // "(" (parameters+=Parameter ("," parameters+=Parameter)*)? ")" + // (":=" bodies+=Conjunction (";" bodies+=Conjunction)*)? + // "."; + public PredicateDefinitionElements getPredicateDefinitionAccess() { + return pPredicateDefinition; + } + + public ParserRule getPredicateDefinitionRule() { + return getPredicateDefinitionAccess().getRule(); + } + + //Parameter: + // parameterType=[ClassDeclaration] name=ID; + public ParameterElements getParameterAccess() { + return pParameter; + } + + public ParserRule getParameterRule() { + return getParameterAccess().getRule(); + } + + //Conjunction: + // literals+=Literal ("," literals+=Literal)*; + public ConjunctionElements getConjunctionAccess() { + return pConjunction; + } + + public ParserRule getConjunctionRule() { + return getConjunctionAccess().getRule(); + } + + //Literal: + // Atom | NegativeLiteral; + public LiteralElements getLiteralAccess() { + return pLiteral; + } + + public ParserRule getLiteralRule() { + return getLiteralAccess().getRule(); + } + + //NegativeLiteral: + // "!" atom=Atom; + public NegativeLiteralElements getNegativeLiteralAccess() { + return pNegativeLiteral; + } + + public ParserRule getNegativeLiteralRule() { + return getNegativeLiteralAccess().getRule(); + } + + //Atom: + // relation=[Relation|QualifiedName] + // transitiveClosure?="+"? + // "(" (arguments+=[Variable] ("," arguments+=[Variable])*)? ")"; + public AtomElements getAtomAccess() { + return pAtom; + } + + public ParserRule getAtomRule() { + return getAtomAccess().getRule(); + } + + //Assertion: + // (relation=[Relation|QualifiedName] + // "(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")" + // ":" value=LogicValue | + // value=ShortLogicValue? + // relation=[Relation|QualifiedName] + // "(" (arguments+=[Node|QualifiedName] ("," arguments+=[Node|QualifiedName])*)? ")") + // "."; + public AssertionElements getAssertionAccess() { + return pAssertion; + } + + public ParserRule getAssertionRule() { + return getAssertionAccess().getRule(); + } + + //enum LogicValue: + // TRUE="true" | FALSE="false" | UNKNOWN="unknown"; + public LogicValueElements getLogicValueAccess() { + return eLogicValue; + } + + public EnumRule getLogicValueRule() { + return getLogicValueAccess().getRule(); + } + + //enum ShortLogicValue returns LogicValue: + // FALSE="!" | UNKNOWN="?"; + public ShortLogicValueElements getShortLogicValueAccess() { + return eShortLogicValue; + } + + public EnumRule getShortLogicValueRule() { + return getShortLogicValueAccess().getRule(); + } + + //ScopeDeclaration: + // "scope" typeScopes+=TypeScope ("," typeScopes+=TypeScope)* "."; + public ScopeDeclarationElements getScopeDeclarationAccess() { + return pScopeDeclaration; + } + + public ParserRule getScopeDeclarationRule() { + return getScopeDeclarationAccess().getRule(); + } + + //TypeScope: + // targetType=[ClassDeclaration] + // (increment?="+=" | "=") + // multiplicity=Multiplicity; + public TypeScopeElements getTypeScopeAccess() { + return pTypeScope; + } + + public ParserRule getTypeScopeRule() { + return getTypeScopeAccess().getRule(); + } + + //Multiplicity: + // RangeMultiplicity | ExactMultiplicity; + public MultiplicityElements getMultiplicityAccess() { + return pMultiplicity; + } + + public ParserRule getMultiplicityRule() { + return getMultiplicityAccess().getRule(); + } + + //RangeMultiplicity: + // lowerBound=INT ".." upperBound=UpperBound; + public RangeMultiplicityElements getRangeMultiplicityAccess() { + return pRangeMultiplicity; + } + + public ParserRule getRangeMultiplicityRule() { + return getRangeMultiplicityAccess().getRule(); + } + + //ExactMultiplicity: + // exactValue=INT; + public ExactMultiplicityElements getExactMultiplicityAccess() { + return pExactMultiplicity; + } + + public ParserRule getExactMultiplicityRule() { + return getExactMultiplicityAccess().getRule(); + } + + //UpperBound returns ecore::EInt: + // INT | "*"; + public UpperBoundElements getUpperBoundAccess() { + return pUpperBound; + } + + public ParserRule getUpperBoundRule() { + return getUpperBoundAccess().getRule(); + } + + //QualifiedName: + // ID ("::" ID)*; + public QualifiedNameElements getQualifiedNameAccess() { + return pQualifiedName; + } + + public ParserRule getQualifiedNameRule() { + return getQualifiedNameAccess().getRule(); + } + + //terminal ID: '^'?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; + public TerminalRule getIDRule() { + return gaTerminals.getIDRule(); + } + + //terminal INT returns ecore::EInt: ('0'..'9')+; + public TerminalRule getINTRule() { + return gaTerminals.getINTRule(); + } + + //terminal STRING: + // '"' ( '\\' . /* 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' */ | !('\\'|'"') )* '"' | + // "'" ( '\\' . /* 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' */ | !('\\'|"'") )* "'" + // ; + public TerminalRule getSTRINGRule() { + return gaTerminals.getSTRINGRule(); + } + + //terminal ML_COMMENT : '/*' -> '*/'; + public TerminalRule getML_COMMENTRule() { + return gaTerminals.getML_COMMENTRule(); + } + + //terminal SL_COMMENT : '//' !('\n'|'\r')* ('\r'? '\n')?; + public TerminalRule getSL_COMMENTRule() { + return gaTerminals.getSL_COMMENTRule(); + } + + //terminal WS : (' '|'\t'|'\r'|'\n')+; + public TerminalRule getWSRule() { + return gaTerminals.getWSRule(); + } + + //terminal ANY_OTHER: .; + public TerminalRule getANY_OTHERRule() { + return gaTerminals.getANY_OTHERRule(); + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/validation/AbstractProblemValidator.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/validation/AbstractProblemValidator.java new file mode 100644 index 00000000..9cd73e1e --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/validation/AbstractProblemValidator.java @@ -0,0 +1,19 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.validation; + +import java.util.ArrayList; +import java.util.List; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.xtext.validation.AbstractDeclarativeValidator; + +public abstract class AbstractProblemValidator extends AbstractDeclarativeValidator { + + @Override + protected List getEPackages() { + List result = new ArrayList(); + result.add(EPackage.Registry.INSTANCE.getEPackage("http://www.eclipse.org/viatra/solver/language/model/Problem")); + return result; + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/validation/ProblemConfigurableIssueCodesProvider.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/validation/ProblemConfigurableIssueCodesProvider.java new file mode 100644 index 00000000..f5a0d87d --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/validation/ProblemConfigurableIssueCodesProvider.java @@ -0,0 +1,22 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.validation; + +import org.eclipse.xtext.preferences.PreferenceKey; +import org.eclipse.xtext.util.IAcceptor; +import org.eclipse.xtext.validation.ConfigurableIssueCodesProvider; +import org.eclipse.xtext.validation.SeverityConverter; + +@SuppressWarnings("restriction") +public class ProblemConfigurableIssueCodesProvider extends ConfigurableIssueCodesProvider { + protected static final String ISSUE_CODE_PREFIX = "org.eclipse.viatra.solver.language."; + + public static final String DEPRECATED_MODEL_PART = ISSUE_CODE_PREFIX + "deprecatedModelPart"; + + @Override + protected void initialize(IAcceptor acceptor) { + super.initialize(acceptor); + acceptor.accept(create(DEPRECATED_MODEL_PART, SeverityConverter.SEVERITY_WARNING)); + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/test/java/org/eclipse/viatra/solver/language/tests/ProblemParsingTest.xtend b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/test/java/org/eclipse/viatra/solver/language/tests/ProblemParsingTest.xtend new file mode 100644 index 00000000..b007cf8b --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/test/java/org/eclipse/viatra/solver/language/tests/ProblemParsingTest.xtend @@ -0,0 +1,30 @@ +/* + * generated by Xtext 2.25.0 + */ +package org.eclipse.viatra.solver.language.tests + +import com.google.inject.Inject +import org.eclipse.viatra.solver.language.model.problem.Problem +import org.eclipse.xtext.testing.InjectWith +import org.eclipse.xtext.testing.extensions.InjectionExtension +import org.eclipse.xtext.testing.util.ParseHelper +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.^extension.ExtendWith + +@ExtendWith(InjectionExtension) +@InjectWith(ProblemInjectorProvider) +class ProblemParsingTest { + @Inject + ParseHelper parseHelper + + @Test + def void loadModel() { + val result = parseHelper.parse(''' + Hello Xtext! + ''') + Assertions.assertNotNull(result) + val errors = result.eResource.errors + Assertions.assertTrue(errors.isEmpty, '''Unexpected errors: «errors.join(", ")»''') + } +} diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/test/xtext-gen/org/eclipse/viatra/solver/language/tests/ProblemInjectorProvider.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/test/xtext-gen/org/eclipse/viatra/solver/language/tests/ProblemInjectorProvider.java new file mode 100644 index 00000000..7d0ef1bb --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/test/xtext-gen/org/eclipse/viatra/solver/language/tests/ProblemInjectorProvider.java @@ -0,0 +1,69 @@ +/* + * generated by Xtext 2.26.0.M1 + */ +package org.eclipse.viatra.solver.language.tests; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.viatra.solver.language.ProblemRuntimeModule; +import org.eclipse.viatra.solver.language.ProblemStandaloneSetup; +import org.eclipse.xtext.testing.GlobalRegistries; +import org.eclipse.xtext.testing.GlobalRegistries.GlobalStateMemento; +import org.eclipse.xtext.testing.IInjectorProvider; +import org.eclipse.xtext.testing.IRegistryConfigurator; + +public class ProblemInjectorProvider implements IInjectorProvider, IRegistryConfigurator { + + protected GlobalStateMemento stateBeforeInjectorCreation; + protected GlobalStateMemento stateAfterInjectorCreation; + protected Injector injector; + + static { + GlobalRegistries.initializeDefaults(); + } + + @Override + public Injector getInjector() { + if (injector == null) { + this.injector = internalCreateInjector(); + stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + } + return injector; + } + + protected Injector internalCreateInjector() { + return new ProblemStandaloneSetup() { + @Override + public Injector createInjector() { + return Guice.createInjector(createRuntimeModule()); + } + }.createInjectorAndDoEMFRegistration(); + } + + protected ProblemRuntimeModule createRuntimeModule() { + // make it work also with Maven/Tycho and OSGI + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672 + return new ProblemRuntimeModule() { + @Override + public ClassLoader bindClassLoaderToInstance() { + return ProblemInjectorProvider.class + .getClassLoader(); + } + }; + } + + @Override + public void restoreRegistry() { + stateBeforeInjectorCreation.restoreGlobalState(); + stateBeforeInjectorCreation = null; + } + + @Override + public void setupRegistry() { + stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + if (injector == null) { + getInjector(); + } + stateAfterInjectorCreation.restoreGlobalState(); + } +} diff --git a/org.eclipse.viatra.solver.language.parent/settings.gradle b/org.eclipse.viatra.solver.language.parent/settings.gradle new file mode 100644 index 00000000..5ddc5fc4 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/settings.gradle @@ -0,0 +1,4 @@ +include 'org.eclipse.viatra.solver.language' +include 'org.eclipse.viatra.solver.language.ide' +include 'org.eclipse.viatra.solver.language.model' +include 'org.eclipse.viatra.solver.language.web' -- cgit v1.2.3-70-g09d2