GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/smt_options.cpp Lines: 54 427 12.6 %
Date: 2021-08-01 Branches: 34 340 10.0 %

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