GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/smt_options.cpp Lines: 54 437 12.4 %
Date: 2021-09-10 Branches: 34 356 9.6 %

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::LITERALS:
32
      return os << "BlockModelsMode::LITERALS";
33
    case BlockModelsMode::NONE:
34
      return os << "BlockModelsMode::NONE";
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 == "literals")
45
  {
46
18
    return BlockModelsMode::LITERALS;
47
  }
48
3
  else if (optarg == "none")
49
  {
50
    return BlockModelsMode::NONE;
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
         "+ literals\n"
61
         "  Block models based on the SAT skeleton.\n"
62
         "+ none (default)\n"
63
         "  Do not block models.\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::BITWISE:
112
      return os << "IandMode::BITWISE";
113
    case IandMode::VALUE:
114
      return os << "IandMode::VALUE";
115
    case IandMode::SUM:
116
      return os << "IandMode::SUM";
117
    default:
118
      Unreachable();
119
  }
120
  return os;
121
}
122
67
IandMode stringToIandMode(const std::string& optarg)
123
{
124
67
  if (optarg == "bitwise")
125
  {
126
30
    return IandMode::BITWISE;
127
  }
128
37
  else if (optarg == "value")
129
  {
130
19
    return IandMode::VALUE;
131
  }
132
18
  else if (optarg == "sum")
133
  {
134
18
    return IandMode::SUM;
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
         "+ bitwise\n"
141
         "  use bitwise comparisons on binary representation of integer for refinement\n"
142
         "  (experimental)\n"
143
         "+ value (default)\n"
144
         "  value-based refinement\n"
145
         "+ sum\n"
146
         "  use sum to represent integer AND in refinement\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::DeclFun:
202
      return os << "ModelUninterpPrintMode::DeclFun";
203
    case ModelUninterpPrintMode::None:
204
      return os << "ModelUninterpPrintMode::None";
205
    case ModelUninterpPrintMode::DeclSortAndFun:
206
      return os << "ModelUninterpPrintMode::DeclSortAndFun";
207
    default:
208
      Unreachable();
209
  }
210
  return os;
211
}
212
1
ModelUninterpPrintMode stringToModelUninterpPrintMode(const std::string& optarg)
213
{
214
1
  if (optarg == "decl-fun")
215
  {
216
1
    return ModelUninterpPrintMode::DeclFun;
217
  }
218
  else if (optarg == "none")
219
  {
220
    return ModelUninterpPrintMode::None;
221
  }
222
  else if (optarg == "decl-sort-and-fun")
223
  {
224
    return ModelUninterpPrintMode::DeclSortAndFun;
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-fun\n"
231
         "  print uninterpreted elements declare-fun, but don't 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-sort-and-fun\n"
236
         "  print uninterpreted elements declare-fun, and also 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::SHARED:
249
      return os << "ProduceInterpols::SHARED";
250
    case ProduceInterpols::CONJECTURE:
251
      return os << "ProduceInterpols::CONJECTURE";
252
    case ProduceInterpols::NONE:
253
      return os << "ProduceInterpols::NONE";
254
    case ProduceInterpols::ALL:
255
      return os << "ProduceInterpols::ALL";
256
    case ProduceInterpols::DEFAULT:
257
      return os << "ProduceInterpols::DEFAULT";
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 == "shared")
270
  {
271
    return ProduceInterpols::SHARED;
272
  }
273
11
  else if (optarg == "conjecture")
274
  {
275
2
    return ProduceInterpols::CONJECTURE;
276
  }
277
9
  else if (optarg == "none")
278
  {
279
    return ProduceInterpols::NONE;
280
  }
281
9
  else if (optarg == "all")
282
  {
283
    return ProduceInterpols::ALL;
284
  }
285
9
  else if (optarg == "default")
286
  {
287
9
    return ProduceInterpols::DEFAULT;
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
         "+ shared\n"
296
         "  use only operators that occur both in the assumptions and the conjecture\n"
297
         "+ conjecture\n"
298
         "  use only operators that occur in the conjecture\n"
299
         "+ none (default)\n"
300
         "  don't compute interpolants\n"
301
         "+ all\n"
302
         "  use only operators that occur either in the assumptions or the conjecture\n"
303
         "+ default\n"
304
         "  use the default grammar for the theory or the user-defined grammar if given\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::BV:
351
      return os << "SolveBVAsIntMode::BV";
352
    case SolveBVAsIntMode::IAND:
353
      return os << "SolveBVAsIntMode::IAND";
354
    case SolveBVAsIntMode::SUM:
355
      return os << "SolveBVAsIntMode::SUM";
356
    case SolveBVAsIntMode::OFF:
357
      return os << "SolveBVAsIntMode::OFF";
358
    default:
359
      Unreachable();
360
  }
361
  return os;
362
}
363
148
SolveBVAsIntMode stringToSolveBVAsIntMode(const std::string& optarg)
364
{
365
148
  if (optarg == "bv")
366
  {
367
21
    return SolveBVAsIntMode::BV;
368
  }
369
127
  else if (optarg == "iand")
370
  {
371
32
    return SolveBVAsIntMode::IAND;
372
  }
373
95
  else if (optarg == "sum")
374
  {
375
95
    return SolveBVAsIntMode::SUM;
376
  }
377
  else if (optarg == "off")
378
  {
379
    return SolveBVAsIntMode::OFF;
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
         "+ bv\n"
386
         "  Translate bvand back to bit-vectors\n"
387
         "+ iand\n"
388
         "  Translate bvand to the iand operator (experimental)\n"
389
         "+ sum\n"
390
         "  Generate a sum expression for each bvand instance, based on the value in\n"
391
         "  --solbv-bv-as-int-granularity\n"
392
         "+ off (default)\n"
393
         "  Do not translate bit-vectors to integers\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_AND_DEF:
405
      return os << "SygusSolutionOutMode::STATUS_AND_DEF";
406
    case SygusSolutionOutMode::STATUS:
407
      return os << "SygusSolutionOutMode::STATUS";
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-and-def")
422
  {
423
    return SygusSolutionOutMode::STATUS_AND_DEF;
424
  }
425
183
  else if (optarg == "status")
426
  {
427
183
    return SygusSolutionOutMode::STATUS;
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-and-def\n"
441
         "  Print status followed by definition corresponding to solution.\n"
442
         "+ status\n"
443
         "  Print only status for check-synth calls.\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::SAT_PROOF:
455
      return os << "UnsatCoresMode::SAT_PROOF";
456
    case UnsatCoresMode::ASSUMPTIONS:
457
      return os << "UnsatCoresMode::ASSUMPTIONS";
458
    case UnsatCoresMode::FULL_PROOF:
459
      return os << "UnsatCoresMode::FULL_PROOF";
460
    case UnsatCoresMode::OFF:
461
      return os << "UnsatCoresMode::OFF";
462
    default:
463
      Unreachable();
464
  }
465
  return os;
466
}
467
2
UnsatCoresMode stringToUnsatCoresMode(const std::string& optarg)
468
{
469
2
  if (optarg == "sat-proof")
470
  {
471
2
    return UnsatCoresMode::SAT_PROOF;
472
  }
473
  else if (optarg == "assumptions")
474
  {
475
    return UnsatCoresMode::ASSUMPTIONS;
476
  }
477
  else if (optarg == "full-proof")
478
  {
479
    return UnsatCoresMode::FULL_PROOF;
480
  }
481
  else if (optarg == "off")
482
  {
483
    return UnsatCoresMode::OFF;
484
  }
485
  else if (optarg == "help")
486
  {
487
    std::cerr << "unsat cores modes.\n"
488
         "Available modes for --unsat-cores-mode are:\n"
489
         "+ sat-proof\n"
490
         "  Produce unsat cores from SAT and preprocessing proofs.\n"
491
         "+ assumptions\n"
492
         "  Produce unsat cores using solving under assumptions and preprocessing proofs.\n"
493
         "+ full-proof\n"
494
         "  Produce unsat cores from full proofs.\n"
495
         "+ off (default)\n"
496
         "  Do not produce unsat cores.\n";
497
    std::exit(1);
498
  }
499
  throw OptionException(std::string("unknown option for --unsat-cores-mode: `") +
500
                        optarg + "'.  Try --unsat-cores-mode=help.");
501
}
502
503
namespace smt
504
{
505
// clang-format off
506
void setDefaultAbstractValues(Options& opts, bool value)
507
{
508
    if (!opts.smt.abstractValuesWasSetByUser) {
509
        opts.smt.abstractValues = value;
510
    }
511
}
512
void setDefaultAckermann(Options& opts, bool value)
513
{
514
    if (!opts.smt.ackermannWasSetByUser) {
515
        opts.smt.ackermann = value;
516
    }
517
}
518
void setDefaultBlockModelsMode(Options& opts, BlockModelsMode value)
519
{
520
    if (!opts.smt.blockModelsModeWasSetByUser) {
521
        opts.smt.blockModelsMode = value;
522
    }
523
}
524
void setDefaultBVAndIntegerGranularity(Options& opts, uint64_t value)
525
{
526
    if (!opts.smt.BVAndIntegerGranularityWasSetByUser) {
527
        opts.smt.BVAndIntegerGranularity = value;
528
    }
529
}
530
void setDefaultCheckAbducts(Options& opts, bool value)
531
{
532
    if (!opts.smt.checkAbductsWasSetByUser) {
533
        opts.smt.checkAbducts = value;
534
    }
535
}
536
void setDefaultCheckInterpols(Options& opts, bool value)
537
{
538
    if (!opts.smt.checkInterpolsWasSetByUser) {
539
        opts.smt.checkInterpols = value;
540
    }
541
}
542
void setDefaultCheckModels(Options& opts, bool value)
543
{
544
    if (!opts.smt.checkModelsWasSetByUser) {
545
        opts.smt.checkModels = value;
546
    }
547
}
548
void setDefaultCheckProofs(Options& opts, bool value)
549
{
550
    if (!opts.smt.checkProofsWasSetByUser) {
551
        opts.smt.checkProofs = value;
552
    }
553
}
554
void setDefaultCheckSynthSol(Options& opts, bool value)
555
{
556
    if (!opts.smt.checkSynthSolWasSetByUser) {
557
        opts.smt.checkSynthSol = value;
558
    }
559
}
560
void setDefaultCheckUnsatCores(Options& opts, bool value)
561
{
562
    if (!opts.smt.checkUnsatCoresWasSetByUser) {
563
        opts.smt.checkUnsatCores = value;
564
    }
565
}
566
void setDefaultDebugCheckModels(Options& opts, bool value)
567
{
568
    if (!opts.smt.debugCheckModelsWasSetByUser) {
569
        opts.smt.debugCheckModels = value;
570
    }
571
}
572
void setDefaultDifficultyMode(Options& opts, DifficultyMode value)
573
{
574
    if (!opts.smt.difficultyModeWasSetByUser) {
575
        opts.smt.difficultyMode = value;
576
    }
577
}
578
void setDefaultDumpToFileName(Options& opts, ManagedOut value)
579
{
580
    if (!opts.smt.dumpToFileNameWasSetByUser) {
581
        opts.smt.dumpToFileName = value;
582
    }
583
}
584
void setDefaultDumpModeString(Options& opts, std::string value)
585
{
586
    if (!opts.smt.dumpModeStringWasSetByUser) {
587
        opts.smt.dumpModeString = value;
588
    }
589
}
590
void setDefaultEarlyIteRemoval(Options& opts, bool value)
591
{
592
    if (!opts.smt.earlyIteRemovalWasSetByUser) {
593
        opts.smt.earlyIteRemoval = value;
594
    }
595
}
596
void setDefaultExpandDefinitions(Options& opts, bool value)
597
{
598
    if (!opts.smt.expandDefinitionsWasSetByUser) {
599
        opts.smt.expandDefinitions = value;
600
    }
601
}
602
void setDefaultExtRewPrep(Options& opts, bool value)
603
{
604
    if (!opts.smt.extRewPrepWasSetByUser) {
605
        opts.smt.extRewPrep = value;
606
    }
607
}
608
void setDefaultExtRewPrepAgg(Options& opts, bool value)
609
{
610
    if (!opts.smt.extRewPrepAggWasSetByUser) {
611
        opts.smt.extRewPrepAgg = value;
612
    }
613
}
614
void setDefaultForeignTheoryRewrite(Options& opts, bool value)
615
{
616
    if (!opts.smt.foreignTheoryRewriteWasSetByUser) {
617
        opts.smt.foreignTheoryRewrite = value;
618
    }
619
}
620
void setDefaultIandMode(Options& opts, IandMode value)
621
{
622
    if (!opts.smt.iandModeWasSetByUser) {
623
        opts.smt.iandMode = value;
624
    }
625
}
626
void setDefaultInteractiveMode(Options& opts, bool value)
627
{
628
    if (!opts.smt.interactiveModeWasSetByUser) {
629
        opts.smt.interactiveMode = value;
630
    }
631
}
632
void setDefaultDoITESimp(Options& opts, bool value)
633
{
634
    if (!opts.smt.doITESimpWasSetByUser) {
635
        opts.smt.doITESimp = value;
636
    }
637
}
638
void setDefaultLearnedRewrite(Options& opts, bool value)
639
{
640
    if (!opts.smt.learnedRewriteWasSetByUser) {
641
        opts.smt.learnedRewrite = value;
642
    }
643
}
644
void setDefaultMinimalUnsatCores(Options& opts, bool value)
645
{
646
    if (!opts.smt.minimalUnsatCoresWasSetByUser) {
647
        opts.smt.minimalUnsatCores = value;
648
    }
649
}
650
void setDefaultModelCoresMode(Options& opts, ModelCoresMode value)
651
{
652
    if (!opts.smt.modelCoresModeWasSetByUser) {
653
        opts.smt.modelCoresMode = value;
654
    }
655
}
656
void setDefaultModelUninterpPrint(Options& opts, ModelUninterpPrintMode value)
657
{
658
    if (!opts.smt.modelUninterpPrintWasSetByUser) {
659
        opts.smt.modelUninterpPrint = value;
660
    }
661
}
662
void setDefaultModelWitnessValue(Options& opts, bool value)
663
{
664
    if (!opts.smt.modelWitnessValueWasSetByUser) {
665
        opts.smt.modelWitnessValue = value;
666
    }
667
}
668
void setDefaultDoITESimpOnRepeat(Options& opts, bool value)
669
{
670
    if (!opts.smt.doITESimpOnRepeatWasSetByUser) {
671
        opts.smt.doITESimpOnRepeat = value;
672
    }
673
}
674
void setDefaultProduceAbducts(Options& opts, bool value)
675
{
676
    if (!opts.smt.produceAbductsWasSetByUser) {
677
        opts.smt.produceAbducts = value;
678
    }
679
}
680
void setDefaultProduceAssertions(Options& opts, bool value)
681
{
682
    if (!opts.smt.produceAssertionsWasSetByUser) {
683
        opts.smt.produceAssertions = value;
684
    }
685
}
686
void setDefaultProduceAssignments(Options& opts, bool value)
687
{
688
    if (!opts.smt.produceAssignmentsWasSetByUser) {
689
        opts.smt.produceAssignments = value;
690
    }
691
}
692
void setDefaultProduceInterpols(Options& opts, ProduceInterpols value)
693
{
694
    if (!opts.smt.produceInterpolsWasSetByUser) {
695
        opts.smt.produceInterpols = value;
696
    }
697
}
698
void setDefaultProduceModels(Options& opts, bool value)
699
{
700
    if (!opts.smt.produceModelsWasSetByUser) {
701
        opts.smt.produceModels = value;
702
    }
703
}
704
void setDefaultProduceProofs(Options& opts, bool value)
705
{
706
    if (!opts.smt.produceProofsWasSetByUser) {
707
        opts.smt.produceProofs = value;
708
    }
709
}
710
void setDefaultUnsatAssumptions(Options& opts, bool value)
711
{
712
    if (!opts.smt.unsatAssumptionsWasSetByUser) {
713
        opts.smt.unsatAssumptions = value;
714
    }
715
}
716
void setDefaultUnsatCores(Options& opts, bool value)
717
{
718
    if (!opts.smt.unsatCoresWasSetByUser) {
719
        opts.smt.unsatCores = value;
720
    }
721
}
722
void setDefaultRepeatSimp(Options& opts, bool value)
723
{
724
    if (!opts.smt.repeatSimpWasSetByUser) {
725
        opts.smt.repeatSimp = value;
726
    }
727
}
728
void setDefaultCompressItes(Options& opts, bool value)
729
{
730
    if (!opts.smt.compressItesWasSetByUser) {
731
        opts.smt.compressItes = value;
732
    }
733
}
734
void setDefaultZombieHuntThreshold(Options& opts, uint64_t value)
735
{
736
    if (!opts.smt.zombieHuntThresholdWasSetByUser) {
737
        opts.smt.zombieHuntThreshold = value;
738
    }
739
}
740
void setDefaultSimplifyWithCareEnabled(Options& opts, bool value)
741
{
742
    if (!opts.smt.simplifyWithCareEnabledWasSetByUser) {
743
        opts.smt.simplifyWithCareEnabled = value;
744
    }
745
}
746
void setDefaultSimplificationMode(Options& opts, SimplificationMode value)
747
{
748
    if (!opts.smt.simplificationModeWasSetByUser) {
749
        opts.smt.simplificationMode = value;
750
    }
751
}
752
void setDefaultSolveBVAsInt(Options& opts, SolveBVAsIntMode value)
753
{
754
    if (!opts.smt.solveBVAsIntWasSetByUser) {
755
        opts.smt.solveBVAsInt = value;
756
    }
757
}
758
void setDefaultSolveIntAsBV(Options& opts, uint64_t value)
759
{
760
    if (!opts.smt.solveIntAsBVWasSetByUser) {
761
        opts.smt.solveIntAsBV = value;
762
    }
763
}
764
void setDefaultSolveRealAsInt(Options& opts, bool value)
765
{
766
    if (!opts.smt.solveRealAsIntWasSetByUser) {
767
        opts.smt.solveRealAsInt = value;
768
    }
769
}
770
void setDefaultSortInference(Options& opts, bool value)
771
{
772
    if (!opts.smt.sortInferenceWasSetByUser) {
773
        opts.smt.sortInference = value;
774
    }
775
}
776
void setDefaultDoStaticLearning(Options& opts, bool value)
777
{
778
    if (!opts.smt.doStaticLearningWasSetByUser) {
779
        opts.smt.doStaticLearning = value;
780
    }
781
}
782
void setDefaultSygusOut(Options& opts, SygusSolutionOutMode value)
783
{
784
    if (!opts.smt.sygusOutWasSetByUser) {
785
        opts.smt.sygusOut = value;
786
    }
787
}
788
void setDefaultSygusPrintCallbacks(Options& opts, bool value)
789
{
790
    if (!opts.smt.sygusPrintCallbacksWasSetByUser) {
791
        opts.smt.sygusPrintCallbacks = value;
792
    }
793
}
794
void setDefaultUnconstrainedSimp(Options& opts, bool value)
795
{
796
    if (!opts.smt.unconstrainedSimpWasSetByUser) {
797
        opts.smt.unconstrainedSimp = value;
798
    }
799
}
800
void setDefaultUnsatCoresMode(Options& opts, UnsatCoresMode value)
801
{
802
    if (!opts.smt.unsatCoresModeWasSetByUser) {
803
        opts.smt.unsatCoresMode = value;
804
    }
805
}
806
// clang-format on
807
}
808
809
29502
}  // namespace cvc5::options
810
// clang-format on