From 513a5afe3a8663ad30112f7e3c0e66137938e635 Mon Sep 17 00:00:00 2001 From: ArenBabikian Date: Wed, 20 Mar 2019 20:39:28 -0400 Subject: Add gitignore, commit everything --- .../.gitignore | 2 + .../inputs/FamPatterns.vql | 4 +- .../inf/yakinduModelExtractor/ModelManager.java | 74 +- .../.classpath | 1 + .../META-INF/MANIFEST.MF | 16 +- .../build.properties | 3 +- .../metrics/examples/.CSERposterSample.java._trace | Bin 0 -> 8683 bytes .../.classpath | 1 + .../build.properties | 3 +- .../.classpath | 7 - .../.project | 29 - .../META-INF/MANIFEST.MF | 7 - .../model/logic2vampire.aird | 30 - .../model/logic2vampire.ecore | 4 - .../model/logic2vampire.genmodel | 14 - .../ide/.VampireLanguageIdeModule.xtendbin | Bin 1685 -> 1685 bytes .../ide/.VampireLanguageIdeSetup.xtendbin | Bin 2500 -> 2500 bytes .../ui/.VampireLanguageUiModule.xtendbin | Bin 2342 -> 2342 bytes .../.VampireLanguageProposalProvider.xtendbin | Bin 1792 -> 1792 bytes ...ampireLanguageDescriptionLabelProvider.xtendbin | Bin 1965 -> 1965 bytes .../.VampireLanguageLabelProvider.xtendbin | Bin 2405 -> 2405 bytes .../.VampireLanguageOutlineTreeProvider.xtendbin | Bin 1819 -> 1819 bytes .../.VampireLanguageQuickfixProvider.xtendbin | Bin 1786 -> 1786 bytes .../vampireLanguage/VLSFiniteModel.java | 20 - .../vampireLanguage/VLSFunctionFof.java | 69 -- .../dslreasoner/vampireLanguage/VLSTrying.java | 52 - .../vampireLanguage/impl/VLSFiniteModelImpl.java | 43 - .../vampireLanguage/impl/VLSFunctionFofImpl.java | 240 ----- .../vampireLanguage/impl/VLSTryingImpl.java | 178 ---- .../.VampireLanguageRuntimeModule.xtendbin | Bin 1706 -> 1706 bytes .../.VampireLanguageStandaloneSetup.xtendbin | Bin 1980 -> 1980 bytes .../formatting2/.VampireLanguageFormatter.xtendbin | Bin 4130 -> 4130 bytes .../generator/.VampireLanguageGenerator.xtendbin | Bin 2338 -> 2338 bytes .../scoping/.VampireLanguageScopeProvider.xtendbin | Bin 1751 -> 1751 bytes .../validation/.VampireLanguageValidator.xtendbin | Bin 1736 -> 1736 bytes .../.gitignore | 1 + .../ecse/dslreasoner/vampire/queries/VLSAnd.java | 533 ---------- .../dslreasoner/vampire/queries/VLSAnnotation.java | 533 ---------- .../dslreasoner/vampire/queries/VLSComment.java | 533 ---------- .../dslreasoner/vampire/queries/VLSEquivalent.java | 533 ---------- .../vampire/queries/VLSExistentialQuantifier.java | 533 ---------- .../dslreasoner/vampire/queries/VLSFofFormula.java | 533 ---------- .../dslreasoner/vampire/queries/VLSFunction.java | 533 ---------- .../vampire/queries/VLSFunctionFof.java | 533 ---------- .../dslreasoner/vampire/queries/VLSInequality.java | 533 ---------- .../ecse/dslreasoner/vampire/queries/VLSOr.java | 535 ---------- .../vampire/queries/VLSUnaryNegation.java | 533 ---------- .../vampire/queries/VLSUniversalQuantifier.java | 533 ---------- .../vampire/queries/VampireQueries.java | 174 ---- .../.gitignore | 2 + ...c2VampireLanguageMapper_ContainmentMapper.xtend | 14 +- ...guageMapper_TypeMapperTrace_FilteredTypes.xtend | 18 - .../.VampireAnalyzerConfiguration.xtendbin | Bin 2399 -> 2399 bytes .../vampire/reasoner/.VampireSolver.xtendbin | Bin 5892 -> 5892 bytes .../builder/.Logic2VampireLanguageMapper.xtendbin | Bin 18129 -> 18128 bytes .../.Logic2VampireLanguageMapperTrace.xtendbin | Bin 4215 -> 4215 bytes ...c2VampireLanguageMapper_ConstantMapper.xtendbin | Bin 3164 -> 3164 bytes ...ampireLanguageMapper_ContainmentMapper.xtendbin | Bin 7649 -> 7604 bytes ...c2VampireLanguageMapper_RelationMapper.xtendbin | Bin 8210 -> 8210 bytes ...ogic2VampireLanguageMapper_ScopeMapper.xtendbin | Bin 9263 -> 9263 bytes .../.Logic2VampireLanguageMapper_Support.xtendbin | Bin 12311 -> 12311 bytes ...Logic2VampireLanguageMapper_TypeMapper.xtendbin | Bin 10377 -> 10377 bytes ...geMapper_TypeMapperTrace_FilteredTypes.xtendbin | Bin 2643 -> 0 bytes ...anguageMapper_TypeMapper_FilteredTypes.xtendbin | Bin 8564 -> 0 bytes .../reasoner/builder/.Vampire2LogicMapper.xtendbin | Bin 1720 -> 1720 bytes .../reasoner/builder/.VampireHandler.xtendbin | Bin 4908 -> 4908 bytes ...ModelInterpretation_TypeInterpretation.xtendbin | Bin 1491 -> 1491 bytes ...ation_TypeInterpretation_FilteredTypes.xtendbin | Bin 1688 -> 1688 bytes ...ic2VampireLanguageMapper_ContainmentMapper.java | 11 +- ...nguageMapper_TypeMapperTrace_FilteredTypes.java | 20 - .../metamodels/fam.aird | 633 ++++++++++++ .../plugin.xml | 2 + .../standalone/test/fam/queries/famPatterns.vql | 4 +- .../standalone/test/fam/queries/famSPatterns.vql | 13 - .../.gitignore | 3 + .../initialModels/yakindu/yakinduPatterns.vql_ | 227 +++++ .../initialModels/yakindu/yakindu_simplified.aird | 704 +++++++++++++ .../initialModels/yakindu/yakindu_simplified.ecore | 39 + .../yakindu/yakindu_simplified.genmodel | 40 + .../output/FAMTest/vampireProblem.tptp | 22 +- .../output/VampireTest/vampireProblem.tptp | 7 - .../dslreasoner/vampire/icse/GeneralTest.xtend | 13 +- .../vampire/icse/YakinduTestAlloy.xtend | 190 ++++ .../vampire/icse/YakinduTestViatra.xtend | 182 ++++ .../ecse/dslreasoner/vampire/icse/tester.xtend | 35 + .../dslreasoner/vampire/icseTests/FAMTest.xtend | 103 -- .../vampire/queries/YakinduPatterns.txt | 227 +++++ .../ecse/dslreasoner/vampire/yakindumm/Choice.java | 17 + .../vampire/yakindumm/CompositeElement.java | 42 + .../ecse/dslreasoner/vampire/yakindumm/Entry.java | 52 + .../dslreasoner/vampire/yakindumm/EntryType.java | 239 +++++ .../ecse/dslreasoner/vampire/yakindumm/Exit.java | 17 + .../dslreasoner/vampire/yakindumm/FinalState.java | 17 + .../dslreasoner/vampire/yakindumm/Pseudostate.java | 17 + .../ecse/dslreasoner/vampire/yakindumm/Region.java | 42 + .../vampire/yakindumm/RegularState.java | 17 + .../ecse/dslreasoner/vampire/yakindumm/State.java | 17 + .../dslreasoner/vampire/yakindumm/Statechart.java | 17 + .../dslreasoner/vampire/yakindumm/Transition.java | 81 ++ .../ecse/dslreasoner/vampire/yakindumm/Vertex.java | 63 ++ .../vampire/yakindumm/YakindummFactory.java | 105 ++ .../vampire/yakindumm/YakindummPackage.java | 1032 ++++++++++++++++++++ .../vampire/yakindumm/impl/ChoiceImpl.java | 37 + .../yakindumm/impl/CompositeElementImpl.java | 152 +++ .../vampire/yakindumm/impl/EntryImpl.java | 163 ++++ .../vampire/yakindumm/impl/ExitImpl.java | 37 + .../vampire/yakindumm/impl/FinalStateImpl.java | 37 + .../vampire/yakindumm/impl/PseudostateImpl.java | 37 + .../vampire/yakindumm/impl/RegionImpl.java | 152 +++ .../vampire/yakindumm/impl/RegularStateImpl.java | 37 + .../vampire/yakindumm/impl/StateImpl.java | 183 ++++ .../vampire/yakindumm/impl/StatechartImpl.java | 37 + .../vampire/yakindumm/impl/TransitionImpl.java | 284 ++++++ .../vampire/yakindumm/impl/VertexImpl.java | 206 ++++ .../yakindumm/impl/YakindummFactoryImpl.java | 223 +++++ .../yakindumm/impl/YakindummPackageImpl.java | 511 ++++++++++ .../yakindumm/util/YakindummAdapterFactory.java | 318 ++++++ .../vampire/yakindumm/util/YakindummSwitch.java | 355 +++++++ .../dslreasoner/vampire/icse/.EcoreTest.xtendbin | Bin 6358 -> 6358 bytes .../dslreasoner/vampire/icse/.FAMTest.xtendbin | Bin 4068 -> 4068 bytes .../vampire/icse/.FileSystemTest.xtendbin | Bin 4115 -> 4115 bytes .../dslreasoner/vampire/icse/.GeneralTest.xtendbin | Bin 8486 -> 8212 bytes .../dslreasoner/vampire/icse/.YakinduTest.xtendbin | Bin 4054 -> 4054 bytes .../ecse/dslreasoner/vampire/icse/GeneralTest.java | 2 +- .../ecse/dslreasoner/vampire/icseTest/.gitignore | 1 - .../dslreasoner/vampire/test/.DslTest.xtendbin | Bin 5966 -> 0 bytes .../vampire/test/.MedicalSystem.xtendbin | Bin 4997 -> 4997 bytes .../dslreasoner/vampire/test/.SimpleRun.xtendbin | Bin 687 -> 687 bytes .../dslreasoner/vampire/test/.VampireTest.xtendbin | Bin 6500 -> 6500 bytes .../ecse/dslreasoner/vampire/test/FAMTest.java | 111 --- .../hu/bme/mit/inf/dslreasoner/run/.gitignore | 2 - .../.project | 40 + .../dslreasoner/yakindu/test/.YakinduTest.xtendbin | Bin 0 -> 8569 bytes .../ecse/dslreasoner/yakindu/test/.gitignore | 1 + .../dslreasoner/yakindu/test/YakinduTest.xtend | 178 ++++ .../yakindu/test/.YakinduTest.java._trace | Bin 0 -> 11324 bytes .../.classpath | 1 + .../META-INF/MANIFEST.MF | 29 +- .../build.properties | 5 +- 139 files changed, 7160 insertions(+), 7633 deletions(-) create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.CSERposterSample.java._trace delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/.classpath delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/.project delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/META-INF/MANIFEST.MF delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.aird delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.ecore delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.genmodel delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSFiniteModel.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSFunctionFof.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSTrying.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFiniteModelImpl.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFunctionFofImpl.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSTryingImpl.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSAnd.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSAnnotation.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSComment.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSEquivalent.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSExistentialQuantifier.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFofFormula.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFunction.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFunctionFof.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSInequality.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSOr.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUnaryNegation.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUniversalQuantifier.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VampireQueries.java delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtend delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtendbin delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper_FilteredTypes.xtendbin delete mode 100644 Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.aird delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famSPatterns.vql create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakinduPatterns.vql_ create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.aird create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.ecore create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.genmodel delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/VampireTest/vampireProblem.tptp create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTestAlloy.xtend create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTestViatra.xtend create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/tester.xtend delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icseTests/FAMTest.xtend create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/queries/YakinduPatterns.txt create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Choice.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/CompositeElement.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Entry.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/EntryType.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Exit.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/FinalState.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Pseudostate.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Region.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/RegularState.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/State.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Statechart.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Transition.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Vertex.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/YakindummFactory.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/YakindummPackage.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/ChoiceImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/CompositeElementImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/EntryImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/ExitImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/FinalStateImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/PseudostateImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/RegionImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/RegularStateImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/StateImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/StatechartImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/TransitionImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/VertexImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/YakindummFactoryImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/YakindummPackageImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/util/YakindummAdapterFactory.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/util/YakindummSwitch.java delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icseTest/.gitignore delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.DslTest.xtendbin delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/FAMTest.java delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/hu/bme/mit/inf/dslreasoner/run/.gitignore create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/.project create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/.YakinduTest.xtendbin create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/.gitignore create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/YakinduTest.xtend create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/xtend-gen/ca/mcgill/ecse/dslreasoner/yakindu/test/.YakinduTest.java._trace diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/.gitignore b/Application/hu.bme.mit.inf.dslreasoner.application.ide/.gitignore index ae3c1726..d95727ab 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/.gitignore +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/.gitignore @@ -1 +1,3 @@ /bin/ +/xtend-gen/ +/src-gen/ \ No newline at end of file diff --git a/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamPatterns.vql b/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamPatterns.vql index 34394ef6..3966d0af 100644 --- a/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamPatterns.vql +++ b/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamPatterns.vql @@ -1,7 +1,7 @@ package hu.bme.mit.inf.dslreasoner.domains.fam -import epackage "http://www.inf.mit.bme.hu/viatrasolver/example/fam" -//import epackage "platform:/resource/ModelGenExampleFAM/inputs/FamMetamodel.ecore"; +//import epackage "http://www.inf.mit.bme.hu/viatrasolver/example/fam" +import epackage "platform:/resource/ModelGenExampleFAM/inputs/FamMetamodel.ecore"; @Constraint(message="terminatorAndInformation", severity="error", key={T}) pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { diff --git a/Domains/hu.bme.mit.inf.yakinduModelExtractor/src/hu/bme/mit/inf/yakinduModelExtractor/ModelManager.java b/Domains/hu.bme.mit.inf.yakinduModelExtractor/src/hu/bme/mit/inf/yakinduModelExtractor/ModelManager.java index 85fd208c..951e44a3 100644 --- a/Domains/hu.bme.mit.inf.yakinduModelExtractor/src/hu/bme/mit/inf/yakinduModelExtractor/ModelManager.java +++ b/Domains/hu.bme.mit.inf.yakinduModelExtractor/src/hu/bme/mit/inf/yakinduModelExtractor/ModelManager.java @@ -1,21 +1,21 @@ -package hu.bme.mit.inf.yakinduModelExtractor; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.Writer; -import java.util.LinkedList; -import java.util.List; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; -import org.eclipse.gmf.runtime.notation.NotationPackage; +package hu.bme.mit.inf.yakinduModelExtractor; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.gmf.runtime.notation.NotationPackage; import org.yakindu.sct.model.sgraph.SGraphPackage; public class ModelManager { @@ -28,27 +28,27 @@ public class ModelManager { public void init() { SGraphPackage.eINSTANCE.eClass(); NotationPackage.eINSTANCE.eClass(); - resourceSet = new ResourceSetImpl(); + resourceSet = new ResourceSetImpl(); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl()); } - - public List loadAllModelPathsInDirectory(String path) { - File directory = new File(path); - if(directory.exists() && directory.isDirectory()) { - List filePaths = new LinkedList<>(); - for(File f : directory.listFiles()) { - if(f.isFile()) { - String filePath = f.getPath(); - if(filePath.endsWith("sct")) { - filePaths.add(filePath); - } - } - } - return filePaths; - } else { - throw new IllegalArgumentException("invalid path"); - } - } + + public List loadAllModelPathsInDirectory(String path) { + File directory = new File(path); + if(directory.exists() && directory.isDirectory()) { + List filePaths = new LinkedList<>(); + for(File f : directory.listFiles()) { + if(f.isFile()) { + String filePath = f.getPath(); + if(filePath.endsWith("sct")) { + filePaths.add(filePath); + } + } + } + return filePaths; + } else { + throw new IllegalArgumentException("invalid path"); + } + } public EObject loadModel(String path) { Resource resource = this.resourceSet.getResource(URI.createFileURI(path), true); diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/.classpath b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/.classpath index e84a3295..a9e661c7 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/.classpath +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/.classpath @@ -7,5 +7,6 @@ + diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF index 338e8c09..878247b1 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF @@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.logic.model;singleton:=true Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: . Bundle-Vendor: %providerName Bundle-Localization: plugin Export-Package: hu.bme.mit.inf.dslreasoner.logic.model.builder, @@ -22,6 +21,7 @@ Export-Package: hu.bme.mit.inf.dslreasoner.logic.model.builder, hu.bme.mit.inf.dslreasoner.util, hu.bme.mit.inf.dslreasoner.workspace Require-Bundle: org.eclipse.core.runtime, +<<<<<<< HEAD org.eclipse.emf.ecore;visibility:=reexport, com.google.guava, org.eclipse.xtend.lib, @@ -30,7 +30,17 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.viatra.query.runtime;bundle-version="1.3.0", org.apache.commons.lang;bundle-version="2.6.0", org.eclipse.emf.ecore.xmi;bundle-version="2.13.0" +======= + org.eclipse.emf.ecore;visibility:=reexport, + com.google.guava, + org.eclipse.xtend.lib, + org.eclipse.xtext.xbase.lib, + org.eclipse.core.resources;bundle-version="3.8.101", + org.eclipse.viatra.query.runtime;bundle-version="1.3.0", + org.apache.commons.lang;bundle-version="2.6.0", + org.eclipse.emf.ecore.xmi;bundle-version="2.13.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +>>>>>>> b42fb751... Add gitignore, commit everything Import-Package: org.apache.log4j Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.logic.model -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/build.properties b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/build.properties index 9403fc5f..c18a0403 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/build.properties +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/build.properties @@ -8,5 +8,6 @@ source.. = ecore-gen/,\ src/,\ xtend-gen/,\ patterns/,\ - vql-gen/ + vql-gen/,\ + src-gen/ output.. = bin/ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.CSERposterSample.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.CSERposterSample.java._trace new file mode 100644 index 00000000..32fa550b Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.CSERposterSample.java._trace differ diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.classpath b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.classpath index de68b5f7..a29b9deb 100644 --- a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.classpath +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.classpath @@ -7,5 +7,6 @@ + diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/build.properties b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/build.properties index 685c072b..1eb934ae 100644 --- a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/build.properties +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/build.properties @@ -6,5 +6,6 @@ jars.compile.order = . source.. = src/,\ queries/,\ xtend-gen/,\ - vql-gen/ + vql-gen/,\ + src-gen/ output.. = bin/ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/.classpath b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/.classpath deleted file mode 100644 index a0c6dd9c..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/.project b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/.project deleted file mode 100644 index 85d1308e..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/.project +++ /dev/null @@ -1,29 +0,0 @@ - - - ca.mcgill.ecse.dslreasoner.trace.logic2vampire - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.sirius.nature.modelingproject - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/META-INF/MANIFEST.MF b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/META-INF/MANIFEST.MF deleted file mode 100644 index f4f91de8..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/META-INF/MANIFEST.MF +++ /dev/null @@ -1,7 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: ca.mcgill.ecse.dslreasoner.trace.logic2vampire -Bundle-SymbolicName: ca.mcgill.ecse.dslreasoner.trace.logic2vampire; singleton:=true -Bundle-Version: 0.1.0.qualifier -Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.core.runtime diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.aird b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.aird deleted file mode 100644 index 4fda4ff6..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.aird +++ /dev/null @@ -1,30 +0,0 @@ - - - - logic2vampire.ecore - logic2vampire.genmodel - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.ecore b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.ecore deleted file mode 100644 index 0cdf6d7f..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.ecore +++ /dev/null @@ -1,4 +0,0 @@ - - diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.genmodel b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.genmodel deleted file mode 100644 index 32de743d..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.genmodel +++ /dev/null @@ -1,14 +0,0 @@ - - - logic2vampire.ecore - - - diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeModule.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeModule.xtendbin index 035b992e..416a4ced 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeModule.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeModule.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeSetup.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeSetup.xtendbin index 3a2b0f09..4c3a5366 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeSetup.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeSetup.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/.VampireLanguageUiModule.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/.VampireLanguageUiModule.xtendbin index b8a39035..b9e07a68 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/.VampireLanguageUiModule.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/.VampireLanguageUiModule.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/.VampireLanguageProposalProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/.VampireLanguageProposalProvider.xtendbin index c462e145..f51dce03 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/.VampireLanguageProposalProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/.VampireLanguageProposalProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageDescriptionLabelProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageDescriptionLabelProvider.xtendbin index 2d3b2709..23bdd607 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageDescriptionLabelProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageDescriptionLabelProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageLabelProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageLabelProvider.xtendbin index 8640966e..438765b1 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageLabelProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageLabelProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/outline/.VampireLanguageOutlineTreeProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/outline/.VampireLanguageOutlineTreeProvider.xtendbin index 183e5e40..fb05770c 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/outline/.VampireLanguageOutlineTreeProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/outline/.VampireLanguageOutlineTreeProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/quickfix/.VampireLanguageQuickfixProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/quickfix/.VampireLanguageQuickfixProvider.xtendbin index 7c2fb4bf..1626ed6c 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/quickfix/.VampireLanguageQuickfixProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/quickfix/.VampireLanguageQuickfixProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSFiniteModel.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSFiniteModel.java deleted file mode 100644 index bfd23d8d..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSFiniteModel.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * generated by Xtext 2.12.0 - */ -package ca.mcgill.ecse.dslreasoner.vampireLanguage; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'VLS Finite Model'. - * - * - * - * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSFiniteModel() - * @model - * @generated - */ -public interface VLSFiniteModel extends EObject -{ -} // VLSFiniteModel diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSFunctionFof.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSFunctionFof.java deleted file mode 100644 index d151685f..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSFunctionFof.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * generated by Xtext 2.12.0 - */ -package ca.mcgill.ecse.dslreasoner.vampireLanguage; - -import org.eclipse.emf.common.util.EList; - -/** - * - * A representation of the model object 'VLS Function Fof'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof#getFunctor Functor}
  • - *
  • {@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof#getTerms Terms}
  • - *
- * - * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSFunctionFof() - * @model - * @generated - */ -public interface VLSFunctionFof extends VLSTerm -{ - /** - * Returns the value of the 'Functor' attribute. - * - *

- * If the meaning of the 'Functor' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Functor' attribute. - * @see #setFunctor(String) - * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSFunctionFof_Functor() - * @model - * @generated - */ - String getFunctor(); - - /** - * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof#getFunctor Functor}' attribute. - * - * - * @param value the new value of the 'Functor' attribute. - * @see #getFunctor() - * @generated - */ - void setFunctor(String value); - - /** - * Returns the value of the 'Terms' containment reference list. - * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm}. - * - *

- * If the meaning of the 'Terms' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Terms' containment reference list. - * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSFunctionFof_Terms() - * @model containment="true" - * @generated - */ - EList getTerms(); - -} // VLSFunctionFof diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSTrying.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSTrying.java deleted file mode 100644 index c2080a9c..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSTrying.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * generated by Xtext 2.12.0 - */ -package ca.mcgill.ecse.dslreasoner.vampireLanguage; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'VLS Trying'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTrying#getName Name}
  • - *
- * - * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSTrying() - * @model - * @generated - */ -public interface VLSTrying extends EObject -{ - /** - * Returns the value of the 'Name' attribute. - * - *

- * If the meaning of the 'Name' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSTrying_Name() - * @model - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTrying#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - -} // VLSTrying diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFiniteModelImpl.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFiniteModelImpl.java deleted file mode 100644 index dfbbf6ed..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFiniteModelImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * generated by Xtext 2.12.0 - */ -package ca.mcgill.ecse.dslreasoner.vampireLanguage.impl; - -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFiniteModel; -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; - -/** - * - * An implementation of the model object 'VLS Finite Model'. - * - * - * @generated - */ -public class VLSFiniteModelImpl extends MinimalEObjectImpl.Container implements VLSFiniteModel -{ - /** - * - * - * @generated - */ - protected VLSFiniteModelImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return VampireLanguagePackage.Literals.VLS_FINITE_MODEL; - } - -} //VLSFiniteModelImpl diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFunctionFofImpl.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFunctionFofImpl.java deleted file mode 100644 index 6d1c538b..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFunctionFofImpl.java +++ /dev/null @@ -1,240 +0,0 @@ -/** - * generated by Xtext 2.12.0 - */ -package ca.mcgill.ecse.dslreasoner.vampireLanguage.impl; - -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof; -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm; -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage; - -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; - -/** - * - * An implementation of the model object 'VLS Function Fof'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSFunctionFofImpl#getFunctor Functor}
  • - *
  • {@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSFunctionFofImpl#getTerms Terms}
  • - *
- * - * @generated - */ -public class VLSFunctionFofImpl extends VLSTermImpl implements VLSFunctionFof -{ - /** - * The default value of the '{@link #getFunctor() Functor}' attribute. - * - * - * @see #getFunctor() - * @generated - * @ordered - */ - protected static final String FUNCTOR_EDEFAULT = null; - - /** - * The cached value of the '{@link #getFunctor() Functor}' attribute. - * - * - * @see #getFunctor() - * @generated - * @ordered - */ - protected String functor = FUNCTOR_EDEFAULT; - - /** - * The cached value of the '{@link #getTerms() Terms}' containment reference list. - * - * - * @see #getTerms() - * @generated - * @ordered - */ - protected EList terms; - - /** - * - * - * @generated - */ - protected VLSFunctionFofImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return VampireLanguagePackage.Literals.VLS_FUNCTION_FOF; - } - - /** - * - * - * @generated - */ - public String getFunctor() - { - return functor; - } - - /** - * - * - * @generated - */ - public void setFunctor(String newFunctor) - { - String oldFunctor = functor; - functor = newFunctor; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, VampireLanguagePackage.VLS_FUNCTION_FOF__FUNCTOR, oldFunctor, functor)); - } - - /** - * - * - * @generated - */ - public EList getTerms() - { - if (terms == null) - { - terms = new EObjectContainmentEList(VLSTerm.class, this, VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS); - } - return terms; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS: - return ((InternalEList)getTerms()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case VampireLanguagePackage.VLS_FUNCTION_FOF__FUNCTOR: - return getFunctor(); - case VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS: - return getTerms(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case VampireLanguagePackage.VLS_FUNCTION_FOF__FUNCTOR: - setFunctor((String)newValue); - return; - case VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS: - getTerms().clear(); - getTerms().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case VampireLanguagePackage.VLS_FUNCTION_FOF__FUNCTOR: - setFunctor(FUNCTOR_EDEFAULT); - return; - case VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS: - getTerms().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case VampireLanguagePackage.VLS_FUNCTION_FOF__FUNCTOR: - return FUNCTOR_EDEFAULT == null ? functor != null : !FUNCTOR_EDEFAULT.equals(functor); - case VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS: - return terms != null && !terms.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (functor: "); - result.append(functor); - result.append(')'); - return result.toString(); - } - -} //VLSFunctionFofImpl diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSTryingImpl.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSTryingImpl.java deleted file mode 100644 index 40e62d9e..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSTryingImpl.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * generated by Xtext 2.12.0 - */ -package ca.mcgill.ecse.dslreasoner.vampireLanguage.impl; - -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTrying; -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage; - -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; - -/** - * - * An implementation of the model object 'VLS Trying'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSTryingImpl#getName Name}
  • - *
- * - * @generated - */ -public class VLSTryingImpl extends MinimalEObjectImpl.Container implements VLSTrying -{ - /** - * 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 VLSTryingImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return VampireLanguagePackage.Literals.VLS_TRYING; - } - - /** - * - * - * @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, VampireLanguagePackage.VLS_TRYING__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case VampireLanguagePackage.VLS_TRYING__NAME: - return getName(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case VampireLanguagePackage.VLS_TRYING__NAME: - setName((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case VampireLanguagePackage.VLS_TRYING__NAME: - setName(NAME_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case VampireLanguagePackage.VLS_TRYING__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(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - -} //VLSTryingImpl diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageRuntimeModule.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageRuntimeModule.xtendbin index 415d0cc9..c38505ea 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageRuntimeModule.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageRuntimeModule.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageStandaloneSetup.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageStandaloneSetup.xtendbin index 9d43d4a1..3ab52ff6 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageStandaloneSetup.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageStandaloneSetup.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin index d3a5a764..e845ff1e 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/generator/.VampireLanguageGenerator.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/generator/.VampireLanguageGenerator.xtendbin index dd4b1eaa..d45af918 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/generator/.VampireLanguageGenerator.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/generator/.VampireLanguageGenerator.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/scoping/.VampireLanguageScopeProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/scoping/.VampireLanguageScopeProvider.xtendbin index a3a95c68..cc9d50ce 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/scoping/.VampireLanguageScopeProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/scoping/.VampireLanguageScopeProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/validation/.VampireLanguageValidator.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/validation/.VampireLanguageValidator.xtendbin index 88c7412c..0418e131 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/validation/.VampireLanguageValidator.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/validation/.VampireLanguageValidator.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/.gitignore b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/.gitignore index ae3c1726..39fc9cc5 100644 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/.gitignore +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/.gitignore @@ -1 +1,2 @@ /bin/ +/src-gen/ \ No newline at end of file diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSAnd.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSAnd.java deleted file mode 100644 index 23d9293f..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSAnd.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSAnd(term: VLSAnd){
- *         	VLSAnd(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSAnd extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd"; - } - - @Override - public List parameterNames() { - return VLSAnd.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSAnd.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSAnd.Match)) { - VLSAnd.Match other = (VLSAnd.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSAnd specification() { - return VLSAnd.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSAnd.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSAnd.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSAnd.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSAnd.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSAnd.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSAnd(term: VLSAnd){
-   * 	VLSAnd(term);
-   * }
-   * 
- * - * @see Match - * @see VLSAnd - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSAnd.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSAnd.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSAnd.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSAnd.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) { - return VLSAnd.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSAnd.Match tupleToMatch(final Tuple t) { - try { - return VLSAnd.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSAnd.Match arrayToMatch(final Object[] match) { - try { - return VLSAnd.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSAnd.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSAnd.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSAnd.instance(); - } - } - - private VLSAnd() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSAnd instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSAnd.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSAnd.Matcher.on(engine); - } - - @Override - public VLSAnd.Matcher instantiate() { - return VLSAnd.Matcher.create(); - } - - @Override - public VLSAnd.Match newEmptyMatch() { - return VLSAnd.Match.newEmptyMatch(); - } - - @Override - public VLSAnd.Match newMatch(final Object... parameters) { - return VLSAnd.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd (visibility: PUBLIC, simpleName: VLSAnd, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd (visibility: PUBLIC, simpleName: VLSAnd, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSAnd INSTANCE = new VLSAnd(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSAnd.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSAnd")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSAnd"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSAnd(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSAnd"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSAnnotation.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSAnnotation.java deleted file mode 100644 index 282d813f..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSAnnotation.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSAnnotation(term: VLSAnnotation){
- *         	VLSAnnotation(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSAnnotation extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation"; - } - - @Override - public List parameterNames() { - return VLSAnnotation.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSAnnotation.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSAnnotation.Match)) { - VLSAnnotation.Match other = (VLSAnnotation.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSAnnotation specification() { - return VLSAnnotation.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSAnnotation.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSAnnotation.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSAnnotation.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSAnnotation.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSAnnotation.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSAnnotation(term: VLSAnnotation){
-   * 	VLSAnnotation(term);
-   * }
-   * 
- * - * @see Match - * @see VLSAnnotation - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSAnnotation.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSAnnotation.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSAnnotation.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSAnnotation.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) { - return VLSAnnotation.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSAnnotation.Match tupleToMatch(final Tuple t) { - try { - return VLSAnnotation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSAnnotation.Match arrayToMatch(final Object[] match) { - try { - return VLSAnnotation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSAnnotation.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSAnnotation.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSAnnotation.instance(); - } - } - - private VLSAnnotation() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSAnnotation instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSAnnotation.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSAnnotation.Matcher.on(engine); - } - - @Override - public VLSAnnotation.Matcher instantiate() { - return VLSAnnotation.Matcher.create(); - } - - @Override - public VLSAnnotation.Match newEmptyMatch() { - return VLSAnnotation.Match.newEmptyMatch(); - } - - @Override - public VLSAnnotation.Match newMatch(final Object... parameters) { - return VLSAnnotation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation (visibility: PUBLIC, simpleName: VLSAnnotation, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation (visibility: PUBLIC, simpleName: VLSAnnotation, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSAnnotation INSTANCE = new VLSAnnotation(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSAnnotation.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSAnnotation")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSAnnotation"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSAnnotation(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSAnnotation"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSComment.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSComment.java deleted file mode 100644 index ec2bfef3..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSComment.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSComment(term: VLSComment){
- *         	VLSComment(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSComment extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment"; - } - - @Override - public List parameterNames() { - return VLSComment.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSComment.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSComment.Match)) { - VLSComment.Match other = (VLSComment.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSComment specification() { - return VLSComment.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSComment.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSComment.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSComment.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSComment.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSComment.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSComment(term: VLSComment){
-   * 	VLSComment(term);
-   * }
-   * 
- * - * @see Match - * @see VLSComment - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSComment.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSComment.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSComment.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSComment.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) { - return VLSComment.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSComment.Match tupleToMatch(final Tuple t) { - try { - return VLSComment.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSComment.Match arrayToMatch(final Object[] match) { - try { - return VLSComment.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSComment.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSComment.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSComment.instance(); - } - } - - private VLSComment() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSComment instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSComment.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSComment.Matcher.on(engine); - } - - @Override - public VLSComment.Matcher instantiate() { - return VLSComment.Matcher.create(); - } - - @Override - public VLSComment.Match newEmptyMatch() { - return VLSComment.Match.newEmptyMatch(); - } - - @Override - public VLSComment.Match newMatch(final Object... parameters) { - return VLSComment.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment (visibility: PUBLIC, simpleName: VLSComment, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment (visibility: PUBLIC, simpleName: VLSComment, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSComment INSTANCE = new VLSComment(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSComment.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSComment")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSComment"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSComment(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSComment"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSEquivalent.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSEquivalent.java deleted file mode 100644 index 5a174fed..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSEquivalent.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSEquivalent(term: VLSEquivalent){
- *         	VLSEquivalent(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSEquivalent extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent"; - } - - @Override - public List parameterNames() { - return VLSEquivalent.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSEquivalent.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSEquivalent.Match)) { - VLSEquivalent.Match other = (VLSEquivalent.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSEquivalent specification() { - return VLSEquivalent.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSEquivalent.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSEquivalent.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSEquivalent.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSEquivalent.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSEquivalent.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSEquivalent(term: VLSEquivalent){
-   * 	VLSEquivalent(term);
-   * }
-   * 
- * - * @see Match - * @see VLSEquivalent - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSEquivalent.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSEquivalent.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSEquivalent.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSEquivalent.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) { - return VLSEquivalent.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSEquivalent.Match tupleToMatch(final Tuple t) { - try { - return VLSEquivalent.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSEquivalent.Match arrayToMatch(final Object[] match) { - try { - return VLSEquivalent.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSEquivalent.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSEquivalent.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSEquivalent.instance(); - } - } - - private VLSEquivalent() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSEquivalent instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSEquivalent.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSEquivalent.Matcher.on(engine); - } - - @Override - public VLSEquivalent.Matcher instantiate() { - return VLSEquivalent.Matcher.create(); - } - - @Override - public VLSEquivalent.Match newEmptyMatch() { - return VLSEquivalent.Match.newEmptyMatch(); - } - - @Override - public VLSEquivalent.Match newMatch(final Object... parameters) { - return VLSEquivalent.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent (visibility: PUBLIC, simpleName: VLSEquivalent, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent (visibility: PUBLIC, simpleName: VLSEquivalent, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSEquivalent INSTANCE = new VLSEquivalent(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSEquivalent.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSEquivalent")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSEquivalent"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSEquivalent(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSEquivalent"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSExistentialQuantifier.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSExistentialQuantifier.java deleted file mode 100644 index 137e4ca0..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSExistentialQuantifier.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSExistentialQuantifier(term: VLSExistentialQuantifier){
- *         	VLSExistentialQuantifier(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSExistentialQuantifier extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier"; - } - - @Override - public List parameterNames() { - return VLSExistentialQuantifier.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSExistentialQuantifier.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSExistentialQuantifier.Match)) { - VLSExistentialQuantifier.Match other = (VLSExistentialQuantifier.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSExistentialQuantifier specification() { - return VLSExistentialQuantifier.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSExistentialQuantifier.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSExistentialQuantifier.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSExistentialQuantifier.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSExistentialQuantifier.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSExistentialQuantifier.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSExistentialQuantifier(term: VLSExistentialQuantifier){
-   * 	VLSExistentialQuantifier(term);
-   * }
-   * 
- * - * @see Match - * @see VLSExistentialQuantifier - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSExistentialQuantifier.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSExistentialQuantifier.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSExistentialQuantifier.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSExistentialQuantifier.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) { - return VLSExistentialQuantifier.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSExistentialQuantifier.Match tupleToMatch(final Tuple t) { - try { - return VLSExistentialQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSExistentialQuantifier.Match arrayToMatch(final Object[] match) { - try { - return VLSExistentialQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSExistentialQuantifier.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSExistentialQuantifier.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSExistentialQuantifier.instance(); - } - } - - private VLSExistentialQuantifier() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSExistentialQuantifier instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSExistentialQuantifier.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSExistentialQuantifier.Matcher.on(engine); - } - - @Override - public VLSExistentialQuantifier.Matcher instantiate() { - return VLSExistentialQuantifier.Matcher.create(); - } - - @Override - public VLSExistentialQuantifier.Match newEmptyMatch() { - return VLSExistentialQuantifier.Match.newEmptyMatch(); - } - - @Override - public VLSExistentialQuantifier.Match newMatch(final Object... parameters) { - return VLSExistentialQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier (visibility: PUBLIC, simpleName: VLSExistentialQuantifier, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier (visibility: PUBLIC, simpleName: VLSExistentialQuantifier, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSExistentialQuantifier INSTANCE = new VLSExistentialQuantifier(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSExistentialQuantifier.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSExistentialQuantifier")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSExistentialQuantifier"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSExistentialQuantifier(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSExistentialQuantifier"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFofFormula.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFofFormula.java deleted file mode 100644 index f55f408a..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFofFormula.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSFofFormula(term: VLSFofFormula){
- *         	VLSFofFormula(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSFofFormula extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula"; - } - - @Override - public List parameterNames() { - return VLSFofFormula.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSFofFormula.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSFofFormula.Match)) { - VLSFofFormula.Match other = (VLSFofFormula.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSFofFormula specification() { - return VLSFofFormula.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSFofFormula.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSFofFormula.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSFofFormula.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSFofFormula.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSFofFormula.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSFofFormula(term: VLSFofFormula){
-   * 	VLSFofFormula(term);
-   * }
-   * 
- * - * @see Match - * @see VLSFofFormula - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSFofFormula.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSFofFormula.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSFofFormula.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSFofFormula.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) { - return VLSFofFormula.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSFofFormula.Match tupleToMatch(final Tuple t) { - try { - return VLSFofFormula.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSFofFormula.Match arrayToMatch(final Object[] match) { - try { - return VLSFofFormula.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSFofFormula.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSFofFormula.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSFofFormula.instance(); - } - } - - private VLSFofFormula() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSFofFormula instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSFofFormula.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSFofFormula.Matcher.on(engine); - } - - @Override - public VLSFofFormula.Matcher instantiate() { - return VLSFofFormula.Matcher.create(); - } - - @Override - public VLSFofFormula.Match newEmptyMatch() { - return VLSFofFormula.Match.newEmptyMatch(); - } - - @Override - public VLSFofFormula.Match newMatch(final Object... parameters) { - return VLSFofFormula.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula (visibility: PUBLIC, simpleName: VLSFofFormula, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula (visibility: PUBLIC, simpleName: VLSFofFormula, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSFofFormula INSTANCE = new VLSFofFormula(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSFofFormula.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFofFormula")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFofFormula"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSFofFormula(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFofFormula"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFunction.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFunction.java deleted file mode 100644 index f81a6e1a..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFunction.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSFunction(term: VLSFunction){
- *         	VLSFunction(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSFunction extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction"; - } - - @Override - public List parameterNames() { - return VLSFunction.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSFunction.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSFunction.Match)) { - VLSFunction.Match other = (VLSFunction.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSFunction specification() { - return VLSFunction.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSFunction.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSFunction.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSFunction.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSFunction.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSFunction.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSFunction(term: VLSFunction){
-   * 	VLSFunction(term);
-   * }
-   * 
- * - * @see Match - * @see VLSFunction - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSFunction.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSFunction.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSFunction.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSFunction.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) { - return VLSFunction.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSFunction.Match tupleToMatch(final Tuple t) { - try { - return VLSFunction.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSFunction.Match arrayToMatch(final Object[] match) { - try { - return VLSFunction.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSFunction.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSFunction.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSFunction.instance(); - } - } - - private VLSFunction() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSFunction instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSFunction.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSFunction.Matcher.on(engine); - } - - @Override - public VLSFunction.Matcher instantiate() { - return VLSFunction.Matcher.create(); - } - - @Override - public VLSFunction.Match newEmptyMatch() { - return VLSFunction.Match.newEmptyMatch(); - } - - @Override - public VLSFunction.Match newMatch(final Object... parameters) { - return VLSFunction.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction (visibility: PUBLIC, simpleName: VLSFunction, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction (visibility: PUBLIC, simpleName: VLSFunction, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSFunction INSTANCE = new VLSFunction(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSFunction.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunction")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunction"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSFunction(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunction"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFunctionFof.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFunctionFof.java deleted file mode 100644 index 86a3b95c..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFunctionFof.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSFunctionFof(term: VLSFunctionFof){
- *         	VLSFunctionFof(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof"; - } - - @Override - public List parameterNames() { - return VLSFunctionFof.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSFunctionFof.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSFunctionFof.Match)) { - VLSFunctionFof.Match other = (VLSFunctionFof.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSFunctionFof specification() { - return VLSFunctionFof.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSFunctionFof.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSFunctionFof.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSFunctionFof.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSFunctionFof.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSFunctionFof.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSFunctionFof(term: VLSFunctionFof){
-   * 	VLSFunctionFof(term);
-   * }
-   * 
- * - * @see Match - * @see VLSFunctionFof - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSFunctionFof.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSFunctionFof.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSFunctionFof.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSFunctionFof.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { - return VLSFunctionFof.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSFunctionFof.Match tupleToMatch(final Tuple t) { - try { - return VLSFunctionFof.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSFunctionFof.Match arrayToMatch(final Object[] match) { - try { - return VLSFunctionFof.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSFunctionFof.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSFunctionFof.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSFunctionFof.instance(); - } - } - - private VLSFunctionFof() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSFunctionFof instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSFunctionFof.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSFunctionFof.Matcher.on(engine); - } - - @Override - public VLSFunctionFof.Matcher instantiate() { - return VLSFunctionFof.Matcher.create(); - } - - @Override - public VLSFunctionFof.Match newEmptyMatch() { - return VLSFunctionFof.Match.newEmptyMatch(); - } - - @Override - public VLSFunctionFof.Match newMatch(final Object... parameters) { - return VLSFunctionFof.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof (visibility: PUBLIC, simpleName: VLSFunctionFof, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof (visibility: PUBLIC, simpleName: VLSFunctionFof, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSFunctionFof INSTANCE = new VLSFunctionFof(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSFunctionFof.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunctionFof")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunctionFof"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSFunctionFof(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunctionFof"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSInequality.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSInequality.java deleted file mode 100644 index 0dd35ed9..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSInequality.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSInequality(term: VLSInequality){
- *         	VLSInequality(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSInequality extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality"; - } - - @Override - public List parameterNames() { - return VLSInequality.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSInequality.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSInequality.Match)) { - VLSInequality.Match other = (VLSInequality.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSInequality specification() { - return VLSInequality.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSInequality.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSInequality.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSInequality.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSInequality.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSInequality.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSInequality(term: VLSInequality){
-   * 	VLSInequality(term);
-   * }
-   * 
- * - * @see Match - * @see VLSInequality - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSInequality.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSInequality.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSInequality.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSInequality.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) { - return VLSInequality.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSInequality.Match tupleToMatch(final Tuple t) { - try { - return VLSInequality.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSInequality.Match arrayToMatch(final Object[] match) { - try { - return VLSInequality.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSInequality.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSInequality.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSInequality.instance(); - } - } - - private VLSInequality() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSInequality instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSInequality.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSInequality.Matcher.on(engine); - } - - @Override - public VLSInequality.Matcher instantiate() { - return VLSInequality.Matcher.create(); - } - - @Override - public VLSInequality.Match newEmptyMatch() { - return VLSInequality.Match.newEmptyMatch(); - } - - @Override - public VLSInequality.Match newMatch(final Object... parameters) { - return VLSInequality.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality (visibility: PUBLIC, simpleName: VLSInequality, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality (visibility: PUBLIC, simpleName: VLSInequality, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSInequality INSTANCE = new VLSInequality(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSInequality.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSInequality")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSInequality"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSInequality(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSInequality"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSOr.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSOr.java deleted file mode 100644 index 0d8e0648..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSOr.java +++ /dev/null @@ -1,535 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         //VLSFormula
- *         pattern VLSOr(term: VLSOr){
- *         	VLSOr(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSOr extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr"; - } - - @Override - public List parameterNames() { - return VLSOr.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSOr.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSOr.Match)) { - VLSOr.Match other = (VLSOr.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSOr specification() { - return VLSOr.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSOr.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSOr.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSOr.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSOr.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSOr.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * //VLSFormula
-   * pattern VLSOr(term: VLSOr){
-   * 	VLSOr(term);
-   * }
-   * 
- * - * @see Match - * @see VLSOr - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSOr.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSOr.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSOr.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSOr.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { - return VLSOr.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSOr.Match tupleToMatch(final Tuple t) { - try { - return VLSOr.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSOr.Match arrayToMatch(final Object[] match) { - try { - return VLSOr.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSOr.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSOr.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSOr.instance(); - } - } - - private VLSOr() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSOr instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSOr.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSOr.Matcher.on(engine); - } - - @Override - public VLSOr.Matcher instantiate() { - return VLSOr.Matcher.create(); - } - - @Override - public VLSOr.Match newEmptyMatch() { - return VLSOr.Match.newEmptyMatch(); - } - - @Override - public VLSOr.Match newMatch(final Object... parameters) { - return VLSOr.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr (visibility: PUBLIC, simpleName: VLSOr, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr (visibility: PUBLIC, simpleName: VLSOr, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSOr INSTANCE = new VLSOr(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSOr.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSOr")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSOr"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSOr(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSOr"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUnaryNegation.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUnaryNegation.java deleted file mode 100644 index b6290aab..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUnaryNegation.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSUnaryNegation(term: VLSUnaryNegation){
- *         	VLSUnaryNegation(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSUnaryNegation extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation"; - } - - @Override - public List parameterNames() { - return VLSUnaryNegation.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSUnaryNegation.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSUnaryNegation.Match)) { - VLSUnaryNegation.Match other = (VLSUnaryNegation.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSUnaryNegation specification() { - return VLSUnaryNegation.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSUnaryNegation.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSUnaryNegation.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSUnaryNegation.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSUnaryNegation.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSUnaryNegation.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSUnaryNegation(term: VLSUnaryNegation){
-   * 	VLSUnaryNegation(term);
-   * }
-   * 
- * - * @see Match - * @see VLSUnaryNegation - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSUnaryNegation.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSUnaryNegation.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSUnaryNegation.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSUnaryNegation.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) { - return VLSUnaryNegation.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSUnaryNegation.Match tupleToMatch(final Tuple t) { - try { - return VLSUnaryNegation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSUnaryNegation.Match arrayToMatch(final Object[] match) { - try { - return VLSUnaryNegation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSUnaryNegation.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSUnaryNegation.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSUnaryNegation.instance(); - } - } - - private VLSUnaryNegation() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSUnaryNegation instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSUnaryNegation.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSUnaryNegation.Matcher.on(engine); - } - - @Override - public VLSUnaryNegation.Matcher instantiate() { - return VLSUnaryNegation.Matcher.create(); - } - - @Override - public VLSUnaryNegation.Match newEmptyMatch() { - return VLSUnaryNegation.Match.newEmptyMatch(); - } - - @Override - public VLSUnaryNegation.Match newMatch(final Object... parameters) { - return VLSUnaryNegation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation (visibility: PUBLIC, simpleName: VLSUnaryNegation, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation (visibility: PUBLIC, simpleName: VLSUnaryNegation, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSUnaryNegation INSTANCE = new VLSUnaryNegation(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSUnaryNegation.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUnaryNegation")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUnaryNegation"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSUnaryNegation(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUnaryNegation"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUniversalQuantifier.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUniversalQuantifier.java deleted file mode 100644 index 0dab9771..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUniversalQuantifier.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         pattern VLSUniversalQuantifier(term: VLSUniversalQuantifier){
- *         	VLSUniversalQuantifier(term);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier fTerm; - - private static List parameterNames = makeImmutableList("term"); - - private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - this.fTerm = pTerm; - } - - @Override - public Object get(final String parameterName) { - if ("term".equals(parameterName)) return this.fTerm; - return null; - } - - public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier getTerm() { - return this.fTerm; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("term".equals(parameterName) ) { - this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) newValue; - return true; - } - return false; - } - - public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fTerm = pTerm; - } - - @Override - public String patternName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier"; - } - - @Override - public List parameterNames() { - return VLSUniversalQuantifier.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fTerm}; - } - - @Override - public VLSUniversalQuantifier.Match toImmutable() { - return isMutable() ? newMatch(fTerm) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"term\"=" + prettyPrintValue(fTerm)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fTerm); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof VLSUniversalQuantifier.Match)) { - VLSUniversalQuantifier.Match other = (VLSUniversalQuantifier.Match) obj; - return Objects.equals(fTerm, other.fTerm); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public VLSUniversalQuantifier specification() { - return VLSUniversalQuantifier.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static VLSUniversalQuantifier.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static VLSUniversalQuantifier.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - return new Mutable(pTerm); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public static VLSUniversalQuantifier.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - return new Immutable(pTerm); - } - - private static final class Mutable extends VLSUniversalQuantifier.Match { - Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends VLSUniversalQuantifier.Match { - Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - super(pTerm); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * pattern VLSUniversalQuantifier(term: VLSUniversalQuantifier){
-   * 	VLSUniversalQuantifier(term);
-   * }
-   * 
- * - * @see Match - * @see VLSUniversalQuantifier - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static VLSUniversalQuantifier.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static VLSUniversalQuantifier.Matcher create() { - return new Matcher(); - } - - private final static int POSITION_TERM = 0; - - private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSUniversalQuantifier.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - return rawStreamAllMatches(new Object[]{pTerm}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - return rawGetOneArbitraryMatch(new Object[]{pTerm}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - return rawHasMatch(new Object[]{pTerm}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - return rawCountMatches(new Object[]{pTerm}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pTerm the fixed value of pattern parameter term, or null if not bound. - * @return the (partial) match object. - * - */ - public VLSUniversalQuantifier.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { - return VLSUniversalQuantifier.Match.newMatch(pTerm); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfterm(final Object[] parameters) { - return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for term. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfterm() { - return rawStreamAllValuesOfterm(emptyArray()); - } - - @Override - protected VLSUniversalQuantifier.Match tupleToMatch(final Tuple t) { - try { - return VLSUniversalQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) t.get(POSITION_TERM)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected VLSUniversalQuantifier.Match arrayToMatch(final Object[] match) { - try { - return VLSUniversalQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected VLSUniversalQuantifier.Match arrayToMatchMutable(final Object[] match) { - try { - return VLSUniversalQuantifier.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) match[POSITION_TERM]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return VLSUniversalQuantifier.instance(); - } - } - - private VLSUniversalQuantifier() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static VLSUniversalQuantifier instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected VLSUniversalQuantifier.Matcher instantiate(final ViatraQueryEngine engine) { - return VLSUniversalQuantifier.Matcher.on(engine); - } - - @Override - public VLSUniversalQuantifier.Matcher instantiate() { - return VLSUniversalQuantifier.Matcher.create(); - } - - @Override - public VLSUniversalQuantifier.Match newEmptyMatch() { - return VLSUniversalQuantifier.Match.newEmptyMatch(); - } - - @Override - public VLSUniversalQuantifier.Match newMatch(final Object... parameters) { - return VLSUniversalQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier (visibility: PUBLIC, simpleName: VLSUniversalQuantifier, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier (visibility: PUBLIC, simpleName: VLSUniversalQuantifier, identifier: ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private final static VLSUniversalQuantifier INSTANCE = new VLSUniversalQuantifier(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private final static Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private final static VLSUniversalQuantifier.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUniversalQuantifier")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_term); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("term"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_term = body.getOrCreateVariableByName("term"); - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUniversalQuantifier"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_term, parameter_term) - )); - // VLSUniversalQuantifier(term) - new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUniversalQuantifier"))); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VampireQueries.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VampireQueries.java deleted file mode 100644 index e3518cd6..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VampireQueries.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql - */ -package ca.mcgill.ecse.dslreasoner.vampire.queries; - -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation; -import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; - -/** - * A pattern group formed of all public patterns defined in vampireQueries.vql. - * - *

Use the static instance as any {@link interface org.eclipse.viatra.query.runtime.api.IQueryGroup}, to conveniently prepare - * a VIATRA Query engine for matching all patterns originally defined in file vampireQueries.vql, - * in order to achieve better performance than one-by-one on-demand matcher initialization. - * - *

From package ca.mcgill.ecse.dslreasoner.vampire.queries, the group contains the definition of the following patterns:

    - *
  • VLSComment
  • - *
  • VLSFofFormula
  • - *
  • VLSAnnotation
  • - *
  • VLSOr
  • - *
  • VLSAnd
  • - *
  • VLSEquivalent
  • - *
  • VLSFunction
  • - *
  • VLSExistentialQuantifier
  • - *
  • VLSUniversalQuantifier
  • - *
  • VLSUnaryNegation
  • - *
  • VLSInequality
  • - *
  • VLSFunctionFof
  • - *
- * - * @see IQueryGroup - * - */ -@SuppressWarnings("all") -public final class VampireQueries extends BaseGeneratedPatternGroup { - /** - * Access the pattern group. - * - * @return the singleton instance of the group - * @throws ViatraQueryRuntimeException if there was an error loading the generated code of pattern specifications - * - */ - public static VampireQueries instance() { - if (INSTANCE == null) { - INSTANCE = new VampireQueries(); - } - return INSTANCE; - } - - private static VampireQueries INSTANCE; - - private VampireQueries() { - querySpecifications.add(VLSComment.instance()); - querySpecifications.add(VLSFofFormula.instance()); - querySpecifications.add(VLSAnnotation.instance()); - querySpecifications.add(VLSOr.instance()); - querySpecifications.add(VLSAnd.instance()); - querySpecifications.add(VLSEquivalent.instance()); - querySpecifications.add(VLSFunction.instance()); - querySpecifications.add(VLSExistentialQuantifier.instance()); - querySpecifications.add(VLSUniversalQuantifier.instance()); - querySpecifications.add(VLSUnaryNegation.instance()); - querySpecifications.add(VLSInequality.instance()); - querySpecifications.add(VLSFunctionFof.instance()); - } - - public VLSComment getVLSComment() { - return VLSComment.instance(); - } - - public VLSComment.Matcher getVLSComment(final ViatraQueryEngine engine) { - return VLSComment.Matcher.on(engine); - } - - public VLSFofFormula getVLSFofFormula() { - return VLSFofFormula.instance(); - } - - public VLSFofFormula.Matcher getVLSFofFormula(final ViatraQueryEngine engine) { - return VLSFofFormula.Matcher.on(engine); - } - - public VLSAnnotation getVLSAnnotation() { - return VLSAnnotation.instance(); - } - - public VLSAnnotation.Matcher getVLSAnnotation(final ViatraQueryEngine engine) { - return VLSAnnotation.Matcher.on(engine); - } - - public VLSOr getVLSOr() { - return VLSOr.instance(); - } - - public VLSOr.Matcher getVLSOr(final ViatraQueryEngine engine) { - return VLSOr.Matcher.on(engine); - } - - public VLSAnd getVLSAnd() { - return VLSAnd.instance(); - } - - public VLSAnd.Matcher getVLSAnd(final ViatraQueryEngine engine) { - return VLSAnd.Matcher.on(engine); - } - - public VLSEquivalent getVLSEquivalent() { - return VLSEquivalent.instance(); - } - - public VLSEquivalent.Matcher getVLSEquivalent(final ViatraQueryEngine engine) { - return VLSEquivalent.Matcher.on(engine); - } - - public VLSFunction getVLSFunction() { - return VLSFunction.instance(); - } - - public VLSFunction.Matcher getVLSFunction(final ViatraQueryEngine engine) { - return VLSFunction.Matcher.on(engine); - } - - public VLSExistentialQuantifier getVLSExistentialQuantifier() { - return VLSExistentialQuantifier.instance(); - } - - public VLSExistentialQuantifier.Matcher getVLSExistentialQuantifier(final ViatraQueryEngine engine) { - return VLSExistentialQuantifier.Matcher.on(engine); - } - - public VLSUniversalQuantifier getVLSUniversalQuantifier() { - return VLSUniversalQuantifier.instance(); - } - - public VLSUniversalQuantifier.Matcher getVLSUniversalQuantifier(final ViatraQueryEngine engine) { - return VLSUniversalQuantifier.Matcher.on(engine); - } - - public VLSUnaryNegation getVLSUnaryNegation() { - return VLSUnaryNegation.instance(); - } - - public VLSUnaryNegation.Matcher getVLSUnaryNegation(final ViatraQueryEngine engine) { - return VLSUnaryNegation.Matcher.on(engine); - } - - public VLSInequality getVLSInequality() { - return VLSInequality.instance(); - } - - public VLSInequality.Matcher getVLSInequality(final ViatraQueryEngine engine) { - return VLSInequality.Matcher.on(engine); - } - - public VLSFunctionFof getVLSFunctionFof() { - return VLSFunctionFof.instance(); - } - - public VLSFunctionFof.Matcher getVLSFunctionFof(final ViatraQueryEngine engine) { - return VLSFunctionFof.Matcher.on(engine); - } -} diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/.gitignore b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/.gitignore index ae3c1726..8d2cfe73 100644 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/.gitignore +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/.gitignore @@ -1 +1,3 @@ /bin/ +/src-gen/ +/xtend-gen/ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.xtend b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.xtend index 0820f47d..ff5a192e 100644 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.xtend +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.xtend @@ -81,6 +81,14 @@ class Logic2VampireLanguageMapper_ContainmentMapper { val fromType = (l.parameters.get(0) as ComplexTypeReference).referred as Type val toType = (l.parameters.get(1) as ComplexTypeReference).referred as Type + val listForAnd = newArrayList +// listForAnd.add(support.duplicate(fromType.lookup(trace.type2Predicate), varB)) + listForAnd.add(support.duplicate((l as RelationDeclaration).lookup(trace.rel2Predicate), varList)) +// listForAnd.add(createVLSInequality => [ +// it.left = support.duplicate(varA) +// it.right = support.duplicate(varB) +// ]) + val relFormula = createVLSFofFormula => [ it.name = support.toIDMultiple("containment", relName) it.fofRole = "axiom" @@ -91,11 +99,7 @@ class Logic2VampireLanguageMapper_ContainmentMapper { it.left = support.duplicate(toType.lookup(trace.type2Predicate), varA) it.right = createVLSExistentialQuantifier => [ it.variables += support.duplicate(varB) - it.operand = createVLSAnd => [ - it.left = support.duplicate(fromType.lookup(trace.type2Predicate), varB) - it.right = support.duplicate((l as RelationDeclaration).lookup(trace.rel2Predicate), - varList) - ] + it.operand = support.unfoldAnd(listForAnd) ] createVLSEquality => [ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtend b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtend deleted file mode 100644 index aba47edb..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtend +++ /dev/null @@ -1,18 +0,0 @@ -package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder - -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm -import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement -import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type -import java.util.HashMap -import java.util.Map - -class Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes implements Logic2VampireLanguageMapper_TypeMapperTrace{ - -// public var VLSFofFormula objectSuperClass - public val Map type2Predicate = new HashMap; - public val Map element2Predicate = new HashMap - public val Map type2PossibleNot = new HashMap - public val Map type2And = new HashMap - -} \ No newline at end of file diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireAnalyzerConfiguration.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireAnalyzerConfiguration.xtendbin index b86e8068..be554f99 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireAnalyzerConfiguration.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireAnalyzerConfiguration.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireSolver.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireSolver.xtendbin index 8e50f399..0ee9b884 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireSolver.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireSolver.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper.xtendbin index 99ba52b8..8e96ba14 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapperTrace.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapperTrace.xtendbin index 0210a300..ee720e29 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapperTrace.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapperTrace.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ConstantMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ConstantMapper.xtendbin index 7b01a284..528da797 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ConstantMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ConstantMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ContainmentMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ContainmentMapper.xtendbin index 9f455fdd..a1204329 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ContainmentMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ContainmentMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_RelationMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_RelationMapper.xtendbin index 0b91349d..3413fc3f 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_RelationMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_RelationMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ScopeMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ScopeMapper.xtendbin index 07e249ce..a53a998a 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ScopeMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ScopeMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_Support.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_Support.xtendbin index 115249ba..f265f6a3 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_Support.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_Support.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper.xtendbin index 2e86d0c7..efde8350 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtendbin deleted file mode 100644 index e870dabc..00000000 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtendbin and /dev/null differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper_FilteredTypes.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper_FilteredTypes.xtendbin deleted file mode 100644 index ed198ef6..00000000 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper_FilteredTypes.xtendbin and /dev/null differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Vampire2LogicMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Vampire2LogicMapper.xtendbin index cf8e4acd..2cabecc8 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Vampire2LogicMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Vampire2LogicMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireHandler.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireHandler.xtendbin index 07d5b7b4..57844580 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireHandler.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireHandler.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation.xtendbin index 983108a2..24898f59 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation_FilteredTypes.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation_FilteredTypes.xtendbin index 4442cdea..a9589e7e 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation_FilteredTypes.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation_FilteredTypes.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.java index da0e5615..8c0ae38d 100644 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.java +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.java @@ -3,7 +3,6 @@ package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder; import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper; import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapperTrace; import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper_Support; -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquality; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent; @@ -118,6 +117,8 @@ public class Logic2VampireLanguageMapper_ContainmentMapper { TypeReference _get_1 = l_1.getParameters().get(1); Type _referred_1 = ((ComplexTypeReference) _get_1).getReferred(); final Type toType = ((Type) _referred_1); + final ArrayList listForAnd = CollectionLiterals.newArrayList(); + listForAnd.add(this.support.duplicate(CollectionsUtil.lookup(((RelationDeclaration) l_1), trace.rel2Predicate), varList)); VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula(); final Procedure1 _function_3 = (VLSFofFormula it) -> { it.setName(this.support.toIDMultiple("containment", relName)); @@ -135,13 +136,7 @@ public class Logic2VampireLanguageMapper_ContainmentMapper { EList _variables_1 = it_3.getVariables(); VLSVariable _duplicate_1 = this.support.duplicate(varB); _variables_1.add(_duplicate_1); - VLSAnd _createVLSAnd = this.factory.createVLSAnd(); - final Procedure1 _function_7 = (VLSAnd it_4) -> { - it_4.setLeft(this.support.duplicate(CollectionsUtil.lookup(fromType, trace.type2Predicate), varB)); - it_4.setRight(this.support.duplicate(CollectionsUtil.lookup(((RelationDeclaration) l_1), trace.rel2Predicate), varList)); - }; - VLSAnd _doubleArrow = ObjectExtensions.operator_doubleArrow(_createVLSAnd, _function_7); - it_3.setOperand(_doubleArrow); + it_3.setOperand(this.support.unfoldAnd(listForAnd)); }; VLSExistentialQuantifier _doubleArrow = ObjectExtensions.operator_doubleArrow(_createVLSExistentialQuantifier, _function_6); it_2.setRight(_doubleArrow); diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.java deleted file mode 100644 index f7c6cb70..00000000 --- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.java +++ /dev/null @@ -1,20 +0,0 @@ -package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder; - -import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper_TypeMapperTrace; -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction; -import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm; -import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; -import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; -import java.util.HashMap; -import java.util.Map; - -@SuppressWarnings("all") -public class Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes implements Logic2VampireLanguageMapper_TypeMapperTrace { - public final Map type2Predicate = new HashMap(); - - public final Map element2Predicate = new HashMap(); - - public final Map type2PossibleNot = new HashMap(); - - public final Map type2And = new HashMap(); -} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.aird b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.aird new file mode 100644 index 00000000..75ed2fbb --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.aird @@ -0,0 +1,633 @@ + + + + fam.ecore + fam.genmodel + + + + + + + + + + + + + + + + + + + + + + + bold + + + + + + + bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bold + + + + bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + labelSize + bold + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bold + + + bold + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml index 28ea4798..a2a573fc 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml @@ -23,6 +23,8 @@ + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql index 1c6a545e..7e0db222 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql @@ -25,7 +25,7 @@ pattern type(This : Function, Target : FunctionType) = { find parent(_Child, This); Target == FunctionType::Intermediate; } - +*/ pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { FunctionalArchitectureModel.rootElements(Model, Root); } @@ -33,7 +33,7 @@ pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { pattern parent(Func : Function, Par : Function) = { Function.parent(Func, Par); } - +/* @QueryBasedFeature pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) { FunctionalElement(This); diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famSPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famSPatterns.vql deleted file mode 100644 index 307b0f9c..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famSPatterns.vql +++ /dev/null @@ -1,13 +0,0 @@ -package ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries - -//import epackage "http://www.inf.mit.bme.hu/viatrasolver/example/fam" -import epackage "FamMetamodel" - -@Constraint(message="terminatorAndInformation", severity="error", key={T}) -pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { - FunctionalOutput.outgoingLinks(Out,I); - FunctionalOutput.terminator(Out,T); -} or { - InformationLink.to(I,In); - FunctionalInput.terminator(In,T); -} \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/.gitignore b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/.gitignore index ae3c1726..7d818ce2 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/.gitignore +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/.gitignore @@ -1 +1,4 @@ /bin/ +/xtend-gen/ +/src-gen/ +/output/* diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakinduPatterns.vql_ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakinduPatterns.vql_ new file mode 100644 index 00000000..f52113ca --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakinduPatterns.vql_ @@ -0,0 +1,227 @@ +package ca.mcgill.ecse.dslreasoner.yakindu.queries + +import epackage "hu.bme.mit.inf.yakindumm" + +///////// +// Entry +///////// + +pattern entryInRegion(r1 : Region, e1 : Entry) { + Region.vertices(r1, e1); +} + +@Constraint(severity="error", message="error", key = {r1}) +pattern noEntryInRegion(r1 : Region) { + neg find entryInRegion(r1, _); +} + +@Constraint(severity="error", message="error", key = {r}) +pattern multipleEntryInRegion(r : Region) { + find entryInRegion(r, e1); + find entryInRegion(r, e2); + e1 != e2; +} + +pattern transition(t : Transition, src : Vertex, trg : Vertex) { + Transition.source(t, src); + Transition.target(t, trg); +} + +@Constraint(severity="error", message="error", key = {e}) +pattern incomingToEntry(t : Transition, e : Entry) { + find transition(t, _, e); +} + +@Constraint(severity="error", message="error", key = {e}) +pattern noOutgoingTransitionFromEntry(e : Entry) { + neg find transition(_, e, _); +} + +@Constraint(severity="error", message="error", key = {e}) +pattern multipleTransitionFromEntry(e : Entry, t1 : Transition, t2: Transition) { + Entry.outgoingTransitions(e,t1); + Entry.outgoingTransitions(e,t2); + t1!=t2; +} + +///////// +// Exit +///////// + +@Constraint(severity="error", message="error", key = {e}) +pattern outgoingFromExit(t : Transition, e : Exit) { + Exit.outgoingTransitions(e,t); +} + +///////// +// Final +///////// + +@Constraint(severity="error", message="error", key = {f}) +pattern outgoingFromFinal(t : Transition, f : FinalState) { + FinalState.outgoingTransitions(f,t); +} + +///////// +// State vs Region +///////// + +@Constraint(severity="error", message="error", key = {region}) +pattern noStateInRegion(region: Region) { + neg find StateInRegion(region,_); +} +pattern StateInRegion(region: Region, state: State) { + Region.vertices(region,state); +} + +///////// +// Choice +///////// + +@Constraint(severity="error", message="error", key = {c}) +pattern choiceHasNoOutgoing(c : Choice) { + neg find transition(_, c, _); +} + +@Constraint(severity="error", message="error", key = {c}) +pattern choiceHasNoIncoming(c: Choice) { + neg find transition(_, _, c); +} + +///////// +// Synchronization +///////// + +@Constraint(severity="error", message="error", key = {s}) +pattern synchHasNoOutgoing(s : Synchronization) { + neg find transition(_, s, _); +} + +@Constraint(severity="error", message="error", key = {s}) +pattern synchHasNoIncoming(s : Synchronization) { + neg find transition(_, _, s); +} + +@Constraint(severity="error", message="error", key = {s}) +pattern SynchronizedIncomingInSameRegion(s : Synchronization, v1 : Vertex, v2 : Vertex) { + find transition(t1, v1, s); + find transition(t2, v2, s); + t1!=t2; + Region.vertices(r, v1); + Region.vertices(r, v2); +} or { + find transition(t1, s, v1); + find transition(t2, s, v2); + t1!=t2; + Region.vertices(r, v1); + Region.vertices(r, v2); +} + +@Constraint(severity="error", message="error", key = {s}) +pattern notSynchronizingStates(s : Synchronization) { + neg find hasMultipleOutgoingTrainsition(s); + neg find hasMultipleIncomingTrainsition(s); +} + +pattern hasMultipleOutgoingTrainsition(v : Synchronization) { + find transition(_, v, trg1); + find transition(_, v, trg2); + trg1 != trg2; +} + +pattern hasMultipleIncomingTrainsition(v : Synchronization) { + find transition(_, src1, v); + find transition(_, src2, v); + src1 != src2; +} + +@Constraint(severity="error", message="error", key = {s}) +pattern SynchronizedRegionsAreNotSiblings(s : Synchronization, v1 : Vertex, v2 : Vertex) { + find transition(_, v1, s); + find transition(_, v2, s); + CompositeElement.regions.vertices(r1, v1); + CompositeElement.regions.vertices(r2, v2); + r1 != r2; +} or { + find transition(_, s, v1); + find transition(_, s, v2); + CompositeElement.regions.vertices(r1, v1); + CompositeElement.regions.vertices(r2, v2); + r1 != r2; +} + +/////////////////////////////// +// Extra +// +//@Constraint(severity="error", message="error", key = {s}) +//pattern SynchronizedRegionDoesNotHaveParent(s : Synchronization, v : Vertex) { +// find transition(_, v, s); +// neg find child(_,v); +//} or { +// find transition(_, s, v); +// neg find child(_,v); +//} + +pattern child(parent: CompositeElement, child: Vertex) { + CompositeElement.regions.vertices(parent, child); +} + +@Constraint(severity="error", message="error", key = {s}) +pattern SynchronizedRegionDoesNotHaveMultipleRegions(s : Synchronization, v : Vertex) { + find transition(_, v, s); + find child(c,v); + neg find hasMultipleRegions(c); +} or { + find transition(_, s, v); + find child(c,v); + neg find hasMultipleRegions(c); +} + + +pattern hasMultipleRegions(composite: CompositeElement) { + CompositeElement.regions(composite,region1); + CompositeElement.regions(composite,region2); + region1 != region2; +} + +/** + * Simplifying model generation + */ +@Constraint(severity="error", message="error", key = {s}) +pattern synchThree(s: Synchronization) { + Transition.target(t1,s); + Transition.target(t2,s); + Transition.target(t3,s); + t1!=t2; + t2!=t3; + t1!=t3; +} or { + Transition.source(t1,s); + Transition.source(t2,s); + Transition.source(t3,s); + t1!=t2; + t2!=t3; + t1!=t3; +} + +/** + * Simplifying model generation + */ +@Constraint(severity="error", message="error", key = {s1,s2}) +pattern twoSynch(s1 : Synchronization, s2 : Synchronization) { + Synchronization(s1); + Synchronization(s2); + s1 != s2; +} + +/** + * Model generation task: at least one synch + */ +@Constraint(severity="error", message="error", key = {s}) +pattern noSynch(s:Statechart) { + Statechart(s); + neg find synch(_); +} +pattern synch(s:Synchronization) { + Synchronization(s); +} \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.aird b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.aird new file mode 100644 index 00000000..38b2b410 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.aird @@ -0,0 +1,704 @@ + + + + yakindu_simplified.ecore + yakindu_simplified.genmodel + + + + + + + + + + + + + + + + + + + + + + + bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bold + + + + + + + + + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.ecore b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.ecore new file mode 100644 index 00000000..02b57252 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.ecore @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.genmodel b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.genmodel new file mode 100644 index 00000000..cfbafce6 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/initialModels/yakindu/yakindu_simplified.genmodel @@ -0,0 +1,40 @@ + + + yakindu_simplified.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/vampireProblem.tptp b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/vampireProblem.tptp index 3109ccc2..5c3ef527 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/vampireProblem.tptp +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/vampireProblem.tptp @@ -5,13 +5,13 @@ fof ( enumScope_FunctionType_Intermediate , axiom , ! [ A ] : ( A = eo2 <=> e_In fof ( enumScope_FunctionType_Leaf , axiom , ! [ A ] : ( A = eo3 <=> e_Leaf_FunctionType ( A ) ) ) . fof ( inheritanceHierarchyHandler , axiom , ! [ A ] : ( object ( A ) <=> ( ( t_FAMTerminator ( A ) & ( ~ t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_Function ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ~ t_FunctionalOutput ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FAMTerminator ( A ) & ( ~ t_FunctionalData ( A ) & ( t_FunctionalInterface ( A ) & ( ~ t_Function ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ~ t_FunctionalOutput ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FAMTerminator ( A ) & ( ~ t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( t_Function ( A ) & ( ~ t_InformationLink ( A ) & ( t_FunctionalElement ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ~ t_FunctionalOutput ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FAMTerminator ( A ) & ( ~ t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_Function ( A ) & ( t_InformationLink ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ~ t_FunctionalOutput ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FAMTerminator ( A ) & ( ~ t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_Function ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalElement ( A ) & ( t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ~ t_FunctionalOutput ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FAMTerminator ( A ) & ( ~ t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_Function ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & ~ t_FunctionalOutput ( A ) ) ) ) ) ) ) ) ) ) | ( ( ~ t_FAMTerminator ( A ) & ( t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_Function ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionType ( A ) & ( t_FunctionalInput ( A ) & ~ t_FunctionalOutput ( A ) ) ) ) ) ) ) ) ) ) | ( ~ t_FAMTerminator ( A ) & ( t_FunctionalData ( A ) & ( ~ t_FunctionalInterface ( A ) & ( ~ t_Function ( A ) & ( ~ t_InformationLink ( A ) & ( ~ t_FunctionalElement ( A ) & ( ~ t_FunctionalArchitectureModel ( A ) & ( ~ t_FunctionType ( A ) & ( ~ t_FunctionalInput ( A ) & t_FunctionalOutput ( A ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) . fof ( typeScope_min_object , axiom , ! [ A ] : ( ( A = o1 | ( A = o2 | ( A = o3 | ( A = o4 | ( A = o5 | ( A = o6 | ( A = eo1 | ( A = eo2 | A = eo3 ) ) ) ) ) ) ) ) => object ( A ) ) ) . -fof ( typeScope_max_object , axiom , ! [ A ] : ( object ( A ) => ( A = eo1 | ( A = eo2 | ( A = eo3 | ( A = o1 | ( A = o2 | ( A = o3 | ( A = o4 | ( A = o5 | ( A = o6 | ( A = o7 | A = o8 ) ) ) ) ) ) ) ) ) ) ) ) . +fof ( typeScope_max_object , axiom , ! [ A ] : ( object ( A ) => ( A = eo1 | ( A = eo2 | ( A = eo3 | ( A = o1 | ( A = o2 | ( A = o3 | ( A = o4 | ( A = o5 | ( A = o6 | ( A = o7 | ( A = o8 | ( A = o9 | ( A = o10 | ( A = o11 | ( A = o12 | ( A = o13 | ( A = o14 | ( A = o15 | ( A = o16 | ( A = o17 | ( A = o18 | ( A = o19 | ( A = o20 | ( A = o21 | ( A = o22 | ( A = o23 | ( A = o24 | ( A = o25 | ( A = o26 | ( A = o27 | ( A = o28 | ( A = o29 | ( A = o30 | ( A = o31 | ( A = o32 | ( A = o33 | ( A = o34 | ( A = o35 | ( A = o36 | ( A = o37 | ( A = o38 | ( A = o39 | A = o40 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) . fof ( typeScope_min_t_FunctionalInterface , axiom , ! [ A ] : ( ( A = o2 | A = o3 ) => ( t_FunctionalInterface ( A ) & object ( A ) ) ) ) . fof ( typeScope_min_t_Function , axiom , ! [ A ] : ( A = o4 => ( t_Function ( A ) & object ( A ) ) ) ) . fof ( typeScope_min_t_FunctionalOutput , axiom , ! [ A ] : ( ( A = o5 | ( A = o6 | A = o7 ) ) => ( t_FunctionalOutput ( A ) & object ( A ) ) ) ) . -fof ( typeScope_max_t_Function , axiom , ! [ A ] : ( ( t_Function ( A ) & object ( A ) ) => ( A = o4 | A = o8 ) ) ) . +fof ( typeScope_max_t_Function , axiom , ! [ A ] : ( ( t_Function ( A ) & object ( A ) ) => ( A = o4 | ( A = o8 | ( A = o9 | ( A = o10 | A = o11 ) ) ) ) ) ) . fof ( typeScope_max_t_FunctionalOutput , axiom , ! [ A ] : ( ( t_FunctionalOutput ( A ) & object ( A ) ) => ( A = o5 | ( A = o6 | ( A = o7 | A = o8 ) ) ) ) ) . -fof ( typeUniqueness , axiom , eo1 != eo2 & ( eo1 != eo3 & ( eo2 != eo3 & ( eo1 != o1 & ( eo2 != o1 & ( eo3 != o1 & ( eo1 != o2 & ( eo2 != o2 & ( eo3 != o2 & ( o1 != o2 & ( eo1 != o3 & ( eo2 != o3 & ( eo3 != o3 & ( o1 != o3 & ( o2 != o3 & ( eo1 != o4 & ( eo2 != o4 & ( eo3 != o4 & ( o1 != o4 & ( o2 != o4 & ( o3 != o4 & ( eo1 != o5 & ( eo2 != o5 & ( eo3 != o5 & ( o1 != o5 & ( o2 != o5 & ( o3 != o5 & ( o4 != o5 & ( eo1 != o6 & ( eo2 != o6 & ( eo3 != o6 & ( o1 != o6 & ( o2 != o6 & ( o3 != o6 & ( o4 != o6 & ( o5 != o6 & ( eo1 != o7 & ( eo2 != o7 & ( eo3 != o7 & ( o1 != o7 & ( o2 != o7 & ( o3 != o7 & ( o4 != o7 & ( o5 != o7 & ( o6 != o7 & ( eo1 != o8 & ( eo2 != o8 & ( eo3 != o8 & ( o1 != o8 & ( o2 != o8 & ( o3 != o8 & ( o4 != o8 & ( o5 != o8 & ( o6 != o8 & o7 != o8 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) . +fof ( typeUniqueness , axiom , eo1 != eo2 & ( eo1 != eo3 & ( eo2 != eo3 & ( eo1 != o1 & ( eo2 != o1 & ( eo3 != o1 & ( eo1 != o2 & ( eo2 != o2 & ( eo3 != o2 & ( o1 != o2 & ( eo1 != o3 & ( eo2 != o3 & ( eo3 != o3 & ( o1 != o3 & ( o2 != o3 & ( eo1 != o4 & ( eo2 != o4 & ( eo3 != o4 & ( o1 != o4 & ( o2 != o4 & ( o3 != o4 & ( eo1 != o5 & ( eo2 != o5 & ( eo3 != o5 & ( o1 != o5 & ( o2 != o5 & ( o3 != o5 & ( o4 != o5 & ( eo1 != o6 & ( eo2 != o6 & ( eo3 != o6 & ( o1 != o6 & ( o2 != o6 & ( o3 != o6 & ( o4 != o6 & ( o5 != o6 & ( eo1 != o7 & ( eo2 != o7 & ( eo3 != o7 & ( o1 != o7 & ( o2 != o7 & ( o3 != o7 & ( o4 != o7 & ( o5 != o7 & ( o6 != o7 & ( eo1 != o8 & ( eo2 != o8 & ( eo3 != o8 & ( o1 != o8 & ( o2 != o8 & ( o3 != o8 & ( o4 != o8 & ( o5 != o8 & ( o6 != o8 & ( o7 != o8 & ( eo1 != o9 & ( eo2 != o9 & ( eo3 != o9 & ( o1 != o9 & ( o2 != o9 & ( o3 != o9 & ( o4 != o9 & ( o5 != o9 & ( o6 != o9 & ( o7 != o9 & ( o8 != o9 & ( eo1 != o10 & ( eo2 != o10 & ( eo3 != o10 & ( o1 != o10 & ( o2 != o10 & ( o3 != o10 & ( o4 != o10 & ( o5 != o10 & ( o6 != o10 & ( o7 != o10 & ( o8 != o10 & ( o9 != o10 & ( eo1 != o11 & ( eo2 != o11 & ( eo3 != o11 & ( o1 != o11 & ( o2 != o11 & ( o3 != o11 & ( o4 != o11 & ( o5 != o11 & ( o6 != o11 & ( o7 != o11 & ( o8 != o11 & ( o9 != o11 & ( o10 != o11 & ( eo1 != o12 & ( eo2 != o12 & ( eo3 != o12 & ( o1 != o12 & ( o2 != o12 & ( o3 != o12 & ( o4 != o12 & ( o5 != o12 & ( o6 != o12 & ( o7 != o12 & ( o8 != o12 & ( o9 != o12 & ( o10 != o12 & ( o11 != o12 & ( eo1 != o13 & ( eo2 != o13 & ( eo3 != o13 & ( o1 != o13 & ( o2 != o13 & ( o3 != o13 & ( o4 != o13 & ( o5 != o13 & ( o6 != o13 & ( o7 != o13 & ( o8 != o13 & ( o9 != o13 & ( o10 != o13 & ( o11 != o13 & ( o12 != o13 & ( eo1 != o14 & ( eo2 != o14 & ( eo3 != o14 & ( o1 != o14 & ( o2 != o14 & ( o3 != o14 & ( o4 != o14 & ( o5 != o14 & ( o6 != o14 & ( o7 != o14 & ( o8 != o14 & ( o9 != o14 & ( o10 != o14 & ( o11 != o14 & ( o12 != o14 & ( o13 != o14 & ( eo1 != o15 & ( eo2 != o15 & ( eo3 != o15 & ( o1 != o15 & ( o2 != o15 & ( o3 != o15 & ( o4 != o15 & ( o5 != o15 & ( o6 != o15 & ( o7 != o15 & ( o8 != o15 & ( o9 != o15 & ( o10 != o15 & ( o11 != o15 & ( o12 != o15 & ( o13 != o15 & ( o14 != o15 & ( eo1 != o16 & ( eo2 != o16 & ( eo3 != o16 & ( o1 != o16 & ( o2 != o16 & ( o3 != o16 & ( o4 != o16 & ( o5 != o16 & ( o6 != o16 & ( o7 != o16 & ( o8 != o16 & ( o9 != o16 & ( o10 != o16 & ( o11 != o16 & ( o12 != o16 & ( o13 != o16 & ( o14 != o16 & ( o15 != o16 & ( eo1 != o17 & ( eo2 != o17 & ( eo3 != o17 & ( o1 != o17 & ( o2 != o17 & ( o3 != o17 & ( o4 != o17 & ( o5 != o17 & ( o6 != o17 & ( o7 != o17 & ( o8 != o17 & ( o9 != o17 & ( o10 != o17 & ( o11 != o17 & ( o12 != o17 & ( o13 != o17 & ( o14 != o17 & ( o15 != o17 & ( o16 != o17 & ( eo1 != o18 & ( eo2 != o18 & ( eo3 != o18 & ( o1 != o18 & ( o2 != o18 & ( o3 != o18 & ( o4 != o18 & ( o5 != o18 & ( o6 != o18 & ( o7 != o18 & ( o8 != o18 & ( o9 != o18 & ( o10 != o18 & ( o11 != o18 & ( o12 != o18 & ( o13 != o18 & ( o14 != o18 & ( o15 != o18 & ( o16 != o18 & ( o17 != o18 & ( eo1 != o19 & ( eo2 != o19 & ( eo3 != o19 & ( o1 != o19 & ( o2 != o19 & ( o3 != o19 & ( o4 != o19 & ( o5 != o19 & ( o6 != o19 & ( o7 != o19 & ( o8 != o19 & ( o9 != o19 & ( o10 != o19 & ( o11 != o19 & ( o12 != o19 & ( o13 != o19 & ( o14 != o19 & ( o15 != o19 & ( o16 != o19 & ( o17 != o19 & ( o18 != o19 & ( eo1 != o20 & ( eo2 != o20 & ( eo3 != o20 & ( o1 != o20 & ( o2 != o20 & ( o3 != o20 & ( o4 != o20 & ( o5 != o20 & ( o6 != o20 & ( o7 != o20 & ( o8 != o20 & ( o9 != o20 & ( o10 != o20 & ( o11 != o20 & ( o12 != o20 & ( o13 != o20 & ( o14 != o20 & ( o15 != o20 & ( o16 != o20 & ( o17 != o20 & ( o18 != o20 & ( o19 != o20 & ( eo1 != o21 & ( eo2 != o21 & ( eo3 != o21 & ( o1 != o21 & ( o2 != o21 & ( o3 != o21 & ( o4 != o21 & ( o5 != o21 & ( o6 != o21 & ( o7 != o21 & ( o8 != o21 & ( o9 != o21 & ( o10 != o21 & ( o11 != o21 & ( o12 != o21 & ( o13 != o21 & ( o14 != o21 & ( o15 != o21 & ( o16 != o21 & ( o17 != o21 & ( o18 != o21 & ( o19 != o21 & ( o20 != o21 & ( eo1 != o22 & ( eo2 != o22 & ( eo3 != o22 & ( o1 != o22 & ( o2 != o22 & ( o3 != o22 & ( o4 != o22 & ( o5 != o22 & ( o6 != o22 & ( o7 != o22 & ( o8 != o22 & ( o9 != o22 & ( o10 != o22 & ( o11 != o22 & ( o12 != o22 & ( o13 != o22 & ( o14 != o22 & ( o15 != o22 & ( o16 != o22 & ( o17 != o22 & ( o18 != o22 & ( o19 != o22 & ( o20 != o22 & ( o21 != o22 & ( eo1 != o23 & ( eo2 != o23 & ( eo3 != o23 & ( o1 != o23 & ( o2 != o23 & ( o3 != o23 & ( o4 != o23 & ( o5 != o23 & ( o6 != o23 & ( o7 != o23 & ( o8 != o23 & ( o9 != o23 & ( o10 != o23 & ( o11 != o23 & ( o12 != o23 & ( o13 != o23 & ( o14 != o23 & ( o15 != o23 & ( o16 != o23 & ( o17 != o23 & ( o18 != o23 & ( o19 != o23 & ( o20 != o23 & ( o21 != o23 & ( o22 != o23 & ( eo1 != o24 & ( eo2 != o24 & ( eo3 != o24 & ( o1 != o24 & ( o2 != o24 & ( o3 != o24 & ( o4 != o24 & ( o5 != o24 & ( o6 != o24 & ( o7 != o24 & ( o8 != o24 & ( o9 != o24 & ( o10 != o24 & ( o11 != o24 & ( o12 != o24 & ( o13 != o24 & ( o14 != o24 & ( o15 != o24 & ( o16 != o24 & ( o17 != o24 & ( o18 != o24 & ( o19 != o24 & ( o20 != o24 & ( o21 != o24 & ( o22 != o24 & ( o23 != o24 & ( eo1 != o25 & ( eo2 != o25 & ( eo3 != o25 & ( o1 != o25 & ( o2 != o25 & ( o3 != o25 & ( o4 != o25 & ( o5 != o25 & ( o6 != o25 & ( o7 != o25 & ( o8 != o25 & ( o9 != o25 & ( o10 != o25 & ( o11 != o25 & ( o12 != o25 & ( o13 != o25 & ( o14 != o25 & ( o15 != o25 & ( o16 != o25 & ( o17 != o25 & ( o18 != o25 & ( o19 != o25 & ( o20 != o25 & ( o21 != o25 & ( o22 != o25 & ( o23 != o25 & ( o24 != o25 & ( eo1 != o26 & ( eo2 != o26 & ( eo3 != o26 & ( o1 != o26 & ( o2 != o26 & ( o3 != o26 & ( o4 != o26 & ( o5 != o26 & ( o6 != o26 & ( o7 != o26 & ( o8 != o26 & ( o9 != o26 & ( o10 != o26 & ( o11 != o26 & ( o12 != o26 & ( o13 != o26 & ( o14 != o26 & ( o15 != o26 & ( o16 != o26 & ( o17 != o26 & ( o18 != o26 & ( o19 != o26 & ( o20 != o26 & ( o21 != o26 & ( o22 != o26 & ( o23 != o26 & ( o24 != o26 & ( o25 != o26 & ( eo1 != o27 & ( eo2 != o27 & ( eo3 != o27 & ( o1 != o27 & ( o2 != o27 & ( o3 != o27 & ( o4 != o27 & ( o5 != o27 & ( o6 != o27 & ( o7 != o27 & ( o8 != o27 & ( o9 != o27 & ( o10 != o27 & ( o11 != o27 & ( o12 != o27 & ( o13 != o27 & ( o14 != o27 & ( o15 != o27 & ( o16 != o27 & ( o17 != o27 & ( o18 != o27 & ( o19 != o27 & ( o20 != o27 & ( o21 != o27 & ( o22 != o27 & ( o23 != o27 & ( o24 != o27 & ( o25 != o27 & ( o26 != o27 & ( eo1 != o28 & ( eo2 != o28 & ( eo3 != o28 & ( o1 != o28 & ( o2 != o28 & ( o3 != o28 & ( o4 != o28 & ( o5 != o28 & ( o6 != o28 & ( o7 != o28 & ( o8 != o28 & ( o9 != o28 & ( o10 != o28 & ( o11 != o28 & ( o12 != o28 & ( o13 != o28 & ( o14 != o28 & ( o15 != o28 & ( o16 != o28 & ( o17 != o28 & ( o18 != o28 & ( o19 != o28 & ( o20 != o28 & ( o21 != o28 & ( o22 != o28 & ( o23 != o28 & ( o24 != o28 & ( o25 != o28 & ( o26 != o28 & ( o27 != o28 & ( eo1 != o29 & ( eo2 != o29 & ( eo3 != o29 & ( o1 != o29 & ( o2 != o29 & ( o3 != o29 & ( o4 != o29 & ( o5 != o29 & ( o6 != o29 & ( o7 != o29 & ( o8 != o29 & ( o9 != o29 & ( o10 != o29 & ( o11 != o29 & ( o12 != o29 & ( o13 != o29 & ( o14 != o29 & ( o15 != o29 & ( o16 != o29 & ( o17 != o29 & ( o18 != o29 & ( o19 != o29 & ( o20 != o29 & ( o21 != o29 & ( o22 != o29 & ( o23 != o29 & ( o24 != o29 & ( o25 != o29 & ( o26 != o29 & ( o27 != o29 & ( o28 != o29 & ( eo1 != o30 & ( eo2 != o30 & ( eo3 != o30 & ( o1 != o30 & ( o2 != o30 & ( o3 != o30 & ( o4 != o30 & ( o5 != o30 & ( o6 != o30 & ( o7 != o30 & ( o8 != o30 & ( o9 != o30 & ( o10 != o30 & ( o11 != o30 & ( o12 != o30 & ( o13 != o30 & ( o14 != o30 & ( o15 != o30 & ( o16 != o30 & ( o17 != o30 & ( o18 != o30 & ( o19 != o30 & ( o20 != o30 & ( o21 != o30 & ( o22 != o30 & ( o23 != o30 & ( o24 != o30 & ( o25 != o30 & ( o26 != o30 & ( o27 != o30 & ( o28 != o30 & ( o29 != o30 & ( eo1 != o31 & ( eo2 != o31 & ( eo3 != o31 & ( o1 != o31 & ( o2 != o31 & ( o3 != o31 & ( o4 != o31 & ( o5 != o31 & ( o6 != o31 & ( o7 != o31 & ( o8 != o31 & ( o9 != o31 & ( o10 != o31 & ( o11 != o31 & ( o12 != o31 & ( o13 != o31 & ( o14 != o31 & ( o15 != o31 & ( o16 != o31 & ( o17 != o31 & ( o18 != o31 & ( o19 != o31 & ( o20 != o31 & ( o21 != o31 & ( o22 != o31 & ( o23 != o31 & ( o24 != o31 & ( o25 != o31 & ( o26 != o31 & ( o27 != o31 & ( o28 != o31 & ( o29 != o31 & ( o30 != o31 & ( eo1 != o32 & ( eo2 != o32 & ( eo3 != o32 & ( o1 != o32 & ( o2 != o32 & ( o3 != o32 & ( o4 != o32 & ( o5 != o32 & ( o6 != o32 & ( o7 != o32 & ( o8 != o32 & ( o9 != o32 & ( o10 != o32 & ( o11 != o32 & ( o12 != o32 & ( o13 != o32 & ( o14 != o32 & ( o15 != o32 & ( o16 != o32 & ( o17 != o32 & ( o18 != o32 & ( o19 != o32 & ( o20 != o32 & ( o21 != o32 & ( o22 != o32 & ( o23 != o32 & ( o24 != o32 & ( o25 != o32 & ( o26 != o32 & ( o27 != o32 & ( o28 != o32 & ( o29 != o32 & ( o30 != o32 & ( o31 != o32 & ( eo1 != o33 & ( eo2 != o33 & ( eo3 != o33 & ( o1 != o33 & ( o2 != o33 & ( o3 != o33 & ( o4 != o33 & ( o5 != o33 & ( o6 != o33 & ( o7 != o33 & ( o8 != o33 & ( o9 != o33 & ( o10 != o33 & ( o11 != o33 & ( o12 != o33 & ( o13 != o33 & ( o14 != o33 & ( o15 != o33 & ( o16 != o33 & ( o17 != o33 & ( o18 != o33 & ( o19 != o33 & ( o20 != o33 & ( o21 != o33 & ( o22 != o33 & ( o23 != o33 & ( o24 != o33 & ( o25 != o33 & ( o26 != o33 & ( o27 != o33 & ( o28 != o33 & ( o29 != o33 & ( o30 != o33 & ( o31 != o33 & ( o32 != o33 & ( eo1 != o34 & ( eo2 != o34 & ( eo3 != o34 & ( o1 != o34 & ( o2 != o34 & ( o3 != o34 & ( o4 != o34 & ( o5 != o34 & ( o6 != o34 & ( o7 != o34 & ( o8 != o34 & ( o9 != o34 & ( o10 != o34 & ( o11 != o34 & ( o12 != o34 & ( o13 != o34 & ( o14 != o34 & ( o15 != o34 & ( o16 != o34 & ( o17 != o34 & ( o18 != o34 & ( o19 != o34 & ( o20 != o34 & ( o21 != o34 & ( o22 != o34 & ( o23 != o34 & ( o24 != o34 & ( o25 != o34 & ( o26 != o34 & ( o27 != o34 & ( o28 != o34 & ( o29 != o34 & ( o30 != o34 & ( o31 != o34 & ( o32 != o34 & ( o33 != o34 & ( eo1 != o35 & ( eo2 != o35 & ( eo3 != o35 & ( o1 != o35 & ( o2 != o35 & ( o3 != o35 & ( o4 != o35 & ( o5 != o35 & ( o6 != o35 & ( o7 != o35 & ( o8 != o35 & ( o9 != o35 & ( o10 != o35 & ( o11 != o35 & ( o12 != o35 & ( o13 != o35 & ( o14 != o35 & ( o15 != o35 & ( o16 != o35 & ( o17 != o35 & ( o18 != o35 & ( o19 != o35 & ( o20 != o35 & ( o21 != o35 & ( o22 != o35 & ( o23 != o35 & ( o24 != o35 & ( o25 != o35 & ( o26 != o35 & ( o27 != o35 & ( o28 != o35 & ( o29 != o35 & ( o30 != o35 & ( o31 != o35 & ( o32 != o35 & ( o33 != o35 & ( o34 != o35 & ( eo1 != o36 & ( eo2 != o36 & ( eo3 != o36 & ( o1 != o36 & ( o2 != o36 & ( o3 != o36 & ( o4 != o36 & ( o5 != o36 & ( o6 != o36 & ( o7 != o36 & ( o8 != o36 & ( o9 != o36 & ( o10 != o36 & ( o11 != o36 & ( o12 != o36 & ( o13 != o36 & ( o14 != o36 & ( o15 != o36 & ( o16 != o36 & ( o17 != o36 & ( o18 != o36 & ( o19 != o36 & ( o20 != o36 & ( o21 != o36 & ( o22 != o36 & ( o23 != o36 & ( o24 != o36 & ( o25 != o36 & ( o26 != o36 & ( o27 != o36 & ( o28 != o36 & ( o29 != o36 & ( o30 != o36 & ( o31 != o36 & ( o32 != o36 & ( o33 != o36 & ( o34 != o36 & ( o35 != o36 & ( eo1 != o37 & ( eo2 != o37 & ( eo3 != o37 & ( o1 != o37 & ( o2 != o37 & ( o3 != o37 & ( o4 != o37 & ( o5 != o37 & ( o6 != o37 & ( o7 != o37 & ( o8 != o37 & ( o9 != o37 & ( o10 != o37 & ( o11 != o37 & ( o12 != o37 & ( o13 != o37 & ( o14 != o37 & ( o15 != o37 & ( o16 != o37 & ( o17 != o37 & ( o18 != o37 & ( o19 != o37 & ( o20 != o37 & ( o21 != o37 & ( o22 != o37 & ( o23 != o37 & ( o24 != o37 & ( o25 != o37 & ( o26 != o37 & ( o27 != o37 & ( o28 != o37 & ( o29 != o37 & ( o30 != o37 & ( o31 != o37 & ( o32 != o37 & ( o33 != o37 & ( o34 != o37 & ( o35 != o37 & ( o36 != o37 & ( eo1 != o38 & ( eo2 != o38 & ( eo3 != o38 & ( o1 != o38 & ( o2 != o38 & ( o3 != o38 & ( o4 != o38 & ( o5 != o38 & ( o6 != o38 & ( o7 != o38 & ( o8 != o38 & ( o9 != o38 & ( o10 != o38 & ( o11 != o38 & ( o12 != o38 & ( o13 != o38 & ( o14 != o38 & ( o15 != o38 & ( o16 != o38 & ( o17 != o38 & ( o18 != o38 & ( o19 != o38 & ( o20 != o38 & ( o21 != o38 & ( o22 != o38 & ( o23 != o38 & ( o24 != o38 & ( o25 != o38 & ( o26 != o38 & ( o27 != o38 & ( o28 != o38 & ( o29 != o38 & ( o30 != o38 & ( o31 != o38 & ( o32 != o38 & ( o33 != o38 & ( o34 != o38 & ( o35 != o38 & ( o36 != o38 & ( o37 != o38 & ( eo1 != o39 & ( eo2 != o39 & ( eo3 != o39 & ( o1 != o39 & ( o2 != o39 & ( o3 != o39 & ( o4 != o39 & ( o5 != o39 & ( o6 != o39 & ( o7 != o39 & ( o8 != o39 & ( o9 != o39 & ( o10 != o39 & ( o11 != o39 & ( o12 != o39 & ( o13 != o39 & ( o14 != o39 & ( o15 != o39 & ( o16 != o39 & ( o17 != o39 & ( o18 != o39 & ( o19 != o39 & ( o20 != o39 & ( o21 != o39 & ( o22 != o39 & ( o23 != o39 & ( o24 != o39 & ( o25 != o39 & ( o26 != o39 & ( o27 != o39 & ( o28 != o39 & ( o29 != o39 & ( o30 != o39 & ( o31 != o39 & ( o32 != o39 & ( o33 != o39 & ( o34 != o39 & ( o35 != o39 & ( o36 != o39 & ( o37 != o39 & ( o38 != o39 & ( eo1 != o40 & ( eo2 != o40 & ( eo3 != o40 & ( o1 != o40 & ( o2 != o40 & ( o3 != o40 & ( o4 != o40 & ( o5 != o40 & ( o6 != o40 & ( o7 != o40 & ( o8 != o40 & ( o9 != o40 & ( o10 != o40 & ( o11 != o40 & ( o12 != o40 & ( o13 != o40 & ( o14 != o40 & ( o15 != o40 & ( o16 != o40 & ( o17 != o40 & ( o18 != o40 & ( o19 != o40 & ( o20 != o40 & ( o21 != o40 & ( o22 != o40 & ( o23 != o40 & ( o24 != o40 & ( o25 != o40 & ( o26 != o40 & ( o27 != o40 & ( o28 != o40 & ( o29 != o40 & ( o30 != o40 & ( o31 != o40 & ( o32 != o40 & ( o33 != o40 & ( o34 != o40 & ( o35 != o40 & ( o36 != o40 & ( o37 != o40 & ( o38 != o40 & o39 != o40 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) . fof ( compliance_interface_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_interface_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_FunctionalInterface ( V_1 ) ) ) ) . fof ( compliance_model_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_model_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_FunctionalArchitectureModel ( V_1 ) ) ) ) . fof ( compliance_parent_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_parent_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_Function ( V_1 ) ) ) ) . @@ -28,12 +28,16 @@ fof ( compliance_terminator_FunctionalData , axiom , ! [ V_0 , V_1 ] : ( r_termi fof ( compliance_interface_FunctionalData , axiom , ! [ V_0 , V_1 ] : ( r_interface_FunctionalData ( V_0 , V_1 ) => ( t_FunctionalData ( V_0 ) & t_FunctionalInterface ( V_1 ) ) ) ) . fof ( compliance_type_Function , axiom , ! [ V_0 , V_1 ] : ( r_type_Function ( V_0 , V_1 ) => ( t_Function ( V_0 ) & t_FunctionType ( V_1 ) ) ) ) . fof ( containment_topLevel_t_FunctionalArchitectureModel , axiom , ! [ A ] : ( t_FunctionalArchitectureModel ( A ) <=> A = o1 ) ) . -fof ( containment_r_interface_FunctionalElement , axiom , ! [ A ] : ( t_FunctionalInterface ( A ) => ? [ B ] : ( t_FunctionalElement ( B ) & r_interface_FunctionalElement ( B , A ) ) ) ) . -fof ( containment_r_rootElements_FunctionalArchitectureModel , axiom , ! [ A ] : ( t_FunctionalElement ( A ) => ? [ B ] : ( t_FunctionalArchitectureModel ( B ) & r_rootElements_FunctionalArchitectureModel ( B , A ) ) ) ) . -fof ( containment_r_subElements_Function , axiom , ! [ A ] : ( t_FunctionalElement ( A ) => ? [ B ] : ( t_Function ( B ) & r_subElements_Function ( B , A ) ) ) ) . -fof ( containment_r_data_FunctionalInterface , axiom , ! [ A ] : ( t_FunctionalData ( A ) => ? [ B ] : ( t_FunctionalInterface ( B ) & r_data_FunctionalInterface ( B , A ) ) ) ) . -fof ( containment_r_outgoingLinks_FunctionalOutput , axiom , ! [ A ] : ( t_InformationLink ( A ) => ? [ B ] : ( t_FunctionalOutput ( B ) & r_outgoingLinks_FunctionalOutput ( B , A ) ) ) ) . -fof ( containment_r_terminator_FunctionalData , axiom , ! [ A ] : ( t_FAMTerminator ( A ) => ? [ B ] : ( t_FunctionalData ( B ) & r_terminator_FunctionalData ( B , A ) ) ) ) . + + +fof ( containment_r_interface_FunctionalElement , axiom , ! [ A ] : ( t_FunctionalInterface ( A ) => ? [ B ] : r_interface_FunctionalElement ( B , A ) ) ) . +fof ( containment_r_rootElements_FunctionalArchitectureModel , axiom , ! [ A ] : ( t_FunctionalElement ( A ) => ? [ B ] : r_rootElements_FunctionalArchitectureModel ( B , A ) ) ) . +fof ( containment_r_subElements_Function , axiom , ! [ A ] : ( t_FunctionalElement ( A ) => ? [ B ] : r_subElements_Function ( B , A ) ) ) . +fof ( containment_r_data_FunctionalInterface , axiom , ! [ A ] : ( t_FunctionalData ( A ) => ? [ B ] : r_data_FunctionalInterface ( B , A ) ) ) . +fof ( containment_r_outgoingLinks_FunctionalOutput , axiom , ! [ A ] : ( t_InformationLink ( A ) => ? [ B ] : r_outgoingLinks_FunctionalOutput ( B , A ) ) ) . +fof ( containment_r_terminator_FunctionalData , axiom , ! [ A ] : ( t_FAMTerminator ( A ) => ? [ B ] : r_terminator_FunctionalData ( B , A ) ) ) . + + fof ( upperMultiplicity_interface_FunctionalElement , axiom , ! [ V_src , V_trg_1 , V_trg_2 ] : ( ( t_FunctionalElement ( V_src ) & ( t_FunctionalInterface ( V_trg_1 ) & t_FunctionalInterface ( V_trg_2 ) ) ) => ( ( r_interface_FunctionalElement ( V_src , V_trg_1 ) & r_interface_FunctionalElement ( V_src , V_trg_2 ) ) => ~ V_trg_1 != V_trg_2 ) ) ) . fof ( lowerMultiplicity_model_FunctionalElement , axiom , ! [ V_src ] : ( t_FunctionalElement ( V_src ) => ? [ V_trg_1 ] : ( t_FunctionalArchitectureModel ( V_trg_1 ) & r_model_FunctionalElement ( V_src , V_trg_1 ) ) ) ) . fof ( upperMultiplicity_model_FunctionalElement , axiom , ! [ V_src , V_trg_1 , V_trg_2 ] : ( ( t_FunctionalElement ( V_src ) & ( t_FunctionalArchitectureModel ( V_trg_1 ) & t_FunctionalArchitectureModel ( V_trg_2 ) ) ) => ( ( r_model_FunctionalElement ( V_src , V_trg_1 ) & r_model_FunctionalElement ( V_src , V_trg_2 ) ) => ~ V_trg_1 != V_trg_2 ) ) ) . diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/VampireTest/vampireProblem.tptp b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/VampireTest/vampireProblem.tptp deleted file mode 100644 index 4c368859..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/VampireTest/vampireProblem.tptp +++ /dev/null @@ -1,7 +0,0 @@ -% This is an initial Test Comment -fof ( typeDef_oldRPS , axiom , ! [ A ] : ( t_oldRPS ( A ) <=> ( e_Rock_oldRPS ( A ) | ( e_Paper_oldRPS ( A ) | e_Scissor_oldRPS ( A ) ) ) ) ) . -fof ( hierarchyHandler , axiom , ! [ A ] : ( object ( A ) <=> t_oldRPS ( A ) ) ) . -fof ( typeScope , axiom , ! [ A ] : ( object ( A ) <=> ( A = o1 | ( A = o2 | ( A = o3 | A = o4 ) ) ) ) ) . -fof ( typeUniqueness , axiom , o1 != o2 & ( o1 != o3 & ( o2 != o3 & ( o1 != o4 & ( o2 != o4 & o3 != o4 ) ) ) ) ) . -fof ( compliance_beats2 , axiom , ! [ Var_0 , Var_1 ] : ( rel_beats2 ( Var_0 , Var_1 ) => ( t_oldRPS ( Var_0 ) & t_oldRPS ( Var_1 ) ) ) ) . -fof ( assertion1 , axiom , ! [ Var_x ] : ( t_oldRPS ( Var_x ) => ? [ Var_y ] : ( t_oldRPS ( Var_y ) & ( rel_beats2 ( Var_x , Var_y ) & ( Var_x != Var_y & ~ rel_beats2 ( Var_y , Var_x ) ) ) ) ) ) . diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.xtend b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.xtend index 86c9092a..1559ee3f 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.xtend +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.xtend @@ -4,11 +4,11 @@ import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolver import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory import functionalarchitecture.Function +import functionalarchitecture.FunctionalInterface +import functionalarchitecture.FunctionalOutput import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration -import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor -import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult @@ -30,8 +30,7 @@ import org.eclipse.emf.ecore.EReference import org.eclipse.emf.ecore.resource.Resource import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl import org.eclipse.viatra.query.runtime.api.IQueryGroup -import org.eclipse.emf.ecore.EClassifier -import functionalarchitecture.FunctionalOutput +import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel class GeneralTest { def static String createAndSolveProblem(EcoreMetamodelDescriptor metamodel, List partialModel, @@ -67,7 +66,7 @@ class GeneralTest { list2MapMin.get(Function.simpleName) ), 1) typeMapMin.put(ecore2Logic.TypeofEClass(modelGenerationProblem.trace, - list2MapMin.get(functionalarchitecture.FunctionalInterface.simpleName) + list2MapMin.get(FunctionalInterface.simpleName) ), 2) typeMapMin.put(ecore2Logic.TypeofEClass(modelGenerationProblem.trace, list2MapMin.get(FunctionalOutput.simpleName) @@ -80,7 +79,7 @@ class GeneralTest { ), 5) typeMapMax.put(ecore2Logic.TypeofEClass( modelGenerationProblem.trace, - list2MapMax.get(functionalarchitecture.FunctionalInterface.simpleName) + list2MapMax.get(FunctionalInterface.simpleName) ), 2) typeMapMax.put(ecore2Logic.TypeofEClass( modelGenerationProblem.trace, @@ -92,7 +91,7 @@ class GeneralTest { // add configuration things, in config file first it.documentationLevel = DocumentationLevel::FULL it.typeScopes.minNewElements = 6 - it.typeScopes.maxNewElements = 8 + it.typeScopes.maxNewElements = 40 it.typeScopes.minNewElementsByType = typeMapMin it.typeScopes.maxNewElementsByType = typeMapMax ] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTestAlloy.xtend b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTestAlloy.xtend new file mode 100644 index 00000000..b0af3f64 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTestAlloy.xtend @@ -0,0 +1,190 @@ +package ca.mcgill.ecse.dslreasoner.vampire.icse + +import ca.mcgill.ecse.dslreasoner.vampire.queries.Patterns +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage +import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolver +import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolverConfiguration +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration +import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.IntStatisticEntry +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.StringStatisticEntry +import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore +import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic +import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic +import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace +import java.io.PrintWriter +import java.text.SimpleDateFormat +import java.util.Date +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.impl.ModelResultImpl + +class YakinduTestAlloy { + def static void main(String[] args) { + val Ecore2Logic ecore2Logic = new Ecore2Logic + val Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic) + val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic) + val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic + + // Workspace setup + val Date date = new Date(System.currentTimeMillis) + val SimpleDateFormat format = new SimpleDateFormat("dd-HHmm"); + val formattedDate = format.format(date) + + val inputs = new FileSystemWorkspace('''initialModels/''', "") + val dataWorkspace = new FileSystemWorkspace('''output/YakinduTest/''', "") + val workspace = new FileSystemWorkspace('''output/YakinduTest/''' + formattedDate + '''/''', "") + workspace.initAndClear + + // Logicproblem writing setup + val reg = Resource.Factory.Registry.INSTANCE + val map = reg.extensionToFactoryMap + map.put("logicproblem", new XMIResourceFactoryImpl) + + println("Input and output workspaces are created") + + val metamodel = GeneralTest.loadMetamodel(YakindummPackage.eINSTANCE) + val partialModel = GeneralTest.loadPartialModel(inputs, "yakindu/Yakindu.xmi") + val queries = GeneralTest.loadQueries(metamodel, Patterns.instance) +// val metamodel = GeneralTest.loadMetamodel(FunctionalarchitecturePackage.eINSTANCE) +// val partialModel = GeneralTest.loadPartialModel(inputs, "FAM/FaModel.xmi") +// val queries = GeneralTest.loadQueries(metamodel, FamPatterns.instance) +// val queries = null + println("DSL loaded") + + var SZ_TOP = 100 + var SZ_BOT = 100 + var INC = 20 + var REPS = 25 + + val RUNTIME = 300 + + var solverTimes = newArrayList + var transformationTimes = newArrayList + var LogicResult solution = null + var solver = "Alloy" + + for (var k = 0; k < 1; k++) { + + for (var i = SZ_BOT; i <= SZ_TOP; i += INC) { + var writer = new PrintWriter( + dataWorkspace.workspaceURI + "//_alloy" + i + "x" + REPS + "-" + formattedDate + ".csv") + writer.append("solver,size,TransformatonTime,sat?,kodkodTime,model?,modelTime\n") + + val num = (i - SZ_BOT) / INC + println() + println("SOLVER: " + solver + ", SIZE=" + i) + println() + + solverTimes.clear + transformationTimes.clear + for (var j = 0; j < REPS; j++) { + val Date date2 = new Date(System.currentTimeMillis) + val formattedDate2 = format.format(date2) + println(formattedDate2) + println("<> :") + + val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, + new Ecore2LogicConfiguration()) + var modelExtensionProblem = instanceModel2Logic.transform(modelGenerationProblem, partialModel) + var validModelExtensionProblem = viatra2Logic.transformQueries(queries, modelExtensionProblem, + new Viatra2LogicConfiguration) + + var problem = modelGenerationProblem.output +// workspace.writeModel(problem, "Yakindu.logicproblem") +// println("Problem created") +// Start Time + var startTime = System.currentTimeMillis + + var AlloySolver reasoner + // * + reasoner = new AlloySolver + + // ///////////////////////////////////////////////////// + // Define Config File + val size = i + val inc = INC + val iter = j + val solverConfig = new AlloySolverConfiguration => [ + // add configuration things, in config file first + it.documentationLevel = DocumentationLevel::FULL +// it.iteration = iter + it.runtimeLimit = RUNTIME +// it.typeScopes.maxNewElements = size + it.typeScopes.minNewElements = size + it.typeScopes.maxNewElements = size + ] + solution = reasoner.solve(problem, solverConfig, workspace) +// print((solution as ModelResult).representation.get(0)) +// val soln = ((solution as ModelResult).representation.get(0) as VampireModel) +// println(soln.confirmations) +// println((solution as ModelResult).representation) +// modelFound = !soln.confirmations.filter [ +// class == VLSFiniteModelImpl +// ].isEmpty +// ADD TO CSV + writer.append(solver + ",") + writer.append(size + ",") + writer.append(solution.statistics.transformationTime / 1000.0 + ",") + +// val satOut = (solution.statistics.entries.filter[name == "satOut"].get(0) as StringStatisticEntry). +// value + val kodKodTime = (solution.statistics.entries.filter[name == "Alloy2KodKodTransformationTime"]. + get(0) as IntStatisticEntry).value +// print(solution.class) + val modOut = if(solution.class == ModelResultImpl) "FiniteModel" else "no" + val mod = solution.statistics.entries.filter[name == "Answer0Time"] + var modTime = 0.0 + if (!mod.isEmpty) { + modTime = (mod.get(0) as IntStatisticEntry).value / 1000.0 + + } + writer.append("-,") + writer.append(kodKodTime.toString + ",") + writer.append(modOut + ",") + writer.append(modTime.toString + "") + writer.append("\n") + + println("->" + modOut + " ... " + modTime) + + // Run Garbage Collector + val Runtime r = Runtime.getRuntime(); + r.gc(); + r.gc(); + r.gc(); + Thread.sleep(3000) + +// print("(" + tTime + "/" + sTime + "s)..") +// solverTimes.add(sTime) +// transformationTimes.add(tTime) +// } else { +// writer.append("MNF" + ",") +//// print("MNF") +// } + // println("Problem solved") + // visualisation, see +// var interpretations = reasoner.getInterpretations(solution as ModelResult) +// for (interpretation : interpretations) { +// val model = logic2Ecore.transformInterpretation(interpretation, modelGenerationProblem.trace) +// workspace.writeModel(model, "model.xmi") +// } +// var totalTimeMin = (System.currentTimeMillis - startTime) / 60000 +// var totalTimeSec = ((System.currentTimeMillis - startTime) / 1000) % 60 +// println("Problem solved") +// println("Time was: " + totalTimeMin + ":" + totalTimeSec) + } +// println() +// var solverMed = solverTimes.sort.get(REPS / 2) +// var transformationMed = transformationTimes.sort.get(REPS / 2) +// writer.append(solverMed.toString + "," + transformationMed.toString) + writer.close + } + + } + + } + +} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTestViatra.xtend b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTestViatra.xtend new file mode 100644 index 00000000..dbc90e97 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTestViatra.xtend @@ -0,0 +1,182 @@ +package ca.mcgill.ecse.dslreasoner.vampire.icse + +import ca.mcgill.ecse.dslreasoner.vampire.queries.Patterns +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage +import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolver +import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolverConfiguration +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration +import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.IntStatisticEntry +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.StringStatisticEntry +import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore +import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic +import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic +import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace +import java.io.PrintWriter +import java.text.SimpleDateFormat +import java.util.Date +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.impl.ModelResultImpl +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration + +class YakinduTestViatra { + def static void main(String[] args) { + val Ecore2Logic ecore2Logic = new Ecore2Logic + val Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic) + val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic) + val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic + + // Workspace setup + val Date date = new Date(System.currentTimeMillis) + val SimpleDateFormat format = new SimpleDateFormat("dd-HHmm"); + val formattedDate = format.format(date) + + val inputs = new FileSystemWorkspace('''initialModels/''', "") + val dataWorkspace = new FileSystemWorkspace('''output/YakinduTest/''', "") + val workspace = new FileSystemWorkspace('''output/YakinduTest/''' + formattedDate + '''/''', "") + workspace.initAndClear + + // Logicproblem writing setup + val reg = Resource.Factory.Registry.INSTANCE + val map = reg.extensionToFactoryMap + map.put("logicproblem", new XMIResourceFactoryImpl) + + println("Input and output workspaces are created") + + val metamodel = GeneralTest.loadMetamodel(YakindummPackage.eINSTANCE) + val partialModel = GeneralTest.loadPartialModel(inputs, "yakindu/Yakindu.xmi") + val queries = GeneralTest.loadQueries(metamodel, Patterns.instance) +// val metamodel = GeneralTest.loadMetamodel(FunctionalarchitecturePackage.eINSTANCE) +// val partialModel = GeneralTest.loadPartialModel(inputs, "FAM/FaModel.xmi") +// val queries = GeneralTest.loadQueries(metamodel, FamPatterns.instance) +// val queries = null + println("DSL loaded") + + var SZ_TOP = 20 + var SZ_BOT = 20 + var INC = 20 + var REPS = 5 + + val RUNTIME = 300 + + var solverTimes = newArrayList + var transformationTimes = newArrayList + var LogicResult solution = null + var solver = "Viatra" + var index = 2 + + for (var i = SZ_BOT; i <= SZ_TOP; i += INC*index) { + index*=2 + var writer = new PrintWriter( + dataWorkspace.workspaceURI + "//_viatra" + i + "x" + REPS + "-" + formattedDate + ".csv") + writer.append("solver,size,TransformatonTime,sat?,kodkodTime,model?,modelTime\n") + + val num = (i - SZ_BOT) / INC + println() + println("SOLVER: " + solver + ", SIZE=" + i) + println() + + solverTimes.clear + transformationTimes.clear + for (var j = 0; j < REPS; j++) { + + println("<> :") + + val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, new Ecore2LogicConfiguration()) + var modelExtensionProblem = instanceModel2Logic.transform(modelGenerationProblem, partialModel) + var validModelExtensionProblem = viatra2Logic.transformQueries(queries, modelExtensionProblem, + new Viatra2LogicConfiguration) + + var problem = modelGenerationProblem.output + workspace.writeModel(problem, "Yakindu.logicproblem") +// println("Problem created") +// Start Time + var startTime = System.currentTimeMillis + + var ViatraReasoner reasoner + // * + reasoner = new ViatraReasoner + + // ///////////////////////////////////////////////////// + // Define Config File + val size = i + val inc = INC + val iter = j + val solverConfig = new ViatraReasonerConfiguration => [ + // add configuration things, in config file first +// it.documentationLevel = DocumentationLevel::FULL +// it.iteration = iter + it.runtimeLimit = RUNTIME + it.typeScopes.maxNewElements = size + it.typeScopes.minNewElements = size + ] + + solution = reasoner.solve(problem, solverConfig, workspace) +// print((solution as ModelResult).representation.get(0)) +// val soln = ((solution as ModelResult).representation.get(0) as VampireModel) +// println(soln.confirmations) +// println((solution as ModelResult).representation) +// modelFound = !soln.confirmations.filter [ +// class == VLSFiniteModelImpl +// ].isEmpty +// ADD TO CSV + writer.append(solver + ",") + writer.append(size + ",") + writer.append(solution.statistics.transformationTime / 1000.0 + ",") + +// val satOut = (solution.statistics.entries.filter[name == "satOut"].get(0) as StringStatisticEntry). +// value + val modOut = if(solution.class == ModelResultImpl) "FiniteModel" else "no" +// val modTime = (solution.statistics.entries.filter[name.contains("Answer")]. +// get(0) as StringStatisticEntry).value + val modTime = solution.statistics.solverTime / 1000.0 + + writer.append("-,") + writer.append("-,") + writer.append(modOut + ",") + writer.append(modTime.toString + "") + writer.append("\n") + + println("->" + modOut + " ... " + modTime) + + // Run Garbage Collector + val Runtime r = Runtime.getRuntime(); + r.gc(); + r.gc(); + r.gc(); + Thread.sleep(3000) + +// print("(" + tTime + "/" + sTime + "s)..") +// solverTimes.add(sTime) +// transformationTimes.add(tTime) +// } else { +// writer.append("MNF" + ",") +//// print("MNF") +// } + // println("Problem solved") + // visualisation, see +// var interpretations = reasoner.getInterpretations(solution as ModelResult) +// for (interpretation : interpretations) { +// val model = logic2Ecore.transformInterpretation(interpretation, modelGenerationProblem.trace) +// workspace.writeModel(model, "model.xmi") +// } +// var totalTimeMin = (System.currentTimeMillis - startTime) / 60000 +// var totalTimeSec = ((System.currentTimeMillis - startTime) / 1000) % 60 +// println("Problem solved") +// println("Time was: " + totalTimeMin + ":" + totalTimeSec) + } +// println() +// var solverMed = solverTimes.sort.get(REPS / 2) +// var transformationMed = transformationTimes.sort.get(REPS / 2) +// writer.append(solverMed.toString + "," + transformationMed.toString) + writer.close + } + + } + +} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/tester.xtend b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/tester.xtend new file mode 100644 index 00000000..2bf0c4cc --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/tester.xtend @@ -0,0 +1,35 @@ +package ca.mcgill.ecse.dslreasoner.vampire.icse + +import java.io.BufferedReader +import java.io.FileInputStream +import java.io.InputStream +import java.io.InputStreamReader + +class tester { + def static void main(String[] args) { + val InputStream is = new FileInputStream("C://Users//Aren Babikian//git//VIATRA-Generator//Tests//ca.mcgill.ecse.dslreasoner.vampire.test//src//ca//mcgill//ecse//dslreasoner//vampire//icse//90-110Z3.txt"); + val BufferedReader buf = new BufferedReader(new InputStreamReader(is)); + var String line = buf.readLine(); + val StringBuilder sb = new StringBuilder(); + while (line != null) { + sb.append(line); + line = buf.readLine(); + } + val String str = sb.toString(); + + val satArray = str.split("Model") + + val satTimes = newArrayList + + for(sat : satArray.subList(1, satArray.length)) { + satTimes.add(sat.substring(2, 8)) + } + + for(t : satTimes) { + println(t) + } + + + + } +} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icseTests/FAMTest.xtend b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icseTests/FAMTest.xtend deleted file mode 100644 index a8b4dcfb..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icseTests/FAMTest.xtend +++ /dev/null @@ -1,103 +0,0 @@ -package ca.mcgill.ecse.dslreasoner.vampire.test - -import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolver -import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration -import functionalarchitecture.FunctionalarchitecturePackage -import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic -import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration -import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor -import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner -import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult -import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore -import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic -import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace -import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace -import java.util.List -import org.eclipse.emf.ecore.EAttribute -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EEnum -import org.eclipse.emf.ecore.EEnumLiteral -import org.eclipse.emf.ecore.EObject -import org.eclipse.emf.ecore.EReference -import org.eclipse.emf.ecore.resource.Resource -import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl - -class DslTest { - def static void main(String[] args) { - val inputs = new FileSystemWorkspace('''initialModels/''', "") - val workspace = new FileSystemWorkspace('''outputDslModels/''', "") - workspace.initAndClear - - println("Input and output workspaces are created") - - val metamodel = loadMetamodel() - val partialModel = loadPartialModel(inputs) -// val queries = loadQueries(metamodel) - - println("DSL loaded") - - val Ecore2Logic ecore2Logic = new Ecore2Logic - val Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic) - val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic) - val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic - - val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel,new Ecore2LogicConfiguration()) -// val modelExtensionProblem = instanceModel2Logic.transform(modelGenerationProblem,partialModel) -// val validModelExtensionProblem = viatra2Logic.transformQueries(queries,modelGenerationProblem,new Viatra2LogicConfiguration) - - val logicProblem = modelGenerationProblem.output -// val logicProblem = modelExtensionProblem.output -// val logicProblem = validModelExtensionProblem.output - - - println("Problem created") - - var LogicResult solution - var LogicReasoner reasoner - //* - reasoner = new VampireSolver - val vampireConfig = new VampireSolverConfiguration => [ - //add configuration things, in config file first - it.writeToFile = false - ] - - solution = reasoner.solve(logicProblem, vampireConfig, workspace) - - println("Problem solved") - - - } - - def private static loadMetamodel() { - //FAM - val pckg = FunctionalarchitecturePackage.eINSTANCE - val List classes = pckg.EClassifiers.filter(EClass).toList - val List enums = pckg.EClassifiers.filter(EEnum).toList - val List literals = enums.map[getELiterals].flatten.toList - val List references = classes.map[getEReferences].flatten.toList - val List attributes = classes.map[getEAttributes].flatten.toList - return new EcoreMetamodelDescriptor(classes,#{},false,enums,literals,references,attributes) - } - - def private static loadPartialModel(ReasonerWorkspace inputs) { - Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl()); - inputs.readModel(EObject,"FunctionalArchitectureModel.xmi").eResource.allContents.toList -// inputs.readModel(EObject,"FAM.xmi").eResource.allContents.toList - } - -// def private static loadQueries(EcoreMetamodelDescriptor metamodel) { -// val i = hu.bme.mit.inf.dslreasoner.domains.transima.fam.patterns.Pattern.instance -// val patterns = i.specifications.toList -// val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet -// val derivedFeatures = new LinkedHashMap -// derivedFeatures.put(i.type,metamodel.attributes.filter[it.name == "type"].head) -// derivedFeatures.put(i.model,metamodel.references.filter[it.name == "model"].head) -// val res = new ViatraQuerySetDescriptor( -// patterns, -// wfPatterns, -// derivedFeatures -// ) -// return res -// } -} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/queries/YakinduPatterns.txt b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/queries/YakinduPatterns.txt new file mode 100644 index 00000000..8c2b9033 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/queries/YakinduPatterns.txt @@ -0,0 +1,227 @@ +package ca.mcgill.ecse.dslreasoner.vampire.queries + +import epackage + +///////// +// Entry +///////// + +pattern entryInRegion(r1 : Region, e1 : Entry) { + Region.vertices(r1, e1); +} + +@Constraint(severity="error", message="error", key = {r1}) +pattern noEntryInRegion(r1 : Region) { + neg find entryInRegion(r1, _); +} + +@Constraint(severity="error", message="error", key = {r}) +pattern multipleEntryInRegion(r : Region) { + find entryInRegion(r, e1); + find entryInRegion(r, e2); + e1 != e2; +} + +pattern transition(t : Transition, src : Vertex, trg : Vertex) { + Transition.source(t, src); + Transition.target(t, trg); +} + +@Constraint(severity="error", message="error", key = {e}) +pattern incomingToEntry(t : Transition, e : Entry) { + find transition(t, _, e); +} + +@Constraint(severity="error", message="error", key = {e}) +pattern noOutgoingTransitionFromEntry(e : Entry) { + neg find transition(_, e, _); +} + +@Constraint(severity="error", message="error", key = {e}) +pattern multipleTransitionFromEntry(e : Entry, t1 : Transition, t2: Transition) { + Entry.outgoingTransitions(e,t1); + Entry.outgoingTransitions(e,t2); + t1!=t2; +} + +///////// +// Exit +///////// + +@Constraint(severity="error", message="error", key = {e}) +pattern outgoingFromExit(t : Transition, e : Exit) { + Exit.outgoingTransitions(e,t); +} + +///////// +// Final +///////// + +@Constraint(severity="error", message="error", key = {f}) +pattern outgoingFromFinal(t : Transition, f : FinalState) { + FinalState.outgoingTransitions(f,t); +} + +///////// +// State vs Region +///////// + +@Constraint(severity="error", message="error", key = {region}) +pattern noStateInRegion(region: Region) { + neg find StateInRegion(region,_); +} +pattern StateInRegion(region: Region, state: State) { + Region.vertices(region,state); +} + +///////// +// Choice +///////// + +@Constraint(severity="error", message="error", key = {c}) +pattern choiceHasNoOutgoing(c : Choice) { + neg find transition(_, c, _); +} + +@Constraint(severity="error", message="error", key = {c}) +pattern choiceHasNoIncoming(c: Choice) { + neg find transition(_, _, c); +} + +/////////// +//// Synchronization +/////////// +// +//@Constraint(severity="error", message="error", key = {s}) +//pattern synchHasNoOutgoing(s : Synchronization) { +// neg find transition(_, s, _); +//} +// +//@Constraint(severity="error", message="error", key = {s}) +//pattern synchHasNoIncoming(s : Synchronization) { +// neg find transition(_, _, s); +//} +// +//@Constraint(severity="error", message="error", key = {s}) +//pattern SynchronizedIncomingInSameRegion(s : Synchronization, v1 : Vertex, v2 : Vertex) { +// find transition(t1, v1, s); +// find transition(t2, v2, s); +// t1!=t2; +// Region.vertices(r, v1); +// Region.vertices(r, v2); +//} or { +// find transition(t1, s, v1); +// find transition(t2, s, v2); +// t1!=t2; +// Region.vertices(r, v1); +// Region.vertices(r, v2); +//} +// +//@Constraint(severity="error", message="error", key = {s}) +//pattern notSynchronizingStates(s : Synchronization) { +// neg find hasMultipleOutgoingTrainsition(s); +// neg find hasMultipleIncomingTrainsition(s); +//} +// +//pattern hasMultipleOutgoingTrainsition(v : Synchronization) { +// find transition(_, v, trg1); +// find transition(_, v, trg2); +// trg1 != trg2; +//} +// +//pattern hasMultipleIncomingTrainsition(v : Synchronization) { +// find transition(_, src1, v); +// find transition(_, src2, v); +// src1 != src2; +//} +// +//@Constraint(severity="error", message="error", key = {s}) +//pattern SynchronizedRegionsAreNotSiblings(s : Synchronization, v1 : Vertex, v2 : Vertex) { +// find transition(_, v1, s); +// find transition(_, v2, s); +// CompositeElement.regions.vertices(r1, v1); +// CompositeElement.regions.vertices(r2, v2); +// r1 != r2; +//} or { +// find transition(_, s, v1); +// find transition(_, s, v2); +// CompositeElement.regions.vertices(r1, v1); +// CompositeElement.regions.vertices(r2, v2); +// r1 != r2; +//} + +/////////////////////////////// +// Extra +// +//@Constraint(severity="error", message="error", key = {s}) +//pattern SynchronizedRegionDoesNotHaveParent(s : Synchronization, v : Vertex) { +// find transition(_, v, s); +// neg find child(_,v); +//} or { +// find transition(_, s, v); +// neg find child(_,v); +//} + +pattern child(parent: CompositeElement, child: Vertex) { + CompositeElement.regions.vertices(parent, child); +} + +@Constraint(severity="error", message="error", key = {s}) +pattern SynchronizedRegionDoesNotHaveMultipleRegions(s : Synchronization, v : Vertex) { + find transition(_, v, s); + find child(c,v); + neg find hasMultipleRegions(c); +} or { + find transition(_, s, v); + find child(c,v); + neg find hasMultipleRegions(c); +} + + +pattern hasMultipleRegions(composite: CompositeElement) { + CompositeElement.regions(composite,region1); + CompositeElement.regions(composite,region2); + region1 != region2; +} + +/** + * Simplifying model generation + */ +@Constraint(severity="error", message="error", key = {s}) +pattern synchThree(s: Synchronization) { + Transition.target(t1,s); + Transition.target(t2,s); + Transition.target(t3,s); + t1!=t2; + t2!=t3; + t1!=t3; +} or { + Transition.source(t1,s); + Transition.source(t2,s); + Transition.source(t3,s); + t1!=t2; + t2!=t3; + t1!=t3; +} + +/** + * Simplifying model generation + */ +@Constraint(severity="error", message="error", key = {s1,s2}) +pattern twoSynch(s1 : Synchronization, s2 : Synchronization) { + Synchronization(s1); + Synchronization(s2); + s1 != s2; +} + +/** + * Model generation task: at least one synch + */ +//@Constraint(severity="error", message="error", key = {s}) +//pattern noSynch(s:Statechart) { +// Statechart(s); +// neg find synch(_); +//} +//pattern synch(s:Synchronization) { +// Synchronization(s); +//} \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Choice.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Choice.java new file mode 100644 index 00000000..8cd339c5 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Choice.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + + +/** + * + * A representation of the model object 'Choice'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getChoice() + * @model + * @generated + */ +public interface Choice extends Pseudostate { +} // Choice diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/CompositeElement.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/CompositeElement.java new file mode 100644 index 00000000..cf2949d8 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/CompositeElement.java @@ -0,0 +1,42 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Composite Element'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.CompositeElement#getRegions Regions}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getCompositeElement() + * @model abstract="true" + * @generated + */ +public interface CompositeElement extends EObject { + /** + * Returns the value of the 'Regions' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region}. + * + *

+ * If the meaning of the 'Regions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Regions' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getCompositeElement_Regions() + * @model containment="true" + * @generated + */ + EList getRegions(); + +} // CompositeElement diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Entry.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Entry.java new file mode 100644 index 00000000..57ecb460 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Entry.java @@ -0,0 +1,52 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + + +/** + * + * A representation of the model object 'Entry'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Entry#getType Type}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getEntry() + * @model + * @generated + */ +public interface Entry extends Pseudostate { + /** + * Returns the value of the 'Type' attribute. + * The literals are from the enumeration {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType}. + * + *

+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' attribute. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType + * @see #setType(EntryType) + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getEntry_Type() + * @model required="true" + * @generated + */ + EntryType getType(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Entry#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType + * @see #getType() + * @generated + */ + void setType(EntryType value); + +} // Entry diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/EntryType.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/EntryType.java new file mode 100644 index 00000000..40072da6 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/EntryType.java @@ -0,0 +1,239 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + +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 'Entry Type', + * and utility methods for working with them. + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getEntryType() + * @model + * @generated + */ +public enum EntryType implements Enumerator { + /** + * The 'Normal' literal object. + * + * + * @see #NORMAL_VALUE + * @generated + * @ordered + */ + NORMAL(0, "Normal", "Normal"), + + /** + * The 'History' literal object. + * + * + * @see #HISTORY_VALUE + * @generated + * @ordered + */ + HISTORY(0, "History", "History"), + + /** + * The 'Deep History' literal object. + * + * + * @see #DEEP_HISTORY_VALUE + * @generated + * @ordered + */ + DEEP_HISTORY(0, "DeepHistory", "DeepHistory"); + + /** + * The 'Normal' literal value. + * + *

+ * If the meaning of 'Normal' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #NORMAL + * @model name="Normal" + * @generated + * @ordered + */ + public static final int NORMAL_VALUE = 0; + + /** + * The 'History' literal value. + * + *

+ * If the meaning of 'History' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #HISTORY + * @model name="History" + * @generated + * @ordered + */ + public static final int HISTORY_VALUE = 0; + + /** + * The 'Deep History' literal value. + * + *

+ * If the meaning of 'Deep History' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #DEEP_HISTORY + * @model name="DeepHistory" + * @generated + * @ordered + */ + public static final int DEEP_HISTORY_VALUE = 0; + + /** + * An array of all the 'Entry Type' enumerators. + * + * + * @generated + */ + private static final EntryType[] VALUES_ARRAY = + new EntryType[] { + NORMAL, + HISTORY, + DEEP_HISTORY, + }; + + /** + * A public read-only list of all the 'Entry Type' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Entry Type' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static EntryType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + EntryType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Entry Type' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static EntryType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + EntryType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Entry Type' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static EntryType get(int value) { + switch (value) { + case NORMAL_VALUE: return NORMAL; + } + 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 EntryType(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; + } + +} //EntryType diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Exit.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Exit.java new file mode 100644 index 00000000..961a2aec --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Exit.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + + +/** + * + * A representation of the model object 'Exit'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getExit() + * @model + * @generated + */ +public interface Exit extends Pseudostate { +} // Exit diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/FinalState.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/FinalState.java new file mode 100644 index 00000000..bcc20dfd --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/FinalState.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + + +/** + * + * A representation of the model object 'Final State'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getFinalState() + * @model + * @generated + */ +public interface FinalState extends RegularState { +} // FinalState diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Pseudostate.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Pseudostate.java new file mode 100644 index 00000000..f938d5b3 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Pseudostate.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + + +/** + * + * A representation of the model object 'Pseudostate'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getPseudostate() + * @model abstract="true" + * @generated + */ +public interface Pseudostate extends Vertex { +} // Pseudostate diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Region.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Region.java new file mode 100644 index 00000000..ce361dce --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Region.java @@ -0,0 +1,42 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Region'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region#getVertices Vertices}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getRegion() + * @model + * @generated + */ +public interface Region extends EObject { + /** + * Returns the value of the 'Vertices' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex}. + * + *

+ * If the meaning of the 'Vertices' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Vertices' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getRegion_Vertices() + * @model containment="true" ordered="false" + * @generated + */ + EList getVertices(); + +} // Region diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/RegularState.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/RegularState.java new file mode 100644 index 00000000..e5b552cd --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/RegularState.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + + +/** + * + * A representation of the model object 'Regular State'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getRegularState() + * @model abstract="true" + * @generated + */ +public interface RegularState extends Vertex { +} // RegularState diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/State.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/State.java new file mode 100644 index 00000000..2cee971c --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/State.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + + +/** + * + * A representation of the model object 'State'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getState() + * @model + * @generated + */ +public interface State extends RegularState, CompositeElement { +} // State diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Statechart.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Statechart.java new file mode 100644 index 00000000..4d32fd53 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Statechart.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + + +/** + * + * A representation of the model object 'Statechart'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getStatechart() + * @model + * @generated + */ +public interface Statechart extends CompositeElement { +} // Statechart diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Transition.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Transition.java new file mode 100644 index 00000000..0518bfdb --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Transition.java @@ -0,0 +1,81 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Transition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getTarget Target}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getSource Source}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getTransition() + * @model + * @generated + */ +public interface Transition extends EObject { + /** + * Returns the value of the 'Target' reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex#getIncomingTransitions Incoming Transitions}'. + * + *

+ * If the meaning of the 'Target' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Target' reference. + * @see #setTarget(Vertex) + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getTransition_Target() + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex#getIncomingTransitions + * @model opposite="incomingTransitions" required="true" ordered="false" + * @generated + */ + Vertex getTarget(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getTarget Target}' reference. + * + * + * @param value the new value of the 'Target' reference. + * @see #getTarget() + * @generated + */ + void setTarget(Vertex value); + + /** + * Returns the value of the 'Source' container reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex#getOutgoingTransitions Outgoing Transitions}'. + * + *

+ * If the meaning of the 'Source' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Source' container reference. + * @see #setSource(Vertex) + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getTransition_Source() + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex#getOutgoingTransitions + * @model opposite="outgoingTransitions" transient="false" ordered="false" + * @generated + */ + Vertex getSource(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getSource Source}' container reference. + * + * + * @param value the new value of the 'Source' container reference. + * @see #getSource() + * @generated + */ + void setSource(Vertex value); + +} // Transition diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Vertex.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Vertex.java new file mode 100644 index 00000000..43db469b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/Vertex.java @@ -0,0 +1,63 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Vertex'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex#getIncomingTransitions Incoming Transitions}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex#getOutgoingTransitions Outgoing Transitions}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getVertex() + * @model abstract="true" + * @generated + */ +public interface Vertex extends EObject { + /** + * Returns the value of the 'Incoming Transitions' reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition}. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getTarget Target}'. + * + *

+ * If the meaning of the 'Incoming Transitions' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Incoming Transitions' reference list. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getVertex_IncomingTransitions() + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getTarget + * @model opposite="target" ordered="false" + * @generated + */ + EList getIncomingTransitions(); + + /** + * Returns the value of the 'Outgoing Transitions' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition}. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getSource Source}'. + * + *

+ * If the meaning of the 'Outgoing Transitions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Outgoing Transitions' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#getVertex_OutgoingTransitions() + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getSource + * @model opposite="source" containment="true" ordered="false" + * @generated + */ + EList getOutgoingTransitions(); + +} // Vertex diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/YakindummFactory.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/YakindummFactory.java new file mode 100644 index 00000000..a530e71f --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/YakindummFactory.java @@ -0,0 +1,105 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + +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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage + * @generated + */ +public interface YakindummFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + YakindummFactory eINSTANCE = ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummFactoryImpl.init(); + + /** + * Returns a new object of class 'Region'. + * + * + * @return a new object of class 'Region'. + * @generated + */ + Region createRegion(); + + /** + * Returns a new object of class 'Transition'. + * + * + * @return a new object of class 'Transition'. + * @generated + */ + Transition createTransition(); + + /** + * Returns a new object of class 'Statechart'. + * + * + * @return a new object of class 'Statechart'. + * @generated + */ + Statechart createStatechart(); + + /** + * Returns a new object of class 'Entry'. + * + * + * @return a new object of class 'Entry'. + * @generated + */ + Entry createEntry(); + + /** + * Returns a new object of class 'State'. + * + * + * @return a new object of class 'State'. + * @generated + */ + State createState(); + + /** + * Returns a new object of class 'Choice'. + * + * + * @return a new object of class 'Choice'. + * @generated + */ + Choice createChoice(); + + /** + * Returns a new object of class 'Exit'. + * + * + * @return a new object of class 'Exit'. + * @generated + */ + Exit createExit(); + + /** + * Returns a new object of class 'Final State'. + * + * + * @return a new object of class 'Final State'. + * @generated + */ + FinalState createFinalState(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + YakindummPackage getYakindummPackage(); + +} //YakindummFactory diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/YakindummPackage.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/YakindummPackage.java new file mode 100644 index 00000000..f70e851a --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/YakindummPackage.java @@ -0,0 +1,1032 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm; + +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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummFactory + * @model kind="package" + * @generated + */ +public interface YakindummPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "yakindumm"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "hu.bme.mit.inf.yakindumm"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "ca.mcgill.ecse.yakindumm"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + YakindummPackage eINSTANCE = ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl.init(); + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.VertexImpl Vertex}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.VertexImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getVertex() + * @generated + */ + int VERTEX = 1; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int VERTEX__INCOMING_TRANSITIONS = 0; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int VERTEX__OUTGOING_TRANSITIONS = 1; + + /** + * The number of structural features of the 'Vertex' class. + * + * + * @generated + * @ordered + */ + int VERTEX_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Vertex' class. + * + * + * @generated + * @ordered + */ + int VERTEX_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.PseudostateImpl Pseudostate}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.PseudostateImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getPseudostate() + * @generated + */ + int PSEUDOSTATE = 0; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int PSEUDOSTATE__INCOMING_TRANSITIONS = VERTEX__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int PSEUDOSTATE__OUTGOING_TRANSITIONS = VERTEX__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Pseudostate' class. + * + * + * @generated + * @ordered + */ + int PSEUDOSTATE_FEATURE_COUNT = VERTEX_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Pseudostate' class. + * + * + * @generated + * @ordered + */ + int PSEUDOSTATE_OPERATION_COUNT = VERTEX_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.RegionImpl Region}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.RegionImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getRegion() + * @generated + */ + int REGION = 2; + + /** + * The feature id for the 'Vertices' containment reference list. + * + * + * @generated + * @ordered + */ + int REGION__VERTICES = 0; + + /** + * The number of structural features of the 'Region' class. + * + * + * @generated + * @ordered + */ + int REGION_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Region' class. + * + * + * @generated + * @ordered + */ + int REGION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.TransitionImpl Transition}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.TransitionImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getTransition() + * @generated + */ + int TRANSITION = 3; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int TRANSITION__TARGET = 0; + + /** + * The feature id for the 'Source' container reference. + * + * + * @generated + * @ordered + */ + int TRANSITION__SOURCE = 1; + + /** + * The number of structural features of the 'Transition' class. + * + * + * @generated + * @ordered + */ + int TRANSITION_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Transition' class. + * + * + * @generated + * @ordered + */ + int TRANSITION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.CompositeElementImpl Composite Element}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.CompositeElementImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getCompositeElement() + * @generated + */ + int COMPOSITE_ELEMENT = 8; + + /** + * The feature id for the 'Regions' containment reference list. + * + * + * @generated + * @ordered + */ + int COMPOSITE_ELEMENT__REGIONS = 0; + + /** + * The number of structural features of the 'Composite Element' class. + * + * + * @generated + * @ordered + */ + int COMPOSITE_ELEMENT_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Composite Element' class. + * + * + * @generated + * @ordered + */ + int COMPOSITE_ELEMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.StatechartImpl Statechart}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.StatechartImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getStatechart() + * @generated + */ + int STATECHART = 4; + + /** + * The feature id for the 'Regions' containment reference list. + * + * + * @generated + * @ordered + */ + int STATECHART__REGIONS = COMPOSITE_ELEMENT__REGIONS; + + /** + * The number of structural features of the 'Statechart' class. + * + * + * @generated + * @ordered + */ + int STATECHART_FEATURE_COUNT = COMPOSITE_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Statechart' class. + * + * + * @generated + * @ordered + */ + int STATECHART_OPERATION_COUNT = COMPOSITE_ELEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.EntryImpl Entry}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.EntryImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getEntry() + * @generated + */ + int ENTRY = 5; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int ENTRY__INCOMING_TRANSITIONS = PSEUDOSTATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int ENTRY__OUTGOING_TRANSITIONS = PSEUDOSTATE__OUTGOING_TRANSITIONS; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int ENTRY__TYPE = PSEUDOSTATE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Entry' class. + * + * + * @generated + * @ordered + */ + int ENTRY_FEATURE_COUNT = PSEUDOSTATE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Entry' class. + * + * + * @generated + * @ordered + */ + int ENTRY_OPERATION_COUNT = PSEUDOSTATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.RegularStateImpl Regular State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.RegularStateImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getRegularState() + * @generated + */ + int REGULAR_STATE = 7; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int REGULAR_STATE__INCOMING_TRANSITIONS = VERTEX__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int REGULAR_STATE__OUTGOING_TRANSITIONS = VERTEX__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Regular State' class. + * + * + * @generated + * @ordered + */ + int REGULAR_STATE_FEATURE_COUNT = VERTEX_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Regular State' class. + * + * + * @generated + * @ordered + */ + int REGULAR_STATE_OPERATION_COUNT = VERTEX_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.StateImpl State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.StateImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getState() + * @generated + */ + int STATE = 6; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int STATE__INCOMING_TRANSITIONS = REGULAR_STATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int STATE__OUTGOING_TRANSITIONS = REGULAR_STATE__OUTGOING_TRANSITIONS; + + /** + * The feature id for the 'Regions' containment reference list. + * + * + * @generated + * @ordered + */ + int STATE__REGIONS = REGULAR_STATE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'State' class. + * + * + * @generated + * @ordered + */ + int STATE_FEATURE_COUNT = REGULAR_STATE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'State' class. + * + * + * @generated + * @ordered + */ + int STATE_OPERATION_COUNT = REGULAR_STATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.ChoiceImpl Choice}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.ChoiceImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getChoice() + * @generated + */ + int CHOICE = 9; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int CHOICE__INCOMING_TRANSITIONS = PSEUDOSTATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int CHOICE__OUTGOING_TRANSITIONS = PSEUDOSTATE__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Choice' class. + * + * + * @generated + * @ordered + */ + int CHOICE_FEATURE_COUNT = PSEUDOSTATE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Choice' class. + * + * + * @generated + * @ordered + */ + int CHOICE_OPERATION_COUNT = PSEUDOSTATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.ExitImpl Exit}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.ExitImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getExit() + * @generated + */ + int EXIT = 10; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int EXIT__INCOMING_TRANSITIONS = PSEUDOSTATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int EXIT__OUTGOING_TRANSITIONS = PSEUDOSTATE__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Exit' class. + * + * + * @generated + * @ordered + */ + int EXIT_FEATURE_COUNT = PSEUDOSTATE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Exit' class. + * + * + * @generated + * @ordered + */ + int EXIT_OPERATION_COUNT = PSEUDOSTATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.FinalStateImpl Final State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.FinalStateImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getFinalState() + * @generated + */ + int FINAL_STATE = 11; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int FINAL_STATE__INCOMING_TRANSITIONS = REGULAR_STATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int FINAL_STATE__OUTGOING_TRANSITIONS = REGULAR_STATE__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Final State' class. + * + * + * @generated + * @ordered + */ + int FINAL_STATE_FEATURE_COUNT = REGULAR_STATE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Final State' class. + * + * + * @generated + * @ordered + */ + int FINAL_STATE_OPERATION_COUNT = REGULAR_STATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType Entry Type}' enum. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getEntryType() + * @generated + */ + int ENTRY_TYPE = 12; + + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Pseudostate Pseudostate}'. + * + * + * @return the meta object for class 'Pseudostate'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Pseudostate + * @generated + */ + EClass getPseudostate(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex Vertex}'. + * + * + * @return the meta object for class 'Vertex'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex + * @generated + */ + EClass getVertex(); + + /** + * Returns the meta object for the reference list '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex#getIncomingTransitions Incoming Transitions}'. + * + * + * @return the meta object for the reference list 'Incoming Transitions'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex#getIncomingTransitions() + * @see #getVertex() + * @generated + */ + EReference getVertex_IncomingTransitions(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex#getOutgoingTransitions Outgoing Transitions}'. + * + * + * @return the meta object for the containment reference list 'Outgoing Transitions'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex#getOutgoingTransitions() + * @see #getVertex() + * @generated + */ + EReference getVertex_OutgoingTransitions(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region Region}'. + * + * + * @return the meta object for class 'Region'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region + * @generated + */ + EClass getRegion(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region#getVertices Vertices}'. + * + * + * @return the meta object for the containment reference list 'Vertices'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region#getVertices() + * @see #getRegion() + * @generated + */ + EReference getRegion_Vertices(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition Transition}'. + * + * + * @return the meta object for class 'Transition'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition + * @generated + */ + EClass getTransition(); + + /** + * Returns the meta object for the reference '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getTarget Target}'. + * + * + * @return the meta object for the reference 'Target'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getTarget() + * @see #getTransition() + * @generated + */ + EReference getTransition_Target(); + + /** + * Returns the meta object for the container reference '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getSource Source}'. + * + * + * @return the meta object for the container reference 'Source'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition#getSource() + * @see #getTransition() + * @generated + */ + EReference getTransition_Source(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Statechart Statechart}'. + * + * + * @return the meta object for class 'Statechart'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Statechart + * @generated + */ + EClass getStatechart(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Entry Entry}'. + * + * + * @return the meta object for class 'Entry'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Entry + * @generated + */ + EClass getEntry(); + + /** + * Returns the meta object for the attribute '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Entry#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Entry#getType() + * @see #getEntry() + * @generated + */ + EAttribute getEntry_Type(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.State State}'. + * + * + * @return the meta object for class 'State'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.State + * @generated + */ + EClass getState(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.RegularState Regular State}'. + * + * + * @return the meta object for class 'Regular State'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.RegularState + * @generated + */ + EClass getRegularState(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.CompositeElement Composite Element}'. + * + * + * @return the meta object for class 'Composite Element'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.CompositeElement + * @generated + */ + EClass getCompositeElement(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.CompositeElement#getRegions Regions}'. + * + * + * @return the meta object for the containment reference list 'Regions'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.CompositeElement#getRegions() + * @see #getCompositeElement() + * @generated + */ + EReference getCompositeElement_Regions(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Choice Choice}'. + * + * + * @return the meta object for class 'Choice'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Choice + * @generated + */ + EClass getChoice(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Exit Exit}'. + * + * + * @return the meta object for class 'Exit'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Exit + * @generated + */ + EClass getExit(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.FinalState Final State}'. + * + * + * @return the meta object for class 'Final State'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.FinalState + * @generated + */ + EClass getFinalState(); + + /** + * Returns the meta object for enum '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType Entry Type}'. + * + * + * @return the meta object for enum 'Entry Type'. + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType + * @generated + */ + EEnum getEntryType(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + YakindummFactory getYakindummFactory(); + + /** + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.PseudostateImpl Pseudostate}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.PseudostateImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getPseudostate() + * @generated + */ + EClass PSEUDOSTATE = eINSTANCE.getPseudostate(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.VertexImpl Vertex}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.VertexImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getVertex() + * @generated + */ + EClass VERTEX = eINSTANCE.getVertex(); + + /** + * The meta object literal for the 'Incoming Transitions' reference list feature. + * + * + * @generated + */ + EReference VERTEX__INCOMING_TRANSITIONS = eINSTANCE.getVertex_IncomingTransitions(); + + /** + * The meta object literal for the 'Outgoing Transitions' containment reference list feature. + * + * + * @generated + */ + EReference VERTEX__OUTGOING_TRANSITIONS = eINSTANCE.getVertex_OutgoingTransitions(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.RegionImpl Region}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.RegionImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getRegion() + * @generated + */ + EClass REGION = eINSTANCE.getRegion(); + + /** + * The meta object literal for the 'Vertices' containment reference list feature. + * + * + * @generated + */ + EReference REGION__VERTICES = eINSTANCE.getRegion_Vertices(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.TransitionImpl Transition}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.TransitionImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getTransition() + * @generated + */ + EClass TRANSITION = eINSTANCE.getTransition(); + + /** + * The meta object literal for the 'Target' reference feature. + * + * + * @generated + */ + EReference TRANSITION__TARGET = eINSTANCE.getTransition_Target(); + + /** + * The meta object literal for the 'Source' container reference feature. + * + * + * @generated + */ + EReference TRANSITION__SOURCE = eINSTANCE.getTransition_Source(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.StatechartImpl Statechart}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.StatechartImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getStatechart() + * @generated + */ + EClass STATECHART = eINSTANCE.getStatechart(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.EntryImpl Entry}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.EntryImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getEntry() + * @generated + */ + EClass ENTRY = eINSTANCE.getEntry(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute ENTRY__TYPE = eINSTANCE.getEntry_Type(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.StateImpl State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.StateImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getState() + * @generated + */ + EClass STATE = eINSTANCE.getState(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.RegularStateImpl Regular State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.RegularStateImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getRegularState() + * @generated + */ + EClass REGULAR_STATE = eINSTANCE.getRegularState(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.CompositeElementImpl Composite Element}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.CompositeElementImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getCompositeElement() + * @generated + */ + EClass COMPOSITE_ELEMENT = eINSTANCE.getCompositeElement(); + + /** + * The meta object literal for the 'Regions' containment reference list feature. + * + * + * @generated + */ + EReference COMPOSITE_ELEMENT__REGIONS = eINSTANCE.getCompositeElement_Regions(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.ChoiceImpl Choice}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.ChoiceImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getChoice() + * @generated + */ + EClass CHOICE = eINSTANCE.getChoice(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.ExitImpl Exit}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.ExitImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getExit() + * @generated + */ + EClass EXIT = eINSTANCE.getExit(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.FinalStateImpl Final State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.FinalStateImpl + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getFinalState() + * @generated + */ + EClass FINAL_STATE = eINSTANCE.getFinalState(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType Entry Type}' enum. + * + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.YakindummPackageImpl#getEntryType() + * @generated + */ + EEnum ENTRY_TYPE = eINSTANCE.getEntryType(); + + } + +} //YakindummPackage diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/ChoiceImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/ChoiceImpl.java new file mode 100644 index 00000000..379d4a29 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/ChoiceImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Choice; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Choice'. + * + * + * @generated + */ +public class ChoiceImpl extends PseudostateImpl implements Choice { + /** + * + * + * @generated + */ + protected ChoiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.CHOICE; + } + +} //ChoiceImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/CompositeElementImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/CompositeElementImpl.java new file mode 100644 index 00000000..067a5ee3 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/CompositeElementImpl.java @@ -0,0 +1,152 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.CompositeElement; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +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; + +/** + * + * An implementation of the model object 'Composite Element'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.CompositeElementImpl#getRegions Regions}
  • + *
+ * + * @generated + */ +public abstract class CompositeElementImpl extends MinimalEObjectImpl.Container implements CompositeElement { + /** + * The cached value of the '{@link #getRegions() Regions}' containment reference list. + * + * + * @see #getRegions() + * @generated + * @ordered + */ + protected EList regions; + + /** + * + * + * @generated + */ + protected CompositeElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.COMPOSITE_ELEMENT; + } + + /** + * + * + * @generated + */ + public EList getRegions() { + if (regions == null) { + regions = new EObjectContainmentEList(Region.class, this, YakindummPackage.COMPOSITE_ELEMENT__REGIONS); + } + return regions; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case YakindummPackage.COMPOSITE_ELEMENT__REGIONS: + return ((InternalEList)getRegions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case YakindummPackage.COMPOSITE_ELEMENT__REGIONS: + return getRegions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case YakindummPackage.COMPOSITE_ELEMENT__REGIONS: + getRegions().clear(); + getRegions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case YakindummPackage.COMPOSITE_ELEMENT__REGIONS: + getRegions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case YakindummPackage.COMPOSITE_ELEMENT__REGIONS: + return regions != null && !regions.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //CompositeElementImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/EntryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/EntryImpl.java new file mode 100644 index 00000000..0ad87100 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/EntryImpl.java @@ -0,0 +1,163 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Entry; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Entry'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.EntryImpl#getType Type}
  • + *
+ * + * @generated + */ +public class EntryImpl extends PseudostateImpl implements Entry { + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final EntryType TYPE_EDEFAULT = EntryType.NORMAL; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected EntryType type = TYPE_EDEFAULT; + + /** + * + * + * @generated + */ + protected EntryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.ENTRY; + } + + /** + * + * + * @generated + */ + public EntryType getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(EntryType newType) { + EntryType oldType = type; + type = newType == null ? TYPE_EDEFAULT : newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, YakindummPackage.ENTRY__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case YakindummPackage.ENTRY__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case YakindummPackage.ENTRY__TYPE: + setType((EntryType)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case YakindummPackage.ENTRY__TYPE: + setType(TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case YakindummPackage.ENTRY__TYPE: + return type != TYPE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (Type: "); + result.append(type); + result.append(')'); + return result.toString(); + } + +} //EntryImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/ExitImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/ExitImpl.java new file mode 100644 index 00000000..ae360e68 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/ExitImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Exit; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Exit'. + * + * + * @generated + */ +public class ExitImpl extends PseudostateImpl implements Exit { + /** + * + * + * @generated + */ + protected ExitImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.EXIT; + } + +} //ExitImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/FinalStateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/FinalStateImpl.java new file mode 100644 index 00000000..ccb19763 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/FinalStateImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.FinalState; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Final State'. + * + * + * @generated + */ +public class FinalStateImpl extends RegularStateImpl implements FinalState { + /** + * + * + * @generated + */ + protected FinalStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.FINAL_STATE; + } + +} //FinalStateImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/PseudostateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/PseudostateImpl.java new file mode 100644 index 00000000..b8c76c27 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/PseudostateImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Pseudostate; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Pseudostate'. + * + * + * @generated + */ +public abstract class PseudostateImpl extends VertexImpl implements Pseudostate { + /** + * + * + * @generated + */ + protected PseudostateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.PSEUDOSTATE; + } + +} //PseudostateImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/RegionImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/RegionImpl.java new file mode 100644 index 00000000..440c389c --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/RegionImpl.java @@ -0,0 +1,152 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +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; + +/** + * + * An implementation of the model object 'Region'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.RegionImpl#getVertices Vertices}
  • + *
+ * + * @generated + */ +public class RegionImpl extends MinimalEObjectImpl.Container implements Region { + /** + * The cached value of the '{@link #getVertices() Vertices}' containment reference list. + * + * + * @see #getVertices() + * @generated + * @ordered + */ + protected EList vertices; + + /** + * + * + * @generated + */ + protected RegionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.REGION; + } + + /** + * + * + * @generated + */ + public EList getVertices() { + if (vertices == null) { + vertices = new EObjectContainmentEList(Vertex.class, this, YakindummPackage.REGION__VERTICES); + } + return vertices; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case YakindummPackage.REGION__VERTICES: + return ((InternalEList)getVertices()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case YakindummPackage.REGION__VERTICES: + return getVertices(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case YakindummPackage.REGION__VERTICES: + getVertices().clear(); + getVertices().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case YakindummPackage.REGION__VERTICES: + getVertices().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case YakindummPackage.REGION__VERTICES: + return vertices != null && !vertices.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //RegionImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/RegularStateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/RegularStateImpl.java new file mode 100644 index 00000000..2ada6da9 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/RegularStateImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.RegularState; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Regular State'. + * + * + * @generated + */ +public abstract class RegularStateImpl extends VertexImpl implements RegularState { + /** + * + * + * @generated + */ + protected RegularStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.REGULAR_STATE; + } + +} //RegularStateImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/StateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/StateImpl.java new file mode 100644 index 00000000..080bed16 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/StateImpl.java @@ -0,0 +1,183 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.CompositeElement; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.State; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'State'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.StateImpl#getRegions Regions}
  • + *
+ * + * @generated + */ +public class StateImpl extends RegularStateImpl implements State { + /** + * The cached value of the '{@link #getRegions() Regions}' containment reference list. + * + * + * @see #getRegions() + * @generated + * @ordered + */ + protected EList regions; + + /** + * + * + * @generated + */ + protected StateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.STATE; + } + + /** + * + * + * @generated + */ + public EList getRegions() { + if (regions == null) { + regions = new EObjectContainmentEList(Region.class, this, YakindummPackage.STATE__REGIONS); + } + return regions; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case YakindummPackage.STATE__REGIONS: + return ((InternalEList)getRegions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case YakindummPackage.STATE__REGIONS: + return getRegions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case YakindummPackage.STATE__REGIONS: + getRegions().clear(); + getRegions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case YakindummPackage.STATE__REGIONS: + getRegions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case YakindummPackage.STATE__REGIONS: + return regions != null && !regions.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == CompositeElement.class) { + switch (derivedFeatureID) { + case YakindummPackage.STATE__REGIONS: return YakindummPackage.COMPOSITE_ELEMENT__REGIONS; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == CompositeElement.class) { + switch (baseFeatureID) { + case YakindummPackage.COMPOSITE_ELEMENT__REGIONS: return YakindummPackage.STATE__REGIONS; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} //StateImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/StatechartImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/StatechartImpl.java new file mode 100644 index 00000000..0b48e8d8 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/StatechartImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Statechart; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Statechart'. + * + * + * @generated + */ +public class StatechartImpl extends CompositeElementImpl implements Statechart { + /** + * + * + * @generated + */ + protected StatechartImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.STATECHART; + } + +} //StatechartImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/TransitionImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/TransitionImpl.java new file mode 100644 index 00000000..875964a2 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/TransitionImpl.java @@ -0,0 +1,284 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +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.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'Transition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.TransitionImpl#getTarget Target}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.TransitionImpl#getSource Source}
  • + *
+ * + * @generated + */ +public class TransitionImpl extends MinimalEObjectImpl.Container implements Transition { + /** + * The cached value of the '{@link #getTarget() Target}' reference. + * + * + * @see #getTarget() + * @generated + * @ordered + */ + protected Vertex target; + + /** + * + * + * @generated + */ + protected TransitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.TRANSITION; + } + + /** + * + * + * @generated + */ + public Vertex getTarget() { + if (target != null && target.eIsProxy()) { + InternalEObject oldTarget = (InternalEObject)target; + target = (Vertex)eResolveProxy(oldTarget); + if (target != oldTarget) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, YakindummPackage.TRANSITION__TARGET, oldTarget, target)); + } + } + return target; + } + + /** + * + * + * @generated + */ + public Vertex basicGetTarget() { + return target; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetTarget(Vertex newTarget, NotificationChain msgs) { + Vertex oldTarget = target; + target = newTarget; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, YakindummPackage.TRANSITION__TARGET, oldTarget, newTarget); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTarget(Vertex newTarget) { + if (newTarget != target) { + NotificationChain msgs = null; + if (target != null) + msgs = ((InternalEObject)target).eInverseRemove(this, YakindummPackage.VERTEX__INCOMING_TRANSITIONS, Vertex.class, msgs); + if (newTarget != null) + msgs = ((InternalEObject)newTarget).eInverseAdd(this, YakindummPackage.VERTEX__INCOMING_TRANSITIONS, Vertex.class, msgs); + msgs = basicSetTarget(newTarget, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, YakindummPackage.TRANSITION__TARGET, newTarget, newTarget)); + } + + /** + * + * + * @generated + */ + public Vertex getSource() { + if (eContainerFeatureID() != YakindummPackage.TRANSITION__SOURCE) return null; + return (Vertex)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSource(Vertex newSource, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newSource, YakindummPackage.TRANSITION__SOURCE, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setSource(Vertex newSource) { + if (newSource != eInternalContainer() || (eContainerFeatureID() != YakindummPackage.TRANSITION__SOURCE && newSource != null)) { + if (EcoreUtil.isAncestor(this, newSource)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newSource != null) + msgs = ((InternalEObject)newSource).eInverseAdd(this, YakindummPackage.VERTEX__OUTGOING_TRANSITIONS, Vertex.class, msgs); + msgs = basicSetSource(newSource, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, YakindummPackage.TRANSITION__SOURCE, newSource, newSource)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case YakindummPackage.TRANSITION__TARGET: + if (target != null) + msgs = ((InternalEObject)target).eInverseRemove(this, YakindummPackage.VERTEX__INCOMING_TRANSITIONS, Vertex.class, msgs); + return basicSetTarget((Vertex)otherEnd, msgs); + case YakindummPackage.TRANSITION__SOURCE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetSource((Vertex)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case YakindummPackage.TRANSITION__TARGET: + return basicSetTarget(null, msgs); + case YakindummPackage.TRANSITION__SOURCE: + return basicSetSource(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case YakindummPackage.TRANSITION__SOURCE: + return eInternalContainer().eInverseRemove(this, YakindummPackage.VERTEX__OUTGOING_TRANSITIONS, Vertex.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case YakindummPackage.TRANSITION__TARGET: + if (resolve) return getTarget(); + return basicGetTarget(); + case YakindummPackage.TRANSITION__SOURCE: + return getSource(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case YakindummPackage.TRANSITION__TARGET: + setTarget((Vertex)newValue); + return; + case YakindummPackage.TRANSITION__SOURCE: + setSource((Vertex)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case YakindummPackage.TRANSITION__TARGET: + setTarget((Vertex)null); + return; + case YakindummPackage.TRANSITION__SOURCE: + setSource((Vertex)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case YakindummPackage.TRANSITION__TARGET: + return target != null; + case YakindummPackage.TRANSITION__SOURCE: + return getSource() != null; + } + return super.eIsSet(featureID); + } + +} //TransitionImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/VertexImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/VertexImpl.java new file mode 100644 index 00000000..66871f3f --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/VertexImpl.java @@ -0,0 +1,206 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +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.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Vertex'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.VertexImpl#getIncomingTransitions Incoming Transitions}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl.VertexImpl#getOutgoingTransitions Outgoing Transitions}
  • + *
+ * + * @generated + */ +public abstract class VertexImpl extends MinimalEObjectImpl.Container implements Vertex { + /** + * The cached value of the '{@link #getIncomingTransitions() Incoming Transitions}' reference list. + * + * + * @see #getIncomingTransitions() + * @generated + * @ordered + */ + protected EList incomingTransitions; + + /** + * The cached value of the '{@link #getOutgoingTransitions() Outgoing Transitions}' containment reference list. + * + * + * @see #getOutgoingTransitions() + * @generated + * @ordered + */ + protected EList outgoingTransitions; + + /** + * + * + * @generated + */ + protected VertexImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return YakindummPackage.Literals.VERTEX; + } + + /** + * + * + * @generated + */ + public EList getIncomingTransitions() { + if (incomingTransitions == null) { + incomingTransitions = new EObjectWithInverseResolvingEList(Transition.class, this, YakindummPackage.VERTEX__INCOMING_TRANSITIONS, YakindummPackage.TRANSITION__TARGET); + } + return incomingTransitions; + } + + /** + * + * + * @generated + */ + public EList getOutgoingTransitions() { + if (outgoingTransitions == null) { + outgoingTransitions = new EObjectContainmentWithInverseEList(Transition.class, this, YakindummPackage.VERTEX__OUTGOING_TRANSITIONS, YakindummPackage.TRANSITION__SOURCE); + } + return outgoingTransitions; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case YakindummPackage.VERTEX__INCOMING_TRANSITIONS: + return ((InternalEList)(InternalEList)getIncomingTransitions()).basicAdd(otherEnd, msgs); + case YakindummPackage.VERTEX__OUTGOING_TRANSITIONS: + return ((InternalEList)(InternalEList)getOutgoingTransitions()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case YakindummPackage.VERTEX__INCOMING_TRANSITIONS: + return ((InternalEList)getIncomingTransitions()).basicRemove(otherEnd, msgs); + case YakindummPackage.VERTEX__OUTGOING_TRANSITIONS: + return ((InternalEList)getOutgoingTransitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case YakindummPackage.VERTEX__INCOMING_TRANSITIONS: + return getIncomingTransitions(); + case YakindummPackage.VERTEX__OUTGOING_TRANSITIONS: + return getOutgoingTransitions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case YakindummPackage.VERTEX__INCOMING_TRANSITIONS: + getIncomingTransitions().clear(); + getIncomingTransitions().addAll((Collection)newValue); + return; + case YakindummPackage.VERTEX__OUTGOING_TRANSITIONS: + getOutgoingTransitions().clear(); + getOutgoingTransitions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case YakindummPackage.VERTEX__INCOMING_TRANSITIONS: + getIncomingTransitions().clear(); + return; + case YakindummPackage.VERTEX__OUTGOING_TRANSITIONS: + getOutgoingTransitions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case YakindummPackage.VERTEX__INCOMING_TRANSITIONS: + return incomingTransitions != null && !incomingTransitions.isEmpty(); + case YakindummPackage.VERTEX__OUTGOING_TRANSITIONS: + return outgoingTransitions != null && !outgoingTransitions.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //VertexImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/YakindummFactoryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/YakindummFactoryImpl.java new file mode 100644 index 00000000..d4be344f --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/YakindummFactoryImpl.java @@ -0,0 +1,223 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class YakindummFactoryImpl extends EFactoryImpl implements YakindummFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static YakindummFactory init() { + try { + YakindummFactory theYakindummFactory = (YakindummFactory)EPackage.Registry.INSTANCE.getEFactory(YakindummPackage.eNS_URI); + if (theYakindummFactory != null) { + return theYakindummFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new YakindummFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public YakindummFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case YakindummPackage.REGION: return createRegion(); + case YakindummPackage.TRANSITION: return createTransition(); + case YakindummPackage.STATECHART: return createStatechart(); + case YakindummPackage.ENTRY: return createEntry(); + case YakindummPackage.STATE: return createState(); + case YakindummPackage.CHOICE: return createChoice(); + case YakindummPackage.EXIT: return createExit(); + case YakindummPackage.FINAL_STATE: return createFinalState(); + 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 YakindummPackage.ENTRY_TYPE: + return createEntryTypeFromString(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 YakindummPackage.ENTRY_TYPE: + return convertEntryTypeToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Region createRegion() { + RegionImpl region = new RegionImpl(); + return region; + } + + /** + * + * + * @generated + */ + public Transition createTransition() { + TransitionImpl transition = new TransitionImpl(); + return transition; + } + + /** + * + * + * @generated + */ + public Statechart createStatechart() { + StatechartImpl statechart = new StatechartImpl(); + return statechart; + } + + /** + * + * + * @generated + */ + public Entry createEntry() { + EntryImpl entry = new EntryImpl(); + return entry; + } + + /** + * + * + * @generated + */ + public State createState() { + StateImpl state = new StateImpl(); + return state; + } + + /** + * + * + * @generated + */ + public Choice createChoice() { + ChoiceImpl choice = new ChoiceImpl(); + return choice; + } + + /** + * + * + * @generated + */ + public Exit createExit() { + ExitImpl exit = new ExitImpl(); + return exit; + } + + /** + * + * + * @generated + */ + public FinalState createFinalState() { + FinalStateImpl finalState = new FinalStateImpl(); + return finalState; + } + + /** + * + * + * @generated + */ + public EntryType createEntryTypeFromString(EDataType eDataType, String initialValue) { + EntryType result = EntryType.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertEntryTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public YakindummPackage getYakindummPackage() { + return (YakindummPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static YakindummPackage getPackage() { + return YakindummPackage.eINSTANCE; + } + +} //YakindummFactoryImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/YakindummPackageImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/YakindummPackageImpl.java new file mode 100644 index 00000000..b95dc3ea --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/impl/YakindummPackageImpl.java @@ -0,0 +1,511 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.impl; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Choice; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.CompositeElement; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Entry; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.EntryType; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Exit; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.FinalState; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Pseudostate; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.RegularState; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.State; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Statechart; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummFactory; +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage; + +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; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class YakindummPackageImpl extends EPackageImpl implements YakindummPackage { + /** + * + * + * @generated + */ + private EClass pseudostateEClass = null; + + /** + * + * + * @generated + */ + private EClass vertexEClass = null; + + /** + * + * + * @generated + */ + private EClass regionEClass = null; + + /** + * + * + * @generated + */ + private EClass transitionEClass = null; + + /** + * + * + * @generated + */ + private EClass statechartEClass = null; + + /** + * + * + * @generated + */ + private EClass entryEClass = null; + + /** + * + * + * @generated + */ + private EClass stateEClass = null; + + /** + * + * + * @generated + */ + private EClass regularStateEClass = null; + + /** + * + * + * @generated + */ + private EClass compositeElementEClass = null; + + /** + * + * + * @generated + */ + private EClass choiceEClass = null; + + /** + * + * + * @generated + */ + private EClass exitEClass = null; + + /** + * + * + * @generated + */ + private EClass finalStateEClass = null; + + /** + * + * + * @generated + */ + private EEnum entryTypeEEnum = 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage#eNS_URI + * @see #init() + * @generated + */ + private YakindummPackageImpl() { + super(eNS_URI, YakindummFactory.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 YakindummPackage#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 YakindummPackage init() { + if (isInited) return (YakindummPackage)EPackage.Registry.INSTANCE.getEPackage(YakindummPackage.eNS_URI); + + // Obtain or create and register package + Object registeredYakindummPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + YakindummPackageImpl theYakindummPackage = registeredYakindummPackage instanceof YakindummPackageImpl ? (YakindummPackageImpl)registeredYakindummPackage : new YakindummPackageImpl(); + + isInited = true; + + // Create package meta-data objects + theYakindummPackage.createPackageContents(); + + // Initialize created meta-data + theYakindummPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theYakindummPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(YakindummPackage.eNS_URI, theYakindummPackage); + return theYakindummPackage; + } + + /** + * + * + * @generated + */ + public EClass getPseudostate() { + return pseudostateEClass; + } + + /** + * + * + * @generated + */ + public EClass getVertex() { + return vertexEClass; + } + + /** + * + * + * @generated + */ + public EReference getVertex_IncomingTransitions() { + return (EReference)vertexEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getVertex_OutgoingTransitions() { + return (EReference)vertexEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getRegion() { + return regionEClass; + } + + /** + * + * + * @generated + */ + public EReference getRegion_Vertices() { + return (EReference)regionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getTransition() { + return transitionEClass; + } + + /** + * + * + * @generated + */ + public EReference getTransition_Target() { + return (EReference)transitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getTransition_Source() { + return (EReference)transitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getStatechart() { + return statechartEClass; + } + + /** + * + * + * @generated + */ + public EClass getEntry() { + return entryEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getEntry_Type() { + return (EAttribute)entryEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getState() { + return stateEClass; + } + + /** + * + * + * @generated + */ + public EClass getRegularState() { + return regularStateEClass; + } + + /** + * + * + * @generated + */ + public EClass getCompositeElement() { + return compositeElementEClass; + } + + /** + * + * + * @generated + */ + public EReference getCompositeElement_Regions() { + return (EReference)compositeElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getChoice() { + return choiceEClass; + } + + /** + * + * + * @generated + */ + public EClass getExit() { + return exitEClass; + } + + /** + * + * + * @generated + */ + public EClass getFinalState() { + return finalStateEClass; + } + + /** + * + * + * @generated + */ + public EEnum getEntryType() { + return entryTypeEEnum; + } + + /** + * + * + * @generated + */ + public YakindummFactory getYakindummFactory() { + return (YakindummFactory)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 + pseudostateEClass = createEClass(PSEUDOSTATE); + + vertexEClass = createEClass(VERTEX); + createEReference(vertexEClass, VERTEX__INCOMING_TRANSITIONS); + createEReference(vertexEClass, VERTEX__OUTGOING_TRANSITIONS); + + regionEClass = createEClass(REGION); + createEReference(regionEClass, REGION__VERTICES); + + transitionEClass = createEClass(TRANSITION); + createEReference(transitionEClass, TRANSITION__TARGET); + createEReference(transitionEClass, TRANSITION__SOURCE); + + statechartEClass = createEClass(STATECHART); + + entryEClass = createEClass(ENTRY); + createEAttribute(entryEClass, ENTRY__TYPE); + + stateEClass = createEClass(STATE); + + regularStateEClass = createEClass(REGULAR_STATE); + + compositeElementEClass = createEClass(COMPOSITE_ELEMENT); + createEReference(compositeElementEClass, COMPOSITE_ELEMENT__REGIONS); + + choiceEClass = createEClass(CHOICE); + + exitEClass = createEClass(EXIT); + + finalStateEClass = createEClass(FINAL_STATE); + + // Create enums + entryTypeEEnum = createEEnum(ENTRY_TYPE); + } + + /** + * + * + * @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 + pseudostateEClass.getESuperTypes().add(this.getVertex()); + statechartEClass.getESuperTypes().add(this.getCompositeElement()); + entryEClass.getESuperTypes().add(this.getPseudostate()); + stateEClass.getESuperTypes().add(this.getRegularState()); + stateEClass.getESuperTypes().add(this.getCompositeElement()); + regularStateEClass.getESuperTypes().add(this.getVertex()); + choiceEClass.getESuperTypes().add(this.getPseudostate()); + exitEClass.getESuperTypes().add(this.getPseudostate()); + finalStateEClass.getESuperTypes().add(this.getRegularState()); + + // Initialize classes, features, and operations; add parameters + initEClass(pseudostateEClass, Pseudostate.class, "Pseudostate", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(vertexEClass, Vertex.class, "Vertex", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getVertex_IncomingTransitions(), this.getTransition(), this.getTransition_Target(), "incomingTransitions", null, 0, -1, Vertex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getVertex_OutgoingTransitions(), this.getTransition(), this.getTransition_Source(), "outgoingTransitions", null, 0, -1, Vertex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(regionEClass, Region.class, "Region", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRegion_Vertices(), this.getVertex(), null, "vertices", null, 0, -1, Region.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTransition_Target(), this.getVertex(), this.getVertex_IncomingTransitions(), "target", null, 1, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getTransition_Source(), this.getVertex(), this.getVertex_OutgoingTransitions(), "source", null, 0, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(statechartEClass, Statechart.class, "Statechart", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(entryEClass, Entry.class, "Entry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getEntry_Type(), this.getEntryType(), "Type", null, 1, 1, Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stateEClass, State.class, "State", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(regularStateEClass, RegularState.class, "RegularState", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(compositeElementEClass, CompositeElement.class, "CompositeElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositeElement_Regions(), this.getRegion(), null, "regions", null, 0, -1, CompositeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(choiceEClass, Choice.class, "Choice", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(exitEClass, Exit.class, "Exit", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(finalStateEClass, FinalState.class, "FinalState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Initialize enums and add enum literals + initEEnum(entryTypeEEnum, EntryType.class, "EntryType"); + addEEnumLiteral(entryTypeEEnum, EntryType.NORMAL); + addEEnumLiteral(entryTypeEEnum, EntryType.HISTORY); + addEEnumLiteral(entryTypeEEnum, EntryType.DEEP_HISTORY); + + // Create resource + createResource(eNS_URI); + } + +} //YakindummPackageImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/util/YakindummAdapterFactory.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/util/YakindummAdapterFactory.java new file mode 100644 index 00000000..b3373dfd --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/util/YakindummAdapterFactory.java @@ -0,0 +1,318 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.util; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.*; + +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage + * @generated + */ +public class YakindummAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static YakindummPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public YakindummAdapterFactory() { + if (modelPackage == null) { + modelPackage = YakindummPackage.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 YakindummSwitch modelSwitch = + new YakindummSwitch() { + @Override + public Adapter casePseudostate(Pseudostate object) { + return createPseudostateAdapter(); + } + @Override + public Adapter caseVertex(Vertex object) { + return createVertexAdapter(); + } + @Override + public Adapter caseRegion(Region object) { + return createRegionAdapter(); + } + @Override + public Adapter caseTransition(Transition object) { + return createTransitionAdapter(); + } + @Override + public Adapter caseStatechart(Statechart object) { + return createStatechartAdapter(); + } + @Override + public Adapter caseEntry(Entry object) { + return createEntryAdapter(); + } + @Override + public Adapter caseState(State object) { + return createStateAdapter(); + } + @Override + public Adapter caseRegularState(RegularState object) { + return createRegularStateAdapter(); + } + @Override + public Adapter caseCompositeElement(CompositeElement object) { + return createCompositeElementAdapter(); + } + @Override + public Adapter caseChoice(Choice object) { + return createChoiceAdapter(); + } + @Override + public Adapter caseExit(Exit object) { + return createExitAdapter(); + } + @Override + public Adapter caseFinalState(FinalState object) { + return createFinalStateAdapter(); + } + @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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Pseudostate Pseudostate}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Pseudostate + * @generated + */ + public Adapter createPseudostateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex Vertex}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Vertex + * @generated + */ + public Adapter createVertexAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region Region}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Region + * @generated + */ + public Adapter createRegionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition Transition}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Transition + * @generated + */ + public Adapter createTransitionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Statechart Statechart}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Statechart + * @generated + */ + public Adapter createStatechartAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Entry Entry}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Entry + * @generated + */ + public Adapter createEntryAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.State State}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.State + * @generated + */ + public Adapter createStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.RegularState Regular State}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.RegularState + * @generated + */ + public Adapter createRegularStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.CompositeElement Composite 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.CompositeElement + * @generated + */ + public Adapter createCompositeElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Choice Choice}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Choice + * @generated + */ + public Adapter createChoiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Exit Exit}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.Exit + * @generated + */ + public Adapter createExitAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.vampire.yakindumm.FinalState Final State}'. + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.FinalState + * @generated + */ + public Adapter createFinalStateAdapter() { + 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; + } + +} //YakindummAdapterFactory diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/util/YakindummSwitch.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/util/YakindummSwitch.java new file mode 100644 index 00000000..422565c2 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/yakindumm/util/YakindummSwitch.java @@ -0,0 +1,355 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.vampire.yakindumm.util; + +import ca.mcgill.ecse.dslreasoner.vampire.yakindumm.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * 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 ca.mcgill.ecse.dslreasoner.vampire.yakindumm.YakindummPackage + * @generated + */ +public class YakindummSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static YakindummPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public YakindummSwitch() { + if (modelPackage == null) { + modelPackage = YakindummPackage.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 YakindummPackage.PSEUDOSTATE: { + Pseudostate pseudostate = (Pseudostate)theEObject; + T result = casePseudostate(pseudostate); + if (result == null) result = caseVertex(pseudostate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.VERTEX: { + Vertex vertex = (Vertex)theEObject; + T result = caseVertex(vertex); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.REGION: { + Region region = (Region)theEObject; + T result = caseRegion(region); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.TRANSITION: { + Transition transition = (Transition)theEObject; + T result = caseTransition(transition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.STATECHART: { + Statechart statechart = (Statechart)theEObject; + T result = caseStatechart(statechart); + if (result == null) result = caseCompositeElement(statechart); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.ENTRY: { + Entry entry = (Entry)theEObject; + T result = caseEntry(entry); + if (result == null) result = casePseudostate(entry); + if (result == null) result = caseVertex(entry); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.STATE: { + State state = (State)theEObject; + T result = caseState(state); + if (result == null) result = caseRegularState(state); + if (result == null) result = caseCompositeElement(state); + if (result == null) result = caseVertex(state); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.REGULAR_STATE: { + RegularState regularState = (RegularState)theEObject; + T result = caseRegularState(regularState); + if (result == null) result = caseVertex(regularState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.COMPOSITE_ELEMENT: { + CompositeElement compositeElement = (CompositeElement)theEObject; + T result = caseCompositeElement(compositeElement); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.CHOICE: { + Choice choice = (Choice)theEObject; + T result = caseChoice(choice); + if (result == null) result = casePseudostate(choice); + if (result == null) result = caseVertex(choice); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.EXIT: { + Exit exit = (Exit)theEObject; + T result = caseExit(exit); + if (result == null) result = casePseudostate(exit); + if (result == null) result = caseVertex(exit); + if (result == null) result = defaultCase(theEObject); + return result; + } + case YakindummPackage.FINAL_STATE: { + FinalState finalState = (FinalState)theEObject; + T result = caseFinalState(finalState); + if (result == null) result = caseRegularState(finalState); + if (result == null) result = caseVertex(finalState); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Pseudostate'. + * + * 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 'Pseudostate'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePseudostate(Pseudostate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Vertex'. + * + * 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 'Vertex'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVertex(Vertex object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Region'. + * + * 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 'Region'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRegion(Region object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Transition'. + * + * 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 'Transition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTransition(Transition object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Statechart'. + * + * 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 'Statechart'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStatechart(Statechart object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Entry'. + * + * 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 'Entry'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEntry(Entry object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'State'. + * + * 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 'State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseState(State object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Regular State'. + * + * 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 'Regular State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRegularState(RegularState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Composite 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 'Composite Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositeElement(CompositeElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Choice'. + * + * 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 'Choice'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseChoice(Choice object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Exit'. + * + * 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 'Exit'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseExit(Exit object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Final State'. + * + * 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 'Final State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFinalState(FinalState 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; + } + +} //YakindummSwitch diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin index 57fe8c2d..99a457d4 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin index 41284af1..e8451eb9 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin index 36f2c6e1..73c6ab49 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin index ce6042ea..b6cabaa6 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin index 270ac043..ae6fb160 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java index 13a0e74a..80cec4b9 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java @@ -108,7 +108,7 @@ public class GeneralTest { final Procedure1 _function_2 = (VampireSolverConfiguration it) -> { it.documentationLevel = DocumentationLevel.FULL; it.typeScopes.minNewElements = 6; - it.typeScopes.maxNewElements = 8; + it.typeScopes.maxNewElements = 40; it.typeScopes.minNewElementsByType = typeMapMin; it.typeScopes.maxNewElementsByType = typeMapMax; }; diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icseTest/.gitignore b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icseTest/.gitignore deleted file mode 100644 index f3e21798..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icseTest/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/.FAMTest.java._trace diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.DslTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.DslTest.xtendbin deleted file mode 100644 index 59f57d8b..00000000 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.DslTest.xtendbin and /dev/null differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin index 693ee01d..6cae3219 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin index 7e61c0ef..22dda149 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin index 8a554a42..857ee2e7 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/FAMTest.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/FAMTest.java deleted file mode 100644 index 7b4849e1..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/FAMTest.java +++ /dev/null @@ -1,111 +0,0 @@ -package ca.mcgill.ecse.dslreasoner.vampire.test; - -import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolver; -import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration; -import com.google.common.collect.Iterables; -import functionalarchitecture.FunctionalarchitecturePackage; -import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic; -import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration; -import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace; -import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor; -import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; -import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput; -import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; -import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult; -import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore; -import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic; -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic; -import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace; -import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EEnumLiteral; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; -import org.eclipse.xtend2.lib.StringConcatenation; -import org.eclipse.xtext.xbase.lib.CollectionLiterals; -import org.eclipse.xtext.xbase.lib.Exceptions; -import org.eclipse.xtext.xbase.lib.Functions.Function1; -import org.eclipse.xtext.xbase.lib.InputOutput; -import org.eclipse.xtext.xbase.lib.IterableExtensions; -import org.eclipse.xtext.xbase.lib.IteratorExtensions; -import org.eclipse.xtext.xbase.lib.ListExtensions; -import org.eclipse.xtext.xbase.lib.ObjectExtensions; -import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; - -@SuppressWarnings("all") -public class DslTest { - public static void main(final String[] args) { - try { - StringConcatenation _builder = new StringConcatenation(); - _builder.append("initialModels/"); - final FileSystemWorkspace inputs = new FileSystemWorkspace(_builder.toString(), ""); - StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("outputDslModels/"); - final FileSystemWorkspace workspace = new FileSystemWorkspace(_builder_1.toString(), ""); - workspace.initAndClear(); - InputOutput.println("Input and output workspaces are created"); - final EcoreMetamodelDescriptor metamodel = DslTest.loadMetamodel(); - final List partialModel = DslTest.loadPartialModel(inputs); - InputOutput.println("DSL loaded"); - final Ecore2Logic ecore2Logic = new Ecore2Logic(); - final Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic); - final Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic); - final InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic(); - Ecore2LogicConfiguration _ecore2LogicConfiguration = new Ecore2LogicConfiguration(); - final TracedOutput modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, _ecore2LogicConfiguration); - final LogicProblem logicProblem = modelGenerationProblem.getOutput(); - InputOutput.println("Problem created"); - LogicResult solution = null; - LogicReasoner reasoner = null; - VampireSolver _vampireSolver = new VampireSolver(); - reasoner = _vampireSolver; - VampireSolverConfiguration _vampireSolverConfiguration = new VampireSolverConfiguration(); - final Procedure1 _function = (VampireSolverConfiguration it) -> { - it.writeToFile = false; - }; - final VampireSolverConfiguration vampireConfig = ObjectExtensions.operator_doubleArrow(_vampireSolverConfiguration, _function); - solution = reasoner.solve(logicProblem, vampireConfig, workspace); - InputOutput.println("Problem solved"); - } catch (Throwable _e) { - throw Exceptions.sneakyThrow(_e); - } - } - - private static EcoreMetamodelDescriptor loadMetamodel() { - final FunctionalarchitecturePackage pckg = FunctionalarchitecturePackage.eINSTANCE; - final List classes = IterableExtensions.toList(Iterables.filter(pckg.getEClassifiers(), EClass.class)); - final List enums = IterableExtensions.toList(Iterables.filter(pckg.getEClassifiers(), EEnum.class)); - final Function1> _function = (EEnum it) -> { - return it.getELiterals(); - }; - final List literals = IterableExtensions.toList(Iterables.concat(ListExtensions.>map(enums, _function))); - final Function1> _function_1 = (EClass it) -> { - return it.getEReferences(); - }; - final List references = IterableExtensions.toList(Iterables.concat(ListExtensions.>map(classes, _function_1))); - final Function1> _function_2 = (EClass it) -> { - return it.getEAttributes(); - }; - final List attributes = IterableExtensions.toList(Iterables.concat(ListExtensions.>map(classes, _function_2))); - return new EcoreMetamodelDescriptor(classes, Collections.unmodifiableSet(CollectionLiterals.newHashSet()), false, enums, literals, references, attributes); - } - - private static List loadPartialModel(final ReasonerWorkspace inputs) { - List _xblockexpression = null; - { - Map _extensionToFactoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(); - XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); - _extensionToFactoryMap.put("*", _xMIResourceFactoryImpl); - _xblockexpression = IteratorExtensions.toList(inputs.readModel(EObject.class, "FunctionalArchitectureModel.xmi").eResource().getAllContents()); - } - return _xblockexpression; - } -} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/hu/bme/mit/inf/dslreasoner/run/.gitignore b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/hu/bme/mit/inf/dslreasoner/run/.gitignore deleted file mode 100644 index 2c8a0d43..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/hu/bme/mit/inf/dslreasoner/run/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.SimpleRun.java._trace -/.MedicalSystem.java._trace diff --git a/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/.project b/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/.project new file mode 100644 index 00000000..1701c3ba --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/.project @@ -0,0 +1,40 @@ + + + ca.mcgill.ecse.dslreasoner.yakindu.test + + + + + + org.eclipse.viatra.query.tooling.ui.projectbuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.viatra.query.projectnature + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/.YakinduTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/.YakinduTest.xtendbin new file mode 100644 index 00000000..d0f61cf1 Binary files /dev/null and b/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/.YakinduTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/.gitignore b/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/.gitignore new file mode 100644 index 00000000..5d3de4ba --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/.gitignore @@ -0,0 +1 @@ +/.YakinduTest.java._trace diff --git a/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/YakinduTest.xtend b/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/YakinduTest.xtend new file mode 100644 index 00000000..b6aae6ab --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/bin/ca/mcgill/ecse/dslreasoner/yakindu/test/YakinduTest.xtend @@ -0,0 +1,178 @@ +package ca.mcgill.ecse.dslreasoner.yakindu.test + +import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.YakindummPackage +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration +import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor +import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicProblemBuilder +import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult +import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore +import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration +import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace +import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace +import java.util.LinkedList +import java.util.List +import org.eclipse.emf.ecore.EAttribute +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EEnum +import org.eclipse.emf.ecore.EEnumLiteral +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EReference +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl +import hu.bme.mit.inf.dslreasoner.logic.model.builder.SolutionScope + +class YakinduTest { + + static String inWS = "input" + static String outWS = "output" + static String imName = "Yakindu.xmi" + + def static void main(String[] args) { + val Ecore2Logic ecore2Logic = new Ecore2Logic + val Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic) + val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic) + val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic + + // Workspace setup + val inputs = new FileSystemWorkspace(inWS + '''/''', "") + val workspace = new FileSystemWorkspace(outWS + '''/''', "") + workspace.initAndClear + + // Logicproblem writing setup + val reg = Resource.Factory.Registry.INSTANCE + val map = reg.extensionToFactoryMap + map.put("logicproblem", new XMIResourceFactoryImpl) + + println("Input and output workspaces are created") + + //loading the modeling environment + val metamodel = loadMetamodel(YakindummPackage.eINSTANCE) // TODO + val partialModel = loadPartialModel(inputs, imName) +// val queries = loadQueries(metamodel, Patterns.instance) + val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, new Ecore2LogicConfiguration()) + var modelExtensionProblem = instanceModel2Logic.transform(modelGenerationProblem, partialModel) +// var validModelExtensionProblem = viatra2Logic.transformQueries(queries, modelExtensionProblem, new Viatra2LogicConfiguration) + var problem = modelExtensionProblem.output + + println("Modelling environment Loaded") + + + val ss = new SolutionScope() + ss.numberOfRequiredSolution = 5 + + var reasoner = new ViatraReasoner + val vampireConfig = new ViatraReasonerConfiguration => [ + // add configuration things, in config file first +// it.documentationLevel = DocumentationLevel::FULL + it.solutionScope = ss + it.typeScopes.maxNewElements = 10 + it.typeScopes.minNewElements = 5 + ] + + println("Problem Ready") + + var LogicResult solution = reasoner.solve(problem, vampireConfig, workspace) + + println("Problem solved") + + val interpretations = reasoner.getInterpretations(solution as ModelResult) + val models = new LinkedList + for (interpretation : interpretations) { +// val extension b = new LogicStructureBuilder +// val extension a = new LogicProblemBuilder + + val instanceModel = logic2Ecore.transformInterpretation(interpretation, modelGenerationProblem.trace) + models += instanceModel + } + + solution.writeSolution(workspace, models) +// print((solution as ModelResult).representation.get(0)) +// val soln = ((solution as ModelResult).representation.get(0) as VampireModel) +// println(soln.confirmations) +// println((solution as ModelResult).representation) +// modelFound = !soln.confirmations.filter [ +// class == VLSFiniteModelImpl +// ].isEmpty + } + +// def static Map getTypeMap(Map classMap, EcoreMetamodelDescriptor metamodel, +// Ecore2Logic e2l, Ecore2Logic_Trace trace) { +// val typeMap = new HashMap +// val listMap = metamodel.classes.toMap[s|s.name] +// +// for (Class elem : classMap.keySet) { +// typeMap.put(e2l.TypeofEClass( +// trace, +// listMap.get(elem.simpleName) +// ), classMap.get(elem)) +// } +// return typeMap +// } + def static loadMetamodel(EPackage pckg) { + val List classes = pckg.getEClassifiers.filter(EClass).toList + val List enums = pckg.getEClassifiers.filter(EEnum).toList + val List literals = enums.map[getELiterals].flatten.toList + val List references = classes.map[getEReferences].flatten.toList + val List attributes = classes.map[getEAttributes].flatten.toList + return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) + } + + def static loadPartialModel(ReasonerWorkspace inputs, String path) { + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl()) + inputs.readModel(EObject, path).eResource.contents +// inputs.readModel(EObject,"FamInstance.xmi").eResource.allContents.toList + } + +// def static loadQueries(EcoreMetamodelDescriptor metamodel, IQueryGroup i) { +// val patterns = i.specifications.toList +// val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet +// val derivedFeatures = emptyMap +// // NO DERIVED FEATURES +//// val derivedFeatures = new LinkedHashMap +//// derivedFeatures.put(i.type,metamodel.attributes.filter[it.name == "type"].head) +//// derivedFeatures.put(i.model,metamodel.references.filter[it.name == "model"].head) +// val res = new ViatraQuerySetDescriptor( +// patterns, +// wfPatterns, +// derivedFeatures +// ) +// return res +// } + +def static writeSolution(LogicResult solution, ReasonerWorkspace workspace, List models) { + if(solution instanceof ModelResult) { + val representations = solution.representation + + for(representationIndex : 0.. + diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/META-INF/MANIFEST.MF b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/META-INF/MANIFEST.MF index 4e3222f9..d32b92ce 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/META-INF/MANIFEST.MF +++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/META-INF/MANIFEST.MF @@ -1,15 +1,14 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: FAMTest -Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.application.FAMTest;singleton:=true -Bundle-Version: 1.0.0.qualifier -Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.application.FAMTest -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - hu.bme.mit.inf.dslreasoner.application;bundle-version="1.0.0", - org.junit;bundle-version="4.12.0", - org.eclipse.collections;bundle-version="7.1.1" - +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: FAMTest +Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.application.FAMTest;singleton:=true +Bundle-Version: 1.0.0.qualifier +Require-Bundle: com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro, + hu.bme.mit.inf.dslreasoner.application;bundle-version="1.0.0", + org.junit;bundle-version="4.12.0", + org.eclipse.collections;bundle-version="7.1.1" +Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.application.FAMTest +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/build.properties b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/build.properties index 41eb6ade..aed85a48 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/build.properties +++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/build.properties @@ -1,4 +1,5 @@ -source.. = src/ -output.. = bin/ bin.includes = META-INF/,\ . +source.. = src/,\ + src-gen/ +output.. = bin/ -- cgit v1.2.3-54-g00ecf