aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers
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>2020-06-07 19:33:22 -0400
commit513a5afe3a8663ad30112f7e3c0e66137938e635 (patch)
treee9ae81f529712a372bd203cb0ef2a19b9b224c95 /Solvers
parentImplement Containment mapping (partially) and revisit enum mapping (diff)
downloadVIATRA-Generator-513a5afe3a8663ad30112f7e3c0e66137938e635.tar.gz
VIATRA-Generator-513a5afe3a8663ad30112f7e3c0e66137938e635.tar.zst
VIATRA-Generator-513a5afe3a8663ad30112f7e3c0e66137938e635.zip
Add gitignore, commit everything
Diffstat (limited to 'Solvers')
-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/VLSOr.java535
-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/VLSUniversalQuantifier.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
63 files changed, 18 insertions, 7317 deletions
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/VLSOr.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSOr.java
deleted file mode 100644
index 0d8e0648..00000000
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSOr.java
+++ /dev/null
@@ -1,535 +0,0 @@
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 * //VLSFormula
44 * pattern VLSOr(term: VLSOr){
45 * VLSOr(term);
46 * }
47 * </pre></code>
48 *
49 * @see Matcher
50 * @see Match
51 *
52 */
53@SuppressWarnings("all")
54public final class VLSOr extends BaseGeneratedEMFQuerySpecification<VLSOr.Matcher> {
55 /**
56 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr pattern,
57 * to be used in conjunction with {@link Matcher}.
58 *
59 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
60 * Each instance is a (possibly partial) substitution of pattern parameters,
61 * usable to represent a match of the pattern in the result of a query,
62 * or to specify the bound (fixed) input parameters when issuing a query.
63 *
64 * @see Matcher
65 *
66 */
67 public static abstract class Match extends BasePatternMatch {
68 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr fTerm;
69
70 private static List<String> parameterNames = makeImmutableList("term");
71
72 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
73 this.fTerm = pTerm;
74 }
75
76 @Override
77 public Object get(final String parameterName) {
78 if ("term".equals(parameterName)) return this.fTerm;
79 return null;
80 }
81
82 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr getTerm() {
83 return this.fTerm;
84 }
85
86 @Override
87 public boolean set(final String parameterName, final Object newValue) {
88 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
89 if ("term".equals(parameterName) ) {
90 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) newValue;
91 return true;
92 }
93 return false;
94 }
95
96 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
97 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
98 this.fTerm = pTerm;
99 }
100
101 @Override
102 public String patternName() {
103 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr";
104 }
105
106 @Override
107 public List<String> parameterNames() {
108 return VLSOr.Match.parameterNames;
109 }
110
111 @Override
112 public Object[] toArray() {
113 return new Object[]{fTerm};
114 }
115
116 @Override
117 public VLSOr.Match toImmutable() {
118 return isMutable() ? newMatch(fTerm) : this;
119 }
120
121 @Override
122 public String prettyPrint() {
123 StringBuilder result = new StringBuilder();
124 result.append("\"term\"=" + prettyPrintValue(fTerm));
125 return result.toString();
126 }
127
128 @Override
129 public int hashCode() {
130 return Objects.hash(fTerm);
131 }
132
133 @Override
134 public boolean equals(final Object obj) {
135 if (this == obj)
136 return true;
137 if (obj == null) {
138 return false;
139 }
140 if ((obj instanceof VLSOr.Match)) {
141 VLSOr.Match other = (VLSOr.Match) obj;
142 return Objects.equals(fTerm, other.fTerm);
143 } else {
144 // this should be infrequent
145 if (!(obj instanceof IPatternMatch)) {
146 return false;
147 }
148 IPatternMatch otherSig = (IPatternMatch) obj;
149 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
150 }
151 }
152
153 @Override
154 public VLSOr specification() {
155 return VLSOr.instance();
156 }
157
158 /**
159 * Returns an empty, mutable match.
160 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
161 *
162 * @return the empty match.
163 *
164 */
165 public static VLSOr.Match newEmptyMatch() {
166 return new Mutable(null);
167 }
168
169 /**
170 * Returns a mutable (partial) match.
171 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
172 *
173 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
174 * @return the new, mutable (partial) match object.
175 *
176 */
177 public static VLSOr.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
178 return new Mutable(pTerm);
179 }
180
181 /**
182 * Returns a new (partial) match.
183 * 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.
185 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
186 * @return the (partial) match object.
187 *
188 */
189 public static VLSOr.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
190 return new Immutable(pTerm);
191 }
192
193 private static final class Mutable extends VLSOr.Match {
194 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
195 super(pTerm);
196 }
197
198 @Override
199 public boolean isMutable() {
200 return true;
201 }
202 }
203
204 private static final class Immutable extends VLSOr.Match {
205 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
206 super(pTerm);
207 }
208
209 @Override
210 public boolean isMutable() {
211 return false;
212 }
213 }
214 }
215
216 /**
217 * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr pattern,
218 * providing pattern-specific query methods.
219 *
220 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
221 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
222 *
223 * <p>Matches of the pattern will be represented as {@link Match}.
224 *
225 * <p>Original source:
226 * <code><pre>
227 * //VLSFormula
228 * pattern VLSOr(term: VLSOr){
229 * VLSOr(term);
230 * }
231 * </pre></code>
232 *
233 * @see Match
234 * @see VLSOr
235 *
236 */
237 public static class Matcher extends BaseMatcher<VLSOr.Match> {
238 /**
239 * 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.
241 *
242 * @param engine the existing VIATRA Query engine in which this matcher will be created.
243 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
244 *
245 */
246 public static VLSOr.Matcher on(final ViatraQueryEngine engine) {
247 // check if matcher already exists
248 Matcher matcher = engine.getExistingMatcher(querySpecification());
249 if (matcher == null) {
250 matcher = (Matcher)engine.getMatcher(querySpecification());
251 }
252 return matcher;
253 }
254
255 /**
256 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
257 * @return an initialized matcher
258 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
259 *
260 */
261 public static VLSOr.Matcher create() {
262 return new Matcher();
263 }
264
265 private final static int POSITION_TERM = 0;
266
267 private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(VLSOr.Matcher.class);
268
269 /**
270 * Initializes the pattern matcher within an existing VIATRA Query engine.
271 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
272 *
273 * @param engine the existing VIATRA Query engine in which this matcher will be created.
274 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
275 *
276 */
277 private Matcher() {
278 super(querySpecification());
279 }
280
281 /**
282 * 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.
284 * @return matches represented as a Match object.
285 *
286 */
287 public Collection<VLSOr.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
288 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
289 }
290
291 /**
292 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
293 * </p>
294 * <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>.
296 * 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.
298 * @return a stream of matches represented as a Match object.
299 *
300 */
301 public Stream<VLSOr.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
302 return rawStreamAllMatches(new Object[]{pTerm});
303 }
304
305 /**
306 * 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.
308 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
309 * @return a match represented as a Match object, or null if no match is found.
310 *
311 */
312 public Optional<VLSOr.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
313 return rawGetOneArbitraryMatch(new Object[]{pTerm});
314 }
315
316 /**
317 * 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).
319 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
320 * @return true if the input is a valid (partial) match of the pattern.
321 *
322 */
323 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
324 return rawHasMatch(new Object[]{pTerm});
325 }
326
327 /**
328 * 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.
330 * @return the number of pattern matches found.
331 *
332 */
333 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
334 return rawCountMatches(new Object[]{pTerm});
335 }
336
337 /**
338 * 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.
340 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
341 * @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
343 *
344 */
345 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm, final Consumer<? super VLSOr.Match> processor) {
346 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
347 }
348
349 /**
350 * Returns a new (partial) match.
351 * 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.
353 * @param pTerm the fixed value of pattern parameter term, or null if not bound.
354 * @return the (partial) match object.
355 *
356 */
357 public VLSOr.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr pTerm) {
358 return VLSOr.Match.newMatch(pTerm);
359 }
360
361 /**
362 * Retrieve the set of values that occur in matches for term.
363 * @return the Set of all values or empty set if there are no matches
364 *
365 */
366 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr> rawStreamAllValuesOfterm(final Object[] parameters) {
367 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr.class::cast);
368 }
369
370 /**
371 * Retrieve the set of values that occur in matches for term.
372 * @return the Set of all values or empty set if there are no matches
373 *
374 */
375 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr> getAllValuesOfterm() {
376 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
377 }
378
379 /**
380 * Retrieve the set of values that occur in matches for term.
381 * @return the Set of all values or empty set if there are no matches
382 *
383 */
384 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr> streamAllValuesOfterm() {
385 return rawStreamAllValuesOfterm(emptyArray());
386 }
387
388 @Override
389 protected VLSOr.Match tupleToMatch(final Tuple t) {
390 try {
391 return VLSOr.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) t.get(POSITION_TERM));
392 } catch(ClassCastException e) {
393 LOGGER.error("Element(s) in tuple not properly typed!",e);
394 return null;
395 }
396 }
397
398 @Override
399 protected VLSOr.Match arrayToMatch(final Object[] match) {
400 try {
401 return VLSOr.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) match[POSITION_TERM]);
402 } catch(ClassCastException e) {
403 LOGGER.error("Element(s) in array not properly typed!",e);
404 return null;
405 }
406 }
407
408 @Override
409 protected VLSOr.Match arrayToMatchMutable(final Object[] match) {
410 try {
411 return VLSOr.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) match[POSITION_TERM]);
412 } catch(ClassCastException e) {
413 LOGGER.error("Element(s) in array not properly typed!",e);
414 return null;
415 }
416 }
417
418 /**
419 * @return the singleton instance of the query specification of this pattern
420 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
421 *
422 */
423 public static IQuerySpecification<VLSOr.Matcher> querySpecification() {
424 return VLSOr.instance();
425 }
426 }
427
428 private VLSOr() {
429 super(GeneratedPQuery.INSTANCE);
430 }
431
432 /**
433 * @return the singleton instance of the query specification
434 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
435 *
436 */
437 public static VLSOr instance() {
438 try{
439 return LazyHolder.INSTANCE;
440 } catch (ExceptionInInitializerError err) {
441 throw processInitializerError(err);
442 }
443 }
444
445 @Override
446 protected VLSOr.Matcher instantiate(final ViatraQueryEngine engine) {
447 return VLSOr.Matcher.on(engine);
448 }
449
450 @Override
451 public VLSOr.Matcher instantiate() {
452 return VLSOr.Matcher.create();
453 }
454
455 @Override
456 public VLSOr.Match newEmptyMatch() {
457 return VLSOr.Match.newEmptyMatch();
458 }
459
460 @Override
461 public VLSOr.Match newMatch(final Object... parameters) {
462 return VLSOr.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr) parameters[0]);
463 }
464
465 /**
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
467 * <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()}.
469 *
470 * <p> This workaround is required e.g. to support recursion.
471 *
472 */
473 private static class LazyHolder {
474 private final static VLSOr INSTANCE = new VLSOr();
475
476 /**
477 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
478 * This initialization order is required to support indirect recursion.
479 *
480 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
481 *
482 */
483 private final static Object STATIC_INITIALIZER = ensureInitialized();
484
485 public static Object ensureInitialized() {
486 INSTANCE.ensureInitializedInternal();
487 return null;
488 }
489 }
490
491 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
492 private final static VLSOr.GeneratedPQuery INSTANCE = new GeneratedPQuery();
493
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);
495
496 private final List<PParameter> parameters = Arrays.asList(parameter_term);
497
498 private GeneratedPQuery() {
499 super(PVisibility.PUBLIC);
500 }
501
502 @Override
503 public String getFullyQualifiedName() {
504 return "ca.mcgill.ecse.dslreasoner.vampire.queries.VLSOr";
505 }
506
507 @Override
508 public List<String> getParameterNames() {
509 return Arrays.asList("term");
510 }
511
512 @Override
513 public List<PParameter> getParameters() {
514 return parameters;
515 }
516
517 @Override
518 public Set<PBody> doGetContainedBodies() {
519 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
520 Set<PBody> bodies = new LinkedHashSet<>();
521 {
522 PBody body = new PBody(this);
523 PVariable var_term = body.getOrCreateVariableByName("term");
524 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSOr")));
525 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
526 new ExportedParameter(body, var_term, parameter_term)
527 ));
528 // VLSOr(term)
529 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSOr")));
530 bodies.add(body);
531 }
532 return bodies;
533 }
534 }
535}
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/VLSUniversalQuantifier.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUniversalQuantifier.java
deleted file mode 100644
index 0dab9771..00000000
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.queries/src-gen/ca/mcgill/ecse/dslreasoner/vampire/queries/VLSUniversalQuantifier.java
+++ /dev/null
@@ -1,533 +0,0 @@
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 VLSUniversalQuantifier(term: VLSUniversalQuantifier){
44 * VLSUniversalQuantifier(term);
45 * }
46 * </pre></code>
47 *
48 * @see Matcher
49 * @see Match
50 *
51 */
52@SuppressWarnings("all")
53public final class VLSUniversalQuantifier extends BaseGeneratedEMFQuerySpecification<VLSUniversalQuantifier.Matcher> {
54 /**
55 * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.vampire.queries.VLSUniversalQuantifier 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.VLSUniversalQuantifier fTerm;
68
69 private static List<String> parameterNames = makeImmutableList("term");
70
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier 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.VLSUniversalQuantifier 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.VLSUniversalQuantifier) newValue;
90 return true;
91 }
92 return false;
93 }
94
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier 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.VLSUniversalQuantifier";
103 }
104
105 @Override
106 public List<String> parameterNames() {
107 return VLSUniversalQuantifier.Match.parameterNames;
108 }
109
110 @Override
111 public Object[] toArray() {
112 return new Object[]{fTerm};
113 }
114
115 @Override
116 public VLSUniversalQuantifier.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 VLSUniversalQuantifier.Match)) {
140 VLSUniversalQuantifier.Match other = (VLSUniversalQuantifier.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 VLSUniversalQuantifier specification() {
154 return VLSUniversalQuantifier.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 VLSUniversalQuantifier.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 VLSUniversalQuantifier.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier 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 VLSUniversalQuantifier.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) {
189 return new Immutable(pTerm);
190 }
191
192 private static final class Mutable extends VLSUniversalQuantifier.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier 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 VLSUniversalQuantifier.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier 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.VLSUniversalQuantifier 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 VLSUniversalQuantifier(term: VLSUniversalQuantifier){
227 * VLSUniversalQuantifier(term);
228 * }
229 * </pre></code>
230 *
231 * @see Match
232 * @see VLSUniversalQuantifier
233 *
234 */
235 public static class Matcher extends BaseMatcher<VLSUniversalQuantifier.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 VLSUniversalQuantifier.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 VLSUniversalQuantifier.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(VLSUniversalQuantifier.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<VLSUniversalQuantifier.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier 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<VLSUniversalQuantifier.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier 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<VLSUniversalQuantifier.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier 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.VLSUniversalQuantifier 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.VLSUniversalQuantifier 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.VLSUniversalQuantifier pTerm, final Consumer<? super VLSUniversalQuantifier.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 VLSUniversalQuantifier.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier pTerm) {
356 return VLSUniversalQuantifier.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.VLSUniversalQuantifier> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier.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.VLSUniversalQuantifier> 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.VLSUniversalQuantifier> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray());
384 }
385
386 @Override
387 protected VLSUniversalQuantifier.Match tupleToMatch(final Tuple t) {
388 try {
389 return VLSUniversalQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) 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 VLSUniversalQuantifier.Match arrayToMatch(final Object[] match) {
398 try {
399 return VLSUniversalQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) 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 VLSUniversalQuantifier.Match arrayToMatchMutable(final Object[] match) {
408 try {
409 return VLSUniversalQuantifier.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) 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<VLSUniversalQuantifier.Matcher> querySpecification() {
422 return VLSUniversalQuantifier.instance();
423 }
424 }
425
426 private VLSUniversalQuantifier() {
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 VLSUniversalQuantifier instance() {
436 try{
437 return LazyHolder.INSTANCE;
438 } catch (ExceptionInInitializerError err) {
439 throw processInitializerError(err);
440 }
441 }
442
443 @Override
444 protected VLSUniversalQuantifier.Matcher instantiate(final ViatraQueryEngine engine) {
445 return VLSUniversalQuantifier.Matcher.on(engine);
446 }
447
448 @Override
449 public VLSUniversalQuantifier.Matcher instantiate() {
450 return VLSUniversalQuantifier.Matcher.create();
451 }
452
453 @Override
454 public VLSUniversalQuantifier.Match newEmptyMatch() {
455 return VLSUniversalQuantifier.Match.newEmptyMatch();
456 }
457
458 @Override
459 public VLSUniversalQuantifier.Match newMatch(final Object... parameters) {
460 return VLSUniversalQuantifier.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier) parameters[0]);
461 }
462
463 /**
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
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.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()}.
467 *
468 * <p> This workaround is required e.g. to support recursion.
469 *
470 */
471 private static class LazyHolder {
472 private final static VLSUniversalQuantifier INSTANCE = new VLSUniversalQuantifier();
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 VLSUniversalQuantifier.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491
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);
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.VLSUniversalQuantifier";
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", "VLSUniversalQuantifier")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term)
525 ));
526 // VLSUniversalQuantifier(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSUniversalQuantifier")));
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}