GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/smt_options.cpp Lines: 57 415 13.7 %
Date: 2021-09-07 Branches: 37 333 11.1 %

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::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
67
IandMode stringToIandMode(const std::string& optarg)
86
{
87
67
  if (optarg == "bitwise")
88
  {
89
30
    return IandMode::BITWISE;
90
  }
91
37
  else if (optarg == "value")
92
  {
93
19
    return IandMode::VALUE;
94
  }
95
18
  else if (optarg == "sum")
96
  {
97
18
    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
8
ModelCoresMode stringToModelCoresMode(const std::string& optarg)
130
{
131
8
  if (optarg == "non-implied")
132
  {
133
4
    return ModelCoresMode::NON_IMPLIED;
134
  }
135
4
  else if (optarg == "simple")
136
  {
137
4
    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::DeclSortAndFun:
165
      return os << "ModelUninterpPrintMode::DeclSortAndFun";
166
    case ModelUninterpPrintMode::None:
167
      return os << "ModelUninterpPrintMode::None";
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 == "decl-sort-and-fun")
178
  {
179
    return ModelUninterpPrintMode::DeclSortAndFun;
180
  }
181
1
  else if (optarg == "none")
182
  {
183
    return ModelUninterpPrintMode::None;
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
         "+ decl-sort-and-fun\n"
194
         "  print uninterpreted elements declare-fun, and also include a declare-sort for\n"
195
         "  the sort\n"
196
         "+ none (default)\n"
197
         "  (default) do not print declarations of uninterpreted elements in models.\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::CONJECTURE:
210
      return os << "ProduceInterpols::CONJECTURE";
211
    case ProduceInterpols::SHARED:
212
      return os << "ProduceInterpols::SHARED";
213
    case ProduceInterpols::NONE:
214
      return os << "ProduceInterpols::NONE";
215
    case ProduceInterpols::ALL:
216
      return os << "ProduceInterpols::ALL";
217
    case ProduceInterpols::ASSUMPTIONS:
218
      return os << "ProduceInterpols::ASSUMPTIONS";
219
    case ProduceInterpols::DEFAULT:
220
      return os << "ProduceInterpols::DEFAULT";
221
    default:
222
      Unreachable();
223
  }
224
  return os;
225
}
226
11
ProduceInterpols stringToProduceInterpols(const std::string& optarg)
227
{
228
11
  if (optarg == "conjecture")
229
  {
230
2
    return ProduceInterpols::CONJECTURE;
231
  }
232
9
  else if (optarg == "shared")
233
  {
234
    return ProduceInterpols::SHARED;
235
  }
236
9
  else if (optarg == "none")
237
  {
238
    return ProduceInterpols::NONE;
239
  }
240
9
  else if (optarg == "all")
241
  {
242
    return ProduceInterpols::ALL;
243
  }
244
9
  else if (optarg == "assumptions")
245
  {
246
    return ProduceInterpols::ASSUMPTIONS;
247
  }
248
9
  else if (optarg == "default")
249
  {
250
9
    return ProduceInterpols::DEFAULT;
251
  }
252
  else if (optarg == "help")
253
  {
254
    std::cerr << "Interpolants grammar mode\n"
255
         "Available modes for --produce-interpols are:\n"
256
         "+ conjecture\n"
257
         "  use only operators that occur in the conjecture\n"
258
         "+ shared\n"
259
         "  use only operators that occur both in the assumptions and the conjecture\n"
260
         "+ none (default)\n"
261
         "  don't compute interpolants\n"
262
         "+ all\n"
263
         "  use only operators that occur either in the assumptions or the conjecture\n"
264
         "+ assumptions\n"
265
         "  use only operators that occur in the assumptions\n"
266
         "+ default\n"
267
         "  use the default grammar for the theory or the user-defined grammar if given\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::IAND:
314
      return os << "SolveBVAsIntMode::IAND";
315
    case SolveBVAsIntMode::OFF:
316
      return os << "SolveBVAsIntMode::OFF";
317
    case SolveBVAsIntMode::BV:
318
      return os << "SolveBVAsIntMode::BV";
319
    case SolveBVAsIntMode::SUM:
320
      return os << "SolveBVAsIntMode::SUM";
321
    default:
322
      Unreachable();
323
  }
324
  return os;
325
}
326
148
SolveBVAsIntMode stringToSolveBVAsIntMode(const std::string& optarg)
327
{
328
148
  if (optarg == "iand")
329
  {
330
32
    return SolveBVAsIntMode::IAND;
331
  }
332
116
  else if (optarg == "off")
333
  {
334
    return SolveBVAsIntMode::OFF;
335
  }
336
116
  else if (optarg == "bv")
337
  {
338
21
    return SolveBVAsIntMode::BV;
339
  }
340
95
  else if (optarg == "sum")
341
  {
342
95
    return SolveBVAsIntMode::SUM;
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
         "+ iand\n"
349
         "  Translate bvand to the iand operator (experimental)\n"
350
         "+ off (default)\n"
351
         "  Do not translate bit-vectors to integers\n"
352
         "+ bv\n"
353
         "  Translate bvand back to bit-vectors\n"
354
         "+ sum\n"
355
         "  Generate a sum expression for each bvand instance, based on the value in\n"
356
         "  --solbv-bv-as-int-granularity\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_AND_DEF:
366
      return os << "SygusSolutionOutMode::STATUS_AND_DEF";
367
    case SygusSolutionOutMode::STATUS:
368
      return os << "SygusSolutionOutMode::STATUS";
369
    case SygusSolutionOutMode::STANDARD:
370
      return os << "SygusSolutionOutMode::STANDARD";
371
    case SygusSolutionOutMode::STATUS_OR_DEF:
372
      return os << "SygusSolutionOutMode::STATUS_OR_DEF";
373
    default:
374
      Unreachable();
375
  }
376
  return os;
377
}
378
183
SygusSolutionOutMode stringToSygusSolutionOutMode(const std::string& optarg)
379
{
380
183
  if (optarg == "status-and-def")
381
  {
382
    return SygusSolutionOutMode::STATUS_AND_DEF;
383
  }
384
183
  else if (optarg == "status")
385
  {
386
183
    return SygusSolutionOutMode::STATUS;
387
  }
388
  else if (optarg == "sygus-standard")
389
  {
390
    return SygusSolutionOutMode::STANDARD;
391
  }
392
  else if (optarg == "status-or-def")
393
  {
394
    return SygusSolutionOutMode::STATUS_OR_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-and-def\n"
401
         "  Print status followed by definition corresponding to solution.\n"
402
         "+ status\n"
403
         "  Print only status for check-synth calls.\n"
404
         "+ sygus-standard (default)\n"
405
         "  Print based on SyGuS standard.\n"
406
         "+ status-or-def\n"
407
         "  Print status if infeasible, or definition corresponding to solution if\n"
408
         "  feasible.\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::FULL_PROOF:
418
      return os << "UnsatCoresMode::FULL_PROOF";
419
    case UnsatCoresMode::OFF:
420
      return os << "UnsatCoresMode::OFF";
421
    case UnsatCoresMode::SAT_PROOF:
422
      return os << "UnsatCoresMode::SAT_PROOF";
423
    case UnsatCoresMode::ASSUMPTIONS:
424
      return os << "UnsatCoresMode::ASSUMPTIONS";
425
    default:
426
      Unreachable();
427
  }
428
  return os;
429
}
430
2
UnsatCoresMode stringToUnsatCoresMode(const std::string& optarg)
431
{
432
2
  if (optarg == "full-proof")
433
  {
434
    return UnsatCoresMode::FULL_PROOF;
435
  }
436
2
  else if (optarg == "off")
437
  {
438
    return UnsatCoresMode::OFF;
439
  }
440
2
  else if (optarg == "sat-proof")
441
  {
442
2
    return UnsatCoresMode::SAT_PROOF;
443
  }
444
  else if (optarg == "assumptions")
445
  {
446
    return UnsatCoresMode::ASSUMPTIONS;
447
  }
448
  else if (optarg == "help")
449
  {
450
    std::cerr << "unsat cores modes.\n"
451
         "Available modes for --unsat-cores-mode are:\n"
452
         "+ full-proof\n"
453
         "  Produce unsat cores from full proofs.\n"
454
         "+ off (default)\n"
455
         "  Do not produce unsat cores.\n"
456
         "+ sat-proof\n"
457
         "  Produce unsat cores from SAT and preprocessing proofs.\n"
458
         "+ assumptions\n"
459
         "  Produce unsat cores using solving under assumptions 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
29502
}  // namespace cvc5::options
767
// clang-format on