aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner
diff options
context:
space:
mode:
Diffstat (limited to 'Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner')
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/.project6
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/META-INF/MANIFEST.MF9
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/build.properties1
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/queries/ca/mcgill/ecse/dslreasoner/vampire/reasoner/queries/vampireQueries.vql4
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/queries/VLSFunctionFof.java65
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapperTrace.xtend5
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.xtend13
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_Support.xtend29
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.xtend48
-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.xtendbinbin17812 -> 17814 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapperTrace.xtendbinbin3708 -> 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_RelationMapper.xtendbinbin8207 -> 8212 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ScopeMapper.xtendbinbin6096 -> 6157 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_Support.xtendbinbin10926 -> 11900 bytes
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper.xtendbinbin8576 -> 9388 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/Logic2VampireLanguageMapperTrace.java5
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.java24
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_Support.java47
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.java36
26 files changed, 225 insertions, 67 deletions
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/.project b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/.project
index 2221f39c..e73fac6d 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/.project
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/.project
@@ -6,6 +6,11 @@
6 </projects> 6 </projects>
7 <buildSpec> 7 <buildSpec>
8 <buildCommand> 8 <buildCommand>
9 <name>org.eclipse.viatra.query.tooling.ui.projectbuilder</name>
10 <arguments>
11 </arguments>
12 </buildCommand>
13 <buildCommand>
9 <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> 14 <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
10 <arguments> 15 <arguments>
11 </arguments> 16 </arguments>
@@ -30,5 +35,6 @@
30 <nature>org.eclipse.pde.PluginNature</nature> 35 <nature>org.eclipse.pde.PluginNature</nature>
31 <nature>org.eclipse.jdt.core.javanature</nature> 36 <nature>org.eclipse.jdt.core.javanature</nature>
32 <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> 37 <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
38 <nature>org.eclipse.viatra.query.projectnature</nature>
33 </natures> 39 </natures>
34</projectDescription> 40</projectDescription>
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/META-INF/MANIFEST.MF b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/META-INF/MANIFEST.MF
index 63d39592..6ed29084 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/META-INF/MANIFEST.MF
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/META-INF/MANIFEST.MF
@@ -6,12 +6,17 @@ Bundle-Version: 1.0.0.qualifier
6Export-Package: ca.mcgill.ecse.dslreasoner.vampire.reasoner, 6Export-Package: ca.mcgill.ecse.dslreasoner.vampire.reasoner,
7 ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder, 7 ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder,
8 ca.mcgill.ecse.dslreasoner.vampire.reasoner.queries 8 ca.mcgill.ecse.dslreasoner.vampire.reasoner.queries
9Require-Bundle: org.eclipse.xtend.lib, 9Require-Bundle: org.eclipse.emf.ecore,
10 org.eclipse.viatra.query.runtime.rete,
11 org.eclipse.viatra.query.runtime.localsearch,
12 org.eclipse.xtext.xbase.lib,
13 org.eclipse.xtend.lib,
10 hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0", 14 hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0",
11 hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0", 15 hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0",
12 ca.mcgill.ecse.dslreasoner.vampire.language;bundle-version="1.0.0", 16 ca.mcgill.ecse.dslreasoner.vampire.language;bundle-version="1.0.0",
13 org.eclipse.viatra.query.runtime;bundle-version="2.1.0", 17 org.eclipse.viatra.query.runtime;bundle-version="2.1.0",
14 org.eclipse.viatra.query.runtime.base.itc;bundle-version="2.1.0", 18 org.eclipse.viatra.query.runtime.base.itc;bundle-version="2.1.0",
15 org.apache.log4j;bundle-version="1.2.15" 19 org.apache.log4j;bundle-version="1.2.15"
16Automatic-Module-Name: ca.mcgill.ecse.dslreasoner.vampire.reasoner
17Bundle-RequiredExecutionEnvironment: JavaSE-1.8 20Bundle-RequiredExecutionEnvironment: JavaSE-1.8
21Import-Package: org.apache.log4j
22Automatic-Module-Name: ca.mcgill.ecse.dslreasoner.vampire.reasoner
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/build.properties b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/build.properties
index aed85a48..efae4b07 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/build.properties
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/build.properties
@@ -1,5 +1,6 @@
1bin.includes = META-INF/,\ 1bin.includes = META-INF/,\
2 . 2 .
3source.. = src/,\ 3source.. = src/,\
4 src-gen/,\
4 src-gen/ 5 src-gen/
5output.. = bin/ 6output.. = bin/
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/queries/ca/mcgill/ecse/dslreasoner/vampire/reasoner/queries/vampireQueries.vql b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/queries/ca/mcgill/ecse/dslreasoner/vampire/reasoner/queries/vampireQueries.vql
index 2db380e4..be5a7c1f 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/queries/ca/mcgill/ecse/dslreasoner/vampire/reasoner/queries/vampireQueries.vql
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/queries/ca/mcgill/ecse/dslreasoner/vampire/reasoner/queries/vampireQueries.vql
@@ -48,8 +48,8 @@ pattern VLSInequality(term: VLSInequality){
48 VLSInequality(term); 48 VLSInequality(term);
49} 49}
50 50
51pattern VLSFunctionFof(term: VLSFunctionFof){ 51pattern VLSFunctionFof(term: VLSFunctionAsTerm){
52 VLSFunctionFof(term); 52 VLSFunctionAsTerm(term);
53} 53}
54 54
55//pattern VLSFofTerm(term: VLSFofTerm){ 55//pattern VLSFofTerm(term: VLSFofTerm){
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/queries/VLSFunctionFof.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/queries/VLSFunctionFof.java
index 5a88b0b4..0e82d459 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/queries/VLSFunctionFof.java
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/queries/VLSFunctionFof.java
@@ -3,6 +3,7 @@
3 */ 3 */
4package ca.mcgill.ecse.dslreasoner.vampire.reasoner.queries; 4package ca.mcgill.ecse.dslreasoner.vampire.reasoner.queries;
5 5
6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionAsTerm;
6import java.util.Arrays; 7import java.util.Arrays;
7import java.util.Collection; 8import java.util.Collection;
8import java.util.LinkedHashSet; 9import java.util.LinkedHashSet;
@@ -40,8 +41,8 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
40 * 41 *
41 * <p>Original source: 42 * <p>Original source:
42 * <code><pre> 43 * <code><pre>
43 * pattern VLSFunctionFof(term: VLSFunctionFof){ 44 * pattern VLSFunctionFof(term: VLSFunctionAsTerm){
44 * VLSFunctionFof(term); 45 * VLSFunctionAsTerm(term);
45 * } 46 * }
46 * </pre></code> 47 * </pre></code>
47 * 48 *
@@ -64,11 +65,11 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
64 * 65 *
65 */ 66 */
66 public static abstract class Match extends BasePatternMatch { 67 public static abstract class Match extends BasePatternMatch {
67 private ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof fTerm; 68 private VLSFunctionAsTerm fTerm;
68 69
69 private static List<String> parameterNames = makeImmutableList("term"); 70 private static List<String> parameterNames = makeImmutableList("term");
70 71
71 private Match(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 72 private Match(final VLSFunctionAsTerm pTerm) {
72 this.fTerm = pTerm; 73 this.fTerm = pTerm;
73 } 74 }
74 75
@@ -78,7 +79,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
78 return null; 79 return null;
79 } 80 }
80 81
81 public ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof getTerm() { 82 public VLSFunctionAsTerm getTerm() {
82 return this.fTerm; 83 return this.fTerm;
83 } 84 }
84 85
@@ -86,13 +87,13 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
86 public boolean set(final String parameterName, final Object newValue) { 87 public boolean set(final String parameterName, final Object newValue) {
87 if (!isMutable()) throw new java.lang.UnsupportedOperationException(); 88 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
88 if ("term".equals(parameterName) ) { 89 if ("term".equals(parameterName) ) {
89 this.fTerm = (ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) newValue; 90 this.fTerm = (VLSFunctionAsTerm) newValue;
90 return true; 91 return true;
91 } 92 }
92 return false; 93 return false;
93 } 94 }
94 95
95 public void setTerm(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 96 public void setTerm(final VLSFunctionAsTerm pTerm) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException(); 97 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 this.fTerm = pTerm; 98 this.fTerm = pTerm;
98 } 99 }
@@ -173,7 +174,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
173 * @return the new, mutable (partial) match object. 174 * @return the new, mutable (partial) match object.
174 * 175 *
175 */ 176 */
176 public static VLSFunctionFof.Match newMutableMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 177 public static VLSFunctionFof.Match newMutableMatch(final VLSFunctionAsTerm pTerm) {
177 return new Mutable(pTerm); 178 return new Mutable(pTerm);
178 } 179 }
179 180
@@ -185,12 +186,12 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
185 * @return the (partial) match object. 186 * @return the (partial) match object.
186 * 187 *
187 */ 188 */
188 public static VLSFunctionFof.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 189 public static VLSFunctionFof.Match newMatch(final VLSFunctionAsTerm pTerm) {
189 return new Immutable(pTerm); 190 return new Immutable(pTerm);
190 } 191 }
191 192
192 private static final class Mutable extends VLSFunctionFof.Match { 193 private static final class Mutable extends VLSFunctionFof.Match {
193 Mutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 194 Mutable(final VLSFunctionAsTerm pTerm) {
194 super(pTerm); 195 super(pTerm);
195 } 196 }
196 197
@@ -201,7 +202,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
201 } 202 }
202 203
203 private static final class Immutable extends VLSFunctionFof.Match { 204 private static final class Immutable extends VLSFunctionFof.Match {
204 Immutable(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 205 Immutable(final VLSFunctionAsTerm pTerm) {
205 super(pTerm); 206 super(pTerm);
206 } 207 }
207 208
@@ -223,8 +224,8 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
223 * 224 *
224 * <p>Original source: 225 * <p>Original source:
225 * <code><pre> 226 * <code><pre>
226 * pattern VLSFunctionFof(term: VLSFunctionFof){ 227 * pattern VLSFunctionFof(term: VLSFunctionAsTerm){
227 * VLSFunctionFof(term); 228 * VLSFunctionAsTerm(term);
228 * } 229 * }
229 * </pre></code> 230 * </pre></code>
230 * 231 *
@@ -282,7 +283,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
282 * @return matches represented as a Match object. 283 * @return matches represented as a Match object.
283 * 284 *
284 */ 285 */
285 public Collection<VLSFunctionFof.Match> getAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 286 public Collection<VLSFunctionFof.Match> getAllMatches(final VLSFunctionAsTerm pTerm) {
286 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet()); 287 return rawStreamAllMatches(new Object[]{pTerm}).collect(Collectors.toSet());
287 } 288 }
288 289
@@ -296,7 +297,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
296 * @return a stream of matches represented as a Match object. 297 * @return a stream of matches represented as a Match object.
297 * 298 *
298 */ 299 */
299 public Stream<VLSFunctionFof.Match> streamAllMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 300 public Stream<VLSFunctionFof.Match> streamAllMatches(final VLSFunctionAsTerm pTerm) {
300 return rawStreamAllMatches(new Object[]{pTerm}); 301 return rawStreamAllMatches(new Object[]{pTerm});
301 } 302 }
302 303
@@ -307,7 +308,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
307 * @return a match represented as a Match object, or null if no match is found. 308 * @return a match represented as a Match object, or null if no match is found.
308 * 309 *
309 */ 310 */
310 public Optional<VLSFunctionFof.Match> getOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 311 public Optional<VLSFunctionFof.Match> getOneArbitraryMatch(final VLSFunctionAsTerm pTerm) {
311 return rawGetOneArbitraryMatch(new Object[]{pTerm}); 312 return rawGetOneArbitraryMatch(new Object[]{pTerm});
312 } 313 }
313 314
@@ -318,7 +319,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
318 * @return true if the input is a valid (partial) match of the pattern. 319 * @return true if the input is a valid (partial) match of the pattern.
319 * 320 *
320 */ 321 */
321 public boolean hasMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 322 public boolean hasMatch(final VLSFunctionAsTerm pTerm) {
322 return rawHasMatch(new Object[]{pTerm}); 323 return rawHasMatch(new Object[]{pTerm});
323 } 324 }
324 325
@@ -328,7 +329,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
328 * @return the number of pattern matches found. 329 * @return the number of pattern matches found.
329 * 330 *
330 */ 331 */
331 public int countMatches(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 332 public int countMatches(final VLSFunctionAsTerm pTerm) {
332 return rawCountMatches(new Object[]{pTerm}); 333 return rawCountMatches(new Object[]{pTerm});
333 } 334 }
334 335
@@ -340,7 +341,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
340 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked 341 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
341 * 342 *
342 */ 343 */
343 public boolean forOneArbitraryMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm, final Consumer<? super VLSFunctionFof.Match> processor) { 344 public boolean forOneArbitraryMatch(final VLSFunctionAsTerm pTerm, final Consumer<? super VLSFunctionFof.Match> processor) {
344 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor); 345 return rawForOneArbitraryMatch(new Object[]{pTerm}, processor);
345 } 346 }
346 347
@@ -352,7 +353,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
352 * @return the (partial) match object. 353 * @return the (partial) match object.
353 * 354 *
354 */ 355 */
355 public VLSFunctionFof.Match newMatch(final ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof pTerm) { 356 public VLSFunctionFof.Match newMatch(final VLSFunctionAsTerm pTerm) {
356 return VLSFunctionFof.Match.newMatch(pTerm); 357 return VLSFunctionFof.Match.newMatch(pTerm);
357 } 358 }
358 359
@@ -361,8 +362,8 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
361 * @return the Set of all values or empty set if there are no matches 362 * @return the Set of all values or empty set if there are no matches
362 * 363 *
363 */ 364 */
364 protected Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof> rawStreamAllValuesOfterm(final Object[] parameters) { 365 protected Stream<VLSFunctionAsTerm> rawStreamAllValuesOfterm(final Object[] parameters) {
365 return rawStreamAllValues(POSITION_TERM, parameters).map(ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof.class::cast); 366 return rawStreamAllValues(POSITION_TERM, parameters).map(VLSFunctionAsTerm.class::cast);
366 } 367 }
367 368
368 /** 369 /**
@@ -370,7 +371,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
370 * @return the Set of all values or empty set if there are no matches 371 * @return the Set of all values or empty set if there are no matches
371 * 372 *
372 */ 373 */
373 public Set<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof> getAllValuesOfterm() { 374 public Set<VLSFunctionAsTerm> getAllValuesOfterm() {
374 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet()); 375 return rawStreamAllValuesOfterm(emptyArray()).collect(Collectors.toSet());
375 } 376 }
376 377
@@ -379,14 +380,14 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
379 * @return the Set of all values or empty set if there are no matches 380 * @return the Set of all values or empty set if there are no matches
380 * 381 *
381 */ 382 */
382 public Stream<ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof> streamAllValuesOfterm() { 383 public Stream<VLSFunctionAsTerm> streamAllValuesOfterm() {
383 return rawStreamAllValuesOfterm(emptyArray()); 384 return rawStreamAllValuesOfterm(emptyArray());
384 } 385 }
385 386
386 @Override 387 @Override
387 protected VLSFunctionFof.Match tupleToMatch(final Tuple t) { 388 protected VLSFunctionFof.Match tupleToMatch(final Tuple t) {
388 try { 389 try {
389 return VLSFunctionFof.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) t.get(POSITION_TERM)); 390 return VLSFunctionFof.Match.newMatch((VLSFunctionAsTerm) t.get(POSITION_TERM));
390 } catch(ClassCastException e) { 391 } catch(ClassCastException e) {
391 LOGGER.error("Element(s) in tuple not properly typed!",e); 392 LOGGER.error("Element(s) in tuple not properly typed!",e);
392 return null; 393 return null;
@@ -396,7 +397,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
396 @Override 397 @Override
397 protected VLSFunctionFof.Match arrayToMatch(final Object[] match) { 398 protected VLSFunctionFof.Match arrayToMatch(final Object[] match) {
398 try { 399 try {
399 return VLSFunctionFof.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) match[POSITION_TERM]); 400 return VLSFunctionFof.Match.newMatch((VLSFunctionAsTerm) match[POSITION_TERM]);
400 } catch(ClassCastException e) { 401 } catch(ClassCastException e) {
401 LOGGER.error("Element(s) in array not properly typed!",e); 402 LOGGER.error("Element(s) in array not properly typed!",e);
402 return null; 403 return null;
@@ -406,7 +407,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
406 @Override 407 @Override
407 protected VLSFunctionFof.Match arrayToMatchMutable(final Object[] match) { 408 protected VLSFunctionFof.Match arrayToMatchMutable(final Object[] match) {
408 try { 409 try {
409 return VLSFunctionFof.Match.newMutableMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) match[POSITION_TERM]); 410 return VLSFunctionFof.Match.newMutableMatch((VLSFunctionAsTerm) match[POSITION_TERM]);
410 } catch(ClassCastException e) { 411 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in array not properly typed!",e); 412 LOGGER.error("Element(s) in array not properly typed!",e);
412 return null; 413 return null;
@@ -457,7 +458,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
457 458
458 @Override 459 @Override
459 public VLSFunctionFof.Match newMatch(final Object... parameters) { 460 public VLSFunctionFof.Match newMatch(final Object... parameters) {
460 return VLSFunctionFof.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionFof) parameters[0]); 461 return VLSFunctionFof.Match.newMatch((ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionAsTerm) parameters[0]);
461 } 462 }
462 463
463 /** 464 /**
@@ -489,7 +490,7 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
489 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { 490 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
490 private final static VLSFunctionFof.GeneratedPQuery INSTANCE = new GeneratedPQuery(); 491 private final static VLSFunctionFof.GeneratedPQuery INSTANCE = new GeneratedPQuery();
491 492
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 private final PParameter parameter_term = new PParameter("term", "ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionAsTerm", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunctionAsTerm")), PParameterDirection.INOUT);
493 494
494 private final List<PParameter> parameters = Arrays.asList(parameter_term); 495 private final List<PParameter> parameters = Arrays.asList(parameter_term);
495 496
@@ -519,12 +520,12 @@ public final class VLSFunctionFof extends BaseGeneratedEMFQuerySpecification<VLS
519 { 520 {
520 PBody body = new PBody(this); 521 PBody body = new PBody(this);
521 PVariable var_term = body.getOrCreateVariableByName("term"); 522 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 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunctionAsTerm")));
523 body.setSymbolicParameters(Arrays.<ExportedParameter>asList( 524 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
524 new ExportedParameter(body, var_term, parameter_term) 525 new ExportedParameter(body, var_term, parameter_term)
525 )); 526 ));
526 // VLSFunctionFof(term) 527 // VLSFunctionAsTerm(term)
527 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunctionFof"))); 528 new TypeConstraint(body, Tuples.flatTupleOf(var_term), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.mcgill.ca/ecse/dslreasoner/VampireLanguage", "VLSFunctionAsTerm")));
528 bodies.add(body); 529 bodies.add(body);
529 } 530 }
530 return bodies; 531 return bodies;
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapperTrace.xtend b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapperTrace.xtend
index 3c672f4b..22bd4ab5 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapperTrace.xtend
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapperTrace.xtend
@@ -1,5 +1,6 @@
1package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder 1package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder
2 2
3import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant
3import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula 4import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula
4import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction 5import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction
5import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm 6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm
@@ -13,6 +14,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition
13import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type 14import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type
14import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable 15import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable
15import java.util.HashMap 16import java.util.HashMap
17import java.util.List
16import java.util.Map 18import java.util.Map
17 19
18interface Logic2VampireLanguageMapper_TypeMapperTrace {} 20interface Logic2VampireLanguageMapper_TypeMapperTrace {}
@@ -32,6 +34,9 @@ class Logic2VampireLanguageMapperTrace {
32 public val Map<DefinedElement, VLSFunction> element2Predicate = new HashMap 34 public val Map<DefinedElement, VLSFunction> element2Predicate = new HashMap
33 public val Map<Type, VLSTerm> type2PossibleNot = new HashMap 35 public val Map<Type, VLSTerm> type2PossibleNot = new HashMap
34 public val Map<Type, VLSTerm> type2And = new HashMap 36 public val Map<Type, VLSTerm> type2And = new HashMap
37 //Uniqueness
38 public val List<VLSConstant> uniqueInstances = newArrayList
39
35 40
36 public var Map<ConstantDeclaration, ConstantDefinition> constantDefinitions 41 public var Map<ConstantDeclaration, ConstantDefinition> constantDefinitions
37 public var Map<RelationDeclaration, RelationDefinition> relationDefinitions 42 public var Map<RelationDeclaration, RelationDefinition> relationDefinitions
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.xtend b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.xtend
index 4b7ea3d0..e5dfbf08 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.xtend
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.xtend
@@ -19,13 +19,14 @@ class Logic2VampireLanguageMapper_ScopeMapper {
19 val VLSVariable variable = createVLSVariable => [it.name = "A"] 19 val VLSVariable variable = createVLSVariable => [it.name = "A"]
20 20
21 // 1. make a list of constants equaling the min number of specified objects 21 // 1. make a list of constants equaling the min number of specified objects
22 val List<VLSConstant> instances = newArrayList 22 val localInstances = newArrayList
23 for (var i = 0; i < config.typeScopes.minNewElements; i++) { 23 for (var i = 0; i < config.typeScopes.minNewElements; i++) {
24 val num = i + 1 24 val num = i + 1
25 val cst = createVLSConstant => [ 25 val cst = createVLSConstant => [
26 it.name = "o" + num 26 it.name = "o" + num
27 ] 27 ]
28 instances.add(cst) 28 trace.uniqueInstances.add(cst)
29 localInstances.add(cst)
29 } 30 }
30 31
31 // TODO: specify for the max 32 // TODO: specify for the max
@@ -37,14 +38,14 @@ class Logic2VampireLanguageMapper_ScopeMapper {
37 it.fofFormula = createVLSUniversalQuantifier => [ 38 it.fofFormula = createVLSUniversalQuantifier => [
38 it.variables += support.duplicate(variable) 39 it.variables += support.duplicate(variable)
39 // check below 40 // check below
40 it.operand = createVLSEquivalent => [ 41 it.operand = createVLSImplies => [
41 it.left = support.topLevelTypeFunc 42 it.left = support.unfoldOr(localInstances.map [ i |
42 it.right = support.unfoldOr(instances.map [ i |
43 createVLSEquality => [ 43 createVLSEquality => [
44 it.left = createVLSVariable => [it.name = variable.name] 44 it.left = createVLSVariable => [it.name = variable.name]
45 it.right = i 45 it.right = i
46 ] 46 ]
47 ]) 47 ])
48 it.right = support.topLevelTypeFunc
48 ] 49 ]
49 ] 50 ]
50 ] 51 ]
@@ -55,7 +56,7 @@ class Logic2VampireLanguageMapper_ScopeMapper {
55 val uniqueness = createVLSFofFormula => [ 56 val uniqueness = createVLSFofFormula => [
56 it.name = "typeUniqueness" 57 it.name = "typeUniqueness"
57 it.fofRole = "axiom" 58 it.fofRole = "axiom"
58 it.fofFormula = support.establishUniqueness(instances) 59 it.fofFormula = support.establishUniqueness(trace.uniqueInstances)
59 ] 60 ]
60 trace.specification.formulas += uniqueness 61 trace.specification.formulas += uniqueness
61 } 62 }
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_Support.xtend b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_Support.xtend
index d3595a73..021cb0ea 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_Support.xtend
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_Support.xtend
@@ -2,6 +2,7 @@ package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder
2 2
3import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant 3import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant
4import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction 4import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction
5import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionAsTerm
5import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality 6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality
6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm 7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm
7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSVariable 8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSVariable
@@ -36,6 +37,14 @@ class Logic2VampireLanguageMapper_Support {
36 def protected VLSVariable duplicate(VLSVariable term) { 37 def protected VLSVariable duplicate(VLSVariable term) {
37 return createVLSVariable => [it.name = term.name] 38 return createVLSVariable => [it.name = term.name]
38 } 39 }
40
41 def protected VLSFunctionAsTerm duplicate(VLSFunctionAsTerm term) {
42 return createVLSFunctionAsTerm => [it.functor = term.functor]
43 }
44
45 def protected VLSConstant duplicate(VLSConstant term) {
46 return createVLSConstant => [it.name = term.name]
47 }
39 48
40 def protected VLSFunction duplicate(VLSFunction term) { 49 def protected VLSFunction duplicate(VLSFunction term) {
41 return createVLSFunction => [ 50 return createVLSFunction => [
@@ -52,6 +61,19 @@ class Logic2VampireLanguageMapper_Support {
52 it.terms += duplicate(v) 61 it.terms += duplicate(v)
53 ] 62 ]
54 } 63 }
64
65 def protected VLSFunction duplicate(VLSFunction term, VLSFunctionAsTerm v) {
66 return createVLSFunction => [
67 it.constant = term.constant
68 it.terms += duplicate(v)
69 ]
70 }
71
72 def protected VLSConstant toConstant(VLSFunctionAsTerm term) {
73 return createVLSConstant => [
74 it.name = term.functor
75 ]
76 }
55 77
56 def protected VLSFunction topLevelTypeFunc() { 78 def protected VLSFunction topLevelTypeFunc() {
57 return createVLSFunction => [ 79 return createVLSFunction => [
@@ -61,6 +83,13 @@ class Logic2VampireLanguageMapper_Support {
61 ] 83 ]
62 ] 84 ]
63 } 85 }
86
87 def protected VLSFunction topLevelTypeFunc(VLSFunctionAsTerm v) {
88 return createVLSFunction => [
89 it.constant = "object"
90 it.terms += duplicate(v)
91 ]
92 }
64 93
65 // TODO Make more general 94 // TODO Make more general
66 def establishUniqueness(List<VLSConstant> terms) { 95 def establishUniqueness(List<VLSConstant> terms) {
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.xtend b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.xtend
index bc0b3e23..f2a7b3f2 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.xtend
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/src/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.xtend
@@ -14,8 +14,9 @@ import java.util.Collection
14import java.util.List 14import java.util.List
15 15
16import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* 16import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.*
17import java.util.Collections
17 18
18class Logic2VampireLanguageMapper_TypeMapper { 19class Logic2VampireLanguageMapper_TypeMapper {
19 private val extension VampireLanguageFactory factory = VampireLanguageFactory.eINSTANCE 20 private val extension VampireLanguageFactory factory = VampireLanguageFactory.eINSTANCE
20 private val Logic2VampireLanguageMapper_Support support = new Logic2VampireLanguageMapper_Support 21 private val Logic2VampireLanguageMapper_Support support = new Logic2VampireLanguageMapper_Support
21 val Logic2VampireLanguageMapper base 22 val Logic2VampireLanguageMapper base
@@ -25,8 +26,9 @@ class Logic2VampireLanguageMapper_TypeMapper {
25 this.base = base 26 this.base = base
26 } 27 }
27 28
28 def protected transformTypes(Collection<Type> types, Collection<DefinedElement> elements, Logic2VampireLanguageMapper mapper, Logic2VampireLanguageMapperTrace trace) { 29 def protected transformTypes(Collection<Type> types, Collection<DefinedElement> elements,
29 30 Logic2VampireLanguageMapper mapper, Logic2VampireLanguageMapperTrace trace) {
31
30// val typeTrace = new Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes 32// val typeTrace = new Logic2VampireLanguageMapper_TypeMapperTrace_FilteredTypes
31// trace.typeMapperTrace = typeTrace 33// trace.typeMapperTrace = typeTrace
32 val VLSVariable variable = createVLSVariable => [it.name = "A"] 34 val VLSVariable variable = createVLSVariable => [it.name = "A"]
@@ -86,14 +88,38 @@ class Logic2VampireLanguageMapper_TypeMapper {
86 88
87 ] 89 ]
88 trace.specification.formulas += res 90 trace.specification.formulas += res
91
92 // Create objects for the enum elements
93 val List<VLSFunction> enumScopeElems = newArrayList
94 for (var i = 0; i < type.elements.length; i++) {
95 val num = i + 1
96 val cstTerm = createVLSFunctionAsTerm => [
97 it.functor = "eo" + num
98 ]
99 val cst = support.toConstant(cstTerm)
100 trace.uniqueInstances.add(cst)
101 val fct = support.duplicate(type.elements.get(i).lookup(trace.element2Predicate), cstTerm)
102 enumScopeElems.add(fct)
103// enumScopeElems.add(support.topLevelTypeFunc(cstTerm))
104 }
105
106
107
108 val enumScope = createVLSFofFormula => [
109 it.name = support.toIDMultiple("enumScope", type.name.split(" ").get(0))
110 // below is temporary solution
111 it.fofRole = "axiom"
112 it.fofFormula = support.unfoldAnd(enumScopeElems)
113 ]
114
115 trace.specification.formulas += enumScope
89 } 116 }
90 117
91 //HIERARCHY HANDLER 118 // HIERARCHY HANDLER
92
93
94 // 3. For each non-abstract type, create an and sequence containing all typedeclaration predicates 119 // 3. For each non-abstract type, create an and sequence containing all typedeclaration predicates
95 // and store in a map 120 // and store in a map
96 for (t1 : types.filter[!isIsAbstract]) { 121// println(types.filter[!isIsAbstract])
122 for (t1 : types.filter[!isIsAbstract].filter(TypeDeclaration)) {
97 for (t2 : types) { 123 for (t2 : types) {
98 // possible improvement: check all supertypes and decide if negated or not based on negations/not negations of supertypes 124 // possible improvement: check all supertypes and decide if negated or not based on negations/not negations of supertypes
99 if (t1 == t2 || support.dfsSupertypeCheck(t1, t2)) { 125 if (t1 == t2 || support.dfsSupertypeCheck(t1, t2)) {
@@ -121,7 +147,9 @@ class Logic2VampireLanguageMapper_TypeMapper {
121 it.operand = createVLSEquivalent => [ 147 it.operand = createVLSEquivalent => [
122 it.left = support.topLevelTypeFunc 148 it.left = support.topLevelTypeFunc
123// it.right = support.unfoldOr(new ArrayList<VLSTerm>(typeTrace.type2And.values)) 149// it.right = support.unfoldOr(new ArrayList<VLSTerm>(typeTrace.type2And.values))
124 it.right = support.unfoldOr(new ArrayList<VLSTerm>(trace.type2And.values)) 150 val reversedList = new ArrayList<VLSTerm>(trace.type2And.values)
151// Collections.reverse(reversedList)
152 it.right = support.unfoldOr(reversedList)
125 ] 153 ]
126 ] 154 ]
127 ] 155 ]
@@ -130,7 +158,7 @@ class Logic2VampireLanguageMapper_TypeMapper {
130 158
131 } 159 }
132 160
133 //below are from previous interface 161 // below are from previous interface
134 def protected transformTypeReference(Type referred, Logic2VampireLanguageMapper mapper, 162 def protected transformTypeReference(Type referred, Logic2VampireLanguageMapper mapper,
135 Logic2VampireLanguageMapperTrace trace) { 163 Logic2VampireLanguageMapperTrace trace) {
136 throw new UnsupportedOperationException("TODO: auto-generated method stub") 164 throw new UnsupportedOperationException("TODO: auto-generated method stub")
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 e0766c08..3f204913 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 c38c96ad..10983f27 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 2c091b47..00ebca4b 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 b05fd2c1..9641858d 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 7f6519eb..2b51fe5d 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_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 d30eebe5..75482abc 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 921b79bd..c394f878 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 6b8d1dc0..1ec5da80 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 83e57283..e85b5240 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/.Vampire2LogicMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Vampire2LogicMapper.xtendbin
index 5a0087bc..c000d128 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 7d090297..5eb63977 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 c8ab54c2..501dbfb4 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 3306fa73..621c888a 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/Logic2VampireLanguageMapperTrace.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapperTrace.java
index 2b491209..24df5fcd 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapperTrace.java
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapperTrace.java
@@ -1,6 +1,7 @@
1package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder; 1package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder;
2 2
3import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper_TypeMapperTrace; 3import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper_TypeMapperTrace;
4import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant;
4import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula; 5import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula;
5import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction; 6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction;
6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm; 7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm;
@@ -14,7 +15,9 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition;
14import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; 15import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type;
15import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable; 16import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable;
16import java.util.HashMap; 17import java.util.HashMap;
18import java.util.List;
17import java.util.Map; 19import java.util.Map;
20import org.eclipse.xtext.xbase.lib.CollectionLiterals;
18 21
19@SuppressWarnings("all") 22@SuppressWarnings("all")
20public class Logic2VampireLanguageMapperTrace { 23public class Logic2VampireLanguageMapperTrace {
@@ -34,6 +37,8 @@ public class Logic2VampireLanguageMapperTrace {
34 37
35 public final Map<Type, VLSTerm> type2And = new HashMap<Type, VLSTerm>(); 38 public final Map<Type, VLSTerm> type2And = new HashMap<Type, VLSTerm>();
36 39
40 public final List<VLSConstant> uniqueInstances = CollectionLiterals.<VLSConstant>newArrayList();
41
37 public Map<ConstantDeclaration, ConstantDefinition> constantDefinitions; 42 public Map<ConstantDeclaration, ConstantDefinition> constantDefinitions;
38 43
39 public Map<RelationDeclaration, RelationDefinition> relationDefinitions; 44 public Map<RelationDeclaration, RelationDefinition> relationDefinitions;
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.java
index 8967839d..15ba78c9 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.java
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.java
@@ -5,13 +5,14 @@ import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguage
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.VLSConstant; 6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant;
7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquality; 7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquality;
8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent;
9import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula; 8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula;
9import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSImplies;
10import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm;
10import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier; 11import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier;
11import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSVariable; 12import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSVariable;
12import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory; 13import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory;
13import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration; 14import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration;
14import java.util.List; 15import java.util.ArrayList;
15import org.eclipse.emf.common.util.EList; 16import org.eclipse.emf.common.util.EList;
16import org.eclipse.xtext.xbase.lib.CollectionLiterals; 17import org.eclipse.xtext.xbase.lib.CollectionLiterals;
17import org.eclipse.xtext.xbase.lib.Extension; 18import org.eclipse.xtext.xbase.lib.Extension;
@@ -39,7 +40,7 @@ public class Logic2VampireLanguageMapper_ScopeMapper {
39 it.setName("A"); 40 it.setName("A");
40 }; 41 };
41 final VLSVariable variable = ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable, _function); 42 final VLSVariable variable = ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable, _function);
42 final List<VLSConstant> instances = CollectionLiterals.<VLSConstant>newArrayList(); 43 final ArrayList<VLSTerm> localInstances = CollectionLiterals.<VLSTerm>newArrayList();
43 for (int i = 0; (i < config.typeScopes.minNewElements); i++) { 44 for (int i = 0; (i < config.typeScopes.minNewElements); i++) {
44 { 45 {
45 final int num = (i + 1); 46 final int num = (i + 1);
@@ -48,7 +49,8 @@ public class Logic2VampireLanguageMapper_ScopeMapper {
48 it.setName(("o" + Integer.valueOf(num))); 49 it.setName(("o" + Integer.valueOf(num)));
49 }; 50 };
50 final VLSConstant cst = ObjectExtensions.<VLSConstant>operator_doubleArrow(_createVLSConstant, _function_1); 51 final VLSConstant cst = ObjectExtensions.<VLSConstant>operator_doubleArrow(_createVLSConstant, _function_1);
51 instances.add(cst); 52 trace.uniqueInstances.add(cst);
53 localInstances.add(cst);
52 } 54 }
53 } 55 }
54 if ((config.typeScopes.minNewElements != 0)) { 56 if ((config.typeScopes.minNewElements != 0)) {
@@ -61,10 +63,9 @@ public class Logic2VampireLanguageMapper_ScopeMapper {
61 EList<VLSVariable> _variables = it_1.getVariables(); 63 EList<VLSVariable> _variables = it_1.getVariables();
62 VLSVariable _duplicate = this.support.duplicate(variable); 64 VLSVariable _duplicate = this.support.duplicate(variable);
63 _variables.add(_duplicate); 65 _variables.add(_duplicate);
64 VLSEquivalent _createVLSEquivalent = this.factory.createVLSEquivalent(); 66 VLSImplies _createVLSImplies = this.factory.createVLSImplies();
65 final Procedure1<VLSEquivalent> _function_3 = (VLSEquivalent it_2) -> { 67 final Procedure1<VLSImplies> _function_3 = (VLSImplies it_2) -> {
66 it_2.setLeft(this.support.topLevelTypeFunc()); 68 final Function1<VLSTerm, VLSEquality> _function_4 = (VLSTerm i) -> {
67 final Function1<VLSConstant, VLSEquality> _function_4 = (VLSConstant i) -> {
68 VLSEquality _createVLSEquality = this.factory.createVLSEquality(); 69 VLSEquality _createVLSEquality = this.factory.createVLSEquality();
69 final Procedure1<VLSEquality> _function_5 = (VLSEquality it_3) -> { 70 final Procedure1<VLSEquality> _function_5 = (VLSEquality it_3) -> {
70 VLSVariable _createVLSVariable_1 = this.factory.createVLSVariable(); 71 VLSVariable _createVLSVariable_1 = this.factory.createVLSVariable();
@@ -77,9 +78,10 @@ public class Logic2VampireLanguageMapper_ScopeMapper {
77 }; 78 };
78 return ObjectExtensions.<VLSEquality>operator_doubleArrow(_createVLSEquality, _function_5); 79 return ObjectExtensions.<VLSEquality>operator_doubleArrow(_createVLSEquality, _function_5);
79 }; 80 };
80 it_2.setRight(this.support.unfoldOr(ListExtensions.<VLSConstant, VLSEquality>map(instances, _function_4))); 81 it_2.setLeft(this.support.unfoldOr(ListExtensions.<VLSTerm, VLSEquality>map(localInstances, _function_4)));
82 it_2.setRight(this.support.topLevelTypeFunc());
81 }; 83 };
82 VLSEquivalent _doubleArrow = ObjectExtensions.<VLSEquivalent>operator_doubleArrow(_createVLSEquivalent, _function_3); 84 VLSImplies _doubleArrow = ObjectExtensions.<VLSImplies>operator_doubleArrow(_createVLSImplies, _function_3);
83 it_1.setOperand(_doubleArrow); 85 it_1.setOperand(_doubleArrow);
84 }; 86 };
85 VLSUniversalQuantifier _doubleArrow = ObjectExtensions.<VLSUniversalQuantifier>operator_doubleArrow(_createVLSUniversalQuantifier, _function_2); 87 VLSUniversalQuantifier _doubleArrow = ObjectExtensions.<VLSUniversalQuantifier>operator_doubleArrow(_createVLSUniversalQuantifier, _function_2);
@@ -92,7 +94,7 @@ public class Logic2VampireLanguageMapper_ScopeMapper {
92 final Procedure1<VLSFofFormula> _function_2 = (VLSFofFormula it) -> { 94 final Procedure1<VLSFofFormula> _function_2 = (VLSFofFormula it) -> {
93 it.setName("typeUniqueness"); 95 it.setName("typeUniqueness");
94 it.setFofRole("axiom"); 96 it.setFofRole("axiom");
95 it.setFofFormula(this.support.establishUniqueness(instances)); 97 it.setFofFormula(this.support.establishUniqueness(trace.uniqueInstances));
96 }; 98 };
97 final VLSFofFormula uniqueness = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula_1, _function_2); 99 final VLSFofFormula uniqueness = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula_1, _function_2);
98 EList<VLSFofFormula> _formulas_1 = trace.specification.getFormulas(); 100 EList<VLSFofFormula> _formulas_1 = trace.specification.getFormulas();
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_Support.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_Support.java
index 72ca44e9..e2ff7a0e 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_Support.java
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_Support.java
@@ -6,6 +6,7 @@ import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnd;
6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant; 6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant;
7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier; 7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSExistentialQuantifier;
8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction; 8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction;
9import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionAsTerm;
9import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSImplies; 10import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSImplies;
10import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality; 11import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSInequality;
11import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr; 12import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSOr;
@@ -62,6 +63,22 @@ public class Logic2VampireLanguageMapper_Support {
62 return ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable, _function); 63 return ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable, _function);
63 } 64 }
64 65
66 protected VLSFunctionAsTerm duplicate(final VLSFunctionAsTerm term) {
67 VLSFunctionAsTerm _createVLSFunctionAsTerm = this.factory.createVLSFunctionAsTerm();
68 final Procedure1<VLSFunctionAsTerm> _function = (VLSFunctionAsTerm it) -> {
69 it.setFunctor(term.getFunctor());
70 };
71 return ObjectExtensions.<VLSFunctionAsTerm>operator_doubleArrow(_createVLSFunctionAsTerm, _function);
72 }
73
74 protected VLSConstant duplicate(final VLSConstant term) {
75 VLSConstant _createVLSConstant = this.factory.createVLSConstant();
76 final Procedure1<VLSConstant> _function = (VLSConstant it) -> {
77 it.setName(term.getName());
78 };
79 return ObjectExtensions.<VLSConstant>operator_doubleArrow(_createVLSConstant, _function);
80 }
81
65 protected VLSFunction duplicate(final VLSFunction term) { 82 protected VLSFunction duplicate(final VLSFunction term) {
66 VLSFunction _createVLSFunction = this.factory.createVLSFunction(); 83 VLSFunction _createVLSFunction = this.factory.createVLSFunction();
67 final Procedure1<VLSFunction> _function = (VLSFunction it) -> { 84 final Procedure1<VLSFunction> _function = (VLSFunction it) -> {
@@ -87,6 +104,25 @@ public class Logic2VampireLanguageMapper_Support {
87 return ObjectExtensions.<VLSFunction>operator_doubleArrow(_createVLSFunction, _function); 104 return ObjectExtensions.<VLSFunction>operator_doubleArrow(_createVLSFunction, _function);
88 } 105 }
89 106
107 protected VLSFunction duplicate(final VLSFunction term, final VLSFunctionAsTerm v) {
108 VLSFunction _createVLSFunction = this.factory.createVLSFunction();
109 final Procedure1<VLSFunction> _function = (VLSFunction it) -> {
110 it.setConstant(term.getConstant());
111 EList<VLSTerm> _terms = it.getTerms();
112 VLSFunctionAsTerm _duplicate = this.duplicate(v);
113 _terms.add(_duplicate);
114 };
115 return ObjectExtensions.<VLSFunction>operator_doubleArrow(_createVLSFunction, _function);
116 }
117
118 protected VLSConstant toConstant(final VLSFunctionAsTerm term) {
119 VLSConstant _createVLSConstant = this.factory.createVLSConstant();
120 final Procedure1<VLSConstant> _function = (VLSConstant it) -> {
121 it.setName(term.getFunctor());
122 };
123 return ObjectExtensions.<VLSConstant>operator_doubleArrow(_createVLSConstant, _function);
124 }
125
90 protected VLSFunction topLevelTypeFunc() { 126 protected VLSFunction topLevelTypeFunc() {
91 VLSFunction _createVLSFunction = this.factory.createVLSFunction(); 127 VLSFunction _createVLSFunction = this.factory.createVLSFunction();
92 final Procedure1<VLSFunction> _function = (VLSFunction it) -> { 128 final Procedure1<VLSFunction> _function = (VLSFunction it) -> {
@@ -102,6 +138,17 @@ public class Logic2VampireLanguageMapper_Support {
102 return ObjectExtensions.<VLSFunction>operator_doubleArrow(_createVLSFunction, _function); 138 return ObjectExtensions.<VLSFunction>operator_doubleArrow(_createVLSFunction, _function);
103 } 139 }
104 140
141 protected VLSFunction topLevelTypeFunc(final VLSFunctionAsTerm v) {
142 VLSFunction _createVLSFunction = this.factory.createVLSFunction();
143 final Procedure1<VLSFunction> _function = (VLSFunction it) -> {
144 it.setConstant("object");
145 EList<VLSTerm> _terms = it.getTerms();
146 VLSFunctionAsTerm _duplicate = this.duplicate(v);
147 _terms.add(_duplicate);
148 };
149 return ObjectExtensions.<VLSFunction>operator_doubleArrow(_createVLSFunction, _function);
150 }
151
105 public VLSTerm establishUniqueness(final List<VLSConstant> terms) { 152 public VLSTerm establishUniqueness(final List<VLSConstant> terms) {
106 final List<VLSInequality> eqs = CollectionLiterals.<VLSInequality>newArrayList(); 153 final List<VLSInequality> eqs = CollectionLiterals.<VLSInequality>newArrayList();
107 List<VLSConstant> _subList = terms.subList(1, ((Object[])Conversions.unwrapArray(terms, Object.class)).length); 154 List<VLSConstant> _subList = terms.subList(1, ((Object[])Conversions.unwrapArray(terms, Object.class)).length);
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.java
index d3dddcfc..f776371b 100644
--- a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.java
+++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.java
@@ -3,10 +3,12 @@ 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.VLSConstant;
6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSDoubleQuote; 7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSDoubleQuote;
7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent; 8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent;
8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula; 9import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula;
9import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction; 10import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction;
11import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionAsTerm;
10import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm; 12import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm;
11import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation; 13import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUnaryNegation;
12import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier; 14import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier;
@@ -16,6 +18,7 @@ import com.google.common.base.Objects;
16import com.google.common.collect.Iterables; 18import com.google.common.collect.Iterables;
17import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; 19import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement;
18import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; 20import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type;
21import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration;
19import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition; 22import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition;
20import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage; 23import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage;
21import hu.bme.mit.inf.dslreasoner.util.CollectionsUtil; 24import hu.bme.mit.inf.dslreasoner.util.CollectionsUtil;
@@ -24,6 +27,7 @@ import java.util.Collection;
24import java.util.List; 27import java.util.List;
25import org.eclipse.emf.common.util.EList; 28import org.eclipse.emf.common.util.EList;
26import org.eclipse.xtext.xbase.lib.CollectionLiterals; 29import org.eclipse.xtext.xbase.lib.CollectionLiterals;
30import org.eclipse.xtext.xbase.lib.Conversions;
27import org.eclipse.xtext.xbase.lib.Extension; 31import org.eclipse.xtext.xbase.lib.Extension;
28import org.eclipse.xtext.xbase.lib.Functions.Function1; 32import org.eclipse.xtext.xbase.lib.Functions.Function1;
29import org.eclipse.xtext.xbase.lib.IterableExtensions; 33import org.eclipse.xtext.xbase.lib.IterableExtensions;
@@ -107,14 +111,38 @@ public class Logic2VampireLanguageMapper_TypeMapper {
107 final VLSFofFormula res = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula, _function_1); 111 final VLSFofFormula res = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula, _function_1);
108 EList<VLSFofFormula> _formulas = trace.specification.getFormulas(); 112 EList<VLSFofFormula> _formulas = trace.specification.getFormulas();
109 _formulas.add(res); 113 _formulas.add(res);
114 final List<VLSFunction> enumScopeElems = CollectionLiterals.<VLSFunction>newArrayList();
115 for (int i = 0; (i < ((Object[])Conversions.unwrapArray(type_1.getElements(), Object.class)).length); i++) {
116 {
117 final int num = (i + 1);
118 VLSFunctionAsTerm _createVLSFunctionAsTerm = this.factory.createVLSFunctionAsTerm();
119 final Procedure1<VLSFunctionAsTerm> _function_2 = (VLSFunctionAsTerm it) -> {
120 it.setFunctor(("eo" + Integer.valueOf(num)));
121 };
122 final VLSFunctionAsTerm cstTerm = ObjectExtensions.<VLSFunctionAsTerm>operator_doubleArrow(_createVLSFunctionAsTerm, _function_2);
123 final VLSConstant cst = this.support.toConstant(cstTerm);
124 trace.uniqueInstances.add(cst);
125 final VLSFunction fct = this.support.duplicate(CollectionsUtil.<DefinedElement, VLSFunction>lookup(type_1.getElements().get(i), trace.element2Predicate), cstTerm);
126 enumScopeElems.add(fct);
127 }
128 }
129 VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula();
130 final Procedure1<VLSFofFormula> _function_2 = (VLSFofFormula it) -> {
131 it.setName(this.support.toIDMultiple("enumScope", type_1.getName().split(" ")[0]));
132 it.setFofRole("axiom");
133 it.setFofFormula(this.support.unfoldAnd(enumScopeElems));
134 };
135 final VLSFofFormula enumScope = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula_1, _function_2);
136 EList<VLSFofFormula> _formulas_1 = trace.specification.getFormulas();
137 _formulas_1.add(enumScope);
110 } 138 }
111 } 139 }
112 final Function1<Type, Boolean> _function_1 = (Type it) -> { 140 final Function1<Type, Boolean> _function_1 = (Type it) -> {
113 boolean _isIsAbstract = it.isIsAbstract(); 141 boolean _isIsAbstract = it.isIsAbstract();
114 return Boolean.valueOf((!_isIsAbstract)); 142 return Boolean.valueOf((!_isIsAbstract));
115 }; 143 };
116 Iterable<Type> _filter_1 = IterableExtensions.<Type>filter(types, _function_1); 144 Iterable<TypeDeclaration> _filter_1 = Iterables.<TypeDeclaration>filter(IterableExtensions.<Type>filter(types, _function_1), TypeDeclaration.class);
117 for (final Type t1 : _filter_1) { 145 for (final TypeDeclaration t1 : _filter_1) {
118 { 146 {
119 for (final Type t2 : types) { 147 for (final Type t2 : types) {
120 if ((Objects.equal(t1, t2) || this.support.dfsSupertypeCheck(t1, t2))) { 148 if ((Objects.equal(t1, t2) || this.support.dfsSupertypeCheck(t1, t2))) {
@@ -147,8 +175,8 @@ public class Logic2VampireLanguageMapper_TypeMapper {
147 final Procedure1<VLSEquivalent> _function_4 = (VLSEquivalent it_2) -> { 175 final Procedure1<VLSEquivalent> _function_4 = (VLSEquivalent it_2) -> {
148 it_2.setLeft(this.support.topLevelTypeFunc()); 176 it_2.setLeft(this.support.topLevelTypeFunc());
149 Collection<VLSTerm> _values = trace.type2And.values(); 177 Collection<VLSTerm> _values = trace.type2And.values();
150 ArrayList<VLSTerm> _arrayList = new ArrayList<VLSTerm>(_values); 178 final ArrayList<VLSTerm> reversedList = new ArrayList<VLSTerm>(_values);
151 it_2.setRight(this.support.unfoldOr(_arrayList)); 179 it_2.setRight(this.support.unfoldOr(reversedList));
152 }; 180 };
153 VLSEquivalent _doubleArrow = ObjectExtensions.<VLSEquivalent>operator_doubleArrow(_createVLSEquivalent, _function_4); 181 VLSEquivalent _doubleArrow = ObjectExtensions.<VLSEquivalent>operator_doubleArrow(_createVLSEquivalent, _function_4);
154 it_1.setOperand(_doubleArrow); 182 it_1.setOperand(_doubleArrow);