aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.java
diff options
context:
space:
mode:
Diffstat (limited to 'Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.java')
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ContainmentMapper.java31
1 files changed, 19 insertions, 12 deletions
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 855d7637..07677b7a 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
@@ -25,6 +25,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration;
25import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; 25import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type;
26import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition; 26import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition;
27import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference; 27import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference;
28import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.TypeDefinitionImpl;
28import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.ContainmentHierarchy; 29import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.ContainmentHierarchy;
29import hu.bme.mit.inf.dslreasoner.util.CollectionsUtil; 30import hu.bme.mit.inf.dslreasoner.util.CollectionsUtil;
30import java.util.ArrayList; 31import java.util.ArrayList;
@@ -36,7 +37,6 @@ import org.eclipse.emf.common.util.EList;
36import org.eclipse.xtext.xbase.lib.CollectionLiterals; 37import org.eclipse.xtext.xbase.lib.CollectionLiterals;
37import org.eclipse.xtext.xbase.lib.Conversions; 38import org.eclipse.xtext.xbase.lib.Conversions;
38import org.eclipse.xtext.xbase.lib.Extension; 39import org.eclipse.xtext.xbase.lib.Extension;
39import org.eclipse.xtext.xbase.lib.InputOutput;
40import org.eclipse.xtext.xbase.lib.ObjectExtensions; 40import org.eclipse.xtext.xbase.lib.ObjectExtensions;
41import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; 41import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
42 42
@@ -91,10 +91,17 @@ public class Logic2VampireLanguageMapper_ContainmentMapper {
91 final VLSFunction topTerm = this.support.duplicate(CollectionsUtil.<Type, VLSFunction>lookup(topTermVar, trace.type2Predicate)); 91 final VLSFunction topTerm = this.support.duplicate(CollectionsUtil.<Type, VLSFunction>lookup(topTermVar, trace.type2Predicate));
92 boolean topLvlIsInInitModel = false; 92 boolean topLvlIsInInitModel = false;
93 String topLvlString = ""; 93 String topLvlString = "";
94 EList<Type> _subtypes = topTermVar.getSubtypes(); 94 ArrayList<Type> listToCheck = CollectionLiterals.<Type>newArrayList(topTermVar);
95 for (final Type c : _subtypes) { 95 listToCheck.addAll(topTermVar.getSubtypes());
96 boolean _equals = c.getClass().getSimpleName().equals("TypeDefinitionImpl"); 96 for (final Type c : listToCheck) {
97 Class<? extends Type> _class = c.getClass();
98 boolean _equals = Objects.equal(_class, TypeDefinitionImpl.class);
97 if (_equals) { 99 if (_equals) {
100 int _length = ((Object[])Conversions.unwrapArray(((TypeDefinition) c).getElements(), Object.class)).length;
101 boolean _greaterThan = (_length > 1);
102 if (_greaterThan) {
103 throw new IllegalArgumentException("You cannot have multiple top-level elements in your initial model");
104 }
98 EList<DefinedElement> _elements = ((TypeDefinition) c).getElements(); 105 EList<DefinedElement> _elements = ((TypeDefinition) c).getElements();
99 for (final DefinedElement d : _elements) { 106 for (final DefinedElement d : _elements) {
100 boolean _containsKey = trace.definedElement2String.containsKey(d); 107 boolean _containsKey = trace.definedElement2String.containsKey(d);
@@ -105,10 +112,9 @@ public class Logic2VampireLanguageMapper_ContainmentMapper {
105 } 112 }
106 } 113 }
107 } 114 }
115 trace.topLvlElementIsInInitialModel = Boolean.valueOf(topLvlIsInInitModel);
108 final boolean topInIM = topLvlIsInInitModel; 116 final boolean topInIM = topLvlIsInInitModel;
109 final String topStr = topLvlString; 117 final String topStr = topLvlString;
110 InputOutput.<Boolean>print(Boolean.valueOf(topInIM));
111 InputOutput.<String>print(topStr);
112 VLSFofFormula _createVLSFofFormula = this.factory.createVLSFofFormula(); 118 VLSFofFormula _createVLSFofFormula = this.factory.createVLSFofFormula();
113 final Procedure1<VLSFofFormula> _function = (VLSFofFormula it) -> { 119 final Procedure1<VLSFofFormula> _function = (VLSFofFormula it) -> {
114 it.setName(this.support.toIDMultiple("containment_topLevel", topName)); 120 it.setName(this.support.toIDMultiple("containment_topLevel", topName));
@@ -174,8 +180,8 @@ public class Logic2VampireLanguageMapper_ContainmentMapper {
174 final Type toType = ((Type) _referred); 180 final Type toType = ((Type) _referred);
175 final VLSFunction toFunc = CollectionsUtil.<Type, VLSFunction>lookup(toType, trace.type2Predicate); 181 final VLSFunction toFunc = CollectionsUtil.<Type, VLSFunction>lookup(toType, trace.type2Predicate);
176 this.addToMap(type2cont, toFunc, rel); 182 this.addToMap(type2cont, toFunc, rel);
177 EList<Type> _subtypes_1 = toType.getSubtypes(); 183 EList<Type> _subtypes = toType.getSubtypes();
178 for (final Type c_1 : _subtypes_1) { 184 for (final Type c_1 : _subtypes) {
179 this.addToMap(type2cont, toFunc, rel); 185 this.addToMap(type2cont, toFunc, rel);
180 } 186 }
181 VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula(); 187 VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula();
@@ -242,9 +248,9 @@ public class Logic2VampireLanguageMapper_ContainmentMapper {
242 EList<VLSVariable> _variables_1 = it_3.getVariables(); 248 EList<VLSVariable> _variables_1 = it_3.getVariables();
243 VLSVariable _duplicate_1 = this.support.duplicate(varB); 249 VLSVariable _duplicate_1 = this.support.duplicate(varB);
244 _variables_1.add(_duplicate_1); 250 _variables_1.add(_duplicate_1);
245 int _length = ((Object[])Conversions.unwrapArray(e.getValue(), Object.class)).length; 251 int _length_1 = ((Object[])Conversions.unwrapArray(e.getValue(), Object.class)).length;
246 boolean _greaterThan = (_length > 1); 252 boolean _greaterThan_1 = (_length_1 > 1);
247 if (_greaterThan) { 253 if (_greaterThan_1) {
248 it_3.setOperand(this.makeUnique(e.getValue())); 254 it_3.setOperand(this.makeUnique(e.getValue()));
249 } else { 255 } else {
250 it_3.setOperand(e.getValue().get(0)); 256 it_3.setOperand(e.getValue().get(0));
@@ -282,7 +288,8 @@ public class Logic2VampireLanguageMapper_ContainmentMapper {
282 { 288 {
283 for (final Relation l_3 : relationsList) { 289 for (final Relation l_3 : relationsList) {
284 { 290 {
285 final VLSFunction rel = this.support.duplicate(CollectionsUtil.<RelationDeclaration, VLSFunction>lookup(((RelationDeclaration) l_3), trace.rel2Predicate), CollectionLiterals.<VLSVariable>newArrayList(variables.get(j), variables.get(((j + 1) % i)))); 291 final VLSFunction rel = this.support.duplicate(CollectionsUtil.<RelationDeclaration, VLSFunction>lookup(((RelationDeclaration) l_3), trace.rel2Predicate),
292 CollectionLiterals.<VLSVariable>newArrayList(variables.get(j), variables.get(((j + 1) % i))));
286 disjunctionList.add(rel); 293 disjunctionList.add(rel);
287 } 294 }
288 } 295 }