1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Mathias Preiner, Aina Niemetz |
4 |
|
* |
5 |
|
* This file is part of the cvc5 project. |
6 |
|
* |
7 |
|
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS |
8 |
|
* in the top-level source directory and their institutional affiliations. |
9 |
|
* All rights reserved. See the file COPYING in the top-level source |
10 |
|
* directory for licensing information. |
11 |
|
* **************************************************************************** |
12 |
|
* |
13 |
|
* Option template for option modules. |
14 |
|
* |
15 |
|
* For each <module>_options.toml configuration file, mkoptions.py |
16 |
|
* expands this template and generates a <module>_options.cpp file. |
17 |
|
*/ |
18 |
|
#include "options/arith_options.h" |
19 |
|
|
20 |
|
#include <iostream> |
21 |
|
|
22 |
|
#include "base/check.h" |
23 |
|
#include "options/option_exception.h" |
24 |
|
|
25 |
|
namespace cvc5::options { |
26 |
|
|
27 |
|
// clang-format off |
28 |
|
std::ostream& operator<<(std::ostream& os, ArithPropagationMode mode) |
29 |
|
{ |
30 |
|
switch(mode) |
31 |
|
{ |
32 |
|
case ArithPropagationMode::NO_PROP: return os << "ArithPropagationMode::NO_PROP"; |
33 |
|
case ArithPropagationMode::BOTH_PROP: return os << "ArithPropagationMode::BOTH_PROP"; |
34 |
|
case ArithPropagationMode::UNATE_PROP: return os << "ArithPropagationMode::UNATE_PROP"; |
35 |
|
case ArithPropagationMode::BOUND_INFERENCE_PROP: return os << "ArithPropagationMode::BOUND_INFERENCE_PROP"; |
36 |
|
default: Unreachable(); |
37 |
|
} |
38 |
|
return os; |
39 |
|
} |
40 |
|
ArithPropagationMode stringToArithPropagationMode(const std::string& optarg) |
41 |
|
{ |
42 |
|
if (optarg == "none") return ArithPropagationMode::NO_PROP; |
43 |
|
else if (optarg == "both") return ArithPropagationMode::BOTH_PROP; |
44 |
|
else if (optarg == "unate") return ArithPropagationMode::UNATE_PROP; |
45 |
|
else if (optarg == "bi") return ArithPropagationMode::BOUND_INFERENCE_PROP; |
46 |
|
else if (optarg == "help") |
47 |
|
{ |
48 |
|
std::cerr << R"FOOBAR( |
49 |
|
This decides on kind of propagation arithmetic attempts to do during the |
50 |
|
search. |
51 |
|
Available modes for --arith-prop are: |
52 |
|
+ both (default) |
53 |
|
Use bounds inference and unate. |
54 |
|
+ unate |
55 |
|
Use constraints to do unate propagation. |
56 |
|
+ bi |
57 |
|
(Bounds Inference) infers bounds on basic variables using the upper and lower |
58 |
|
bounds of the non-basic variables in the tableau. |
59 |
|
)FOOBAR"; |
60 |
|
std::exit(1); |
61 |
|
} |
62 |
|
throw OptionException(std::string("unknown option for --arith-prop: `") + |
63 |
|
optarg + "'. Try --arith-prop=help."); |
64 |
|
} |
65 |
|
std::ostream& operator<<(std::ostream& os, ErrorSelectionRule mode) |
66 |
|
{ |
67 |
|
switch(mode) |
68 |
|
{ |
69 |
|
case ErrorSelectionRule::MAXIMUM_AMOUNT: return os << "ErrorSelectionRule::MAXIMUM_AMOUNT"; |
70 |
|
case ErrorSelectionRule::SUM_METRIC: return os << "ErrorSelectionRule::SUM_METRIC"; |
71 |
|
case ErrorSelectionRule::VAR_ORDER: return os << "ErrorSelectionRule::VAR_ORDER"; |
72 |
|
case ErrorSelectionRule::MINIMUM_AMOUNT: return os << "ErrorSelectionRule::MINIMUM_AMOUNT"; |
73 |
|
default: Unreachable(); |
74 |
|
} |
75 |
|
return os; |
76 |
|
} |
77 |
|
ErrorSelectionRule stringToErrorSelectionRule(const std::string& optarg) |
78 |
|
{ |
79 |
|
if (optarg == "max") return ErrorSelectionRule::MAXIMUM_AMOUNT; |
80 |
|
else if (optarg == "sum") return ErrorSelectionRule::SUM_METRIC; |
81 |
|
else if (optarg == "varord") return ErrorSelectionRule::VAR_ORDER; |
82 |
|
else if (optarg == "min") return ErrorSelectionRule::MINIMUM_AMOUNT; |
83 |
|
else if (optarg == "help") |
84 |
|
{ |
85 |
|
std::cerr << R"FOOBAR( |
86 |
|
This decides on the rule used by simplex during heuristic rounds for deciding |
87 |
|
the next basic variable to select. |
88 |
|
Available rules for --error-selection-rule are: |
89 |
|
+ max |
90 |
|
The maximum violation the bound. |
91 |
|
+ varord |
92 |
|
The variable order. |
93 |
|
+ min (default) |
94 |
|
The minimum abs() value of the variable's violation of its bound. |
95 |
|
)FOOBAR"; |
96 |
|
std::exit(1); |
97 |
|
} |
98 |
|
throw OptionException(std::string("unknown option for --error-selection-rule: `") + |
99 |
|
optarg + "'. Try --error-selection-rule=help."); |
100 |
|
} |
101 |
|
std::ostream& operator<<(std::ostream& os, NlCadLiftingMode mode) |
102 |
|
{ |
103 |
|
switch(mode) |
104 |
|
{ |
105 |
|
case NlCadLiftingMode::REGULAR: return os << "NlCadLiftingMode::REGULAR"; |
106 |
|
case NlCadLiftingMode::LAZARD: return os << "NlCadLiftingMode::LAZARD"; |
107 |
|
default: Unreachable(); |
108 |
|
} |
109 |
|
return os; |
110 |
|
} |
111 |
|
NlCadLiftingMode stringToNlCadLiftingMode(const std::string& optarg) |
112 |
|
{ |
113 |
|
if (optarg == "regular") return NlCadLiftingMode::REGULAR; |
114 |
|
else if (optarg == "lazard") return NlCadLiftingMode::LAZARD; |
115 |
|
else if (optarg == "help") |
116 |
|
{ |
117 |
|
std::cerr << R"FOOBAR( |
118 |
|
Modes for the CAD lifting in non-linear arithmetic. |
119 |
|
Available modes for --nl-cad-lift are: |
120 |
|
+ regular (default) |
121 |
|
Regular lifting. |
122 |
|
+ lazard |
123 |
|
Lazard's lifting scheme. |
124 |
|
)FOOBAR"; |
125 |
|
std::exit(1); |
126 |
|
} |
127 |
|
throw OptionException(std::string("unknown option for --nl-cad-lift: `") + |
128 |
|
optarg + "'. Try --nl-cad-lift=help."); |
129 |
|
} |
130 |
|
std::ostream& operator<<(std::ostream& os, NlCadProjectionMode mode) |
131 |
|
{ |
132 |
|
switch(mode) |
133 |
|
{ |
134 |
|
case NlCadProjectionMode::LAZARDMOD: return os << "NlCadProjectionMode::LAZARDMOD"; |
135 |
|
case NlCadProjectionMode::LAZARD: return os << "NlCadProjectionMode::LAZARD"; |
136 |
|
case NlCadProjectionMode::MCCALLUM: return os << "NlCadProjectionMode::MCCALLUM"; |
137 |
|
default: Unreachable(); |
138 |
|
} |
139 |
|
return os; |
140 |
|
} |
141 |
|
NlCadProjectionMode stringToNlCadProjectionMode(const std::string& optarg) |
142 |
|
{ |
143 |
|
if (optarg == "lazard-mod") return NlCadProjectionMode::LAZARDMOD; |
144 |
|
else if (optarg == "lazard") return NlCadProjectionMode::LAZARD; |
145 |
|
else if (optarg == "mccallum") return NlCadProjectionMode::MCCALLUM; |
146 |
|
else if (optarg == "help") |
147 |
|
{ |
148 |
|
std::cerr << R"FOOBAR( |
149 |
|
Modes for the CAD projection operator in non-linear arithmetic. |
150 |
|
Available modes for --nl-cad-proj are: |
151 |
|
+ lazard-mod |
152 |
|
A modification of Lazard's projection operator. |
153 |
|
+ lazard |
154 |
|
Lazard's projection operator. |
155 |
|
+ mccallum (default) |
156 |
|
McCallum's projection operator. |
157 |
|
)FOOBAR"; |
158 |
|
std::exit(1); |
159 |
|
} |
160 |
|
throw OptionException(std::string("unknown option for --nl-cad-proj: `") + |
161 |
|
optarg + "'. Try --nl-cad-proj=help."); |
162 |
|
} |
163 |
|
std::ostream& operator<<(std::ostream& os, NlExtMode mode) |
164 |
|
{ |
165 |
|
switch(mode) |
166 |
|
{ |
167 |
|
case NlExtMode::NONE: return os << "NlExtMode::NONE"; |
168 |
|
case NlExtMode::LIGHT: return os << "NlExtMode::LIGHT"; |
169 |
|
case NlExtMode::FULL: return os << "NlExtMode::FULL"; |
170 |
|
default: Unreachable(); |
171 |
|
} |
172 |
|
return os; |
173 |
|
} |
174 |
126 |
NlExtMode stringToNlExtMode(const std::string& optarg) |
175 |
|
{ |
176 |
126 |
if (optarg == "none") return NlExtMode::NONE; |
177 |
120 |
else if (optarg == "light") return NlExtMode::LIGHT; |
178 |
120 |
else if (optarg == "full") return NlExtMode::FULL; |
179 |
|
else if (optarg == "help") |
180 |
|
{ |
181 |
|
std::cerr << R"FOOBAR( |
182 |
|
Modes for the non-linear linearization |
183 |
|
Available modes for --nl-ext are: |
184 |
|
+ none |
185 |
|
Disable linearization approach |
186 |
|
+ light |
187 |
|
Only use a few light-weight lemma schemes |
188 |
|
+ full (default) |
189 |
|
Use all lemma schemes |
190 |
|
)FOOBAR"; |
191 |
|
std::exit(1); |
192 |
|
} |
193 |
|
throw OptionException(std::string("unknown option for --nl-ext: `") + |
194 |
|
optarg + "'. Try --nl-ext=help."); |
195 |
|
} |
196 |
|
std::ostream& operator<<(std::ostream& os, NlRlvMode mode) |
197 |
|
{ |
198 |
|
switch(mode) |
199 |
|
{ |
200 |
|
case NlRlvMode::NONE: return os << "NlRlvMode::NONE"; |
201 |
|
case NlRlvMode::INTERLEAVE: return os << "NlRlvMode::INTERLEAVE"; |
202 |
|
case NlRlvMode::ALWAYS: return os << "NlRlvMode::ALWAYS"; |
203 |
|
default: Unreachable(); |
204 |
|
} |
205 |
|
return os; |
206 |
|
} |
207 |
6 |
NlRlvMode stringToNlRlvMode(const std::string& optarg) |
208 |
|
{ |
209 |
6 |
if (optarg == "none") return NlRlvMode::NONE; |
210 |
3 |
else if (optarg == "interleave") return NlRlvMode::INTERLEAVE; |
211 |
3 |
else if (optarg == "always") return NlRlvMode::ALWAYS; |
212 |
|
else if (optarg == "help") |
213 |
|
{ |
214 |
|
std::cerr << R"FOOBAR( |
215 |
|
Modes for using relevance of assertions in non-linear arithmetic. |
216 |
|
Available modes for --nl-rlv are: |
217 |
|
+ none (default) |
218 |
|
Do not use relevance. |
219 |
|
+ interleave |
220 |
|
Alternate rounds using relevance. |
221 |
|
+ always |
222 |
|
Always use relevance. |
223 |
|
)FOOBAR"; |
224 |
|
std::exit(1); |
225 |
|
} |
226 |
|
throw OptionException(std::string("unknown option for --nl-rlv: `") + |
227 |
|
optarg + "'. Try --nl-rlv=help."); |
228 |
|
} |
229 |
|
std::ostream& operator<<(std::ostream& os, ArithUnateLemmaMode mode) |
230 |
|
{ |
231 |
|
switch(mode) |
232 |
|
{ |
233 |
|
case ArithUnateLemmaMode::NO: return os << "ArithUnateLemmaMode::NO"; |
234 |
|
case ArithUnateLemmaMode::INEQUALITY: return os << "ArithUnateLemmaMode::INEQUALITY"; |
235 |
|
case ArithUnateLemmaMode::EQUALITY: return os << "ArithUnateLemmaMode::EQUALITY"; |
236 |
|
case ArithUnateLemmaMode::ALL: return os << "ArithUnateLemmaMode::ALL"; |
237 |
|
default: Unreachable(); |
238 |
|
} |
239 |
|
return os; |
240 |
|
} |
241 |
|
ArithUnateLemmaMode stringToArithUnateLemmaMode(const std::string& optarg) |
242 |
|
{ |
243 |
|
if (optarg == "none") return ArithUnateLemmaMode::NO; |
244 |
|
else if (optarg == "ineqs") return ArithUnateLemmaMode::INEQUALITY; |
245 |
|
else if (optarg == "eqs") return ArithUnateLemmaMode::EQUALITY; |
246 |
|
else if (optarg == "all") return ArithUnateLemmaMode::ALL; |
247 |
|
else if (optarg == "help") |
248 |
|
{ |
249 |
|
std::cerr << R"FOOBAR( |
250 |
|
Unate lemmas are generated before SAT search begins using the relationship of |
251 |
|
constant terms and polynomials. |
252 |
|
Available modes for --unate-lemmas are: |
253 |
|
+ ineqs |
254 |
|
Outputs lemmas of the general form (<= p c) implies (<= p d) for c < d. |
255 |
|
+ eqs |
256 |
|
Outputs lemmas of the general forms (= p c) implies (<= p d) for c < d, or (= |
257 |
|
p c) implies (not (= p d)) for c != d. |
258 |
|
+ all (default) |
259 |
|
A combination of inequalities and equalities. |
260 |
|
)FOOBAR"; |
261 |
|
std::exit(1); |
262 |
|
} |
263 |
|
throw OptionException(std::string("unknown option for --unate-lemmas: `") + |
264 |
|
optarg + "'. Try --unate-lemmas=help."); |
265 |
|
} |
266 |
|
// clang-format on |
267 |
|
|
268 |
|
namespace arith |
269 |
|
{ |
270 |
|
// clang-format off |
271 |
|
void setDefaultMaxApproxDepth(Options& opts, int64_t value) |
272 |
|
{ |
273 |
|
if (!opts.arith.maxApproxDepthWasSetByUser) opts.arith.maxApproxDepth = value; |
274 |
|
} |
275 |
|
void setDefaultBrabTest(Options& opts, bool value) |
276 |
|
{ |
277 |
|
if (!opts.arith.brabTestWasSetByUser) opts.arith.brabTest = value; |
278 |
|
} |
279 |
|
void setDefaultArithCongMan(Options& opts, bool value) |
280 |
|
{ |
281 |
|
if (!opts.arith.arithCongManWasSetByUser) opts.arith.arithCongMan = value; |
282 |
|
} |
283 |
|
void setDefaultArithEqSolver(Options& opts, bool value) |
284 |
|
{ |
285 |
|
if (!opts.arith.arithEqSolverWasSetByUser) opts.arith.arithEqSolver = value; |
286 |
|
} |
287 |
|
void setDefaultArithNoPartialFun(Options& opts, bool value) |
288 |
|
{ |
289 |
|
if (!opts.arith.arithNoPartialFunWasSetByUser) opts.arith.arithNoPartialFun = value; |
290 |
|
} |
291 |
|
void setDefaultArithPropagationMode(Options& opts, ArithPropagationMode value) |
292 |
|
{ |
293 |
|
if (!opts.arith.arithPropagationModeWasSetByUser) opts.arith.arithPropagationMode = value; |
294 |
|
} |
295 |
|
void setDefaultArithPropAsLemmaLength(Options& opts, uint64_t value) |
296 |
|
{ |
297 |
|
if (!opts.arith.arithPropAsLemmaLengthWasSetByUser) opts.arith.arithPropAsLemmaLength = value; |
298 |
|
} |
299 |
|
void setDefaultArithRewriteEq(Options& opts, bool value) |
300 |
|
{ |
301 |
|
if (!opts.arith.arithRewriteEqWasSetByUser) opts.arith.arithRewriteEq = value; |
302 |
|
} |
303 |
|
void setDefaultCollectPivots(Options& opts, bool value) |
304 |
|
{ |
305 |
|
if (!opts.arith.collectPivotsWasSetByUser) opts.arith.collectPivots = value; |
306 |
|
} |
307 |
|
void setDefaultDoCutAllBounded(Options& opts, bool value) |
308 |
|
{ |
309 |
|
if (!opts.arith.doCutAllBoundedWasSetByUser) opts.arith.doCutAllBounded = value; |
310 |
|
} |
311 |
|
void setDefaultExportDioDecompositions(Options& opts, bool value) |
312 |
|
{ |
313 |
|
if (!opts.arith.exportDioDecompositionsWasSetByUser) opts.arith.exportDioDecompositions = value; |
314 |
|
} |
315 |
|
void setDefaultArithDioSolver(Options& opts, bool value) |
316 |
|
{ |
317 |
|
if (!opts.arith.arithDioSolverWasSetByUser) opts.arith.arithDioSolver = value; |
318 |
|
} |
319 |
|
void setDefaultDioSolverTurns(Options& opts, int64_t value) |
320 |
|
{ |
321 |
|
if (!opts.arith.dioSolverTurnsWasSetByUser) opts.arith.dioSolverTurns = value; |
322 |
|
} |
323 |
|
void setDefaultArithErrorSelectionRule(Options& opts, ErrorSelectionRule value) |
324 |
|
{ |
325 |
|
if (!opts.arith.arithErrorSelectionRuleWasSetByUser) opts.arith.arithErrorSelectionRule = value; |
326 |
|
} |
327 |
|
void setDefaultHavePenalties(Options& opts, bool value) |
328 |
|
{ |
329 |
|
if (!opts.arith.havePenaltiesWasSetByUser) opts.arith.havePenalties = value; |
330 |
|
} |
331 |
|
void setDefaultArithHeuristicPivots(Options& opts, int64_t value) |
332 |
|
{ |
333 |
|
if (!opts.arith.arithHeuristicPivotsWasSetByUser) opts.arith.arithHeuristicPivots = value; |
334 |
|
} |
335 |
|
void setDefaultReplayFailureLemma(Options& opts, bool value) |
336 |
|
{ |
337 |
|
if (!opts.arith.replayFailureLemmaWasSetByUser) opts.arith.replayFailureLemma = value; |
338 |
|
} |
339 |
|
void setDefaultMaxCutsInContext(Options& opts, uint64_t value) |
340 |
|
{ |
341 |
|
if (!opts.arith.maxCutsInContextWasSetByUser) opts.arith.maxCutsInContext = value; |
342 |
|
} |
343 |
|
void setDefaultArithMLTrick(Options& opts, bool value) |
344 |
|
{ |
345 |
|
if (!opts.arith.arithMLTrickWasSetByUser) opts.arith.arithMLTrick = value; |
346 |
|
} |
347 |
|
void setDefaultArithMLTrickSubstitutions(Options& opts, uint64_t value) |
348 |
|
{ |
349 |
|
if (!opts.arith.arithMLTrickSubstitutionsWasSetByUser) opts.arith.arithMLTrickSubstitutions = value; |
350 |
|
} |
351 |
|
void setDefaultNewProp(Options& opts, bool value) |
352 |
|
{ |
353 |
|
if (!opts.arith.newPropWasSetByUser) opts.arith.newProp = value; |
354 |
|
} |
355 |
|
void setDefaultNlCad(Options& opts, bool value) |
356 |
|
{ |
357 |
|
if (!opts.arith.nlCadWasSetByUser) opts.arith.nlCad = value; |
358 |
|
} |
359 |
|
void setDefaultNlCadUseInitial(Options& opts, bool value) |
360 |
|
{ |
361 |
|
if (!opts.arith.nlCadUseInitialWasSetByUser) opts.arith.nlCadUseInitial = value; |
362 |
|
} |
363 |
|
void setDefaultNlCadLifting(Options& opts, NlCadLiftingMode value) |
364 |
|
{ |
365 |
|
if (!opts.arith.nlCadLiftingWasSetByUser) opts.arith.nlCadLifting = value; |
366 |
|
} |
367 |
|
void setDefaultNlCadProjection(Options& opts, NlCadProjectionMode value) |
368 |
|
{ |
369 |
|
if (!opts.arith.nlCadProjectionWasSetByUser) opts.arith.nlCadProjection = value; |
370 |
|
} |
371 |
|
void setDefaultNlExt(Options& opts, NlExtMode value) |
372 |
|
{ |
373 |
|
if (!opts.arith.nlExtWasSetByUser) opts.arith.nlExt = value; |
374 |
|
} |
375 |
|
void setDefaultNlExtEntailConflicts(Options& opts, bool value) |
376 |
|
{ |
377 |
|
if (!opts.arith.nlExtEntailConflictsWasSetByUser) opts.arith.nlExtEntailConflicts = value; |
378 |
|
} |
379 |
|
void setDefaultNlExtFactor(Options& opts, bool value) |
380 |
|
{ |
381 |
|
if (!opts.arith.nlExtFactorWasSetByUser) opts.arith.nlExtFactor = value; |
382 |
|
} |
383 |
|
void setDefaultNlExtIncPrecision(Options& opts, bool value) |
384 |
|
{ |
385 |
|
if (!opts.arith.nlExtIncPrecisionWasSetByUser) opts.arith.nlExtIncPrecision = value; |
386 |
|
} |
387 |
|
void setDefaultNlExtPurify(Options& opts, bool value) |
388 |
|
{ |
389 |
|
if (!opts.arith.nlExtPurifyWasSetByUser) opts.arith.nlExtPurify = value; |
390 |
|
} |
391 |
|
void setDefaultNlExtResBound(Options& opts, bool value) |
392 |
|
{ |
393 |
|
if (!opts.arith.nlExtResBoundWasSetByUser) opts.arith.nlExtResBound = value; |
394 |
|
} |
395 |
|
void setDefaultNlExtRewrites(Options& opts, bool value) |
396 |
|
{ |
397 |
|
if (!opts.arith.nlExtRewritesWasSetByUser) opts.arith.nlExtRewrites = value; |
398 |
|
} |
399 |
|
void setDefaultNlExtSplitZero(Options& opts, bool value) |
400 |
|
{ |
401 |
|
if (!opts.arith.nlExtSplitZeroWasSetByUser) opts.arith.nlExtSplitZero = value; |
402 |
|
} |
403 |
|
void setDefaultNlExtTfTaylorDegree(Options& opts, int64_t value) |
404 |
|
{ |
405 |
|
if (!opts.arith.nlExtTfTaylorDegreeWasSetByUser) opts.arith.nlExtTfTaylorDegree = value; |
406 |
|
} |
407 |
|
void setDefaultNlExtTfTangentPlanes(Options& opts, bool value) |
408 |
|
{ |
409 |
|
if (!opts.arith.nlExtTfTangentPlanesWasSetByUser) opts.arith.nlExtTfTangentPlanes = value; |
410 |
|
} |
411 |
|
void setDefaultNlExtTangentPlanes(Options& opts, bool value) |
412 |
|
{ |
413 |
|
if (!opts.arith.nlExtTangentPlanesWasSetByUser) opts.arith.nlExtTangentPlanes = value; |
414 |
|
} |
415 |
|
void setDefaultNlExtTangentPlanesInterleave(Options& opts, bool value) |
416 |
|
{ |
417 |
|
if (!opts.arith.nlExtTangentPlanesInterleaveWasSetByUser) opts.arith.nlExtTangentPlanesInterleave = value; |
418 |
|
} |
419 |
|
void setDefaultNlICP(Options& opts, bool value) |
420 |
|
{ |
421 |
|
if (!opts.arith.nlICPWasSetByUser) opts.arith.nlICP = value; |
422 |
|
} |
423 |
|
void setDefaultNlRlvMode(Options& opts, NlRlvMode value) |
424 |
|
{ |
425 |
|
if (!opts.arith.nlRlvModeWasSetByUser) opts.arith.nlRlvMode = value; |
426 |
|
} |
427 |
|
void setDefaultNlRlvAssertBounds(Options& opts, bool value) |
428 |
|
{ |
429 |
|
if (!opts.arith.nlRlvAssertBoundsWasSetByUser) opts.arith.nlRlvAssertBounds = value; |
430 |
|
} |
431 |
|
void setDefaultPbRewrites(Options& opts, bool value) |
432 |
|
{ |
433 |
|
if (!opts.arith.pbRewritesWasSetByUser) opts.arith.pbRewrites = value; |
434 |
|
} |
435 |
|
void setDefaultArithPivotThreshold(Options& opts, uint64_t value) |
436 |
|
{ |
437 |
|
if (!opts.arith.arithPivotThresholdWasSetByUser) opts.arith.arithPivotThreshold = value; |
438 |
|
} |
439 |
|
void setDefaultPpAssertMaxSubSize(Options& opts, uint64_t value) |
440 |
|
{ |
441 |
|
if (!opts.arith.ppAssertMaxSubSizeWasSetByUser) opts.arith.ppAssertMaxSubSize = value; |
442 |
|
} |
443 |
|
void setDefaultArithPropagateMaxLength(Options& opts, uint64_t value) |
444 |
|
{ |
445 |
|
if (!opts.arith.arithPropagateMaxLengthWasSetByUser) opts.arith.arithPropagateMaxLength = value; |
446 |
|
} |
447 |
|
void setDefaultReplayEarlyCloseDepths(Options& opts, int64_t value) |
448 |
|
{ |
449 |
|
if (!opts.arith.replayEarlyCloseDepthsWasSetByUser) opts.arith.replayEarlyCloseDepths = value; |
450 |
|
} |
451 |
|
void setDefaultLemmaRejectCutSize(Options& opts, uint64_t value) |
452 |
|
{ |
453 |
|
if (!opts.arith.lemmaRejectCutSizeWasSetByUser) opts.arith.lemmaRejectCutSize = value; |
454 |
|
} |
455 |
|
void setDefaultReplayNumericFailurePenalty(Options& opts, int64_t value) |
456 |
|
{ |
457 |
|
if (!opts.arith.replayNumericFailurePenaltyWasSetByUser) opts.arith.replayNumericFailurePenalty = value; |
458 |
|
} |
459 |
|
void setDefaultReplayRejectCutSize(Options& opts, uint64_t value) |
460 |
|
{ |
461 |
|
if (!opts.arith.replayRejectCutSizeWasSetByUser) opts.arith.replayRejectCutSize = value; |
462 |
|
} |
463 |
|
void setDefaultRestrictedPivots(Options& opts, bool value) |
464 |
|
{ |
465 |
|
if (!opts.arith.restrictedPivotsWasSetByUser) opts.arith.restrictedPivots = value; |
466 |
|
} |
467 |
|
void setDefaultRevertArithModels(Options& opts, bool value) |
468 |
|
{ |
469 |
|
if (!opts.arith.revertArithModelsWasSetByUser) opts.arith.revertArithModels = value; |
470 |
|
} |
471 |
|
void setDefaultRrTurns(Options& opts, int64_t value) |
472 |
|
{ |
473 |
|
if (!opts.arith.rrTurnsWasSetByUser) opts.arith.rrTurns = value; |
474 |
|
} |
475 |
|
void setDefaultTrySolveIntStandardEffort(Options& opts, bool value) |
476 |
|
{ |
477 |
|
if (!opts.arith.trySolveIntStandardEffortWasSetByUser) opts.arith.trySolveIntStandardEffort = value; |
478 |
|
} |
479 |
|
void setDefaultArithSimplexCheckPeriod(Options& opts, uint64_t value) |
480 |
|
{ |
481 |
|
if (!opts.arith.arithSimplexCheckPeriodWasSetByUser) opts.arith.arithSimplexCheckPeriod = value; |
482 |
|
} |
483 |
|
void setDefaultSoiQuickExplain(Options& opts, bool value) |
484 |
|
{ |
485 |
|
if (!opts.arith.soiQuickExplainWasSetByUser) opts.arith.soiQuickExplain = value; |
486 |
|
} |
487 |
|
void setDefaultArithStandardCheckVarOrderPivots(Options& opts, int64_t value) |
488 |
|
{ |
489 |
|
if (!opts.arith.arithStandardCheckVarOrderPivotsWasSetByUser) opts.arith.arithStandardCheckVarOrderPivots = value; |
490 |
|
} |
491 |
|
void setDefaultArithUnateLemmaMode(Options& opts, ArithUnateLemmaMode value) |
492 |
|
{ |
493 |
|
if (!opts.arith.arithUnateLemmaModeWasSetByUser) opts.arith.arithUnateLemmaMode = value; |
494 |
|
} |
495 |
|
void setDefaultUseApprox(Options& opts, bool value) |
496 |
|
{ |
497 |
|
if (!opts.arith.useApproxWasSetByUser) opts.arith.useApprox = value; |
498 |
|
} |
499 |
|
void setDefaultUseFC(Options& opts, bool value) |
500 |
|
{ |
501 |
|
if (!opts.arith.useFCWasSetByUser) opts.arith.useFC = value; |
502 |
|
} |
503 |
|
void setDefaultUseSOI(Options& opts, bool value) |
504 |
|
{ |
505 |
|
if (!opts.arith.useSOIWasSetByUser) opts.arith.useSOI = value; |
506 |
|
} |
507 |
|
// clang-format on |
508 |
|
} |
509 |
|
|
510 |
29577 |
} // namespace cvc5::options |