diff options
Diffstat (limited to 'Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.java')
-rw-r--r-- | Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.java | 82 |
1 files changed, 63 insertions, 19 deletions
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 bf7b70d0..c2e4033b 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 | |||
@@ -14,7 +14,10 @@ import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm; | |||
14 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier; | 14 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSUniversalQuantifier; |
15 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSVariable; | 15 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSVariable; |
16 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory; | 16 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguageFactory; |
17 | import com.google.common.base.Objects; | ||
18 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; | ||
17 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; | 19 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; |
20 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition; | ||
18 | import hu.bme.mit.inf.dslreasoner.util.CollectionsUtil; | 21 | import hu.bme.mit.inf.dslreasoner.util.CollectionsUtil; |
19 | import java.util.ArrayList; | 22 | import java.util.ArrayList; |
20 | import java.util.HashMap; | 23 | import java.util.HashMap; |
@@ -26,6 +29,7 @@ import org.eclipse.xtext.xbase.lib.CollectionLiterals; | |||
26 | import org.eclipse.xtext.xbase.lib.Conversions; | 29 | import org.eclipse.xtext.xbase.lib.Conversions; |
27 | import org.eclipse.xtext.xbase.lib.Extension; | 30 | import org.eclipse.xtext.xbase.lib.Extension; |
28 | import org.eclipse.xtext.xbase.lib.Functions.Function1; | 31 | import org.eclipse.xtext.xbase.lib.Functions.Function1; |
32 | import org.eclipse.xtext.xbase.lib.IterableExtensions; | ||
29 | import org.eclipse.xtext.xbase.lib.ListExtensions; | 33 | import org.eclipse.xtext.xbase.lib.ListExtensions; |
30 | import org.eclipse.xtext.xbase.lib.ObjectExtensions; | 34 | import org.eclipse.xtext.xbase.lib.ObjectExtensions; |
31 | import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; | 35 | import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; |
@@ -80,33 +84,73 @@ public class Logic2VampireLanguageMapper_ScopeMapper { | |||
80 | } | 84 | } |
81 | int minNum = (-1); | 85 | int minNum = (-1); |
82 | Map<Type, Integer> startPoints = new HashMap<Type, Integer>(); | 86 | Map<Type, Integer> startPoints = new HashMap<Type, Integer>(); |
83 | Set<Type> _keySet = config.typeScopes.minNewElementsByType.keySet(); | 87 | final Function1<Type, Boolean> _function = (Type it) -> { |
84 | for (final Type tConfig : _keySet) { | 88 | boolean _equals = it.equals(trace.topLevelType); |
89 | return Boolean.valueOf((!_equals)); | ||
90 | }; | ||
91 | Iterable<Type> _filter = IterableExtensions.<Type>filter(config.typeScopes.minNewElementsByType.keySet(), _function); | ||
92 | for (final Type t : _filter) { | ||
85 | { | 93 | { |
86 | minNum = (CollectionsUtil.<Type, Integer>lookup(tConfig, config.typeScopes.minNewElementsByType)).intValue(); | 94 | int numIniIntModel = 0; |
95 | Set<DefinedElement> _keySet = trace.definedElement2String.keySet(); | ||
96 | for (final DefinedElement elem : _keySet) { | ||
97 | EList<TypeDefinition> _definedInType = elem.getDefinedInType(); | ||
98 | for (final TypeDefinition tDefined : _definedInType) { | ||
99 | boolean _dfsSubtypeCheck = this.support.dfsSubtypeCheck(t, tDefined); | ||
100 | if (_dfsSubtypeCheck) { | ||
101 | int _numIniIntModel = numIniIntModel; | ||
102 | numIniIntModel = (_numIniIntModel + 1); | ||
103 | } | ||
104 | } | ||
105 | } | ||
106 | Integer _lookup = CollectionsUtil.<Type, Integer>lookup(t, config.typeScopes.minNewElementsByType); | ||
107 | int _minus = ((_lookup).intValue() - numIniIntModel); | ||
108 | minNum = _minus; | ||
87 | if ((minNum != 0)) { | 109 | if ((minNum != 0)) { |
88 | this.getInstanceConstants((i_1 + minNum), i_1, localInstances, trace, true, false); | 110 | this.getInstanceConstants((i_1 + minNum), i_1, localInstances, trace, true, false); |
89 | startPoints.put(tConfig, Integer.valueOf(i_1)); | 111 | startPoints.put(t, Integer.valueOf(i_1)); |
90 | int _i = i_1; | 112 | int _i = i_1; |
91 | i_1 = (_i + minNum); | 113 | i_1 = (_i + minNum); |
92 | this.makeFofFormula(localInstances, trace, true, tConfig); | 114 | this.makeFofFormula(localInstances, trace, true, t); |
93 | } | 115 | } |
94 | } | 116 | } |
95 | } | 117 | } |
96 | Set<Type> _keySet_1 = config.typeScopes.maxNewElementsByType.keySet(); | 118 | final Function1<Type, Boolean> _function_1 = (Type it) -> { |
97 | for (final Type tConfig_1 : _keySet_1) { | 119 | boolean _equals = it.equals(trace.topLevelType); |
120 | return Boolean.valueOf((!_equals)); | ||
121 | }; | ||
122 | Iterable<Type> _filter_1 = IterableExtensions.<Type>filter(config.typeScopes.maxNewElementsByType.keySet(), _function_1); | ||
123 | for (final Type t_1 : _filter_1) { | ||
98 | { | 124 | { |
99 | Integer maxNum = CollectionsUtil.<Type, Integer>lookup(tConfig_1, config.typeScopes.maxNewElementsByType); | 125 | int numIniIntModel = 0; |
100 | minNum = (CollectionsUtil.<Type, Integer>lookup(tConfig_1, config.typeScopes.minNewElementsByType)).intValue(); | 126 | Set<DefinedElement> _keySet = trace.definedElement2String.keySet(); |
101 | Integer startpoint = CollectionsUtil.<Type, Integer>lookup(tConfig_1, startPoints); | 127 | for (final DefinedElement elem : _keySet) { |
128 | EList<TypeDefinition> _definedInType = elem.getDefinedInType(); | ||
129 | boolean _equals = Objects.equal(_definedInType, t_1); | ||
130 | if (_equals) { | ||
131 | int _numIniIntModel = numIniIntModel; | ||
132 | numIniIntModel = (_numIniIntModel + 1); | ||
133 | } | ||
134 | } | ||
135 | Integer _lookup = CollectionsUtil.<Type, Integer>lookup(t_1, config.typeScopes.maxNewElementsByType); | ||
136 | int maxNum = ((_lookup).intValue() - numIniIntModel); | ||
137 | boolean _contains = config.typeScopes.minNewElementsByType.keySet().contains(t_1); | ||
138 | if (_contains) { | ||
139 | Integer _lookup_1 = CollectionsUtil.<Type, Integer>lookup(t_1, config.typeScopes.minNewElementsByType); | ||
140 | int _minus = ((_lookup_1).intValue() - numIniIntModel); | ||
141 | minNum = _minus; | ||
142 | } else { | ||
143 | minNum = 0; | ||
144 | } | ||
102 | if ((minNum != 0)) { | 145 | if ((minNum != 0)) { |
146 | Integer startpoint = CollectionsUtil.<Type, Integer>lookup(t_1, startPoints); | ||
103 | this.getInstanceConstants(((startpoint).intValue() + minNum), (startpoint).intValue(), localInstances, trace, true, false); | 147 | this.getInstanceConstants(((startpoint).intValue() + minNum), (startpoint).intValue(), localInstances, trace, true, false); |
148 | } else { | ||
149 | localInstances.clear(); | ||
104 | } | 150 | } |
105 | if (((maxNum).intValue() != minNum)) { | 151 | int instEndInd = Math.min(GLOBAL_MAX, ((i_1 + maxNum) - minNum)); |
106 | int instEndInd = Math.min(GLOBAL_MAX, ((i_1 + (maxNum).intValue()) - minNum)); | 152 | this.getInstanceConstants(instEndInd, i_1, localInstances, trace, false, false); |
107 | this.getInstanceConstants(instEndInd, i_1, localInstances, trace, false, false); | 153 | this.makeFofFormula(localInstances, trace, false, t_1); |
108 | this.makeFofFormula(localInstances, trace, false, tConfig_1); | ||
109 | } | ||
110 | } | 154 | } |
111 | } | 155 | } |
112 | final boolean DUPLICATES = config.uniquenessDuplicates; | 156 | final boolean DUPLICATES = config.uniquenessDuplicates; |
@@ -118,12 +162,12 @@ public class Logic2VampireLanguageMapper_ScopeMapper { | |||
118 | { | 162 | { |
119 | final int x = ind; | 163 | final int x = ind; |
120 | VLSFofFormula _createVLSFofFormula = this.factory.createVLSFofFormula(); | 164 | VLSFofFormula _createVLSFofFormula = this.factory.createVLSFofFormula(); |
121 | final Procedure1<VLSFofFormula> _function = (VLSFofFormula it) -> { | 165 | final Procedure1<VLSFofFormula> _function_2 = (VLSFofFormula it) -> { |
122 | it.setName(this.support.toIDMultiple("t_uniqueness", e.getName())); | 166 | it.setName(this.support.toIDMultiple("t_uniqueness", e.getName())); |
123 | it.setFofRole("axiom"); | 167 | it.setFofRole("axiom"); |
124 | it.setFofFormula(this.support.establishUniqueness(trace.uniqueInstances, e)); | 168 | it.setFofFormula(this.support.establishUniqueness(trace.uniqueInstances, e)); |
125 | }; | 169 | }; |
126 | final VLSFofFormula uniqueness = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula, _function); | 170 | final VLSFofFormula uniqueness = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula, _function_2); |
127 | EList<VLSFofFormula> _formulas = trace.specification.getFormulas(); | 171 | EList<VLSFofFormula> _formulas = trace.specification.getFormulas(); |
128 | _formulas.add(uniqueness); | 172 | _formulas.add(uniqueness); |
129 | ind++; | 173 | ind++; |
@@ -135,12 +179,12 @@ public class Logic2VampireLanguageMapper_ScopeMapper { | |||
135 | { | 179 | { |
136 | final int x = ind; | 180 | final int x = ind; |
137 | VLSFofFormula _createVLSFofFormula = this.factory.createVLSFofFormula(); | 181 | VLSFofFormula _createVLSFofFormula = this.factory.createVLSFofFormula(); |
138 | final Procedure1<VLSFofFormula> _function = (VLSFofFormula it) -> { | 182 | final Procedure1<VLSFofFormula> _function_2 = (VLSFofFormula it) -> { |
139 | it.setName(this.support.toIDMultiple("t_uniqueness", e_1.getName())); | 183 | it.setName(this.support.toIDMultiple("t_uniqueness", e_1.getName())); |
140 | it.setFofRole("axiom"); | 184 | it.setFofRole("axiom"); |
141 | it.setFofFormula(this.support.establishUniqueness(trace.uniqueInstances.subList(x, numInst), e_1)); | 185 | it.setFofFormula(this.support.establishUniqueness(trace.uniqueInstances.subList(x, numInst), e_1)); |
142 | }; | 186 | }; |
143 | final VLSFofFormula uniqueness = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula, _function); | 187 | final VLSFofFormula uniqueness = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula, _function_2); |
144 | EList<VLSFofFormula> _formulas = trace.specification.getFormulas(); | 188 | EList<VLSFofFormula> _formulas = trace.specification.getFormulas(); |
145 | _formulas.add(uniqueness); | 189 | _formulas.add(uniqueness); |
146 | ind++; | 190 | ind++; |