diff options
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.java | 57 |
1 files changed, 55 insertions, 2 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 7bc70e9d..4cdc7e6a 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 | |||
@@ -1,5 +1,6 @@ | |||
1 | package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder; | 1 | package ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder; |
2 | 2 | ||
3 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration; | ||
3 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper; | 4 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper; |
4 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapperTrace; | 5 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapperTrace; |
5 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper_Support; | 6 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.builder.Logic2VampireLanguageMapper_Support; |
@@ -16,6 +17,7 @@ import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier; | |||
16 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSVariable; | 17 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSVariable; |
17 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory; | 18 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory; |
18 | import com.google.common.base.Objects; | 19 | import com.google.common.base.Objects; |
20 | import com.google.common.collect.Iterables; | ||
19 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference; | 21 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference; |
20 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation; | 22 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation; |
21 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration; | 23 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration; |
@@ -52,7 +54,7 @@ public class Logic2VampireLanguageMapper_ContainmentMapper { | |||
52 | this.base = base; | 54 | this.base = base; |
53 | } | 55 | } |
54 | 56 | ||
55 | public void transformContainment(final List<ContainmentHierarchy> hierarchies, final Logic2VampireLanguageMapperTrace trace) { | 57 | public void transformContainment(final VampireSolverConfiguration config, final List<ContainmentHierarchy> hierarchies, final Logic2VampireLanguageMapperTrace trace) { |
56 | final ContainmentHierarchy hierarchy = hierarchies.get(0); | 58 | final ContainmentHierarchy hierarchy = hierarchies.get(0); |
57 | final EList<Type> containmentListCopy = hierarchy.getTypesOrderedInHierarchy(); | 59 | final EList<Type> containmentListCopy = hierarchy.getTypesOrderedInHierarchy(); |
58 | final EList<Relation> relationsList = hierarchy.getContainmentRelations(); | 60 | final EList<Relation> relationsList = hierarchy.getContainmentRelations(); |
@@ -135,7 +137,7 @@ public class Logic2VampireLanguageMapper_ContainmentMapper { | |||
135 | } | 137 | } |
136 | VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula(); | 138 | VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula(); |
137 | final Procedure1<VLSFofFormula> _function_4 = (VLSFofFormula it) -> { | 139 | final Procedure1<VLSFofFormula> _function_4 = (VLSFofFormula it) -> { |
138 | it.setName(this.support.toIDMultiple("noDupCont", rel.getConstant().toString())); | 140 | it.setName(this.support.toIDMultiple("containment_noDup", rel.getConstant().toString())); |
139 | it.setFofRole("axiom"); | 141 | it.setFofRole("axiom"); |
140 | VLSExistentialQuantifier _createVLSExistentialQuantifier = this.factory.createVLSExistentialQuantifier(); | 142 | VLSExistentialQuantifier _createVLSExistentialQuantifier = this.factory.createVLSExistentialQuantifier(); |
141 | final Procedure1<VLSExistentialQuantifier> _function_5 = (VLSExistentialQuantifier it_1) -> { | 143 | final Procedure1<VLSExistentialQuantifier> _function_5 = (VLSExistentialQuantifier it_1) -> { |
@@ -219,6 +221,57 @@ public class Logic2VampireLanguageMapper_ContainmentMapper { | |||
219 | _formulas_1.add(relFormula); | 221 | _formulas_1.add(relFormula); |
220 | } | 222 | } |
221 | } | 223 | } |
224 | final ArrayList<VLSVariable> variables = CollectionLiterals.<VLSVariable>newArrayList(); | ||
225 | final ArrayList<VLSFunction> disjunctionList = CollectionLiterals.<VLSFunction>newArrayList(); | ||
226 | final ArrayList<VLSTerm> conjunctionList = CollectionLiterals.<VLSTerm>newArrayList(); | ||
227 | for (int i = 1; (i <= config.contCycleLevel); i++) { | ||
228 | { | ||
229 | final int ind = i; | ||
230 | VLSVariable _createVLSVariable_3 = this.factory.createVLSVariable(); | ||
231 | final Procedure1<VLSVariable> _function_4 = (VLSVariable it) -> { | ||
232 | String _string = Integer.toString(ind); | ||
233 | String _plus = ("V" + _string); | ||
234 | it.setName(_plus); | ||
235 | }; | ||
236 | VLSVariable _doubleArrow = ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable_3, _function_4); | ||
237 | variables.add(_doubleArrow); | ||
238 | for (int j = 0; (j < i); j++) { | ||
239 | { | ||
240 | for (final Relation l_2 : relationsList) { | ||
241 | { | ||
242 | final VLSFunction rel = this.support.duplicate(CollectionsUtil.<RelationDeclaration, VLSFunction>lookup(((RelationDeclaration) l_2), trace.rel2Predicate), CollectionLiterals.<VLSVariable>newArrayList(variables.get(j), variables.get(((j + 1) % i)))); | ||
243 | disjunctionList.add(rel); | ||
244 | } | ||
245 | } | ||
246 | conjunctionList.add(this.support.unfoldOr(disjunctionList)); | ||
247 | disjunctionList.clear(); | ||
248 | } | ||
249 | } | ||
250 | VLSFofFormula _createVLSFofFormula_1 = this.factory.createVLSFofFormula(); | ||
251 | final Procedure1<VLSFofFormula> _function_5 = (VLSFofFormula it) -> { | ||
252 | it.setName(this.support.toIDMultiple("containment_noCycle", Integer.toString(ind))); | ||
253 | it.setFofRole("axiom"); | ||
254 | VLSUnaryNegation _createVLSUnaryNegation = this.factory.createVLSUnaryNegation(); | ||
255 | final Procedure1<VLSUnaryNegation> _function_6 = (VLSUnaryNegation it_1) -> { | ||
256 | VLSExistentialQuantifier _createVLSExistentialQuantifier = this.factory.createVLSExistentialQuantifier(); | ||
257 | final Procedure1<VLSExistentialQuantifier> _function_7 = (VLSExistentialQuantifier it_2) -> { | ||
258 | EList<VLSVariable> _variables = it_2.getVariables(); | ||
259 | List<VLSVariable> _duplicate = this.support.duplicate(variables); | ||
260 | Iterables.<VLSVariable>addAll(_variables, _duplicate); | ||
261 | it_2.setOperand(this.support.unfoldAnd(conjunctionList)); | ||
262 | }; | ||
263 | VLSExistentialQuantifier _doubleArrow_1 = ObjectExtensions.<VLSExistentialQuantifier>operator_doubleArrow(_createVLSExistentialQuantifier, _function_7); | ||
264 | it_1.setOperand(_doubleArrow_1); | ||
265 | }; | ||
266 | VLSUnaryNegation _doubleArrow_1 = ObjectExtensions.<VLSUnaryNegation>operator_doubleArrow(_createVLSUnaryNegation, _function_6); | ||
267 | it.setFofFormula(_doubleArrow_1); | ||
268 | }; | ||
269 | final VLSFofFormula contCycleForm = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula_1, _function_5); | ||
270 | EList<VLSFofFormula> _formulas_1 = trace.specification.getFormulas(); | ||
271 | _formulas_1.add(contCycleForm); | ||
272 | conjunctionList.clear(); | ||
273 | } | ||
274 | } | ||
222 | } | 275 | } |
223 | 276 | ||
224 | protected VLSTerm makeUnique(final List<VLSFunction> list) { | 277 | protected VLSTerm makeUnique(final List<VLSFunction> list) { |