aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.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_TypeMapper.java')
-rw-r--r--Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_TypeMapper.java99
1 files changed, 71 insertions, 28 deletions
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 b8d74f36..ec759ebf 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,8 +3,10 @@ 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;
6import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant; 7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConstant;
7import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSDoubleQuote; 8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSDoubleQuote;
9import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquality;
8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent; 10import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquivalent;
9import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula; 11import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula;
10import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction; 12import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunction;
@@ -18,7 +20,6 @@ import com.google.common.base.Objects;
18import com.google.common.collect.Iterables; 20import com.google.common.collect.Iterables;
19import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; 21import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement;
20import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; 22import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type;
21import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration;
22import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition; 23import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition;
23import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage; 24import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage;
24import hu.bme.mit.inf.dslreasoner.util.CollectionsUtil; 25import hu.bme.mit.inf.dslreasoner.util.CollectionsUtil;
@@ -56,6 +57,7 @@ public class Logic2VampireLanguageMapper_TypeMapper {
56 it.setName("A"); 57 it.setName("A");
57 }; 58 };
58 final VLSVariable variable = ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable, _function); 59 final VLSVariable variable = ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable, _function);
60 int globalCounter = 0;
59 for (final Type type : types) { 61 for (final Type type : types) {
60 { 62 {
61 VLSFunction _createVLSFunction = this.factory.createVLSFunction(); 63 VLSFunction _createVLSFunction = this.factory.createVLSFunction();
@@ -92,7 +94,31 @@ public class Logic2VampireLanguageMapper_TypeMapper {
92 }; 94 };
93 final VLSFunction enumElemPred = ObjectExtensions.<VLSFunction>operator_doubleArrow(_createVLSFunction, _function_1); 95 final VLSFunction enumElemPred = ObjectExtensions.<VLSFunction>operator_doubleArrow(_createVLSFunction, _function_1);
94 trace.element2Predicate.put(e, enumElemPred); 96 trace.element2Predicate.put(e, enumElemPred);
95 orElems.add(enumElemPred); 97 }
98 }
99 final List<VLSTerm> possibleNots = CollectionLiterals.<VLSTerm>newArrayList();
100 final List<VLSTerm> typeDefs = CollectionLiterals.<VLSTerm>newArrayList();
101 EList<DefinedElement> _elements_1 = type_1.getElements();
102 for (final DefinedElement t1 : _elements_1) {
103 {
104 EList<DefinedElement> _elements_2 = type_1.getElements();
105 for (final DefinedElement t2 : _elements_2) {
106 boolean _equals = Objects.equal(t1, t2);
107 if (_equals) {
108 final VLSFunction fct = this.support.duplicate(CollectionsUtil.<DefinedElement, VLSFunction>lookup(t2, trace.element2Predicate), variable);
109 possibleNots.add(fct);
110 } else {
111 final VLSFunction op = this.support.duplicate(CollectionsUtil.<DefinedElement, VLSFunction>lookup(t2, trace.element2Predicate), variable);
112 VLSUnaryNegation _createVLSUnaryNegation = this.factory.createVLSUnaryNegation();
113 final Procedure1<VLSUnaryNegation> _function_1 = (VLSUnaryNegation it) -> {
114 it.setOperand(op);
115 };
116 final VLSUnaryNegation negFct = ObjectExtensions.<VLSUnaryNegation>operator_doubleArrow(_createVLSUnaryNegation, _function_1);
117 possibleNots.add(negFct);
118 }
119 }
120 typeDefs.add(this.support.unfoldAnd(possibleNots));
121 possibleNots.clear();
96 } 122 }
97 } 123 }
98 VLSFofFormula _createVLSFofFormula = this.factory.createVLSFofFormula(); 124 VLSFofFormula _createVLSFofFormula = this.factory.createVLSFofFormula();
@@ -107,7 +133,13 @@ public class Logic2VampireLanguageMapper_TypeMapper {
107 VLSEquivalent _createVLSEquivalent = this.factory.createVLSEquivalent(); 133 VLSEquivalent _createVLSEquivalent = this.factory.createVLSEquivalent();
108 final Procedure1<VLSEquivalent> _function_3 = (VLSEquivalent it_2) -> { 134 final Procedure1<VLSEquivalent> _function_3 = (VLSEquivalent it_2) -> {
109 it_2.setLeft(CollectionsUtil.<TypeDefinition, VLSFunction>lookup(type_1, trace.type2Predicate)); 135 it_2.setLeft(CollectionsUtil.<TypeDefinition, VLSFunction>lookup(type_1, trace.type2Predicate));
110 it_2.setRight(this.support.unfoldOr(orElems)); 136 VLSAnd _createVLSAnd = this.factory.createVLSAnd();
137 final Procedure1<VLSAnd> _function_4 = (VLSAnd it_3) -> {
138 it_3.setLeft(this.support.topLevelTypeFunc(variable));
139 it_3.setRight(this.support.unfoldOr(typeDefs));
140 };
141 VLSAnd _doubleArrow = ObjectExtensions.<VLSAnd>operator_doubleArrow(_createVLSAnd, _function_4);
142 it_2.setRight(_doubleArrow);
111 }; 143 };
112 VLSEquivalent _doubleArrow = ObjectExtensions.<VLSEquivalent>operator_doubleArrow(_createVLSEquivalent, _function_3); 144 VLSEquivalent _doubleArrow = ObjectExtensions.<VLSEquivalent>operator_doubleArrow(_createVLSEquivalent, _function_3);
113 it_1.setOperand(_doubleArrow); 145 it_1.setOperand(_doubleArrow);
@@ -118,8 +150,7 @@ public class Logic2VampireLanguageMapper_TypeMapper {
118 final VLSFofFormula res = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula, _function_1); 150 final VLSFofFormula res = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula, _function_1);
119 EList<VLSFofFormula> _formulas = trace.specification.getFormulas(); 151 EList<VLSFofFormula> _formulas = trace.specification.getFormulas();
120 _formulas.add(res); 152 _formulas.add(res);
121 final List<VLSTerm> enumScopeElems = CollectionLiterals.<VLSTerm>newArrayList(); 153 for (int i = globalCounter; (i < (globalCounter + ((Object[])Conversions.unwrapArray(type_1.getElements(), Object.class)).length)); i++) {
122 for (int i = 0; (i < ((Object[])Conversions.unwrapArray(type_1.getElements(), Object.class)).length); i++) {
123 { 154 {
124 final int num = (i + 1); 155 final int num = (i + 1);
125 VLSFunctionAsTerm _createVLSFunctionAsTerm = this.factory.createVLSFunctionAsTerm(); 156 VLSFunctionAsTerm _createVLSFunctionAsTerm = this.factory.createVLSFunctionAsTerm();
@@ -129,38 +160,50 @@ public class Logic2VampireLanguageMapper_TypeMapper {
129 final VLSFunctionAsTerm cstTerm = ObjectExtensions.<VLSFunctionAsTerm>operator_doubleArrow(_createVLSFunctionAsTerm, _function_2); 160 final VLSFunctionAsTerm cstTerm = ObjectExtensions.<VLSFunctionAsTerm>operator_doubleArrow(_createVLSFunctionAsTerm, _function_2);
130 final VLSConstant cst = this.support.toConstant(cstTerm); 161 final VLSConstant cst = this.support.toConstant(cstTerm);
131 trace.uniqueInstances.add(cst); 162 trace.uniqueInstances.add(cst);
132 final VLSFunction fct = this.support.duplicate(CollectionsUtil.<DefinedElement, VLSFunction>lookup(type_1.getElements().get(i), trace.element2Predicate), cstTerm); 163 final int index = i;
133 enumScopeElems.add(fct); 164 VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula();
134 for (int j = 0; (j < ((Object[])Conversions.unwrapArray(type_1.getElements(), Object.class)).length); j++) { 165 final Procedure1<VLSFofFormula> _function_3 = (VLSFofFormula it) -> {
135 if ((j != i)) { 166 it.setName(this.support.toIDMultiple("enumScope", type_1.getName().split(" ")[0],
136 final VLSFunction op = this.support.duplicate(CollectionsUtil.<DefinedElement, VLSFunction>lookup(type_1.getElements().get(j), trace.element2Predicate), cstTerm); 167 type_1.getElements().get(index).getName().split(" ")[0]));
137 VLSUnaryNegation _createVLSUnaryNegation = this.factory.createVLSUnaryNegation(); 168 it.setFofRole("axiom");
138 final Procedure1<VLSUnaryNegation> _function_3 = (VLSUnaryNegation it) -> { 169 VLSUniversalQuantifier _createVLSUniversalQuantifier = this.factory.createVLSUniversalQuantifier();
139 it.setOperand(op); 170 final Procedure1<VLSUniversalQuantifier> _function_4 = (VLSUniversalQuantifier it_1) -> {
171 EList<VLSVariable> _variables = it_1.getVariables();
172 VLSVariable _duplicate = this.support.duplicate(variable);
173 _variables.add(_duplicate);
174 VLSEquivalent _createVLSEquivalent = this.factory.createVLSEquivalent();
175 final Procedure1<VLSEquivalent> _function_5 = (VLSEquivalent it_2) -> {
176 VLSEquality _createVLSEquality = this.factory.createVLSEquality();
177 final Procedure1<VLSEquality> _function_6 = (VLSEquality it_3) -> {
178 it_3.setLeft(this.support.duplicate(variable));
179 it_3.setRight(this.support.duplicate(this.support.toConstant(cstTerm)));
180 };
181 VLSEquality _doubleArrow = ObjectExtensions.<VLSEquality>operator_doubleArrow(_createVLSEquality, _function_6);
182 it_2.setLeft(_doubleArrow);
183 it_2.setRight(this.support.duplicate(CollectionsUtil.<DefinedElement, VLSFunction>lookup(type_1.getElements().get(index), trace.element2Predicate), variable));
140 }; 184 };
141 final VLSUnaryNegation negFct = ObjectExtensions.<VLSUnaryNegation>operator_doubleArrow(_createVLSUnaryNegation, _function_3); 185 VLSEquivalent _doubleArrow = ObjectExtensions.<VLSEquivalent>operator_doubleArrow(_createVLSEquivalent, _function_5);
142 enumScopeElems.add(negFct); 186 it_1.setOperand(_doubleArrow);
143 } 187 };
144 } 188 VLSUniversalQuantifier _doubleArrow = ObjectExtensions.<VLSUniversalQuantifier>operator_doubleArrow(_createVLSUniversalQuantifier, _function_4);
189 it.setFofFormula(_doubleArrow);
190 };
191 final VLSFofFormula enumScope = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula_1, _function_3);
192 EList<VLSFofFormula> _formulas_1 = trace.specification.getFormulas();
193 _formulas_1.add(enumScope);
145 } 194 }
146 } 195 }
147 VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula(); 196 int _globalCounter = globalCounter;
148 final Procedure1<VLSFofFormula> _function_2 = (VLSFofFormula it) -> { 197 int _size = type_1.getElements().size();
149 it.setName(this.support.toIDMultiple("enumScope", type_1.getName().split(" ")[0])); 198 globalCounter = (_globalCounter + _size);
150 it.setFofRole("axiom");
151 it.setFofFormula(this.support.unfoldAnd(enumScopeElems));
152 };
153 final VLSFofFormula enumScope = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula_1, _function_2);
154 EList<VLSFofFormula> _formulas_1 = trace.specification.getFormulas();
155 _formulas_1.add(enumScope);
156 } 199 }
157 } 200 }
158 final Function1<Type, Boolean> _function_1 = (Type it) -> { 201 final Function1<Type, Boolean> _function_1 = (Type it) -> {
159 boolean _isIsAbstract = it.isIsAbstract(); 202 boolean _isIsAbstract = it.isIsAbstract();
160 return Boolean.valueOf((!_isIsAbstract)); 203 return Boolean.valueOf((!_isIsAbstract));
161 }; 204 };
162 Iterable<TypeDeclaration> _filter_1 = Iterables.<TypeDeclaration>filter(IterableExtensions.<Type>filter(types, _function_1), TypeDeclaration.class); 205 Iterable<Type> _filter_1 = IterableExtensions.<Type>filter(types, _function_1);
163 for (final TypeDeclaration t1 : _filter_1) { 206 for (final Type t1 : _filter_1) {
164 { 207 {
165 for (final Type t2 : types) { 208 for (final Type t2 : types) {
166 if ((Objects.equal(t1, t2) || this.support.dfsSupertypeCheck(t1, t2))) { 209 if ((Objects.equal(t1, t2) || this.support.dfsSupertypeCheck(t1, t2))) {