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