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/smt_options.h" |
19 |
|
|
20 |
|
#include <iostream> |
21 |
|
|
22 |
|
#include "base/check.h" |
23 |
|
#include "options/option_exception.h" |
24 |
|
|
25 |
|
// clang-format off |
26 |
|
namespace cvc5::options { |
27 |
|
|
28 |
|
std::ostream& operator<<(std::ostream& os, BlockModelsMode mode) |
29 |
|
{ |
30 |
|
switch(mode) { |
31 |
|
case BlockModelsMode::VALUES: |
32 |
|
return os << "BlockModelsMode::VALUES"; |
33 |
|
case BlockModelsMode::NONE: |
34 |
|
return os << "BlockModelsMode::NONE"; |
35 |
|
case BlockModelsMode::LITERALS: |
36 |
|
return os << "BlockModelsMode::LITERALS"; |
37 |
|
default: |
38 |
|
Unreachable(); |
39 |
|
} |
40 |
|
return os; |
41 |
|
} |
42 |
21 |
BlockModelsMode stringToBlockModelsMode(const std::string& optarg) |
43 |
|
{ |
44 |
21 |
if (optarg == "values") |
45 |
|
{ |
46 |
3 |
return BlockModelsMode::VALUES; |
47 |
|
} |
48 |
18 |
else if (optarg == "none") |
49 |
|
{ |
50 |
|
return BlockModelsMode::NONE; |
51 |
|
} |
52 |
18 |
else if (optarg == "literals") |
53 |
|
{ |
54 |
18 |
return BlockModelsMode::LITERALS; |
55 |
|
} |
56 |
|
else if (optarg == "help") |
57 |
|
{ |
58 |
|
std::cerr << "Blocking models modes.\n" |
59 |
|
"Available modes for --block-models are:\n" |
60 |
|
"+ values\n" |
61 |
|
" Block models based on the concrete model values for the free variables.\n" |
62 |
|
"+ none (default)\n" |
63 |
|
" Do not block models.\n" |
64 |
|
"+ literals\n" |
65 |
|
" Block models based on the SAT skeleton.\n"; |
66 |
|
std::exit(1); |
67 |
|
} |
68 |
|
throw OptionException(std::string("unknown option for --block-models: `") + |
69 |
|
optarg + "'. Try --block-models=help."); |
70 |
|
} |
71 |
|
std::ostream& operator<<(std::ostream& os, IandMode mode) |
72 |
|
{ |
73 |
|
switch(mode) { |
74 |
|
case IandMode::SUM: |
75 |
|
return os << "IandMode::SUM"; |
76 |
|
case IandMode::BITWISE: |
77 |
|
return os << "IandMode::BITWISE"; |
78 |
|
case IandMode::VALUE: |
79 |
|
return os << "IandMode::VALUE"; |
80 |
|
default: |
81 |
|
Unreachable(); |
82 |
|
} |
83 |
|
return os; |
84 |
|
} |
85 |
67 |
IandMode stringToIandMode(const std::string& optarg) |
86 |
|
{ |
87 |
67 |
if (optarg == "sum") |
88 |
|
{ |
89 |
18 |
return IandMode::SUM; |
90 |
|
} |
91 |
49 |
else if (optarg == "bitwise") |
92 |
|
{ |
93 |
30 |
return IandMode::BITWISE; |
94 |
|
} |
95 |
19 |
else if (optarg == "value") |
96 |
|
{ |
97 |
19 |
return IandMode::VALUE; |
98 |
|
} |
99 |
|
else if (optarg == "help") |
100 |
|
{ |
101 |
|
std::cerr << "Refinement modes for integer AND\n" |
102 |
|
"Available modes for --iand-mode are:\n" |
103 |
|
"+ sum\n" |
104 |
|
" use sum to represent integer AND in refinement\n" |
105 |
|
"+ bitwise\n" |
106 |
|
" use bitwise comparisons on binary representation of integer for refinement\n" |
107 |
|
" (experimental)\n" |
108 |
|
"+ value (default)\n" |
109 |
|
" value-based refinement\n"; |
110 |
|
std::exit(1); |
111 |
|
} |
112 |
|
throw OptionException(std::string("unknown option for --iand-mode: `") + |
113 |
|
optarg + "'. Try --iand-mode=help."); |
114 |
|
} |
115 |
|
std::ostream& operator<<(std::ostream& os, ModelCoresMode mode) |
116 |
|
{ |
117 |
|
switch(mode) { |
118 |
|
case ModelCoresMode::SIMPLE: |
119 |
|
return os << "ModelCoresMode::SIMPLE"; |
120 |
|
case ModelCoresMode::NON_IMPLIED: |
121 |
|
return os << "ModelCoresMode::NON_IMPLIED"; |
122 |
|
case ModelCoresMode::NONE: |
123 |
|
return os << "ModelCoresMode::NONE"; |
124 |
|
default: |
125 |
|
Unreachable(); |
126 |
|
} |
127 |
|
return os; |
128 |
|
} |
129 |
8 |
ModelCoresMode stringToModelCoresMode(const std::string& optarg) |
130 |
|
{ |
131 |
8 |
if (optarg == "simple") |
132 |
|
{ |
133 |
4 |
return ModelCoresMode::SIMPLE; |
134 |
|
} |
135 |
4 |
else if (optarg == "non-implied") |
136 |
|
{ |
137 |
4 |
return ModelCoresMode::NON_IMPLIED; |
138 |
|
} |
139 |
|
else if (optarg == "none") |
140 |
|
{ |
141 |
|
return ModelCoresMode::NONE; |
142 |
|
} |
143 |
|
else if (optarg == "help") |
144 |
|
{ |
145 |
|
std::cerr << "Model cores modes.\n" |
146 |
|
"Available modes for --model-cores are:\n" |
147 |
|
"+ simple\n" |
148 |
|
" Only include a subset of variables whose values are sufficient to show the\n" |
149 |
|
" input formula is satisfied by the given model.\n" |
150 |
|
"+ non-implied\n" |
151 |
|
" Only include a subset of variables whose values, in addition to the values of\n" |
152 |
|
" variables whose values are implied, are sufficient to show the input formula\n" |
153 |
|
" is satisfied by the given model.\n" |
154 |
|
"+ none (default)\n" |
155 |
|
" Do not compute model cores.\n"; |
156 |
|
std::exit(1); |
157 |
|
} |
158 |
|
throw OptionException(std::string("unknown option for --model-cores: `") + |
159 |
|
optarg + "'. Try --model-cores=help."); |
160 |
|
} |
161 |
|
std::ostream& operator<<(std::ostream& os, ModelUninterpPrintMode mode) |
162 |
|
{ |
163 |
|
switch(mode) { |
164 |
|
case ModelUninterpPrintMode::None: |
165 |
|
return os << "ModelUninterpPrintMode::None"; |
166 |
|
case ModelUninterpPrintMode::DeclSortAndFun: |
167 |
|
return os << "ModelUninterpPrintMode::DeclSortAndFun"; |
168 |
|
case ModelUninterpPrintMode::DeclFun: |
169 |
|
return os << "ModelUninterpPrintMode::DeclFun"; |
170 |
|
default: |
171 |
|
Unreachable(); |
172 |
|
} |
173 |
|
return os; |
174 |
|
} |
175 |
1 |
ModelUninterpPrintMode stringToModelUninterpPrintMode(const std::string& optarg) |
176 |
|
{ |
177 |
1 |
if (optarg == "none") |
178 |
|
{ |
179 |
|
return ModelUninterpPrintMode::None; |
180 |
|
} |
181 |
1 |
else if (optarg == "decl-sort-and-fun") |
182 |
|
{ |
183 |
|
return ModelUninterpPrintMode::DeclSortAndFun; |
184 |
|
} |
185 |
1 |
else if (optarg == "decl-fun") |
186 |
|
{ |
187 |
1 |
return ModelUninterpPrintMode::DeclFun; |
188 |
|
} |
189 |
|
else if (optarg == "help") |
190 |
|
{ |
191 |
|
std::cerr << "uninterpreted elements in models printing modes.\n" |
192 |
|
"Available modes for --model-u-print are:\n" |
193 |
|
"+ none (default)\n" |
194 |
|
" (default) do not print declarations of uninterpreted elements in models.\n" |
195 |
|
"+ decl-sort-and-fun\n" |
196 |
|
" print uninterpreted elements declare-fun, and also include a declare-sort for\n" |
197 |
|
" the sort\n" |
198 |
|
"+ decl-fun\n" |
199 |
|
" print uninterpreted elements declare-fun, but don't include a declare-sort for\n" |
200 |
|
" the sort\n"; |
201 |
|
std::exit(1); |
202 |
|
} |
203 |
|
throw OptionException(std::string("unknown option for --model-u-print: `") + |
204 |
|
optarg + "'. Try --model-u-print=help."); |
205 |
|
} |
206 |
|
std::ostream& operator<<(std::ostream& os, ProduceInterpols mode) |
207 |
|
{ |
208 |
|
switch(mode) { |
209 |
|
case ProduceInterpols::DEFAULT: |
210 |
|
return os << "ProduceInterpols::DEFAULT"; |
211 |
|
case ProduceInterpols::NONE: |
212 |
|
return os << "ProduceInterpols::NONE"; |
213 |
|
case ProduceInterpols::CONJECTURE: |
214 |
|
return os << "ProduceInterpols::CONJECTURE"; |
215 |
|
case ProduceInterpols::ASSUMPTIONS: |
216 |
|
return os << "ProduceInterpols::ASSUMPTIONS"; |
217 |
|
case ProduceInterpols::SHARED: |
218 |
|
return os << "ProduceInterpols::SHARED"; |
219 |
|
case ProduceInterpols::ALL: |
220 |
|
return os << "ProduceInterpols::ALL"; |
221 |
|
default: |
222 |
|
Unreachable(); |
223 |
|
} |
224 |
|
return os; |
225 |
|
} |
226 |
11 |
ProduceInterpols stringToProduceInterpols(const std::string& optarg) |
227 |
|
{ |
228 |
11 |
if (optarg == "default") |
229 |
|
{ |
230 |
9 |
return ProduceInterpols::DEFAULT; |
231 |
|
} |
232 |
2 |
else if (optarg == "none") |
233 |
|
{ |
234 |
|
return ProduceInterpols::NONE; |
235 |
|
} |
236 |
2 |
else if (optarg == "conjecture") |
237 |
|
{ |
238 |
2 |
return ProduceInterpols::CONJECTURE; |
239 |
|
} |
240 |
|
else if (optarg == "assumptions") |
241 |
|
{ |
242 |
|
return ProduceInterpols::ASSUMPTIONS; |
243 |
|
} |
244 |
|
else if (optarg == "shared") |
245 |
|
{ |
246 |
|
return ProduceInterpols::SHARED; |
247 |
|
} |
248 |
|
else if (optarg == "all") |
249 |
|
{ |
250 |
|
return ProduceInterpols::ALL; |
251 |
|
} |
252 |
|
else if (optarg == "help") |
253 |
|
{ |
254 |
|
std::cerr << "Interpolants grammar mode\n" |
255 |
|
"Available modes for --produce-interpols are:\n" |
256 |
|
"+ default\n" |
257 |
|
" use the default grammar for the theory or the user-defined grammar if given\n" |
258 |
|
"+ none (default)\n" |
259 |
|
" don't compute interpolants\n" |
260 |
|
"+ conjecture\n" |
261 |
|
" use only operators that occur in the conjecture\n" |
262 |
|
"+ assumptions\n" |
263 |
|
" use only operators that occur in the assumptions\n" |
264 |
|
"+ shared\n" |
265 |
|
" use only operators that occur both in the assumptions and the conjecture\n" |
266 |
|
"+ all\n" |
267 |
|
" use only operators that occur either in the assumptions or the conjecture\n"; |
268 |
|
std::exit(1); |
269 |
|
} |
270 |
|
throw OptionException(std::string("unknown option for --produce-interpols: `") + |
271 |
|
optarg + "'. Try --produce-interpols=help."); |
272 |
|
} |
273 |
1 |
std::ostream& operator<<(std::ostream& os, SimplificationMode mode) |
274 |
|
{ |
275 |
1 |
switch(mode) { |
276 |
|
case SimplificationMode::BATCH: |
277 |
|
return os << "SimplificationMode::BATCH"; |
278 |
1 |
case SimplificationMode::NONE: |
279 |
1 |
return os << "SimplificationMode::NONE"; |
280 |
|
default: |
281 |
|
Unreachable(); |
282 |
|
} |
283 |
|
return os; |
284 |
|
} |
285 |
32 |
SimplificationMode stringToSimplificationMode(const std::string& optarg) |
286 |
|
{ |
287 |
32 |
if (optarg == "batch") |
288 |
|
{ |
289 |
|
return SimplificationMode::BATCH; |
290 |
|
} |
291 |
32 |
else if (optarg == "none") |
292 |
|
{ |
293 |
32 |
return SimplificationMode::NONE; |
294 |
|
} |
295 |
|
else if (optarg == "help") |
296 |
|
{ |
297 |
|
std::cerr << "Simplification modes.\n" |
298 |
|
"Available modes for --simplification are:\n" |
299 |
|
"+ batch (default)\n" |
300 |
|
" Save up all ASSERTions; run nonclausal simplification and clausal (MiniSat)\n" |
301 |
|
" propagation for all of them only after reaching a querying command (CHECKSAT\n" |
302 |
|
" or QUERY or predicate SUBTYPE declaration).\n" |
303 |
|
"+ none\n" |
304 |
|
" Do not perform nonclausal simplification.\n"; |
305 |
|
std::exit(1); |
306 |
|
} |
307 |
|
throw OptionException(std::string("unknown option for --simplification: `") + |
308 |
|
optarg + "'. Try --simplification=help."); |
309 |
|
} |
310 |
|
std::ostream& operator<<(std::ostream& os, SolveBVAsIntMode mode) |
311 |
|
{ |
312 |
|
switch(mode) { |
313 |
|
case SolveBVAsIntMode::OFF: |
314 |
|
return os << "SolveBVAsIntMode::OFF"; |
315 |
|
case SolveBVAsIntMode::SUM: |
316 |
|
return os << "SolveBVAsIntMode::SUM"; |
317 |
|
case SolveBVAsIntMode::BV: |
318 |
|
return os << "SolveBVAsIntMode::BV"; |
319 |
|
case SolveBVAsIntMode::IAND: |
320 |
|
return os << "SolveBVAsIntMode::IAND"; |
321 |
|
default: |
322 |
|
Unreachable(); |
323 |
|
} |
324 |
|
return os; |
325 |
|
} |
326 |
148 |
SolveBVAsIntMode stringToSolveBVAsIntMode(const std::string& optarg) |
327 |
|
{ |
328 |
148 |
if (optarg == "off") |
329 |
|
{ |
330 |
|
return SolveBVAsIntMode::OFF; |
331 |
|
} |
332 |
148 |
else if (optarg == "sum") |
333 |
|
{ |
334 |
95 |
return SolveBVAsIntMode::SUM; |
335 |
|
} |
336 |
53 |
else if (optarg == "bv") |
337 |
|
{ |
338 |
21 |
return SolveBVAsIntMode::BV; |
339 |
|
} |
340 |
32 |
else if (optarg == "iand") |
341 |
|
{ |
342 |
32 |
return SolveBVAsIntMode::IAND; |
343 |
|
} |
344 |
|
else if (optarg == "help") |
345 |
|
{ |
346 |
|
std::cerr << "solve-bv-as-int modes.\n" |
347 |
|
"Available modes for --solve-bv-as-int are:\n" |
348 |
|
"+ off (default)\n" |
349 |
|
" Do not translate bit-vectors to integers\n" |
350 |
|
"+ sum\n" |
351 |
|
" Generate a sum expression for each bvand instance, based on the value in\n" |
352 |
|
" --solbv-bv-as-int-granularity\n" |
353 |
|
"+ bv\n" |
354 |
|
" Translate bvand back to bit-vectors\n" |
355 |
|
"+ iand\n" |
356 |
|
" Translate bvand to the iand operator (experimental)\n"; |
357 |
|
std::exit(1); |
358 |
|
} |
359 |
|
throw OptionException(std::string("unknown option for --solve-bv-as-int: `") + |
360 |
|
optarg + "'. Try --solve-bv-as-int=help."); |
361 |
|
} |
362 |
|
std::ostream& operator<<(std::ostream& os, SygusSolutionOutMode mode) |
363 |
|
{ |
364 |
|
switch(mode) { |
365 |
|
case SygusSolutionOutMode::STATUS: |
366 |
|
return os << "SygusSolutionOutMode::STATUS"; |
367 |
|
case SygusSolutionOutMode::STANDARD: |
368 |
|
return os << "SygusSolutionOutMode::STANDARD"; |
369 |
|
case SygusSolutionOutMode::STATUS_OR_DEF: |
370 |
|
return os << "SygusSolutionOutMode::STATUS_OR_DEF"; |
371 |
|
case SygusSolutionOutMode::STATUS_AND_DEF: |
372 |
|
return os << "SygusSolutionOutMode::STATUS_AND_DEF"; |
373 |
|
default: |
374 |
|
Unreachable(); |
375 |
|
} |
376 |
|
return os; |
377 |
|
} |
378 |
183 |
SygusSolutionOutMode stringToSygusSolutionOutMode(const std::string& optarg) |
379 |
|
{ |
380 |
183 |
if (optarg == "status") |
381 |
|
{ |
382 |
183 |
return SygusSolutionOutMode::STATUS; |
383 |
|
} |
384 |
|
else if (optarg == "sygus-standard") |
385 |
|
{ |
386 |
|
return SygusSolutionOutMode::STANDARD; |
387 |
|
} |
388 |
|
else if (optarg == "status-or-def") |
389 |
|
{ |
390 |
|
return SygusSolutionOutMode::STATUS_OR_DEF; |
391 |
|
} |
392 |
|
else if (optarg == "status-and-def") |
393 |
|
{ |
394 |
|
return SygusSolutionOutMode::STATUS_AND_DEF; |
395 |
|
} |
396 |
|
else if (optarg == "help") |
397 |
|
{ |
398 |
|
std::cerr << "Modes for sygus solution output.\n" |
399 |
|
"Available modes for --sygus-out are:\n" |
400 |
|
"+ status\n" |
401 |
|
" Print only status for check-synth calls.\n" |
402 |
|
"+ sygus-standard (default)\n" |
403 |
|
" Print based on SyGuS standard.\n" |
404 |
|
"+ status-or-def\n" |
405 |
|
" Print status if infeasible, or definition corresponding to solution if\n" |
406 |
|
" feasible.\n" |
407 |
|
"+ status-and-def\n" |
408 |
|
" Print status followed by definition corresponding to solution.\n"; |
409 |
|
std::exit(1); |
410 |
|
} |
411 |
|
throw OptionException(std::string("unknown option for --sygus-out: `") + |
412 |
|
optarg + "'. Try --sygus-out=help."); |
413 |
|
} |
414 |
|
std::ostream& operator<<(std::ostream& os, UnsatCoresMode mode) |
415 |
|
{ |
416 |
|
switch(mode) { |
417 |
|
case UnsatCoresMode::OFF: |
418 |
|
return os << "UnsatCoresMode::OFF"; |
419 |
|
case UnsatCoresMode::ASSUMPTIONS: |
420 |
|
return os << "UnsatCoresMode::ASSUMPTIONS"; |
421 |
|
case UnsatCoresMode::FULL_PROOF: |
422 |
|
return os << "UnsatCoresMode::FULL_PROOF"; |
423 |
|
case UnsatCoresMode::SAT_PROOF: |
424 |
|
return os << "UnsatCoresMode::SAT_PROOF"; |
425 |
|
default: |
426 |
|
Unreachable(); |
427 |
|
} |
428 |
|
return os; |
429 |
|
} |
430 |
2 |
UnsatCoresMode stringToUnsatCoresMode(const std::string& optarg) |
431 |
|
{ |
432 |
2 |
if (optarg == "off") |
433 |
|
{ |
434 |
|
return UnsatCoresMode::OFF; |
435 |
|
} |
436 |
2 |
else if (optarg == "assumptions") |
437 |
|
{ |
438 |
|
return UnsatCoresMode::ASSUMPTIONS; |
439 |
|
} |
440 |
2 |
else if (optarg == "full-proof") |
441 |
|
{ |
442 |
|
return UnsatCoresMode::FULL_PROOF; |
443 |
|
} |
444 |
2 |
else if (optarg == "sat-proof") |
445 |
|
{ |
446 |
2 |
return UnsatCoresMode::SAT_PROOF; |
447 |
|
} |
448 |
|
else if (optarg == "help") |
449 |
|
{ |
450 |
|
std::cerr << "unsat cores modes.\n" |
451 |
|
"Available modes for --unsat-cores-mode are:\n" |
452 |
|
"+ off (default)\n" |
453 |
|
" Do not produce unsat cores.\n" |
454 |
|
"+ assumptions\n" |
455 |
|
" Produce unsat cores using solving under assumptions and preprocessing proofs.\n" |
456 |
|
"+ full-proof\n" |
457 |
|
" Produce unsat cores from full proofs.\n" |
458 |
|
"+ sat-proof\n" |
459 |
|
" Produce unsat cores from SAT and preprocessing proofs.\n"; |
460 |
|
std::exit(1); |
461 |
|
} |
462 |
|
throw OptionException(std::string("unknown option for --unsat-cores-mode: `") + |
463 |
|
optarg + "'. Try --unsat-cores-mode=help."); |
464 |
|
} |
465 |
|
|
466 |
|
namespace smt |
467 |
|
{ |
468 |
|
// clang-format off |
469 |
|
void setDefaultAbstractValues(Options& opts, bool value) |
470 |
|
{ |
471 |
|
if (!opts.smt.abstractValuesWasSetByUser) { |
472 |
|
opts.smt.abstractValues = value; |
473 |
|
} |
474 |
|
} |
475 |
|
void setDefaultAckermann(Options& opts, bool value) |
476 |
|
{ |
477 |
|
if (!opts.smt.ackermannWasSetByUser) { |
478 |
|
opts.smt.ackermann = value; |
479 |
|
} |
480 |
|
} |
481 |
|
void setDefaultBlockModelsMode(Options& opts, BlockModelsMode value) |
482 |
|
{ |
483 |
|
if (!opts.smt.blockModelsModeWasSetByUser) { |
484 |
|
opts.smt.blockModelsMode = value; |
485 |
|
} |
486 |
|
} |
487 |
|
void setDefaultBVAndIntegerGranularity(Options& opts, uint64_t value) |
488 |
|
{ |
489 |
|
if (!opts.smt.BVAndIntegerGranularityWasSetByUser) { |
490 |
|
opts.smt.BVAndIntegerGranularity = value; |
491 |
|
} |
492 |
|
} |
493 |
|
void setDefaultCheckAbducts(Options& opts, bool value) |
494 |
|
{ |
495 |
|
if (!opts.smt.checkAbductsWasSetByUser) { |
496 |
|
opts.smt.checkAbducts = value; |
497 |
|
} |
498 |
|
} |
499 |
|
void setDefaultCheckInterpols(Options& opts, bool value) |
500 |
|
{ |
501 |
|
if (!opts.smt.checkInterpolsWasSetByUser) { |
502 |
|
opts.smt.checkInterpols = value; |
503 |
|
} |
504 |
|
} |
505 |
|
void setDefaultCheckModels(Options& opts, bool value) |
506 |
|
{ |
507 |
|
if (!opts.smt.checkModelsWasSetByUser) { |
508 |
|
opts.smt.checkModels = value; |
509 |
|
} |
510 |
|
} |
511 |
|
void setDefaultCheckProofs(Options& opts, bool value) |
512 |
|
{ |
513 |
|
if (!opts.smt.checkProofsWasSetByUser) { |
514 |
|
opts.smt.checkProofs = value; |
515 |
|
} |
516 |
|
} |
517 |
|
void setDefaultCheckSynthSol(Options& opts, bool value) |
518 |
|
{ |
519 |
|
if (!opts.smt.checkSynthSolWasSetByUser) { |
520 |
|
opts.smt.checkSynthSol = value; |
521 |
|
} |
522 |
|
} |
523 |
|
void setDefaultCheckUnsatCores(Options& opts, bool value) |
524 |
|
{ |
525 |
|
if (!opts.smt.checkUnsatCoresWasSetByUser) { |
526 |
|
opts.smt.checkUnsatCores = value; |
527 |
|
} |
528 |
|
} |
529 |
|
void setDefaultDebugCheckModels(Options& opts, bool value) |
530 |
|
{ |
531 |
|
if (!opts.smt.debugCheckModelsWasSetByUser) { |
532 |
|
opts.smt.debugCheckModels = value; |
533 |
|
} |
534 |
|
} |
535 |
|
void setDefaultDumpToFileName(Options& opts, ManagedOut value) |
536 |
|
{ |
537 |
|
if (!opts.smt.dumpToFileNameWasSetByUser) { |
538 |
|
opts.smt.dumpToFileName = value; |
539 |
|
} |
540 |
|
} |
541 |
|
void setDefaultDumpModeString(Options& opts, std::string value) |
542 |
|
{ |
543 |
|
if (!opts.smt.dumpModeStringWasSetByUser) { |
544 |
|
opts.smt.dumpModeString = value; |
545 |
|
} |
546 |
|
} |
547 |
|
void setDefaultEarlyIteRemoval(Options& opts, bool value) |
548 |
|
{ |
549 |
|
if (!opts.smt.earlyIteRemovalWasSetByUser) { |
550 |
|
opts.smt.earlyIteRemoval = value; |
551 |
|
} |
552 |
|
} |
553 |
|
void setDefaultExpandDefinitions(Options& opts, bool value) |
554 |
|
{ |
555 |
|
if (!opts.smt.expandDefinitionsWasSetByUser) { |
556 |
|
opts.smt.expandDefinitions = value; |
557 |
|
} |
558 |
|
} |
559 |
|
void setDefaultExtRewPrep(Options& opts, bool value) |
560 |
|
{ |
561 |
|
if (!opts.smt.extRewPrepWasSetByUser) { |
562 |
|
opts.smt.extRewPrep = value; |
563 |
|
} |
564 |
|
} |
565 |
|
void setDefaultExtRewPrepAgg(Options& opts, bool value) |
566 |
|
{ |
567 |
|
if (!opts.smt.extRewPrepAggWasSetByUser) { |
568 |
|
opts.smt.extRewPrepAgg = value; |
569 |
|
} |
570 |
|
} |
571 |
|
void setDefaultForeignTheoryRewrite(Options& opts, bool value) |
572 |
|
{ |
573 |
|
if (!opts.smt.foreignTheoryRewriteWasSetByUser) { |
574 |
|
opts.smt.foreignTheoryRewrite = value; |
575 |
|
} |
576 |
|
} |
577 |
|
void setDefaultIandMode(Options& opts, IandMode value) |
578 |
|
{ |
579 |
|
if (!opts.smt.iandModeWasSetByUser) { |
580 |
|
opts.smt.iandMode = value; |
581 |
|
} |
582 |
|
} |
583 |
|
void setDefaultInteractiveMode(Options& opts, bool value) |
584 |
|
{ |
585 |
|
if (!opts.smt.interactiveModeWasSetByUser) { |
586 |
|
opts.smt.interactiveMode = value; |
587 |
|
} |
588 |
|
} |
589 |
|
void setDefaultDoITESimp(Options& opts, bool value) |
590 |
|
{ |
591 |
|
if (!opts.smt.doITESimpWasSetByUser) { |
592 |
|
opts.smt.doITESimp = value; |
593 |
|
} |
594 |
|
} |
595 |
|
void setDefaultLearnedRewrite(Options& opts, bool value) |
596 |
|
{ |
597 |
|
if (!opts.smt.learnedRewriteWasSetByUser) { |
598 |
|
opts.smt.learnedRewrite = value; |
599 |
|
} |
600 |
|
} |
601 |
|
void setDefaultMinimalUnsatCores(Options& opts, bool value) |
602 |
|
{ |
603 |
|
if (!opts.smt.minimalUnsatCoresWasSetByUser) { |
604 |
|
opts.smt.minimalUnsatCores = value; |
605 |
|
} |
606 |
|
} |
607 |
|
void setDefaultModelCoresMode(Options& opts, ModelCoresMode value) |
608 |
|
{ |
609 |
|
if (!opts.smt.modelCoresModeWasSetByUser) { |
610 |
|
opts.smt.modelCoresMode = value; |
611 |
|
} |
612 |
|
} |
613 |
|
void setDefaultModelUninterpPrint(Options& opts, ModelUninterpPrintMode value) |
614 |
|
{ |
615 |
|
if (!opts.smt.modelUninterpPrintWasSetByUser) { |
616 |
|
opts.smt.modelUninterpPrint = value; |
617 |
|
} |
618 |
|
} |
619 |
|
void setDefaultModelWitnessValue(Options& opts, bool value) |
620 |
|
{ |
621 |
|
if (!opts.smt.modelWitnessValueWasSetByUser) { |
622 |
|
opts.smt.modelWitnessValue = value; |
623 |
|
} |
624 |
|
} |
625 |
|
void setDefaultDoITESimpOnRepeat(Options& opts, bool value) |
626 |
|
{ |
627 |
|
if (!opts.smt.doITESimpOnRepeatWasSetByUser) { |
628 |
|
opts.smt.doITESimpOnRepeat = value; |
629 |
|
} |
630 |
|
} |
631 |
|
void setDefaultProduceAbducts(Options& opts, bool value) |
632 |
|
{ |
633 |
|
if (!opts.smt.produceAbductsWasSetByUser) { |
634 |
|
opts.smt.produceAbducts = value; |
635 |
|
} |
636 |
|
} |
637 |
|
void setDefaultProduceAssertions(Options& opts, bool value) |
638 |
|
{ |
639 |
|
if (!opts.smt.produceAssertionsWasSetByUser) { |
640 |
|
opts.smt.produceAssertions = value; |
641 |
|
} |
642 |
|
} |
643 |
|
void setDefaultProduceAssignments(Options& opts, bool value) |
644 |
|
{ |
645 |
|
if (!opts.smt.produceAssignmentsWasSetByUser) { |
646 |
|
opts.smt.produceAssignments = value; |
647 |
|
} |
648 |
|
} |
649 |
|
void setDefaultProduceInterpols(Options& opts, ProduceInterpols value) |
650 |
|
{ |
651 |
|
if (!opts.smt.produceInterpolsWasSetByUser) { |
652 |
|
opts.smt.produceInterpols = value; |
653 |
|
} |
654 |
|
} |
655 |
|
void setDefaultProduceModels(Options& opts, bool value) |
656 |
|
{ |
657 |
|
if (!opts.smt.produceModelsWasSetByUser) { |
658 |
|
opts.smt.produceModels = value; |
659 |
|
} |
660 |
|
} |
661 |
|
void setDefaultProduceProofs(Options& opts, bool value) |
662 |
|
{ |
663 |
|
if (!opts.smt.produceProofsWasSetByUser) { |
664 |
|
opts.smt.produceProofs = value; |
665 |
|
} |
666 |
|
} |
667 |
|
void setDefaultUnsatAssumptions(Options& opts, bool value) |
668 |
|
{ |
669 |
|
if (!opts.smt.unsatAssumptionsWasSetByUser) { |
670 |
|
opts.smt.unsatAssumptions = value; |
671 |
|
} |
672 |
|
} |
673 |
|
void setDefaultUnsatCores(Options& opts, bool value) |
674 |
|
{ |
675 |
|
if (!opts.smt.unsatCoresWasSetByUser) { |
676 |
|
opts.smt.unsatCores = value; |
677 |
|
} |
678 |
|
} |
679 |
|
void setDefaultRepeatSimp(Options& opts, bool value) |
680 |
|
{ |
681 |
|
if (!opts.smt.repeatSimpWasSetByUser) { |
682 |
|
opts.smt.repeatSimp = value; |
683 |
|
} |
684 |
|
} |
685 |
|
void setDefaultCompressItes(Options& opts, bool value) |
686 |
|
{ |
687 |
|
if (!opts.smt.compressItesWasSetByUser) { |
688 |
|
opts.smt.compressItes = value; |
689 |
|
} |
690 |
|
} |
691 |
|
void setDefaultZombieHuntThreshold(Options& opts, uint64_t value) |
692 |
|
{ |
693 |
|
if (!opts.smt.zombieHuntThresholdWasSetByUser) { |
694 |
|
opts.smt.zombieHuntThreshold = value; |
695 |
|
} |
696 |
|
} |
697 |
|
void setDefaultSimplifyWithCareEnabled(Options& opts, bool value) |
698 |
|
{ |
699 |
|
if (!opts.smt.simplifyWithCareEnabledWasSetByUser) { |
700 |
|
opts.smt.simplifyWithCareEnabled = value; |
701 |
|
} |
702 |
|
} |
703 |
|
void setDefaultSimplificationMode(Options& opts, SimplificationMode value) |
704 |
|
{ |
705 |
|
if (!opts.smt.simplificationModeWasSetByUser) { |
706 |
|
opts.smt.simplificationMode = value; |
707 |
|
} |
708 |
|
} |
709 |
|
void setDefaultSolveBVAsInt(Options& opts, SolveBVAsIntMode value) |
710 |
|
{ |
711 |
|
if (!opts.smt.solveBVAsIntWasSetByUser) { |
712 |
|
opts.smt.solveBVAsInt = value; |
713 |
|
} |
714 |
|
} |
715 |
|
void setDefaultSolveIntAsBV(Options& opts, uint64_t value) |
716 |
|
{ |
717 |
|
if (!opts.smt.solveIntAsBVWasSetByUser) { |
718 |
|
opts.smt.solveIntAsBV = value; |
719 |
|
} |
720 |
|
} |
721 |
|
void setDefaultSolveRealAsInt(Options& opts, bool value) |
722 |
|
{ |
723 |
|
if (!opts.smt.solveRealAsIntWasSetByUser) { |
724 |
|
opts.smt.solveRealAsInt = value; |
725 |
|
} |
726 |
|
} |
727 |
|
void setDefaultSortInference(Options& opts, bool value) |
728 |
|
{ |
729 |
|
if (!opts.smt.sortInferenceWasSetByUser) { |
730 |
|
opts.smt.sortInference = value; |
731 |
|
} |
732 |
|
} |
733 |
|
void setDefaultDoStaticLearning(Options& opts, bool value) |
734 |
|
{ |
735 |
|
if (!opts.smt.doStaticLearningWasSetByUser) { |
736 |
|
opts.smt.doStaticLearning = value; |
737 |
|
} |
738 |
|
} |
739 |
|
void setDefaultSygusOut(Options& opts, SygusSolutionOutMode value) |
740 |
|
{ |
741 |
|
if (!opts.smt.sygusOutWasSetByUser) { |
742 |
|
opts.smt.sygusOut = value; |
743 |
|
} |
744 |
|
} |
745 |
|
void setDefaultSygusPrintCallbacks(Options& opts, bool value) |
746 |
|
{ |
747 |
|
if (!opts.smt.sygusPrintCallbacksWasSetByUser) { |
748 |
|
opts.smt.sygusPrintCallbacks = value; |
749 |
|
} |
750 |
|
} |
751 |
|
void setDefaultUnconstrainedSimp(Options& opts, bool value) |
752 |
|
{ |
753 |
|
if (!opts.smt.unconstrainedSimpWasSetByUser) { |
754 |
|
opts.smt.unconstrainedSimp = value; |
755 |
|
} |
756 |
|
} |
757 |
|
void setDefaultUnsatCoresMode(Options& opts, UnsatCoresMode value) |
758 |
|
{ |
759 |
|
if (!opts.smt.unsatCoresModeWasSetByUser) { |
760 |
|
opts.smt.unsatCoresMode = value; |
761 |
|
} |
762 |
|
} |
763 |
|
// clang-format on |
764 |
|
} |
765 |
|
|
766 |
29505 |
} // namespace cvc5::options |
767 |
|
// clang-format on |