GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/smt_options.cpp Lines: 56 419 13.4 %
Date: 2021-08-14 Branches: 36 336 10.7 %

Line Exec Source
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::VALUES:
34
      return os << "BlockModelsMode::VALUES";
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 == "none")
45
  {
46
    return BlockModelsMode::NONE;
47
  }
48
21
  else if (optarg == "values")
49
  {
50
3
    return BlockModelsMode::VALUES;
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
         "+ none (default)\n"
61
         "  Do not block models.\n"
62
         "+ values\n"
63
         "  Block models based on the concrete model values for the free variables.\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::BITWISE:
75
      return os << "IandMode::BITWISE";
76
    case IandMode::SUM:
77
      return os << "IandMode::SUM";
78
    case IandMode::VALUE:
79
      return os << "IandMode::VALUE";
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 == "sum")
92
  {
93
19
    return IandMode::SUM;
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
         "+ bitwise\n"
104
         "  use bitwise comparisons on binary representation of integer for refinement\n"
105
         "  (experimental)\n"
106
         "+ sum\n"
107
         "  use sum to represent integer AND in refinement\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::NONE:
119
      return os << "ModelCoresMode::NONE";
120
    case ModelCoresMode::SIMPLE:
121
      return os << "ModelCoresMode::SIMPLE";
122
    case ModelCoresMode::NON_IMPLIED:
123
      return os << "ModelCoresMode::NON_IMPLIED";
124
    default:
125
      Unreachable();
126
  }
127
  return os;
