aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar ArenBabikian <aren.babikian@mail.mcgill.ca>2019-03-20 20:39:28 -0400
committerLibravatar ArenBabikian <aren.babikian@mail.mcgill.ca>2019-03-20 20:39:28 -0400
commitb42fb7517302ff158a61920a63d8682c31565619 (patch)
treed0649992bf0ee4f01fac40ec5404a6c92da0448a
parentMerge remote-tracking branch 'origin/master' into Vampire-New (diff)
downloadVIATRA-Generator-b42fb7517302ff158a61920a63d8682c31565619.tar.gz
VIATRA-Generator-b42fb7517302ff158a61920a63d8682c31565619.tar.zst
VIATRA-Generator-b42fb7517302ff158a61920a63d8682c31565619.zip
Add gitignore, commit everything
-rw-r--r--Application/hu.bme.mit.inf.dslreasoner.application.ide/.gitignore2
-rw-r--r--Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbinbin1705 -> 1701 bytes
-rw-r--r--Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbinbin2535 -> 2526 bytes
-rw-r--r--Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamPatterns.vql4
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF28
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore8
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/ContentInNotLive.java741
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/DirectSupertype.java692
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Live.java730
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/LoopInInheritence.java (renamed from Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSOr.java)241
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/NonSymmetricOpposite.java707
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Opposite.java693
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/OppositeDifferentClass.java (renamed from Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUniversalQuantifier.java)268
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/PatternContent.java693
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF20
-rw-r--r--Framework/hu.bme.mit.inf.dslreasoner.logic.model/.classpath1
-rw-r--r--Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF5
-rw-r--r--Framework/hu.bme.mit.inf.dslreasoner.logic.model/build.properties3
-rw-r--r--Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.classpath1
-rw-r--r--Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/build.properties3
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/.classpath7
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/.project29
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/META-INF/MANIFEST.MF7
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.aird30
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.ecore4
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/model/logic2vampire.genmodel14
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeModule.xtendbinbin1685 -> 1685 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeSetup.xtendbinbin2500 -> 2500 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/.VampireLanguageUiModule.xtendbinbin2342 -> 2342 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/.VampireLanguageProposalProvider.xtendbinbin1792 -> 1792 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageDescriptionLabelProvider.xtendbinbin1965 -> 1965 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageLabelProvider.xtendbinbin2405 -> 2405 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/outline/.VampireLanguageOutlineTreeProvider.xtendbinbin1819 -> 1819 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/quickfix/.VampireLanguageQuickfixProvider.xtendbinbin1786 -> 1786 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSFiniteModel.java20
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSFunctionFof.java69
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/VLSTrying.java52
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFiniteModelImpl.java43
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFunctionFofImpl.java240
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSTryingImpl.java178
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageRuntimeModule.xtendbinbin1706 -> 1706 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageStandaloneSetup.xtendbinbin1980 -> 1980 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbinbin4130 -> 4130 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/generator/.VampireLanguageGenerator.xtendbinbin2338 -> 2338 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/scoping/.VampireLanguageScopeProvider.xtendbinbin1751 -> 1751 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/validation/.VampireLanguageValidator.xtendbinbin1736 -> 1736 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/.gitignore1
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSAnd.java533
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSAnnotation.java533
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSComment.java533
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSEquivalent.java533
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSExistentialQuantifier.java533
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFofFormula.java533
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFunction.java533
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSFunctionFof.java533
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSInequality.java533
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUnaryNegation.java533
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VampireQueries.java174
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/.gitignore2
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.xtend14
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtend18
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireAnalyzerConfiguration.xtendbinbin2399 -> 2399 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireSolver.xtendbinbin5892 -> 5892 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper.xtendbinbin18129 -> 18128 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapperTrace.xtendbinbin4215 -> 4215 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ConstantMapper.xtendbinbin3164 -> 3164 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ContainmentMapper.xtendbinbin7649 -> 7604 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_RelationMapper.xtendbinbin8210 -> 8210 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ScopeMapper.xtendbinbin9263 -> 9263 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_Support.xtendbinbin12311 -> 12311 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper.xtendbinbin10377 -> 10377 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtendbinbin2643 -> 0 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper_FilteredTypes.xtendbinbin8564 -> 0 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Vampire2LogicMapper.xtendbinbin1720 -> 1720 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireHandler.xtendbinbin4908 -> 4908 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation.xtendbinbin1491 -> 1491 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation_FilteredTypes.xtendbinbin1688 -> 1688 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.java11
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.java20
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.aird633
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml2
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql4
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famSPatterns.vql13
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/.gitignore3
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/vampireProblem.tptp22
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/VampireTest/vampireProblem.tptp7
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.xtend13
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icseTests/FAMTest.xtend103
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbinbin6358 -> 6358 bytes
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbinbin4068 -> 4068 bytes
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbinbin4115 -> 4115 bytes
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbinbin8486 -> 8212 bytes
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbinbin4054 -> 4054 bytes
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java2
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icseTest/.gitignore1
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.DslTest.xtendbinbin5966 -> 0 bytes
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbinbin4997 -> 4997 bytes
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbinbin687 -> 687 bytes
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbinbin6500 -> 6500 bytes
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/FAMTest.java111
-rw-r--r--Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/hu/bme/mit/inf/dslreasoner/run/.gitignore2
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/.classpath1
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/META-INF/MANIFEST.MF29
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/build.properties5
104 files changed, 5275 insertions, 6779 deletions
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 @@
1/bin/ 1/bin/
2/xtend-gen/
3/src-gen/ \ No newline at end of file
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin
index ca156c38..eca39970 100644
--- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin
+++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin
Binary files differ
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin
index 51888916..6d4d9077 100644
--- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin
+++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin
Binary files differ
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 @@
1package hu.bme.mit.inf.dslreasoner.domains.fam 1package hu.bme.mit.inf.dslreasoner.domains.fam
2 2
3import epackage "http://www.inf.mit.bme.hu/viatrasolver/example/fam" 3//import epackage "http://www.inf.mit.bme.hu/viatrasolver/example/fam"
4//import epackage "platform:/resource/ModelGenExampleFAM/inputs/FamMetamodel.ecore"; 4import epackage "platform:/resource/ModelGenExampleFAM/inputs/FamMetamodel.ecore";
5 5
6@Constraint(message="terminatorAndInformation", severity="error", key={T}) 6@Constraint(message="terminatorAndInformation", severity="error", key={T})
7pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { 7pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = {
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF
index 41726ae6..85d7e580 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF
@@ -6,20 +6,20 @@ Bundle-Version: 1.0.0.qualifier
6Bundle-ClassPath: . 6Bundle-ClassPath: .
7Bundle-Vendor: %providerName 7Bundle-Vendor: %providerName
8Bundle-Localization: plugin 8Bundle-Localization: plugin
9Export-Package: hu.bme.mit.inf.dslreasoner.domains.alloyexamples, 9Export-Package: hu.bme.mit.inf.dslreasoner.domains.alloyexamples,
10 hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem, 10 hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem,
11 hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl, 11 hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl,
12 hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.util, 12 hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.util,
13 hu.bme.mit.inf.dslreasoner.domains.alloyexamples.util 13 hu.bme.mit.inf.dslreasoner.domains.alloyexamples.util
14Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime, 14Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime,
15 org.eclipse.viatra.query.runtime, 15 org.eclipse.viatra.query.runtime,
16 org.eclipse.core.runtime, 16 org.eclipse.core.runtime,
17 org.eclipse.emf.ecore;visibility:=reexport, 17 org.eclipse.emf.ecore;visibility:=reexport,
18 org.eclipse.emf.emfstore.common, 18 org.eclipse.emf.emfstore.common,
19 com.google.guava, 19 com.google.guava,
20 org.eclipse.xtext.xbase.lib, 20 org.eclipse.xtext.xbase.lib,
21 org.eclipse.xtend.lib, 21 org.eclipse.xtend.lib,
22 org.eclipse.xtend.lib.macro 22 org.eclipse.xtend.lib.macro
23Bundle-RequiredExecutionEnvironment: JavaSE-1.8 23Bundle-RequiredExecutionEnvironment: JavaSE-1.8
24Bundle-ActivationPolicy: lazy 24Bundle-ActivationPolicy: lazy
25Import-Package: org.apache.log4j 25Import-Package: org.apache.log4j
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore
index 9d608403..52338993 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore
@@ -34,3 +34,11 @@
34/OppositeMatcher.java 34/OppositeMatcher.java
35/PatternContentMatch.java 35/PatternContentMatch.java
36/PatternContentMatcher.java 36/PatternContentMatcher.java
37/.ContentInNotLive.java._trace
38/.DirectSupertype.java._trace
39/.Live.java._trace
40/.LoopInInheritence.java._trace
41/.NonSymmetricOpposite.java._trace
42/.Opposite.java._trace
43/.OppositeDifferentClass.java._trace
44/.PatternContent.java._trace
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/ContentInNotLive.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/ContentInNotLive.java
new file mode 100644
index 00000000..38d48ddb
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/ContentInNotLive.java
@@ -0,0 +1,741 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/FileSystem.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.alloyexamples;
5
6import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir;
7import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject;
8import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Live;
9import java.util.Arrays;
10import java.util.Collection;
11import java.util.LinkedHashSet;
12import java.util.List;
13import java.util.Objects;
14import java.util.Optional;
15import java.util.Set;
16import java.util.function.Consumer;
17import java.util.stream.Collectors;
18import java.util.stream.Stream;
19import org.apache.log4j.Logger;
20import org.eclipse.emf.ecore.EClass;
21import org.eclipse.viatra.query.runtime.api.IPatternMatch;
22import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
24import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
25import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
26import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
27import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
28import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
29import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
30import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
32import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
33import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
34import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
35import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
36import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
37import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
38import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
39import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
40import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
41import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
42import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
43import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
44import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
45
46/**
47 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
48 *
49 * <p>Original source:
50 * <code><pre>
51 * {@literal @}Constraint(key={child}, severity="error", message="error")
52 * pattern contentInNotLive(parent : Dir, child: FSObject) {
53 * Dir.contents(parent,child);
54 * neg find live(_,parent);
55 * } or {
56 * Dir.contents(parent,child);
57 * neg find live(_,child);
58 * }
59 * </pre></code>
60 *
61 * @see Matcher
62 * @see Match
63 *
64 */
65@SuppressWarnings("all")
66public final class ContentInNotLive extends BaseGeneratedEMFQuerySpecification<ContentInNotLive.Matcher> {
67 /**
68 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.contentInNotLive pattern,
69 * to be used in conjunction with {@link Matcher}.
70 *
71 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
72 * Each instance is a (possibly partial) substitution of pattern parameters,
73 * usable to represent a match of the pattern in the result of a query,
74 * or to specify the bound (fixed) input parameters when issuing a query.
75 *
76 * @see Matcher
77 *
78 */
79 public static abstract class Match extends BasePatternMatch {
80 private Dir fParent;
81
82 private FSObject fChild;
83
84 private static List<String> parameterNames = makeImmutableList("parent", "child");
85
86 private Match(final Dir pParent, final FSObject pChild) {
87 this.fParent = pParent;
88 this.fChild = pChild;
89 }
90
91 @Override
92 public Object get(final String parameterName) {
93 if ("parent".equals(parameterName)) return this.fParent;
94 if ("child".equals(parameterName)) return this.fChild;
95 return null;
96 }
97
98 public Dir getParent() {
99 return this.fParent;
100 }
101
102 public FSObject getChild() {
103 return this.fChild;
104 }
105
106 @Override
107 public boolean set(final String parameterName, final Object newValue) {
108 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
109 if ("parent".equals(parameterName) ) {
110 this.fParent = (Dir) newValue;
111 return true;
112 }
113 if ("child".equals(parameterName) ) {
114 this.fChild = (FSObject) newValue;
115 return true;
116 }
117 return false;
118 }
119
120 public void setParent(final Dir pParent) {
121 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
122 this.fParent = pParent;
123 }
124
125 public void setChild(final FSObject pChild) {
126 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
127 this.fChild = pChild;
128 }
129
130 @Override
131 public String patternName() {
132 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.contentInNotLive";
133 }
134
135 @Override
136 public List<String> parameterNames() {
137 return ContentInNotLive.Match.parameterNames;
138 }
139
140 @Override
141 public Object[] toArray() {
142 return new Object[]{fParent, fChild};
143 }
144
145 @Override
146 public ContentInNotLive.Match toImmutable() {
147 return isMutable() ? newMatch(fParent, fChild) : this;
148 }
149
150 @Override
151 public String prettyPrint() {
152 StringBuilder result = new StringBuilder();
153 result.append("\"parent\"=" + prettyPrintValue(fParent) + ", ");
154 result.append("\"child\"=" + prettyPrintValue(fChild));
155 return result.toString();
156 }
157
158 @Override
159 public int hashCode() {
160 return Objects.hash(fParent, fChild);
161 }
162
163 @Override
164 public boolean equals(final Object obj) {
165 if (this == obj)
166 return true;
167 if (obj == null) {
168 return false;
169 }
170 if ((obj instanceof ContentInNotLive.Match)) {
171 ContentInNotLive.Match other = (ContentInNotLive.Match) obj;
172 return Objects.equals(fParent, other.fParent) && Objects.equals(fChild, other.fChild);
173 } else {
174 // this should be infrequent
175 if (!(obj instanceof IPatternMatch)) {
176 return false;
177 }
178 IPatternMatch otherSig = (IPatternMatch) obj;
179 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
180 }
181 }
182
183 @Override
184 public ContentInNotLive specification() {
185 return ContentInNotLive.instance();
186 }
187
188 /**
189 * Returns an empty, mutable match.
190 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
191 *
192 * @return the empty match.
193 *
194 */
195 public static ContentInNotLive.Match newEmptyMatch() {
196 return new Mutable(null, null);
197 }
198
199 /**
200 * Returns a mutable (partial) match.
201 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
202 *
203 * @param pParent the fixed value of pattern parameter parent, or null if not bound.
204 * @param pChild the fixed value of pattern parameter child, or null if not bound.
205 * @return the new, mutable (partial) match object.
206 *
207 */
208 public static ContentInNotLive.Match newMutableMatch(final Dir pParent, final FSObject pChild) {
209 return new Mutable(pParent, pChild);
210 }
211
212 /**
213 * Returns a new (partial) match.
214 * This can be used e.g. to call the matcher with a partial match.
215 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
216 * @param pParent the fixed value of pattern parameter parent, or null if not bound.
217 * @param pChild the fixed value of pattern parameter child, or null if not bound.
218 * @return the (partial) match object.
219 *
220 */
221 public static ContentInNotLive.Match newMatch(final Dir pParent, final FSObject pChild) {
222 return new Immutable(pParent, pChild);
223 }
224
225 private static final class Mutable extends ContentInNotLive.Match {
226 Mutable(final Dir pParent, final FSObject pChild) {
227 super(pParent, pChild);
228 }
229
230 @Override
231 public boolean isMutable() {
232 return true;
233 }
234 }
235
236 private static final class Immutable extends ContentInNotLive.Match {
237 Immutable(final Dir pParent, final FSObject pChild) {
238 super(pParent, pChild);
239 }
240
241 @Override
242 public boolean isMutable() {
243 return false;
244 }
245 }
246 }
247
248 /**
249 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.contentInNotLive pattern,
250 * providing pattern-specific query methods.
251 *
252 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
253 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
254 *
255 * <p>Matches of the pattern will be represented as {@link Match}.
256 *
257 * <p>Original source:
258 * <code><pre>
259 * {@literal @}Constraint(key={child}, severity="error", message="error")
260 * pattern contentInNotLive(parent : Dir, child: FSObject) {
261 * Dir.contents(parent,child);
262 * neg find live(_,parent);
263 * } or {
264 * Dir.contents(parent,child);
265 * neg find live(_,child);
266 * }
267 * </pre></code>
268 *
269 * @see Match
270 * @see ContentInNotLive
271 *
272 */
273 public static class Matcher extends BaseMatcher<ContentInNotLive.Match> {
274 /**
275 * Initializes the pattern matcher within an existing VIATRA Query engine.
276 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
277 *
278 * @param engine the existing VIATRA Query engine in which this matcher will be created.
279 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
280 *
281 */
282 public static ContentInNotLive.Matcher on(final ViatraQueryEngine engine) {
283 // check if matcher already exists
284 Matcher matcher = engine.getExistingMatcher(querySpecification());
285 if (matcher == null) {
286 matcher = (Matcher)engine.getMatcher(querySpecification());
287 }
288 return matcher;
289 }
290
291 /**
292 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
293 * @return an initialized matcher
294 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
295 *
296 */
297 public static ContentInNotLive.Matcher create() {
298 return new Matcher();
299 }
300
301 private final static int POSITION_PARENT = 0;
302
303 private final static int POSITION_CHILD = 1;
304
305 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(ContentInNotLive.Matcher.class);
306
307 /**
308 * Initializes the pattern matcher within an existing VIATRA Query engine.
309 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
310 *
311 * @param engine the existing VIATRA Query engine in which this matcher will be created.
312 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
313 *
314 */
315 private Matcher() {
316 super(querySpecification());
317 }
318
319 /**
320 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
321 * @param pParent the fixed value of pattern parameter parent, or null if not bound.
322 * @param pChild the fixed value of pattern parameter child, or null if not bound.
323 * @return matches represented as a Match object.
324 *
325 */
326 public Collection<ContentInNotLive.Match> getAllMatches(final Dir pParent, final FSObject pChild) {
327 return rawStreamAllMatches(new Object[]{pParent, pChild}).collect(Collectors.toSet());
328 }
329
330 /**
331 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
332 * </p>
333 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
334 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
335 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
336 * @param pParent the fixed value of pattern parameter parent, or null if not bound.
337 * @param pChild the fixed value of pattern parameter child, or null if not bound.
338 * @return a stream of matches represented as a Match object.
339 *
340 */
341 public Stream<ContentInNotLive.Match> streamAllMatches(final Dir pParent, final FSObject pChild) {
342 return rawStreamAllMatches(new Object[]{pParent, pChild});
343 }
344
345 /**
346 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
347 * Neither determinism nor randomness of selection is guaranteed.
348 * @param pParent the fixed value of pattern parameter parent, or null if not bound.
349 * @param pChild the fixed value of pattern parameter child, or null if not bound.
350 * @return a match represented as a Match object, or null if no match is found.
351 *
352 */
353 public Optional<ContentInNotLive.Match> getOneArbitraryMatch(final Dir pParent, final FSObject pChild) {
354 return rawGetOneArbitraryMatch(new Object[]{pParent, pChild});
355 }
356
357 /**
358 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
359 * under any possible substitution of the unspecified parameters (if any).
360 * @param pParent the fixed value of pattern parameter parent, or null if not bound.
361 * @param pChild the fixed value of pattern parameter child, or null if not bound.
362 * @return true if the input is a valid (partial) match of the pattern.
363 *
364 */
365 public boolean hasMatch(final Dir pParent, final FSObject pChild) {
366 return rawHasMatch(new Object[]{pParent, pChild});
367 }
368
369 /**
370 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
371 * @param pParent the fixed value of pattern parameter parent, or null if not bound.
372 * @param pChild the fixed value of pattern parameter child, or null if not bound.
373 * @return the number of pattern matches found.
374 *
375 */
376 public int countMatches(final Dir pParent, final FSObject pChild) {
377 return rawCountMatches(new Object[]{pParent, pChild});
378 }
379
380 /**
381 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
382 * Neither determinism nor randomness of selection is guaranteed.
383 * @param pParent the fixed value of pattern parameter parent, or null if not bound.
384 * @param pChild the fixed value of pattern parameter child, or null if not bound.
385 * @param processor the action that will process the selected match.
386 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
387 *
388 */
389 public boolean forOneArbitraryMatch(final Dir pParent, final FSObject pChild, final Consumer<? super ContentInNotLive.Match> processor) {
390 return rawForOneArbitraryMatch(new Object[]{pParent, pChild}, processor);
391 }
392
393 /**
394 * Returns a new (partial) match.
395 * This can be used e.g. to call the matcher with a partial match.
396 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
397 * @param pParent the fixed value of pattern parameter parent, or null if not bound.
398 * @param pChild the fixed value of pattern parameter child, or null if not bound.
399 * @return the (partial) match object.
400 *
401 */
402 public ContentInNotLive.Match newMatch(final Dir pParent, final FSObject pChild) {
403 return ContentInNotLive.Match.newMatch(pParent, pChild);
404 }
405
406 /**
407 * Retrieve the set of values that occur in matches for parent.
408 * @return the Set of all values or empty set if there are no matches
409 *
410 */
411 protected Stream<Dir> rawStreamAllValuesOfparent(final Object[] parameters) {
412 return rawStreamAllValues(POSITION_PARENT, parameters).map(Dir.class::cast);
413 }
414
415 /**
416 * Retrieve the set of values that occur in matches for parent.
417 * @return the Set of all values or empty set if there are no matches
418 *
419 */
420 public Set<Dir> getAllValuesOfparent() {
421 return rawStreamAllValuesOfparent(emptyArray()).collect(Collectors.toSet());
422 }
423
424 /**
425 * Retrieve the set of values that occur in matches for parent.
426 * @return the Set of all values or empty set if there are no matches
427 *
428 */
429 public Stream<Dir> streamAllValuesOfparent() {
430 return rawStreamAllValuesOfparent(emptyArray());
431 }
432
433 /**
434 * Retrieve the set of values that occur in matches for parent.
435 * </p>
436 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
437 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
438 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
439 *
440 * @return the Stream of all values or empty set if there are no matches
441 *
442 */
443 public Stream<Dir> streamAllValuesOfparent(final ContentInNotLive.Match partialMatch) {
444 return rawStreamAllValuesOfparent(partialMatch.toArray());
445 }
446
447 /**
448 * Retrieve the set of values that occur in matches for parent.
449 * </p>
450 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
451 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
452 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
453 *
454 * @return the Stream of all values or empty set if there are no matches
455 *
456 */
457 public Stream<Dir> streamAllValuesOfparent(final FSObject pChild) {
458 return rawStreamAllValuesOfparent(new Object[]{null, pChild});
459 }
460
461 /**
462 * Retrieve the set of values that occur in matches for parent.
463 * @return the Set of all values or empty set if there are no matches
464 *
465 */
466 public Set<Dir> getAllValuesOfparent(final ContentInNotLive.Match partialMatch) {
467 return rawStreamAllValuesOfparent(partialMatch.toArray()).collect(Collectors.toSet());
468 }
469
470 /**
471 * Retrieve the set of values that occur in matches for parent.
472 * @return the Set of all values or empty set if there are no matches
473 *
474 */
475 public Set<Dir> getAllValuesOfparent(final FSObject pChild) {
476 return rawStreamAllValuesOfparent(new Object[]{null, pChild}).collect(Collectors.toSet());
477 }
478
479 /**
480 * Retrieve the set of values that occur in matches for child.
481 * @return the Set of all values or empty set if there are no matches
482 *
483 */
484 protected Stream<FSObject> rawStreamAllValuesOfchild(final Object[] parameters) {
485 return rawStreamAllValues(POSITION_CHILD, parameters).map(FSObject.class::cast);
486 }
487
488 /**
489 * Retrieve the set of values that occur in matches for child.
490 * @return the Set of all values or empty set if there are no matches
491 *
492 */
493 public Set<FSObject> getAllValuesOfchild() {
494 return rawStreamAllValuesOfchild(emptyArray()).collect(Collectors.toSet());
495 }
496
497 /**
498 * Retrieve the set of values that occur in matches for child.
499 * @return the Set of all values or empty set if there are no matches
500 *
501 */
502 public Stream<FSObject> streamAllValuesOfchild() {
503 return rawStreamAllValuesOfchild(emptyArray());
504 }
505
506 /**
507 * Retrieve the set of values that occur in matches for child.
508 * </p>
509 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
510 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
511 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
512 *
513 * @return the Stream of all values or empty set if there are no matches
514 *
515 */
516 public Stream<FSObject> streamAllValuesOfchild(final ContentInNotLive.Match partialMatch) {
517 return rawStreamAllValuesOfchild(partialMatch.toArray());
518 }
519
520 /**
521 * Retrieve the set of values that occur in matches for child.
522 * </p>
523 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
524 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
525 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
526 *
527 * @return the Stream of all values or empty set if there are no matches
528 *
529 */
530 public Stream<FSObject> streamAllValuesOfchild(final Dir pParent) {
531 return rawStreamAllValuesOfchild(new Object[]{pParent, null});
532 }
533
534 /**
535 * Retrieve the set of values that occur in matches for child.
536 * @return the Set of all values or empty set if there are no matches
537 *
538 */
539 public Set<FSObject> getAllValuesOfchild(final ContentInNotLive.Match partialMatch) {
540 return rawStreamAllValuesOfchild(partialMatch.toArray()).collect(Collectors.toSet());
541 }
542
543 /**
544 * Retrieve the set of values that occur in matches for child.
545 * @return the Set of all values or empty set if there are no matches
546 *
547 */
548 public Set<FSObject> getAllValuesOfchild(final Dir pParent) {
549 return rawStreamAllValuesOfchild(new Object[]{pParent, null}).collect(Collectors.toSet());
550 }
551
552 @Override
553 protected ContentInNotLive.Match tupleToMatch(final Tuple t) {
554 try {
555 return ContentInNotLive.Match.newMatch((Dir) t.get(POSITION_PARENT), (FSObject) t.get(POSITION_CHILD));
556 } catch(ClassCastException e) {
557 LOGGER.error("Element(s) in tuple not properly typed!",e);
558 return null;
559 }
560 }
561
562 @Override
563 protected ContentInNotLive.Match arrayToMatch(final Object[] match) {
564 try {
565 return ContentInNotLive.Match.newMatch((Dir) match[POSITION_PARENT], (FSObject) match[POSITION_CHILD]);
566 } catch(ClassCastException e) {
567 LOGGER.error("Element(s) in array not properly typed!",e);
568 return null;
569 }
570 }
571
572 @Override
573 protected ContentInNotLive.Match arrayToMatchMutable(final Object[] match) {
574 try {
575 return ContentInNotLive.Match.newMutableMatch((Dir) match[POSITION_PARENT], (FSObject) match[POSITION_CHILD]);
576 } catch(ClassCastException e) {
577 LOGGER.error("Element(s) in array not properly typed!",e);
578 return null;
579 }
580 }
581
582 /**
583 * @return the singleton instance of the query specification of this pattern
584 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
585 *
586 */
587 public static IQuerySpecification<ContentInNotLive.Matcher> querySpecification() {
588 return ContentInNotLive.instance();
589 }
590 }
591
592 private ContentInNotLive() {
593 super(GeneratedPQuery.INSTANCE);
594 }
595
596 /**
597 * @return the singleton instance of the query specification
598 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
599 *
600 */
601 public static ContentInNotLive instance() {
602 try{
603 return LazyHolder.INSTANCE;
604 } catch (ExceptionInInitializerError err) {
605 throw processInitializerError(err);
606 }
607 }
608
609 @Override
610 protected ContentInNotLive.Matcher instantiate(final ViatraQueryEngine engine) {
611 return ContentInNotLive.Matcher.on(engine);
612 }
613
614 @Override
615 public ContentInNotLive.Matcher instantiate() {
616 return ContentInNotLive.Matcher.create();
617 }
618
619 @Override
620 public ContentInNotLive.Match newEmptyMatch() {
621 return ContentInNotLive.Match.newEmptyMatch();
622 }
623
624 @Override
625 public ContentInNotLive.Match newMatch(final Object... parameters) {
626 return ContentInNotLive.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir) parameters[0], (hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject) parameters[1]);
627 }
628
629 /**
630 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.ContentInNotLive (visibility: PUBLIC, simpleName: ContentInNotLive, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.ContentInNotLive, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
631 * <b>not</b> at the class load time of the outer class,
632 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.ContentInNotLive (visibility: PUBLIC, simpleName: ContentInNotLive, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.ContentInNotLive, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
633 *
634 * <p> This workaround is required e.g. to support recursion.
635 *
636 */
637 private static class LazyHolder {
638 private final static ContentInNotLive INSTANCE = new ContentInNotLive();
639
640 /**
641 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
642 * This initialization order is required to support indirect recursion.
643 *
644 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
645 *
646 */
647 private final static Object STATIC_INITIALIZER = ensureInitialized();
648
649 public static Object ensureInitialized() {
650 INSTANCE.ensureInitializedInternal();
651 return null;
652 }
653 }
654
655 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
656 private final static ContentInNotLive.GeneratedPQuery INSTANCE = new GeneratedPQuery();
657
658 private final PParameter parameter_parent = new PParameter("parent", "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("FS", "Dir")), PParameterDirection.INOUT);
659
660 private final PParameter parameter_child = new PParameter("child", "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("FS", "FSObject")), PParameterDirection.INOUT);
661
662 private final List<PParameter> parameters = Arrays.asList(parameter_parent, parameter_child);
663
664 private GeneratedPQuery() {
665 super(PVisibility.PUBLIC);
666 }
667
668 @Override
669 public String getFullyQualifiedName() {
670 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.contentInNotLive";
671 }
672
673 @Override
674 public List<String> getParameterNames() {
675 return Arrays.asList("parent","child");
676 }
677
678 @Override
679 public List<PParameter> getParameters() {
680 return parameters;
681 }
682
683 @Override
684 public Set<PBody> doGetContainedBodies() {
685 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
686 Set<PBody> bodies = new LinkedHashSet<>();
687 {
688 PBody body = new PBody(this);
689 PVariable var_parent = body.getOrCreateVariableByName("parent");
690 PVariable var_child = body.getOrCreateVariableByName("child");
691 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
692 new TypeConstraint(body, Tuples.flatTupleOf(var_parent), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "Dir")));
693 new TypeConstraint(body, Tuples.flatTupleOf(var_child), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FSObject")));
694 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
695 new ExportedParameter(body, var_parent, parameter_parent),
696 new ExportedParameter(body, var_child, parameter_child)
697 ));
698 // Dir.contents(parent,child)
699 new TypeConstraint(body, Tuples.flatTupleOf(var_parent), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "Dir")));
700 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
701 new TypeConstraint(body, Tuples.flatTupleOf(var_parent, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("FS", "Dir", "contents")));
702 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FSObject")));
703 new Equality(body, var__virtual_0_, var_child);
704 // neg find live(_,parent)
705 new NegativePatternCall(body, Tuples.flatTupleOf(var___0_, var_parent), Live.instance().getInternalQueryRepresentation());
706 bodies.add(body);
707 }
708 {
709 PBody body = new PBody(this);
710 PVariable var_parent = body.getOrCreateVariableByName("parent");
711 PVariable var_child = body.getOrCreateVariableByName("child");
712 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
713 new TypeConstraint(body, Tuples.flatTupleOf(var_parent), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "Dir")));
714 new TypeConstraint(body, Tuples.flatTupleOf(var_child), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FSObject")));
715 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
716 new ExportedParameter(body, var_parent, parameter_parent),
717 new ExportedParameter(body, var_child, parameter_child)
718 ));
719 // Dir.contents(parent,child)
720 new TypeConstraint(body, Tuples.flatTupleOf(var_parent), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "Dir")));
721 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
722 new TypeConstraint(body, Tuples.flatTupleOf(var_parent, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("FS", "Dir", "contents")));
723 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FSObject")));
724 new Equality(body, var__virtual_0_, var_child);
725 // neg find live(_,child)
726 new NegativePatternCall(body, Tuples.flatTupleOf(var___0_, var_child), Live.instance().getInternalQueryRepresentation());
727 bodies.add(body);
728 }
729 {
730 PAnnotation annotation = new PAnnotation("Constraint");
731 annotation.addAttribute("key", Arrays.asList(new Object[] {
732 new ParameterReference("child")
733 }));
734 annotation.addAttribute("severity", "error");
735 annotation.addAttribute("message", "error");
736 addAnnotation(annotation);
737 }
738 return bodies;
739 }
740 }
741}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/DirectSupertype.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/DirectSupertype.java
new file mode 100644
index 00000000..ffa846a0
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/DirectSupertype.java
@@ -0,0 +1,692 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.alloyexamples;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
27import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
29import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
31import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
34import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
36import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
37import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
38import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
39
40/**
41 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
42 *
43 * <p>Original source:
44 * <code><pre>
45 * pattern directSupertype(a: EClass, b:EClass) {
46 * EClass.eSuperTypes(a,b);
47 * }
48 * </pre></code>
49 *
50 * @see Matcher
51 * @see Match
52 *
53 */
54@SuppressWarnings("all")
55public final class DirectSupertype extends BaseGeneratedEMFQuerySpecification<DirectSupertype.Matcher> {
56 /**
57 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.directSupertype pattern,
58 * to be used in conjunction with {@link Matcher}.
59 *
60 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
61 * Each instance is a (possibly partial) substitution of pattern parameters,
62 * usable to represent a match of the pattern in the result of a query,
63 * or to specify the bound (fixed) input parameters when issuing a query.
64 *
65 * @see Matcher
66 *
67 */
68 public static abstract class Match extends BasePatternMatch {
69 private EClass fA;
70
71 private EClass fB;
72
73 private static List<String> parameterNames = makeImmutableList("a", "b");
74
75 private Match(final EClass pA, final EClass pB) {
76 this.fA = pA;
77 this.fB = pB;
78 }
79
80 @Override
81 public Object get(final String parameterName) {
82 if ("a".equals(parameterName)) return this.fA;
83 if ("b".equals(parameterName)) return this.fB;
84 return null;
85 }
86
87 public EClass getA() {
88 return this.fA;
89 }
90
91 public EClass getB() {
92 return this.fB;
93 }
94
95 @Override
96 public boolean set(final String parameterName, final Object newValue) {
97 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
98 if ("a".equals(parameterName) ) {
99 this.fA = (EClass) newValue;
100 return true;
101 }
102 if ("b".equals(parameterName) ) {
103 this.fB = (EClass) newValue;
104 return true;
105 }
106 return false;
107 }
108
109 public void setA(final EClass pA) {
110 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
111 this.fA = pA;
112 }
113
114 public void setB(final EClass pB) {
115 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
116 this.fB = pB;
117 }
118
119 @Override
120 public String patternName() {
121 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.directSupertype";
122 }
123
124 @Override
125 public List<String> parameterNames() {
126 return DirectSupertype.Match.parameterNames;
127 }
128
129 @Override
130 public Object[] toArray() {
131 return new Object[]{fA, fB};
132 }
133
134 @Override
135 public DirectSupertype.Match toImmutable() {
136 return isMutable() ? newMatch(fA, fB) : this;
137 }
138
139 @Override
140 public String prettyPrint() {
141 StringBuilder result = new StringBuilder();
142 result.append("\"a\"=" + prettyPrintValue(fA) + ", ");
143 result.append("\"b\"=" + prettyPrintValue(fB));
144 return result.toString();
145 }
146
147 @Override
148 public int hashCode() {
149 return Objects.hash(fA, fB);
150 }
151
152 @Override
153 public boolean equals(final Object obj) {
154 if (this == obj)
155 return true;
156 if (obj == null) {
157 return false;
158 }
159 if ((obj instanceof DirectSupertype.Match)) {
160 DirectSupertype.Match other = (DirectSupertype.Match) obj;
161 return Objects.equals(fA, other.fA) && Objects.equals(fB, other.fB);
162 } else {
163 // this should be infrequent
164 if (!(obj instanceof IPatternMatch)) {
165 return false;
166 }
167 IPatternMatch otherSig = (IPatternMatch) obj;
168 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
169 }
170 }
171
172 @Override
173 public DirectSupertype specification() {
174 return DirectSupertype.instance();
175 }
176
177 /**
178 * Returns an empty, mutable match.
179 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
180 *
181 * @return the empty match.
182 *
183 */
184 public static DirectSupertype.Match newEmptyMatch() {
185 return new Mutable(null, null);
186 }
187
188 /**
189 * Returns a mutable (partial) match.
190 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
191 *
192 * @param pA the fixed value of pattern parameter a, or null if not bound.
193 * @param pB the fixed value of pattern parameter b, or null if not bound.
194 * @return the new, mutable (partial) match object.
195 *
196 */
197 public static DirectSupertype.Match newMutableMatch(final EClass pA, final EClass pB) {
198 return new Mutable(pA, pB);
199 }
200
201 /**
202 * Returns a new (partial) match.
203 * This can be used e.g. to call the matcher with a partial match.
204 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
205 * @param pA the fixed value of pattern parameter a, or null if not bound.
206 * @param pB the fixed value of pattern parameter b, or null if not bound.
207 * @return the (partial) match object.
208 *
209 */
210 public static DirectSupertype.Match newMatch(final EClass pA, final EClass pB) {
211 return new Immutable(pA, pB);
212 }
213
214 private static final class Mutable extends DirectSupertype.Match {
215 Mutable(final EClass pA, final EClass pB) {
216 super(pA, pB);
217 }
218
219 @Override
220 public boolean isMutable() {
221 return true;
222 }
223 }
224
225 private static final class Immutable extends DirectSupertype.Match {
226 Immutable(final EClass pA, final EClass pB) {
227 super(pA, pB);
228 }
229
230 @Override
231 public boolean isMutable() {
232 return false;
233 }
234 }
235 }
236
237 /**
238 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.directSupertype pattern,
239 * providing pattern-specific query methods.
240 *
241 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
242 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
243 *
244 * <p>Matches of the pattern will be represented as {@link Match}.
245 *
246 * <p>Original source:
247 * <code><pre>
248 * pattern directSupertype(a: EClass, b:EClass) {
249 * EClass.eSuperTypes(a,b);
250 * }
251 * </pre></code>
252 *
253 * @see Match
254 * @see DirectSupertype
255 *
256 */
257 public static class Matcher extends BaseMatcher<DirectSupertype.Match> {
258 /**
259 * Initializes the pattern matcher within an existing VIATRA Query engine.
260 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
261 *
262 * @param engine the existing VIATRA Query engine in which this matcher will be created.
263 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
264 *
265 */
266 public static DirectSupertype.Matcher on(final ViatraQueryEngine engine) {
267 // check if matcher already exists
268 Matcher matcher = engine.getExistingMatcher(querySpecification());
269 if (matcher == null) {
270 matcher = (Matcher)engine.getMatcher(querySpecification());
271 }
272 return matcher;
273 }
274
275 /**
276 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
277 * @return an initialized matcher
278 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
279 *
280 */
281 public static DirectSupertype.Matcher create() {
282 return new Matcher();
283 }
284
285 private final static int POSITION_A = 0;
286
287 private final static int POSITION_B = 1;
288
289 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(DirectSupertype.Matcher.class);
290
291 /**
292 * Initializes the pattern matcher within an existing VIATRA Query engine.
293 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
294 *
295 * @param engine the existing VIATRA Query engine in which this matcher will be created.
296 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
297 *
298 */
299 private Matcher() {
300 super(querySpecification());
301 }
302
303 /**
304 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
305 * @param pA the fixed value of pattern parameter a, or null if not bound.
306 * @param pB the fixed value of pattern parameter b, or null if not bound.
307 * @return matches represented as a Match object.
308 *
309 */
310 public Collection<DirectSupertype.Match> getAllMatches(final EClass pA, final EClass pB) {
311 return rawStreamAllMatches(new Object[]{pA, pB}).collect(Collectors.toSet());
312 }
313
314 /**
315 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
316 * </p>
317 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
318 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
319 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
320 * @param pA the fixed value of pattern parameter a, or null if not bound.
321 * @param pB the fixed value of pattern parameter b, or null if not bound.
322 * @return a stream of matches represented as a Match object.
323 *
324 */
325 public Stream<DirectSupertype.Match> streamAllMatches(final EClass pA, final EClass pB) {
326 return rawStreamAllMatches(new Object[]{pA, pB});
327 }
328
329 /**
330 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
331 * Neither determinism nor randomness of selection is guaranteed.
332 * @param pA the fixed value of pattern parameter a, or null if not bound.
333 * @param pB the fixed value of pattern parameter b, or null if not bound.
334 * @return a match represented as a Match object, or null if no match is found.
335 *
336 */
337 public Optional<DirectSupertype.Match> getOneArbitraryMatch(final EClass pA, final EClass pB) {
338 return rawGetOneArbitraryMatch(new Object[]{pA, pB});
339 }
340
341 /**
342 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
343 * under any possible substitution of the unspecified parameters (if any).
344 * @param pA the fixed value of pattern parameter a, or null if not bound.
345 * @param pB the fixed value of pattern parameter b, or null if not bound.
346 * @return true if the input is a valid (partial) match of the pattern.
347 *
348 */
349 public boolean hasMatch(final EClass pA, final EClass pB) {
350 return rawHasMatch(new Object[]{pA, pB});
351 }
352
353 /**
354 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
355 * @param pA the fixed value of pattern parameter a, or null if not bound.
356 * @param pB the fixed value of pattern parameter b, or null if not bound.
357 * @return the number of pattern matches found.
358 *
359 */
360 public int countMatches(final EClass pA, final EClass pB) {
361 return rawCountMatches(new Object[]{pA, pB});
362 }
363
364 /**
365 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
366 * Neither determinism nor randomness of selection is guaranteed.
367 * @param pA the fixed value of pattern parameter a, or null if not bound.
368 * @param pB the fixed value of pattern parameter b, or null if not bound.
369 * @param processor the action that will process the selected match.
370 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
371 *
372 */
373 public boolean forOneArbitraryMatch(final EClass pA, final EClass pB, final Consumer<? super DirectSupertype.Match> processor) {
374 return rawForOneArbitraryMatch(new Object[]{pA, pB}, processor);
375 }
376
377 /**
378 * Returns a new (partial) match.
379 * This can be used e.g. to call the matcher with a partial match.
380 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
381 * @param pA the fixed value of pattern parameter a, or null if not bound.
382 * @param pB the fixed value of pattern parameter b, or null if not bound.
383 * @return the (partial) match object.
384 *
385 */
386 public DirectSupertype.Match newMatch(final EClass pA, final EClass pB) {
387 return DirectSupertype.Match.newMatch(pA, pB);
388 }
389
390 /**
391 * Retrieve the set of values that occur in matches for a.
392 * @return the Set of all values or empty set if there are no matches
393 *
394 */
395 protected Stream<EClass> rawStreamAllValuesOfa(final Object[] parameters) {
396 return rawStreamAllValues(POSITION_A, parameters).map(EClass.class::cast);
397 }
398
399 /**
400 * Retrieve the set of values that occur in matches for a.
401 * @return the Set of all values or empty set if there are no matches
402 *
403 */
404 public Set<EClass> getAllValuesOfa() {
405 return rawStreamAllValuesOfa(emptyArray()).collect(Collectors.toSet());
406 }
407
408 /**
409 * Retrieve the set of values that occur in matches for a.
410 * @return the Set of all values or empty set if there are no matches
411 *
412 */
413 public Stream<EClass> streamAllValuesOfa() {
414 return rawStreamAllValuesOfa(emptyArray());
415 }
416
417 /**
418 * Retrieve the set of values that occur in matches for a.
419 * </p>
420 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
421 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
422 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
423 *
424 * @return the Stream of all values or empty set if there are no matches
425 *
426 */
427 public Stream<EClass> streamAllValuesOfa(final DirectSupertype.Match partialMatch) {
428 return rawStreamAllValuesOfa(partialMatch.toArray());
429 }
430
431 /**
432 * Retrieve the set of values that occur in matches for a.
433 * </p>
434 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
435 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
436 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
437 *
438 * @return the Stream of all values or empty set if there are no matches
439 *
440 */
441 public Stream<EClass> streamAllValuesOfa(final EClass pB) {
442 return rawStreamAllValuesOfa(new Object[]{null, pB});
443 }
444
445 /**
446 * Retrieve the set of values that occur in matches for a.
447 * @return the Set of all values or empty set if there are no matches
448 *
449 */
450 public Set<EClass> getAllValuesOfa(final DirectSupertype.Match partialMatch) {
451 return rawStreamAllValuesOfa(partialMatch.toArray()).collect(Collectors.toSet());
452 }
453
454 /**
455 * Retrieve the set of values that occur in matches for a.
456 * @return the Set of all values or empty set if there are no matches
457 *
458 */
459 public Set<EClass> getAllValuesOfa(final EClass pB) {
460 return rawStreamAllValuesOfa(new Object[]{null, pB}).collect(Collectors.toSet());
461 }
462
463 /**
464 * Retrieve the set of values that occur in matches for b.
465 * @return the Set of all values or empty set if there are no matches
466 *
467 */
468 protected Stream<EClass> rawStreamAllValuesOfb(final Object[] parameters) {
469 return rawStreamAllValues(POSITION_B, parameters).map(EClass.class::cast);
470 }
471
472 /**
473 * Retrieve the set of values that occur in matches for b.
474 * @return the Set of all values or empty set if there are no matches
475 *
476 */
477 public Set<EClass> getAllValuesOfb() {
478 return rawStreamAllValuesOfb(emptyArray()).collect(Collectors.toSet());
479 }
480
481 /**
482 * Retrieve the set of values that occur in matches for b.
483 * @return the Set of all values or empty set if there are no matches
484 *
485 */
486 public Stream<EClass> streamAllValuesOfb() {
487 return rawStreamAllValuesOfb(emptyArray());
488 }
489
490 /**
491 * Retrieve the set of values that occur in matches for b.
492 * </p>
493 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
494 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
495 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
496 *
497 * @return the Stream of all values or empty set if there are no matches
498 *
499 */
500 public Stream<EClass> streamAllValuesOfb(final DirectSupertype.Match partialMatch) {
501 return rawStreamAllValuesOfb(partialMatch.toArray());
502 }
503
504 /**
505 * Retrieve the set of values that occur in matches for b.
506 * </p>
507 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
508 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
509 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
510 *
511 * @return the Stream of all values or empty set if there are no matches
512 *
513 */
514 public Stream<EClass> streamAllValuesOfb(final EClass pA) {
515 return rawStreamAllValuesOfb(new Object[]{pA, null});
516 }
517
518 /**
519 * Retrieve the set of values that occur in matches for b.
520 * @return the Set of all values or empty set if there are no matches
521 *
522 */
523 public Set<EClass> getAllValuesOfb(final DirectSupertype.Match partialMatch) {
524 return rawStreamAllValuesOfb(partialMatch.toArray()).collect(Collectors.toSet());
525 }
526
527 /**
528 * Retrieve the set of values that occur in matches for b.
529 * @return the Set of all values or empty set if there are no matches
530 *
531 */
532 public Set<EClass> getAllValuesOfb(final EClass pA) {
533 return rawStreamAllValuesOfb(new Object[]{pA, null}).collect(Collectors.toSet());
534 }
535
536 @Override
537 protected DirectSupertype.Match tupleToMatch(final Tuple t) {
538 try {
539 return DirectSupertype.Match.newMatch((EClass) t.get(POSITION_A), (EClass) t.get(POSITION_B));
540 } catch(ClassCastException e) {
541 LOGGER.error("Element(s) in tuple not properly typed!",e);
542 return null;
543 }
544 }
545
546 @Override
547 protected DirectSupertype.Match arrayToMatch(final Object[] match) {
548 try {
549 return DirectSupertype.Match.newMatch((EClass) match[POSITION_A], (EClass) match[POSITION_B]);
550 } catch(ClassCastException e) {
551 LOGGER.error("Element(s) in array not properly typed!",e);
552 return null;
553 }
554 }
555
556 @Override
557 protected DirectSupertype.Match arrayToMatchMutable(final Object[] match) {
558 try {
559 return DirectSupertype.Match.newMutableMatch((EClass) match[POSITION_A], (EClass) match[POSITION_B]);
560 } catch(ClassCastException e) {
561 LOGGER.error("Element(s) in array not properly typed!",e);
562 return null;
563 }
564 }
565
566 /**
567 * @return the singleton instance of the query specification of this pattern
568 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
569 *
570 */
571 public static IQuerySpecification<DirectSupertype.Matcher> querySpecification() {
572 return DirectSupertype.instance();
573 }
574 }
575
576 private DirectSupertype() {
577 super(GeneratedPQuery.INSTANCE);
578 }
579
580 /**
581 * @return the singleton instance of the query specification
582 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
583 *
584 */
585 public static DirectSupertype instance() {
586 try{
587 return LazyHolder.INSTANCE;
588 } catch (ExceptionInInitializerError err) {
589 throw processInitializerError(err);
590 }
591 }
592
593 @Override
594 protected DirectSupertype.Matcher instantiate(final ViatraQueryEngine engine) {
595 return DirectSupertype.Matcher.on(engine);
596 }
597
598 @Override
599 public DirectSupertype.Matcher instantiate() {
600 return DirectSupertype.Matcher.create();
601 }
602
603 @Override
604 public DirectSupertype.Match newEmptyMatch() {
605 return DirectSupertype.Match.newEmptyMatch();
606 }
607
608 @Override
609 public DirectSupertype.Match newMatch(final Object... parameters) {
610 return DirectSupertype.Match.newMatch((org.eclipse.emf.ecore.EClass) parameters[0], (org.eclipse.emf.ecore.EClass) parameters[1]);
611 }
612
613 /**
614 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.DirectSupertype (visibility: PUBLIC, simpleName: DirectSupertype, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.DirectSupertype, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
615 * <b>not</b> at the class load time of the outer class,
616 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.DirectSupertype (visibility: PUBLIC, simpleName: DirectSupertype, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.DirectSupertype, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
617 *
618 * <p> This workaround is required e.g. to support recursion.
619 *
620 */
621 private static class LazyHolder {
622 private final static DirectSupertype INSTANCE = new DirectSupertype();
623
624 /**
625 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
626 * This initialization order is required to support indirect recursion.
627 *
628 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
629 *
630 */
631 private final static Object STATIC_INITIALIZER = ensureInitialized();
632
633 public static Object ensureInitialized() {
634 INSTANCE.ensureInitializedInternal();
635 return null;
636 }
637 }
638
639 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
640 private final static DirectSupertype.GeneratedPQuery INSTANCE = new GeneratedPQuery();
641
642 private final PParameter parameter_a = new PParameter("a", "org.eclipse.emf.ecore.EClass", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EClass")), PParameterDirection.INOUT);
643
644 private final PParameter parameter_b = new PParameter("b", "org.eclipse.emf.ecore.EClass", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EClass")), PParameterDirection.INOUT);
645
646 private final List<PParameter> parameters = Arrays.asList(parameter_a, parameter_b);
647
648 private GeneratedPQuery() {
649 super(PVisibility.PUBLIC);
650 }
651
652 @Override
653 public String getFullyQualifiedName() {
654 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.directSupertype";
655 }
656
657 @Override
658 public List<String> getParameterNames() {
659 return Arrays.asList("a","b");
660 }
661
662 @Override
663 public List<PParameter> getParameters() {
664 return parameters;
665 }
666
667 @Override
668 public Set<PBody> doGetContainedBodies() {
669 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
670 Set<PBody> bodies = new LinkedHashSet<>();
671 {
672 PBody body = new PBody(this);
673 PVariable var_a = body.getOrCreateVariableByName("a");
674 PVariable var_b = body.getOrCreateVariableByName("b");
675 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
676 new TypeConstraint(body, Tuples.flatTupleOf(var_b), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
677 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
678 new ExportedParameter(body, var_a, parameter_a),
679 new ExportedParameter(body, var_b, parameter_b)
680 ));
681 // EClass.eSuperTypes(a,b)
682 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
683 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
684 new TypeConstraint(body, Tuples.flatTupleOf(var_a, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass", "eSuperTypes")));
685 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
686 new Equality(body, var__virtual_0_, var_b);
687 bodies.add(body);
688 }
689 return bodies;
690 }
691 }
692}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Live.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Live.java
new file mode 100644
index 00000000..7bc2f458
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Live.java
@@ -0,0 +1,730 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/FileSystem.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.alloyexamples;
5
6import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject;
7import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem;
8import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.PatternContent;
9import java.util.Arrays;
10import java.util.Collection;
11import java.util.LinkedHashSet;
12import java.util.List;
13import java.util.Objects;
14import java.util.Optional;
15import java.util.Set;
16import java.util.function.Consumer;
17import java.util.stream.Collectors;
18import java.util.stream.Stream;
19import org.apache.log4j.Logger;
20import org.eclipse.emf.ecore.EClass;
21import org.eclipse.viatra.query.runtime.api.IPatternMatch;
22import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
24import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
25import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
26import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
27import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
28import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
29import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
30import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
32import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
33import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
34import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
35import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
36import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure;
37import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
38import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
39import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
40import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
41import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
42import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
43import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
44
45/**
46 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
47 *
48 * <p>Original source:
49 * <code><pre>
50 * {@literal @}QueryBasedFeature
51 * pattern live(this: FileSystem, l: FSObject) {
52 * FileSystem.root(this,l);
53 * } or {
54 * FileSystem.root(this,root);
55 * find patternContent+(root,l);
56 * }
57 * </pre></code>
58 *
59 * @see Matcher
60 * @see Match
61 *
62 */
63@SuppressWarnings("all")
64public final class Live extends BaseGeneratedEMFQuerySpecification<Live.Matcher> {
65 /**
66 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live pattern,
67 * to be used in conjunction with {@link Matcher}.
68 *
69 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
70 * Each instance is a (possibly partial) substitution of pattern parameters,
71 * usable to represent a match of the pattern in the result of a query,
72 * or to specify the bound (fixed) input parameters when issuing a query.
73 *
74 * @see Matcher
75 *
76 */
77 public static abstract class Match extends BasePatternMatch {
78 private FileSystem fThis;
79
80 private FSObject fL;
81
82 private static List<String> parameterNames = makeImmutableList("this", "l");
83
84 private Match(final FileSystem pThis, final FSObject pL) {
85 this.fThis = pThis;
86 this.fL = pL;
87 }
88
89 @Override
90 public Object get(final String parameterName) {
91 if ("this".equals(parameterName)) return this.fThis;
92 if ("l".equals(parameterName)) return this.fL;
93 return null;
94 }
95
96 public FileSystem getThis() {
97 return this.fThis;
98 }
99
100 public FSObject getL() {
101 return this.fL;
102 }
103
104 @Override
105 public boolean set(final String parameterName, final Object newValue) {
106 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
107 if ("this".equals(parameterName) ) {
108 this.fThis = (FileSystem) newValue;
109 return true;
110 }
111 if ("l".equals(parameterName) ) {
112 this.fL = (FSObject) newValue;
113 return true;
114 }
115 return false;
116 }
117
118 public void setThis(final FileSystem pThis) {
119 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
120 this.fThis = pThis;
121 }
122
123 public void setL(final FSObject pL) {
124 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
125 this.fL = pL;
126 }
127
128 @Override
129 public String patternName() {
130 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live";
131 }
132
133 @Override
134 public List<String> parameterNames() {
135 return Live.Match.parameterNames;
136 }
137
138 @Override
139 public Object[] toArray() {
140 return new Object[]{fThis, fL};
141 }
142
143 @Override
144 public Live.Match toImmutable() {
145 return isMutable() ? newMatch(fThis, fL) : this;
146 }
147
148 @Override
149 public String prettyPrint() {
150 StringBuilder result = new StringBuilder();
151 result.append("\"this\"=" + prettyPrintValue(fThis) + ", ");
152 result.append("\"l\"=" + prettyPrintValue(fL));
153 return result.toString();
154 }
155
156 @Override
157 public int hashCode() {
158 return Objects.hash(fThis, fL);
159 }
160
161 @Override
162 public boolean equals(final Object obj) {
163 if (this == obj)
164 return true;
165 if (obj == null) {
166 return false;
167 }
168 if ((obj instanceof Live.Match)) {
169 Live.Match other = (Live.Match) obj;
170 return Objects.equals(fThis, other.fThis) && Objects.equals(fL, other.fL);
171 } else {
172 // this should be infrequent
173 if (!(obj instanceof IPatternMatch)) {
174 return false;
175 }
176 IPatternMatch otherSig = (IPatternMatch) obj;
177 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
178 }
179 }
180
181 @Override
182 public Live specification() {
183 return Live.instance();
184 }
185
186 /**
187 * Returns an empty, mutable match.
188 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
189 *
190 * @return the empty match.
191 *
192 */
193 public static Live.Match newEmptyMatch() {
194 return new Mutable(null, null);
195 }
196
197 /**
198 * Returns a mutable (partial) match.
199 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
200 *
201 * @param pThis the fixed value of pattern parameter this, or null if not bound.
202 * @param pL the fixed value of pattern parameter l, or null if not bound.
203 * @return the new, mutable (partial) match object.
204 *
205 */
206 public static Live.Match newMutableMatch(final FileSystem pThis, final FSObject pL) {
207 return new Mutable(pThis, pL);
208 }
209
210 /**
211 * Returns a new (partial) match.
212 * This can be used e.g. to call the matcher with a partial match.
213 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
214 * @param pThis the fixed value of pattern parameter this, or null if not bound.
215 * @param pL the fixed value of pattern parameter l, or null if not bound.
216 * @return the (partial) match object.
217 *
218 */
219 public static Live.Match newMatch(final FileSystem pThis, final FSObject pL) {
220 return new Immutable(pThis, pL);
221 }
222
223 private static final class Mutable extends Live.Match {
224 Mutable(final FileSystem pThis, final FSObject pL) {
225 super(pThis, pL);
226 }
227
228 @Override
229 public boolean isMutable() {
230 return true;
231 }
232 }
233
234 private static final class Immutable extends Live.Match {
235 Immutable(final FileSystem pThis, final FSObject pL) {
236 super(pThis, pL);
237 }
238
239 @Override
240 public boolean isMutable() {
241 return false;
242 }
243 }
244 }
245
246 /**
247 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live pattern,
248 * providing pattern-specific query methods.
249 *
250 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
251 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
252 *
253 * <p>Matches of the pattern will be represented as {@link Match}.
254 *
255 * <p>Original source:
256 * <code><pre>
257 * {@literal @}QueryBasedFeature
258 * pattern live(this: FileSystem, l: FSObject) {
259 * FileSystem.root(this,l);
260 * } or {
261 * FileSystem.root(this,root);
262 * find patternContent+(root,l);
263 * }
264 * </pre></code>
265 *
266 * @see Match
267 * @see Live
268 *
269 */
270 public static class Matcher extends BaseMatcher<Live.Match> {
271 /**
272 * Initializes the pattern matcher within an existing VIATRA Query engine.
273 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
274 *
275 * @param engine the existing VIATRA Query engine in which this matcher will be created.
276 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
277 *
278 */
279 public static Live.Matcher on(final ViatraQueryEngine engine) {
280 // check if matcher already exists
281 Matcher matcher = engine.getExistingMatcher(querySpecification());
282 if (matcher == null) {
283 matcher = (Matcher)engine.getMatcher(querySpecification());
284 }
285 return matcher;
286 }
287
288 /**
289 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
290 * @return an initialized matcher
291 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
292 *
293 */
294 public static Live.Matcher create() {
295 return new Matcher();
296 }
297
298 private final static int POSITION_THIS = 0;
299
300 private final static int POSITION_L = 1;
301
302 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(Live.Matcher.class);
303
304 /**
305 * Initializes the pattern matcher within an existing VIATRA Query engine.
306 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
307 *
308 * @param engine the existing VIATRA Query engine in which this matcher will be created.
309 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
310 *
311 */
312 private Matcher() {
313 super(querySpecification());
314 }
315
316 /**
317 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
318 * @param pThis the fixed value of pattern parameter this, or null if not bound.
319 * @param pL the fixed value of pattern parameter l, or null if not bound.
320 * @return matches represented as a Match object.
321 *
322 */
323 public Collection<Live.Match> getAllMatches(final FileSystem pThis, final FSObject pL) {
324 return rawStreamAllMatches(new Object[]{pThis, pL}).collect(Collectors.toSet());
325 }
326
327 /**
328 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
329 * </p>
330 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
331 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
332 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
333 * @param pThis the fixed value of pattern parameter this, or null if not bound.
334 * @param pL the fixed value of pattern parameter l, or null if not bound.
335 * @return a stream of matches represented as a Match object.
336 *
337 */
338 public Stream<Live.Match> streamAllMatches(final FileSystem pThis, final FSObject pL) {
339 return rawStreamAllMatches(new Object[]{pThis, pL});
340 }
341
342 /**
343 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
344 * Neither determinism nor randomness of selection is guaranteed.
345 * @param pThis the fixed value of pattern parameter this, or null if not bound.
346 * @param pL the fixed value of pattern parameter l, or null if not bound.
347 * @return a match represented as a Match object, or null if no match is found.
348 *
349 */
350 public Optional<Live.Match> getOneArbitraryMatch(final FileSystem pThis, final FSObject pL) {
351 return rawGetOneArbitraryMatch(new Object[]{pThis, pL});
352 }
353
354 /**
355 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
356 * under any possible substitution of the unspecified parameters (if any).
357 * @param pThis the fixed value of pattern parameter this, or null if not bound.
358 * @param pL the fixed value of pattern parameter l, or null if not bound.
359 * @return true if the input is a valid (partial) match of the pattern.
360 *
361 */
362 public boolean hasMatch(final FileSystem pThis, final FSObject pL) {
363 return rawHasMatch(new Object[]{pThis, pL});
364 }
365
366 /**
367 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
368 * @param pThis the fixed value of pattern parameter this, or null if not bound.
369 * @param pL the fixed value of pattern parameter l, or null if not bound.
370 * @return the number of pattern matches found.
371 *
372 */
373 public int countMatches(final FileSystem pThis, final FSObject pL) {
374 return rawCountMatches(new Object[]{pThis, pL});
375 }
376
377 /**
378 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
379 * Neither determinism nor randomness of selection is guaranteed.
380 * @param pThis the fixed value of pattern parameter this, or null if not bound.
381 * @param pL the fixed value of pattern parameter l, or null if not bound.
382 * @param processor the action that will process the selected match.
383 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
384 *
385 */
386 public boolean forOneArbitraryMatch(final FileSystem pThis, final FSObject pL, final Consumer<? super Live.Match> processor) {
387 return rawForOneArbitraryMatch(new Object[]{pThis, pL}, processor);
388 }
389
390 /**
391 * Returns a new (partial) match.
392 * This can be used e.g. to call the matcher with a partial match.
393 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
394 * @param pThis the fixed value of pattern parameter this, or null if not bound.
395 * @param pL the fixed value of pattern parameter l, or null if not bound.
396 * @return the (partial) match object.
397 *
398 */
399 public Live.Match newMatch(final FileSystem pThis, final FSObject pL) {
400 return Live.Match.newMatch(pThis, pL);
401 }
402
403 /**
404 * Retrieve the set of values that occur in matches for this.
405 * @return the Set of all values or empty set if there are no matches
406 *
407 */
408 protected Stream<FileSystem> rawStreamAllValuesOfthis(final Object[] parameters) {
409 return rawStreamAllValues(POSITION_THIS, parameters).map(FileSystem.class::cast);
410 }
411
412 /**
413 * Retrieve the set of values that occur in matches for this.
414 * @return the Set of all values or empty set if there are no matches
415 *
416 */
417 public Set<FileSystem> getAllValuesOfthis() {
418 return rawStreamAllValuesOfthis(emptyArray()).collect(Collectors.toSet());
419 }
420
421 /**
422 * Retrieve the set of values that occur in matches for this.
423 * @return the Set of all values or empty set if there are no matches
424 *
425 */
426 public Stream<FileSystem> streamAllValuesOfthis() {
427 return rawStreamAllValuesOfthis(emptyArray());
428 }
429
430 /**
431 * Retrieve the set of values that occur in matches for this.
432 * </p>
433 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
434 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
435 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
436 *
437 * @return the Stream of all values or empty set if there are no matches
438 *
439 */
440 public Stream<FileSystem> streamAllValuesOfthis(final Live.Match partialMatch) {
441 return rawStreamAllValuesOfthis(partialMatch.toArray());
442 }
443
444 /**
445 * Retrieve the set of values that occur in matches for this.
446 * </p>
447 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
448 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
449 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
450 *
451 * @return the Stream of all values or empty set if there are no matches
452 *
453 */
454 public Stream<FileSystem> streamAllValuesOfthis(final FSObject pL) {
455 return rawStreamAllValuesOfthis(new Object[]{null, pL});
456 }
457
458 /**
459 * Retrieve the set of values that occur in matches for this.
460 * @return the Set of all values or empty set if there are no matches
461 *
462 */
463 public Set<FileSystem> getAllValuesOfthis(final Live.Match partialMatch) {
464 return rawStreamAllValuesOfthis(partialMatch.toArray()).collect(Collectors.toSet());
465 }
466
467 /**
468 * Retrieve the set of values that occur in matches for this.
469 * @return the Set of all values or empty set if there are no matches
470 *
471 */
472 public Set<FileSystem> getAllValuesOfthis(final FSObject pL) {
473 return rawStreamAllValuesOfthis(new Object[]{null, pL}).collect(Collectors.toSet());
474 }
475
476 /**
477 * Retrieve the set of values that occur in matches for l.
478 * @return the Set of all values or empty set if there are no matches
479 *
480 */
481 protected Stream<FSObject> rawStreamAllValuesOfl(final Object[] parameters) {
482 return rawStreamAllValues(POSITION_L, parameters).map(FSObject.class::cast);
483 }
484
485 /**
486 * Retrieve the set of values that occur in matches for l.
487 * @return the Set of all values or empty set if there are no matches
488 *
489 */
490 public Set<FSObject> getAllValuesOfl() {
491 return rawStreamAllValuesOfl(emptyArray()).collect(Collectors.toSet());
492 }
493
494 /**
495 * Retrieve the set of values that occur in matches for l.
496 * @return the Set of all values or empty set if there are no matches
497 *
498 */
499 public Stream<FSObject> streamAllValuesOfl() {
500 return rawStreamAllValuesOfl(emptyArray());
501 }
502
503 /**
504 * Retrieve the set of values that occur in matches for l.
505 * </p>
506 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
507 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
508 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
509 *
510 * @return the Stream of all values or empty set if there are no matches
511 *
512 */
513 public Stream<FSObject> streamAllValuesOfl(final Live.Match partialMatch) {
514 return rawStreamAllValuesOfl(partialMatch.toArray());
515 }
516
517 /**
518 * Retrieve the set of values that occur in matches for l.
519 * </p>
520 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
521 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
522 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
523 *
524 * @return the Stream of all values or empty set if there are no matches
525 *
526 */
527 public Stream<FSObject> streamAllValuesOfl(final FileSystem pThis) {
528 return rawStreamAllValuesOfl(new Object[]{pThis, null});
529 }
530
531 /**
532 * Retrieve the set of values that occur in matches for l.
533 * @return the Set of all values or empty set if there are no matches
534 *
535 */
536 public Set<FSObject> getAllValuesOfl(final Live.Match partialMatch) {
537 return rawStreamAllValuesOfl(partialMatch.toArray()).collect(Collectors.toSet());
538 }
539
540 /**
541 * Retrieve the set of values that occur in matches for l.
542 * @return the Set of all values or empty set if there are no matches
543 *
544 */
545 public Set<FSObject> getAllValuesOfl(final FileSystem pThis) {
546 return rawStreamAllValuesOfl(new Object[]{pThis, null}).collect(Collectors.toSet());
547 }
548
549 @Override
550 protected Live.Match tupleToMatch(final Tuple t) {
551 try {
552 return Live.Match.newMatch((FileSystem) t.get(POSITION_THIS), (FSObject) t.get(POSITION_L));
553 } catch(ClassCastException e) {
554 LOGGER.error("Element(s) in tuple not properly typed!",e);
555 return null;
556 }
557 }
558
559 @Override
560 protected Live.Match arrayToMatch(final Object[] match) {
561 try {
562 return Live.Match.newMatch((FileSystem) match[POSITION_THIS], (FSObject) match[POSITION_L]);
563 } catch(ClassCastException e) {
564 LOGGER.error("Element(s) in array not properly typed!",e);
565 return null;
566 }
567 }
568
569 @Override
570 protected Live.Match arrayToMatchMutable(final Object[] match) {
571 try {
572 return Live.Match.newMutableMatch((FileSystem) match[POSITION_THIS], (FSObject) match[POSITION_L]);
573 } catch(ClassCastException e) {
574 LOGGER.error("Element(s) in array not properly typed!",e);
575 return null;
576 }
577 }
578
579 /**
580 * @return the singleton instance of the query specification of this pattern
581 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
582 *
583 */
584 public static IQuerySpecification<Live.Matcher> querySpecification() {
585 return Live.instance();
586 }
587 }
588
589 private Live() {
590 super(GeneratedPQuery.INSTANCE);
591 }
592
593 /**
594 * @return the singleton instance of the query specification
595 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
596 *
597 */
598 public static Live instance() {
599 try{
600 return LazyHolder.INSTANCE;
601 } catch (ExceptionInInitializerError err) {
602 throw processInitializerError(err);
603 }
604 }
605
606 @Override
607 protected Live.Matcher instantiate(final ViatraQueryEngine engine) {
608 return Live.Matcher.on(engine);
609 }
610
611 @Override
612 public Live.Matcher instantiate() {
613 return Live.Matcher.create();
614 }
615
616 @Override
617 public Live.Match newEmptyMatch() {
618 return Live.Match.newEmptyMatch();
619 }
620
621 @Override
622 public Live.Match newMatch(final Object... parameters) {
623 return Live.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem) parameters[0], (hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject) parameters[1]);
624 }
625
626 /**
627 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Live (visibility: PUBLIC, simpleName: Live, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Live, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
628 * <b>not</b> at the class load time of the outer class,
629 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Live (visibility: PUBLIC, simpleName: Live, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Live, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
630 *
631 * <p> This workaround is required e.g. to support recursion.
632 *
633 */
634 private static class LazyHolder {
635 private final static Live INSTANCE = new Live();
636
637 /**
638 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
639 * This initialization order is required to support indirect recursion.
640 *
641 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
642 *
643 */
644 private final static Object STATIC_INITIALIZER = ensureInitialized();
645
646 public static Object ensureInitialized() {
647 INSTANCE.ensureInitializedInternal();
648 return null;
649 }
650 }
651
652 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
653 private final static Live.GeneratedPQuery INSTANCE = new GeneratedPQuery();
654
655 private final PParameter parameter_this = new PParameter("this", "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("FS", "FileSystem")), PParameterDirection.INOUT);
656
657 private final PParameter parameter_l = new PParameter("l", "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("FS", "FSObject")), PParameterDirection.INOUT);
658
659 private final List<PParameter> parameters = Arrays.asList(parameter_this, parameter_l);
660
661 private GeneratedPQuery() {
662 super(PVisibility.PUBLIC);
663 }
664
665 @Override
666 public String getFullyQualifiedName() {
667 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live";
668 }
669
670 @Override
671 public List<String> getParameterNames() {
672 return Arrays.asList("this","l");
673 }
674
675 @Override
676 public List<PParameter> getParameters() {
677 return parameters;
678 }
679
680 @Override
681 public Set<PBody> doGetContainedBodies() {
682 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
683 Set<PBody> bodies = new LinkedHashSet<>();
684 {
685 PBody body = new PBody(this);
686 PVariable var_this = body.getOrCreateVariableByName("this");
687 PVariable var_l = body.getOrCreateVariableByName("l");
688 new TypeConstraint(body, Tuples.flatTupleOf(var_this), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FileSystem")));
689 new TypeConstraint(body, Tuples.flatTupleOf(var_l), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FSObject")));
690 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
691 new ExportedParameter(body, var_this, parameter_this),
692 new ExportedParameter(body, var_l, parameter_l)
693 ));
694 // FileSystem.root(this,l)
695 new TypeConstraint(body, Tuples.flatTupleOf(var_this), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FileSystem")));
696 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
697 new TypeConstraint(body, Tuples.flatTupleOf(var_this, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("FS", "FileSystem", "root")));
698 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "Dir")));
699 new Equality(body, var__virtual_0_, var_l);
700 bodies.add(body);
701 }
702 {
703 PBody body = new PBody(this);
704 PVariable var_this = body.getOrCreateVariableByName("this");
705 PVariable var_l = body.getOrCreateVariableByName("l");
706 PVariable var_root = body.getOrCreateVariableByName("root");
707 new TypeConstraint(body, Tuples.flatTupleOf(var_this), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FileSystem")));
708 new TypeConstraint(body, Tuples.flatTupleOf(var_l), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FSObject")));
709 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
710 new ExportedParameter(body, var_this, parameter_this),
711 new ExportedParameter(body, var_l, parameter_l)
712 ));
713 // FileSystem.root(this,root)
714 new TypeConstraint(body, Tuples.flatTupleOf(var_this), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FileSystem")));
715 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
716 new TypeConstraint(body, Tuples.flatTupleOf(var_this, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("FS", "FileSystem", "root")));
717 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "Dir")));
718 new Equality(body, var__virtual_0_, var_root);
719 // find patternContent+(root,l)
720 new BinaryTransitiveClosure(body, Tuples.flatTupleOf(var_root, var_l), PatternContent.instance().getInternalQueryRepresentation());
721 bodies.add(body);
722 }
723 {
724 PAnnotation annotation = new PAnnotation("QueryBasedFeature");
725 addAnnotation(annotation);
726 }
727 return bodies;
728 }
729 }
730}
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSOr.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/LoopInInheritence.java
index 0d8e0648..55afe7d0 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSOr.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/LoopInInheritence.java
@@ -1,8 +1,9 @@
1/** 1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql 2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql
3 */ 3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries; 4package hu.bme.mit.inf.dslreasoner.domains.alloyexamples;
5 5
6import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.DirectSupertype;
6import java.util.Arrays; 7import java.util.Arrays;
7import java.util.Collection; 8import java.util.Collection;
8import java.util.LinkedHashSet; 9import java.util.LinkedHashSet;
@@ -26,7 +27,10 @@ import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 27import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; 28import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; 29import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
30import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
31import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; 32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; 34import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; 35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; 36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
@@ -40,9 +44,9 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
40 * 44 *
41 * <p>Original source: 45 * <p>Original source:
42 * <code><pre> 46 * <code><pre>
43 * //VLSFormula 47 * {@literal @}Constraint(key={a}, severity="error", message="error")
44 * pattern VLSOr(term: VLSOr){ 48 * pattern loopInInheritence(a: EClass) {
45 * VLSOr(term); 49 * find directSupertype+(a,a);
46 * } 50 * }
47 * </pre></code> 51 * </pre></code>
48 * 52 *
@@ -51,9 +55,9 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
51 * 55 *
52 */ 56 */
53@SuppressWarnings("all") 57@SuppressWarnings("all")
54public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matcher> { 58public final class LoopInInheritence extends BaseGeneratedEMFQuerySpecification<LoopInInheritence.Matcher> {
55 /** 59 /**
56 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr pattern, 60 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.loopInInheritence pattern,
57 * to be used in conjunction with {@link Matcher}. 61 * to be used in conjunction with {@link Matcher}.
58 * 62 *
59 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. 63 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
@@ -65,69 +69,69 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
65 * 69 *
66 */ 70 */
67 public static abstract class Match extends BasePatternMatch { 71 public static abstract class Match extends BasePatternMatch {
68 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr fTerm; 72 private EClass fA;
69 73
70 private static List<String> parameterNames = makeImmutableList("term"); 74 private static List<String> parameterNames = makeImmutableList("a");
71 75
72 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 76 private Match(final EClass pA) {
73 this.fTerm = pTerm; 77 this.fA = pA;
74 } 78 }
75 79
76 @Override 80 @Override
77 public Object get(final String parameterName) { 81 public Object get(final String parameterName) {
78 if ("term".equals(parameterName)) return this.fTerm; 82 if ("a".equals(parameterName)) return this.fA;
79 return null; 83 return null;
80 } 84 }
81 85
82 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr getTerm() { 86 public EClass getA() {
83 return this.fTerm; 87 return this.fA;
84 } 88 }
85 89
86 @Override 90 @Override
87 public boolean set(final String parameterName, final Object newValue) { 91 public boolean set(final String parameterName, final Object newValue) {
88 if (!isMutable()) throw new java.lang.UnsupportedOperationException(); 92 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
89 if ("term".equals(parameterName) ) { 93 if ("a".equals(parameterName) ) {
90 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) newValue; 94 this.fA = (EClass) newValue;
91 return true; 95 return true;
92 } 96 }
93 return false; 97 return false;
94 } 98 }
95 99
96 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 100 public void setA(final EClass pA) {
97 if (!isMutable()) throw new java.lang.UnsupportedOperationException(); 101 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
98 this.fTerm = pTerm; 102 this.fA = pA;
99 } 103 }
100 104
101 @Override 105 @Override
102 public String patternName() { 106 public String patternName() {
103 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr"; 107 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.loopInInheritence";
104 } 108 }
105 109
106 @Override 110 @Override
107 public List<String> parameterNames() { 111 public List<String> parameterNames() {
108 return VLSOr.Match.parameterNames; 112 return LoopInInheritence.Match.parameterNames;
109 } 113 }
110 114
111 @Override 115 @Override
112 public Object[] toArray() { 116 public Object[] toArray() {
113 return new Object[]{fTerm}; 117 return new Object[]{fA};
114 } 118 }
115 119
116 @Override 120 @Override
117 public VLSOr.Match toImmutable() { 121 public LoopInInheritence.Match toImmutable() {
118 return isMutable() ? newMatch(fTerm) : this; 122 return isMutable() ? newMatch(fA) : this;
119 } 123 }
120 124
121 @Override 125 @Override
122 public String prettyPrint() { 126 public String prettyPrint() {
123 StringBuilder result = new StringBuilder(); 127 StringBuilder result = new StringBuilder();
124 result.append("\"term\"=" + prettyPrintValue(fTerm)); 128 result.append("\"a\"=" + prettyPrintValue(fA));
125 return result.toString(); 129 return result.toString();
126 } 130 }
127 131
128 @Override 132 @Override
129 public int hashCode() { 133 public int hashCode() {
130 return Objects.hash(fTerm); 134 return Objects.hash(fA);
131 } 135 }
132 136
133 @Override 137 @Override
@@ -137,9 +141,9 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
137 if (obj == null) { 141 if (obj == null) {
138 return false; 142 return false;
139 } 143 }
140 if ((obj instanceof VLSOr.Match)) { 144 if ((obj instanceof LoopInInheritence.Match)) {
141 VLSOr.Match other = (VLSOr.Match) obj; 145 LoopInInheritence.Match other = (LoopInInheritence.Match) obj;
142 return Objects.equals(fTerm, other.fTerm); 146 return Objects.equals(fA, other.fA);
143 } else { 147 } else {
144 // this should be infrequent 148 // this should be infrequent
145 if (!(obj instanceof IPatternMatch)) { 149 if (!(obj instanceof IPatternMatch)) {
@@ -151,8 +155,8 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
151 } 155 }
152 156
153 @Override 157 @Override
154 public VLSOr specification() { 158 public LoopInInheritence specification() {
155 return VLSOr.instance(); 159 return LoopInInheritence.instance();
156 } 160 }
157 161
158 /** 162 /**
@@ -162,7 +166,7 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
162 * @return the empty match. 166 * @return the empty match.
163 * 167 *
164 */ 168 */
165 public static VLSOr.Match newEmptyMatch() { 169 public static LoopInInheritence.Match newEmptyMatch() {
166 return new Mutable(null); 170 return new Mutable(null);
167 } 171 }
168 172
@@ -170,29 +174,29 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
170 * Returns a mutable (partial) match. 174 * Returns a mutable (partial) match.
171 * Fields of the mutable match can be filled to create a partial match, usable as matcher input. 175 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
172 * 176 *
173 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 177 * @param pA the fixed value of pattern parameter a, or null if not bound.
174 * @return the new, mutable (partial) match object. 178 * @return the new, mutable (partial) match object.
175 * 179 *
176 */ 180 */
177 public static VLSOr.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 181 public static LoopInInheritence.Match newMutableMatch(final EClass pA) {
178 return new Mutable(pTerm); 182 return new Mutable(pA);
179 } 183 }
180 184
181 /** 185 /**
182 * Returns a new (partial) match. 186 * Returns a new (partial) match.
183 * This can be used e.g. to call the matcher with a partial match. 187 * This can be used e.g. to call the matcher with a partial match.
184 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. 188 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
185 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 189 * @param pA the fixed value of pattern parameter a, or null if not bound.
186 * @return the (partial) match object. 190 * @return the (partial) match object.
187 * 191 *
188 */ 192 */
189 public static VLSOr.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 193 public static LoopInInheritence.Match newMatch(final EClass pA) {
190 return new Immutable(pTerm); 194 return new Immutable(pA);
191 } 195 }
192 196
193 private static final class Mutable extends VLSOr.Match { 197 private static final class Mutable extends LoopInInheritence.Match {
194 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 198 Mutable(final EClass pA) {
195 super(pTerm); 199 super(pA);
196 } 200 }
197 201
198 @Override 202 @Override
@@ -201,9 +205,9 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
201 } 205 }
202 } 206 }
203 207
204 private static final class Immutable extends VLSOr.Match { 208 private static final class Immutable extends LoopInInheritence.Match {
205 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 209 Immutable(final EClass pA) {
206 super(pTerm); 210 super(pA);
207 } 211 }
208 212
209 @Override 213 @Override
@@ -214,7 +218,7 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
214 } 218 }
215 219
216 /** 220 /**
217 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr pattern, 221 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.loopInInheritence pattern,
218 * providing pattern-specific query methods. 222 * providing pattern-specific query methods.
219 * 223 *
220 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, 224 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
@@ -224,17 +228,17 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
224 * 228 *
225 * <p>Original source: 229 * <p>Original source:
226 * <code><pre> 230 * <code><pre>
227 * //VLSFormula 231 * {@literal @}Constraint(key={a}, severity="error", message="error")
228 * pattern VLSOr(term: VLSOr){ 232 * pattern loopInInheritence(a: EClass) {
229 * VLSOr(term); 233 * find directSupertype+(a,a);
230 * } 234 * }
231 * </pre></code> 235 * </pre></code>
232 * 236 *
233 * @see Match 237 * @see Match
234 * @see VLSOr 238 * @see LoopInInheritence
235 * 239 *
236 */ 240 */
237 public static class Matcher extends BaseMatcher<VLSOr.Match> { 241 public static class Matcher extends BaseMatcher<LoopInInheritence.Match> {
238 /** 242 /**
239 * Initializes the pattern matcher within an existing VIATRA Query engine. 243 * Initializes the pattern matcher within an existing VIATRA Query engine.
240 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. 244 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
@@ -243,7 +247,7 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
243 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation 247 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
244 * 248 *
245 */ 249 */
246 public static VLSOr.Matcher on(final ViatraQueryEngine engine) { 250 public static LoopInInheritence.Matcher on(final ViatraQueryEngine engine) {
247 // check if matcher already exists 251 // check if matcher already exists
248 Matcher matcher = engine.getExistingMatcher(querySpecification()); 252 Matcher matcher = engine.getExistingMatcher(querySpecification());
249 if (matcher == null) { 253 if (matcher == null) {
@@ -258,13 +262,13 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
258 * @noreference This method is for internal matcher initialization by the framework, do not call it manually. 262 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
259 * 263 *
260 */ 264 */
261 public static VLSOr.Matcher create() { 265 public static LoopInInheritence.Matcher create() {
262 return new Matcher(); 266 return new Matcher();
263 } 267 }
264 268
265 private final static int POSITION_TERM = 0; 269 private final static int POSITION_A = 0;
266 270
267 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSOr.Matcher.class); 271 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(LoopInInheritence.Matcher.class);
268 272
269 /** 273 /**
270 * Initializes the pattern matcher within an existing VIATRA Query engine. 274 * Initializes the pattern matcher within an existing VIATRA Query engine.
@@ -280,12 +284,12 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
280 284
281 /** 285 /**
282 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. 286 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
283 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 287 * @param pA the fixed value of pattern parameter a, or null if not bound.
284 * @return matches represented as a Match object. 288 * @return matches represented as a Match object.
285 * 289 *
286 */ 290 */
287 public Collection<VLSOr.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 291 public Collection<LoopInInheritence.Match> getAllMatches(final EClass pA) {
288 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); 292 return rawStreamAllMatches(new Object[]{pA}).collect(Collectors.toSet());
289 } 293 }
290 294
291 /** 295 /**
@@ -294,101 +298,101 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
294 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. 298 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
295 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. 299 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
296 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. 300 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
297 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 301 * @param pA the fixed value of pattern parameter a, or null if not bound.
298 * @return a stream of matches represented as a Match object. 302 * @return a stream of matches represented as a Match object.
299 * 303 *
300 */ 304 */
301 public Stream<VLSOr.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 305 public Stream<LoopInInheritence.Match> streamAllMatches(final EClass pA) {
302 return rawStreamAllMatches(new Object[]{pTerm}); 306 return rawStreamAllMatches(new Object[]{pA});
303 } 307 }
304 308
305 /** 309 /**
306 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. 310 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
307 * Neither determinism nor randomness of selection is guaranteed. 311 * Neither determinism nor randomness of selection is guaranteed.
308 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 312 * @param pA the fixed value of pattern parameter a, or null if not bound.
309 * @return a match represented as a Match object, or null if no match is found. 313 * @return a match represented as a Match object, or null if no match is found.
310 * 314 *
311 */ 315 */
312 public Optional<VLSOr.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 316 public Optional<LoopInInheritence.Match> getOneArbitraryMatch(final EClass pA) {
313 return rawGetOneArbitraryMatch(new Object[]{pTerm}); 317 return rawGetOneArbitraryMatch(new Object[]{pA});
314 } 318 }
315 319
316 /** 320 /**
317 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, 321 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
318 * under any possible substitution of the unspecified parameters (if any). 322 * under any possible substitution of the unspecified parameters (if any).
319 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 323 * @param pA the fixed value of pattern parameter a, or null if not bound.
320 * @return true if the input is a valid (partial) match of the pattern. 324 * @return true if the input is a valid (partial) match of the pattern.
321 * 325 *
322 */ 326 */
323 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 327 public boolean hasMatch(final EClass pA) {
324 return rawHasMatch(new Object[]{pTerm}); 328 return rawHasMatch(new Object[]{pA});
325 } 329 }
326 330
327 /** 331 /**
328 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. 332 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
329 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 333 * @param pA the fixed value of pattern parameter a, or null if not bound.
330 * @return the number of pattern matches found. 334 * @return the number of pattern matches found.
331 * 335 *
332 */ 336 */
333 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 337 public int countMatches(final EClass pA) {
334 return rawCountMatches(new Object[]{pTerm}); 338 return rawCountMatches(new Object[]{pA});
335 } 339 }
336 340
337 /** 341 /**
338 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. 342 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
339 * Neither determinism nor randomness of selection is guaranteed. 343 * Neither determinism nor randomness of selection is guaranteed.
340 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 344 * @param pA the fixed value of pattern parameter a, or null if not bound.
341 * @param processor the action that will process the selected match. 345 * @param processor the action that will process the selected match.
342 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked 346 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
343 * 347 *
344 */ 348 */
345 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm, final Consumer<? super VLSOr.Match> processor) { 349 public boolean forOneArbitraryMatch(final EClass pA, final Consumer<? super LoopInInheritence.Match> processor) {
346 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); 350 return rawForOneArbitraryMatch(new Object[]{pA}, processor);
347 } 351 }
348 352
349 /** 353 /**
350 * Returns a new (partial) match. 354 * Returns a new (partial) match.
351 * This can be used e.g. to call the matcher with a partial match. 355 * This can be used e.g. to call the matcher with a partial match.
352 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. 356 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
353 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 357 * @param pA the fixed value of pattern parameter a, or null if not bound.
354 * @return the (partial) match object. 358 * @return the (partial) match object.
355 * 359 *
356 */ 360 */
357 public VLSOr.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) { 361 public LoopInInheritence.Match newMatch(final EClass pA) {
358 return VLSOr.Match.newMatch(pTerm); 362 return LoopInInheritence.Match.newMatch(pA);
359 } 363 }
360 364
361 /** 365 /**
362 * Retrieve the set of values that occur in matches for term. 366 * Retrieve the set of values that occur in matches for a.
363 * @return the Set of all values or empty set if there are no matches 367 * @return the Set of all values or empty set if there are no matches
364 * 368 *
365 */ 369 */
366 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr> rawStreamAllValuesOfterm(final Object[] parameters) { 370 protected Stream<EClass> rawStreamAllValuesOfa(final Object[] parameters) {
367 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr.class::cast); 371 return rawStreamAllValues(POSITION_A, parameters).map(EClass.class::cast);
368 } 372 }
369 373
370 /** 374 /**
371 * Retrieve the set of values that occur in matches for term. 375 * Retrieve the set of values that occur in matches for a.
372 * @return the Set of all values or empty set if there are no matches 376 * @return the Set of all values or empty set if there are no matches
373 * 377 *
374 */ 378 */
375 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr> getAllValuesOfterm() { 379 public Set<EClass> getAllValuesOfa() {
376 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); 380 return rawStreamAllValuesOfa(emptyArray()).collect(Collectors.toSet());
377 } 381 }
378 382
379 /** 383 /**
380 * Retrieve the set of values that occur in matches for term. 384 * Retrieve the set of values that occur in matches for a.
381 * @return the Set of all values or empty set if there are no matches 385 * @return the Set of all values or empty set if there are no matches
382 * 386 *
383 */ 387 */
384 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr> streamAllValuesOfterm() { 388 public Stream<EClass> streamAllValuesOfa() {
385 return rawStreamAllValuesOfterm(emptyArray()); 389 return rawStreamAllValuesOfa(emptyArray());
386 } 390 }
387 391
388 @Override 392 @Override
389 protected VLSOr.Match tupleToMatch(final Tuple t) { 393 protected LoopInInheritence.Match tupleToMatch(final Tuple t) {
390 try { 394 try {
391 return VLSOr.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) t.get(POSITION_TERM)); 395 return LoopInInheritence.Match.newMatch((EClass) t.get(POSITION_A));
392 } catch(ClassCastException e) { 396 } catch(ClassCastException e) {
393 LOGGER.error("Element(s) in tuple not properly typed!",e); 397 LOGGER.error("Element(s) in tuple not properly typed!",e);
394 return null; 398 return null;
@@ -396,9 +400,9 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
396 } 400 }
397 401
398 @Override 402 @Override
399 protected VLSOr.Match arrayToMatch(final Object[] match) { 403 protected LoopInInheritence.Match arrayToMatch(final Object[] match) {
400 try { 404 try {
401 return VLSOr.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) match[POSITION_TERM]); 405 return LoopInInheritence.Match.newMatch((EClass) match[POSITION_A]);
402 } catch(ClassCastException e) { 406 } catch(ClassCastException e) {
403 LOGGER.error("Element(s) in array not properly typed!",e); 407 LOGGER.error("Element(s) in array not properly typed!",e);
404 return null; 408 return null;
@@ -406,9 +410,9 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
406 } 410 }
407 411
408 @Override 412 @Override
409 protected VLSOr.Match arrayToMatchMutable(final Object[] match) { 413 protected LoopInInheritence.Match arrayToMatchMutable(final Object[] match) {
410 try { 414 try {
411 return VLSOr.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) match[POSITION_TERM]); 415 return LoopInInheritence.Match.newMutableMatch((EClass) match[POSITION_A]);
412 } catch(ClassCastException e) { 416 } catch(ClassCastException e) {
413 LOGGER.error("Element(s) in array not properly typed!",e); 417 LOGGER.error("Element(s) in array not properly typed!",e);
414 return null; 418 return null;
@@ -420,12 +424,12 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
420 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded 424 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
421 * 425 *
422 */ 426 */
423 public static IQuerySpecification<VLSOr.Matcher> querySpecification() { 427 public static IQuerySpecification<LoopInInheritence.Matcher> querySpecification() {
424 return VLSOr.instance(); 428 return LoopInInheritence.instance();
425 } 429 }
426 } 430 }
427 431
428 private VLSOr() { 432 private LoopInInheritence() {
429 super(GeneratedPQuery.INSTANCE); 433 super(GeneratedPQuery.INSTANCE);
430 } 434 }
431 435
@@ -434,7 +438,7 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
434 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded 438 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
435 * 439 *
436 */ 440 */
437 public static VLSOr instance() { 441 public static LoopInInheritence instance() {
438 try{ 442 try{
439 return LazyHolder.INSTANCE; 443 return LazyHolder.INSTANCE;
440 } catch (ExceptionInInitializerError err) { 444 } catch (ExceptionInInitializerError err) {
@@ -443,35 +447,35 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
443 } 447 }
444 448
445 @Override 449 @Override
446 protected VLSOr.Matcher instantiate(final ViatraQueryEngine engine) { 450 protected LoopInInheritence.Matcher instantiate(final ViatraQueryEngine engine) {
447 return VLSOr.Matcher.on(engine); 451 return LoopInInheritence.Matcher.on(engine);
448 } 452 }
449 453
450 @Override 454 @Override
451 public VLSOr.Matcher instantiate() { 455 public LoopInInheritence.Matcher instantiate() {
452 return VLSOr.Matcher.create(); 456 return LoopInInheritence.Matcher.create();
453 } 457 }
454 458
455 @Override 459 @Override
456 public VLSOr.Match newEmptyMatch() { 460 public LoopInInheritence.Match newEmptyMatch() {
457 return VLSOr.Match.newEmptyMatch(); 461 return LoopInInheritence.Match.newEmptyMatch();
458 } 462 }
459 463
460 @Override 464 @Override
461 public VLSOr.Match newMatch(final Object... parameters) { 465 public LoopInInheritence.Match newMatch(final Object... parameters) {
462 return VLSOr.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) parameters[0]); 466 return LoopInInheritence.Match.newMatch((org.eclipse.emf.ecore.EClass) parameters[0]);
463 } 467 }
464 468
465 /** 469 /**
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created 470 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.LoopInInheritence (visibility: PUBLIC, simpleName: LoopInInheritence, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.LoopInInheritence, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
467 * <b>not</b> at the class load time of the outer class, 471 * <b>not</b> at the class load time of the outer class,
468 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. 472 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.LoopInInheritence (visibility: PUBLIC, simpleName: LoopInInheritence, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.LoopInInheritence, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
469 * 473 *
470 * <p> This workaround is required e.g. to support recursion. 474 * <p> This workaround is required e.g. to support recursion.
471 * 475 *
472 */ 476 */
473 private static class LazyHolder { 477 private static class LazyHolder {
474 private final static VLSOr INSTANCE = new VLSOr(); 478 private final static LoopInInheritence INSTANCE = new LoopInInheritence();
475 479
476 /** 480 /**
477 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. 481 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
@@ -489,11 +493,11 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
489 } 493 }
490 494
491 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { 495 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
492 private final static VLSOr.GeneratedPQuery INSTANCE = new GeneratedPQuery(); 496 private final static LoopInInheritence.GeneratedPQuery INSTANCE = new GeneratedPQuery();
493 497
494 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); 498 private final PParameter parameter_a = new PParameter("a", "org.eclipse.emf.ecore.EClass", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EClass")), PParameterDirection.INOUT);
495 499
496 private final List<PParameter> parameters = Arrays.asList(parameter_term); 500 private final List<PParameter> parameters = Arrays.asList(parameter_a);
497 501
498 private GeneratedPQuery() { 502 private GeneratedPQuery() {
499 super(PVisibility.PUBLIC); 503 super(PVisibility.PUBLIC);
@@ -501,12 +505,12 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
501 505
502 @Override 506 @Override
503 public String getFullyQualifiedName() { 507 public String getFullyQualifiedName() {
504 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr"; 508 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.loopInInheritence";
505 } 509 }
506 510
507 @Override 511 @Override
508 public List<String> getParameterNames() { 512 public List<String> getParameterNames() {
509 return Arrays.asList("term"); 513 return Arrays.asList("a");
510 } 514 }
511 515
512 @Override 516 @Override
@@ -520,15 +524,24 @@ public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matche
520 Set<PBody> bodies = new LinkedHashSet<>(); 524 Set<PBody> bodies = new LinkedHashSet<>();
521 { 525 {
522 PBody body = new PBody(this); 526 PBody body = new PBody(this);
523 PVariable var_term = body.getOrCreateVariableByName("term"); 527 PVariable var_a = body.getOrCreateVariableByName("a");
524 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSOr"))); 528 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
525 body.setSymbolicParameters(Arrays.<ExportedParameter>asList( 529 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
526 new ExportedParameter(body, var_term, parameter_term) 530 new ExportedParameter(body, var_a, parameter_a)
527 )); 531 ));
528 // VLSOr(term) 532 // find directSupertype+(a,a)
529 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSOr"))); 533 new BinaryTransitiveClosure(body, Tuples.flatTupleOf(var_a, var_a), DirectSupertype.instance().getInternalQueryRepresentation());
530 bodies.add(body); 534 bodies.add(body);
531 } 535 }
536 {
537 PAnnotation annotation = new PAnnotation("Constraint");
538 annotation.addAttribute("key", Arrays.asList(new Object[] {
539 new ParameterReference("a")
540 }));
541 annotation.addAttribute("severity", "error");
542 annotation.addAttribute("message", "error");
543 addAnnotation(annotation);
544 }
532 return bodies; 545 return bodies;
533 } 546 }
534 } 547 }
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/NonSymmetricOpposite.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/NonSymmetricOpposite.java
new file mode 100644
index 00000000..5b24ef84
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/NonSymmetricOpposite.java
@@ -0,0 +1,707 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.alloyexamples;
5
6import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Opposite;
7import java.util.Arrays;
8import java.util.Collection;
9import java.util.LinkedHashSet;
10import java.util.List;
11import java.util.Objects;
12import java.util.Optional;
13import java.util.Set;
14import java.util.function.Consumer;
15import java.util.stream.Collectors;
16import java.util.stream.Stream;
17import org.apache.log4j.Logger;
18import org.eclipse.emf.ecore.EClass;
19import org.eclipse.emf.ecore.EReference;
20import org.eclipse.viatra.query.runtime.api.IPatternMatch;
21import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
22import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
23import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
24import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
25import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
26import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
27import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
28import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
29import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
30import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
31import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
32import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
34import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
35import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
36import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
37import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
38import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
39import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
40import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
41import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
42import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
43
44/**
45 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
46 *
47 * <p>Original source:
48 * <code><pre>
49 * {@literal @}Constraint(key={a}, severity="error", message="error")
50 * pattern nonSymmetricOpposite(a:EReference, b:EReference) {
51 * find opposite(a,b);
52 * neg find opposite(b,a);
53 * }
54 * </pre></code>
55 *
56 * @see Matcher
57 * @see Match
58 *
59 */
60@SuppressWarnings("all")
61public final class NonSymmetricOpposite extends BaseGeneratedEMFQuerySpecification<NonSymmetricOpposite.Matcher> {
62 /**
63 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.nonSymmetricOpposite pattern,
64 * to be used in conjunction with {@link Matcher}.
65 *
66 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
67 * Each instance is a (possibly partial) substitution of pattern parameters,
68 * usable to represent a match of the pattern in the result of a query,
69 * or to specify the bound (fixed) input parameters when issuing a query.
70 *
71 * @see Matcher
72 *
73 */
74 public static abstract class Match extends BasePatternMatch {
75 private EReference fA;
76
77 private EReference fB;
78
79 private static List<String> parameterNames = makeImmutableList("a", "b");
80
81 private Match(final EReference pA, final EReference pB) {
82 this.fA = pA;
83 this.fB = pB;
84 }
85
86 @Override
87 public Object get(final String parameterName) {
88 if ("a".equals(parameterName)) return this.fA;
89 if ("b".equals(parameterName)) return this.fB;
90 return null;
91 }
92
93 public EReference getA() {
94 return this.fA;
95 }
96
97 public EReference getB() {
98 return this.fB;
99 }
100
101 @Override
102 public boolean set(final String parameterName, final Object newValue) {
103 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
104 if ("a".equals(parameterName) ) {
105 this.fA = (EReference) newValue;
106 return true;
107 }
108 if ("b".equals(parameterName) ) {
109 this.fB = (EReference) newValue;
110 return true;
111 }
112 return false;
113 }
114
115 public void setA(final EReference pA) {
116 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
117 this.fA = pA;
118 }
119
120 public void setB(final EReference pB) {
121 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
122 this.fB = pB;
123 }
124
125 @Override
126 public String patternName() {
127 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.nonSymmetricOpposite";
128 }
129
130 @Override
131 public List<String> parameterNames() {
132 return NonSymmetricOpposite.Match.parameterNames;
133 }
134
135 @Override
136 public Object[] toArray() {
137 return new Object[]{fA, fB};
138 }
139
140 @Override
141 public NonSymmetricOpposite.Match toImmutable() {
142 return isMutable() ? newMatch(fA, fB) : this;
143 }
144
145 @Override
146 public String prettyPrint() {
147 StringBuilder result = new StringBuilder();
148 result.append("\"a\"=" + prettyPrintValue(fA) + ", ");
149 result.append("\"b\"=" + prettyPrintValue(fB));
150 return result.toString();
151 }
152
153 @Override
154 public int hashCode() {
155 return Objects.hash(fA, fB);
156 }
157
158 @Override
159 public boolean equals(final Object obj) {
160 if (this == obj)
161 return true;
162 if (obj == null) {
163 return false;
164 }
165 if ((obj instanceof NonSymmetricOpposite.Match)) {
166 NonSymmetricOpposite.Match other = (NonSymmetricOpposite.Match) obj;
167 return Objects.equals(fA, other.fA) && Objects.equals(fB, other.fB);
168 } else {
169 // this should be infrequent
170 if (!(obj instanceof IPatternMatch)) {
171 return false;
172 }
173 IPatternMatch otherSig = (IPatternMatch) obj;
174 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
175 }
176 }
177
178 @Override
179 public NonSymmetricOpposite specification() {
180 return NonSymmetricOpposite.instance();
181 }
182
183 /**
184 * Returns an empty, mutable match.
185 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
186 *
187 * @return the empty match.
188 *
189 */
190 public static NonSymmetricOpposite.Match newEmptyMatch() {
191 return new Mutable(null, null);
192 }
193
194 /**
195 * Returns a mutable (partial) match.
196 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
197 *
198 * @param pA the fixed value of pattern parameter a, or null if not bound.
199 * @param pB the fixed value of pattern parameter b, or null if not bound.
200 * @return the new, mutable (partial) match object.
201 *
202 */
203 public static NonSymmetricOpposite.Match newMutableMatch(final EReference pA, final EReference pB) {
204 return new Mutable(pA, pB);
205 }
206
207 /**
208 * Returns a new (partial) match.
209 * This can be used e.g. to call the matcher with a partial match.
210 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
211 * @param pA the fixed value of pattern parameter a, or null if not bound.
212 * @param pB the fixed value of pattern parameter b, or null if not bound.
213 * @return the (partial) match object.
214 *
215 */
216 public static NonSymmetricOpposite.Match newMatch(final EReference pA, final EReference pB) {
217 return new Immutable(pA, pB);
218 }
219
220 private static final class Mutable extends NonSymmetricOpposite.Match {
221 Mutable(final EReference pA, final EReference pB) {
222 super(pA, pB);
223 }
224
225 @Override
226 public boolean isMutable() {
227 return true;
228 }
229 }
230
231 private static final class Immutable extends NonSymmetricOpposite.Match {
232 Immutable(final EReference pA, final EReference pB) {
233 super(pA, pB);
234 }
235
236 @Override
237 public boolean isMutable() {
238 return false;
239 }
240 }
241 }
242
243 /**
244 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.nonSymmetricOpposite pattern,
245 * providing pattern-specific query methods.
246 *
247 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
248 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
249 *
250 * <p>Matches of the pattern will be represented as {@link Match}.
251 *
252 * <p>Original source:
253 * <code><pre>
254 * {@literal @}Constraint(key={a}, severity="error", message="error")
255 * pattern nonSymmetricOpposite(a:EReference, b:EReference) {
256 * find opposite(a,b);
257 * neg find opposite(b,a);
258 * }
259 * </pre></code>
260 *
261 * @see Match
262 * @see NonSymmetricOpposite
263 *
264 */
265 public static class Matcher extends BaseMatcher<NonSymmetricOpposite.Match> {
266 /**
267 * Initializes the pattern matcher within an existing VIATRA Query engine.
268 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
269 *
270 * @param engine the existing VIATRA Query engine in which this matcher will be created.
271 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
272 *
273 */
274 public static NonSymmetricOpposite.Matcher on(final ViatraQueryEngine engine) {
275 // check if matcher already exists
276 Matcher matcher = engine.getExistingMatcher(querySpecification());
277 if (matcher == null) {
278 matcher = (Matcher)engine.getMatcher(querySpecification());
279 }
280 return matcher;
281 }
282
283 /**
284 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
285 * @return an initialized matcher
286 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
287 *
288 */
289 public static NonSymmetricOpposite.Matcher create() {
290 return new Matcher();
291 }
292
293 private final static int POSITION_A = 0;
294
295 private final static int POSITION_B = 1;
296
297 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(NonSymmetricOpposite.Matcher.class);
298
299 /**
300 * Initializes the pattern matcher within an existing VIATRA Query engine.
301 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
302 *
303 * @param engine the existing VIATRA Query engine in which this matcher will be created.
304 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
305 *
306 */
307 private Matcher() {
308 super(querySpecification());
309 }
310
311 /**
312 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
313 * @param pA the fixed value of pattern parameter a, or null if not bound.
314 * @param pB the fixed value of pattern parameter b, or null if not bound.
315 * @return matches represented as a Match object.
316 *
317 */
318 public Collection<NonSymmetricOpposite.Match> getAllMatches(final EReference pA, final EReference pB) {
319 return rawStreamAllMatches(new Object[]{pA, pB}).collect(Collectors.toSet());
320 }
321
322 /**
323 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
324 * </p>
325 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
326 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
327 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
328 * @param pA the fixed value of pattern parameter a, or null if not bound.
329 * @param pB the fixed value of pattern parameter b, or null if not bound.
330 * @return a stream of matches represented as a Match object.
331 *
332 */
333 public Stream<NonSymmetricOpposite.Match> streamAllMatches(final EReference pA, final EReference pB) {
334 return rawStreamAllMatches(new Object[]{pA, pB});
335 }
336
337 /**
338 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
339 * Neither determinism nor randomness of selection is guaranteed.
340 * @param pA the fixed value of pattern parameter a, or null if not bound.
341 * @param pB the fixed value of pattern parameter b, or null if not bound.
342 * @return a match represented as a Match object, or null if no match is found.
343 *
344 */
345 public Optional<NonSymmetricOpposite.Match> getOneArbitraryMatch(final EReference pA, final EReference pB) {
346 return rawGetOneArbitraryMatch(new Object[]{pA, pB});
347 }
348
349 /**
350 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
351 * under any possible substitution of the unspecified parameters (if any).
352 * @param pA the fixed value of pattern parameter a, or null if not bound.
353 * @param pB the fixed value of pattern parameter b, or null if not bound.
354 * @return true if the input is a valid (partial) match of the pattern.
355 *
356 */
357 public boolean hasMatch(final EReference pA, final EReference pB) {
358 return rawHasMatch(new Object[]{pA, pB});
359 }
360
361 /**
362 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
363 * @param pA the fixed value of pattern parameter a, or null if not bound.
364 * @param pB the fixed value of pattern parameter b, or null if not bound.
365 * @return the number of pattern matches found.
366 *
367 */
368 public int countMatches(final EReference pA, final EReference pB) {
369 return rawCountMatches(new Object[]{pA, pB});
370 }
371
372 /**
373 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
374 * Neither determinism nor randomness of selection is guaranteed.
375 * @param pA the fixed value of pattern parameter a, or null if not bound.
376 * @param pB the fixed value of pattern parameter b, or null if not bound.
377 * @param processor the action that will process the selected match.
378 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
379 *
380 */
381 public boolean forOneArbitraryMatch(final EReference pA, final EReference pB, final Consumer<? super NonSymmetricOpposite.Match> processor) {
382 return rawForOneArbitraryMatch(new Object[]{pA, pB}, processor);
383 }
384
385 /**
386 * Returns a new (partial) match.
387 * This can be used e.g. to call the matcher with a partial match.
388 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
389 * @param pA the fixed value of pattern parameter a, or null if not bound.
390 * @param pB the fixed value of pattern parameter b, or null if not bound.
391 * @return the (partial) match object.
392 *
393 */
394 public NonSymmetricOpposite.Match newMatch(final EReference pA, final EReference pB) {
395 return NonSymmetricOpposite.Match.newMatch(pA, pB);
396 }
397
398 /**
399 * Retrieve the set of values that occur in matches for a.
400 * @return the Set of all values or empty set if there are no matches
401 *
402 */
403 protected Stream<EReference> rawStreamAllValuesOfa(final Object[] parameters) {
404 return rawStreamAllValues(POSITION_A, parameters).map(EReference.class::cast);
405 }
406
407 /**
408 * Retrieve the set of values that occur in matches for a.
409 * @return the Set of all values or empty set if there are no matches
410 *
411 */
412 public Set<EReference> getAllValuesOfa() {
413 return rawStreamAllValuesOfa(emptyArray()).collect(Collectors.toSet());
414 }
415
416 /**
417 * Retrieve the set of values that occur in matches for a.
418 * @return the Set of all values or empty set if there are no matches
419 *
420 */
421 public Stream<EReference> streamAllValuesOfa() {
422 return rawStreamAllValuesOfa(emptyArray());
423 }
424
425 /**
426 * Retrieve the set of values that occur in matches for a.
427 * </p>
428 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
429 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
430 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
431 *
432 * @return the Stream of all values or empty set if there are no matches
433 *
434 */
435 public Stream<EReference> streamAllValuesOfa(final NonSymmetricOpposite.Match partialMatch) {
436 return rawStreamAllValuesOfa(partialMatch.toArray());
437 }
438
439 /**
440 * Retrieve the set of values that occur in matches for a.
441 * </p>
442 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
443 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
444 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
445 *
446 * @return the Stream of all values or empty set if there are no matches
447 *
448 */
449 public Stream<EReference> streamAllValuesOfa(final EReference pB) {
450 return rawStreamAllValuesOfa(new Object[]{null, pB});
451 }
452
453 /**
454 * Retrieve the set of values that occur in matches for a.
455 * @return the Set of all values or empty set if there are no matches
456 *
457 */
458 public Set<EReference> getAllValuesOfa(final NonSymmetricOpposite.Match partialMatch) {
459 return rawStreamAllValuesOfa(partialMatch.toArray()).collect(Collectors.toSet());
460 }
461
462 /**
463 * Retrieve the set of values that occur in matches for a.
464 * @return the Set of all values or empty set if there are no matches
465 *
466 */
467 public Set<EReference> getAllValuesOfa(final EReference pB) {
468 return rawStreamAllValuesOfa(new Object[]{null, pB}).collect(Collectors.toSet());
469 }
470
471 /**
472 * Retrieve the set of values that occur in matches for b.
473 * @return the Set of all values or empty set if there are no matches
474 *
475 */
476 protected Stream<EReference> rawStreamAllValuesOfb(final Object[] parameters) {
477 return rawStreamAllValues(POSITION_B, parameters).map(EReference.class::cast);
478 }
479
480 /**
481 * Retrieve the set of values that occur in matches for b.
482 * @return the Set of all values or empty set if there are no matches
483 *
484 */
485 public Set<EReference> getAllValuesOfb() {
486 return rawStreamAllValuesOfb(emptyArray()).collect(Collectors.toSet());
487 }
488
489 /**
490 * Retrieve the set of values that occur in matches for b.
491 * @return the Set of all values or empty set if there are no matches
492 *
493 */
494 public Stream<EReference> streamAllValuesOfb() {
495 return rawStreamAllValuesOfb(emptyArray());
496 }
497
498 /**
499 * Retrieve the set of values that occur in matches for b.
500 * </p>
501 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
502 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
503 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
504 *
505 * @return the Stream of all values or empty set if there are no matches
506 *
507 */
508 public Stream<EReference> streamAllValuesOfb(final NonSymmetricOpposite.Match partialMatch) {
509 return rawStreamAllValuesOfb(partialMatch.toArray());
510 }
511
512 /**
513 * Retrieve the set of values that occur in matches for b.
514 * </p>
515 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
516 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
517 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
518 *
519 * @return the Stream of all values or empty set if there are no matches
520 *
521 */
522 public Stream<EReference> streamAllValuesOfb(final EReference pA) {
523 return rawStreamAllValuesOfb(new Object[]{pA, null});
524 }
525
526 /**
527 * Retrieve the set of values that occur in matches for b.
528 * @return the Set of all values or empty set if there are no matches
529 *
530 */
531 public Set<EReference> getAllValuesOfb(final NonSymmetricOpposite.Match partialMatch) {
532 return rawStreamAllValuesOfb(partialMatch.toArray()).collect(Collectors.toSet());
533 }
534
535 /**
536 * Retrieve the set of values that occur in matches for b.
537 * @return the Set of all values or empty set if there are no matches
538 *
539 */
540 public Set<EReference> getAllValuesOfb(final EReference pA) {
541 return rawStreamAllValuesOfb(new Object[]{pA, null}).collect(Collectors.toSet());
542 }
543
544 @Override
545 protected NonSymmetricOpposite.Match tupleToMatch(final Tuple t) {
546 try {
547 return NonSymmetricOpposite.Match.newMatch((EReference) t.get(POSITION_A), (EReference) t.get(POSITION_B));
548 } catch(ClassCastException e) {
549 LOGGER.error("Element(s) in tuple not properly typed!",e);
550 return null;
551 }
552 }
553
554 @Override
555 protected NonSymmetricOpposite.Match arrayToMatch(final Object[] match) {
556 try {
557 return NonSymmetricOpposite.Match.newMatch((EReference) match[POSITION_A], (EReference) match[POSITION_B]);
558 } catch(ClassCastException e) {
559 LOGGER.error("Element(s) in array not properly typed!",e);
560 return null;
561 }
562 }
563
564 @Override
565 protected NonSymmetricOpposite.Match arrayToMatchMutable(final Object[] match) {
566 try {
567 return NonSymmetricOpposite.Match.newMutableMatch((EReference) match[POSITION_A], (EReference) match[POSITION_B]);
568 } catch(ClassCastException e) {
569 LOGGER.error("Element(s) in array not properly typed!",e);
570 return null;
571 }
572 }
573
574 /**
575 * @return the singleton instance of the query specification of this pattern
576 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
577 *
578 */
579 public static IQuerySpecification<NonSymmetricOpposite.Matcher> querySpecification() {
580 return NonSymmetricOpposite.instance();
581 }
582 }
583
584 private NonSymmetricOpposite() {
585 super(GeneratedPQuery.INSTANCE);
586 }
587
588 /**
589 * @return the singleton instance of the query specification
590 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
591 *
592 */
593 public static NonSymmetricOpposite instance() {
594 try{
595 return LazyHolder.INSTANCE;
596 } catch (ExceptionInInitializerError err) {
597 throw processInitializerError(err);
598 }
599 }
600
601 @Override
602 protected NonSymmetricOpposite.Matcher instantiate(final ViatraQueryEngine engine) {
603 return NonSymmetricOpposite.Matcher.on(engine);
604 }
605
606 @Override
607 public NonSymmetricOpposite.Matcher instantiate() {
608 return NonSymmetricOpposite.Matcher.create();
609 }
610
611 @Override
612 public NonSymmetricOpposite.Match newEmptyMatch() {
613 return NonSymmetricOpposite.Match.newEmptyMatch();
614 }
615
616 @Override
617 public NonSymmetricOpposite.Match newMatch(final Object... parameters) {
618 return NonSymmetricOpposite.Match.newMatch((org.eclipse.emf.ecore.EReference) parameters[0], (org.eclipse.emf.ecore.EReference) parameters[1]);
619 }
620
621 /**
622 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.NonSymmetricOpposite (visibility: PUBLIC, simpleName: NonSymmetricOpposite, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.NonSymmetricOpposite, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
623 * <b>not</b> at the class load time of the outer class,
624 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.NonSymmetricOpposite (visibility: PUBLIC, simpleName: NonSymmetricOpposite, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.NonSymmetricOpposite, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
625 *
626 * <p> This workaround is required e.g. to support recursion.
627 *
628 */
629 private static class LazyHolder {
630 private final static NonSymmetricOpposite INSTANCE = new NonSymmetricOpposite();
631
632 /**
633 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
634 * This initialization order is required to support indirect recursion.
635 *
636 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
637 *
638 */
639 private final static Object STATIC_INITIALIZER = ensureInitialized();
640
641 public static Object ensureInitialized() {
642 INSTANCE.ensureInitializedInternal();
643 return null;
644 }
645 }
646
647 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
648 private final static NonSymmetricOpposite.GeneratedPQuery INSTANCE = new GeneratedPQuery();
649
650 private final PParameter parameter_a = new PParameter("a", "org.eclipse.emf.ecore.EReference", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EReference")), PParameterDirection.INOUT);
651
652 private final PParameter parameter_b = new PParameter("b", "org.eclipse.emf.ecore.EReference", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EReference")), PParameterDirection.INOUT);
653
654 private final List<PParameter> parameters = Arrays.asList(parameter_a, parameter_b);
655
656 private GeneratedPQuery() {
657 super(PVisibility.PUBLIC);
658 }
659
660 @Override
661 public String getFullyQualifiedName() {
662 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.nonSymmetricOpposite";
663 }
664
665 @Override
666 public List<String> getParameterNames() {
667 return Arrays.asList("a","b");
668 }
669
670 @Override
671 public List<PParameter> getParameters() {
672 return parameters;
673 }
674
675 @Override
676 public Set<PBody> doGetContainedBodies() {
677 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
678 Set<PBody> bodies = new LinkedHashSet<>();
679 {
680 PBody body = new PBody(this);
681 PVariable var_a = body.getOrCreateVariableByName("a");
682 PVariable var_b = body.getOrCreateVariableByName("b");
683 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
684 new TypeConstraint(body, Tuples.flatTupleOf(var_b), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
685 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
686 new ExportedParameter(body, var_a, parameter_a),
687 new ExportedParameter(body, var_b, parameter_b)
688 ));
689 // find opposite(a,b)
690 new PositivePatternCall(body, Tuples.flatTupleOf(var_a, var_b), Opposite.instance().getInternalQueryRepresentation());
691 // neg find opposite(b,a)
692 new NegativePatternCall(body, Tuples.flatTupleOf(var_b, var_a), Opposite.instance().getInternalQueryRepresentation());
693 bodies.add(body);
694 }
695 {
696 PAnnotation annotation = new PAnnotation("Constraint");
697 annotation.addAttribute("key", Arrays.asList(new Object[] {
698 new ParameterReference("a")
699 }));
700 annotation.addAttribute("severity", "error");
701 annotation.addAttribute("message", "error");
702 addAnnotation(annotation);
703 }
704 return bodies;
705 }
706 }
707}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Opposite.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Opposite.java
new file mode 100644
index 00000000..a8c3507d
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Opposite.java
@@ -0,0 +1,693 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.alloyexamples;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.emf.ecore.EReference;
19import org.eclipse.viatra.query.runtime.api.IPatternMatch;
20import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
21import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
23import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
24import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
25import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
26import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
27import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
28import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
29import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
30import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
31import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
34import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
37import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
38import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
39import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
40
41/**
42 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
43 *
44 * <p>Original source:
45 * <code><pre>
46 * pattern opposite(a:EReference, b: EReference) {
47 * EReference.eOpposite(a,b);
48 * }
49 * </pre></code>
50 *
51 * @see Matcher
52 * @see Match
53 *
54 */
55@SuppressWarnings("all")
56public final class Opposite extends BaseGeneratedEMFQuerySpecification<Opposite.Matcher> {
57 /**
58 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.opposite pattern,
59 * to be used in conjunction with {@link Matcher}.
60 *
61 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
62 * Each instance is a (possibly partial) substitution of pattern parameters,
63 * usable to represent a match of the pattern in the result of a query,
64 * or to specify the bound (fixed) input parameters when issuing a query.
65 *
66 * @see Matcher
67 *
68 */
69 public static abstract class Match extends BasePatternMatch {
70 private EReference fA;
71
72 private EReference fB;
73
74 private static List<String> parameterNames = makeImmutableList("a", "b");
75
76 private Match(final EReference pA, final EReference pB) {
77 this.fA = pA;
78 this.fB = pB;
79 }
80
81 @Override
82 public Object get(final String parameterName) {
83 if ("a".equals(parameterName)) return this.fA;
84 if ("b".equals(parameterName)) return this.fB;
85 return null;
86 }
87
88 public EReference getA() {
89 return this.fA;
90 }
91
92 public EReference getB() {
93 return this.fB;
94 }
95
96 @Override
97 public boolean set(final String parameterName, final Object newValue) {
98 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
99 if ("a".equals(parameterName) ) {
100 this.fA = (EReference) newValue;
101 return true;
102 }
103 if ("b".equals(parameterName) ) {
104 this.fB = (EReference) newValue;
105 return true;
106 }
107 return false;
108 }
109
110 public void setA(final EReference pA) {
111 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
112 this.fA = pA;
113 }
114
115 public void setB(final EReference pB) {
116 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
117 this.fB = pB;
118 }
119
120 @Override
121 public String patternName() {
122 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.opposite";
123 }
124
125 @Override
126 public List<String> parameterNames() {
127 return Opposite.Match.parameterNames;
128 }
129
130 @Override
131 public Object[] toArray() {
132 return new Object[]{fA, fB};
133 }
134
135 @Override
136 public Opposite.Match toImmutable() {
137 return isMutable() ? newMatch(fA, fB) : this;
138 }
139
140 @Override
141 public String prettyPrint() {
142 StringBuilder result = new StringBuilder();
143 result.append("\"a\"=" + prettyPrintValue(fA) + ", ");
144 result.append("\"b\"=" + prettyPrintValue(fB));
145 return result.toString();
146 }
147
148 @Override
149 public int hashCode() {
150 return Objects.hash(fA, fB);
151 }
152
153 @Override
154 public boolean equals(final Object obj) {
155 if (this == obj)
156 return true;
157 if (obj == null) {
158 return false;
159 }
160 if ((obj instanceof Opposite.Match)) {
161 Opposite.Match other = (Opposite.Match) obj;
162 return Objects.equals(fA, other.fA) && Objects.equals(fB, other.fB);
163 } else {
164 // this should be infrequent
165 if (!(obj instanceof IPatternMatch)) {
166 return false;
167 }
168 IPatternMatch otherSig = (IPatternMatch) obj;
169 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
170 }
171 }
172
173 @Override
174 public Opposite specification() {
175 return Opposite.instance();
176 }
177
178 /**
179 * Returns an empty, mutable match.
180 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
181 *
182 * @return the empty match.
183 *
184 */
185 public static Opposite.Match newEmptyMatch() {
186 return new Mutable(null, null);
187 }
188
189 /**
190 * Returns a mutable (partial) match.
191 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
192 *
193 * @param pA the fixed value of pattern parameter a, or null if not bound.
194 * @param pB the fixed value of pattern parameter b, or null if not bound.
195 * @return the new, mutable (partial) match object.
196 *
197 */
198 public static Opposite.Match newMutableMatch(final EReference pA, final EReference pB) {
199 return new Mutable(pA, pB);
200 }
201
202 /**
203 * Returns a new (partial) match.
204 * This can be used e.g. to call the matcher with a partial match.
205 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
206 * @param pA the fixed value of pattern parameter a, or null if not bound.
207 * @param pB the fixed value of pattern parameter b, or null if not bound.
208 * @return the (partial) match object.
209 *
210 */
211 public static Opposite.Match newMatch(final EReference pA, final EReference pB) {
212 return new Immutable(pA, pB);
213 }
214
215 private static final class Mutable extends Opposite.Match {
216 Mutable(final EReference pA, final EReference pB) {
217 super(pA, pB);
218 }
219
220 @Override
221 public boolean isMutable() {
222 return true;
223 }
224 }
225
226 private static final class Immutable extends Opposite.Match {
227 Immutable(final EReference pA, final EReference pB) {
228 super(pA, pB);
229 }
230
231 @Override
232 public boolean isMutable() {
233 return false;
234 }
235 }
236 }
237
238 /**
239 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.opposite pattern,
240 * providing pattern-specific query methods.
241 *
242 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
243 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
244 *
245 * <p>Matches of the pattern will be represented as {@link Match}.
246 *
247 * <p>Original source:
248 * <code><pre>
249 * pattern opposite(a:EReference, b: EReference) {
250 * EReference.eOpposite(a,b);
251 * }
252 * </pre></code>
253 *
254 * @see Match
255 * @see Opposite
256 *
257 */
258 public static class Matcher extends BaseMatcher<Opposite.Match> {
259 /**
260 * Initializes the pattern matcher within an existing VIATRA Query engine.
261 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
262 *
263 * @param engine the existing VIATRA Query engine in which this matcher will be created.
264 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
265 *
266 */
267 public static Opposite.Matcher on(final ViatraQueryEngine engine) {
268 // check if matcher already exists
269 Matcher matcher = engine.getExistingMatcher(querySpecification());
270 if (matcher == null) {
271 matcher = (Matcher)engine.getMatcher(querySpecification());
272 }
273 return matcher;
274 }
275
276 /**
277 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
278 * @return an initialized matcher
279 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
280 *
281 */
282 public static Opposite.Matcher create() {
283 return new Matcher();
284 }
285
286 private final static int POSITION_A = 0;
287
288 private final static int POSITION_B = 1;
289
290 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(Opposite.Matcher.class);
291
292 /**
293 * Initializes the pattern matcher within an existing VIATRA Query engine.
294 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
295 *
296 * @param engine the existing VIATRA Query engine in which this matcher will be created.
297 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
298 *
299 */
300 private Matcher() {
301 super(querySpecification());
302 }
303
304 /**
305 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
306 * @param pA the fixed value of pattern parameter a, or null if not bound.
307 * @param pB the fixed value of pattern parameter b, or null if not bound.
308 * @return matches represented as a Match object.
309 *
310 */
311 public Collection<Opposite.Match> getAllMatches(final EReference pA, final EReference pB) {
312 return rawStreamAllMatches(new Object[]{pA, pB}).collect(Collectors.toSet());
313 }
314
315 /**
316 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
317 * </p>
318 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
319 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
320 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
321 * @param pA the fixed value of pattern parameter a, or null if not bound.
322 * @param pB the fixed value of pattern parameter b, or null if not bound.
323 * @return a stream of matches represented as a Match object.
324 *
325 */
326 public Stream<Opposite.Match> streamAllMatches(final EReference pA, final EReference pB) {
327 return rawStreamAllMatches(new Object[]{pA, pB});
328 }
329
330 /**
331 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
332 * Neither determinism nor randomness of selection is guaranteed.
333 * @param pA the fixed value of pattern parameter a, or null if not bound.
334 * @param pB the fixed value of pattern parameter b, or null if not bound.
335 * @return a match represented as a Match object, or null if no match is found.
336 *
337 */
338 public Optional<Opposite.Match> getOneArbitraryMatch(final EReference pA, final EReference pB) {
339 return rawGetOneArbitraryMatch(new Object[]{pA, pB});
340 }
341
342 /**
343 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
344 * under any possible substitution of the unspecified parameters (if any).
345 * @param pA the fixed value of pattern parameter a, or null if not bound.
346 * @param pB the fixed value of pattern parameter b, or null if not bound.
347 * @return true if the input is a valid (partial) match of the pattern.
348 *
349 */
350 public boolean hasMatch(final EReference pA, final EReference pB) {
351 return rawHasMatch(new Object[]{pA, pB});
352 }
353
354 /**
355 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
356 * @param pA the fixed value of pattern parameter a, or null if not bound.
357 * @param pB the fixed value of pattern parameter b, or null if not bound.
358 * @return the number of pattern matches found.
359 *
360 */
361 public int countMatches(final EReference pA, final EReference pB) {
362 return rawCountMatches(new Object[]{pA, pB});
363 }
364
365 /**
366 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
367 * Neither determinism nor randomness of selection is guaranteed.
368 * @param pA the fixed value of pattern parameter a, or null if not bound.
369 * @param pB the fixed value of pattern parameter b, or null if not bound.
370 * @param processor the action that will process the selected match.
371 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
372 *
373 */
374 public boolean forOneArbitraryMatch(final EReference pA, final EReference pB, final Consumer<? super Opposite.Match> processor) {
375 return rawForOneArbitraryMatch(new Object[]{pA, pB}, processor);
376 }
377
378 /**
379 * Returns a new (partial) match.
380 * This can be used e.g. to call the matcher with a partial match.
381 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
382 * @param pA the fixed value of pattern parameter a, or null if not bound.
383 * @param pB the fixed value of pattern parameter b, or null if not bound.
384 * @return the (partial) match object.
385 *
386 */
387 public Opposite.Match newMatch(final EReference pA, final EReference pB) {
388 return Opposite.Match.newMatch(pA, pB);
389 }
390
391 /**
392 * Retrieve the set of values that occur in matches for a.
393 * @return the Set of all values or empty set if there are no matches
394 *
395 */
396 protected Stream<EReference> rawStreamAllValuesOfa(final Object[] parameters) {
397 return rawStreamAllValues(POSITION_A, parameters).map(EReference.class::cast);
398 }
399
400 /**
401 * Retrieve the set of values that occur in matches for a.
402 * @return the Set of all values or empty set if there are no matches
403 *
404 */
405 public Set<EReference> getAllValuesOfa() {
406 return rawStreamAllValuesOfa(emptyArray()).collect(Collectors.toSet());
407 }
408
409 /**
410 * Retrieve the set of values that occur in matches for a.
411 * @return the Set of all values or empty set if there are no matches
412 *
413 */
414 public Stream<EReference> streamAllValuesOfa() {
415 return rawStreamAllValuesOfa(emptyArray());
416 }
417
418 /**
419 * Retrieve the set of values that occur in matches for a.
420 * </p>
421 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
422 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
423 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
424 *
425 * @return the Stream of all values or empty set if there are no matches
426 *
427 */
428 public Stream<EReference> streamAllValuesOfa(final Opposite.Match partialMatch) {
429 return rawStreamAllValuesOfa(partialMatch.toArray());
430 }
431
432 /**
433 * Retrieve the set of values that occur in matches for a.
434 * </p>
435 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
436 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
437 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
438 *
439 * @return the Stream of all values or empty set if there are no matches
440 *
441 */
442 public Stream<EReference> streamAllValuesOfa(final EReference pB) {
443 return rawStreamAllValuesOfa(new Object[]{null, pB});
444 }
445
446 /**
447 * Retrieve the set of values that occur in matches for a.
448 * @return the Set of all values or empty set if there are no matches
449 *
450 */
451 public Set<EReference> getAllValuesOfa(final Opposite.Match partialMatch) {
452 return rawStreamAllValuesOfa(partialMatch.toArray()).collect(Collectors.toSet());
453 }
454
455 /**
456 * Retrieve the set of values that occur in matches for a.
457 * @return the Set of all values or empty set if there are no matches
458 *
459 */
460 public Set<EReference> getAllValuesOfa(final EReference pB) {
461 return rawStreamAllValuesOfa(new Object[]{null, pB}).collect(Collectors.toSet());
462 }
463
464 /**
465 * Retrieve the set of values that occur in matches for b.
466 * @return the Set of all values or empty set if there are no matches
467 *
468 */
469 protected Stream<EReference> rawStreamAllValuesOfb(final Object[] parameters) {
470 return rawStreamAllValues(POSITION_B, parameters).map(EReference.class::cast);
471 }
472
473 /**
474 * Retrieve the set of values that occur in matches for b.
475 * @return the Set of all values or empty set if there are no matches
476 *
477 */
478 public Set<EReference> getAllValuesOfb() {
479 return rawStreamAllValuesOfb(emptyArray()).collect(Collectors.toSet());
480 }
481
482 /**
483 * Retrieve the set of values that occur in matches for b.
484 * @return the Set of all values or empty set if there are no matches
485 *
486 */
487 public Stream<EReference> streamAllValuesOfb() {
488 return rawStreamAllValuesOfb(emptyArray());
489 }
490
491 /**
492 * Retrieve the set of values that occur in matches for b.
493 * </p>
494 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
495 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
496 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
497 *
498 * @return the Stream of all values or empty set if there are no matches
499 *
500 */
501 public Stream<EReference> streamAllValuesOfb(final Opposite.Match partialMatch) {
502 return rawStreamAllValuesOfb(partialMatch.toArray());
503 }
504
505 /**
506 * Retrieve the set of values that occur in matches for b.
507 * </p>
508 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
509 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
510 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
511 *
512 * @return the Stream of all values or empty set if there are no matches
513 *
514 */
515 public Stream<EReference> streamAllValuesOfb(final EReference pA) {
516 return rawStreamAllValuesOfb(new Object[]{pA, null});
517 }
518
519 /**
520 * Retrieve the set of values that occur in matches for b.
521 * @return the Set of all values or empty set if there are no matches
522 *
523 */
524 public Set<EReference> getAllValuesOfb(final Opposite.Match partialMatch) {
525 return rawStreamAllValuesOfb(partialMatch.toArray()).collect(Collectors.toSet());
526 }
527
528 /**
529 * Retrieve the set of values that occur in matches for b.
530 * @return the Set of all values or empty set if there are no matches
531 *
532 */
533 public Set<EReference> getAllValuesOfb(final EReference pA) {
534 return rawStreamAllValuesOfb(new Object[]{pA, null}).collect(Collectors.toSet());
535 }
536
537 @Override
538 protected Opposite.Match tupleToMatch(final Tuple t) {
539 try {
540 return Opposite.Match.newMatch((EReference) t.get(POSITION_A), (EReference) t.get(POSITION_B));
541 } catch(ClassCastException e) {
542 LOGGER.error("Element(s) in tuple not properly typed!",e);
543 return null;
544 }
545 }
546
547 @Override
548 protected Opposite.Match arrayToMatch(final Object[] match) {
549 try {
550 return Opposite.Match.newMatch((EReference) match[POSITION_A], (EReference) match[POSITION_B]);
551 } catch(ClassCastException e) {
552 LOGGER.error("Element(s) in array not properly typed!",e);
553 return null;
554 }
555 }
556
557 @Override
558 protected Opposite.Match arrayToMatchMutable(final Object[] match) {
559 try {
560 return Opposite.Match.newMutableMatch((EReference) match[POSITION_A], (EReference) match[POSITION_B]);
561 } catch(ClassCastException e) {
562 LOGGER.error("Element(s) in array not properly typed!",e);
563 return null;
564 }
565 }
566
567 /**
568 * @return the singleton instance of the query specification of this pattern
569 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
570 *
571 */
572 public static IQuerySpecification<Opposite.Matcher> querySpecification() {
573 return Opposite.instance();
574 }
575 }
576
577 private Opposite() {
578 super(GeneratedPQuery.INSTANCE);
579 }
580
581 /**
582 * @return the singleton instance of the query specification
583 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
584 *
585 */
586 public static Opposite instance() {
587 try{
588 return LazyHolder.INSTANCE;
589 } catch (ExceptionInInitializerError err) {
590 throw processInitializerError(err);
591 }
592 }
593
594 @Override
595 protected Opposite.Matcher instantiate(final ViatraQueryEngine engine) {
596 return Opposite.Matcher.on(engine);
597 }
598
599 @Override
600 public Opposite.Matcher instantiate() {
601 return Opposite.Matcher.create();
602 }
603
604 @Override
605 public Opposite.Match newEmptyMatch() {
606 return Opposite.Match.newEmptyMatch();
607 }
608
609 @Override
610 public Opposite.Match newMatch(final Object... parameters) {
611 return Opposite.Match.newMatch((org.eclipse.emf.ecore.EReference) parameters[0], (org.eclipse.emf.ecore.EReference) parameters[1]);
612 }
613
614 /**
615 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Opposite (visibility: PUBLIC, simpleName: Opposite, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Opposite, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
616 * <b>not</b> at the class load time of the outer class,
617 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Opposite (visibility: PUBLIC, simpleName: Opposite, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Opposite, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
618 *
619 * <p> This workaround is required e.g. to support recursion.
620 *
621 */
622 private static class LazyHolder {
623 private final static Opposite INSTANCE = new Opposite();
624
625 /**
626 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
627 * This initialization order is required to support indirect recursion.
628 *
629 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
630 *
631 */
632 private final static Object STATIC_INITIALIZER = ensureInitialized();
633
634 public static Object ensureInitialized() {
635 INSTANCE.ensureInitializedInternal();
636 return null;
637 }
638 }
639
640 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
641 private final static Opposite.GeneratedPQuery INSTANCE = new GeneratedPQuery();
642
643 private final PParameter parameter_a = new PParameter("a", "org.eclipse.emf.ecore.EReference", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EReference")), PParameterDirection.INOUT);
644
645 private final PParameter parameter_b = new PParameter("b", "org.eclipse.emf.ecore.EReference", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EReference")), PParameterDirection.INOUT);
646
647 private final List<PParameter> parameters = Arrays.asList(parameter_a, parameter_b);
648
649 private GeneratedPQuery() {
650 super(PVisibility.PUBLIC);
651 }
652
653 @Override
654 public String getFullyQualifiedName() {
655 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.opposite";
656 }
657
658 @Override
659 public List<String> getParameterNames() {
660 return Arrays.asList("a","b");
661 }
662
663 @Override
664 public List<PParameter> getParameters() {
665 return parameters;
666 }
667
668 @Override
669 public Set<PBody> doGetContainedBodies() {
670 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
671 Set<PBody> bodies = new LinkedHashSet<>();
672 {
673 PBody body = new PBody(this);
674 PVariable var_a = body.getOrCreateVariableByName("a");
675 PVariable var_b = body.getOrCreateVariableByName("b");
676 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
677 new TypeConstraint(body, Tuples.flatTupleOf(var_b), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
678 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
679 new ExportedParameter(body, var_a, parameter_a),
680 new ExportedParameter(body, var_b, parameter_b)
681 ));
682 // EReference.eOpposite(a,b)
683 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
684 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
685 new TypeConstraint(body, Tuples.flatTupleOf(var_a, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference", "eOpposite")));
686 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
687 new Equality(body, var__virtual_0_, var_b);
688 bodies.add(body);
689 }
690 return bodies;
691 }
692 }
693}
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUniversalQuantifier.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/OppositeDifferentClass.java
index 0dab9771..0f8b6357 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUniversalQuantifier.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/OppositeDifferentClass.java
@@ -1,7 +1,7 @@
1/** 1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql 2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql
3 */ 3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries; 4package hu.bme.mit.inf.dslreasoner.domains.alloyexamples;
5 5
6import java.util.Arrays; 6import java.util.Arrays;
7import java.util.Collection; 7import java.util.Collection;
@@ -15,6 +15,7 @@ import java.util.stream.Collectors;
15import java.util.stream.Stream; 15import java.util.stream.Stream;
16import org.apache.log4j.Logger; 16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass; 17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.emf.ecore.EReference;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch; 19import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification; 20import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; 21import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
@@ -23,10 +24,15 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificat
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; 24import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; 25import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; 26import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
27import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 28import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; 29import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; 30import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
31import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
32import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; 34import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; 36import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; 37import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; 38import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
@@ -40,8 +46,12 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
40 * 46 *
41 * <p>Original source: 47 * <p>Original source:
42 * <code><pre> 48 * <code><pre>
43 * pattern VLSUniversalQuantifier(term: VLSUniversalQuantifier){ 49 * {@literal @}Constraint(key={a}, severity="error", message="error")
44 * VLSUniversalQuantifier(term); 50 * pattern oppositeDifferentClass(a:EReference) {
51 * EReference.eOpposite(a,b);
52 * EReference.eContainingClass(a,aContaining);
53 * EReference.eType(b,bTarget);
54 * aContaining != bTarget;
45 * } 55 * }
46 * </pre></code> 56 * </pre></code>
47 * 57 *
@@ -50,9 +60,9 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
50 * 60 *
51 */ 61 */
52@SuppressWarnings("all") 62@SuppressWarnings("all")
53public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecification<VLSUniversalQuantifier.Matcher> { 63public final class OppositeDifferentClass extends BaseGeneratedEMFQuerySpecification<OppositeDifferentClass.Matcher> {
54 /** 64 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier pattern, 65 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.oppositeDifferentClass pattern,
56 * to be used in conjunction with {@link Matcher}. 66 * to be used in conjunction with {@link Matcher}.
57 * 67 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. 68 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
@@ -64,69 +74,69 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
64 * 74 *
65 */ 75 */
66 public static abstract class Match extends BasePatternMatch { 76 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier fTerm; 77 private EReference fA;
68 78
69 private static List<String> parameterNames = makeImmutableList("term"); 79 private static List<String> parameterNames = makeImmutableList("a");
70 80
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 81 private Match(final EReference pA) {
72 this.fTerm = pTerm; 82 this.fA = pA;
73 } 83 }
74 84
75 @Override 85 @Override
76 public Object get(final String parameterName) { 86 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm; 87 if ("a".equals(parameterName)) return this.fA;
78 return null; 88 return null;
79 } 89 }
80 90
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier getTerm() { 91 public EReference getA() {
82 return this.fTerm; 92 return this.fA;
83 } 93 }
84 94
85 @Override 95 @Override
86 public boolean set(final String parameterName, final Object newValue) { 96 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException(); 97 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) { 98 if ("a".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) newValue; 99 this.fA = (EReference) newValue;
90 return true; 100 return true;
91 } 101 }
92 return false; 102 return false;
93 } 103 }
94 104
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 105 public void setA(final EReference pA) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException(); 106 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm; 107 this.fA = pA;
98 } 108 }
99 109
100 @Override 110 @Override
101 public String patternName() { 111 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier"; 112 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.oppositeDifferentClass";
103 } 113 }
104 114
105 @Override 115 @Override
106 public List<String> parameterNames() { 116 public List<String> parameterNames() {
107 return VLSUniversalQuantifier.Match.parameterNames; 117 return OppositeDifferentClass.Match.parameterNames;
108 } 118 }
109 119
110 @Override 120 @Override
111 public Object[] toArray() { 121 public Object[] toArray() {
112 return new Object[]{fTerm}; 122 return new Object[]{fA};
113 } 123 }
114 124
115 @Override 125 @Override
116 public VLSUniversalQuantifier.Match toImmutable() { 126 public OppositeDifferentClass.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this; 127 return isMutable() ? newMatch(fA) : this;
118 } 128 }
119 129
120 @Override 130 @Override
121 public String prettyPrint() { 131 public String prettyPrint() {
122 StringBuilder result = new StringBuilder(); 132 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm)); 133 result.append("\"a\"=" + prettyPrintValue(fA));
124 return result.toString(); 134 return result.toString();
125 } 135 }
126 136
127 @Override 137 @Override
128 public int hashCode() { 138 public int hashCode() {
129 return Objects.hash(fTerm); 139 return Objects.hash(fA);
130 } 140 }
131 141
132 @Override 142 @Override
@@ -136,9 +146,9 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
136 if (obj == null) { 146 if (obj == null) {
137 return false; 147 return false;
138 } 148 }
139 if ((obj instanceof VLSUniversalQuantifier.Match)) { 149 if ((obj instanceof OppositeDifferentClass.Match)) {
140 VLSUniversalQuantifier.Match other = (VLSUniversalQuantifier.Match) obj; 150 OppositeDifferentClass.Match other = (OppositeDifferentClass.Match) obj;
141 return Objects.equals(fTerm, other.fTerm); 151 return Objects.equals(fA, other.fA);
142 } else { 152 } else {
143 // this should be infrequent 153 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) { 154 if (!(obj instanceof IPatternMatch)) {
@@ -150,8 +160,8 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
150 } 160 }
151 161
152 @Override 162 @Override
153 public VLSUniversalQuantifier specification() { 163 public OppositeDifferentClass specification() {
154 return VLSUniversalQuantifier.instance(); 164 return OppositeDifferentClass.instance();
155 } 165 }
156 166
157 /** 167 /**
@@ -161,7 +171,7 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
161 * @return the empty match. 171 * @return the empty match.
162 * 172 *
163 */ 173 */
164 public static VLSUniversalQuantifier.Match newEmptyMatch() { 174 public static OppositeDifferentClass.Match newEmptyMatch() {
165 return new Mutable(null); 175 return new Mutable(null);
166 } 176 }
167 177
@@ -169,29 +179,29 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
169 * Returns a mutable (partial) match. 179 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input. 180 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 * 181 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 182 * @param pA the fixed value of pattern parameter a, or null if not bound.
173 * @return the new, mutable (partial) match object. 183 * @return the new, mutable (partial) match object.
174 * 184 *
175 */ 185 */
176 public static VLSUniversalQuantifier.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 186 public static OppositeDifferentClass.Match newMutableMatch(final EReference pA) {
177 return new Mutable(pTerm); 187 return new Mutable(pA);
178 } 188 }
179 189
180 /** 190 /**
181 * Returns a new (partial) match. 191 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match. 192 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. 193 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 194 * @param pA the fixed value of pattern parameter a, or null if not bound.
185 * @return the (partial) match object. 195 * @return the (partial) match object.
186 * 196 *
187 */ 197 */
188 public static VLSUniversalQuantifier.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 198 public static OppositeDifferentClass.Match newMatch(final EReference pA) {
189 return new Immutable(pTerm); 199 return new Immutable(pA);
190 } 200 }
191 201
192 private static final class Mutable extends VLSUniversalQuantifier.Match { 202 private static final class Mutable extends OppositeDifferentClass.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 203 Mutable(final EReference pA) {
194 super(pTerm); 204 super(pA);
195 } 205 }
196 206
197 @Override 207 @Override
@@ -200,9 +210,9 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
200 } 210 }
201 } 211 }
202 212
203 private static final class Immutable extends VLSUniversalQuantifier.Match { 213 private static final class Immutable extends OppositeDifferentClass.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 214 Immutable(final EReference pA) {
205 super(pTerm); 215 super(pA);
206 } 216 }
207 217
208 @Override 218 @Override
@@ -213,7 +223,7 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
213 } 223 }
214 224
215 /** 225 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier pattern, 226 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.oppositeDifferentClass pattern,
217 * providing pattern-specific query methods. 227 * providing pattern-specific query methods.
218 * 228 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, 229 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
@@ -223,16 +233,20 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
223 * 233 *
224 * <p>Original source: 234 * <p>Original source:
225 * <code><pre> 235 * <code><pre>
226 * pattern VLSUniversalQuantifier(term: VLSUniversalQuantifier){ 236 * {@literal @}Constraint(key={a}, severity="error", message="error")
227 * VLSUniversalQuantifier(term); 237 * pattern oppositeDifferentClass(a:EReference) {
238 * EReference.eOpposite(a,b);
239 * EReference.eContainingClass(a,aContaining);
240 * EReference.eType(b,bTarget);
241 * aContaining != bTarget;
228 * } 242 * }
229 * </pre></code> 243 * </pre></code>
230 * 244 *
231 * @see Match 245 * @see Match
232 * @see VLSUniversalQuantifier 246 * @see OppositeDifferentClass
233 * 247 *
234 */ 248 */
235 public static class Matcher extends BaseMatcher<VLSUniversalQuantifier.Match> { 249 public static class Matcher extends BaseMatcher<OppositeDifferentClass.Match> {
236 /** 250 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine. 251 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. 252 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
@@ -241,7 +255,7 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation 255 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 * 256 *
243 */ 257 */
244 public static VLSUniversalQuantifier.Matcher on(final ViatraQueryEngine engine) { 258 public static OppositeDifferentClass.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists 259 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification()); 260 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) { 261 if (matcher == null) {
@@ -256,13 +270,13 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually. 270 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 * 271 *
258 */ 272 */
259 public static VLSUniversalQuantifier.Matcher create() { 273 public static OppositeDifferentClass.Matcher create() {
260 return new Matcher(); 274 return new Matcher();
261 } 275 }
262 276
263 private final static int POSITION_TERM = 0; 277 private final static int POSITION_A = 0;
264 278
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSUniversalQuantifier.Matcher.class); 279 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(OppositeDifferentClass.Matcher.class);
266 280
267 /** 281 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine. 282 * Initializes the pattern matcher within an existing VIATRA Query engine.
@@ -278,12 +292,12 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
278 292
279 /** 293 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. 294 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 295 * @param pA the fixed value of pattern parameter a, or null if not bound.
282 * @return matches represented as a Match object. 296 * @return matches represented as a Match object.
283 * 297 *
284 */ 298 */
285 public Collection<VLSUniversalQuantifier.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 299 public Collection<OppositeDifferentClass.Match> getAllMatches(final EReference pA) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); 300 return rawStreamAllMatches(new Object[]{pA}).collect(Collectors.toSet());
287 } 301 }
288 302
289 /** 303 /**
@@ -292,101 +306,101 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. 306 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. 307 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. 308 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 309 * @param pA the fixed value of pattern parameter a, or null if not bound.
296 * @return a stream of matches represented as a Match object. 310 * @return a stream of matches represented as a Match object.
297 * 311 *
298 */ 312 */
299 public Stream<VLSUniversalQuantifier.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 313 public Stream<OppositeDifferentClass.Match> streamAllMatches(final EReference pA) {
300 return rawStreamAllMatches(new Object[]{pTerm}); 314 return rawStreamAllMatches(new Object[]{pA});
301 } 315 }
302 316
303 /** 317 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. 318 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed. 319 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 320 * @param pA the fixed value of pattern parameter a, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found. 321 * @return a match represented as a Match object, or null if no match is found.
308 * 322 *
309 */ 323 */
310 public Optional<VLSUniversalQuantifier.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 324 public Optional<OppositeDifferentClass.Match> getOneArbitraryMatch(final EReference pA) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm}); 325 return rawGetOneArbitraryMatch(new Object[]{pA});
312 } 326 }
313 327
314 /** 328 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, 329 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any). 330 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 331 * @param pA the fixed value of pattern parameter a, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern. 332 * @return true if the input is a valid (partial) match of the pattern.
319 * 333 *
320 */ 334 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 335 public boolean hasMatch(final EReference pA) {
322 return rawHasMatch(new Object[]{pTerm}); 336 return rawHasMatch(new Object[]{pA});
323 } 337 }
324 338
325 /** 339 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. 340 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 341 * @param pA the fixed value of pattern parameter a, or null if not bound.
328 * @return the number of pattern matches found. 342 * @return the number of pattern matches found.
329 * 343 *
330 */ 344 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 345 public int countMatches(final EReference pA) {
332 return rawCountMatches(new Object[]{pTerm}); 346 return rawCountMatches(new Object[]{pA});
333 } 347 }
334 348
335 /** 349 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. 350 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed. 351 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 352 * @param pA the fixed value of pattern parameter a, or null if not bound.
339 * @param processor the action that will process the selected match. 353 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked 354 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 * 355 *
342 */ 356 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm, final Consumer<? super VLSUniversalQuantifier.Match> processor) { 357 public boolean forOneArbitraryMatch(final EReference pA, final Consumer<? super OppositeDifferentClass.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); 358 return rawForOneArbitraryMatch(new Object[]{pA}, processor);
345 } 359 }
346 360
347 /** 361 /**
348 * Returns a new (partial) match. 362 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match. 363 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. 364 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound. 365 * @param pA the fixed value of pattern parameter a, or null if not bound.
352 * @return the (partial) match object. 366 * @return the (partial) match object.
353 * 367 *
354 */ 368 */
355 public VLSUniversalQuantifier.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) { 369 public OppositeDifferentClass.Match newMatch(final EReference pA) {
356 return VLSUniversalQuantifier.Match.newMatch(pTerm); 370 return OppositeDifferentClass.Match.newMatch(pA);
357 } 371 }
358 372
359 /** 373 /**
360 * Retrieve the set of values that occur in matches for term. 374 * Retrieve the set of values that occur in matches for a.
361 * @return the Set of all values or empty set if there are no matches 375 * @return the Set of all values or empty set if there are no matches
362 * 376 *
363 */ 377 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier> rawStreamAllValuesOfterm(final Object[] parameters) { 378 protected Stream<EReference> rawStreamAllValuesOfa(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier.class::cast); 379 return rawStreamAllValues(POSITION_A, parameters).map(EReference.class::cast);
366 } 380 }
367 381
368 /** 382 /**
369 * Retrieve the set of values that occur in matches for term. 383 * Retrieve the set of values that occur in matches for a.
370 * @return the Set of all values or empty set if there are no matches 384 * @return the Set of all values or empty set if there are no matches
371 * 385 *
372 */ 386 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier> getAllValuesOfterm() { 387 public Set<EReference> getAllValuesOfa() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); 388 return rawStreamAllValuesOfa(emptyArray()).collect(Collectors.toSet());
375 } 389 }
376 390
377 /** 391 /**
378 * Retrieve the set of values that occur in matches for term. 392 * Retrieve the set of values that occur in matches for a.
379 * @return the Set of all values or empty set if there are no matches 393 * @return the Set of all values or empty set if there are no matches
380 * 394 *
381 */ 395 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier> streamAllValuesOfterm() { 396 public Stream<EReference> streamAllValuesOfa() {
383 return rawStreamAllValuesOfterm(emptyArray()); 397 return rawStreamAllValuesOfa(emptyArray());
384 } 398 }
385 399
386 @Override 400 @Override
387 protected VLSUniversalQuantifier.Match tupleToMatch(final Tuple t) { 401 protected OppositeDifferentClass.Match tupleToMatch(final Tuple t) {
388 try { 402 try {
389 return VLSUniversalQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) t.get(POSITION_TERM)); 403 return OppositeDifferentClass.Match.newMatch((EReference) t.get(POSITION_A));
390 } catch(ClassCastException e) { 404 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e); 405 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null; 406 return null;
@@ -394,9 +408,9 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
394 } 408 }
395 409
396 @Override 410 @Override
397 protected VLSUniversalQuantifier.Match arrayToMatch(final Object[] match) { 411 protected OppositeDifferentClass.Match arrayToMatch(final Object[] match) {
398 try { 412 try {
399 return VLSUniversalQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) match[POSITION_TERM]); 413 return OppositeDifferentClass.Match.newMatch((EReference) match[POSITION_A]);
400 } catch(ClassCastException e) { 414 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e); 415 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null; 416 return null;
@@ -404,9 +418,9 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
404 } 418 }
405 419
406 @Override 420 @Override
407 protected VLSUniversalQuantifier.Match arrayToMatchMutable(final Object[] match) { 421 protected OppositeDifferentClass.Match arrayToMatchMutable(final Object[] match) {
408 try { 422 try {
409 return VLSUniversalQuantifier.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) match[POSITION_TERM]); 423 return OppositeDifferentClass.Match.newMutableMatch((EReference) match[POSITION_A]);
410 } catch(ClassCastException e) { 424 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e); 425 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null; 426 return null;
@@ -418,12 +432,12 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded 432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 * 433 *
420 */ 434 */
421 public static IQuerySpecification<VLSUniversalQuantifier.Matcher> querySpecification() { 435 public static IQuerySpecification<OppositeDifferentClass.Matcher> querySpecification() {
422 return VLSUniversalQuantifier.instance(); 436 return OppositeDifferentClass.instance();
423 } 437 }
424 } 438 }
425 439
426 private VLSUniversalQuantifier() { 440 private OppositeDifferentClass() {
427 super(GeneratedPQuery.INSTANCE); 441 super(GeneratedPQuery.INSTANCE);
428 } 442 }
429 443
@@ -432,7 +446,7 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded 446 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 * 447 *
434 */ 448 */
435 public static VLSUniversalQuantifier instance() { 449 public static OppositeDifferentClass instance() {
436 try{ 450 try{
437 return LazyHolder.INSTANCE; 451 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) { 452 } catch (ExceptionInInitializerError err) {
@@ -441,35 +455,35 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
441 } 455 }
442 456
443 @Override 457 @Override
444 protected VLSUniversalQuantifier.Matcher instantiate(final ViatraQueryEngine engine) { 458 protected OppositeDifferentClass.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSUniversalQuantifier.Matcher.on(engine); 459 return OppositeDifferentClass.Matcher.on(engine);
446 } 460 }
447 461
448 @Override 462 @Override
449 public VLSUniversalQuantifier.Matcher instantiate() { 463 public OppositeDifferentClass.Matcher instantiate() {
450 return VLSUniversalQuantifier.Matcher.create(); 464 return OppositeDifferentClass.Matcher.create();
451 } 465 }
452 466
453 @Override 467 @Override
454 public VLSUniversalQuantifier.Match newEmptyMatch() { 468 public OppositeDifferentClass.Match newEmptyMatch() {
455 return VLSUniversalQuantifier.Match.newEmptyMatch(); 469 return OppositeDifferentClass.Match.newEmptyMatch();
456 } 470 }
457 471
458 @Override 472 @Override
459 public VLSUniversalQuantifier.Match newMatch(final Object... parameters) { 473 public OppositeDifferentClass.Match newMatch(final Object... parameters) {
460 return VLSUniversalQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) parameters[0]); 474 return OppositeDifferentClass.Match.newMatch((org.eclipse.emf.ecore.EReference) parameters[0]);
461 } 475 }
462 476
463 /** 477 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created 478 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.OppositeDifferentClass (visibility: PUBLIC, simpleName: OppositeDifferentClass, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.OppositeDifferentClass, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class, 479 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. 480 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.OppositeDifferentClass (visibility: PUBLIC, simpleName: OppositeDifferentClass, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.OppositeDifferentClass, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 * 481 *
468 * <p> This workaround is required e.g. to support recursion. 482 * <p> This workaround is required e.g. to support recursion.
469 * 483 *
470 */ 484 */
471 private static class LazyHolder { 485 private static class LazyHolder {
472 private final static VLSUniversalQuantifier INSTANCE = new VLSUniversalQuantifier(); 486 private final static OppositeDifferentClass INSTANCE = new OppositeDifferentClass();
473 487
474 /** 488 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. 489 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
@@ -487,11 +501,11 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
487 } 501 }
488 502
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { 503 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSUniversalQuantifier.GeneratedPQuery INSTANCE = new GeneratedPQuery(); 504 private final static OppositeDifferentClass.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491 505
492 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); 506 private final PParameter parameter_a = new PParameter("a", "org.eclipse.emf.ecore.EReference", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EReference")), PParameterDirection.INOUT);
493 507
494 private final List<PParameter> parameters = Arrays.asList(parameter_term); 508 private final List<PParameter> parameters = Arrays.asList(parameter_a);
495 509
496 private GeneratedPQuery() { 510 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC); 511 super(PVisibility.PUBLIC);
@@ -499,12 +513,12 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
499 513
500 @Override 514 @Override
501 public String getFullyQualifiedName() { 515 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier"; 516 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.oppositeDifferentClass";
503 } 517 }
504 518
505 @Override 519 @Override
506 public List<String> getParameterNames() { 520 public List<String> getParameterNames() {
507 return Arrays.asList("term"); 521 return Arrays.asList("a");
508 } 522 }
509 523
510 @Override 524 @Override
@@ -518,15 +532,45 @@ public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecifica
518 Set<PBody> bodies = new LinkedHashSet<>(); 532 Set<PBody> bodies = new LinkedHashSet<>();
519 { 533 {
520 PBody body = new PBody(this); 534 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term"); 535 PVariable var_a = body.getOrCreateVariableByName("a");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUniversalQuantifier"))); 536 PVariable var_b = body.getOrCreateVariableByName("b");
537 PVariable var_aContaining = body.getOrCreateVariableByName("aContaining");
538 PVariable var_bTarget = body.getOrCreateVariableByName("bTarget");
539 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList( 540 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term) 541 new ExportedParameter(body, var_a, parameter_a)
525 )); 542 ));
526 // VLSUniversalQuantifier(term) 543 // EReference.eOpposite(a,b)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUniversalQuantifier"))); 544 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
545 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
546 new TypeConstraint(body, Tuples.flatTupleOf(var_a, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference", "eOpposite")));
547 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
548 new Equality(body, var__virtual_0_, var_b);
549 // EReference.eContainingClass(a,aContaining)
550 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
551 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
552 new TypeConstraint(body, Tuples.flatTupleOf(var_a, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "EStructuralFeature", "eContainingClass")));
553 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
554 new Equality(body, var__virtual_1_, var_aContaining);
555 // EReference.eType(b,bTarget)
556 new TypeConstraint(body, Tuples.flatTupleOf(var_b), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EReference")));
557 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
558 new TypeConstraint(body, Tuples.flatTupleOf(var_b, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "ETypedElement", "eType")));
559 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClassifier")));
560 new Equality(body, var__virtual_2_, var_bTarget);
561 // aContaining != bTarget
562 new Inequality(body, var_aContaining, var_bTarget);
528 bodies.add(body); 563 bodies.add(body);
529 } 564 }
565 {
566 PAnnotation annotation = new PAnnotation("Constraint");
567 annotation.addAttribute("key", Arrays.asList(new Object[] {
568 new ParameterReference("a")
569 }));
570 annotation.addAttribute("severity", "error");
571 annotation.addAttribute("message", "error");
572 addAnnotation(annotation);
573 }
530 return bodies; 574 return bodies;
531 } 575 }
532 } 576 }
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/PatternContent.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/PatternContent.java
new file mode 100644
index 00000000..f9bab96e
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/PatternContent.java
@@ -0,0 +1,693 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/FileSystem.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.alloyexamples;
5
6import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject;
7import java.util.Arrays;
8import java.util.Collection;
9import java.util.LinkedHashSet;
10import java.util.List;
11import java.util.Objects;
12import java.util.Optional;
13import java.util.Set;
14import java.util.function.Consumer;
15import java.util.stream.Collectors;
16import java.util.stream.Stream;
17import org.apache.log4j.Logger;
18import org.eclipse.emf.ecore.EClass;
19import org.eclipse.viatra.query.runtime.api.IPatternMatch;
20import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
21import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
23import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
24import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
25import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
26import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
27import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
28import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
29import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
30import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
31import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
34import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
37import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
38import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
39import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
40
41/**
42 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
43 *
44 * <p>Original source:
45 * <code><pre>
46 * pattern patternContent(o1: FSObject, o2: FSObject) {
47 * Dir.contents(o1,o2);
48 * }
49 * </pre></code>
50 *
51 * @see Matcher
52 * @see Match
53 *
54 */
55@SuppressWarnings("all")
56public final class PatternContent extends BaseGeneratedEMFQuerySpecification<PatternContent.Matcher> {
57 /**
58 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.patternContent pattern,
59 * to be used in conjunction with {@link Matcher}.
60 *
61 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
62 * Each instance is a (possibly partial) substitution of pattern parameters,
63 * usable to represent a match of the pattern in the result of a query,
64 * or to specify the bound (fixed) input parameters when issuing a query.
65 *
66 * @see Matcher
67 *
68 */
69 public static abstract class Match extends BasePatternMatch {
70 private FSObject fO1;
71
72 private FSObject fO2;
73
74 private static List<String> parameterNames = makeImmutableList("o1", "o2");
75
76 private Match(final FSObject pO1, final FSObject pO2) {
77 this.fO1 = pO1;
78 this.fO2 = pO2;
79 }
80
81 @Override
82 public Object get(final String parameterName) {
83 if ("o1".equals(parameterName)) return this.fO1;
84 if ("o2".equals(parameterName)) return this.fO2;
85 return null;
86 }
87
88 public FSObject getO1() {
89 return this.fO1;
90 }
91
92 public FSObject getO2() {
93 return this.fO2;
94 }
95
96 @Override
97 public boolean set(final String parameterName, final Object newValue) {
98 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
99 if ("o1".equals(parameterName) ) {
100 this.fO1 = (FSObject) newValue;
101 return true;
102 }
103 if ("o2".equals(parameterName) ) {
104 this.fO2 = (FSObject) newValue;
105 return true;
106 }
107 return false;
108 }
109
110 public void setO1(final FSObject pO1) {
111 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
112 this.fO1 = pO1;
113 }
114
115 public void setO2(final FSObject pO2) {
116 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
117 this.fO2 = pO2;
118 }
119
120 @Override
121 public String patternName() {
122 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.patternContent";
123 }
124
125 @Override
126 public List<String> parameterNames() {
127 return PatternContent.Match.parameterNames;
128 }
129
130 @Override
131 public Object[] toArray() {
132 return new Object[]{fO1, fO2};
133 }
134
135 @Override
136 public PatternContent.Match toImmutable() {
137 return isMutable() ? newMatch(fO1, fO2) : this;
138 }
139
140 @Override
141 public String prettyPrint() {
142 StringBuilder result = new StringBuilder();
143 result.append("\"o1\"=" + prettyPrintValue(fO1) + ", ");
144 result.append("\"o2\"=" + prettyPrintValue(fO2));
145 return result.toString();
146 }
147
148 @Override
149 public int hashCode() {
150 return Objects.hash(fO1, fO2);
151 }
152
153 @Override
154 public boolean equals(final Object obj) {
155 if (this == obj)
156 return true;
157 if (obj == null) {
158 return false;
159 }
160 if ((obj instanceof PatternContent.Match)) {
161 PatternContent.Match other = (PatternContent.Match) obj;
162 return Objects.equals(fO1, other.fO1) && Objects.equals(fO2, other.fO2);
163 } else {
164 // this should be infrequent
165 if (!(obj instanceof IPatternMatch)) {
166 return false;
167 }
168 IPatternMatch otherSig = (IPatternMatch) obj;
169 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
170 }
171 }
172
173 @Override
174 public PatternContent specification() {
175 return PatternContent.instance();
176 }
177
178 /**
179 * Returns an empty, mutable match.
180 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
181 *
182 * @return the empty match.
183 *
184 */
185 public static PatternContent.Match newEmptyMatch() {
186 return new Mutable(null, null);
187 }
188
189 /**
190 * Returns a mutable (partial) match.
191 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
192 *
193 * @param pO1 the fixed value of pattern parameter o1, or null if not bound.
194 * @param pO2 the fixed value of pattern parameter o2, or null if not bound.
195 * @return the new, mutable (partial) match object.
196 *
197 */
198 public static PatternContent.Match newMutableMatch(final FSObject pO1, final FSObject pO2) {
199 return new Mutable(pO1, pO2);
200 }
201
202 /**
203 * Returns a new (partial) match.
204 * This can be used e.g. to call the matcher with a partial match.
205 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
206 * @param pO1 the fixed value of pattern parameter o1, or null if not bound.
207 * @param pO2 the fixed value of pattern parameter o2, or null if not bound.
208 * @return the (partial) match object.
209 *
210 */
211 public static PatternContent.Match newMatch(final FSObject pO1, final FSObject pO2) {
212 return new Immutable(pO1, pO2);
213 }
214
215 private static final class Mutable extends PatternContent.Match {
216 Mutable(final FSObject pO1, final FSObject pO2) {
217 super(pO1, pO2);
218 }
219
220 @Override
221 public boolean isMutable() {
222 return true;
223 }
224 }
225
226 private static final class Immutable extends PatternContent.Match {
227 Immutable(final FSObject pO1, final FSObject pO2) {
228 super(pO1, pO2);
229 }
230
231 @Override
232 public boolean isMutable() {
233 return false;
234 }
235 }
236 }
237
238 /**
239 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.patternContent pattern,
240 * providing pattern-specific query methods.
241 *
242 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
243 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
244 *
245 * <p>Matches of the pattern will be represented as {@link Match}.
246 *
247 * <p>Original source:
248 * <code><pre>
249 * pattern patternContent(o1: FSObject, o2: FSObject) {
250 * Dir.contents(o1,o2);
251 * }
252 * </pre></code>
253 *
254 * @see Match
255 * @see PatternContent
256 *
257 */
258 public static class Matcher extends BaseMatcher<PatternContent.Match> {
259 /**
260 * Initializes the pattern matcher within an existing VIATRA Query engine.
261 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
262 *
263 * @param engine the existing VIATRA Query engine in which this matcher will be created.
264 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
265 *
266 */
267 public static PatternContent.Matcher on(final ViatraQueryEngine engine) {
268 // check if matcher already exists
269 Matcher matcher = engine.getExistingMatcher(querySpecification());
270 if (matcher == null) {
271 matcher = (Matcher)engine.getMatcher(querySpecification());
272 }
273 return matcher;
274 }
275
276 /**
277 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
278 * @return an initialized matcher
279 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
280 *
281 */
282 public static PatternContent.Matcher create() {
283 return new Matcher();
284 }
285
286 private final static int POSITION_O1 = 0;
287
288 private final static int POSITION_O2 = 1;
289
290 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(PatternContent.Matcher.class);
291
292 /**
293 * Initializes the pattern matcher within an existing VIATRA Query engine.
294 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
295 *
296 * @param engine the existing VIATRA Query engine in which this matcher will be created.
297 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
298 *
299 */
300 private Matcher() {
301 super(querySpecification());
302 }
303
304 /**
305 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
306 * @param pO1 the fixed value of pattern parameter o1, or null if not bound.
307 * @param pO2 the fixed value of pattern parameter o2, or null if not bound.
308 * @return matches represented as a Match object.
309 *
310 */
311 public Collection<PatternContent.Match> getAllMatches(final FSObject pO1, final FSObject pO2) {
312 return rawStreamAllMatches(new Object[]{pO1, pO2}).collect(Collectors.toSet());
313 }
314
315 /**
316 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
317 * </p>
318 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
319 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
320 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
321 * @param pO1 the fixed value of pattern parameter o1, or null if not bound.
322 * @param pO2 the fixed value of pattern parameter o2, or null if not bound.
323 * @return a stream of matches represented as a Match object.
324 *
325 */
326 public Stream<PatternContent.Match> streamAllMatches(final FSObject pO1, final FSObject pO2) {
327 return rawStreamAllMatches(new Object[]{pO1, pO2});
328 }
329
330 /**
331 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
332 * Neither determinism nor randomness of selection is guaranteed.
333 * @param pO1 the fixed value of pattern parameter o1, or null if not bound.
334 * @param pO2 the fixed value of pattern parameter o2, or null if not bound.
335 * @return a match represented as a Match object, or null if no match is found.
336 *
337 */
338 public Optional<PatternContent.Match> getOneArbitraryMatch(final FSObject pO1, final FSObject pO2) {
339 return rawGetOneArbitraryMatch(new Object[]{pO1, pO2});
340 }
341
342 /**
343 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
344 * under any possible substitution of the unspecified parameters (if any).
345 * @param pO1 the fixed value of pattern parameter o1, or null if not bound.
346 * @param pO2 the fixed value of pattern parameter o2, or null if not bound.
347 * @return true if the input is a valid (partial) match of the pattern.
348 *
349 */
350 public boolean hasMatch(final FSObject pO1, final FSObject pO2) {
351 return rawHasMatch(new Object[]{pO1, pO2});
352 }
353
354 /**
355 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
356 * @param pO1 the fixed value of pattern parameter o1, or null if not bound.
357 * @param pO2 the fixed value of pattern parameter o2, or null if not bound.
358 * @return the number of pattern matches found.
359 *
360 */
361 public int countMatches(final FSObject pO1, final FSObject pO2) {
362 return rawCountMatches(new Object[]{pO1, pO2});
363 }
364
365 /**
366 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
367 * Neither determinism nor randomness of selection is guaranteed.
368 * @param pO1 the fixed value of pattern parameter o1, or null if not bound.
369 * @param pO2 the fixed value of pattern parameter o2, or null if not bound.
370 * @param processor the action that will process the selected match.
371 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
372 *
373 */
374 public boolean forOneArbitraryMatch(final FSObject pO1, final FSObject pO2, final Consumer<? super PatternContent.Match> processor) {
375 return rawForOneArbitraryMatch(new Object[]{pO1, pO2}, processor);
376 }
377
378 /**
379 * Returns a new (partial) match.
380 * This can be used e.g. to call the matcher with a partial match.
381 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
382 * @param pO1 the fixed value of pattern parameter o1, or null if not bound.
383 * @param pO2 the fixed value of pattern parameter o2, or null if not bound.
384 * @return the (partial) match object.
385 *
386 */
387 public PatternContent.Match newMatch(final FSObject pO1, final FSObject pO2) {
388 return PatternContent.Match.newMatch(pO1, pO2);
389 }
390
391 /**
392 * Retrieve the set of values that occur in matches for o1.
393 * @return the Set of all values or empty set if there are no matches
394 *
395 */
396 protected Stream<FSObject> rawStreamAllValuesOfo1(final Object[] parameters) {
397 return rawStreamAllValues(POSITION_O1, parameters).map(FSObject.class::cast);
398 }
399
400 /**
401 * Retrieve the set of values that occur in matches for o1.
402 * @return the Set of all values or empty set if there are no matches
403 *
404 */
405 public Set<FSObject> getAllValuesOfo1() {
406 return rawStreamAllValuesOfo1(emptyArray()).collect(Collectors.toSet());
407 }
408
409 /**
410 * Retrieve the set of values that occur in matches for o1.
411 * @return the Set of all values or empty set if there are no matches
412 *
413 */
414 public Stream<FSObject> streamAllValuesOfo1() {
415 return rawStreamAllValuesOfo1(emptyArray());
416 }
417
418 /**
419 * Retrieve the set of values that occur in matches for o1.
420 * </p>
421 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
422 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
423 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
424 *
425 * @return the Stream of all values or empty set if there are no matches
426 *
427 */
428 public Stream<FSObject> streamAllValuesOfo1(final PatternContent.Match partialMatch) {
429 return rawStreamAllValuesOfo1(partialMatch.toArray());
430 }
431
432 /**
433 * Retrieve the set of values that occur in matches for o1.
434 * </p>
435 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
436 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
437 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
438 *
439 * @return the Stream of all values or empty set if there are no matches
440 *
441 */
442 public Stream<FSObject> streamAllValuesOfo1(final FSObject pO2) {
443 return rawStreamAllValuesOfo1(new Object[]{null, pO2});
444 }
445
446 /**
447 * Retrieve the set of values that occur in matches for o1.
448 * @return the Set of all values or empty set if there are no matches
449 *
450 */
451 public Set<FSObject> getAllValuesOfo1(final PatternContent.Match partialMatch) {
452 return rawStreamAllValuesOfo1(partialMatch.toArray()).collect(Collectors.toSet());
453 }
454
455 /**
456 * Retrieve the set of values that occur in matches for o1.
457 * @return the Set of all values or empty set if there are no matches
458 *
459 */
460 public Set<FSObject> getAllValuesOfo1(final FSObject pO2) {
461 return rawStreamAllValuesOfo1(new Object[]{null, pO2}).collect(Collectors.toSet());
462 }
463
464 /**
465 * Retrieve the set of values that occur in matches for o2.
466 * @return the Set of all values or empty set if there are no matches
467 *
468 */
469 protected Stream<FSObject> rawStreamAllValuesOfo2(final Object[] parameters) {
470 return rawStreamAllValues(POSITION_O2, parameters).map(FSObject.class::cast);
471 }
472
473 /**
474 * Retrieve the set of values that occur in matches for o2.
475 * @return the Set of all values or empty set if there are no matches
476 *
477 */
478 public Set<FSObject> getAllValuesOfo2() {
479 return rawStreamAllValuesOfo2(emptyArray()).collect(Collectors.toSet());
480 }
481
482 /**
483 * Retrieve the set of values that occur in matches for o2.
484 * @return the Set of all values or empty set if there are no matches
485 *
486 */
487 public Stream<FSObject> streamAllValuesOfo2() {
488 return rawStreamAllValuesOfo2(emptyArray());
489 }
490
491 /**
492 * Retrieve the set of values that occur in matches for o2.
493 * </p>
494 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
495 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
496 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
497 *
498 * @return the Stream of all values or empty set if there are no matches
499 *
500 */
501 public Stream<FSObject> streamAllValuesOfo2(final PatternContent.Match partialMatch) {
502 return rawStreamAllValuesOfo2(partialMatch.toArray());
503 }
504
505 /**
506 * Retrieve the set of values that occur in matches for o2.
507 * </p>
508 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
509 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
510 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
511 *
512 * @return the Stream of all values or empty set if there are no matches
513 *
514 */
515 public Stream<FSObject> streamAllValuesOfo2(final FSObject pO1) {
516 return rawStreamAllValuesOfo2(new Object[]{pO1, null});
517 }
518
519 /**
520 * Retrieve the set of values that occur in matches for o2.
521 * @return the Set of all values or empty set if there are no matches
522 *
523 */
524 public Set<FSObject> getAllValuesOfo2(final PatternContent.Match partialMatch) {
525 return rawStreamAllValuesOfo2(partialMatch.toArray()).collect(Collectors.toSet());
526 }
527
528 /**
529 * Retrieve the set of values that occur in matches for o2.
530 * @return the Set of all values or empty set if there are no matches
531 *
532 */
533 public Set<FSObject> getAllValuesOfo2(final FSObject pO1) {
534 return rawStreamAllValuesOfo2(new Object[]{pO1, null}).collect(Collectors.toSet());
535 }
536
537 @Override
538 protected PatternContent.Match tupleToMatch(final Tuple t) {
539 try {
540 return PatternContent.Match.newMatch((FSObject) t.get(POSITION_O1), (FSObject) t.get(POSITION_O2));
541 } catch(ClassCastException e) {
542 LOGGER.error("Element(s) in tuple not properly typed!",e);
543 return null;
544 }
545 }
546
547 @Override
548 protected PatternContent.Match arrayToMatch(final Object[] match) {
549 try {
550 return PatternContent.Match.newMatch((FSObject) match[POSITION_O1], (FSObject) match[POSITION_O2]);
551 } catch(ClassCastException e) {
552 LOGGER.error("Element(s) in array not properly typed!",e);
553 return null;
554 }
555 }
556
557 @Override
558 protected PatternContent.Match arrayToMatchMutable(final Object[] match) {
559 try {
560 return PatternContent.Match.newMutableMatch((FSObject) match[POSITION_O1], (FSObject) match[POSITION_O2]);
561 } catch(ClassCastException e) {
562 LOGGER.error("Element(s) in array not properly typed!",e);
563 return null;
564 }
565 }
566
567 /**
568 * @return the singleton instance of the query specification of this pattern
569 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
570 *
571 */
572 public static IQuerySpecification<PatternContent.Matcher> querySpecification() {
573 return PatternContent.instance();
574 }
575 }
576
577 private PatternContent() {
578 super(GeneratedPQuery.INSTANCE);
579 }
580
581 /**
582 * @return the singleton instance of the query specification
583 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
584 *
585 */
586 public static PatternContent instance() {
587 try{
588 return LazyHolder.INSTANCE;
589 } catch (ExceptionInInitializerError err) {
590 throw processInitializerError(err);
591 }
592 }
593
594 @Override
595 protected PatternContent.Matcher instantiate(final ViatraQueryEngine engine) {
596 return PatternContent.Matcher.on(engine);
597 }
598
599 @Override
600 public PatternContent.Matcher instantiate() {
601 return PatternContent.Matcher.create();
602 }
603
604 @Override
605 public PatternContent.Match newEmptyMatch() {
606 return PatternContent.Match.newEmptyMatch();
607 }
608
609 @Override
610 public PatternContent.Match newMatch(final Object... parameters) {
611 return PatternContent.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject) parameters[0], (hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject) parameters[1]);
612 }
613
614 /**
615 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.PatternContent (visibility: PUBLIC, simpleName: PatternContent, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.PatternContent, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
616 * <b>not</b> at the class load time of the outer class,
617 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.PatternContent (visibility: PUBLIC, simpleName: PatternContent, identifier: hu.bme.mit.inf.dslreasoner.domains.alloyexamples.PatternContent, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
618 *
619 * <p> This workaround is required e.g. to support recursion.
620 *
621 */
622 private static class LazyHolder {
623 private final static PatternContent INSTANCE = new PatternContent();
624
625 /**
626 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
627 * This initialization order is required to support indirect recursion.
628 *
629 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
630 *
631 */
632 private final static Object STATIC_INITIALIZER = ensureInitialized();
633
634 public static Object ensureInitialized() {
635 INSTANCE.ensureInitializedInternal();
636 return null;
637 }
638 }
639
640 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
641 private final static PatternContent.GeneratedPQuery INSTANCE = new GeneratedPQuery();
642
643 private final PParameter parameter_o1 = new PParameter("o1", "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("FS", "FSObject")), PParameterDirection.INOUT);
644
645 private final PParameter parameter_o2 = new PParameter("o2", "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("FS", "FSObject")), PParameterDirection.INOUT);
646
647 private final List<PParameter> parameters = Arrays.asList(parameter_o1, parameter_o2);
648
649 private GeneratedPQuery() {
650 super(PVisibility.PUBLIC);
651 }
652
653 @Override
654 public String getFullyQualifiedName() {
655 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.patternContent";
656 }
657
658 @Override
659 public List<String> getParameterNames() {
660 return Arrays.asList("o1","o2");
661 }
662
663 @Override
664 public List<PParameter> getParameters() {
665 return parameters;
666 }
667
668 @Override
669 public Set<PBody> doGetContainedBodies() {
670 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
671 Set<PBody> bodies = new LinkedHashSet<>();
672 {
673 PBody body = new PBody(this);
674 PVariable var_o1 = body.getOrCreateVariableByName("o1");
675 PVariable var_o2 = body.getOrCreateVariableByName("o2");
676 new TypeConstraint(body, Tuples.flatTupleOf(var_o1), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FSObject")));
677 new TypeConstraint(body, Tuples.flatTupleOf(var_o2), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FSObject")));
678 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
679 new ExportedParameter(body, var_o1, parameter_o1),
680 new ExportedParameter(body, var_o2, parameter_o2)
681 ));
682 // Dir.contents(o1,o2)
683 new TypeConstraint(body, Tuples.flatTupleOf(var_o1), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "Dir")));
684 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
685 new TypeConstraint(body, Tuples.flatTupleOf(var_o1, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("FS", "Dir", "contents")));
686 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FS", "FSObject")));
687 new Equality(body, var__virtual_0_, var_o2);
688 bodies.add(body);
689 }
690 return bodies;
691 }
692 }
693}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF
index f15381b2..f2fd2ff3 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF
@@ -6,17 +6,15 @@ Bundle-Version: 1.0.0.qualifier
6Bundle-ClassPath: . 6Bundle-ClassPath: .
7Bundle-Vendor: %providerName 7Bundle-Vendor: %providerName
8Bundle-Localization: plugin 8Bundle-Localization: plugin
9Export-Package: hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm, 9Export-Package: hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm,
10 hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.impl, 10 hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.impl,
11 hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.util, 11 hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.util,
12 hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu, 12 hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu,
13 hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated, 13 hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated
14 hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.util, 14Require-Bundle: org.eclipse.viatra.query.runtime,
15 hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.util 15 org.eclipse.core.runtime,
16Require-Bundle: org.eclipse.viatra.query.runtime, 16 org.eclipse.emf.ecore;visibility:=reexport,
17 org.eclipse.core.runtime, 17 com.google.guava;bundle-version="15.0.0"
18 org.eclipse.emf.ecore;visibility:=reexport,
19 com.google.guava;bundle-version="15.0.0"
20Bundle-RequiredExecutionEnvironment: JavaSE-1.8 18Bundle-RequiredExecutionEnvironment: JavaSE-1.8
21Bundle-ActivationPolicy: lazy 19Bundle-ActivationPolicy: lazy
22Import-Package: org.apache.log4j 20Import-Package: org.apache.log4j
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 @@
7 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> 7 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
8 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> 8 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
9 <classpathentry kind="src" path="src"/> 9 <classpathentry kind="src" path="src"/>
10 <classpathentry kind="src" path="src-gen/"/>
10 <classpathentry kind="output" path="bin"/> 11 <classpathentry kind="output" path="bin"/>
11</classpath> 12</classpath>
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 8e1bba03..27b81f93 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
3Bundle-Name: %pluginName 3Bundle-Name: %pluginName
4Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.logic.model;singleton:=true 4Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.logic.model;singleton:=true
5Bundle-Version: 1.0.0.qualifier 5Bundle-Version: 1.0.0.qualifier
6Bundle-ClassPath: .
7Bundle-Vendor: %providerName 6Bundle-Vendor: %providerName
8Bundle-Localization: plugin 7Bundle-Localization: plugin
9Export-Package: hu.bme.mit.inf.dslreasoner.logic.model.builder, 8Export-Package: hu.bme.mit.inf.dslreasoner.logic.model.builder,
@@ -30,7 +29,7 @@ Require-Bundle: org.eclipse.core.runtime,
30 org.eclipse.viatra.query.runtime;bundle-version="1.3.0", 29 org.eclipse.viatra.query.runtime;bundle-version="1.3.0",
31 org.apache.commons.lang;bundle-version="2.6.0", 30 org.apache.commons.lang;bundle-version="2.6.0",
32 org.eclipse.emf.ecore.xmi;bundle-version="2.13.0" 31 org.eclipse.emf.ecore.xmi;bundle-version="2.13.0"
32Bundle-RequiredExecutionEnvironment: JavaSE-1.8
33Bundle-ActivationPolicy: lazy
33Import-Package: org.apache.log4j 34Import-Package: org.apache.log4j
34Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.logic.model 35Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.logic.model
35Bundle-ActivationPolicy: lazy
36Bundle-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/,\
8 src/,\ 8 src/,\
9 xtend-gen/,\ 9 xtend-gen/,\
10 patterns/,\ 10 patterns/,\
11 vql-gen/ 11 vql-gen/,\
12 src-gen/
12output.. = bin/ 13output.. = bin/
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 @@
7 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> 7 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
8 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> 8 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
9 <classpathentry kind="src" path="src"/> 9 <classpathentry kind="src" path="src"/>
10 <classpathentry kind="src" path="src-gen/"/>
10 <classpathentry kind="output" path="bin"/> 11 <classpathentry kind="output" path="bin"/>
11</classpath> 12</classpath>
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 = .
6source.. = src/,\ 6source.. = src/,\
7 queries/,\ 7 queries/,\
8 xtend-gen/,\ 8 xtend-gen/,\
9 vql-gen/ 9 vql-gen/,\
10 src-gen/
10output.. = bin/ 11output.. = 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 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<classpath>
3 <classpathentry kind="src" path="src"/>
4 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
6 <classpathentry kind="output" path="bin"/>
7</classpath>
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 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<projectDescription>
3 <name>ca.mcgill.ecse.dslreasoner.trace.logic2vampire</name>
4 <comment></comment>
5 <projects>
6 </projects>
7 <buildSpec>
8 <buildCommand>
9 <name>org.eclipse.jdt.core.javabuilder</name>
10 <arguments>
11 </arguments>
12 </buildCommand>
13 <buildCommand>
14 <name>org.eclipse.pde.ManifestBuilder</name>
15 <arguments>
16 </arguments>
17 </buildCommand>
18 <buildCommand>
19 <name>org.eclipse.pde.SchemaBuilder</name>
20 <arguments>
21 </arguments>
22 </buildCommand>
23 </buildSpec>
24 <natures>
25 <nature>org.eclipse.sirius.nature.modelingproject</nature>
26 <nature>org.eclipse.jdt.core.javanature</nature>
27 <nature>org.eclipse.pde.PluginNature</nature>
28 </natures>
29</projectDescription>
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 @@
1Manifest-Version: 1.0
2Bundle-ManifestVersion: 2
3Bundle-Name: ca.mcgill.ecse.dslreasoner.trace.logic2vampire
4Bundle-SymbolicName: ca.mcgill.ecse.dslreasoner.trace.logic2vampire; singleton:=true
5Bundle-Version: 0.1.0.qualifier
6Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport,
7 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 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description">
3 <viewpoint:DAnalysis xmi:id="_c5vPUBjhEemoVuGVD8l-rg" selectedViews="_c-elYBjhEemoVuGVD8l-rg" version="12.0.0.201704271200">
4 <semanticResources>logic2vampire.ecore</semanticResources>
5 <semanticResources>logic2vampire.genmodel</semanticResources>
6 <ownedViews xmi:type="viewpoint:DView" xmi:id="_c-elYBjhEemoVuGVD8l-rg">
7 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
8 <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_dEOBABjhEemoVuGVD8l-rg" name="logic2vampire" repPath="#_dEIhcBjhEemoVuGVD8l-rg">
9 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
10 <target xmi:type="ecore:EPackage" href="logic2vampire.ecore#/"/>
11 </ownedRepresentationDescriptors>
12 </ownedViews>
13 </viewpoint:DAnalysis>
14 <diagram:DSemanticDiagram xmi:id="_dEIhcBjhEemoVuGVD8l-rg" name="logic2vampire">
15 <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_dEIhcRjhEemoVuGVD8l-rg" source="DANNOTATION_CUSTOMIZATION_KEY">
16 <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_dEIhchjhEemoVuGVD8l-rg"/>
17 </ownedAnnotationEntries>
18 <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_dFEVkBjhEemoVuGVD8l-rg" source="GMF_DIAGRAMS">
19 <data xmi:type="notation:Diagram" xmi:id="_dFEVkRjhEemoVuGVD8l-rg" type="Sirius" element="_dEIhcBjhEemoVuGVD8l-rg" measurementUnit="Pixel">
20 <styles xmi:type="notation:DiagramStyle" xmi:id="_dFEVkhjhEemoVuGVD8l-rg"/>
21 </data>
22 </ownedAnnotationEntries>
23 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
24 <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_dEIhdBjhEemoVuGVD8l-rg"/>
25 <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/>
26 <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Package']"/>
27 <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Validation']"/>
28 <target xmi:type="ecore:EPackage" href="logic2vampire.ecore#/"/>
29 </diagram:DSemanticDiagram>
30</xmi:XMI>
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 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
3 name="logic2vampire" nsURI="http://www.example.org/logic2vampire"
4 nsPrefix="logic2vampire"/>
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 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/ca.mcgill.ecse.dslreasoner.trace.logic2vampire/src-gen"
4 creationIcons="false" editDirectory="/ca.mcgill.ecse.dslreasoner.trace.logic2vampire.edit/src-gen"
5 editorDirectory="/ca.mcgill.ecse.dslreasoner.trace.logic2vampire.editor/src-gen"
6 modelPluginID="ca.mcgill.ecse.dslreasoner.trace.logic2vampire" modelName="Logic2vampire"
7 rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" codeFormatting="true"
8 importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0" copyrightFields="false"
9 operationReflection="true" importOrganizing="true">
10 <foreignModel>logic2vampire.ecore</foreignModel>
11 <testsDirectory xsi:nil="true"/>
12 <genPackages prefix="Logic2vampire" basePackage="ca.mcgill.ecse.dslreasoner.trace"
13 disposableProviderFactory="true" ecorePackage="logic2vampire.ecore#/"/>
14</genmodel:GenModel>
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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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 @@
1/**
2 * generated by Xtext 2.12.0
3 */
4package ca.mcgill.ecse.dslreasoner.vampireLanguage;
5
6import org.eclipse.emf.ecore.EObject;
7
8/**
9 * <!-- begin-user-doc -->
10 * A representation of the model object '<em><b>VLS Finite Model</b></em>'.
11 * <!-- end-user-doc -->
12 *
13 *
14 * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSFiniteModel()
15 * @model
16 * @generated
17 */
18public interface VLSFiniteModel extends EObject
19{
20} // 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 @@
1/**
2 * generated by Xtext 2.12.0
3 */
4package ca.mcgill.ecse.dslreasoner.vampireLanguage;
5
6import org.eclipse.emf.common.util.EList;
7
8/**
9 * <!-- begin-user-doc -->
10 * A representation of the model object '<em><b>VLS Function Fof</b></em>'.
11 * <!-- end-user-doc -->
12 *
13 * <p>
14 * The following features are supported:
15 * </p>
16 * <ul>
17 * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof#getFunctor <em>Functor</em>}</li>
18 * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof#getTerms <em>Terms</em>}</li>
19 * </ul>
20 *
21 * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSFunctionFof()
22 * @model
23 * @generated
24 */
25public interface VLSFunctionFof extends VLSTerm
26{
27 /**
28 * Returns the value of the '<em><b>Functor</b></em>' attribute.
29 * <!-- begin-user-doc -->
30 * <p>
31 * If the meaning of the '<em>Functor</em>' attribute isn't clear,
32 * there really should be more of a description here...
33 * </p>
34 * <!-- end-user-doc -->
35 * @return the value of the '<em>Functor</em>' attribute.
36 * @see #setFunctor(String)
37 * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSFunctionFof_Functor()
38 * @model
39 * @generated
40 */
41 String getFunctor();
42
43 /**
44 * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof#getFunctor <em>Functor</em>}' attribute.
45 * <!-- begin-user-doc -->
46 * <!-- end-user-doc -->
47 * @param value the new value of the '<em>Functor</em>' attribute.
48 * @see #getFunctor()
49 * @generated
50 */
51 void setFunctor(String value);
52
53 /**
54 * Returns the value of the '<em><b>Terms</b></em>' containment reference list.
55 * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm}.
56 * <!-- begin-user-doc -->
57 * <p>
58 * If the meaning of the '<em>Terms</em>' containment reference list isn't clear,
59 * there really should be more of a description here...
60 * </p>
61 * <!-- end-user-doc -->
62 * @return the value of the '<em>Terms</em>' containment reference list.
63 * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSFunctionFof_Terms()
64 * @model containment="true"
65 * @generated
66 */
67 EList<VLSTerm> getTerms();
68
69} // 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 @@
1/**
2 * generated by Xtext 2.12.0
3 */
4package ca.mcgill.ecse.dslreasoner.vampireLanguage;
5
6import org.eclipse.emf.ecore.EObject;
7
8/**
9 * <!-- begin-user-doc -->
10 * A representation of the model object '<em><b>VLS Trying</b></em>'.
11 * <!-- end-user-doc -->
12 *
13 * <p>
14 * The following features are supported:
15 * </p>
16 * <ul>
17 * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTrying#getName <em>Name</em>}</li>
18 * </ul>
19 *
20 * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSTrying()
21 * @model
22 * @generated
23 */
24public interface VLSTrying extends EObject
25{
26 /**
27 * Returns the value of the '<em><b>Name</b></em>' attribute.
28 * <!-- begin-user-doc -->
29 * <p>
30 * If the meaning of the '<em>Name</em>' attribute isn't clear,
31 * there really should be more of a description here...
32 * </p>
33 * <!-- end-user-doc -->
34 * @return the value of the '<em>Name</em>' attribute.
35 * @see #setName(String)
36 * @see ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage#getVLSTrying_Name()
37 * @model
38 * @generated
39 */
40 String getName();
41
42 /**
43 * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTrying#getName <em>Name</em>}' attribute.
44 * <!-- begin-user-doc -->
45 * <!-- end-user-doc -->
46 * @param value the new value of the '<em>Name</em>' attribute.
47 * @see #getName()
48 * @generated
49 */
50 void setName(String value);
51
52} // 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 @@
1/**
2 * generated by Xtext 2.12.0
3 */
4package ca.mcgill.ecse.dslreasoner.vampireLanguage.impl;
5
6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFiniteModel;
7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage;
8
9import org.eclipse.emf.ecore.EClass;
10
11import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
12
13/**
14 * <!-- begin-user-doc -->
15 * An implementation of the model object '<em><b>VLS Finite Model</b></em>'.
16 * <!-- end-user-doc -->
17 *
18 * @generated
19 */
20public class VLSFiniteModelImpl extends MinimalEObjectImpl.Container implements VLSFiniteModel
21{
22 /**
23 * <!-- begin-user-doc -->
24 * <!-- end-user-doc -->
25 * @generated
26 */
27 protected VLSFiniteModelImpl()
28 {
29 super();
30 }
31
32 /**
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @generated
36 */
37 @Override
38 protected EClass eStaticClass()
39 {
40 return VampireLanguagePackage.Literals.VLS_FINITE_MODEL;
41 }
42
43} //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 @@
1/**
2 * generated by Xtext 2.12.0
3 */
4package ca.mcgill.ecse.dslreasoner.vampireLanguage.impl;
5
6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof;
7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm;
8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage;
9
10import java.util.Collection;
11
12import org.eclipse.emf.common.notify.Notification;
13import org.eclipse.emf.common.notify.NotificationChain;
14
15import org.eclipse.emf.common.util.EList;
16
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.emf.ecore.InternalEObject;
19
20import org.eclipse.emf.ecore.impl.ENotificationImpl;
21
22import org.eclipse.emf.ecore.util.EObjectContainmentEList;
23import org.eclipse.emf.ecore.util.InternalEList;
24
25/**
26 * <!-- begin-user-doc -->
27 * An implementation of the model object '<em><b>VLS Function Fof</b></em>'.
28 * <!-- end-user-doc -->
29 * <p>
30 * The following features are implemented:
31 * </p>
32 * <ul>
33 * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSFunctionFofImpl#getFunctor <em>Functor</em>}</li>
34 * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSFunctionFofImpl#getTerms <em>Terms</em>}</li>
35 * </ul>
36 *
37 * @generated
38 */
39public class VLSFunctionFofImpl extends VLSTermImpl implements VLSFunctionFof
40{
41 /**
42 * The default value of the '{@link #getFunctor() <em>Functor</em>}' attribute.
43 * <!-- begin-user-doc -->
44 * <!-- end-user-doc -->
45 * @see #getFunctor()
46 * @generated
47 * @ordered
48 */
49 protected static final String FUNCTOR_EDEFAULT = null;
50
51 /**
52 * The cached value of the '{@link #getFunctor() <em>Functor</em>}' attribute.
53 * <!-- begin-user-doc -->
54 * <!-- end-user-doc -->
55 * @see #getFunctor()
56 * @generated
57 * @ordered
58 */
59 protected String functor = FUNCTOR_EDEFAULT;
60
61 /**
62 * The cached value of the '{@link #getTerms() <em>Terms</em>}' containment reference list.
63 * <!-- begin-user-doc -->
64 * <!-- end-user-doc -->
65 * @see #getTerms()
66 * @generated
67 * @ordered
68 */
69 protected EList<VLSTerm> terms;
70
71 /**
72 * <!-- begin-user-doc -->
73 * <!-- end-user-doc -->
74 * @generated
75 */
76 protected VLSFunctionFofImpl()
77 {
78 super();
79 }
80
81 /**
82 * <!-- begin-user-doc -->
83 * <!-- end-user-doc -->
84 * @generated
85 */
86 @Override
87 protected EClass eStaticClass()
88 {
89 return VampireLanguagePackage.Literals.VLS_FUNCTION_FOF;
90 }
91
92 /**
93 * <!-- begin-user-doc -->
94 * <!-- end-user-doc -->
95 * @generated
96 */
97 public String getFunctor()
98 {
99 return functor;
100 }
101
102 /**
103 * <!-- begin-user-doc -->
104 * <!-- end-user-doc -->
105 * @generated
106 */
107 public void setFunctor(String newFunctor)
108 {
109 String oldFunctor = functor;
110 functor = newFunctor;
111 if (eNotificationRequired())
112 eNotify(new ENotificationImpl(this, Notification.SET, VampireLanguagePackage.VLS_FUNCTION_FOF__FUNCTOR, oldFunctor, functor));
113 }
114
115 /**
116 * <!-- begin-user-doc -->
117 * <!-- end-user-doc -->
118 * @generated
119 */
120 public EList<VLSTerm> getTerms()
121 {
122 if (terms == null)
123 {
124 terms = new EObjectContainmentEList<VLSTerm>(VLSTerm.class, this, VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS);
125 }
126 return terms;
127 }
128
129 /**
130 * <!-- begin-user-doc -->
131 * <!-- end-user-doc -->
132 * @generated
133 */
134 @Override
135 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
136 {
137 switch (featureID)
138 {
139 case VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS:
140 return ((InternalEList<?>)getTerms()).basicRemove(otherEnd, msgs);
141 }
142 return super.eInverseRemove(otherEnd, featureID, msgs);
143 }
144
145 /**
146 * <!-- begin-user-doc -->
147 * <!-- end-user-doc -->
148 * @generated
149 */
150 @Override
151 public Object eGet(int featureID, boolean resolve, boolean coreType)
152 {
153 switch (featureID)
154 {
155 case VampireLanguagePackage.VLS_FUNCTION_FOF__FUNCTOR:
156 return getFunctor();
157 case VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS:
158 return getTerms();
159 }
160 return super.eGet(featureID, resolve, coreType);
161 }
162
163 /**
164 * <!-- begin-user-doc -->
165 * <!-- end-user-doc -->
166 * @generated
167 */
168 @SuppressWarnings("unchecked")
169 @Override
170 public void eSet(int featureID, Object newValue)
171 {
172 switch (featureID)
173 {
174 case VampireLanguagePackage.VLS_FUNCTION_FOF__FUNCTOR:
175 setFunctor((String)newValue);
176 return;
177 case VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS:
178 getTerms().clear();
179 getTerms().addAll((Collection<? extends VLSTerm>)newValue);
180 return;
181 }
182 super.eSet(featureID, newValue);
183 }
184
185 /**
186 * <!-- begin-user-doc -->
187 * <!-- end-user-doc -->
188 * @generated
189 */
190 @Override
191 public void eUnset(int featureID)
192 {
193 switch (featureID)
194 {
195 case VampireLanguagePackage.VLS_FUNCTION_FOF__FUNCTOR:
196 setFunctor(FUNCTOR_EDEFAULT);
197 return;
198 case VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS:
199 getTerms().clear();
200 return;
201 }
202 super.eUnset(featureID);
203 }
204
205 /**
206 * <!-- begin-user-doc -->
207 * <!-- end-user-doc -->
208 * @generated
209 */
210 @Override
211 public boolean eIsSet(int featureID)
212 {
213 switch (featureID)
214 {
215 case VampireLanguagePackage.VLS_FUNCTION_FOF__FUNCTOR:
216 return FUNCTOR_EDEFAULT == null ? functor != null : !FUNCTOR_EDEFAULT.equals(functor);
217 case VampireLanguagePackage.VLS_FUNCTION_FOF__TERMS:
218 return terms != null && !terms.isEmpty();
219 }
220 return super.eIsSet(featureID);
221 }
222
223 /**
224 * <!-- begin-user-doc -->
225 * <!-- end-user-doc -->
226 * @generated
227 */
228 @Override
229 public String toString()
230 {
231 if (eIsProxy()) return super.toString();
232
233 StringBuffer result = new StringBuffer(super.toString());
234 result.append(" (functor: ");
235 result.append(functor);
236 result.append(')');
237 return result.toString();
238 }
239
240} //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 @@
1/**
2 * generated by Xtext 2.12.0
3 */
4package ca.mcgill.ecse.dslreasoner.vampireLanguage.impl;
5
6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTrying;
7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage;
8
9import org.eclipse.emf.common.notify.Notification;
10
11import org.eclipse.emf.ecore.EClass;
12
13import org.eclipse.emf.ecore.impl.ENotificationImpl;
14import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
15
16/**
17 * <!-- begin-user-doc -->
18 * An implementation of the model object '<em><b>VLS Trying</b></em>'.
19 * <!-- end-user-doc -->
20 * <p>
21 * The following features are implemented:
22 * </p>
23 * <ul>
24 * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSTryingImpl#getName <em>Name</em>}</li>
25 * </ul>
26 *
27 * @generated
28 */
29public class VLSTryingImpl extends MinimalEObjectImpl.Container implements VLSTrying
30{
31 /**
32 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @see #getName()
36 * @generated
37 * @ordered
38 */
39 protected static final String NAME_EDEFAULT = null;
40
41 /**
42 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
43 * <!-- begin-user-doc -->
44 * <!-- end-user-doc -->
45 * @see #getName()
46 * @generated
47 * @ordered
48 */
49 protected String name = NAME_EDEFAULT;
50
51 /**
52 * <!-- begin-user-doc -->
53 * <!-- end-user-doc -->
54 * @generated
55 */
56 protected VLSTryingImpl()
57 {
58 super();
59 }
60
61 /**
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @generated
65 */
66 @Override
67 protected EClass eStaticClass()
68 {
69 return VampireLanguagePackage.Literals.VLS_TRYING;
70 }
71
72 /**
73 * <!-- begin-user-doc -->
74 * <!-- end-user-doc -->
75 * @generated
76 */
77 public String getName()
78 {
79 return name;
80 }
81
82 /**
83 * <!-- begin-user-doc -->
84 * <!-- end-user-doc -->
85 * @generated
86 */
87 public void setName(String newName)
88 {
89 String oldName = name;
90 name = newName;
91 if (eNotificationRequired())
92 eNotify(new ENotificationImpl(this, Notification.SET, VampireLanguagePackage.VLS_TRYING__NAME, oldName, name));
93 }
94
95 /**
96 * <!-- begin-user-doc -->
97 * <!-- end-user-doc -->
98 * @generated
99 */
100 @Override
101 public Object eGet(int featureID, boolean resolve, boolean coreType)
102 {
103 switch (featureID)
104 {
105 case VampireLanguagePackage.VLS_TRYING__NAME:
106 return getName();
107 }
108 return super.eGet(featureID, resolve, coreType);
109 }
110
111 /**
112 * <!-- begin-user-doc -->
113 * <!-- end-user-doc -->
114 * @generated
115 */
116 @Override
117 public void eSet(int featureID, Object newValue)
118 {
119 switch (featureID)
120 {
121 case VampireLanguagePackage.VLS_TRYING__NAME:
122 setName((String)newValue);
123 return;
124 }
125 super.eSet(featureID, newValue);
126 }
127
128 /**
129 * <!-- begin-user-doc -->
130 * <!-- end-user-doc -->
131 * @generated
132 */
133 @Override
134 public void eUnset(int featureID)
135 {
136 switch (featureID)
137 {
138 case VampireLanguagePackage.VLS_TRYING__NAME:
139 setName(NAME_EDEFAULT);
140 return;
141 }
142 super.eUnset(featureID);
143 }
144
145 /**
146 * <!-- begin-user-doc -->
147 * <!-- end-user-doc -->
148 * @generated
149 */
150 @Override
151 public boolean eIsSet(int featureID)
152 {
153 switch (featureID)
154 {
155 case VampireLanguagePackage.VLS_TRYING__NAME:
156 return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
157 }
158 return super.eIsSet(featureID);
159 }
160
161 /**
162 * <!-- begin-user-doc -->
163 * <!-- end-user-doc -->
164 * @generated
165 */
166 @Override
167 public String toString()
168 {
169 if (eIsProxy()) return super.toString();
170
171 StringBuffer result = new StringBuffer(super.toString());
172 result.append(" (name: ");
173 result.append(name);
174 result.append(')');
175 return result.toString();
176 }
177
178} //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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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 @@
1/bin/ 1/bin/
2/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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern VLSAnd(term: VLSAnd){
44 * VLSAnd(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSAnd extends BaseGeneratedEMFQuerySpecification<VLSAnd.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
72 this.fTerm = pTerm;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm;
78 return null;
79 }
80
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd getTerm() {
82 return this.fTerm;
83 }
84
85 @Override
86 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm;
98 }
99
100 @Override
101 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSAnd.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSAnd.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this;
118 }
119
120 @Override
121 public String prettyPrint() {
122 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm));
124 return result.toString();
125 }
126
127 @Override
128 public int hashCode() {
129 return Objects.hash(fTerm);
130 }
131
132 @Override
133 public boolean equals(final Object obj) {
134 if (this == obj)
135 return true;
136 if (obj == null) {
137 return false;
138 }
139 if ((obj instanceof VLSAnd.Match)) {
140 VLSAnd.Match other = (VLSAnd.Match) obj;
141 return Objects.equals(fTerm, other.fTerm);
142 } else {
143 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) {
145 return false;
146 }
147 IPatternMatch otherSig = (IPatternMatch) obj;
148 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
149 }
150 }
151
152 @Override
153 public VLSAnd specification() {
154 return VLSAnd.instance();
155 }
156
157 /**
158 * Returns an empty, mutable match.
159 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
160 *
161 * @return the empty match.
162 *
163 */
164 public static VLSAnd.Match newEmptyMatch() {
165 return new Mutable(null);
166 }
167
168 /**
169 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
173 * @return the new, mutable (partial) match object.
174 *
175 */
176 public static VLSAnd.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
177 return new Mutable(pTerm);
178 }
179
180 /**
181 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
185 * @return the (partial) match object.
186 *
187 */
188 public static VLSAnd.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSAnd.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
194 super(pTerm);
195 }
196
197 @Override
198 public boolean isMutable() {
199 return true;
200 }
201 }
202
203 private static final class Immutable extends VLSAnd.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
205 super(pTerm);
206 }
207
208 @Override
209 public boolean isMutable() {
210 return false;
211 }
212 }
213 }
214
215 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd pattern,
217 * providing pattern-specific query methods.
218 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
220 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
221 *
222 * <p>Matches of the pattern will be represented as {@link Match}.
223 *
224 * <p>Original source:
225 * <code><pre>
226 * pattern VLSAnd(term: VLSAnd){
227 * VLSAnd(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSAnd
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSAnd.Match> {
236 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
239 *
240 * @param engine the existing VIATRA Query engine in which this matcher will be created.
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 *
243 */
244 public static VLSAnd.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) {
248 matcher = (Matcher)engine.getMatcher(querySpecification());
249 }
250 return matcher;
251 }
252
253 /**
254 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
255 * @return an initialized matcher
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 *
258 */
259 public static VLSAnd.Matcher create() {
260 return new Matcher();
261 }
262
263 private final static int POSITION_TERM = 0;
264
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSAnd.Matcher.class);
266
267 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine.
269 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
270 *
271 * @param engine the existing VIATRA Query engine in which this matcher will be created.
272 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
273 *
274 */
275 private Matcher() {
276 super(querySpecification());
277 }
278
279 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
282 * @return matches represented as a Match object.
283 *
284 */
285 public Collection<VLSAnd.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 }
288
289 /**
290 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
291 * </p>
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
296 * @return a stream of matches represented as a Match object.
297 *
298 */
299 public Stream<VLSAnd.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm});
301 }
302
303 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found.
308 *
309 */
310 public Optional<VLSAnd.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 }
313
314 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern.
319 *
320 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
322 return rawHasMatch(new Object[]{pTerm});
323 }
324
325 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
328 * @return the number of pattern matches found.
329 *
330 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
332 return rawCountMatches(new Object[]{pTerm});
333 }
334
335 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
339 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 *
342 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm, final Consumer<? super VLSAnd.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 }
346
347 /**
348 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
352 * @return the (partial) match object.
353 *
354 */
355 public VLSAnd.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd pTerm) {
356 return VLSAnd.Match.newMatch(pTerm);
357 }
358
359 /**
360 * Retrieve the set of values that occur in matches for term.
361 * @return the Set of all values or empty set if there are no matches
362 *
363 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd.class::cast);
366 }
367
368 /**
369 * Retrieve the set of values that occur in matches for term.
370 * @return the Set of all values or empty set if there are no matches
371 *
372 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 }
376
377 /**
378 * Retrieve the set of values that occur in matches for term.
379 * @return the Set of all values or empty set if there are no matches
380 *
381 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSAnd.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSAnd.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd) t.get(POSITION_TERM));
390 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null;
393 }
394 }
395
396 @Override
397 protected VLSAnd.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSAnd.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd) match[POSITION_TERM]);
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected VLSAnd.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSAnd.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd) match[POSITION_TERM]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 /**
417 * @return the singleton instance of the query specification of this pattern
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 *
420 */
421 public static IQuerySpecification<VLSAnd.Matcher> querySpecification() {
422 return VLSAnd.instance();
423 }
424 }
425
426 private VLSAnd() {
427 super(GeneratedPQuery.INSTANCE);
428 }
429
430 /**
431 * @return the singleton instance of the query specification
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 *
434 */
435 public static VLSAnd instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSAnd.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSAnd.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSAnd.Matcher instantiate() {
450 return VLSAnd.Matcher.create();
451 }
452
453 @Override
454 public VLSAnd.Match newEmptyMatch() {
455 return VLSAnd.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSAnd.Match newMatch(final Object... parameters) {
460 return VLSAnd.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd) parameters[0]);
461 }
462
463 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSAnd INSTANCE = new VLSAnd();
473
474 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
476 * This initialization order is required to support indirect recursion.
477 *
478 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
479 *
480 */
481 private final static Object STATIC_INITIALIZER = ensureInitialized();
482
483 public static Object ensureInitialized() {
484 INSTANCE.ensureInitializedInternal();
485 return null;
486 }
487 }
488
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSAnd.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
492 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);
493
494 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495
496 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC);
498 }
499
500 @Override
501 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd";
503 }
504
505 @Override
506 public List<String> getParameterNames() {
507 return Arrays.asList("term");
508 }
509
510 @Override
511 public List<PParameter> getParameters() {
512 return parameters;
513 }
514
515 @Override
516 public Set<PBody> doGetContainedBodies() {
517 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
518 Set<PBody> bodies = new LinkedHashSet<>();
519 {
520 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSAnd")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSAnd(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSAnd")));
528 bodies.add(body);
529 }
530 return bodies;
531 }
532 }
533}
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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern VLSAnnotation(term: VLSAnnotation){
44 * VLSAnnotation(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSAnnotation extends BaseGeneratedEMFQuerySpecification<VLSAnnotation.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
72 this.fTerm = pTerm;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm;
78 return null;
79 }
80
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation getTerm() {
82 return this.fTerm;
83 }
84
85 @Override
86 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm;
98 }
99
100 @Override
101 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSAnnotation.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSAnnotation.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this;
118 }
119
120 @Override
121 public String prettyPrint() {
122 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm));
124 return result.toString();
125 }
126
127 @Override
128 public int hashCode() {
129 return Objects.hash(fTerm);
130 }
131
132 @Override
133 public boolean equals(final Object obj) {
134 if (this == obj)
135 return true;
136 if (obj == null) {
137 return false;
138 }
139 if ((obj instanceof VLSAnnotation.Match)) {
140 VLSAnnotation.Match other = (VLSAnnotation.Match) obj;
141 return Objects.equals(fTerm, other.fTerm);
142 } else {
143 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) {
145 return false;
146 }
147 IPatternMatch otherSig = (IPatternMatch) obj;
148 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
149 }
150 }
151
152 @Override
153 public VLSAnnotation specification() {
154 return VLSAnnotation.instance();
155 }
156
157 /**
158 * Returns an empty, mutable match.
159 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
160 *
161 * @return the empty match.
162 *
163 */
164 public static VLSAnnotation.Match newEmptyMatch() {
165 return new Mutable(null);
166 }
167
168 /**
169 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
173 * @return the new, mutable (partial) match object.
174 *
175 */
176 public static VLSAnnotation.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
177 return new Mutable(pTerm);
178 }
179
180 /**
181 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
185 * @return the (partial) match object.
186 *
187 */
188 public static VLSAnnotation.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSAnnotation.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
194 super(pTerm);
195 }
196
197 @Override
198 public boolean isMutable() {
199 return true;
200 }
201 }
202
203 private static final class Immutable extends VLSAnnotation.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
205 super(pTerm);
206 }
207
208 @Override
209 public boolean isMutable() {
210 return false;
211 }
212 }
213 }
214
215 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation pattern,
217 * providing pattern-specific query methods.
218 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
220 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
221 *
222 * <p>Matches of the pattern will be represented as {@link Match}.
223 *
224 * <p>Original source:
225 * <code><pre>
226 * pattern VLSAnnotation(term: VLSAnnotation){
227 * VLSAnnotation(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSAnnotation
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSAnnotation.Match> {
236 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
239 *
240 * @param engine the existing VIATRA Query engine in which this matcher will be created.
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 *
243 */
244 public static VLSAnnotation.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) {
248 matcher = (Matcher)engine.getMatcher(querySpecification());
249 }
250 return matcher;
251 }
252
253 /**
254 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
255 * @return an initialized matcher
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 *
258 */
259 public static VLSAnnotation.Matcher create() {
260 return new Matcher();
261 }
262
263 private final static int POSITION_TERM = 0;
264
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSAnnotation.Matcher.class);
266
267 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine.
269 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
270 *
271 * @param engine the existing VIATRA Query engine in which this matcher will be created.
272 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
273 *
274 */
275 private Matcher() {
276 super(querySpecification());
277 }
278
279 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
282 * @return matches represented as a Match object.
283 *
284 */
285 public Collection<VLSAnnotation.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 }
288
289 /**
290 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
291 * </p>
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
296 * @return a stream of matches represented as a Match object.
297 *
298 */
299 public Stream<VLSAnnotation.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm});
301 }
302
303 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found.
308 *
309 */
310 public Optional<VLSAnnotation.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 }
313
314 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern.
319 *
320 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
322 return rawHasMatch(new Object[]{pTerm});
323 }
324
325 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
328 * @return the number of pattern matches found.
329 *
330 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
332 return rawCountMatches(new Object[]{pTerm});
333 }
334
335 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
339 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 *
342 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm, final Consumer<? super VLSAnnotation.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 }
346
347 /**
348 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
352 * @return the (partial) match object.
353 *
354 */
355 public VLSAnnotation.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation pTerm) {
356 return VLSAnnotation.Match.newMatch(pTerm);
357 }
358
359 /**
360 * Retrieve the set of values that occur in matches for term.
361 * @return the Set of all values or empty set if there are no matches
362 *
363 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation.class::cast);
366 }
367
368 /**
369 * Retrieve the set of values that occur in matches for term.
370 * @return the Set of all values or empty set if there are no matches
371 *
372 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 }
376
377 /**
378 * Retrieve the set of values that occur in matches for term.
379 * @return the Set of all values or empty set if there are no matches
380 *
381 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSAnnotation.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSAnnotation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation) t.get(POSITION_TERM));
390 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null;
393 }
394 }
395
396 @Override
397 protected VLSAnnotation.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSAnnotation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation) match[POSITION_TERM]);
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected VLSAnnotation.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSAnnotation.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation) match[POSITION_TERM]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 /**
417 * @return the singleton instance of the query specification of this pattern
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 *
420 */
421 public static IQuerySpecification<VLSAnnotation.Matcher> querySpecification() {
422 return VLSAnnotation.instance();
423 }
424 }
425
426 private VLSAnnotation() {
427 super(GeneratedPQuery.INSTANCE);
428 }
429
430 /**
431 * @return the singleton instance of the query specification
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 *
434 */
435 public static VLSAnnotation instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSAnnotation.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSAnnotation.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSAnnotation.Matcher instantiate() {
450 return VLSAnnotation.Matcher.create();
451 }
452
453 @Override
454 public VLSAnnotation.Match newEmptyMatch() {
455 return VLSAnnotation.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSAnnotation.Match newMatch(final Object... parameters) {
460 return VLSAnnotation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation) parameters[0]);
461 }
462
463 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSAnnotation INSTANCE = new VLSAnnotation();
473
474 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
476 * This initialization order is required to support indirect recursion.
477 *
478 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
479 *
480 */
481 private final static Object STATIC_INITIALIZER = ensureInitialized();
482
483 public static Object ensureInitialized() {
484 INSTANCE.ensureInitializedInternal();
485 return null;
486 }
487 }
488
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSAnnotation.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
492 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);
493
494 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495
496 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC);
498 }
499
500 @Override
501 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation";
503 }
504
505 @Override
506 public List<String> getParameterNames() {
507 return Arrays.asList("term");
508 }
509
510 @Override
511 public List<PParameter> getParameters() {
512 return parameters;
513 }
514
515 @Override
516 public Set<PBody> doGetContainedBodies() {
517 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
518 Set<PBody> bodies = new LinkedHashSet<>();
519 {
520 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSAnnotation")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSAnnotation(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSAnnotation")));
528 bodies.add(body);
529 }
530 return bodies;
531 }
532 }
533}
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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern VLSComment(term: VLSComment){
44 * VLSComment(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSComment extends BaseGeneratedEMFQuerySpecification<VLSComment.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
72 this.fTerm = pTerm;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm;
78 return null;
79 }
80
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment getTerm() {
82 return this.fTerm;
83 }
84
85 @Override
86 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm;
98 }
99
100 @Override
101 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSComment.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSComment.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this;
118 }
119
120 @Override
121 public String prettyPrint() {
122 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm));
124 return result.toString();
125 }
126
127 @Override
128 public int hashCode() {
129 return Objects.hash(fTerm);
130 }
131
132 @Override
133 public boolean equals(final Object obj) {
134 if (this == obj)
135 return true;
136 if (obj == null) {
137 return false;
138 }
139 if ((obj instanceof VLSComment.Match)) {
140 VLSComment.Match other = (VLSComment.Match) obj;
141 return Objects.equals(fTerm, other.fTerm);
142 } else {
143 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) {
145 return false;
146 }
147 IPatternMatch otherSig = (IPatternMatch) obj;
148 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
149 }
150 }
151
152 @Override
153 public VLSComment specification() {
154 return VLSComment.instance();
155 }
156
157 /**
158 * Returns an empty, mutable match.
159 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
160 *
161 * @return the empty match.
162 *
163 */
164 public static VLSComment.Match newEmptyMatch() {
165 return new Mutable(null);
166 }
167
168 /**
169 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
173 * @return the new, mutable (partial) match object.
174 *
175 */
176 public static VLSComment.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
177 return new Mutable(pTerm);
178 }
179
180 /**
181 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
185 * @return the (partial) match object.
186 *
187 */
188 public static VLSComment.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSComment.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
194 super(pTerm);
195 }
196
197 @Override
198 public boolean isMutable() {
199 return true;
200 }
201 }
202
203 private static final class Immutable extends VLSComment.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
205 super(pTerm);
206 }
207
208 @Override
209 public boolean isMutable() {
210 return false;
211 }
212 }
213 }
214
215 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment pattern,
217 * providing pattern-specific query methods.
218 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
220 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
221 *
222 * <p>Matches of the pattern will be represented as {@link Match}.
223 *
224 * <p>Original source:
225 * <code><pre>
226 * pattern VLSComment(term: VLSComment){
227 * VLSComment(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSComment
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSComment.Match> {
236 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
239 *
240 * @param engine the existing VIATRA Query engine in which this matcher will be created.
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 *
243 */
244 public static VLSComment.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) {
248 matcher = (Matcher)engine.getMatcher(querySpecification());
249 }
250 return matcher;
251 }
252
253 /**
254 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
255 * @return an initialized matcher
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 *
258 */
259 public static VLSComment.Matcher create() {
260 return new Matcher();
261 }
262
263 private final static int POSITION_TERM = 0;
264
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSComment.Matcher.class);
266
267 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine.
269 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
270 *
271 * @param engine the existing VIATRA Query engine in which this matcher will be created.
272 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
273 *
274 */
275 private Matcher() {
276 super(querySpecification());
277 }
278
279 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
282 * @return matches represented as a Match object.
283 *
284 */
285 public Collection<VLSComment.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 }
288
289 /**
290 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
291 * </p>
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
296 * @return a stream of matches represented as a Match object.
297 *
298 */
299 public Stream<VLSComment.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm});
301 }
302
303 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found.
308 *
309 */
310 public Optional<VLSComment.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 }
313
314 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern.
319 *
320 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
322 return rawHasMatch(new Object[]{pTerm});
323 }
324
325 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
328 * @return the number of pattern matches found.
329 *
330 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
332 return rawCountMatches(new Object[]{pTerm});
333 }
334
335 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
339 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 *
342 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm, final Consumer<? super VLSComment.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 }
346
347 /**
348 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
352 * @return the (partial) match object.
353 *
354 */
355 public VLSComment.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment pTerm) {
356 return VLSComment.Match.newMatch(pTerm);
357 }
358
359 /**
360 * Retrieve the set of values that occur in matches for term.
361 * @return the Set of all values or empty set if there are no matches
362 *
363 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment.class::cast);
366 }
367
368 /**
369 * Retrieve the set of values that occur in matches for term.
370 * @return the Set of all values or empty set if there are no matches
371 *
372 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 }
376
377 /**
378 * Retrieve the set of values that occur in matches for term.
379 * @return the Set of all values or empty set if there are no matches
380 *
381 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSComment.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSComment.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment) t.get(POSITION_TERM));
390 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null;
393 }
394 }
395
396 @Override
397 protected VLSComment.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSComment.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment) match[POSITION_TERM]);
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected VLSComment.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSComment.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment) match[POSITION_TERM]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 /**
417 * @return the singleton instance of the query specification of this pattern
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 *
420 */
421 public static IQuerySpecification<VLSComment.Matcher> querySpecification() {
422 return VLSComment.instance();
423 }
424 }
425
426 private VLSComment() {
427 super(GeneratedPQuery.INSTANCE);
428 }
429
430 /**
431 * @return the singleton instance of the query specification
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 *
434 */
435 public static VLSComment instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSComment.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSComment.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSComment.Matcher instantiate() {
450 return VLSComment.Matcher.create();
451 }
452
453 @Override
454 public VLSComment.Match newEmptyMatch() {
455 return VLSComment.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSComment.Match newMatch(final Object... parameters) {
460 return VLSComment.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment) parameters[0]);
461 }
462
463 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSComment INSTANCE = new VLSComment();
473
474 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
476 * This initialization order is required to support indirect recursion.
477 *
478 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
479 *
480 */
481 private final static Object STATIC_INITIALIZER = ensureInitialized();
482
483 public static Object ensureInitialized() {
484 INSTANCE.ensureInitializedInternal();
485 return null;
486 }
487 }
488
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSComment.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
492 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);
493
494 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495
496 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC);
498 }
499
500 @Override
501 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment";
503 }
504
505 @Override
506 public List<String> getParameterNames() {
507 return Arrays.asList("term");
508 }
509
510 @Override
511 public List<PParameter> getParameters() {
512 return parameters;
513 }
514
515 @Override
516 public Set<PBody> doGetContainedBodies() {
517 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
518 Set<PBody> bodies = new LinkedHashSet<>();
519 {
520 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSComment")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSComment(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSComment")));
528 bodies.add(body);
529 }
530 return bodies;
531 }
532 }
533}
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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern VLSEquivalent(term: VLSEquivalent){
44 * VLSEquivalent(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSEquivalent extends BaseGeneratedEMFQuerySpecification<VLSEquivalent.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
72 this.fTerm = pTerm;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm;
78 return null;
79 }
80
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent getTerm() {
82 return this.fTerm;
83 }
84
85 @Override
86 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm;
98 }
99
100 @Override
101 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSEquivalent.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSEquivalent.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this;
118 }
119
120 @Override
121 public String prettyPrint() {
122 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm));
124 return result.toString();
125 }
126
127 @Override
128 public int hashCode() {
129 return Objects.hash(fTerm);
130 }
131
132 @Override
133 public boolean equals(final Object obj) {
134 if (this == obj)
135 return true;
136 if (obj == null) {
137 return false;
138 }
139 if ((obj instanceof VLSEquivalent.Match)) {
140 VLSEquivalent.Match other = (VLSEquivalent.Match) obj;
141 return Objects.equals(fTerm, other.fTerm);
142 } else {
143 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) {
145 return false;
146 }
147 IPatternMatch otherSig = (IPatternMatch) obj;
148 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
149 }
150 }
151
152 @Override
153 public VLSEquivalent specification() {
154 return VLSEquivalent.instance();
155 }
156
157 /**
158 * Returns an empty, mutable match.
159 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
160 *
161 * @return the empty match.
162 *
163 */
164 public static VLSEquivalent.Match newEmptyMatch() {
165 return new Mutable(null);
166 }
167
168 /**
169 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
173 * @return the new, mutable (partial) match object.
174 *
175 */
176 public static VLSEquivalent.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
177 return new Mutable(pTerm);
178 }
179
180 /**
181 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
185 * @return the (partial) match object.
186 *
187 */
188 public static VLSEquivalent.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSEquivalent.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
194 super(pTerm);
195 }
196
197 @Override
198 public boolean isMutable() {
199 return true;
200 }
201 }
202
203 private static final class Immutable extends VLSEquivalent.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
205 super(pTerm);
206 }
207
208 @Override
209 public boolean isMutable() {
210 return false;
211 }
212 }
213 }
214
215 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent pattern,
217 * providing pattern-specific query methods.
218 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
220 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
221 *
222 * <p>Matches of the pattern will be represented as {@link Match}.
223 *
224 * <p>Original source:
225 * <code><pre>
226 * pattern VLSEquivalent(term: VLSEquivalent){
227 * VLSEquivalent(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSEquivalent
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSEquivalent.Match> {
236 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
239 *
240 * @param engine the existing VIATRA Query engine in which this matcher will be created.
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 *
243 */
244 public static VLSEquivalent.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) {
248 matcher = (Matcher)engine.getMatcher(querySpecification());
249 }
250 return matcher;
251 }
252
253 /**
254 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
255 * @return an initialized matcher
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 *
258 */
259 public static VLSEquivalent.Matcher create() {
260 return new Matcher();
261 }
262
263 private final static int POSITION_TERM = 0;
264
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSEquivalent.Matcher.class);
266
267 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine.
269 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
270 *
271 * @param engine the existing VIATRA Query engine in which this matcher will be created.
272 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
273 *
274 */
275 private Matcher() {
276 super(querySpecification());
277 }
278
279 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
282 * @return matches represented as a Match object.
283 *
284 */
285 public Collection<VLSEquivalent.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 }
288
289 /**
290 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
291 * </p>
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
296 * @return a stream of matches represented as a Match object.
297 *
298 */
299 public Stream<VLSEquivalent.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm});
301 }
302
303 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found.
308 *
309 */
310 public Optional<VLSEquivalent.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 }
313
314 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern.
319 *
320 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
322 return rawHasMatch(new Object[]{pTerm});
323 }
324
325 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
328 * @return the number of pattern matches found.
329 *
330 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
332 return rawCountMatches(new Object[]{pTerm});
333 }
334
335 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
339 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 *
342 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm, final Consumer<? super VLSEquivalent.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 }
346
347 /**
348 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
352 * @return the (partial) match object.
353 *
354 */
355 public VLSEquivalent.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent pTerm) {
356 return VLSEquivalent.Match.newMatch(pTerm);
357 }
358
359 /**
360 * Retrieve the set of values that occur in matches for term.
361 * @return the Set of all values or empty set if there are no matches
362 *
363 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent.class::cast);
366 }
367
368 /**
369 * Retrieve the set of values that occur in matches for term.
370 * @return the Set of all values or empty set if there are no matches
371 *
372 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 }
376
377 /**
378 * Retrieve the set of values that occur in matches for term.
379 * @return the Set of all values or empty set if there are no matches
380 *
381 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSEquivalent.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSEquivalent.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent) t.get(POSITION_TERM));
390 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null;
393 }
394 }
395
396 @Override
397 protected VLSEquivalent.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSEquivalent.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent) match[POSITION_TERM]);
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected VLSEquivalent.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSEquivalent.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent) match[POSITION_TERM]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 /**
417 * @return the singleton instance of the query specification of this pattern
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 *
420 */
421 public static IQuerySpecification<VLSEquivalent.Matcher> querySpecification() {
422 return VLSEquivalent.instance();
423 }
424 }
425
426 private VLSEquivalent() {
427 super(GeneratedPQuery.INSTANCE);
428 }
429
430 /**
431 * @return the singleton instance of the query specification
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 *
434 */
435 public static VLSEquivalent instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSEquivalent.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSEquivalent.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSEquivalent.Matcher instantiate() {
450 return VLSEquivalent.Matcher.create();
451 }
452
453 @Override
454 public VLSEquivalent.Match newEmptyMatch() {
455 return VLSEquivalent.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSEquivalent.Match newMatch(final Object... parameters) {
460 return VLSEquivalent.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent) parameters[0]);
461 }
462
463 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSEquivalent INSTANCE = new VLSEquivalent();
473
474 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
476 * This initialization order is required to support indirect recursion.
477 *
478 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
479 *
480 */
481 private final static Object STATIC_INITIALIZER = ensureInitialized();
482
483 public static Object ensureInitialized() {
484 INSTANCE.ensureInitializedInternal();
485 return null;
486 }
487 }
488
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSEquivalent.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
492 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);
493
494 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495
496 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC);
498 }
499
500 @Override
501 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent";
503 }
504
505 @Override
506 public List<String> getParameterNames() {
507 return Arrays.asList("term");
508 }
509
510 @Override
511 public List<PParameter> getParameters() {
512 return parameters;
513 }
514
515 @Override
516 public Set<PBody> doGetContainedBodies() {
517 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
518 Set<PBody> bodies = new LinkedHashSet<>();
519 {
520 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSEquivalent")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSEquivalent(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSEquivalent")));
528 bodies.add(body);
529 }
530 return bodies;
531 }
532 }
533}
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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern VLSExistentialQuantifier(term: VLSExistentialQuantifier){
44 * VLSExistentialQuantifier(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSExistentialQuantifier extends BaseGeneratedEMFQuerySpecification<VLSExistentialQuantifier.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
72 this.fTerm = pTerm;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm;
78 return null;
79 }
80
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier getTerm() {
82 return this.fTerm;
83 }
84
85 @Override
86 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm;
98 }
99
100 @Override
101 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSExistentialQuantifier.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSExistentialQuantifier.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this;
118 }
119
120 @Override
121 public String prettyPrint() {
122 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm));
124 return result.toString();
125 }
126
127 @Override
128 public int hashCode() {
129 return Objects.hash(fTerm);
130 }
131
132 @Override
133 public boolean equals(final Object obj) {
134 if (this == obj)
135 return true;
136 if (obj == null) {
137 return false;
138 }
139 if ((obj instanceof VLSExistentialQuantifier.Match)) {
140 VLSExistentialQuantifier.Match other = (VLSExistentialQuantifier.Match) obj;
141 return Objects.equals(fTerm, other.fTerm);
142 } else {
143 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) {
145 return false;
146 }
147 IPatternMatch otherSig = (IPatternMatch) obj;
148 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
149 }
150 }
151
152 @Override
153 public VLSExistentialQuantifier specification() {
154 return VLSExistentialQuantifier.instance();
155 }
156
157 /**
158 * Returns an empty, mutable match.
159 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
160 *
161 * @return the empty match.
162 *
163 */
164 public static VLSExistentialQuantifier.Match newEmptyMatch() {
165 return new Mutable(null);
166 }
167
168 /**
169 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
173 * @return the new, mutable (partial) match object.
174 *
175 */
176 public static VLSExistentialQuantifier.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
177 return new Mutable(pTerm);
178 }
179
180 /**
181 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
185 * @return the (partial) match object.
186 *
187 */
188 public static VLSExistentialQuantifier.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSExistentialQuantifier.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
194 super(pTerm);
195 }
196
197 @Override
198 public boolean isMutable() {
199 return true;
200 }
201 }
202
203 private static final class Immutable extends VLSExistentialQuantifier.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
205 super(pTerm);
206 }
207
208 @Override
209 public boolean isMutable() {
210 return false;
211 }
212 }
213 }
214
215 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier pattern,
217 * providing pattern-specific query methods.
218 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
220 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
221 *
222 * <p>Matches of the pattern will be represented as {@link Match}.
223 *
224 * <p>Original source:
225 * <code><pre>
226 * pattern VLSExistentialQuantifier(term: VLSExistentialQuantifier){
227 * VLSExistentialQuantifier(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSExistentialQuantifier
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSExistentialQuantifier.Match> {
236 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
239 *
240 * @param engine the existing VIATRA Query engine in which this matcher will be created.
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 *
243 */
244 public static VLSExistentialQuantifier.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) {
248 matcher = (Matcher)engine.getMatcher(querySpecification());
249 }
250 return matcher;
251 }
252
253 /**
254 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
255 * @return an initialized matcher
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 *
258 */
259 public static VLSExistentialQuantifier.Matcher create() {
260 return new Matcher();
261 }
262
263 private final static int POSITION_TERM = 0;
264
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSExistentialQuantifier.Matcher.class);
266
267 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine.
269 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
270 *
271 * @param engine the existing VIATRA Query engine in which this matcher will be created.
272 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
273 *
274 */
275 private Matcher() {
276 super(querySpecification());
277 }
278
279 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
282 * @return matches represented as a Match object.
283 *
284 */
285 public Collection<VLSExistentialQuantifier.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 }
288
289 /**
290 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
291 * </p>
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
296 * @return a stream of matches represented as a Match object.
297 *
298 */
299 public Stream<VLSExistentialQuantifier.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm});
301 }
302
303 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found.
308 *
309 */
310 public Optional<VLSExistentialQuantifier.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 }
313
314 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern.
319 *
320 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
322 return rawHasMatch(new Object[]{pTerm});
323 }
324
325 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
328 * @return the number of pattern matches found.
329 *
330 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
332 return rawCountMatches(new Object[]{pTerm});
333 }
334
335 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
339 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 *
342 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm, final Consumer<? super VLSExistentialQuantifier.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 }
346
347 /**
348 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
352 * @return the (partial) match object.
353 *
354 */
355 public VLSExistentialQuantifier.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier pTerm) {
356 return VLSExistentialQuantifier.Match.newMatch(pTerm);
357 }
358
359 /**
360 * Retrieve the set of values that occur in matches for term.
361 * @return the Set of all values or empty set if there are no matches
362 *
363 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier.class::cast);
366 }
367
368 /**
369 * Retrieve the set of values that occur in matches for term.
370 * @return the Set of all values or empty set if there are no matches
371 *
372 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 }
376
377 /**
378 * Retrieve the set of values that occur in matches for term.
379 * @return the Set of all values or empty set if there are no matches
380 *
381 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSExistentialQuantifier.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSExistentialQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier) t.get(POSITION_TERM));
390 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null;
393 }
394 }
395
396 @Override
397 protected VLSExistentialQuantifier.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSExistentialQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier) match[POSITION_TERM]);
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected VLSExistentialQuantifier.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSExistentialQuantifier.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier) match[POSITION_TERM]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 /**
417 * @return the singleton instance of the query specification of this pattern
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 *
420 */
421 public static IQuerySpecification<VLSExistentialQuantifier.Matcher> querySpecification() {
422 return VLSExistentialQuantifier.instance();
423 }
424 }
425
426 private VLSExistentialQuantifier() {
427 super(GeneratedPQuery.INSTANCE);
428 }
429
430 /**
431 * @return the singleton instance of the query specification
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 *
434 */
435 public static VLSExistentialQuantifier instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSExistentialQuantifier.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSExistentialQuantifier.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSExistentialQuantifier.Matcher instantiate() {
450 return VLSExistentialQuantifier.Matcher.create();
451 }
452
453 @Override
454 public VLSExistentialQuantifier.Match newEmptyMatch() {
455 return VLSExistentialQuantifier.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSExistentialQuantifier.Match newMatch(final Object... parameters) {
460 return VLSExistentialQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier) parameters[0]);
461 }
462
463 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSExistentialQuantifier INSTANCE = new VLSExistentialQuantifier();
473
474 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
476 * This initialization order is required to support indirect recursion.
477 *
478 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
479 *
480 */
481 private final static Object STATIC_INITIALIZER = ensureInitialized();
482
483 public static Object ensureInitialized() {
484 INSTANCE.ensureInitializedInternal();
485 return null;
486 }
487 }
488
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSExistentialQuantifier.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
492 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);
493
494 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495
496 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC);
498 }
499
500 @Override
501 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier";
503 }
504
505 @Override
506 public List<String> getParameterNames() {
507 return Arrays.asList("term");
508 }
509
510 @Override
511 public List<PParameter> getParameters() {
512 return parameters;
513 }
514
515 @Override
516 public Set<PBody> doGetContainedBodies() {
517 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
518 Set<PBody> bodies = new LinkedHashSet<>();
519 {
520 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSExistentialQuantifier")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSExistentialQuantifier(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSExistentialQuantifier")));
528 bodies.add(body);
529 }
530 return bodies;
531 }
532 }
533}
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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern VLSFofFormula(term: VLSFofFormula){
44 * VLSFofFormula(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSFofFormula extends BaseGeneratedEMFQuerySpecification<VLSFofFormula.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
72 this.fTerm = pTerm;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm;
78 return null;
79 }
80
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula getTerm() {
82 return this.fTerm;
83 }
84
85 @Override
86 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm;
98 }
99
100 @Override
101 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSFofFormula.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSFofFormula.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this;
118 }
119
120 @Override
121 public String prettyPrint() {
122 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm));
124 return result.toString();
125 }
126
127 @Override
128 public int hashCode() {
129 return Objects.hash(fTerm);
130 }
131
132 @Override
133 public boolean equals(final Object obj) {
134 if (this == obj)
135 return true;
136 if (obj == null) {
137 return false;
138 }
139 if ((obj instanceof VLSFofFormula.Match)) {
140 VLSFofFormula.Match other = (VLSFofFormula.Match) obj;
141 return Objects.equals(fTerm, other.fTerm);
142 } else {
143 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) {
145 return false;
146 }
147 IPatternMatch otherSig = (IPatternMatch) obj;
148 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
149 }
150 }
151
152 @Override
153 public VLSFofFormula specification() {
154 return VLSFofFormula.instance();
155 }
156
157 /**
158 * Returns an empty, mutable match.
159 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
160 *
161 * @return the empty match.
162 *
163 */
164 public static VLSFofFormula.Match newEmptyMatch() {
165 return new Mutable(null);
166 }
167
168 /**
169 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
173 * @return the new, mutable (partial) match object.
174 *
175 */
176 public static VLSFofFormula.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
177 return new Mutable(pTerm);
178 }
179
180 /**
181 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
185 * @return the (partial) match object.
186 *
187 */
188 public static VLSFofFormula.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSFofFormula.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
194 super(pTerm);
195 }
196
197 @Override
198 public boolean isMutable() {
199 return true;
200 }
201 }
202
203 private static final class Immutable extends VLSFofFormula.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
205 super(pTerm);
206 }
207
208 @Override
209 public boolean isMutable() {
210 return false;
211 }
212 }
213 }
214
215 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula pattern,
217 * providing pattern-specific query methods.
218 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
220 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
221 *
222 * <p>Matches of the pattern will be represented as {@link Match}.
223 *
224 * <p>Original source:
225 * <code><pre>
226 * pattern VLSFofFormula(term: VLSFofFormula){
227 * VLSFofFormula(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSFofFormula
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSFofFormula.Match> {
236 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
239 *
240 * @param engine the existing VIATRA Query engine in which this matcher will be created.
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 *
243 */
244 public static VLSFofFormula.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) {
248 matcher = (Matcher)engine.getMatcher(querySpecification());
249 }
250 return matcher;
251 }
252
253 /**
254 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
255 * @return an initialized matcher
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 *
258 */
259 public static VLSFofFormula.Matcher create() {
260 return new Matcher();
261 }
262
263 private final static int POSITION_TERM = 0;
264
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSFofFormula.Matcher.class);
266
267 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine.
269 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
270 *
271 * @param engine the existing VIATRA Query engine in which this matcher will be created.
272 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
273 *
274 */
275 private Matcher() {
276 super(querySpecification());
277 }
278
279 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
282 * @return matches represented as a Match object.
283 *
284 */
285 public Collection<VLSFofFormula.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 }
288
289 /**
290 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
291 * </p>
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
296 * @return a stream of matches represented as a Match object.
297 *
298 */
299 public Stream<VLSFofFormula.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm});
301 }
302
303 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found.
308 *
309 */
310 public Optional<VLSFofFormula.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 }
313
314 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern.
319 *
320 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
322 return rawHasMatch(new Object[]{pTerm});
323 }
324
325 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
328 * @return the number of pattern matches found.
329 *
330 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
332 return rawCountMatches(new Object[]{pTerm});
333 }
334
335 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
339 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 *
342 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm, final Consumer<? super VLSFofFormula.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 }
346
347 /**
348 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
352 * @return the (partial) match object.
353 *
354 */
355 public VLSFofFormula.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula pTerm) {
356 return VLSFofFormula.Match.newMatch(pTerm);
357 }
358
359 /**
360 * Retrieve the set of values that occur in matches for term.
361 * @return the Set of all values or empty set if there are no matches
362 *
363 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula.class::cast);
366 }
367
368 /**
369 * Retrieve the set of values that occur in matches for term.
370 * @return the Set of all values or empty set if there are no matches
371 *
372 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 }
376
377 /**
378 * Retrieve the set of values that occur in matches for term.
379 * @return the Set of all values or empty set if there are no matches
380 *
381 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSFofFormula.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSFofFormula.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula) t.get(POSITION_TERM));
390 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null;
393 }
394 }
395
396 @Override
397 protected VLSFofFormula.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSFofFormula.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula) match[POSITION_TERM]);
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected VLSFofFormula.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSFofFormula.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula) match[POSITION_TERM]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 /**
417 * @return the singleton instance of the query specification of this pattern
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 *
420 */
421 public static IQuerySpecification<VLSFofFormula.Matcher> querySpecification() {
422 return VLSFofFormula.instance();
423 }
424 }
425
426 private VLSFofFormula() {
427 super(GeneratedPQuery.INSTANCE);
428 }
429
430 /**
431 * @return the singleton instance of the query specification
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 *
434 */
435 public static VLSFofFormula instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSFofFormula.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSFofFormula.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSFofFormula.Matcher instantiate() {
450 return VLSFofFormula.Matcher.create();
451 }
452
453 @Override
454 public VLSFofFormula.Match newEmptyMatch() {
455 return VLSFofFormula.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSFofFormula.Match newMatch(final Object... parameters) {
460 return VLSFofFormula.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula) parameters[0]);
461 }
462
463 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSFofFormula INSTANCE = new VLSFofFormula();
473
474 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
476 * This initialization order is required to support indirect recursion.
477 *
478 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
479 *
480 */
481 private final static Object STATIC_INITIALIZER = ensureInitialized();
482
483 public static Object ensureInitialized() {
484 INSTANCE.ensureInitializedInternal();
485 return null;
486 }
487 }
488
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSFofFormula.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
492 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);
493
494 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495
496 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC);
498 }
499
500 @Override
501 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula";
503 }
504
505 @Override
506 public List<String> getParameterNames() {
507 return Arrays.asList("term");
508 }
509
510 @Override
511 public List<PParameter> getParameters() {
512 return parameters;
513 }
514
515 @Override
516 public Set<PBody> doGetContainedBodies() {
517 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
518 Set<PBody> bodies = new LinkedHashSet<>();
519 {
520 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFofFormula")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSFofFormula(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFofFormula")));
528 bodies.add(body);
529 }
530 return bodies;
531 }
532 }
533}
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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern VLSFunction(term: VLSFunction){
44 * VLSFunction(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSFunction extends BaseGeneratedEMFQuerySpecification<VLSFunction.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
72 this.fTerm = pTerm;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm;
78 return null;
79 }
80
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction getTerm() {
82 return this.fTerm;
83 }
84
85 @Override
86 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm;
98 }
99
100 @Override
101 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSFunction.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSFunction.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this;
118 }
119
120 @Override
121 public String prettyPrint() {
122 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm));
124 return result.toString();
125 }
126
127 @Override
128 public int hashCode() {
129 return Objects.hash(fTerm);
130 }
131
132 @Override
133 public boolean equals(final Object obj) {
134 if (this == obj)
135 return true;
136 if (obj == null) {
137 return false;
138 }
139 if ((obj instanceof VLSFunction.Match)) {
140 VLSFunction.Match other = (VLSFunction.Match) obj;
141 return Objects.equals(fTerm, other.fTerm);
142 } else {
143 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) {
145 return false;
146 }
147 IPatternMatch otherSig = (IPatternMatch) obj;
148 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
149 }
150 }
151
152 @Override
153 public VLSFunction specification() {
154 return VLSFunction.instance();
155 }
156
157 /**
158 * Returns an empty, mutable match.
159 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
160 *
161 * @return the empty match.
162 *
163 */
164 public static VLSFunction.Match newEmptyMatch() {
165 return new Mutable(null);
166 }
167
168 /**
169 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
173 * @return the new, mutable (partial) match object.
174 *
175 */
176 public static VLSFunction.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
177 return new Mutable(pTerm);
178 }
179
180 /**
181 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
185 * @return the (partial) match object.
186 *
187 */
188 public static VLSFunction.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSFunction.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
194 super(pTerm);
195 }
196
197 @Override
198 public boolean isMutable() {
199 return true;
200 }
201 }
202
203 private static final class Immutable extends VLSFunction.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
205 super(pTerm);
206 }
207
208 @Override
209 public boolean isMutable() {
210 return false;
211 }
212 }
213 }
214
215 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction pattern,
217 * providing pattern-specific query methods.
218 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
220 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
221 *
222 * <p>Matches of the pattern will be represented as {@link Match}.
223 *
224 * <p>Original source:
225 * <code><pre>
226 * pattern VLSFunction(term: VLSFunction){
227 * VLSFunction(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSFunction
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSFunction.Match> {
236 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
239 *
240 * @param engine the existing VIATRA Query engine in which this matcher will be created.
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 *
243 */
244 public static VLSFunction.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) {
248 matcher = (Matcher)engine.getMatcher(querySpecification());
249 }
250 return matcher;
251 }
252
253 /**
254 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
255 * @return an initialized matcher
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 *
258 */
259 public static VLSFunction.Matcher create() {
260 return new Matcher();
261 }
262
263 private final static int POSITION_TERM = 0;
264
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSFunction.Matcher.class);
266
267 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine.
269 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
270 *
271 * @param engine the existing VIATRA Query engine in which this matcher will be created.
272 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
273 *
274 */
275 private Matcher() {
276 super(querySpecification());
277 }
278
279 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
282 * @return matches represented as a Match object.
283 *
284 */
285 public Collection<VLSFunction.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 }
288
289 /**
290 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
291 * </p>
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
296 * @return a stream of matches represented as a Match object.
297 *
298 */
299 public Stream<VLSFunction.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm});
301 }
302
303 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found.
308 *
309 */
310 public Optional<VLSFunction.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 }
313
314 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern.
319 *
320 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
322 return rawHasMatch(new Object[]{pTerm});
323 }
324
325 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
328 * @return the number of pattern matches found.
329 *
330 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
332 return rawCountMatches(new Object[]{pTerm});
333 }
334
335 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
339 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 *
342 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm, final Consumer<? super VLSFunction.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 }
346
347 /**
348 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
352 * @return the (partial) match object.
353 *
354 */
355 public VLSFunction.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction pTerm) {
356 return VLSFunction.Match.newMatch(pTerm);
357 }
358
359 /**
360 * Retrieve the set of values that occur in matches for term.
361 * @return the Set of all values or empty set if there are no matches
362 *
363 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction.class::cast);
366 }
367
368 /**
369 * Retrieve the set of values that occur in matches for term.
370 * @return the Set of all values or empty set if there are no matches
371 *
372 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 }
376
377 /**
378 * Retrieve the set of values that occur in matches for term.
379 * @return the Set of all values or empty set if there are no matches
380 *
381 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSFunction.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSFunction.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction) t.get(POSITION_TERM));
390 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null;
393 }
394 }
395
396 @Override
397 protected VLSFunction.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSFunction.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction) match[POSITION_TERM]);
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected VLSFunction.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSFunction.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction) match[POSITION_TERM]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 /**
417 * @return the singleton instance of the query specification of this pattern
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 *
420 */
421 public static IQuerySpecification<VLSFunction.Matcher> querySpecification() {
422 return VLSFunction.instance();
423 }
424 }
425
426 private VLSFunction() {
427 super(GeneratedPQuery.INSTANCE);
428 }
429
430 /**
431 * @return the singleton instance of the query specification
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 *
434 */
435 public static VLSFunction instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSFunction.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSFunction.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSFunction.Matcher instantiate() {
450 return VLSFunction.Matcher.create();
451 }
452
453 @Override
454 public VLSFunction.Match newEmptyMatch() {
455 return VLSFunction.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSFunction.Match newMatch(final Object... parameters) {
460 return VLSFunction.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction) parameters[0]);
461 }
462
463 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSFunction INSTANCE = new VLSFunction();
473
474 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
476 * This initialization order is required to support indirect recursion.
477 *
478 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
479 *
480 */
481 private final static Object STATIC_INITIALIZER = ensureInitialized();
482
483 public static Object ensureInitialized() {
484 INSTANCE.ensureInitializedInternal();
485 return null;
486 }
487 }
488
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSFunction.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
492 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);
493
494 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495
496 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC);
498 }
499
500 @Override
501 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction";
503 }
504
505 @Override
506 public List<String> getParameterNames() {
507 return Arrays.asList("term");
508 }
509
510 @Override
511 public List<PParameter> getParameters() {
512 return parameters;
513 }
514
515 @Override
516 public Set<PBody> doGetContainedBodies() {
517 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
518 Set<PBody> bodies = new LinkedHashSet<>();
519 {
520 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunction")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSFunction(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunction")));
528 bodies.add(body);
529 }
530 return bodies;
531 }
532 }
533}
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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern VLSFunctionFof(term: VLSFunctionFof){
44 * VLSFunctionFof(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLSFunctionFof.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
72 this.fTerm = pTerm;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm;
78 return null;
79 }
80
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof getTerm() {
82 return this.fTerm;
83 }
84
85 @Override
86 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm;
98 }
99
100 @Override
101 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSFunctionFof.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSFunctionFof.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this;
118 }
119
120 @Override
121 public String prettyPrint() {
122 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm));
124 return result.toString();
125 }
126
127 @Override
128 public int hashCode() {
129 return Objects.hash(fTerm);
130 }
131
132 @Override
133 public boolean equals(final Object obj) {
134 if (this == obj)
135 return true;
136 if (obj == null) {
137 return false;
138 }
139 if ((obj instanceof VLSFunctionFof.Match)) {
140 VLSFunctionFof.Match other = (VLSFunctionFof.Match) obj;
141 return Objects.equals(fTerm, other.fTerm);
142 } else {
143 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) {
145 return false;
146 }
147 IPatternMatch otherSig = (IPatternMatch) obj;
148 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
149 }
150 }
151
152 @Override
153 public VLSFunctionFof specification() {
154 return VLSFunctionFof.instance();
155 }
156
157 /**
158 * Returns an empty, mutable match.
159 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
160 *
161 * @return the empty match.
162 *
163 */
164 public static VLSFunctionFof.Match newEmptyMatch() {
165 return new Mutable(null);
166 }
167
168 /**
169 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
173 * @return the new, mutable (partial) match object.
174 *
175 */
176 public static VLSFunctionFof.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
177 return new Mutable(pTerm);
178 }
179
180 /**
181 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
185 * @return the (partial) match object.
186 *
187 */
188 public static VLSFunctionFof.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSFunctionFof.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
194 super(pTerm);
195 }
196
197 @Override
198 public boolean isMutable() {
199 return true;
200 }
201 }
202
203 private static final class Immutable extends VLSFunctionFof.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
205 super(pTerm);
206 }
207
208 @Override
209 public boolean isMutable() {
210 return false;
211 }
212 }
213 }
214
215 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof pattern,
217 * providing pattern-specific query methods.
218 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
220 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
221 *
222 * <p>Matches of the pattern will be represented as {@link Match}.
223 *
224 * <p>Original source:
225 * <code><pre>
226 * pattern VLSFunctionFof(term: VLSFunctionFof){
227 * VLSFunctionFof(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSFunctionFof
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSFunctionFof.Match> {
236 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
239 *
240 * @param engine the existing VIATRA Query engine in which this matcher will be created.
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 *
243 */
244 public static VLSFunctionFof.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) {
248 matcher = (Matcher)engine.getMatcher(querySpecification());
249 }
250 return matcher;
251 }
252
253 /**
254 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
255 * @return an initialized matcher
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 *
258 */
259 public static VLSFunctionFof.Matcher create() {
260 return new Matcher();
261 }
262
263 private final static int POSITION_TERM = 0;
264
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSFunctionFof.Matcher.class);
266
267 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine.
269 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
270 *
271 * @param engine the existing VIATRA Query engine in which this matcher will be created.
272 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
273 *
274 */
275 private Matcher() {
276 super(querySpecification());
277 }
278
279 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
282 * @return matches represented as a Match object.
283 *
284 */
285 public Collection<VLSFunctionFof.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 }
288
289 /**
290 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
291 * </p>
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
296 * @return a stream of matches represented as a Match object.
297 *
298 */
299 public Stream<VLSFunctionFof.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm});
301 }
302
303 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found.
308 *
309 */
310 public Optional<VLSFunctionFof.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 }
313
314 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern.
319 *
320 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
322 return rawHasMatch(new Object[]{pTerm});
323 }
324
325 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
328 * @return the number of pattern matches found.
329 *
330 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
332 return rawCountMatches(new Object[]{pTerm});
333 }
334
335 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
339 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 *
342 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm, final Consumer<? super VLSFunctionFof.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 }
346
347 /**
348 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
352 * @return the (partial) match object.
353 *
354 */
355 public VLSFunctionFof.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) {
356 return VLSFunctionFof.Match.newMatch(pTerm);
357 }
358
359 /**
360 * Retrieve the set of values that occur in matches for term.
361 * @return the Set of all values or empty set if there are no matches
362 *
363 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof.class::cast);
366 }
367
368 /**
369 * Retrieve the set of values that occur in matches for term.
370 * @return the Set of all values or empty set if there are no matches
371 *
372 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 }
376
377 /**
378 * Retrieve the set of values that occur in matches for term.
379 * @return the Set of all values or empty set if there are no matches
380 *
381 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSFunctionFof.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSFunctionFof.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) t.get(POSITION_TERM));
390 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null;
393 }
394 }
395
396 @Override
397 protected VLSFunctionFof.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSFunctionFof.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) match[POSITION_TERM]);
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected VLSFunctionFof.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSFunctionFof.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) match[POSITION_TERM]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 /**
417 * @return the singleton instance of the query specification of this pattern
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 *
420 */
421 public static IQuerySpecification<VLSFunctionFof.Matcher> querySpecification() {
422 return VLSFunctionFof.instance();
423 }
424 }
425
426 private VLSFunctionFof() {
427 super(GeneratedPQuery.INSTANCE);
428 }
429
430 /**
431 * @return the singleton instance of the query specification
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 *
434 */
435 public static VLSFunctionFof instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSFunctionFof.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSFunctionFof.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSFunctionFof.Matcher instantiate() {
450 return VLSFunctionFof.Matcher.create();
451 }
452
453 @Override
454 public VLSFunctionFof.Match newEmptyMatch() {
455 return VLSFunctionFof.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSFunctionFof.Match newMatch(final Object... parameters) {
460 return VLSFunctionFof.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) parameters[0]);
461 }
462
463 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSFunctionFof INSTANCE = new VLSFunctionFof();
473
474 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
476 * This initialization order is required to support indirect recursion.
477 *
478 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
479 *
480 */
481 private final static Object STATIC_INITIALIZER = ensureInitialized();
482
483 public static Object ensureInitialized() {
484 INSTANCE.ensureInitializedInternal();
485 return null;
486 }
487 }
488
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSFunctionFof.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
492 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);
493
494 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495
496 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC);
498 }
499
500 @Override
501 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof";
503 }
504
505 @Override
506 public List<String> getParameterNames() {
507 return Arrays.asList("term");
508 }
509
510 @Override
511 public List<PParameter> getParameters() {
512 return parameters;
513 }
514
515 @Override
516 public Set<PBody> doGetContainedBodies() {
517 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
518 Set<PBody> bodies = new LinkedHashSet<>();
519 {
520 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunctionFof")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSFunctionFof(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunctionFof")));
528 bodies.add(body);
529 }
530 return bodies;
531 }
532 }
533}
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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern VLSInequality(term: VLSInequality){
44 * VLSInequality(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSInequality extends BaseGeneratedEMFQuerySpecification<VLSInequality.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
72 this.fTerm = pTerm;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm;
78 return null;
79 }
80
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality getTerm() {
82 return this.fTerm;
83 }
84
85 @Override
86 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm;
98 }
99
100 @Override
101 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSInequality.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSInequality.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this;
118 }
119
120 @Override
121 public String prettyPrint() {
122 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm));
124 return result.toString();
125 }
126
127 @Override
128 public int hashCode() {
129 return Objects.hash(fTerm);
130 }
131
132 @Override
133 public boolean equals(final Object obj) {
134 if (this == obj)
135 return true;
136 if (obj == null) {
137 return false;
138 }
139 if ((obj instanceof VLSInequality.Match)) {
140 VLSInequality.Match other = (VLSInequality.Match) obj;
141 return Objects.equals(fTerm, other.fTerm);
142 } else {
143 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) {
145 return false;
146 }
147 IPatternMatch otherSig = (IPatternMatch) obj;
148 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
149 }
150 }
151
152 @Override
153 public VLSInequality specification() {
154 return VLSInequality.instance();
155 }
156
157 /**
158 * Returns an empty, mutable match.
159 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
160 *
161 * @return the empty match.
162 *
163 */
164 public static VLSInequality.Match newEmptyMatch() {
165 return new Mutable(null);
166 }
167
168 /**
169 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
173 * @return the new, mutable (partial) match object.
174 *
175 */
176 public static VLSInequality.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
177 return new Mutable(pTerm);
178 }
179
180 /**
181 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
185 * @return the (partial) match object.
186 *
187 */
188 public static VLSInequality.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSInequality.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
194 super(pTerm);
195 }
196
197 @Override
198 public boolean isMutable() {
199 return true;
200 }
201 }
202
203 private static final class Immutable extends VLSInequality.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
205 super(pTerm);
206 }
207
208 @Override
209 public boolean isMutable() {
210 return false;
211 }
212 }
213 }
214
215 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality pattern,
217 * providing pattern-specific query methods.
218 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
220 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
221 *
222 * <p>Matches of the pattern will be represented as {@link Match}.
223 *
224 * <p>Original source:
225 * <code><pre>
226 * pattern VLSInequality(term: VLSInequality){
227 * VLSInequality(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSInequality
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSInequality.Match> {
236 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
239 *
240 * @param engine the existing VIATRA Query engine in which this matcher will be created.
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 *
243 */
244 public static VLSInequality.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) {
248 matcher = (Matcher)engine.getMatcher(querySpecification());
249 }
250 return matcher;
251 }
252
253 /**
254 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
255 * @return an initialized matcher
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 *
258 */
259 public static VLSInequality.Matcher create() {
260 return new Matcher();
261 }
262
263 private final static int POSITION_TERM = 0;
264
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSInequality.Matcher.class);
266
267 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine.
269 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
270 *
271 * @param engine the existing VIATRA Query engine in which this matcher will be created.
272 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
273 *
274 */
275 private Matcher() {
276 super(querySpecification());
277 }
278
279 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
282 * @return matches represented as a Match object.
283 *
284 */
285 public Collection<VLSInequality.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 }
288
289 /**
290 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
291 * </p>
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
296 * @return a stream of matches represented as a Match object.
297 *
298 */
299 public Stream<VLSInequality.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm});
301 }
302
303 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found.
308 *
309 */
310 public Optional<VLSInequality.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 }
313
314 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern.
319 *
320 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
322 return rawHasMatch(new Object[]{pTerm});
323 }
324
325 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
328 * @return the number of pattern matches found.
329 *
330 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
332 return rawCountMatches(new Object[]{pTerm});
333 }
334
335 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
339 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 *
342 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm, final Consumer<? super VLSInequality.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 }
346
347 /**
348 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
352 * @return the (partial) match object.
353 *
354 */
355 public VLSInequality.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality pTerm) {
356 return VLSInequality.Match.newMatch(pTerm);
357 }
358
359 /**
360 * Retrieve the set of values that occur in matches for term.
361 * @return the Set of all values or empty set if there are no matches
362 *
363 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality.class::cast);
366 }
367
368 /**
369 * Retrieve the set of values that occur in matches for term.
370 * @return the Set of all values or empty set if there are no matches
371 *
372 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 }
376
377 /**
378 * Retrieve the set of values that occur in matches for term.
379 * @return the Set of all values or empty set if there are no matches
380 *
381 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSInequality.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSInequality.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality) t.get(POSITION_TERM));
390 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null;
393 }
394 }
395
396 @Override
397 protected VLSInequality.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSInequality.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality) match[POSITION_TERM]);
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected VLSInequality.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSInequality.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality) match[POSITION_TERM]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 /**
417 * @return the singleton instance of the query specification of this pattern
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 *
420 */
421 public static IQuerySpecification<VLSInequality.Matcher> querySpecification() {
422 return VLSInequality.instance();
423 }
424 }
425
426 private VLSInequality() {
427 super(GeneratedPQuery.INSTANCE);
428 }
429
430 /**
431 * @return the singleton instance of the query specification
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 *
434 */
435 public static VLSInequality instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSInequality.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSInequality.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSInequality.Matcher instantiate() {
450 return VLSInequality.Matcher.create();
451 }
452
453 @Override
454 public VLSInequality.Match newEmptyMatch() {
455 return VLSInequality.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSInequality.Match newMatch(final Object... parameters) {
460 return VLSInequality.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality) parameters[0]);
461 }
462
463 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSInequality INSTANCE = new VLSInequality();
473
474 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
476 * This initialization order is required to support indirect recursion.
477 *
478 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
479 *
480 */
481 private final static Object STATIC_INITIALIZER = ensureInitialized();
482
483 public static Object ensureInitialized() {
484 INSTANCE.ensureInitializedInternal();
485 return null;
486 }
487 }
488
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSInequality.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
492 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);
493
494 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495
496 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC);
498 }
499
500 @Override
501 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality";
503 }
504
505 @Override
506 public List<String> getParameterNames() {
507 return Arrays.asList("term");
508 }
509
510 @Override
511 public List<PParameter> getParameters() {
512 return parameters;
513 }
514
515 @Override
516 public Set<PBody> doGetContainedBodies() {
517 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
518 Set<PBody> bodies = new LinkedHashSet<>();
519 {
520 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSInequality")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSInequality(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSInequality")));
528 bodies.add(body);
529 }
530 return bodies;
531 }
532 }
533}
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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
37
38/**
39 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * pattern VLSUnaryNegation(term: VLSUnaryNegation){
44 * VLSUnaryNegation(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSUnaryNegation extends BaseGeneratedEMFQuerySpecification<VLSUnaryNegation.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation pattern,
56 * to be used in conjunction with {@link Matcher}.
57 *
58 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
59 * Each instance is a (possibly partial) substitution of pattern parameters,
60 * usable to represent a match of the pattern in the result of a query,
61 * or to specify the bound (fixed) input parameters when issuing a query.
62 *
63 * @see Matcher
64 *
65 */
66 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
72 this.fTerm = pTerm;
73 }
74
75 @Override
76 public Object get(final String parameterName) {
77 if ("term".equals(parameterName)) return this.fTerm;
78 return null;
79 }
80
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation getTerm() {
82 return this.fTerm;
83 }
84
85 @Override
86 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm;
98 }
99
100 @Override
101 public String patternName() {
102 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSUnaryNegation.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSUnaryNegation.Match toImmutable() {
117 return isMutable() ? newMatch(fTerm) : this;
118 }
119
120 @Override
121 public String prettyPrint() {
122 StringBuilder result = new StringBuilder();
123 result.append("\"term\"=" + prettyPrintValue(fTerm));
124 return result.toString();
125 }
126
127 @Override
128 public int hashCode() {
129 return Objects.hash(fTerm);
130 }
131
132 @Override
133 public boolean equals(final Object obj) {
134 if (this == obj)
135 return true;
136 if (obj == null) {
137 return false;
138 }
139 if ((obj instanceof VLSUnaryNegation.Match)) {
140 VLSUnaryNegation.Match other = (VLSUnaryNegation.Match) obj;
141 return Objects.equals(fTerm, other.fTerm);
142 } else {
143 // this should be infrequent
144 if (!(obj instanceof IPatternMatch)) {
145 return false;
146 }
147 IPatternMatch otherSig = (IPatternMatch) obj;
148 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
149 }
150 }
151
152 @Override
153 public VLSUnaryNegation specification() {
154 return VLSUnaryNegation.instance();
155 }
156
157 /**
158 * Returns an empty, mutable match.
159 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
160 *
161 * @return the empty match.
162 *
163 */
164 public static VLSUnaryNegation.Match newEmptyMatch() {
165 return new Mutable(null);
166 }
167
168 /**
169 * Returns a mutable (partial) match.
170 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
171 *
172 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
173 * @return the new, mutable (partial) match object.
174 *
175 */
176 public static VLSUnaryNegation.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
177 return new Mutable(pTerm);
178 }
179
180 /**
181 * Returns a new (partial) match.
182 * This can be used e.g. to call the matcher with a partial match.
183 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
184 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
185 * @return the (partial) match object.
186 *
187 */
188 public static VLSUnaryNegation.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSUnaryNegation.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
194 super(pTerm);
195 }
196
197 @Override
198 public boolean isMutable() {
199 return true;
200 }
201 }
202
203 private static final class Immutable extends VLSUnaryNegation.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
205 super(pTerm);
206 }
207
208 @Override
209 public boolean isMutable() {
210 return false;
211 }
212 }
213 }
214
215 /**
216 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation pattern,
217 * providing pattern-specific query methods.
218 *
219 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
220 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
221 *
222 * <p>Matches of the pattern will be represented as {@link Match}.
223 *
224 * <p>Original source:
225 * <code><pre>
226 * pattern VLSUnaryNegation(term: VLSUnaryNegation){
227 * VLSUnaryNegation(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSUnaryNegation
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSUnaryNegation.Match> {
236 /**
237 * Initializes the pattern matcher within an existing VIATRA Query engine.
238 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
239 *
240 * @param engine the existing VIATRA Query engine in which this matcher will be created.
241 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
242 *
243 */
244 public static VLSUnaryNegation.Matcher on(final ViatraQueryEngine engine) {
245 // check if matcher already exists
246 Matcher matcher = engine.getExistingMatcher(querySpecification());
247 if (matcher == null) {
248 matcher = (Matcher)engine.getMatcher(querySpecification());
249 }
250 return matcher;
251 }
252
253 /**
254 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
255 * @return an initialized matcher
256 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
257 *
258 */
259 public static VLSUnaryNegation.Matcher create() {
260 return new Matcher();
261 }
262
263 private final static int POSITION_TERM = 0;
264
265 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSUnaryNegation.Matcher.class);
266
267 /**
268 * Initializes the pattern matcher within an existing VIATRA Query engine.
269 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
270 *
271 * @param engine the existing VIATRA Query engine in which this matcher will be created.
272 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
273 *
274 */
275 private Matcher() {
276 super(querySpecification());
277 }
278
279 /**
280 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
281 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
282 * @return matches represented as a Match object.
283 *
284 */
285 public Collection<VLSUnaryNegation.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 }
288
289 /**
290 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
291 * </p>
292 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
293 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
294 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
295 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
296 * @return a stream of matches represented as a Match object.
297 *
298 */
299 public Stream<VLSUnaryNegation.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm});
301 }
302
303 /**
304 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
305 * Neither determinism nor randomness of selection is guaranteed.
306 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
307 * @return a match represented as a Match object, or null if no match is found.
308 *
309 */
310 public Optional<VLSUnaryNegation.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 }
313
314 /**
315 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
316 * under any possible substitution of the unspecified parameters (if any).
317 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
318 * @return true if the input is a valid (partial) match of the pattern.
319 *
320 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
322 return rawHasMatch(new Object[]{pTerm});
323 }
324
325 /**
326 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
327 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
328 * @return the number of pattern matches found.
329 *
330 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
332 return rawCountMatches(new Object[]{pTerm});
333 }
334
335 /**
336 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
337 * Neither determinism nor randomness of selection is guaranteed.
338 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
339 * @param processor the action that will process the selected match.
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 *
342 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm, final Consumer<? super VLSUnaryNegation.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 }
346
347 /**
348 * Returns a new (partial) match.
349 * This can be used e.g. to call the matcher with a partial match.
350 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
351 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
352 * @return the (partial) match object.
353 *
354 */
355 public VLSUnaryNegation.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation pTerm) {
356 return VLSUnaryNegation.Match.newMatch(pTerm);
357 }
358
359 /**
360 * Retrieve the set of values that occur in matches for term.
361 * @return the Set of all values or empty set if there are no matches
362 *
363 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation.class::cast);
366 }
367
368 /**
369 * Retrieve the set of values that occur in matches for term.
370 * @return the Set of all values or empty set if there are no matches
371 *
372 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 }
376
377 /**
378 * Retrieve the set of values that occur in matches for term.
379 * @return the Set of all values or empty set if there are no matches
380 *
381 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSUnaryNegation.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSUnaryNegation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation) t.get(POSITION_TERM));
390 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null;
393 }
394 }
395
396 @Override
397 protected VLSUnaryNegation.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSUnaryNegation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation) match[POSITION_TERM]);
400 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null;
403 }
404 }
405
406 @Override
407 protected VLSUnaryNegation.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSUnaryNegation.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation) match[POSITION_TERM]);
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null;
413 }
414 }
415
416 /**
417 * @return the singleton instance of the query specification of this pattern
418 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
419 *
420 */
421 public static IQuerySpecification<VLSUnaryNegation.Matcher> querySpecification() {
422 return VLSUnaryNegation.instance();
423 }
424 }
425
426 private VLSUnaryNegation() {
427 super(GeneratedPQuery.INSTANCE);
428 }
429
430 /**
431 * @return the singleton instance of the query specification
432 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
433 *
434 */
435 public static VLSUnaryNegation instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSUnaryNegation.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSUnaryNegation.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSUnaryNegation.Matcher instantiate() {
450 return VLSUnaryNegation.Matcher.create();
451 }
452
453 @Override
454 public VLSUnaryNegation.Match newEmptyMatch() {
455 return VLSUnaryNegation.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSUnaryNegation.Match newMatch(final Object... parameters) {
460 return VLSUnaryNegation.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation) parameters[0]);
461 }
462
463 /**
464 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
465 * <b>not</b> at the class load time of the outer class,
466 * 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: <unset>) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.vampire.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSUnaryNegation INSTANCE = new VLSUnaryNegation();
473
474 /**
475 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
476 * This initialization order is required to support indirect recursion.
477 *
478 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
479 *
480 */
481 private final static Object STATIC_INITIALIZER = ensureInitialized();
482
483 public static Object ensureInitialized() {
484 INSTANCE.ensureInitializedInternal();
485 return null;
486 }
487 }
488
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSUnaryNegation.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
492 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);
493
494 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495
496 private GeneratedPQuery() {
497 super(PVisibility.PUBLIC);
498 }
499
500 @Override
501 public String getFullyQualifiedName() {
502 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation";
503 }
504
505 @Override
506 public List<String> getParameterNames() {
507 return Arrays.asList("term");
508 }
509
510 @Override
511 public List<PParameter> getParameters() {
512 return parameters;
513 }
514
515 @Override
516 public Set<PBody> doGetContainedBodies() {
517 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
518 Set<PBody> bodies = new LinkedHashSet<>();
519 {
520 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term");
522 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUnaryNegation")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSUnaryNegation(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUnaryNegation")));
528 bodies.add(body);
529 }
530 return bodies;
531 }
532 }
533}
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 @@
1/**
2 * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.vampire.queries/src/ca/mcgill/ecse/dslreasoner/vampire/queries/vampireQueries.vql
3 */
4package ca.mcgill.ecse.dslreasoner.vampire.queries;
5
6import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnd;
7import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSAnnotation;
8import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSComment;
9import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSEquivalent;
10import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSExistentialQuantifier;
11import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFofFormula;
12import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunction;
13import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSFunctionFof;
14import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSInequality;
15import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr;
16import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUnaryNegation;
17import ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier;
18import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
19import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup;
20
21/**
22 * A pattern group formed of all public patterns defined in vampireQueries.vql.
23 *
24 * <p>Use the static instance as any {@link interface org.eclipse.viatra.query.runtime.api.IQueryGroup}, to conveniently prepare
25 * a VIATRA Query engine for matching all patterns originally defined in file vampireQueries.vql,
26 * in order to achieve better performance than one-by-one on-demand matcher initialization.
27 *
28 * <p> From package ca.mcgill.ecse.dslreasoner.vampire.queries, the group contains the definition of the following patterns: <ul>
29 * <li>VLSComment</li>
30 * <li>VLSFofFormula</li>
31 * <li>VLSAnnotation</li>
32 * <li>VLSOr</li>
33 * <li>VLSAnd</li>
34 * <li>VLSEquivalent</li>
35 * <li>VLSFunction</li>
36 * <li>VLSExistentialQuantifier</li>
37 * <li>VLSUniversalQuantifier</li>
38 * <li>VLSUnaryNegation</li>
39 * <li>VLSInequality</li>
40 * <li>VLSFunctionFof</li>
41 * </ul>
42 *
43 * @see IQueryGroup
44 *
45 */
46@SuppressWarnings("all")
47public final class VampireQueries extends BaseGeneratedPatternGroup {
48 /**
49 * Access the pattern group.
50 *
51 * @return the singleton instance of the group
52 * @throws ViatraQueryRuntimeException if there was an error loading the generated code of pattern specifications
53 *
54 */
55 public static VampireQueries instance() {
56 if (INSTANCE == null) {
57 INSTANCE = new VampireQueries();
58 }
59 return INSTANCE;
60 }
61
62 private static VampireQueries INSTANCE;
63
64 private VampireQueries() {
65 querySpecifications.add(VLSComment.instance());
66 querySpecifications.add(VLSFofFormula.instance());
67 querySpecifications.add(VLSAnnotation.instance());
68 querySpecifications.add(VLSOr.instance());
69 querySpecifications.add(VLSAnd.instance());
70 querySpecifications.add(VLSEquivalent.instance());
71 querySpecifications.add(VLSFunction.instance());
72 querySpecifications.add(VLSExistentialQuantifier.instance());
73 querySpecifications.add(VLSUniversalQuantifier.instance());
74 querySpecifications.add(VLSUnaryNegation.instance());
75 querySpecifications.add(VLSInequality.instance());
76 querySpecifications.add(VLSFunctionFof.instance());
77 }
78
79 public VLSComment getVLSComment() {
80 return VLSComment.instance();
81 }
82
83 public VLSComment.Matcher getVLSComment(final ViatraQueryEngine engine) {
84 return VLSComment.Matcher.on(engine);
85 }
86
87 public VLSFofFormula getVLSFofFormula() {
88 return VLSFofFormula.instance();
89 }
90
91 public VLSFofFormula.Matcher getVLSFofFormula(final ViatraQueryEngine engine) {
92 return VLSFofFormula.Matcher.on(engine);
93 }
94
95 public VLSAnnotation getVLSAnnotation() {
96 return VLSAnnotation.instance();
97 }
98
99 public VLSAnnotation.Matcher getVLSAnnotation(final ViatraQueryEngine engine) {
100 return VLSAnnotation.Matcher.on(engine);
101 }
102
103 public VLSOr getVLSOr() {
104 return VLSOr.instance();
105 }
106
107 public VLSOr.Matcher getVLSOr(final ViatraQueryEngine engine) {
108 return VLSOr.Matcher.on(engine);
109 }
110
111 public VLSAnd getVLSAnd() {
112 return VLSAnd.instance();
113 }
114
115 public VLSAnd.Matcher getVLSAnd(final ViatraQueryEngine engine) {
116 return VLSAnd.Matcher.on(engine);
117 }
118
119 public VLSEquivalent getVLSEquivalent() {
120 return VLSEquivalent.instance();
121 }
122
123 public VLSEquivalent.Matcher getVLSEquivalent(final ViatraQueryEngine engine) {
124 return VLSEquivalent.Matcher.on(engine);
125 }
126
127 public VLSFunction getVLSFunction() {
128 return VLSFunction.instance();
129 }
130
131 public VLSFunction.Matcher getVLSFunction(final ViatraQueryEngine engine) {
132 return VLSFunction.Matcher.on(engine);
133 }
134
135 public VLSExistentialQuantifier getVLSExistentialQuantifier() {
136 return VLSExistentialQuantifier.instance();
137 }
138
139 public VLSExistentialQuantifier.Matcher getVLSExistentialQuantifier(final ViatraQueryEngine engine) {
140 return VLSExistentialQuantifier.Matcher.on(engine);
141 }
142
143 public VLSUniversalQuantifier getVLSUniversalQuantifier() {
144 return VLSUniversalQuantifier.instance();
145 }
146
147 public VLSUniversalQuantifier.Matcher getVLSUniversalQuantifier(final ViatraQueryEngine engine) {
148 return VLSUniversalQuantifier.Matcher.on(engine);
149 }
150
151 public VLSUnaryNegation getVLSUnaryNegation() {
152 return VLSUnaryNegation.instance();
153 }
154
155 public VLSUnaryNegation.Matcher getVLSUnaryNegation(final ViatraQueryEngine engine) {
156 return VLSUnaryNegation.Matcher.on(engine);
157 }
158
159 public VLSInequality getVLSInequality() {
160 return VLSInequality.instance();
161 }
162
163 public VLSInequality.Matcher getVLSInequality(final ViatraQueryEngine engine) {
164 return VLSInequality.Matcher.on(engine);
165 }
166
167 public VLSFunctionFof getVLSFunctionFof() {
168 return VLSFunctionFof.instance();
169 }
170
171 public VLSFunctionFof.Matcher getVLSFunctionFof(final ViatraQueryEngine engine) {
172 return VLSFunctionFof.Matcher.on(engine);
173 }
174}
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 @@
1/bin/ 1/bin/
2/src-gen/
3/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 {
81 val fromType = (l.parameters.get(0) as ComplexTypeReference).referred as Type 81 val fromType = (l.parameters.get(0) as ComplexTypeReference).referred as Type
82 val toType = (l.parameters.get(1) as ComplexTypeReference).referred as Type 82 val toType = (l.parameters.get(1) as ComplexTypeReference).referred as Type
83 83
84 val listForAnd = newArrayList
85// listForAnd.add(support.duplicate(fromType.lookup(trace.type2Predicate), varB))
86 listForAnd.add(support.duplicate((l as RelationDeclaration).lookup(trace.rel2Predicate), varList))
87// listForAnd.add(createVLSInequality => [
88// it.left = support.duplicate(varA)
89// it.right = support.duplicate(varB)
90// ])
91
84 val relFormula = createVLSFofFormula => [ 92 val relFormula = createVLSFofFormula => [
85 it.name = support.toIDMultiple("containment", relName) 93 it.name = support.toIDMultiple("containment", relName)
86 it.fofRole = "axiom" 94 it.fofRole = "axiom"
@@ -91,11 +99,7 @@ class Logic2VampireLanguageMapper_ContainmentMapper {
91 it.left = support.duplicate(toType.lookup(trace.type2Predicate), varA) 99 it.left = support.duplicate(toType.lookup(trace.type2Predicate), varA)
92 it.right = createVLSExistentialQuantifier => [ 100 it.right = createVLSExistentialQuantifier => [
93 it.variables += support.duplicate(varB) 101 it.variables += support.duplicate(varB)
94 it.operand = createVLSAnd => [ 102 it.operand = support.unfoldAnd(listForAnd)
95 it.left = support.duplicate(fromType.lookup(trace.type2Predicate), varB)
96 it.right = support.duplicate((l as RelationDeclaration).lookup(trace.rel2Predicate),
97 varList)
98 ]
99 ] 103 ]
100 104
101 createVLSEquality => [ 105 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 @@
1package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder
2
3import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction
4import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm
5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement
6import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type
7import java.util.HashMap
8import java.util.Map
9
10class Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes implements Logic2VampireLanguageMapper_TypeMapperTrace{
11
12// public var VLSFofFormula objectSuperClass
13 public val Map<Type, VLSFunction> type2Predicate = new HashMap;
14 public val Map<DefinedElement, VLSFunction> element2Predicate = new HashMap
15 public val Map<Type, VLSTerm> type2PossibleNot = new HashMap
16 public val Map<Type, VLSTerm> type2And = new HashMap
17
18} \ 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes.xtendbin
+++ /dev/null
Binary files 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
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper_FilteredTypes.xtendbin
+++ /dev/null
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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;
3import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper; 3import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper;
4import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapperTrace; 4import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapperTrace;
5import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper_Support; 5import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper_Support;
6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd;
7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant; 6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant;
8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquality; 7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquality;
9import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent; 8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent;
@@ -118,6 +117,8 @@ public class Logic2VampireLanguageMapper_ContainmentMapper {
118 TypeReference _get_1 = l_1.getParameters().get(1); 117 TypeReference _get_1 = l_1.getParameters().get(1);
119 Type _referred_1 = ((ComplexTypeReference) _get_1).getReferred(); 118 Type _referred_1 = ((ComplexTypeReference) _get_1).getReferred();
120 final Type toType = ((Type) _referred_1); 119 final Type toType = ((Type) _referred_1);
120 final ArrayList<VLSFunction> listForAnd = CollectionLiterals.<VLSFunction>newArrayList();
121 listForAnd.add(this.support.duplicate(CollectionsUtil.<RelationDeclaration, VLSFunction>lookup(((RelationDeclaration) l_1), trace.rel2Predicate), varList));
121 VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula(); 122 VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula();
122 final Procedure1<VLSFofFormula> _function_3 = (VLSFofFormula it) -> { 123 final Procedure1<VLSFofFormula> _function_3 = (VLSFofFormula it) -> {
123 it.setName(this.support.toIDMultiple("containment", relName)); 124 it.setName(this.support.toIDMultiple("containment", relName));
@@ -135,13 +136,7 @@ public class Logic2VampireLanguageMapper_ContainmentMapper {
135 EList<VLSVariable> _variables_1 = it_3.getVariables(); 136 EList<VLSVariable> _variables_1 = it_3.getVariables();
136 VLSVariable _duplicate_1 = this.support.duplicate(varB); 137 VLSVariable _duplicate_1 = this.support.duplicate(varB);
137 _variables_1.add(_duplicate_1); 138 _variables_1.add(_duplicate_1);
138 VLSAnd _createVLSAnd = this.factory.createVLSAnd(); 139 it_3.setOperand(this.support.unfoldAnd(listForAnd));
139 final Procedure1<VLSAnd> _function_7 = (VLSAnd it_4) -> {
140 it_4.setLeft(this.support.duplicate(CollectionsUtil.<Type, VLSFunction>lookup(fromType, trace.type2Predicate), varB));
141 it_4.setRight(this.support.duplicate(CollectionsUtil.<RelationDeclaration, VLSFunction>lookup(((RelationDeclaration) l_1), trace.rel2Predicate), varList));
142 };
143 VLSAnd _doubleArrow = ObjectExtensions.<VLSAnd>operator_doubleArrow(_createVLSAnd, _function_7);
144 it_3.setOperand(_doubleArrow);
145 }; 140 };
146 VLSExistentialQuantifier _doubleArrow = ObjectExtensions.<VLSExistentialQuantifier>operator_doubleArrow(_createVLSExistentialQuantifier, _function_6); 141 VLSExistentialQuantifier _doubleArrow = ObjectExtensions.<VLSExistentialQuantifier>operator_doubleArrow(_createVLSExistentialQuantifier, _function_6);
147 it_2.setRight(_doubleArrow); 142 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 @@
1package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder;
2
3import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper_TypeMapperTrace;
4import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction;
5import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm;
6import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement;
7import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type;
8import java.util.HashMap;
9import java.util.Map;
10
11@SuppressWarnings("all")
12public class Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes implements Logic2VampireLanguageMapper_TypeMapperTrace {
13 public final Map<Type, VLSFunction> type2Predicate = new HashMap<Type, VLSFunction>();
14
15 public final Map<DefinedElement, VLSFunction> element2Predicate = new HashMap<DefinedElement, VLSFunction>();
16
17 public final Map<Type, VLSTerm> type2PossibleNot = new HashMap<Type, VLSTerm>();
18
19 public final Map<Type, VLSTerm> type2And = new HashMap<Type, VLSTerm>();
20}
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 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
3 <viewpoint:DAnalysis uid="_WMDXMD6wEemlzLOTmNfcSQ" selectedViews="_W6M2oD6wEemlzLOTmNfcSQ _W6fKgD6wEemlzLOTmNfcSQ _W6kqED6wEemlzLOTmNfcSQ _W6l4MD6wEemlzLOTmNfcSQ" version="14.1.0.201810161215">
4 <semanticResources>fam.ecore</semanticResources>
5 <semanticResources>fam.genmodel</semanticResources>
6 <ownedViews xmi:type="viewpoint:DView" uid="_W6M2oD6wEemlzLOTmNfcSQ">
7 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
8 <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_Xa8zQT6wEemlzLOTmNfcSQ" name="fam class diagram" repPath="#_XZL4sD6wEemlzLOTmNfcSQ">
9 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
10 <target xmi:type="ecore:EPackage" href="fam.ecore#/"/>
11 </ownedRepresentationDescriptors>
12 </ownedViews>
13 <ownedViews xmi:type="viewpoint:DView" uid="_W6fKgD6wEemlzLOTmNfcSQ">
14 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Review']"/>
15 </ownedViews>
16 <ownedViews xmi:type="viewpoint:DView" uid="_W6kqED6wEemlzLOTmNfcSQ">
17 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']"/>
18 </ownedViews>
19 <ownedViews xmi:type="viewpoint:DView" uid="_W6l4MD6wEemlzLOTmNfcSQ">
20 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Generation']"/>
21 </ownedViews>
22 </viewpoint:DAnalysis>
23 <diagram:DSemanticDiagram uid="_XZL4sD6wEemlzLOTmNfcSQ" name="fam class diagram">
24 <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_XazCQD6wEemlzLOTmNfcSQ" source="DANNOTATION_CUSTOMIZATION_KEY">
25 <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_XazCQT6wEemlzLOTmNfcSQ">
26 <computedStyleDescriptions xmi:type="style:BundledImageDescription" xmi:id="_YLs6yT6wEemlzLOTmNfcSQ" labelExpression="service:render" labelAlignment="LEFT" tooltipExpression="service:renderTooltip" sizeComputationExpression="1">
27 <borderColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
28 <labelFormat>bold</labelFormat>
29 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/>
30 <color xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
31 </computedStyleDescriptions>
32 <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_YL_1sT6wEemlzLOTmNfcSQ" routingStyle="manhattan">
33 <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/>
34 <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_YL_1sj6wEemlzLOTmNfcSQ" showIcon="false" labelExpression="service:render">
35 <labelFormat>bold</labelFormat>
36 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/>
37 </centerLabelStyleDescription>
38 <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_YL_1sz6wEemlzLOTmNfcSQ" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel">
39 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/>
40 </endLabelStyleDescription>
41 </computedStyleDescriptions>
42 <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_YMDgFz6wEemlzLOTmNfcSQ" sourceArrow="FillDiamond" routingStyle="manhattan">
43 <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
44 <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_YMDgGD6wEemlzLOTmNfcSQ" showIcon="false" labelExpression="service:render">
45 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
46 </centerLabelStyleDescription>
47 <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_YMDgGT6wEemlzLOTmNfcSQ" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel">
48 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/>
49 </endLabelStyleDescription>
50 </computedStyleDescriptions>
51 <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_YMNRJD6wEemlzLOTmNfcSQ" sourceArrow="InputArrow" targetArrow="FillDiamond" routingStyle="manhattan">
52 <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
53 <beginLabelStyleDescription xmi:type="style:BeginLabelStyleDescription" xmi:id="_YMNRJT6wEemlzLOTmNfcSQ" showIcon="false" labelExpression="service:renderEOpposite">
54 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
55 </beginLabelStyleDescription>
56 <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_YMNRJj6wEemlzLOTmNfcSQ" showIcon="false" labelExpression="service:render">
57 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
58 </endLabelStyleDescription>
59 </computedStyleDescriptions>
60 <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_YMNRNT6wEemlzLOTmNfcSQ" sourceArrow="FillDiamond" routingStyle="manhattan">
61 <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
62 <beginLabelStyleDescription xmi:type="style:BeginLabelStyleDescription" xmi:id="_YMNRNj6wEemlzLOTmNfcSQ" showIcon="false" labelExpression="service:renderEOpposite">
63 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
64 </beginLabelStyleDescription>
65 <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_YMNRNz6wEemlzLOTmNfcSQ" showIcon="false" labelExpression="service:render">
66 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
67 </endLabelStyleDescription>
68 </computedStyleDescriptions>
69 <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_YMNRTT6wEemlzLOTmNfcSQ" sourceArrow="InputArrow" routingStyle="manhattan">
70 <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
71 <beginLabelStyleDescription xmi:type="style:BeginLabelStyleDescription" xmi:id="_YMNRTj6wEemlzLOTmNfcSQ" showIcon="false" labelExpression="service:renderEOpposite">
72 <labelFormat>bold</labelFormat>
73 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
74 </beginLabelStyleDescription>
75 <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_YMNRTz6wEemlzLOTmNfcSQ" showIcon="false" labelExpression="service:render">
76 <labelFormat>bold</labelFormat>
77 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
78 </endLabelStyleDescription>
79 </computedStyleDescriptions>
80 </data>
81 </ownedAnnotationEntries>
82 <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_XcDmgD6wEemlzLOTmNfcSQ" source="GMF_DIAGRAMS">
83 <data xmi:type="notation:Diagram" xmi:id="_XcDmgT6wEemlzLOTmNfcSQ" type="Sirius" element="_XZL4sD6wEemlzLOTmNfcSQ" measurementUnit="Pixel">
84 <children xmi:type="notation:Node" xmi:id="_YMXCEz6wEemlzLOTmNfcSQ" type="2003" element="_YLGd0D6wEemlzLOTmNfcSQ">
85 <children xmi:type="notation:Node" xmi:id="_YMXCFj6wEemlzLOTmNfcSQ" type="5007"/>
86 <children xmi:type="notation:Node" xmi:id="_YMgMAD6wEemlzLOTmNfcSQ" type="7004">
87 <styles xmi:type="notation:SortingStyle" xmi:id="_YMgMAT6wEemlzLOTmNfcSQ"/>
88 <styles xmi:type="notation:FilteringStyle" xmi:id="_YMgMAj6wEemlzLOTmNfcSQ"/>
89 </children>
90 <styles xmi:type="notation:ShapeStyle" xmi:id="_YMXCFD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8" italic="true"/>
91 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YMXCFT6wEemlzLOTmNfcSQ" x="444" y="324"/>
92 </children>
93 <children xmi:type="notation:Node" xmi:id="_YMgMAz6wEemlzLOTmNfcSQ" type="2003" element="_YLQO0j6wEemlzLOTmNfcSQ">
94 <children xmi:type="notation:Node" xmi:id="_YMgMBj6wEemlzLOTmNfcSQ" type="5007"/>
95 <children xmi:type="notation:Node" xmi:id="_YMgMBz6wEemlzLOTmNfcSQ" type="7004">
96 <styles xmi:type="notation:SortingStyle" xmi:id="_YMgMCD6wEemlzLOTmNfcSQ"/>
97 <styles xmi:type="notation:FilteringStyle" xmi:id="_YMgMCT6wEemlzLOTmNfcSQ"/>
98 </children>
99 <styles xmi:type="notation:ShapeStyle" xmi:id="_YMgMBD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
100 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YMgMBT6wEemlzLOTmNfcSQ" x="264" y="156"/>
101 </children>
102 <children xmi:type="notation:Node" xmi:id="_YMgMCj6wEemlzLOTmNfcSQ" type="2003" element="_YLQO1T6wEemlzLOTmNfcSQ">
103 <children xmi:type="notation:Node" xmi:id="_YMgMDT6wEemlzLOTmNfcSQ" type="5007"/>
104 <children xmi:type="notation:Node" xmi:id="_YMgMDj6wEemlzLOTmNfcSQ" type="7004">
105 <children xmi:type="notation:Node" xmi:id="_YMp9Dj6wEemlzLOTmNfcSQ" type="3010" element="_YLs6yD6wEemlzLOTmNfcSQ">
106 <styles xmi:type="notation:FontStyle" xmi:id="_YMp9Dz6wEemlzLOTmNfcSQ" fontColor="7490599" fontName="Segoe UI" fontHeight="8" bold="true"/>
107 <layoutConstraint xmi:type="notation:Location" xmi:id="_YMp9ED6wEemlzLOTmNfcSQ"/>
108 </children>
109 <styles xmi:type="notation:SortingStyle" xmi:id="_YMgMDz6wEemlzLOTmNfcSQ"/>
110 <styles xmi:type="notation:FilteringStyle" xmi:id="_YMgMED6wEemlzLOTmNfcSQ"/>
111 </children>
112 <styles xmi:type="notation:ShapeStyle" xmi:id="_YMgMCz6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
113 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YMgMDD6wEemlzLOTmNfcSQ" x="456" y="456"/>
114 </children>
115 <children xmi:type="notation:Node" xmi:id="_YMgMET6wEemlzLOTmNfcSQ" type="2003" element="_YLQO2D6wEemlzLOTmNfcSQ">
116 <children xmi:type="notation:Node" xmi:id="_YMgMFD6wEemlzLOTmNfcSQ" type="5007"/>
117 <children xmi:type="notation:Node" xmi:id="_YMgMFT6wEemlzLOTmNfcSQ" type="7004">
118 <styles xmi:type="notation:SortingStyle" xmi:id="_YMgMFj6wEemlzLOTmNfcSQ"/>
119 <styles xmi:type="notation:FilteringStyle" xmi:id="_YMgMFz6wEemlzLOTmNfcSQ"/>
120 </children>
121 <styles xmi:type="notation:ShapeStyle" xmi:id="_YMgMEj6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
122 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YMgMEz6wEemlzLOTmNfcSQ" x="684" y="72"/>
123 </children>
124 <children xmi:type="notation:Node" xmi:id="_YMgMGD6wEemlzLOTmNfcSQ" type="2003" element="_YLQO2z6wEemlzLOTmNfcSQ">
125 <children xmi:type="notation:Node" xmi:id="_YMgMGz6wEemlzLOTmNfcSQ" type="5007"/>
126 <children xmi:type="notation:Node" xmi:id="_YMgMHD6wEemlzLOTmNfcSQ" type="7004">
127 <styles xmi:type="notation:SortingStyle" xmi:id="_YMgMHT6wEemlzLOTmNfcSQ"/>
128 <styles xmi:type="notation:FilteringStyle" xmi:id="_YMgMHj6wEemlzLOTmNfcSQ"/>
129 </children>
130 <styles xmi:type="notation:ShapeStyle" xmi:id="_YMgMGT6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
131 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YMgMGj6wEemlzLOTmNfcSQ" x="1104" y="324"/>
132 </children>
133 <children xmi:type="notation:Node" xmi:id="_YMgMHz6wEemlzLOTmNfcSQ" type="2003" element="_YLZYwT6wEemlzLOTmNfcSQ">
134 <children xmi:type="notation:Node" xmi:id="_YMgMIj6wEemlzLOTmNfcSQ" type="5007"/>
135 <children xmi:type="notation:Node" xmi:id="_YMgMIz6wEemlzLOTmNfcSQ" type="7004">
136 <styles xmi:type="notation:SortingStyle" xmi:id="_YMgMJD6wEemlzLOTmNfcSQ"/>
137 <styles xmi:type="notation:FilteringStyle" xmi:id="_YMgMJT6wEemlzLOTmNfcSQ"/>
138 </children>
139 <styles xmi:type="notation:ShapeStyle" xmi:id="_YMgMID6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
140 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YMgMIT6wEemlzLOTmNfcSQ" x="828" y="156"/>
141 </children>
142 <children xmi:type="notation:Node" xmi:id="_YMgMJj6wEemlzLOTmNfcSQ" type="2003" element="_YLZYxD6wEemlzLOTmNfcSQ">
143 <children xmi:type="notation:Node" xmi:id="_YMgMKT6wEemlzLOTmNfcSQ" type="5007"/>
144 <children xmi:type="notation:Node" xmi:id="_YMgMKj6wEemlzLOTmNfcSQ" type="7004">
145 <styles xmi:type="notation:SortingStyle" xmi:id="_YMgMKz6wEemlzLOTmNfcSQ"/>
146 <styles xmi:type="notation:FilteringStyle" xmi:id="_YMgMLD6wEemlzLOTmNfcSQ"/>
147 </children>
148 <styles xmi:type="notation:ShapeStyle" xmi:id="_YMgMJz6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
149 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YMgMKD6wEemlzLOTmNfcSQ" x="1200" y="156"/>
150 </children>
151 <children xmi:type="notation:Node" xmi:id="_YMgMLT6wEemlzLOTmNfcSQ" type="2003" element="_YLZYxz6wEemlzLOTmNfcSQ">
152 <children xmi:type="notation:Node" xmi:id="_YMgMMD6wEemlzLOTmNfcSQ" type="5007"/>
153 <children xmi:type="notation:Node" xmi:id="_YMgMMT6wEemlzLOTmNfcSQ" type="7004">
154 <styles xmi:type="notation:SortingStyle" xmi:id="_YMgMMj6wEemlzLOTmNfcSQ"/>
155 <styles xmi:type="notation:FilteringStyle" xmi:id="_YMgMMz6wEemlzLOTmNfcSQ"/>
156 </children>
157 <styles xmi:type="notation:ShapeStyle" xmi:id="_YMgMLj6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
158 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YMgMLz6wEemlzLOTmNfcSQ" x="1008" y="156"/>
159 </children>
160 <children xmi:type="notation:Node" xmi:id="_YMp9AD6wEemlzLOTmNfcSQ" type="2003" element="_YLZYyj6wEemlzLOTmNfcSQ">
161 <children xmi:type="notation:Node" xmi:id="_YMp9Az6wEemlzLOTmNfcSQ" type="5007"/>
162 <children xmi:type="notation:Node" xmi:id="_YMp9BD6wEemlzLOTmNfcSQ" type="7004">
163 <styles xmi:type="notation:SortingStyle" xmi:id="_YMp9BT6wEemlzLOTmNfcSQ"/>
164 <styles xmi:type="notation:FilteringStyle" xmi:id="_YMp9Bj6wEemlzLOTmNfcSQ"/>
165 </children>
166 <styles xmi:type="notation:ShapeStyle" xmi:id="_YMp9AT6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8" italic="true"/>
167 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YMp9Aj6wEemlzLOTmNfcSQ" x="1068" y="-36"/>
168 </children>
169 <children xmi:type="notation:Node" xmi:id="_YMp9Bz6wEemlzLOTmNfcSQ" type="2003" element="_YLZYzT6wEemlzLOTmNfcSQ">
170 <children xmi:type="notation:Node" xmi:id="_YMp9Cj6wEemlzLOTmNfcSQ" type="5007"/>
171 <children xmi:type="notation:Node" xmi:id="_YMp9Cz6wEemlzLOTmNfcSQ" type="7004">
172 <children xmi:type="notation:Node" xmi:id="_YMp9ET6wEemlzLOTmNfcSQ" type="3010" element="_YL2Esj6wEemlzLOTmNfcSQ">
173 <styles xmi:type="notation:FontStyle" xmi:id="_YMp9Ej6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
174 <layoutConstraint xmi:type="notation:Location" xmi:id="_YMp9Ez6wEemlzLOTmNfcSQ"/>
175 </children>
176 <children xmi:type="notation:Node" xmi:id="_YMp9FD6wEemlzLOTmNfcSQ" type="3010" element="_YL2EtD6wEemlzLOTmNfcSQ">
177 <styles xmi:type="notation:FontStyle" xmi:id="_YMp9FT6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
178 <layoutConstraint xmi:type="notation:Location" xmi:id="_YMp9Fj6wEemlzLOTmNfcSQ"/>
179 </children>
180 <children xmi:type="notation:Node" xmi:id="_YMp9Fz6wEemlzLOTmNfcSQ" type="3010" element="_YL2Etj6wEemlzLOTmNfcSQ">
181 <styles xmi:type="notation:FontStyle" xmi:id="_YMp9GD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
182 <layoutConstraint xmi:type="notation:Location" xmi:id="_YMp9GT6wEemlzLOTmNfcSQ"/>
183 </children>
184 <styles xmi:type="notation:SortingStyle" xmi:id="_YMp9DD6wEemlzLOTmNfcSQ"/>
185 <styles xmi:type="notation:FilteringStyle" xmi:id="_YMp9DT6wEemlzLOTmNfcSQ"/>
186 </children>
187 <styles xmi:type="notation:ShapeStyle" xmi:id="_YMp9CD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
188 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YMp9CT6wEemlzLOTmNfcSQ" x="252"/>
189 </children>
190 <styles xmi:type="notation:DiagramStyle" xmi:id="_XcDmgj6wEemlzLOTmNfcSQ"/>
191 <edges xmi:type="notation:Edge" xmi:id="_YNBJYD6wEemlzLOTmNfcSQ" type="4001" element="_YL_1sD6wEemlzLOTmNfcSQ" source="_YMXCEz6wEemlzLOTmNfcSQ" target="_YMgMAz6wEemlzLOTmNfcSQ">
192 <children xmi:type="notation:Node" xmi:id="_YNBJZD6wEemlzLOTmNfcSQ" type="6001">
193 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNBJZT6wEemlzLOTmNfcSQ" x="32" y="48"/>
194 </children>
195 <children xmi:type="notation:Node" xmi:id="_YNBJZj6wEemlzLOTmNfcSQ" type="6002">
196 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNBJZz6wEemlzLOTmNfcSQ" x="-11" y="10"/>
197 </children>
198 <children xmi:type="notation:Node" xmi:id="_YNKTUD6wEemlzLOTmNfcSQ" type="6003">
199 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNKTUT6wEemlzLOTmNfcSQ" x="-18" y="10"/>
200 </children>
201 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNBJYT6wEemlzLOTmNfcSQ" routing="Rectilinear"/>
202 <styles xmi:type="notation:FontStyle" xmi:id="_YNBJYj6wEemlzLOTmNfcSQ" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/>
203 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNBJYz6wEemlzLOTmNfcSQ" points="[-59, -37, 95, 131]$[-74, -37, 80, 131]$[-74, -119, 80, 49]"/>
204 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNUEUD6wEemlzLOTmNfcSQ" id="(0.5,0.5)"/>
205 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNUEUT6wEemlzLOTmNfcSQ" id="(0.5,0.5)"/>
206 </edges>
207 <edges xmi:type="notation:Edge" xmi:id="_YNUEUj6wEemlzLOTmNfcSQ" type="4001" element="_YMDgFj6wEemlzLOTmNfcSQ" source="_YMgMAz6wEemlzLOTmNfcSQ" target="_YMXCEz6wEemlzLOTmNfcSQ">
208 <children xmi:type="notation:Node" xmi:id="_YNUEVj6wEemlzLOTmNfcSQ" type="6001">
209 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNUEVz6wEemlzLOTmNfcSQ" x="27" y="46"/>
210 </children>
211 <children xmi:type="notation:Node" xmi:id="_YNUEWD6wEemlzLOTmNfcSQ" type="6002">
212 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNUEWT6wEemlzLOTmNfcSQ" x="18" y="10"/>
213 </children>
214 <children xmi:type="notation:Node" xmi:id="_YNUEWj6wEemlzLOTmNfcSQ" type="6003">
215 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNUEWz6wEemlzLOTmNfcSQ" x="10" y="-11"/>
216 </children>
217 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNUEUz6wEemlzLOTmNfcSQ" routing="Rectilinear"/>
218 <styles xmi:type="notation:FontStyle" xmi:id="_YNUEVD6wEemlzLOTmNfcSQ" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/>
219 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNUEVT6wEemlzLOTmNfcSQ" points="[80, 49, -74, -119]$[80, 131, -74, -37]$[95, 131, -59, -37]"/>
220 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNUEXD6wEemlzLOTmNfcSQ" id="(0.5,0.5)"/>
221 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNUEXT6wEemlzLOTmNfcSQ" id="(0.5,0.5)"/>
222 </edges>
223 <edges xmi:type="notation:Edge" xmi:id="_YNUEXj6wEemlzLOTmNfcSQ" type="4001" element="_YMDgID6wEemlzLOTmNfcSQ" source="_YMgMCj6wEemlzLOTmNfcSQ" target="_YMXCEz6wEemlzLOTmNfcSQ">
224 <children xmi:type="notation:Node" xmi:id="_YNUEYj6wEemlzLOTmNfcSQ" type="6001">
225 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNUEYz6wEemlzLOTmNfcSQ" y="-10"/>
226 </children>
227 <children xmi:type="notation:Node" xmi:id="_YNUEZD6wEemlzLOTmNfcSQ" type="6002">
228 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNUEZT6wEemlzLOTmNfcSQ" y="10"/>
229 </children>
230 <children xmi:type="notation:Node" xmi:id="_YNUEZj6wEemlzLOTmNfcSQ" type="6003">
231 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNUEZz6wEemlzLOTmNfcSQ" y="10"/>
232 </children>
233 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNUEXz6wEemlzLOTmNfcSQ" routing="Tree"/>
234 <styles xmi:type="notation:FontStyle" xmi:id="_YNUEYD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
235 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNUEYT6wEemlzLOTmNfcSQ" points="[0, -98, 0, 144]$[0, -122, 0, 120]$[58, -122, 58, 120]$[58, -144, 58, 98]"/>
236 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1UD6wEemlzLOTmNfcSQ" id="(0.5,1.0)"/>
237 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1UT6wEemlzLOTmNfcSQ" id="(0.5,0.0)"/>
238 </edges>
239 <edges xmi:type="notation:Edge" xmi:id="_YNd1Uj6wEemlzLOTmNfcSQ" type="4001" element="_YMNRFT6wEemlzLOTmNfcSQ" source="_YMgMLT6wEemlzLOTmNfcSQ" target="_YMp9AD6wEemlzLOTmNfcSQ">
240 <children xmi:type="notation:Node" xmi:id="_YNd1Vj6wEemlzLOTmNfcSQ" type="6001">
241 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1Vz6wEemlzLOTmNfcSQ" y="-10"/>
242 </children>
243 <children xmi:type="notation:Node" xmi:id="_YNd1WD6wEemlzLOTmNfcSQ" type="6002">
244 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1WT6wEemlzLOTmNfcSQ" y="10"/>
245 </children>
246 <children xmi:type="notation:Node" xmi:id="_YNd1Wj6wEemlzLOTmNfcSQ" type="6003">
247 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1Wz6wEemlzLOTmNfcSQ" y="10"/>
248 </children>
249 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNd1Uz6wEemlzLOTmNfcSQ" routing="Tree"/>
250 <styles xmi:type="notation:FontStyle" xmi:id="_YNd1VD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
251 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNd1VT6wEemlzLOTmNfcSQ" points="[0, 0, -60, 94]$[0, 10, -60, 104]$[49, 10, -11, 104]$[49, -94, -11, 0]"/>
252 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1XD6wEemlzLOTmNfcSQ" id="(0.5,0.0)"/>
253 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1XT6wEemlzLOTmNfcSQ" id="(0.5,1.0)"/>
254 </edges>
255 <edges xmi:type="notation:Edge" xmi:id="_YNd1Xj6wEemlzLOTmNfcSQ" type="4001" element="_YMNRHD6wEemlzLOTmNfcSQ" source="_YMgMJj6wEemlzLOTmNfcSQ" target="_YMp9AD6wEemlzLOTmNfcSQ">
256 <children xmi:type="notation:Node" xmi:id="_YNd1Yj6wEemlzLOTmNfcSQ" type="6001">
257 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1Yz6wEemlzLOTmNfcSQ" y="-10"/>
258 </children>
259 <children xmi:type="notation:Node" xmi:id="_YNd1ZD6wEemlzLOTmNfcSQ" type="6002">
260 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1ZT6wEemlzLOTmNfcSQ" y="10"/>
261 </children>
262 <children xmi:type="notation:Node" xmi:id="_YNd1Zj6wEemlzLOTmNfcSQ" type="6003">
263 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1Zz6wEemlzLOTmNfcSQ" y="10"/>
264 </children>
265 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNd1Xz6wEemlzLOTmNfcSQ" routing="Tree"/>
266 <styles xmi:type="notation:FontStyle" xmi:id="_YNd1YD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
267 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNd1YT6wEemlzLOTmNfcSQ" points="[0, 0, 132, 94]$[0, 10, 132, 104]$[-143, 10, -11, 104]$[-143, -94, -11, 0]"/>
268 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1aD6wEemlzLOTmNfcSQ" id="(0.5,0.0)"/>
269 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1aT6wEemlzLOTmNfcSQ" id="(0.5,1.0)"/>
270 </edges>
271 <edges xmi:type="notation:Edge" xmi:id="_YNd1aj6wEemlzLOTmNfcSQ" type="4001" element="_YMNRIz6wEemlzLOTmNfcSQ" source="_YMXCEz6wEemlzLOTmNfcSQ" target="_YMgMCj6wEemlzLOTmNfcSQ">
272 <children xmi:type="notation:Node" xmi:id="_YNd1bj6wEemlzLOTmNfcSQ" type="6001">
273 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1bz6wEemlzLOTmNfcSQ" x="-1" y="10"/>
274 </children>
275 <children xmi:type="notation:Node" xmi:id="_YNd1cD6wEemlzLOTmNfcSQ" type="6002">
276 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1cT6wEemlzLOTmNfcSQ" x="-4" y="-10"/>
277 </children>
278 <children xmi:type="notation:Node" xmi:id="_YNd1cj6wEemlzLOTmNfcSQ" type="6003">
279 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1cz6wEemlzLOTmNfcSQ" x="-14" y="-44"/>
280 </children>
281 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNd1az6wEemlzLOTmNfcSQ" routing="Rectilinear"/>
282 <styles xmi:type="notation:FontStyle" xmi:id="_YNd1bD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
283 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNd1bT6wEemlzLOTmNfcSQ" points="[-59, 1, -100, -131]$[-107, 1, -148, -131]$[-107, 133, -148, 1]$[-47, 133, -88, 1]"/>
284 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1dD6wEemlzLOTmNfcSQ" id="(0.5,0.5)"/>
285 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1dT6wEemlzLOTmNfcSQ" id="(0.5,0.5)"/>
286 </edges>
287 <edges xmi:type="notation:Edge" xmi:id="_YNd1dj6wEemlzLOTmNfcSQ" type="4001" element="_YMNRLT6wEemlzLOTmNfcSQ" source="_YMgMGD6wEemlzLOTmNfcSQ" target="_YMgMLT6wEemlzLOTmNfcSQ">
288 <children xmi:type="notation:Node" xmi:id="_YNd1ej6wEemlzLOTmNfcSQ" type="6001">
289 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1ez6wEemlzLOTmNfcSQ" x="10"/>
290 </children>
291 <children xmi:type="notation:Node" xmi:id="_YNd1fD6wEemlzLOTmNfcSQ" type="6002">
292 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1fT6wEemlzLOTmNfcSQ" x="27" y="-18"/>
293 </children>
294 <children xmi:type="notation:Node" xmi:id="_YNd1fj6wEemlzLOTmNfcSQ" type="6003">
295 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1fz6wEemlzLOTmNfcSQ" x="-10"/>
296 </children>
297 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNd1dz6wEemlzLOTmNfcSQ" routing="Rectilinear"/>
298 <styles xmi:type="notation:FontStyle" xmi:id="_YNd1eD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
299 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNd1eT6wEemlzLOTmNfcSQ" points="[-59, 48, 37, 118]$[-96, 48, 0, 118]$[-96, -70, 0, 0]"/>
300 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1gD6wEemlzLOTmNfcSQ" id="(0.5,0.0)"/>
301 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1gT6wEemlzLOTmNfcSQ" id="(0.5,1.0)"/>
302 </edges>
303 <edges xmi:type="notation:Edge" xmi:id="_YNd1gj6wEemlzLOTmNfcSQ" type="4001" element="_YMNRND6wEemlzLOTmNfcSQ" source="_YMgMHz6wEemlzLOTmNfcSQ" target="_YMp9AD6wEemlzLOTmNfcSQ">
304 <children xmi:type="notation:Node" xmi:id="_YNd1hj6wEemlzLOTmNfcSQ" type="6001">
305 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1hz6wEemlzLOTmNfcSQ" x="13" y="18"/>
306 </children>
307 <children xmi:type="notation:Node" xmi:id="_YNd1iD6wEemlzLOTmNfcSQ" type="6002">
308 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1iT6wEemlzLOTmNfcSQ" x="-32" y="10"/>
309 </children>
310 <children xmi:type="notation:Node" xmi:id="_YNd1ij6wEemlzLOTmNfcSQ" type="6003">
311 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1iz6wEemlzLOTmNfcSQ" y="10"/>
312 </children>
313 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNd1gz6wEemlzLOTmNfcSQ" routing="Rectilinear"/>
314 <styles xmi:type="notation:FontStyle" xmi:id="_YNd1hD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
315 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNd1hT6wEemlzLOTmNfcSQ" points="[30, -49, -209, 143]$[30, -205, -209, -13]$[180, -205, -59, -13]"/>
316 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1jD6wEemlzLOTmNfcSQ" id="(0.5,0.5)"/>
317 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1jT6wEemlzLOTmNfcSQ" id="(0.5,0.5)"/>
318 </edges>
319 <edges xmi:type="notation:Edge" xmi:id="_YNd1jj6wEemlzLOTmNfcSQ" type="4001" element="_YMNRPj6wEemlzLOTmNfcSQ" source="_YMgMET6wEemlzLOTmNfcSQ" target="_YMp9AD6wEemlzLOTmNfcSQ">
320 <children xmi:type="notation:Node" xmi:id="_YNd1kj6wEemlzLOTmNfcSQ" type="6001">
321 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1kz6wEemlzLOTmNfcSQ" x="-43" y="-10"/>
322 </children>
323 <children xmi:type="notation:Node" xmi:id="_YNd1lD6wEemlzLOTmNfcSQ" type="6002">
324 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1lT6wEemlzLOTmNfcSQ" x="-18" y="17"/>
325 </children>
326 <children xmi:type="notation:Node" xmi:id="_YNd1lj6wEemlzLOTmNfcSQ" type="6003">
327 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1lz6wEemlzLOTmNfcSQ" x="-18" y="10"/>
328 </children>
329 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNd1jz6wEemlzLOTmNfcSQ" routing="Rectilinear"/>
330 <styles xmi:type="notation:FontStyle" xmi:id="_YNd1kD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
331 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNd1kT6wEemlzLOTmNfcSQ" points="[0, 0, -384, 10]$[0, -36, -384, -26]$[325, -36, -59, -26]"/>
332 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1mD6wEemlzLOTmNfcSQ" id="(0.5,0.0)"/>
333 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1mT6wEemlzLOTmNfcSQ" id="(0.5,1.0)"/>
334 </edges>
335 <edges xmi:type="notation:Edge" xmi:id="_YNd1mj6wEemlzLOTmNfcSQ" type="4001" element="_YMNRRT6wEemlzLOTmNfcSQ" source="_YMXCEz6wEemlzLOTmNfcSQ" target="_YMgMHz6wEemlzLOTmNfcSQ">
336 <children xmi:type="notation:Node" xmi:id="_YNd1nj6wEemlzLOTmNfcSQ" type="6001">
337 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1nz6wEemlzLOTmNfcSQ" y="-10"/>
338 </children>
339 <children xmi:type="notation:Node" xmi:id="_YNd1oD6wEemlzLOTmNfcSQ" type="6002">
340 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1oT6wEemlzLOTmNfcSQ" y="10"/>
341 </children>
342 <children xmi:type="notation:Node" xmi:id="_YNd1oj6wEemlzLOTmNfcSQ" type="6003">
343 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNd1oz6wEemlzLOTmNfcSQ" y="10"/>
344 </children>
345 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNd1mz6wEemlzLOTmNfcSQ" routing="Rectilinear"/>
346 <styles xmi:type="notation:FontStyle" xmi:id="_YNd1nD6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8"/>
347 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNd1nT6wEemlzLOTmNfcSQ" points="[0, -50, -390, 110]$[390, -110, 0, 50]"/>
348 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1pD6wEemlzLOTmNfcSQ" id="(0.5,0.5)"/>
349 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNd1pT6wEemlzLOTmNfcSQ" id="(0.5,0.5)"/>
350 </edges>
351 <edges xmi:type="notation:Edge" xmi:id="_YNm_QD6wEemlzLOTmNfcSQ" type="4001" element="_YMNRTD6wEemlzLOTmNfcSQ" source="_YMgMGD6wEemlzLOTmNfcSQ" target="_YMgMJj6wEemlzLOTmNfcSQ">
352 <children xmi:type="notation:Node" xmi:id="_YNm_RD6wEemlzLOTmNfcSQ" type="6001">
353 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNm_RT6wEemlzLOTmNfcSQ" x="10"/>
354 </children>
355 <children xmi:type="notation:Node" xmi:id="_YNm_Rj6wEemlzLOTmNfcSQ" type="6002">
356 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNm_Rz6wEemlzLOTmNfcSQ" y="10"/>
357 </children>
358 <children xmi:type="notation:Node" xmi:id="_YNm_SD6wEemlzLOTmNfcSQ" type="6003">
359 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YNm_ST6wEemlzLOTmNfcSQ" y="10"/>
360 </children>
361 <styles xmi:type="notation:ConnectorStyle" xmi:id="_YNm_QT6wEemlzLOTmNfcSQ" routing="Rectilinear"/>
362 <styles xmi:type="notation:FontStyle" xmi:id="_YNm_Qj6wEemlzLOTmNfcSQ" fontName="Segoe UI" fontHeight="8" bold="true"/>
363 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YNm_Qz6wEemlzLOTmNfcSQ" points="[59, 60, -37, 130]$[96, 60, 0, 130]$[96, -70, 0, 0]"/>
364 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNm_Sj6wEemlzLOTmNfcSQ" id="(0.5,0.0)"/>
365 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YNm_Sz6wEemlzLOTmNfcSQ" id="(0.5,1.0)"/>
366 </edges>
367 </data>
368 </ownedAnnotationEntries>
369 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YLGd0D6wEemlzLOTmNfcSQ" name="FunctionalElement" tooltipText="" outgoingEdges="_YL_1sD6wEemlzLOTmNfcSQ _YMNRIz6wEemlzLOTmNfcSQ _YMNRRT6wEemlzLOTmNfcSQ" incomingEdges="_YMDgFj6wEemlzLOTmNfcSQ _YMDgID6wEemlzLOTmNfcSQ" width="12" height="10">
370 <target xmi:type="ecore:EClass" href="fam.ecore#//FunctionalElement"/>
371 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//FunctionalElement"/>
372 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YLQO0D6wEemlzLOTmNfcSQ" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="228,228,228">
373 <labelFormat>italic</labelFormat>
374 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/>
375 </ownedStyle>
376 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
377 </ownedDiagramElements>
378 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YLQO0j6wEemlzLOTmNfcSQ" name="FunctionalArchitectureModel" tooltipText="" outgoingEdges="_YMDgFj6wEemlzLOTmNfcSQ" incomingEdges="_YL_1sD6wEemlzLOTmNfcSQ" width="12" height="10">
379 <target xmi:type="ecore:EClass" href="fam.ecore#//FunctionalArchitectureModel"/>
380 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//FunctionalArchitectureModel"/>
381 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
382 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
383 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
384 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YLQO0z6wEemlzLOTmNfcSQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
385 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
386 </ownedStyle>
387 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
388 </ownedDiagramElements>
389 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YLQO1T6wEemlzLOTmNfcSQ" name="Function" tooltipText="" outgoingEdges="_YMDgID6wEemlzLOTmNfcSQ" incomingEdges="_YMNRIz6wEemlzLOTmNfcSQ" width="12" height="10">
390 <target xmi:type="ecore:EClass" href="fam.ecore#//Function"/>
391 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//Function"/>
392 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
393 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
394 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
395 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YLQO1j6wEemlzLOTmNfcSQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
396 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
397 </ownedStyle>
398 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
399 <ownedElements xmi:type="diagram:DNodeListElement" uid="_YLs6yD6wEemlzLOTmNfcSQ" name="/type : FunctionType = Root" tooltipText="">
400 <target xmi:type="ecore:EAttribute" href="fam.ecore#//Function/type"/>
401 <semanticElements xmi:type="ecore:EAttribute" href="fam.ecore#//Function/type"/>
402 <ownedStyle xmi:type="diagram:BundledImage" uid="_YLs6yj6wEemlzLOTmNfcSQ" labelColor="39,76,114" labelAlignment="LEFT" description="_YLs6yT6wEemlzLOTmNfcSQ">
403 <labelFormat>bold</labelFormat>
404 </ownedStyle>
405 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
406 </ownedElements>
407 </ownedDiagramElements>
408 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YLQO2D6wEemlzLOTmNfcSQ" name="FAMTerminator" tooltipText="" outgoingEdges="_YMNRPj6wEemlzLOTmNfcSQ" width="12" height="10">
409 <target xmi:type="ecore:EClass" href="fam.ecore#//FAMTerminator"/>
410 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//FAMTerminator"/>
411 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
412 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
413 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
414 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YLQO2T6wEemlzLOTmNfcSQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
415 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
416 </ownedStyle>
417 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
418 </ownedDiagramElements>
419 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YLQO2z6wEemlzLOTmNfcSQ" name="InformationLink" tooltipText="" outgoingEdges="_YMNRLT6wEemlzLOTmNfcSQ _YMNRTD6wEemlzLOTmNfcSQ" width="12" height="10">
420 <target xmi:type="ecore:EClass" href="fam.ecore#//InformationLink"/>
421 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//InformationLink"/>
422 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YLQO3D6wEemlzLOTmNfcSQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
423 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
424 </ownedStyle>
425 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
426 </ownedDiagramElements>
427 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YLZYwT6wEemlzLOTmNfcSQ" name="FunctionalInterface" tooltipText="" outgoingEdges="_YMNRND6wEemlzLOTmNfcSQ" incomingEdges="_YMNRRT6wEemlzLOTmNfcSQ" width="12" height="10">
428 <target xmi:type="ecore:EClass" href="fam.ecore#//FunctionalInterface"/>
429 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//FunctionalInterface"/>
430 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YLZYwj6wEemlzLOTmNfcSQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
431 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
432 </ownedStyle>
433 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
434 </ownedDiagramElements>
435 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YLZYxD6wEemlzLOTmNfcSQ" name="FunctionalInput" tooltipText="" outgoingEdges="_YMNRHD6wEemlzLOTmNfcSQ" incomingEdges="_YMNRTD6wEemlzLOTmNfcSQ" width="12" height="10">
436 <target xmi:type="ecore:EClass" href="fam.ecore#//FunctionalInput"/>
437 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//FunctionalInput"/>
438 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YLZYxT6wEemlzLOTmNfcSQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
439 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
440 </ownedStyle>
441 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
442 </ownedDiagramElements>
443 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YLZYxz6wEemlzLOTmNfcSQ" name="FunctionalOutput" tooltipText="" outgoingEdges="_YMNRFT6wEemlzLOTmNfcSQ" incomingEdges="_YMNRLT6wEemlzLOTmNfcSQ" width="12" height="10">
444 <target xmi:type="ecore:EClass" href="fam.ecore#//FunctionalOutput"/>
445 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//FunctionalOutput"/>
446 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YLZYyD6wEemlzLOTmNfcSQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
447 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
448 </ownedStyle>
449 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
450 </ownedDiagramElements>
451 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YLZYyj6wEemlzLOTmNfcSQ" name="FunctionalData" tooltipText="" incomingEdges="_YMNRFT6wEemlzLOTmNfcSQ _YMNRHD6wEemlzLOTmNfcSQ _YMNRND6wEemlzLOTmNfcSQ _YMNRPj6wEemlzLOTmNfcSQ" width="12" height="10">
452 <target xmi:type="ecore:EClass" href="fam.ecore#//FunctionalData"/>
453 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//FunctionalData"/>
454 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
455 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
456 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
457 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YLZYyz6wEemlzLOTmNfcSQ" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="228,228,228">
458 <labelFormat>italic</labelFormat>
459 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/>
460 </ownedStyle>
461 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
462 </ownedDiagramElements>
463 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_YLZYzT6wEemlzLOTmNfcSQ" name="FunctionType" tooltipText="" width="12" height="10">
464 <target xmi:type="ecore:EEnum" href="fam.ecore#//FunctionType"/>
465 <semanticElements xmi:type="ecore:EEnum" href="fam.ecore#//FunctionType"/>
466 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
467 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
468 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
469 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YLZYzj6wEemlzLOTmNfcSQ" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="221,236,202">
470 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/>
471 </ownedStyle>
472 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/>
473 <ownedElements xmi:type="diagram:DNodeListElement" uid="_YL2Esj6wEemlzLOTmNfcSQ" name="Root" tooltipText="">
474 <target xmi:type="ecore:EEnumLiteral" href="fam.ecore#//FunctionType/Root"/>
475 <semanticElements xmi:type="ecore:EEnumLiteral" href="fam.ecore#//FunctionType/Root"/>
476 <ownedStyle xmi:type="diagram:BundledImage" uid="_YL2Esz6wEemlzLOTmNfcSQ" labelAlignment="LEFT">
477 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
478 </ownedStyle>
479 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
480 </ownedElements>
481 <ownedElements xmi:type="diagram:DNodeListElement" uid="_YL2EtD6wEemlzLOTmNfcSQ" name="Intermediate" tooltipText="">
482 <target xmi:type="ecore:EEnumLiteral" href="fam.ecore#//FunctionType/Intermediate"/>
483 <semanticElements xmi:type="ecore:EEnumLiteral" href="fam.ecore#//FunctionType/Intermediate"/>
484 <ownedStyle xmi:type="diagram:BundledImage" uid="_YL2EtT6wEemlzLOTmNfcSQ" labelAlignment="LEFT">
485 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
486 </ownedStyle>
487 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
488 </ownedElements>
489 <ownedElements xmi:type="diagram:DNodeListElement" uid="_YL2Etj6wEemlzLOTmNfcSQ" name="Leaf" tooltipText="">
490 <target xmi:type="ecore:EEnumLiteral" href="fam.ecore#//FunctionType/Leaf"/>
491 <semanticElements xmi:type="ecore:EEnumLiteral" href="fam.ecore#//FunctionType/Leaf"/>
492 <ownedStyle xmi:type="diagram:BundledImage" uid="_YL2Etz6wEemlzLOTmNfcSQ" labelAlignment="LEFT">
493 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
494 </ownedStyle>
495 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
496 </ownedElements>
497 </ownedDiagramElements>
498 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YL_1sD6wEemlzLOTmNfcSQ" name="[1..1] /model" sourceNode="_YLGd0D6wEemlzLOTmNfcSQ" targetNode="_YLQO0j6wEemlzLOTmNfcSQ">
499 <target xmi:type="ecore:EReference" href="fam.ecore#//FunctionalElement/model"/>
500 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FunctionalElement/model"/>
501 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMDgED6wEemlzLOTmNfcSQ" description="_YL_1sT6wEemlzLOTmNfcSQ" routingStyle="manhattan" strokeColor="114,159,207">
502 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_YMDgEj6wEemlzLOTmNfcSQ" showIcon="false" labelColor="39,76,114">
503 <customFeatures>labelSize</customFeatures>
504 <labelFormat>bold</labelFormat>
505 </centerLabelStyle>
506 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_YMDgET6wEemlzLOTmNfcSQ" showIcon="false" labelColor="39,76,114">
507 <customFeatures>labelSize</customFeatures>
508 </endLabelStyle>
509 </ownedStyle>
510 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
511 </ownedDiagramElements>
512 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YMDgFj6wEemlzLOTmNfcSQ" name="[0..*] rootElements" sourceNode="_YLQO0j6wEemlzLOTmNfcSQ" targetNode="_YLGd0D6wEemlzLOTmNfcSQ">
513 <target xmi:type="ecore:EReference" href="fam.ecore#//FunctionalArchitectureModel/rootElements"/>
514 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FunctionalArchitectureModel/rootElements"/>
515 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMDgGj6wEemlzLOTmNfcSQ" description="_YMDgFz6wEemlzLOTmNfcSQ" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
516 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_YMDgHD6wEemlzLOTmNfcSQ" showIcon="false">
517 <customFeatures>labelSize</customFeatures>
518 </centerLabelStyle>
519 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_YMDgGz6wEemlzLOTmNfcSQ" showIcon="false" labelColor="39,76,114">
520 <customFeatures>labelSize</customFeatures>
521 </endLabelStyle>
522 </ownedStyle>
523 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
524 </ownedDiagramElements>
525 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YMDgID6wEemlzLOTmNfcSQ" sourceNode="_YLQO1T6wEemlzLOTmNfcSQ" targetNode="_YLGd0D6wEemlzLOTmNfcSQ">
526 <target xmi:type="ecore:EClass" href="fam.ecore#//Function"/>
527 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//Function"/>
528 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMDgIT6wEemlzLOTmNfcSQ" targetArrow="InputClosedArrow" routingStyle="tree">
529 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
530 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_YMNRED6wEemlzLOTmNfcSQ" showIcon="false">
531 <labelFormat>italic</labelFormat>
532 </beginLabelStyle>
533 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_YMNRET6wEemlzLOTmNfcSQ" showIcon="false"/>
534 </ownedStyle>
535 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
536 </ownedDiagramElements>
537 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YMNRFT6wEemlzLOTmNfcSQ" sourceNode="_YLZYxz6wEemlzLOTmNfcSQ" targetNode="_YLZYyj6wEemlzLOTmNfcSQ">
538 <target xmi:type="ecore:EClass" href="fam.ecore#//FunctionalOutput"/>
539 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//FunctionalOutput"/>
540 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMNRFj6wEemlzLOTmNfcSQ" targetArrow="InputClosedArrow" routingStyle="tree">
541 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
542 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_YMNRFz6wEemlzLOTmNfcSQ" showIcon="false">
543 <labelFormat>italic</labelFormat>
544 </beginLabelStyle>
545 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_YMNRGD6wEemlzLOTmNfcSQ" showIcon="false"/>
546 </ownedStyle>
547 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
548 </ownedDiagramElements>
549 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YMNRHD6wEemlzLOTmNfcSQ" sourceNode="_YLZYxD6wEemlzLOTmNfcSQ" targetNode="_YLZYyj6wEemlzLOTmNfcSQ">
550 <target xmi:type="ecore:EClass" href="fam.ecore#//FunctionalInput"/>
551 <semanticElements xmi:type="ecore:EClass" href="fam.ecore#//FunctionalInput"/>
552 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMNRHT6wEemlzLOTmNfcSQ" targetArrow="InputClosedArrow" routingStyle="tree">
553 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
554 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_YMNRHj6wEemlzLOTmNfcSQ" showIcon="false">
555 <labelFormat>italic</labelFormat>
556 </beginLabelStyle>
557 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_YMNRHz6wEemlzLOTmNfcSQ" showIcon="false"/>
558 </ownedStyle>
559 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
560 </ownedDiagramElements>
561 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YMNRIz6wEemlzLOTmNfcSQ" sourceNode="_YLGd0D6wEemlzLOTmNfcSQ" targetNode="_YLQO1T6wEemlzLOTmNfcSQ" beginLabel="[0..*] subElements" endLabel="[0..1] parent">
562 <target xmi:type="ecore:EReference" href="fam.ecore#//FunctionalElement/parent"/>
563 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FunctionalElement/parent"/>
564 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//Function/subElements"/>
565 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMNRJz6wEemlzLOTmNfcSQ" description="_YMNRJD6wEemlzLOTmNfcSQ" sourceArrow="InputArrow" targetArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
566 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_YMNRKD6wEemlzLOTmNfcSQ" showIcon="false"/>
567 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_YMNRKT6wEemlzLOTmNfcSQ" showIcon="false"/>
568 </ownedStyle>
569 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']"/>
570 </ownedDiagramElements>
571 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YMNRLT6wEemlzLOTmNfcSQ" sourceNode="_YLQO2z6wEemlzLOTmNfcSQ" targetNode="_YLZYxz6wEemlzLOTmNfcSQ" beginLabel="[0..*] outgoingLinks" endLabel="[0..1] from">
572 <target xmi:type="ecore:EReference" href="fam.ecore#//InformationLink/from"/>
573 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//InformationLink/from"/>
574 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FunctionalOutput/outgoingLinks"/>
575 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMNRLj6wEemlzLOTmNfcSQ" description="_YMNRJD6wEemlzLOTmNfcSQ" sourceArrow="InputArrow" targetArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
576 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_YMNRLz6wEemlzLOTmNfcSQ" showIcon="false"/>
577 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_YMNRMD6wEemlzLOTmNfcSQ" showIcon="false"/>
578 </ownedStyle>
579 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']"/>
580 </ownedDiagramElements>
581 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YMNRND6wEemlzLOTmNfcSQ" sourceNode="_YLZYwT6wEemlzLOTmNfcSQ" targetNode="_YLZYyj6wEemlzLOTmNfcSQ" beginLabel="[0..1] interface" endLabel="[0..*] data">
582 <target xmi:type="ecore:EReference" href="fam.ecore#//FunctionalInterface/data"/>
583 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FunctionalInterface/data"/>
584 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FunctionalData/interface"/>
585 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMNROD6wEemlzLOTmNfcSQ" description="_YMNRNT6wEemlzLOTmNfcSQ" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
586 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_YMNROT6wEemlzLOTmNfcSQ" showIcon="false"/>
587 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_YMNROj6wEemlzLOTmNfcSQ" showIcon="false"/>
588 </ownedStyle>
589 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']"/>
590 </ownedDiagramElements>
591 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YMNRPj6wEemlzLOTmNfcSQ" sourceNode="_YLQO2D6wEemlzLOTmNfcSQ" targetNode="_YLZYyj6wEemlzLOTmNfcSQ" beginLabel="[0..1] terminator" endLabel="[0..1] data">
592 <target xmi:type="ecore:EReference" href="fam.ecore#//FAMTerminator/data"/>
593 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FAMTerminator/data"/>
594 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FunctionalData/terminator"/>
595 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMNRPz6wEemlzLOTmNfcSQ" description="_YMNRJD6wEemlzLOTmNfcSQ" sourceArrow="InputArrow" targetArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
596 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_YMNRQD6wEemlzLOTmNfcSQ" showIcon="false"/>
597 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_YMNRQT6wEemlzLOTmNfcSQ" showIcon="false"/>
598 </ownedStyle>
599 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']"/>
600 </ownedDiagramElements>
601 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YMNRRT6wEemlzLOTmNfcSQ" sourceNode="_YLGd0D6wEemlzLOTmNfcSQ" targetNode="_YLZYwT6wEemlzLOTmNfcSQ" beginLabel="[0..1] element" endLabel="[0..1] interface">
602 <target xmi:type="ecore:EReference" href="fam.ecore#//FunctionalElement/interface"/>
603 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FunctionalInterface/element"/>
604 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FunctionalElement/interface"/>
605 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMNRRj6wEemlzLOTmNfcSQ" description="_YMNRNT6wEemlzLOTmNfcSQ" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
606 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_YMNRRz6wEemlzLOTmNfcSQ" showIcon="false"/>
607 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_YMNRSD6wEemlzLOTmNfcSQ" showIcon="false"/>
608 </ownedStyle>
609 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']"/>
610 </ownedDiagramElements>
611 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_YMNRTD6wEemlzLOTmNfcSQ" sourceNode="_YLQO2z6wEemlzLOTmNfcSQ" targetNode="_YLZYxD6wEemlzLOTmNfcSQ" beginLabel="[0..*] IncomingLinks" endLabel="[1..1] to">
612 <target xmi:type="ecore:EReference" href="fam.ecore#//InformationLink/to"/>
613 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//FunctionalInput/IncomingLinks"/>
614 <semanticElements xmi:type="ecore:EReference" href="fam.ecore#//InformationLink/to"/>
615 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_YMNRUD6wEemlzLOTmNfcSQ" description="_YMNRTT6wEemlzLOTmNfcSQ" sourceArrow="InputArrow" routingStyle="manhattan" strokeColor="0,0,0">
616 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_YMNRUT6wEemlzLOTmNfcSQ" showIcon="false">
617 <labelFormat>bold</labelFormat>
618 </beginLabelStyle>
619 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_YMNRUj6wEemlzLOTmNfcSQ" showIcon="false">
620 <labelFormat>bold</labelFormat>
621 </endLabelStyle>
622 </ownedStyle>
623 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']"/>
624 </ownedDiagramElements>
625 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
626 <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_XZsPAD6wEemlzLOTmNfcSQ"/>
627 <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/>
628 <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Package']"/>
629 <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Validation']"/>
630 <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']/@ownedRepresentationExtensions[name='Entities%20With%20Archetypes']/@layers[name='Archetypes']"/>
631 <target xmi:type="ecore:EPackage" href="fam.ecore#/"/>
632 </diagram:DSemanticDiagram>
633</xmi:XMI>
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 @@
23 <extension id="ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.FamPatterns" point="org.eclipse.viatra.query.runtime.queryspecification"> 23 <extension id="ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.FamPatterns" point="org.eclipse.viatra.query.runtime.queryspecification">
24 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.FamPatterns" id="ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.FamPatterns"> 24 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.FamPatterns" id="ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.FamPatterns">
25 <query-specification fqn="ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.terminatorAndInformation"/> 25 <query-specification fqn="ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.terminatorAndInformation"/>
26 <query-specification fqn="ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.rootElements"/>
27 <query-specification fqn="ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.parent"/>
26 </group> 28 </group>
27 </extension> 29 </extension>
28 <extension id="ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries.FileSystemPatterns" point="org.eclipse.viatra.query.runtime.queryspecification"> 30 <extension id="ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries.FileSystemPatterns" point="org.eclipse.viatra.query.runtime.queryspecification">
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) = {
25 find parent(_Child, This); 25 find parent(_Child, This);
26 Target == FunctionType::Intermediate; 26 Target == FunctionType::Intermediate;
27} 27}
28 28*/
29pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { 29pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = {
30 FunctionalArchitectureModel.rootElements(Model, Root); 30 FunctionalArchitectureModel.rootElements(Model, Root);
31} 31}
@@ -33,7 +33,7 @@ pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = {
33pattern parent(Func : Function, Par : Function) = { 33pattern parent(Func : Function, Par : Function) = {
34 Function.parent(Func, Par); 34 Function.parent(Func, Par);
35} 35}
36 36/*
37@QueryBasedFeature 37@QueryBasedFeature
38pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) { 38pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) {
39 FunctionalElement(This); 39 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 @@
1package ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries
2
3//import epackage "http://www.inf.mit.bme.hu/viatrasolver/example/fam"
4import epackage "FamMetamodel"
5
6@Constraint(message="terminatorAndInformation", severity="error", key={T})
7pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = {
8 FunctionalOutput.outgoingLinks(Out,I);
9 FunctionalOutput.terminator(Out,T);
10} or {
11 InformationLink.to(I,In);
12 FunctionalInput.terminator(In,T);
13} \ 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 @@
1/bin/ 1/bin/
2/xtend-gen/
3/src-gen/
4/output/*
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
5fof ( enumScope_FunctionType_Leaf , axiom , ! [ A ] : ( A = eo3 <=> e_Leaf_FunctionType ( A ) ) ) . 5fof ( enumScope_FunctionType_Leaf , axiom , ! [ A ] : ( A = eo3 <=> e_Leaf_FunctionType ( A ) ) ) .
6fof ( 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 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) . 6fof ( 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 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) .
7fof ( 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 ) ) ) . 7fof ( 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 ) ) ) .
8fof ( 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 ) ) ) ) ) ) ) ) ) ) ) ) . 8fof ( 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 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) .
9fof ( typeScope_min_t_FunctionalInterface , axiom , ! [ A ] : ( ( A = o2 | A = o3 ) => ( t_FunctionalInterface ( A ) & object ( A ) ) ) ) . 9fof ( typeScope_min_t_FunctionalInterface , axiom , ! [ A ] : ( ( A = o2 | A = o3 ) => ( t_FunctionalInterface ( A ) & object ( A ) ) ) ) .
10fof ( typeScope_min_t_Function , axiom , ! [ A ] : ( A = o4 => ( t_Function ( A ) & object ( A ) ) ) ) . 10fof ( typeScope_min_t_Function , axiom , ! [ A ] : ( A = o4 => ( t_Function ( A ) & object ( A ) ) ) ) .
11fof ( typeScope_min_t_FunctionalOutput , axiom , ! [ A ] : ( ( A = o5 | ( A = o6 | A = o7 ) ) => ( t_FunctionalOutput ( A ) & object ( A ) ) ) ) . 11fof ( typeScope_min_t_FunctionalOutput , axiom , ! [ A ] : ( ( A = o5 | ( A = o6 | A = o7 ) ) => ( t_FunctionalOutput ( A ) & object ( A ) ) ) ) .
12fof ( typeScope_max_t_Function , axiom , ! [ A ] : ( ( t_Function ( A ) & object ( A ) ) => ( A = o4 | A = o8 ) ) ) . 12fof ( typeScope_max_t_Function , axiom , ! [ A ] : ( ( t_Function ( A ) & object ( A ) ) => ( A = o4 | ( A = o8 | ( A = o9 | ( A = o10 | A = o11 ) ) ) ) ) ) .
13fof ( typeScope_max_t_FunctionalOutput , axiom , ! [ A ] : ( ( t_FunctionalOutput ( A ) & object ( A ) ) => ( A = o5 | ( A = o6 | ( A = o7 | A = o8 ) ) ) ) ) . 13fof ( typeScope_max_t_FunctionalOutput , axiom , ! [ A ] : ( ( t_FunctionalOutput ( A ) & object ( A ) ) => ( A = o5 | ( A = o6 | ( A = o7 | A = o8 ) ) ) ) ) .
14fof ( 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 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) . 14fof ( 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 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) .
15fof ( compliance_interface_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_interface_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_FunctionalInterface ( V_1 ) ) ) ) . 15fof ( compliance_interface_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_interface_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_FunctionalInterface ( V_1 ) ) ) ) .
16fof ( compliance_model_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_model_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_FunctionalArchitectureModel ( V_1 ) ) ) ) . 16fof ( compliance_model_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_model_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_FunctionalArchitectureModel ( V_1 ) ) ) ) .
17fof ( compliance_parent_FunctionalElement , axiom , ! [ V_0 , V_1 ] : ( r_parent_FunctionalElement ( V_0 , V_1 ) => ( t_FunctionalElement ( V_0 ) & t_Function ( V_1 ) ) ) ) . 17fof ( 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
28fof ( compliance_interface_FunctionalData , axiom , ! [ V_0 , V_1 ] : ( r_interface_FunctionalData ( V_0 , V_1 ) => ( t_FunctionalData ( V_0 ) & t_FunctionalInterface ( V_1 ) ) ) ) . 28fof ( compliance_interface_FunctionalData , axiom , ! [ V_0 , V_1 ] : ( r_interface_FunctionalData ( V_0 , V_1 ) => ( t_FunctionalData ( V_0 ) & t_FunctionalInterface ( V_1 ) ) ) ) .
29fof ( compliance_type_Function , axiom , ! [ V_0 , V_1 ] : ( r_type_Function ( V_0 , V_1 ) => ( t_Function ( V_0 ) & t_FunctionType ( V_1 ) ) ) ) . 29fof ( compliance_type_Function , axiom , ! [ V_0 , V_1 ] : ( r_type_Function ( V_0 , V_1 ) => ( t_Function ( V_0 ) & t_FunctionType ( V_1 ) ) ) ) .
30fof ( containment_topLevel_t_FunctionalArchitectureModel , axiom , ! [ A ] : ( t_FunctionalArchitectureModel ( A ) <=> A = o1 ) ) . 30fof ( containment_topLevel_t_FunctionalArchitectureModel , axiom , ! [ A ] : ( t_FunctionalArchitectureModel ( A ) <=> A = o1 ) ) .
31fof ( containment_r_interface_FunctionalElement , axiom , ! [ A ] : ( t_FunctionalInterface ( A ) => ? [ B ] : ( t_FunctionalElement ( B ) & r_interface_FunctionalElement ( B , A ) ) ) ) . 31
32fof ( containment_r_rootElements_FunctionalArchitectureModel , axiom , ! [ A ] : ( t_FunctionalElement ( A ) => ? [ B ] : ( t_FunctionalArchitectureModel ( B ) & r_rootElements_FunctionalArchitectureModel ( B , A ) ) ) ) . 32
33fof ( containment_r_subElements_Function , axiom , ! [ A ] : ( t_FunctionalElement ( A ) => ? [ B ] : ( t_Function ( B ) & r_subElements_Function ( B , A ) ) ) ) . 33fof ( containment_r_interface_FunctionalElement , axiom , ! [ A ] : ( t_FunctionalInterface ( A ) => ? [ B ] : r_interface_FunctionalElement ( B , A ) ) ) .
34fof ( containment_r_data_FunctionalInterface , axiom , ! [ A ] : ( t_FunctionalData ( A ) => ? [ B ] : ( t_FunctionalInterface ( B ) & r_data_FunctionalInterface ( B , A ) ) ) ) . 34fof ( containment_r_rootElements_FunctionalArchitectureModel , axiom , ! [ A ] : ( t_FunctionalElement ( A ) => ? [ B ] : r_rootElements_FunctionalArchitectureModel ( B , A ) ) ) .
35fof ( containment_r_outgoingLinks_FunctionalOutput , axiom , ! [ A ] : ( t_InformationLink ( A ) => ? [ B ] : ( t_FunctionalOutput ( B ) & r_outgoingLinks_FunctionalOutput ( B , A ) ) ) ) . 35fof ( containment_r_subElements_Function , axiom , ! [ A ] : ( t_FunctionalElement ( A ) => ? [ B ] : r_subElements_Function ( B , A ) ) ) .
36fof ( containment_r_terminator_FunctionalData , axiom , ! [ A ] : ( t_FAMTerminator ( A ) => ? [ B ] : ( t_FunctionalData ( B ) & r_terminator_FunctionalData ( B , A ) ) ) ) . 36fof ( containment_r_data_FunctionalInterface , axiom , ! [ A ] : ( t_FunctionalData ( A ) => ? [ B ] : r_data_FunctionalInterface ( B , A ) ) ) .
37fof ( containment_r_outgoingLinks_FunctionalOutput , axiom , ! [ A ] : ( t_InformationLink ( A ) => ? [ B ] : r_outgoingLinks_FunctionalOutput ( B , A ) ) ) .
38fof ( containment_r_terminator_FunctionalData , axiom , ! [ A ] : ( t_FAMTerminator ( A ) => ? [ B ] : r_terminator_FunctionalData ( B , A ) ) ) .
39
40
37fof ( 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 ) ) ) . 41fof ( 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 ) ) ) .
38fof ( 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 ) ) ) ) . 42fof ( 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 ) ) ) ) .
39fof ( 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 ) ) ) . 43fof ( 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 @@
1% This is an initial Test Comment
2fof ( typeDef_oldRPS , axiom , ! [ A ] : ( t_oldRPS ( A ) <=> ( e_Rock_oldRPS ( A ) | ( e_Paper_oldRPS ( A ) | e_Scissor_oldRPS ( A ) ) ) ) ) .
3fof ( hierarchyHandler , axiom , ! [ A ] : ( object ( A ) <=> t_oldRPS ( A ) ) ) .
4fof ( typeScope , axiom , ! [ A ] : ( object ( A ) <=> ( A = o1 | ( A = o2 | ( A = o3 | A = o4 ) ) ) ) ) .
5fof ( typeUniqueness , axiom , o1 != o2 & ( o1 != o3 & ( o2 != o3 & ( o1 != o4 & ( o2 != o4 & o3 != o4 ) ) ) ) ) .
6fof ( compliance_beats2 , axiom , ! [ Var_0 , Var_1 ] : ( rel_beats2 ( Var_0 , Var_1 ) => ( t_oldRPS ( Var_0 ) & t_oldRPS ( Var_1 ) ) ) ) .
7fof ( 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
4import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration 4import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration
5import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory 5import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory
6import functionalarchitecture.Function 6import functionalarchitecture.Function
7import functionalarchitecture.FunctionalInterface
8import functionalarchitecture.FunctionalOutput
7import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic 9import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic
8import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration 10import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration
9import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace
10import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor 11import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor
11import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel
12import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner 12import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner
13import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type 13import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type
14import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult 14import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult
@@ -30,8 +30,7 @@ import org.eclipse.emf.ecore.EReference
30import org.eclipse.emf.ecore.resource.Resource 30import org.eclipse.emf.ecore.resource.Resource
31import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl 31import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl
32import org.eclipse.viatra.query.runtime.api.IQueryGroup 32import org.eclipse.viatra.query.runtime.api.IQueryGroup
33import org.eclipse.emf.ecore.EClassifier 33import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel
34import functionalarchitecture.FunctionalOutput
35 34
36class GeneralTest { 35class GeneralTest {
37 def static String createAndSolveProblem(EcoreMetamodelDescriptor metamodel, List<EObject> partialModel, 36 def static String createAndSolveProblem(EcoreMetamodelDescriptor metamodel, List<EObject> partialModel,
@@ -67,7 +66,7 @@ class GeneralTest {
67 list2MapMin.get(Function.simpleName) 66 list2MapMin.get(Function.simpleName)
68 ), 1) 67 ), 1)
69 typeMapMin.put(ecore2Logic.TypeofEClass(modelGenerationProblem.trace, 68 typeMapMin.put(ecore2Logic.TypeofEClass(modelGenerationProblem.trace,
70 list2MapMin.get(functionalarchitecture.FunctionalInterface.simpleName) 69 list2MapMin.get(FunctionalInterface.simpleName)
71 ), 2) 70 ), 2)
72 typeMapMin.put(ecore2Logic.TypeofEClass(modelGenerationProblem.trace, 71 typeMapMin.put(ecore2Logic.TypeofEClass(modelGenerationProblem.trace,
73 list2MapMin.get(FunctionalOutput.simpleName) 72 list2MapMin.get(FunctionalOutput.simpleName)
@@ -80,7 +79,7 @@ class GeneralTest {
80 ), 5) 79 ), 5)
81 typeMapMax.put(ecore2Logic.TypeofEClass( 80 typeMapMax.put(ecore2Logic.TypeofEClass(
82 modelGenerationProblem.trace, 81 modelGenerationProblem.trace,
83 list2MapMax.get(functionalarchitecture.FunctionalInterface.simpleName) 82 list2MapMax.get(FunctionalInterface.simpleName)
84 ), 2) 83 ), 2)
85 typeMapMax.put(ecore2Logic.TypeofEClass( 84 typeMapMax.put(ecore2Logic.TypeofEClass(
86 modelGenerationProblem.trace, 85 modelGenerationProblem.trace,
@@ -92,7 +91,7 @@ class GeneralTest {
92 // add configuration things, in config file first 91 // add configuration things, in config file first
93 it.documentationLevel = DocumentationLevel::FULL 92 it.documentationLevel = DocumentationLevel::FULL
94 it.typeScopes.minNewElements = 6 93 it.typeScopes.minNewElements = 6
95 it.typeScopes.maxNewElements = 8 94 it.typeScopes.maxNewElements = 40
96 it.typeScopes.minNewElementsByType = typeMapMin 95 it.typeScopes.minNewElementsByType = typeMapMin
97 it.typeScopes.maxNewElementsByType = typeMapMax 96 it.typeScopes.maxNewElementsByType = typeMapMax
98 ] 97 ]
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 @@
1package ca.mcgill.ecse.dslreasoner.vampire.test
2
3import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolver
4import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration
5import functionalarchitecture.FunctionalarchitecturePackage
6import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic
7import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration
8import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor
9import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner
10import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult
11import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore
12import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic
13import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic
14import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace
15import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace
16import java.util.List
17import org.eclipse.emf.ecore.EAttribute
18import org.eclipse.emf.ecore.EClass
19import org.eclipse.emf.ecore.EEnum
20import org.eclipse.emf.ecore.EEnumLiteral
21import org.eclipse.emf.ecore.EObject
22import org.eclipse.emf.ecore.EReference
23import org.eclipse.emf.ecore.resource.Resource
24import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl
25
26class DslTest {
27 def static void main(String[] args) {
28 val inputs = new FileSystemWorkspace('''initialModels/''', "")
29 val workspace = new FileSystemWorkspace('''outputDslModels/''', "")
30 workspace.initAndClear
31
32 println("Input and output workspaces are created")
33
34 val metamodel = loadMetamodel()
35 val partialModel = loadPartialModel(inputs)
36// val queries = loadQueries(metamodel)
37
38 println("DSL loaded")
39
40 val Ecore2Logic ecore2Logic = new Ecore2Logic
41 val Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic)
42 val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic)
43 val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic
44
45 val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel,new Ecore2LogicConfiguration())
46// val modelExtensionProblem = instanceModel2Logic.transform(modelGenerationProblem,partialModel)
47// val validModelExtensionProblem = viatra2Logic.transformQueries(queries,modelGenerationProblem,new Viatra2LogicConfiguration)
48
49 val logicProblem = modelGenerationProblem.output
50// val logicProblem = modelExtensionProblem.output
51// val logicProblem = validModelExtensionProblem.output
52
53
54 println("Problem created")
55
56 var LogicResult solution
57 var LogicReasoner reasoner
58 //*
59 reasoner = new VampireSolver
60 val vampireConfig = new VampireSolverConfiguration => [
61 //add configuration things, in config file first
62 it.writeToFile = false
63 ]
64
65 solution = reasoner.solve(logicProblem, vampireConfig, workspace)
66
67 println("Problem solved")
68
69
70 }
71
72 def private static loadMetamodel() {
73 //FAM
74 val pckg = FunctionalarchitecturePackage.eINSTANCE
75 val List<EClass> classes = pckg.EClassifiers.filter(EClass).toList
76 val List<EEnum> enums = pckg.EClassifiers.filter(EEnum).toList
77 val List<EEnumLiteral> literals = enums.map[getELiterals].flatten.toList
78 val List<EReference> references = classes.map[getEReferences].flatten.toList
79 val List<EAttribute> attributes = classes.map[getEAttributes].flatten.toList
80 return new EcoreMetamodelDescriptor(classes,#{},false,enums,literals,references,attributes)
81 }
82
83 def private static loadPartialModel(ReasonerWorkspace inputs) {
84 Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl());
85 inputs.readModel(EObject,"FunctionalArchitectureModel.xmi").eResource.allContents.toList
86// inputs.readModel(EObject,"FAM.xmi").eResource.allContents.toList
87 }
88
89// def private static loadQueries(EcoreMetamodelDescriptor metamodel) {
90// val i = hu.bme.mit.inf.dslreasoner.domains.transima.fam.patterns.Pattern.instance
91// val patterns = i.specifications.toList
92// val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet
93// val derivedFeatures = new LinkedHashMap
94// derivedFeatures.put(i.type,metamodel.attributes.filter[it.name == "type"].head)
95// derivedFeatures.put(i.model,metamodel.references.filter[it.name == "model"].head)
96// val res = new ViatraQuerySetDescriptor(
97// patterns,
98// wfPatterns,
99// derivedFeatures
100// )
101// return res
102// }
103}
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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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 {
108 final Procedure1<VampireSolverConfiguration> _function_2 = (VampireSolverConfiguration it) -> { 108 final Procedure1<VampireSolverConfiguration> _function_2 = (VampireSolverConfiguration it) -> {
109 it.documentationLevel = DocumentationLevel.FULL; 109 it.documentationLevel = DocumentationLevel.FULL;
110 it.typeScopes.minNewElements = 6; 110 it.typeScopes.minNewElements = 6;
111 it.typeScopes.maxNewElements = 8; 111 it.typeScopes.maxNewElements = 40;
112 it.typeScopes.minNewElementsByType = typeMapMin; 112 it.typeScopes.minNewElementsByType = typeMapMin;
113 it.typeScopes.maxNewElementsByType = typeMapMax; 113 it.typeScopes.maxNewElementsByType = typeMapMax;
114 }; 114 };
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 @@
1/.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
--- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.DslTest.xtendbin
+++ /dev/null
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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
--- 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
Binary files 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 @@
1package ca.mcgill.ecse.dslreasoner.vampire.test;
2
3import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolver;
4import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration;
5import com.google.common.collect.Iterables;
6import functionalarchitecture.FunctionalarchitecturePackage;
7import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic;
8import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration;
9import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace;
10import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor;
11import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner;
12import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput;
13import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem;
14import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult;
15import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore;
16import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic;
17import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic;
18import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace;
19import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace;
20import java.util.Collections;
21import java.util.List;
22import java.util.Map;
23import org.eclipse.emf.common.util.EList;
24import org.eclipse.emf.ecore.EAttribute;
25import org.eclipse.emf.ecore.EClass;
26import org.eclipse.emf.ecore.EEnum;
27import org.eclipse.emf.ecore.EEnumLiteral;
28import org.eclipse.emf.ecore.EObject;
29import org.eclipse.emf.ecore.EReference;
30import org.eclipse.emf.ecore.resource.Resource;
31import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
32import org.eclipse.xtend2.lib.StringConcatenation;
33import org.eclipse.xtext.xbase.lib.CollectionLiterals;
34import org.eclipse.xtext.xbase.lib.Exceptions;
35import org.eclipse.xtext.xbase.lib.Functions.Function1;
36import org.eclipse.xtext.xbase.lib.InputOutput;
37import org.eclipse.xtext.xbase.lib.IterableExtensions;
38import org.eclipse.xtext.xbase.lib.IteratorExtensions;
39import org.eclipse.xtext.xbase.lib.ListExtensions;
40import org.eclipse.xtext.xbase.lib.ObjectExtensions;
41import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
42
43@SuppressWarnings("all")
44public class DslTest {
45 public static void main(final String[] args) {
46 try {
47 StringConcatenation _builder = new StringConcatenation();
48 _builder.append("initialModels/");
49 final FileSystemWorkspace inputs = new FileSystemWorkspace(_builder.toString(), "");
50 StringConcatenation _builder_1 = new StringConcatenation();
51 _builder_1.append("outputDslModels/");
52 final FileSystemWorkspace workspace = new FileSystemWorkspace(_builder_1.toString(), "");
53 workspace.initAndClear();
54 InputOutput.<String>println("Input and output workspaces are created");
55 final EcoreMetamodelDescriptor metamodel = DslTest.loadMetamodel();
56 final List<EObject> partialModel = DslTest.loadPartialModel(inputs);
57 InputOutput.<String>println("DSL loaded");
58 final Ecore2Logic ecore2Logic = new Ecore2Logic();
59 final Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic);
60 final Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic);
61 final InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic();
62 Ecore2LogicConfiguration _ecore2LogicConfiguration = new Ecore2LogicConfiguration();
63 final TracedOutput<LogicProblem, Ecore2Logic_Trace> modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, _ecore2LogicConfiguration);
64 final LogicProblem logicProblem = modelGenerationProblem.getOutput();
65 InputOutput.<String>println("Problem created");
66 LogicResult solution = null;
67 LogicReasoner reasoner = null;
68 VampireSolver _vampireSolver = new VampireSolver();
69 reasoner = _vampireSolver;
70 VampireSolverConfiguration _vampireSolverConfiguration = new VampireSolverConfiguration();
71 final Procedure1<VampireSolverConfiguration> _function = (VampireSolverConfiguration it) -> {
72 it.writeToFile = false;
73 };
74 final VampireSolverConfiguration vampireConfig = ObjectExtensions.<VampireSolverConfiguration>operator_doubleArrow(_vampireSolverConfiguration, _function);
75 solution = reasoner.solve(logicProblem, vampireConfig, workspace);
76 InputOutput.<String>println("Problem solved");
77 } catch (Throwable _e) {
78 throw Exceptions.sneakyThrow(_e);
79 }
80 }
81
82 private static EcoreMetamodelDescriptor loadMetamodel() {
83 final FunctionalarchitecturePackage pckg = FunctionalarchitecturePackage.eINSTANCE;
84 final List<EClass> classes = IterableExtensions.<EClass>toList(Iterables.<EClass>filter(pckg.getEClassifiers(), EClass.class));
85 final List<EEnum> enums = IterableExtensions.<EEnum>toList(Iterables.<EEnum>filter(pckg.getEClassifiers(), EEnum.class));
86 final Function1<EEnum, EList<EEnumLiteral>> _function = (EEnum it) -> {
87 return it.getELiterals();
88 };
89 final List<EEnumLiteral> literals = IterableExtensions.<EEnumLiteral>toList(Iterables.<EEnumLiteral>concat(ListExtensions.<EEnum, EList<EEnumLiteral>>map(enums, _function)));
90 final Function1<EClass, EList<EReference>> _function_1 = (EClass it) -> {
91 return it.getEReferences();
92 };
93 final List<EReference> references = IterableExtensions.<EReference>toList(Iterables.<EReference>concat(ListExtensions.<EClass, EList<EReference>>map(classes, _function_1)));
94 final Function1<EClass, EList<EAttribute>> _function_2 = (EClass it) -> {
95 return it.getEAttributes();
96 };
97 final List<EAttribute> attributes = IterableExtensions.<EAttribute>toList(Iterables.<EAttribute>concat(ListExtensions.<EClass, EList<EAttribute>>map(classes, _function_2)));
98 return new EcoreMetamodelDescriptor(classes, Collections.<EClass>unmodifiableSet(CollectionLiterals.<EClass>newHashSet()), false, enums, literals, references, attributes);
99 }
100
101 private static List<EObject> loadPartialModel(final ReasonerWorkspace inputs) {
102 List<EObject> _xblockexpression = null;
103 {
104 Map<String, Object> _extensionToFactoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap();
105 XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl();
106 _extensionToFactoryMap.put("*", _xMIResourceFactoryImpl);
107 _xblockexpression = IteratorExtensions.<EObject>toList(inputs.<EObject>readModel(EObject.class, "FunctionalArchitectureModel.xmi").eResource().getAllContents());
108 }
109 return _xblockexpression;
110 }
111}
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 @@
1/.SimpleRun.java._trace
2/.MedicalSystem.java._trace
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/.classpath b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/.classpath
index 1c96fe2f..2b46fc9b 100644
--- a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/.classpath
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/.classpath
@@ -4,5 +4,6 @@
4 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> 4 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5 <classpathentry kind="src" path="src"/> 5 <classpathentry kind="src" path="src"/>
6 <classpathentry kind="src" path="xtend-gen"/> 6 <classpathentry kind="src" path="xtend-gen"/>
7 <classpathentry kind="src" path="src-gen/"/>
7 <classpathentry kind="output" path="bin"/> 8 <classpathentry kind="output" path="bin"/>
8</classpath> 9</classpath>
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 @@
1Manifest-Version: 1.0 1Manifest-Version: 1.0
2Bundle-ManifestVersion: 2 2Bundle-ManifestVersion: 2
3Bundle-Name: FAMTest 3Bundle-Name: FAMTest
4Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.application.FAMTest;singleton:=true 4Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.application.FAMTest;singleton:=true
5Bundle-Version: 1.0.0.qualifier 5Bundle-Version: 1.0.0.qualifier
6Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.application.FAMTest 6Require-Bundle: com.google.guava,
7Bundle-RequiredExecutionEnvironment: JavaSE-1.8 7 org.eclipse.xtext.xbase.lib,
8Require-Bundle: com.google.guava, 8 org.eclipse.xtend.lib,
9 org.eclipse.xtext.xbase.lib, 9 org.eclipse.xtend.lib.macro,
10 org.eclipse.xtend.lib, 10 hu.bme.mit.inf.dslreasoner.application;bundle-version="1.0.0",
11 org.eclipse.xtend.lib.macro, 11 org.junit;bundle-version="4.12.0",
12 hu.bme.mit.inf.dslreasoner.application;bundle-version="1.0.0", 12 org.eclipse.collections;bundle-version="7.1.1"
13 org.junit;bundle-version="4.12.0", 13Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.application.FAMTest
14 org.eclipse.collections;bundle-version="7.1.1" 14Bundle-RequiredExecutionEnvironment: JavaSE-1.8
15
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 @@
1source.. = src/
2output.. = bin/
3bin.includes = META-INF/,\ 1bin.includes = META-INF/,\
4 . 2 .
3source.. = src/,\
4 src-gen/
5output.. = bin/