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 |
|
* Contains code for handling command-line options. |
14 |
|
* |
15 |
|
* For each <module>_options.toml configuration file, mkoptions.py |
16 |
|
* expands this template and generates a <module>_options.h file. |
17 |
|
*/ |
18 |
|
|
19 |
|
#include "cvc5_private.h" |
20 |
|
|
21 |
|
#ifndef CVC5__OPTIONS__ARITH_H |
22 |
|
#define CVC5__OPTIONS__ARITH_H |
23 |
|
|
24 |
|
#include "options/options.h" |
25 |
|
|
26 |
|
// clang-format off |
27 |
|
|
28 |
|
// clang-format on |
29 |
|
|
30 |
|
namespace cvc5::options { |
31 |
|
|
32 |
|
// clang-format off |
33 |
|
enum class ArithPropagationMode |
34 |
|
{ |
35 |
|
NO_PROP, BOTH_PROP, UNATE_PROP, BOUND_INFERENCE_PROP, |
36 |
|
__MAX_VALUE = BOUND_INFERENCE_PROP |
37 |
|
}; |
38 |
|
std::ostream& operator<<(std::ostream& os, ArithPropagationMode mode); |
39 |
|
ArithPropagationMode stringToArithPropagationMode(const std::string& optarg); |
40 |
|
|
41 |
|
enum class ErrorSelectionRule |
42 |
|
{ |
43 |
|
MAXIMUM_AMOUNT, VAR_ORDER, SUM_METRIC, MINIMUM_AMOUNT, |
44 |
|
__MAX_VALUE = MINIMUM_AMOUNT |
45 |
|
}; |
46 |
|
std::ostream& operator<<(std::ostream& os, ErrorSelectionRule mode); |
47 |
|
ErrorSelectionRule stringToErrorSelectionRule(const std::string& optarg); |
48 |
|
|
49 |
|
enum class NlCadLiftingMode |
50 |
|
{ |
51 |
|
LAZARD, REGULAR, |
52 |
|
__MAX_VALUE = REGULAR |
53 |
|
}; |
54 |
|
std::ostream& operator<<(std::ostream& os, NlCadLiftingMode mode); |
55 |
|
NlCadLiftingMode stringToNlCadLiftingMode(const std::string& optarg); |
56 |
|
|
57 |
|
enum class NlCadProjectionMode |
58 |
|
{ |
59 |
|
LAZARDMOD, LAZARD, MCCALLUM, |
60 |
|
__MAX_VALUE = MCCALLUM |
61 |
|
}; |
62 |
|
std::ostream& operator<<(std::ostream& os, NlCadProjectionMode mode); |
63 |
|
NlCadProjectionMode stringToNlCadProjectionMode(const std::string& optarg); |
64 |
|
|
65 |
|
enum class NlExtMode |
66 |
|
{ |
67 |
|
LIGHT, NONE, FULL, |
68 |
|
__MAX_VALUE = FULL |
69 |
|
}; |
70 |
|
std::ostream& operator<<(std::ostream& os, NlExtMode mode); |
71 |
|
NlExtMode stringToNlExtMode(const std::string& optarg); |
72 |
|
|
73 |
|
enum class NlRlvMode |
74 |
|
{ |
75 |
|
ALWAYS, INTERLEAVE, NONE, |
76 |
|
__MAX_VALUE = NONE |
77 |
|
}; |
78 |
|
std::ostream& operator<<(std::ostream& os, NlRlvMode mode); |
79 |
|
NlRlvMode stringToNlRlvMode(const std::string& optarg); |
80 |
|
|
81 |
|
enum class ArithUnateLemmaMode |
82 |
|
{ |
83 |
|
INEQUALITY, EQUALITY, ALL, NO, |
84 |
|
__MAX_VALUE = NO |
85 |
|
}; |
86 |
|
std::ostream& operator<<(std::ostream& os, ArithUnateLemmaMode mode); |
87 |
|
ArithUnateLemmaMode stringToArithUnateLemmaMode(const std::string& optarg); |
88 |
|
|
89 |
|
// clang-format on |
90 |
|
|
91 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
92 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
93 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
94 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
95 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
96 |
|
|
97 |
30748 |
struct HolderARITH |
98 |
|
{ |
99 |
|
// clang-format off |
100 |
|
int64_t maxApproxDepth = 200; |
101 |
|
bool maxApproxDepthWasSetByUser = false; |
102 |
|
bool brabTest = true; |
103 |
|
bool brabTestWasSetByUser = false; |
104 |
|
bool arithCongMan = true; |
105 |
|
bool arithCongManWasSetByUser = false; |
106 |
|
bool arithEqSolver = false; |
107 |
|
bool arithEqSolverWasSetByUser = false; |
108 |
|
bool arithNoPartialFun = false; |
109 |
|
bool arithNoPartialFunWasSetByUser = false; |
110 |
|
ArithPropagationMode arithPropagationMode = ArithPropagationMode::BOTH_PROP; |
111 |
|
bool arithPropagationModeWasSetByUser = false; |
112 |
|
uint64_t arithPropAsLemmaLength = 8; |
113 |
|
bool arithPropAsLemmaLengthWasSetByUser = false; |
114 |
|
bool arithRewriteEq = false; |
115 |
|
bool arithRewriteEqWasSetByUser = false; |
116 |
|
bool collectPivots = false; |
117 |
|
bool collectPivotsWasSetByUser = false; |
118 |
|
bool doCutAllBounded = false; |
119 |
|
bool doCutAllBoundedWasSetByUser = false; |
120 |
|
bool exportDioDecompositions = false; |
121 |
|
bool exportDioDecompositionsWasSetByUser = false; |
122 |
|
bool arithDioSolver = true; |
123 |
|
bool arithDioSolverWasSetByUser = false; |
124 |
|
int64_t dioSolverTurns = 10; |
125 |
|
bool dioSolverTurnsWasSetByUser = false; |
126 |
|
ErrorSelectionRule arithErrorSelectionRule = ErrorSelectionRule::MINIMUM_AMOUNT; |
127 |
|
bool arithErrorSelectionRuleWasSetByUser = false; |
128 |
|
bool havePenalties = false; |
129 |
|
bool havePenaltiesWasSetByUser = false; |
130 |
|
int64_t arithHeuristicPivots = 0; |
131 |
|
bool arithHeuristicPivotsWasSetByUser = false; |
132 |
|
bool replayFailureLemma = false; |
133 |
|
bool replayFailureLemmaWasSetByUser = false; |
134 |
|
uint64_t maxCutsInContext = 65535; |
135 |
|
bool maxCutsInContextWasSetByUser = false; |
136 |
|
bool arithMLTrick = false; |
137 |
|
bool arithMLTrickWasSetByUser = false; |
138 |
|
uint64_t arithMLTrickSubstitutions = 1; |
139 |
|
bool arithMLTrickSubstitutionsWasSetByUser = false; |
140 |
|
bool newProp = true; |
141 |
|
bool newPropWasSetByUser = false; |
142 |
|
bool nlCad = false; |
143 |
|
bool nlCadWasSetByUser = false; |
144 |
|
bool nlCadUseInitial = false; |
145 |
|
bool nlCadUseInitialWasSetByUser = false; |
146 |
|
NlCadLiftingMode nlCadLifting = NlCadLiftingMode::REGULAR; |
147 |
|
bool nlCadLiftingWasSetByUser = false; |
148 |
|
NlCadProjectionMode nlCadProjection = NlCadProjectionMode::MCCALLUM; |
149 |
|
bool nlCadProjectionWasSetByUser = false; |
150 |
|
NlExtMode nlExt = NlExtMode::FULL; |
151 |
|
bool nlExtWasSetByUser = false; |
152 |
|
bool nlExtEntailConflicts = false; |
153 |
|
bool nlExtEntailConflictsWasSetByUser = false; |
154 |
|
bool nlExtFactor = true; |
155 |
|
bool nlExtFactorWasSetByUser = false; |
156 |
|
bool nlExtIncPrecision = true; |
157 |
|
bool nlExtIncPrecisionWasSetByUser = false; |
158 |
|
bool nlExtPurify = false; |
159 |
|
bool nlExtPurifyWasSetByUser = false; |
160 |
|
bool nlExtResBound = false; |
161 |
|
bool nlExtResBoundWasSetByUser = false; |
162 |
|
bool nlExtRewrites = true; |
163 |
|
bool nlExtRewritesWasSetByUser = false; |
164 |
|
bool nlExtSplitZero = false; |
165 |
|
bool nlExtSplitZeroWasSetByUser = false; |
166 |
|
int64_t nlExtTfTaylorDegree = 4; |
167 |
|
bool nlExtTfTaylorDegreeWasSetByUser = false; |
168 |
|
bool nlExtTfTangentPlanes = true; |
169 |
|
bool nlExtTfTangentPlanesWasSetByUser = false; |
170 |
|
bool nlExtTangentPlanes = false; |
171 |
|
bool nlExtTangentPlanesWasSetByUser = false; |
172 |
|
bool nlExtTangentPlanesInterleave = false; |
173 |
|
bool nlExtTangentPlanesInterleaveWasSetByUser = false; |
174 |
|
bool nlICP = false; |
175 |
|
bool nlICPWasSetByUser = false; |
176 |
|
NlRlvMode nlRlvMode = NlRlvMode::NONE; |
177 |
|
bool nlRlvModeWasSetByUser = false; |
178 |
|
bool nlRlvAssertBounds = false; |
179 |
|
bool nlRlvAssertBoundsWasSetByUser = false; |
180 |
|
bool pbRewrites = false; |
181 |
|
bool pbRewritesWasSetByUser = false; |
182 |
|
uint64_t arithPivotThreshold = 2; |
183 |
|
bool arithPivotThresholdWasSetByUser = false; |
184 |
|
uint64_t ppAssertMaxSubSize = 2; |
185 |
|
bool ppAssertMaxSubSizeWasSetByUser = false; |
186 |
|
uint64_t arithPropagateMaxLength = 16; |
187 |
|
bool arithPropagateMaxLengthWasSetByUser = false; |
188 |
|
int64_t replayEarlyCloseDepths = 1; |
189 |
|
bool replayEarlyCloseDepthsWasSetByUser = false; |
190 |
|
uint64_t lemmaRejectCutSize = 25500; |
191 |
|
bool lemmaRejectCutSizeWasSetByUser = false; |
192 |
|
int64_t replayNumericFailurePenalty = 4194304; |
193 |
|
bool replayNumericFailurePenaltyWasSetByUser = false; |
194 |
|
uint64_t replayRejectCutSize = 25500; |
195 |
|
bool replayRejectCutSizeWasSetByUser = false; |
196 |
|
bool restrictedPivots = true; |
197 |
|
bool restrictedPivotsWasSetByUser = false; |
198 |
|
bool revertArithModels = false; |
199 |
|
bool revertArithModelsWasSetByUser = false; |
200 |
|
int64_t rrTurns = 3; |
201 |
|
bool rrTurnsWasSetByUser = false; |
202 |
|
bool trySolveIntStandardEffort = false; |
203 |
|
bool trySolveIntStandardEffortWasSetByUser = false; |
204 |
|
uint64_t arithSimplexCheckPeriod = 200; |
205 |
|
bool arithSimplexCheckPeriodWasSetByUser = false; |
206 |
|
bool soiQuickExplain = false; |
207 |
|
bool soiQuickExplainWasSetByUser = false; |
208 |
|
int64_t arithStandardCheckVarOrderPivots = -1; |
209 |
|
bool arithStandardCheckVarOrderPivotsWasSetByUser = false; |
210 |
|
ArithUnateLemmaMode arithUnateLemmaMode = ArithUnateLemmaMode::ALL; |
211 |
|
bool arithUnateLemmaModeWasSetByUser = false; |
212 |
|
bool useApprox = false; |
213 |
|
bool useApproxWasSetByUser = false; |
214 |
|
bool useFC = false; |
215 |
|
bool useFCWasSetByUser = false; |
216 |
|
bool useSOI = false; |
217 |
|
bool useSOIWasSetByUser = false; |
218 |
|
// clang-format on |
219 |
|
}; |
220 |
|
|
221 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
222 |
|
|
223 |
|
// clang-format off |
224 |
|
inline int64_t maxApproxDepth() { return Options::current().arith.maxApproxDepth; } |
225 |
|
inline bool brabTest() { return Options::current().arith.brabTest; } |
226 |
|
inline bool arithCongMan() { return Options::current().arith.arithCongMan; } |
227 |
74 |
inline bool arithEqSolver() { return Options::current().arith.arithEqSolver; } |
228 |
|
inline bool arithNoPartialFun() { return Options::current().arith.arithNoPartialFun; } |
229 |
|
inline ArithPropagationMode arithPropagationMode() { return Options::current().arith.arithPropagationMode; } |
230 |
|
inline uint64_t arithPropAsLemmaLength() { return Options::current().arith.arithPropAsLemmaLength; } |
231 |
|
inline bool arithRewriteEq() { return Options::current().arith.arithRewriteEq; } |
232 |
|
inline bool collectPivots() { return Options::current().arith.collectPivots; } |
233 |
|
inline bool doCutAllBounded() { return Options::current().arith.doCutAllBounded; } |
234 |
|
inline bool exportDioDecompositions() { return Options::current().arith.exportDioDecompositions; } |
235 |
|
inline bool arithDioSolver() { return Options::current().arith.arithDioSolver; } |
236 |
|
inline int64_t dioSolverTurns() { return Options::current().arith.dioSolverTurns; } |
237 |
|
inline ErrorSelectionRule arithErrorSelectionRule() { return Options::current().arith.arithErrorSelectionRule; } |
238 |
|
inline bool havePenalties() { return Options::current().arith.havePenalties; } |
239 |
|
inline int64_t arithHeuristicPivots() { return Options::current().arith.arithHeuristicPivots; } |
240 |
|
inline bool replayFailureLemma() { return Options::current().arith.replayFailureLemma; } |
241 |
|
inline uint64_t maxCutsInContext() { return Options::current().arith.maxCutsInContext; } |
242 |
|
inline bool arithMLTrick() { return Options::current().arith.arithMLTrick; } |
243 |
|
inline uint64_t arithMLTrickSubstitutions() { return Options::current().arith.arithMLTrickSubstitutions; } |
244 |
|
inline bool newProp() { return Options::current().arith.newProp; } |
245 |
|
inline bool nlCad() { return Options::current().arith.nlCad; } |
246 |
|
inline bool nlCadUseInitial() { return Options::current().arith.nlCadUseInitial; } |
247 |
|
inline NlCadLiftingMode nlCadLifting() { return Options::current().arith.nlCadLifting; } |
248 |
|
inline NlCadProjectionMode nlCadProjection() { return Options::current().arith.nlCadProjection; } |
249 |
|
inline NlExtMode nlExt() { return Options::current().arith.nlExt; } |
250 |
|
inline bool nlExtEntailConflicts() { return Options::current().arith.nlExtEntailConflicts; } |
251 |
|
inline bool nlExtFactor() { return Options::current().arith.nlExtFactor; } |
252 |
|
inline bool nlExtIncPrecision() { return Options::current().arith.nlExtIncPrecision; } |
253 |
|
inline bool nlExtPurify() { return Options::current().arith.nlExtPurify; } |
254 |
|
inline bool nlExtResBound() { return Options::current().arith.nlExtResBound; } |
255 |
|
inline bool nlExtRewrites() { return Options::current().arith.nlExtRewrites; } |
256 |
|
inline bool nlExtSplitZero() { return Options::current().arith.nlExtSplitZero; } |
257 |
|
inline int64_t nlExtTfTaylorDegree() { return Options::current().arith.nlExtTfTaylorDegree; } |
258 |
|
inline bool nlExtTfTangentPlanes() { return Options::current().arith.nlExtTfTangentPlanes; } |
259 |
|
inline bool nlExtTangentPlanes() { return Options::current().arith.nlExtTangentPlanes; } |
260 |
|
inline bool nlExtTangentPlanesInterleave() { return Options::current().arith.nlExtTangentPlanesInterleave; } |
261 |
|
inline bool nlICP() { return Options::current().arith.nlICP; } |
262 |
|
inline NlRlvMode nlRlvMode() { return Options::current().arith.nlRlvMode; } |
263 |
|
inline bool nlRlvAssertBounds() { return Options::current().arith.nlRlvAssertBounds; } |
264 |
|
inline bool pbRewrites() { return Options::current().arith.pbRewrites; } |
265 |
|
inline uint64_t arithPivotThreshold() { return Options::current().arith.arithPivotThreshold; } |
266 |
|
inline uint64_t ppAssertMaxSubSize() { return Options::current().arith.ppAssertMaxSubSize; } |
267 |
|
inline uint64_t arithPropagateMaxLength() { return Options::current().arith.arithPropagateMaxLength; } |
268 |
|
inline int64_t replayEarlyCloseDepths() { return Options::current().arith.replayEarlyCloseDepths; } |
269 |
|
inline uint64_t lemmaRejectCutSize() { return Options::current().arith.lemmaRejectCutSize; } |
270 |
|
inline int64_t replayNumericFailurePenalty() { return Options::current().arith.replayNumericFailurePenalty; } |
271 |
|
inline uint64_t replayRejectCutSize() { return Options::current().arith.replayRejectCutSize; } |
272 |
|
inline bool restrictedPivots() { return Options::current().arith.restrictedPivots; } |
273 |
|
inline bool revertArithModels() { return Options::current().arith.revertArithModels; } |
274 |
|
inline int64_t rrTurns() { return Options::current().arith.rrTurns; } |
275 |
|
inline bool trySolveIntStandardEffort() { return Options::current().arith.trySolveIntStandardEffort; } |
276 |
|
inline uint64_t arithSimplexCheckPeriod() { return Options::current().arith.arithSimplexCheckPeriod; } |
277 |
|
inline bool soiQuickExplain() { return Options::current().arith.soiQuickExplain; } |
278 |
|
inline int64_t arithStandardCheckVarOrderPivots() { return Options::current().arith.arithStandardCheckVarOrderPivots; } |
279 |
|
inline ArithUnateLemmaMode arithUnateLemmaMode() { return Options::current().arith.arithUnateLemmaMode; } |
280 |
|
inline bool useApprox() { return Options::current().arith.useApprox; } |
281 |
|
inline bool useFC() { return Options::current().arith.useFC; } |
282 |
|
inline bool useSOI() { return Options::current().arith.useSOI; } |
283 |
|
// clang-format on |
284 |
|
|
285 |
|
} // namespace cvc5::options |
286 |
|
|
287 |
|
#endif /* CVC5__OPTIONS__ARITH_H */ |