128
}
129
6
ModelCoresMode stringToModelCoresMode(const std::string& optarg)
130
{
131
6
  if (optarg == "none")
132
  {
133
    return ModelCoresMode::NONE;
134
  }
135
6
  else if (optarg == "simple")
136
  {
137
2
    return ModelCoresMode::SIMPLE;
138
  }
139
4
  else if (optarg == "non-implied")
140
  {
141
4
    return ModelCoresMode::NON_IMPLIED;
142
  }
143
  else if (optarg == "help")
144
  {
145
    std::cerr << "Model cores modes.\n"
146
         "Available modes for --model-cores are:\n"
147
         "+ none (default)\n"
148
         "  Do not compute model cores.\n"
149
         "+ simple\n"
150
         "  Only include a subset of variables whose values are sufficient to show the\n"
151
         "  input formula is satisfied by the given model.\n"
152
         "+ non-implied\n"
153
         "  Only include a subset of variables whose values, in addition to the values of\n"
154
         "  variables whose values are implied, are sufficient to show the input formula\n"
155
         "  is satisfied by the given model.\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::None:
167
      return os << "ModelUninterpPrintMode::None";
168
    case ModelUninterpPrintMode::DeclFun:
169
      return os << "ModelUninterpPrintMode::DeclFun";
170
    case ModelUninterpPrintMode::DeclSortAndFun:
171
      return os << "ModelUninterpPrintMode::DeclSortAndFun";
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 == "none")
184
  {
185
    return ModelUninterpPrintMode::None;
186
  }
187
1
  else if (optarg == "decl-fun")
188
  {
189
1
    return ModelUninterpPrintMode::DeclFun;
190
  }
191
  else if (optarg == "decl-sort-and-fun")
192
  {
193
    return ModelUninterpPrintMode::DeclSortAndFun;
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
         "+ none (default)\n"
203
         "  (default) do not print declarations of uninterpreted elements in models.\n"
204
         "+ decl-fun\n"
205
         "  print uninterpreted elements declare-fun, but don't include a declare-sort for\n"
206
         "  the sort\n"
207
         "+ decl-sort-and-fun\n"
208
         "  print uninterpreted elements declare-fun, and also 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::NONE:
219
      return os << "ProduceInterpols::NONE";
220
    case ProduceInterpols::SHARED:
221
      return os << "ProduceInterpols::SHARED";
222
    case ProduceInterpols::ASSUMPTIONS:
223
      return os << "ProduceInterpols::ASSUMPTIONS";
224
    case ProduceInterpols::DEFAULT:
225
      return os << "ProduceInterpols::DEFAULT";
226
    case ProduceInterpols::CONJECTURE:
227
      return os << "ProduceInterpols::CONJECTURE";
228
    case ProduceInterpols::ALL:
229
      return os << "ProduceInterpols::ALL";
230
    default:
231
      Unreachable();
232
  }
233
  return os;
234
}
235
11
ProduceInterpols stringToProduceInterpols(const std::string& optarg)
236
{
237
11
  if (optarg == "none")
238
  {
239
    return ProduceInterpols::NONE;
240
  }
241
11
  else if (optarg == "shared")
242
  {
243
    return ProduceInterpols::SHARED;
244
  }
245
11
  else if (optarg == "assumptions")
246
  {
247
    return ProduceInterpols::ASSUMPTIONS;
248
  }
249
11
  else if (optarg == "default")
250
  {
251
9
    return ProduceInterpols::DEFAULT;
252
  }
253
2
  else if (optarg == "conjecture")
254
  {
255
2
    return ProduceInterpols::CONJECTURE;
256
  }
257
  else if (optarg == "all")
258
  {
259
    return ProduceInterpols::ALL;
260
  }
261
  else if (optarg == "help")
262
  {
263
    std::cerr << "Interpolants grammar mode\n"
264
         "Available modes for --produce-interpols are:\n"
265
         "+ none (default)\n"
266
         "  don't compute interpolants\n"
267
         "+ shared\n"
268
         "  use only operators that occur both in the assumptions and the conjecture\n"
269
         "+ assumptions\n"
270
         "  use only operators that occur in the assumptions\n"
271
         "+ default\n"
272
         "  use the default grammar for the theory or the user-defined grammar if given\n"
273
         "+ conjecture\n"
274
         "  use only operators that occur in the conjecture\n"
275
         "+ all\n"
276
         "  use only operators that occur either in the assumptions or the conjecture\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::BV:
323
      return os << "SolveBVAsIntMode::BV";
324
    case SolveBVAsIntMode::IAND:
325
      return os << "SolveBVAsIntMode::IAND";
326
    case SolveBVAsIntMode::OFF:
327
      return os << "SolveBVAsIntMode::OFF";
328
    case SolveBVAsIntMode::SUM:
329
      return os << "SolveBVAsIntMode::SUM";
330
    default:
331
      Unreachable();
332
  }
333
  return os;
334
}
335
149
SolveBVAsIntMode stringToSolveBVAsIntMode(const std::string& optarg)
336
{
337
149
  if (optarg == "bv")
338
  {
339
21
    return SolveBVAsIntMode::BV;
340
  }
341
128
  else if (optarg == "iand")
342
  {
343
33
    return SolveBVAsIntMode::IAND;
344
  }
345
95
  else if (optarg == "off")
346
  {
347
    return SolveBVAsIntMode::OFF;
348
  }
349
95
  else if (optarg == "sum")
350
  {
351
95
    return SolveBVAsIntMode::SUM;
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
         "+ bv\n"
358
         "  Translate bvand back to bit-vectors\n"
359
         "+ iand\n"
360
         "  Translate bvand to the iand operator (experimental)\n"
361
         "+ off (default)\n"
362
         "  Do not translate bit-vectors to integers\n"
363
         "+ sum\n"
364
         "  Generate a sum expression for each bvand instance, based on the value in\n"
365
         "  --solbv-bv-as-int-granularity\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:
375
      return os << "SygusSolutionOutMode::STATUS";
376
    case SygusSolutionOutMode::STATUS_OR_DEF:
377
      return os << "SygusSolutionOutMode::STATUS_OR_DEF";
378
    case SygusSolutionOutMode::STANDARD:
379
      return os << "SygusSolutionOutMode::STANDARD";
380
    case SygusSolutionOutMode::STATUS_AND_DEF:
381
      return os << "SygusSolutionOutMode::STATUS_AND_DEF";
382
    default:
383
      Unreachable();
384
  }
385
  return os;
386
}
387
182
SygusSolutionOutMode stringToSygusSolutionOutMode(const std::string& optarg)
388
{
389
182
  if (optarg == "status")
390
  {
391
182
    return SygusSolutionOutMode::STATUS;
392
  }
393
  else if (optarg == "status-or-def")
394
  {
395
    return SygusSolutionOutMode::STATUS_OR_DEF;
396
  }
397
  else if (optarg == "sygus-standard")
398
  {
399
    return SygusSolutionOutMode::STANDARD;
400
  }
401
  else if (optarg == "status-and-def")
402
  {
403
    return SygusSolutionOutMode::STATUS_AND_DEF;
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\n"
410
         "  Print only status for check-synth calls.\n"
411
         "+ status-or-def\n"
412
         "  Print status if infeasible, or definition corresponding to solution if\n"
413
         "  feasible.\n"
414
         "+ sygus-standard (default)\n"
415
         "  Print based on SyGuS standard.\n"
416
         "+ status-and-def\n"
417
         "  Print status followed by definition corresponding to solution.\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::ASSUMPTIONS:
427
      return os << "UnsatCoresMode::ASSUMPTIONS";
428
    case UnsatCoresMode::SAT_PROOF:
429
      return os << "UnsatCoresMode::SAT_PROOF";
430
    case UnsatCoresMode::OFF:
431
      return os << "UnsatCoresMode::OFF";
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 == "assumptions")
442
  {
443
    return UnsatCoresMode::ASSUMPTIONS;
444
  }
445
2
  else if (optarg == "sat-proof")
446
  {
447
2
    return UnsatCoresMode::SAT_PROOF;
448
  }
449
  else if (optarg == "off")
450
  {
451
    return UnsatCoresMode::OFF;
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
         "+ assumptions\n"
462
         "  Produce unsat cores using solving under assumptions and preprocessing proofs.\n"
463
         "+ sat-proof\n"
464
         "  Produce unsat cores from SAT and preprocessing proofs.\n"
465
         "+ off (default)\n"
466
         "  Do not produce unsat cores.\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
29340
}  // namespace cvc5::options
776
// clang-format on