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