aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/Logic2VampireLanguageMapper_ScopeMapper.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_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.java78
1 files changed, 44 insertions, 34 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 1950cad0..d2a6bff2 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
@@ -3,6 +3,7 @@ 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.VLSEquality; 8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSEquality;
8import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula; 9import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula;
@@ -48,16 +49,19 @@ public class Logic2VampireLanguageMapper_ScopeMapper {
48 public void _transformScope(final LogicSolverConfiguration config, final Logic2VampireLanguageMapperTrace trace) { 49 public void _transformScope(final LogicSolverConfiguration config, final Logic2VampireLanguageMapperTrace trace) {
49 final int GLOBAL_MIN = config.typeScopes.minNewElements; 50 final int GLOBAL_MIN = config.typeScopes.minNewElements;
50 final int GLOBAL_MAX = config.typeScopes.maxNewElements; 51 final int GLOBAL_MAX = config.typeScopes.maxNewElements;
51 final ArrayList<Object> localInstances = CollectionLiterals.<Object>newArrayList(); 52 final ArrayList<VLSConstant> localInstances = CollectionLiterals.<VLSConstant>newArrayList();
52 if ((GLOBAL_MIN != 0)) { 53 if ((GLOBAL_MIN != 0)) {
53 this.getInstanceConstants(GLOBAL_MIN, 0, localInstances, trace, true, false); 54 this.getInstanceConstants(GLOBAL_MIN, 0, localInstances, trace, true, false);
55 for (final VLSConstant i : trace.uniqueInstances) {
56 localInstances.add(this.support.duplicate(i));
57 }
54 this.makeFofFormula(localInstances, trace, true, null); 58 this.makeFofFormula(localInstances, trace, true, null);
55 } 59 }
56 if ((GLOBAL_MAX != 0)) { 60 if ((GLOBAL_MAX != 0)) {
57 this.getInstanceConstants(GLOBAL_MAX, 0, localInstances, trace, true, true); 61 this.getInstanceConstants(GLOBAL_MAX, 0, localInstances, trace, true, true);
58 this.makeFofFormula(localInstances, trace, false, null); 62 this.makeFofFormula(((ArrayList) trace.uniqueInstances), trace, false, null);
59 } 63 }
60 int i = 0; 64 int i_1 = 1;
61 int minNum = (-1); 65 int minNum = (-1);
62 Map<Type, Integer> startPoints = new HashMap<Type, Integer>(); 66 Map<Type, Integer> startPoints = new HashMap<Type, Integer>();
63 Set<Type> _keySet = config.typeScopes.minNewElementsByType.keySet(); 67 Set<Type> _keySet = config.typeScopes.minNewElementsByType.keySet();
@@ -65,10 +69,10 @@ public class Logic2VampireLanguageMapper_ScopeMapper {
65 { 69 {
66 minNum = (CollectionsUtil.<Type, Integer>lookup(t, config.typeScopes.minNewElementsByType)).intValue(); 70 minNum = (CollectionsUtil.<Type, Integer>lookup(t, config.typeScopes.minNewElementsByType)).intValue();
67 if ((minNum != 0)) { 71 if ((minNum != 0)) {
68 this.getInstanceConstants((i + minNum), i, localInstances, trace, true, false); 72 this.getInstanceConstants((i_1 + minNum), i_1, localInstances, trace, true, false);
69 startPoints.put(t, Integer.valueOf(i)); 73 startPoints.put(t, Integer.valueOf(i_1));
70 int _i = i; 74 int _i = i_1;
71 i = (_i + minNum); 75 i_1 = (_i + minNum);
72 this.makeFofFormula(localInstances, trace, true, t); 76 this.makeFofFormula(localInstances, trace, true, t);
73 } 77 }
74 } 78 }
@@ -83,8 +87,8 @@ public class Logic2VampireLanguageMapper_ScopeMapper {
83 this.getInstanceConstants(((startpoint).intValue() + minNum), (startpoint).intValue(), localInstances, trace, true, false); 87 this.getInstanceConstants(((startpoint).intValue() + minNum), (startpoint).intValue(), localInstances, trace, true, false);
84 } 88 }
85 if (((maxNum).intValue() != minNum)) { 89 if (((maxNum).intValue() != minNum)) {
86 int instEndInd = Math.min(GLOBAL_MAX, ((i + (maxNum).intValue()) - minNum)); 90 int instEndInd = Math.min(GLOBAL_MAX, ((i_1 + (maxNum).intValue()) - minNum));
87 this.getInstanceConstants(instEndInd, i, localInstances, trace, false, false); 91 this.getInstanceConstants(instEndInd, i_1, localInstances, trace, false, false);
88 this.makeFofFormula(localInstances, trace, false, t_1); 92 this.makeFofFormula(localInstances, trace, false, t_1);
89 } 93 }
90 } 94 }
@@ -126,18 +130,24 @@ public class Logic2VampireLanguageMapper_ScopeMapper {
126 130
127 protected void makeFofFormula(final ArrayList list, final Logic2VampireLanguageMapperTrace trace, final boolean minimum, final Type type) { 131 protected void makeFofFormula(final ArrayList list, final Logic2VampireLanguageMapperTrace trace, final boolean minimum, final Type type) {
128 String nm = ""; 132 String nm = "";
129 VLSFunction tm = null; 133 VLSTerm tm = null;
130 if ((type == null)) { 134 if ((type == null)) {
131 nm = "object"; 135 nm = "object";
132 tm = this.support.topLevelTypeFunc(); 136 tm = this.support.topLevelTypeFunc();
133 } else { 137 } else {
134 nm = CollectionsUtil.<Type, VLSFunction>lookup(type, trace.type2Predicate).getConstant().toString(); 138 nm = CollectionsUtil.<Type, VLSFunction>lookup(type, trace.type2Predicate).getConstant().toString();
135 tm = this.support.duplicate(CollectionsUtil.<Type, VLSFunction>lookup(type, trace.type2Predicate)); 139 VLSAnd _createVLSAnd = this.factory.createVLSAnd();
140 final Procedure1<VLSAnd> _function = (VLSAnd it) -> {
141 it.setLeft(this.support.duplicate(CollectionsUtil.<Type, VLSFunction>lookup(type, trace.type2Predicate)));
142 it.setRight(this.support.topLevelTypeFunc());
143 };
144 VLSAnd _doubleArrow = ObjectExtensions.<VLSAnd>operator_doubleArrow(_createVLSAnd, _function);
145 tm = _doubleArrow;
136 } 146 }
137 final String name = nm; 147 final String name = nm;
138 final VLSFunction term = tm; 148 final VLSTerm term = tm;
139 VLSFofFormula _createVLSFofFormula = this.factory.createVLSFofFormula(); 149 VLSFofFormula _createVLSFofFormula = this.factory.createVLSFofFormula();
140 final Procedure1<VLSFofFormula> _function = (VLSFofFormula it) -> { 150 final Procedure1<VLSFofFormula> _function_1 = (VLSFofFormula it) -> {
141 String _xifexpression = null; 151 String _xifexpression = null;
142 if (minimum) { 152 if (minimum) {
143 _xifexpression = "min"; 153 _xifexpression = "min";
@@ -147,53 +157,53 @@ public class Logic2VampireLanguageMapper_ScopeMapper {
147 it.setName(this.support.toIDMultiple("typeScope", _xifexpression, name)); 157 it.setName(this.support.toIDMultiple("typeScope", _xifexpression, name));
148 it.setFofRole("axiom"); 158 it.setFofRole("axiom");
149 VLSUniversalQuantifier _createVLSUniversalQuantifier = this.factory.createVLSUniversalQuantifier(); 159 VLSUniversalQuantifier _createVLSUniversalQuantifier = this.factory.createVLSUniversalQuantifier();
150 final Procedure1<VLSUniversalQuantifier> _function_1 = (VLSUniversalQuantifier it_1) -> { 160 final Procedure1<VLSUniversalQuantifier> _function_2 = (VLSUniversalQuantifier it_1) -> {
151 EList<VLSVariable> _variables = it_1.getVariables(); 161 EList<VLSVariable> _variables = it_1.getVariables();
152 VLSVariable _duplicate = this.support.duplicate(this.variable); 162 VLSVariable _duplicate = this.support.duplicate(this.variable);
153 _variables.add(_duplicate); 163 _variables.add(_duplicate);
154 VLSImplies _createVLSImplies = this.factory.createVLSImplies(); 164 VLSImplies _createVLSImplies = this.factory.createVLSImplies();
155 final Procedure1<VLSImplies> _function_2 = (VLSImplies it_2) -> { 165 final Procedure1<VLSImplies> _function_3 = (VLSImplies it_2) -> {
156 if (minimum) { 166 if (minimum) {
157 final Function1<VLSTerm, VLSEquality> _function_3 = (VLSTerm i) -> { 167 final Function1<VLSTerm, VLSEquality> _function_4 = (VLSTerm i) -> {
158 VLSEquality _createVLSEquality = this.factory.createVLSEquality(); 168 VLSEquality _createVLSEquality = this.factory.createVLSEquality();
159 final Procedure1<VLSEquality> _function_4 = (VLSEquality it_3) -> { 169 final Procedure1<VLSEquality> _function_5 = (VLSEquality it_3) -> {
160 VLSVariable _createVLSVariable = this.factory.createVLSVariable(); 170 VLSVariable _createVLSVariable = this.factory.createVLSVariable();
161 final Procedure1<VLSVariable> _function_5 = (VLSVariable it_4) -> { 171 final Procedure1<VLSVariable> _function_6 = (VLSVariable it_4) -> {
162 it_4.setName(this.variable.getName()); 172 it_4.setName(this.variable.getName());
163 }; 173 };
164 VLSVariable _doubleArrow = ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable, _function_5); 174 VLSVariable _doubleArrow_1 = ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable, _function_6);
165 it_3.setLeft(_doubleArrow); 175 it_3.setLeft(_doubleArrow_1);
166 it_3.setRight(i); 176 it_3.setRight(i);
167 }; 177 };
168 return ObjectExtensions.<VLSEquality>operator_doubleArrow(_createVLSEquality, _function_4); 178 return ObjectExtensions.<VLSEquality>operator_doubleArrow(_createVLSEquality, _function_5);
169 }; 179 };
170 it_2.setLeft(this.support.unfoldOr(ListExtensions.<VLSTerm, VLSEquality>map(list, _function_3))); 180 it_2.setLeft(this.support.unfoldOr(ListExtensions.<VLSTerm, VLSEquality>map(list, _function_4)));
171 it_2.setRight(term); 181 it_2.setRight(term);
172 } else { 182 } else {
173 it_2.setLeft(term); 183 it_2.setLeft(term);
174 final Function1<VLSTerm, VLSEquality> _function_4 = (VLSTerm i) -> { 184 final Function1<VLSTerm, VLSEquality> _function_5 = (VLSTerm i) -> {
175 VLSEquality _createVLSEquality = this.factory.createVLSEquality(); 185 VLSEquality _createVLSEquality = this.factory.createVLSEquality();
176 final Procedure1<VLSEquality> _function_5 = (VLSEquality it_3) -> { 186 final Procedure1<VLSEquality> _function_6 = (VLSEquality it_3) -> {
177 VLSVariable _createVLSVariable = this.factory.createVLSVariable(); 187 VLSVariable _createVLSVariable = this.factory.createVLSVariable();
178 final Procedure1<VLSVariable> _function_6 = (VLSVariable it_4) -> { 188 final Procedure1<VLSVariable> _function_7 = (VLSVariable it_4) -> {
179 it_4.setName(this.variable.getName()); 189 it_4.setName(this.variable.getName());
180 }; 190 };
181 VLSVariable _doubleArrow = ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable, _function_6); 191 VLSVariable _doubleArrow_1 = ObjectExtensions.<VLSVariable>operator_doubleArrow(_createVLSVariable, _function_7);
182 it_3.setLeft(_doubleArrow); 192 it_3.setLeft(_doubleArrow_1);
183 it_3.setRight(i); 193 it_3.setRight(i);
184 }; 194 };
185 return ObjectExtensions.<VLSEquality>operator_doubleArrow(_createVLSEquality, _function_5); 195 return ObjectExtensions.<VLSEquality>operator_doubleArrow(_createVLSEquality, _function_6);
186 }; 196 };
187 it_2.setRight(this.support.unfoldOr(ListExtensions.<VLSTerm, VLSEquality>map(list, _function_4))); 197 it_2.setRight(this.support.unfoldOr(ListExtensions.<VLSTerm, VLSEquality>map(list, _function_5)));
188 } 198 }
189 }; 199 };
190 VLSImplies _doubleArrow = ObjectExtensions.<VLSImplies>operator_doubleArrow(_createVLSImplies, _function_2); 200 VLSImplies _doubleArrow_1 = ObjectExtensions.<VLSImplies>operator_doubleArrow(_createVLSImplies, _function_3);
191 it_1.setOperand(_doubleArrow); 201 it_1.setOperand(_doubleArrow_1);
192 }; 202 };
193 VLSUniversalQuantifier _doubleArrow = ObjectExtensions.<VLSUniversalQuantifier>operator_doubleArrow(_createVLSUniversalQuantifier, _function_1); 203 VLSUniversalQuantifier _doubleArrow_1 = ObjectExtensions.<VLSUniversalQuantifier>operator_doubleArrow(_createVLSUniversalQuantifier, _function_2);
194 it.setFofFormula(_doubleArrow); 204 it.setFofFormula(_doubleArrow_1);
195 }; 205 };
196 final VLSFofFormula cstDec = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula, _function); 206 final VLSFofFormula cstDec = ObjectExtensions.<VLSFofFormula>operator_doubleArrow(_createVLSFofFormula, _function_1);
197 EList<VLSFofFormula> _formulas = trace.specification.getFormulas(); 207 EList<VLSFofFormula> _formulas = trace.specification.getFormulas();
198 _formulas.add(cstDec); 208 _formulas.add(cstDec);
199 } 209 }