GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/arith_options.cpp Lines: 13 419 3.1 %
Date: 2021-08-17 Branches: 10 306 3.3 %

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/arith_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, ArithPropagationMode mode)
29
{
30
  switch(mode) {
31
    case ArithPropagationMode::UNATE_PROP:
32
      return os << "ArithPropagationMode::UNATE_PROP";
33
    case ArithPropagationMode::BOUND_INFERENCE_PROP:
34
      return os << "ArithPropagationMode::BOUND_INFERENCE_PROP";
35
    case ArithPropagationMode::BOTH_PROP:
36
      return os << "ArithPropagationMode::BOTH_PROP";
37
    case ArithPropagationMode::NO_PROP:
38
      return os << "ArithPropagationMode::NO_PROP";
39
    default:
40
      Unreachable();
41
  }
42
  return os;
43
}
44
ArithPropagationMode stringToArithPropagationMode(const std::string& optarg)
45
{
46
  if (optarg == "unate")
47
  {
48
    return ArithPropagationMode::UNATE_PROP;
49
  }
50
  else if (optarg == "bi")
51
  {
52
    return ArithPropagationMode::BOUND_INFERENCE_PROP;
53
  }
54
  else if (optarg == "both")
55
  {
56
    return ArithPropagationMode::BOTH_PROP;
57
  }
58
  else if (optarg == "none")
59
  {
60
    return ArithPropagationMode::NO_PROP;
61
  }
62
  else if (optarg == "help")
63
  {
64
    std::cerr << "This decides on kind of propagation arithmetic attempts to do during the\n"
65
         "search.\n"
66
         "Available modes for --arith-prop are:\n"
67
         "+ unate\n"
68
         "  Use constraints to do unate propagation.\n"
69
         "+ bi\n"
70
         "  (Bounds Inference) infers bounds on basic variables using the upper and lower\n"
71
         "  bounds of the non-basic variables in the tableau.\n"
72
         "+ both (default)\n"
73
         "  Use bounds inference and unate.\n"
74
         "+ none\n";
75
    std::exit(1);
76
  }
77
  throw OptionException(std::string("unknown option for --arith-prop: `") +
78
                        optarg + "'.  Try --arith-prop=help.");
79
}
80
std::ostream& operator<<(std::ostream& os, ErrorSelectionRule mode)
81
{
82
  switch(mode) {
83
    case ErrorSelectionRule::MINIMUM_AMOUNT:
84
      return os << "ErrorSelectionRule::MINIMUM_AMOUNT";
85
    case ErrorSelectionRule::SUM_METRIC:
86
      return os << "ErrorSelectionRule::SUM_METRIC";
87
    case ErrorSelectionRule::MAXIMUM_AMOUNT:
88
      return os << "ErrorSelectionRule::MAXIMUM_AMOUNT";
89
    case ErrorSelectionRule::VAR_ORDER:
90
      return os << "ErrorSelectionRule::VAR_ORDER";
91
    default:
92
      Unreachable();
93
  }
94
  return os;
95
}
96
ErrorSelectionRule stringToErrorSelectionRule(const std::string& optarg)
97
{
98
  if (optarg == "min")
99
  {
100
    return ErrorSelectionRule::MINIMUM_AMOUNT;
101
  }
102
  else if (optarg == "sum")
103
  {
104
    return ErrorSelectionRule::SUM_METRIC;
105
  }
106
  else if (optarg == "max")
107
  {
108
    return ErrorSelectionRule::MAXIMUM_AMOUNT;
109
  }
110
  else if (optarg == "varord")
111
  {
112
    return ErrorSelectionRule::VAR_ORDER;
113
  }
114
  else if (optarg == "help")
115
  {
116
    std::cerr << "This decides on the rule used by simplex during heuristic rounds for deciding\n"
117
         "the next basic variable to select.\n"
118
         "Available rules for --error-selection-rule are:\n"
119
         "+ min (default)\n"
120
         "  The minimum abs() value of the variable's violation of its bound.\n"
121
         "+ sum\n"
122
         "+ max\n"
123
         "  The maximum violation the bound.\n"
124
         "+ varord\n"
125
         "  The variable order.\n";
126
    std::exit(1);
127
  }
128
  throw OptionException(std::string("unknown option for --error-selection-rule: `") +
129
                        optarg + "'.  Try --error-selection-rule=help.");
130
}
131
std::ostream& operator<<(std::ostream& os, NlCadLiftingMode mode)
132
{
133
  switch(mode) {
134
    case NlCadLiftingMode::LAZARD:
135
      return os << "NlCadLiftingMode::LAZARD";
136
    case NlCadLiftingMode::REGULAR:
137
      return os << "NlCadLiftingMode::REGULAR";
138
    default:
139
      Unreachable();
140
  }
141
  return os;
142
}
143
NlCadLiftingMode stringToNlCadLiftingMode(const std::string& optarg)
144
{
145
  if (optarg == "lazard")
146
  {
147
    return NlCadLiftingMode::LAZARD;
148
  }
149
  else if (optarg == "regular")
150
  {
151
    return NlCadLiftingMode::REGULAR;
152
  }
153
  else if (optarg == "help")
154
  {
155
    std::cerr << "Modes for the CAD lifting in non-linear arithmetic.\n"
156
         "Available modes for --nl-cad-lift are:\n"
157
         "+ lazard\n"
158
         "  Lazard's lifting scheme.\n"
159
         "+ regular (default)\n"
160
         "  Regular lifting.\n";
161
    std::exit(1);
162
  }
163
  throw OptionException(std::string("unknown option for --nl-cad-lift: `") +
164
                        optarg + "'.  Try --nl-cad-lift=help.");
165
}
166
std::ostream& operator<<(std::ostream& os, NlCadProjectionMode mode)
167
{
168
  switch(mode) {
169
    case NlCadProjectionMode::LAZARD:
170
      return os << "NlCadProjectionMode::LAZARD";
171
    case NlCadProjectionMode::MCCALLUM:
172
      return os << "NlCadProjectionMode::MCCALLUM";
173
    case NlCadProjectionMode::LAZARDMOD:
174
      return os << "NlCadProjectionMode::LAZARDMOD";
175
    default:
176
      Unreachable();
177
  }
178
  return os;
179
}
180
NlCadProjectionMode stringToNlCadProjectionMode(const std::string& optarg)
181
{
182
  if (optarg == "lazard")
183
  {
184
    return NlCadProjectionMode::LAZARD;
185
  }
186
  else if (optarg == "mccallum")
187
  {
188
    return NlCadProjectionMode::MCCALLUM;
189
  }
190
  else if (optarg == "lazard-mod")
191
  {
192
    return NlCadProjectionMode::LAZARDMOD;
193
  }
194
  else if (optarg == "help")
195
  {
196
    std::cerr << "Modes for the CAD projection operator in non-linear arithmetic.\n"
197
         "Available modes for --nl-cad-proj are:\n"
198
         "+ lazard\n"
199
         "  Lazard's projection operator.\n"
200
         "+ mccallum (default)\n"
201
         "  McCallum's projection operator.\n"
202
         "+ lazard-mod\n"
203
         "  A modification of Lazard's projection operator.\n";
204
    std::exit(1);
205
  }
206
  throw OptionException(std::string("unknown option for --nl-cad-proj: `") +
207
                        optarg + "'.  Try --nl-cad-proj=help.");
208
}
209
std::ostream& operator<<(std::ostream& os, NlExtMode mode)
210
{
211
  switch(mode) {
212
    case NlExtMode::LIGHT:
213
      return os << "NlExtMode::LIGHT";
214
    case NlExtMode::FULL:
215
      return os << "NlExtMode::FULL";
216
    case NlExtMode::NONE:
217
      return os << "NlExtMode::NONE";
218
    default:
219
      Unreachable();
220
  }
221
  return os;
222
}
223
125
NlExtMode stringToNlExtMode(const std::string& optarg)
224
{
225
125
  if (optarg == "light")
226
  {
227
    return NlExtMode::LIGHT;
228
  }
229
125
  else if (optarg == "full")
230
  {
231
119
    return NlExtMode::FULL;
232
  }
233
6
  else if (optarg == "none")
234
  {
235
6
    return NlExtMode::NONE;
236
  }
237
  else if (optarg == "help")
238
  {
239
    std::cerr << "Modes for the non-linear linearization\n"
240
         "Available modes for --nl-ext are:\n"
241
         "+ light\n"
242
         "  Only use a few light-weight lemma schemes\n"
243
         "+ full (default)\n"
244
         "  Use all lemma schemes\n"
245
         "+ none\n"
246
         "  Disable linearization approach\n";
247
    std::exit(1);
248
  }
249
  throw OptionException(std::string("unknown option for --nl-ext: `") +
250
                        optarg + "'.  Try --nl-ext=help.");
251
}
252
std::ostream& operator<<(std::ostream& os, NlRlvMode mode)
253
{
254
  switch(mode) {
255
    case NlRlvMode::INTERLEAVE:
256
      return os << "NlRlvMode::INTERLEAVE";
257
    case NlRlvMode::ALWAYS:
258
      return os << "NlRlvMode::ALWAYS";
259
    case NlRlvMode::NONE:
260
      return os << "NlRlvMode::NONE";
261
    default:
262
      Unreachable();
263
  }
264
  return os;
265
}
266
10
NlRlvMode stringToNlRlvMode(const std::string& optarg)
267
{
268
10
  if (optarg == "interleave")
269
  {
270
    return NlRlvMode::INTERLEAVE;
271
  }
272
10
  else if (optarg == "always")
273
  {
274
7
    return NlRlvMode::ALWAYS;
275
  }
276
3
  else if (optarg == "none")
277
  {
278
3
    return NlRlvMode::NONE;
279
  }
280
  else if (optarg == "help")
281
  {
282
    std::cerr << "Modes for using relevance of assertions in non-linear arithmetic.\n"
283
         "Available modes for --nl-rlv are:\n"
284
         "+ interleave\n"
285
         "  Alternate rounds using relevance.\n"
286
         "+ always\n"
287
         "  Always use relevance.\n"
288
         "+ none (default)\n"
289
         "  Do not use relevance.\n";
290
    std::exit(1);
291
  }
292
  throw OptionException(std::string("unknown option for --nl-rlv: `") +
293
                        optarg + "'.  Try --nl-rlv=help.");
294
}
295
std::ostream& operator<<(std::ostream& os, ArithUnateLemmaMode mode)
296
{
297
  switch(mode) {
298
    case ArithUnateLemmaMode::ALL:
299
      return os << "ArithUnateLemmaMode::ALL";
300
    case ArithUnateLemmaMode::EQUALITY:
301
      return os << "ArithUnateLemmaMode::EQUALITY";
302
    case ArithUnateLemmaMode::NO:
303
      return os << "ArithUnateLemmaMode::NO";
304
    case ArithUnateLemmaMode::INEQUALITY:
305
      return os << "ArithUnateLemmaMode::INEQUALITY";
306
    default:
307
      Unreachable();
308
  }
309
  return os;
310
}
311
ArithUnateLemmaMode stringToArithUnateLemmaMode(const std::string& optarg)
312
{
313
  if (optarg == "all")
314
  {
315
    return ArithUnateLemmaMode::ALL;
316
  }
317
  else if (optarg == "eqs")
318
  {
319
    return ArithUnateLemmaMode::EQUALITY;
320
  }
321
  else if (optarg == "none")
322
  {
323
    return ArithUnateLemmaMode::NO;
324
  }
325
  else if (optarg == "ineqs")
326
  {
327
    return ArithUnateLemmaMode::INEQUALITY;
328
  }
329
  else if (optarg == "help")
330
  {
331
    std::cerr << "Unate lemmas are generated before SAT search begins using the relationship of\n"
332
         "constant terms and polynomials.\n"
333
         "Available modes for --unate-lemmas are:\n"
334
         "+ all (default)\n"
335
         "  A combination of inequalities and equalities.\n"
336
         "+ eqs\n"
337
         "  Outputs lemmas of the general forms (= p c) implies (<= p d) for c < d, or (=\n"
338
         "  p c) implies (not (= p d)) for c != d.\n"
339
         "+ none\n"
340
         "+ ineqs\n"
341
         "  Outputs lemmas of the general form (<= p c) implies (<= p d) for c < d.\n";
342
    std::exit(1);
343
  }
344
  throw OptionException(std::string("unknown option for --unate-lemmas: `") +
345
                        optarg + "'.  Try --unate-lemmas=help.");
346
}
347
348
namespace arith
349
{
350
// clang-format off
351
void setDefaultMaxApproxDepth(Options& opts, int64_t value)
352
{
353
    if (!opts.arith.maxApproxDepthWasSetByUser) {
354
        opts.arith.maxApproxDepth = value;
355
    }
356
}
357
void setDefaultBrabTest(Options& opts, bool value)
358
{
359
    if (!opts.arith.brabTestWasSetByUser) {
360
        opts.arith.brabTest = value;
361
    }
362
}
363
void setDefaultArithCongMan(Options& opts, bool value)
364
{
365
    if (!opts.arith.arithCongManWasSetByUser) {
366
        opts.arith.arithCongMan = value;
367
    }
368
}
369
void setDefaultArithEqSolver(Options& opts, bool value)
370
{
371
    if (!opts.arith.arithEqSolverWasSetByUser) {
372
        opts.arith.arithEqSolver = value;
373
    }
374
}
375
void setDefaultArithNoPartialFun(Options& opts, bool value)
376
{
377
    if (!opts.arith.arithNoPartialFunWasSetByUser) {
378
        opts.arith.arithNoPartialFun = value;
379
    }
380
}
381
void setDefaultArithPropAsLemmaLength(Options& opts, uint64_t value)
382
{
383
    if (!opts.arith.arithPropAsLemmaLengthWasSetByUser) {
384
        opts.arith.arithPropAsLemmaLength = value;
385
    }
386
}
387
void setDefaultArithPropagationMode(Options& opts, ArithPropagationMode value)
388
{
389
    if (!opts.arith.arithPropagationModeWasSetByUser) {
390
        opts.arith.arithPropagationMode = value;
391
    }
392
}
393
void setDefaultArithRewriteEq(Options& opts, bool value)
394
{
395
    if (!opts.arith.arithRewriteEqWasSetByUser) {
396
        opts.arith.arithRewriteEq = value;
397
    }
398
}
399
void setDefaultCollectPivots(Options& opts, bool value)
400
{
401
    if (!opts.arith.collectPivotsWasSetByUser) {
402
        opts.arith.collectPivots = value;
403
    }
404
}
405
void setDefaultDoCutAllBounded(Options& opts, bool value)
406
{
407
    if (!opts.arith.doCutAllBoundedWasSetByUser) {
408
        opts.arith.doCutAllBounded = value;
409
    }
410
}
411
void setDefaultExportDioDecompositions(Options& opts, bool value)
412
{
413
    if (!opts.arith.exportDioDecompositionsWasSetByUser) {
414
        opts.arith.exportDioDecompositions = value;
415
    }
416
}
417
void setDefaultDioRepeat(Options& opts, bool value)
418
{
419
    if (!opts.arith.dioRepeatWasSetByUser) {
420
        opts.arith.dioRepeat = value;
421
    }
422
}
423
void setDefaultArithDioSolver(Options& opts, bool value)
424
{
425
    if (!opts.arith.arithDioSolverWasSetByUser) {
426
        opts.arith.arithDioSolver = value;
427
    }
428
}
429
void setDefaultDioSolverTurns(Options& opts, int64_t value)
430
{
431
    if (!opts.arith.dioSolverTurnsWasSetByUser) {
432
        opts.arith.dioSolverTurns = value;
433
    }
434
}
435
void setDefaultArithErrorSelectionRule(Options& opts, ErrorSelectionRule value)
436
{
437
    if (!opts.arith.arithErrorSelectionRuleWasSetByUser) {
438
        opts.arith.arithErrorSelectionRule = value;
439
    }
440
}
441
void setDefaultHavePenalties(Options& opts, bool value)
442
{
443
    if (!opts.arith.havePenaltiesWasSetByUser) {
444
        opts.arith.havePenalties = value;
445
    }
446
}
447
void setDefaultArithHeuristicPivots(Options& opts, int64_t value)
448
{
449
    if (!opts.arith.arithHeuristicPivotsWasSetByUser) {
450
        opts.arith.arithHeuristicPivots = value;
451
    }
452
}
453
void setDefaultReplayFailureLemma(Options& opts, bool value)
454
{
455
    if (!opts.arith.replayFailureLemmaWasSetByUser) {
456
        opts.arith.replayFailureLemma = value;
457
    }
458
}
459
void setDefaultMaxCutsInContext(Options& opts, uint64_t value)
460
{
461
    if (!opts.arith.maxCutsInContextWasSetByUser) {
462
        opts.arith.maxCutsInContext = value;
463
    }
464
}
465
void setDefaultArithMLTrick(Options& opts, bool value)
466
{
467
    if (!opts.arith.arithMLTrickWasSetByUser) {
468
        opts.arith.arithMLTrick = value;
469
    }
470
}
471
void setDefaultArithMLTrickSubstitutions(Options& opts, uint64_t value)
472
{
473
    if (!opts.arith.arithMLTrickSubstitutionsWasSetByUser) {
474
        opts.arith.arithMLTrickSubstitutions = value;
475
    }
476
}
477
void setDefaultNewProp(Options& opts, bool value)
478
{
479
    if (!opts.arith.newPropWasSetByUser) {
480
        opts.arith.newProp = value;
481
    }
482
}
483
void setDefaultNlCad(Options& opts, bool value)
484
{
485
    if (!opts.arith.nlCadWasSetByUser) {
486
        opts.arith.nlCad = value;
487
    }
488
}
489
void setDefaultNlCadUseInitial(Options& opts, bool value)
490
{
491
    if (!opts.arith.nlCadUseInitialWasSetByUser) {
492
        opts.arith.nlCadUseInitial = value;
493
    }
494
}
495
void setDefaultNlCadLifting(Options& opts, NlCadLiftingMode value)
496
{
497
    if (!opts.arith.nlCadLiftingWasSetByUser) {
498
        opts.arith.nlCadLifting = value;
499
    }
500
}
501
void setDefaultNlCadProjection(Options& opts, NlCadProjectionMode value)
502
{
503
    if (!opts.arith.nlCadProjectionWasSetByUser) {
504
        opts.arith.nlCadProjection = value;
505
    }
506
}
507
void setDefaultNlExtEntailConflicts(Options& opts, bool value)
508
{
509
    if (!opts.arith.nlExtEntailConflictsWasSetByUser) {
510
        opts.arith.nlExtEntailConflicts = value;
511
    }
512
}
513
void setDefaultNlExtFactor(Options& opts, bool value)
514
{
515
    if (!opts.arith.nlExtFactorWasSetByUser) {
516
        opts.arith.nlExtFactor = value;
517
    }
518
}
519
void setDefaultNlExtIncPrecision(Options& opts, bool value)
520
{
521
    if (!opts.arith.nlExtIncPrecisionWasSetByUser) {
522
        opts.arith.nlExtIncPrecision = value;
523
    }
524
}
525
void setDefaultNlExtPurify(Options& opts, bool value)
526
{
527
    if (!opts.arith.nlExtPurifyWasSetByUser) {
528
        opts.arith.nlExtPurify = value;
529
    }
530
}
531
void setDefaultNlExtResBound(Options& opts, bool value)
532
{
533
    if (!opts.arith.nlExtResBoundWasSetByUser) {
534
        opts.arith.nlExtResBound = value;
535
    }
536
}
537
void setDefaultNlExtRewrites(Options& opts, bool value)
538
{
539
    if (!opts.arith.nlExtRewritesWasSetByUser) {
540
        opts.arith.nlExtRewrites = value;
541
    }
542
}
543
void setDefaultNlExtSplitZero(Options& opts, bool value)
544
{
545
    if (!opts.arith.nlExtSplitZeroWasSetByUser) {
546
        opts.arith.nlExtSplitZero = value;
547
    }
548
}
549
void setDefaultNlExtTfTaylorDegree(Options& opts, int64_t value)
550
{
551
    if (!opts.arith.nlExtTfTaylorDegreeWasSetByUser) {
552
        opts.arith.nlExtTfTaylorDegree = value;
553
    }
554
}
555
void setDefaultNlExtTfTangentPlanes(Options& opts, bool value)
556
{
557
    if (!opts.arith.nlExtTfTangentPlanesWasSetByUser) {
558
        opts.arith.nlExtTfTangentPlanes = value;
559
    }
560
}
561
void setDefaultNlExtTangentPlanes(Options& opts, bool value)
562
{
563
    if (!opts.arith.nlExtTangentPlanesWasSetByUser) {
564
        opts.arith.nlExtTangentPlanes = value;
565
    }
566
}
567
void setDefaultNlExtTangentPlanesInterleave(Options& opts, bool value)
568
{
569
    if (!opts.arith.nlExtTangentPlanesInterleaveWasSetByUser) {
570
        opts.arith.nlExtTangentPlanesInterleave = value;
571
    }
572
}
573
void setDefaultNlExt(Options& opts, NlExtMode value)
574
{
575
    if (!opts.arith.nlExtWasSetByUser) {
576
        opts.arith.nlExt = value;
577
    }
578
}
579
void setDefaultNlICP(Options& opts, bool value)
580
{
581
    if (!opts.arith.nlICPWasSetByUser) {
582
        opts.arith.nlICP = value;
583
    }
584
}
585
void setDefaultNlRlvMode(Options& opts, NlRlvMode value)
586
{
587
    if (!opts.arith.nlRlvModeWasSetByUser) {
588
        opts.arith.nlRlvMode = value;
589
    }
590
}
591
void setDefaultPbRewrites(Options& opts, bool value)
592
{
593
    if (!opts.arith.pbRewritesWasSetByUser) {
594
        opts.arith.pbRewrites = value;
595
    }
596
}
597
void setDefaultArithPivotThreshold(Options& opts, uint64_t value)
598
{
599
    if (!opts.arith.arithPivotThresholdWasSetByUser) {
600
        opts.arith.arithPivotThreshold = value;
601
    }
602
}
603
void setDefaultPpAssertMaxSubSize(Options& opts, uint64_t value)
604
{
605
    if (!opts.arith.ppAssertMaxSubSizeWasSetByUser) {
606
        opts.arith.ppAssertMaxSubSize = value;
607
    }
608
}
609
void setDefaultArithPropagateMaxLength(Options& opts, uint64_t value)
610
{
611
    if (!opts.arith.arithPropagateMaxLengthWasSetByUser) {
612
        opts.arith.arithPropagateMaxLength = value;
613
    }
614
}
615
void setDefaultReplayEarlyCloseDepths(Options& opts, int64_t value)
616
{
617
    if (!opts.arith.replayEarlyCloseDepthsWasSetByUser) {
618
        opts.arith.replayEarlyCloseDepths = value;
619
    }
620
}
621
void setDefaultReplayFailurePenalty(Options& opts, int64_t value)
622
{
623
    if (!opts.arith.replayFailurePenaltyWasSetByUser) {
624
        opts.arith.replayFailurePenalty = value;
625
    }
626
}
627
void setDefaultLemmaRejectCutSize(Options& opts, uint64_t value)
628
{
629
    if (!opts.arith.lemmaRejectCutSizeWasSetByUser) {
630
        opts.arith.lemmaRejectCutSize = value;
631
    }
632
}
633
void setDefaultReplayNumericFailurePenalty(Options& opts, int64_t value)
634
{
635
    if (!opts.arith.replayNumericFailurePenaltyWasSetByUser) {
636
        opts.arith.replayNumericFailurePenalty = value;
637
    }
638
}
639
void setDefaultReplayRejectCutSize(Options& opts, uint64_t value)
640
{
641
    if (!opts.arith.replayRejectCutSizeWasSetByUser) {
642
        opts.arith.replayRejectCutSize = value;
643
    }
644
}
645
void setDefaultSoiApproxMajorFailurePen(Options& opts, int64_t value)
646
{
647
    if (!opts.arith.soiApproxMajorFailurePenWasSetByUser) {
648
        opts.arith.soiApproxMajorFailurePen = value;
649
    }
650
}
651
void setDefaultSoiApproxMajorFailure(Options& opts, double value)
652
{
653
    if (!opts.arith.soiApproxMajorFailureWasSetByUser) {
654
        opts.arith.soiApproxMajorFailure = value;
655
    }
656
}
657
void setDefaultSoiApproxMinorFailurePen(Options& opts, int64_t value)
658
{
659
    if (!opts.arith.soiApproxMinorFailurePenWasSetByUser) {
660
        opts.arith.soiApproxMinorFailurePen = value;
661
    }
662
}
663
void setDefaultSoiApproxMinorFailure(Options& opts, double value)
664
{
665
    if (!opts.arith.soiApproxMinorFailureWasSetByUser) {
666
        opts.arith.soiApproxMinorFailure = value;
667
    }
668
}
669
void setDefaultRestrictedPivots(Options& opts, bool value)
670
{
671
    if (!opts.arith.restrictedPivotsWasSetByUser) {
672
        opts.arith.restrictedPivots = value;
673
    }
674
}
675
void setDefaultRevertArithModels(Options& opts, bool value)
676
{
677
    if (!opts.arith.revertArithModelsWasSetByUser) {
678
        opts.arith.revertArithModels = value;
679
    }
680
}
681
void setDefaultRrTurns(Options& opts, int64_t value)
682
{
683
    if (!opts.arith.rrTurnsWasSetByUser) {
684
        opts.arith.rrTurns = value;
685
    }
686
}
687
void setDefaultTrySolveIntStandardEffort(Options& opts, bool value)
688
{
689
    if (!opts.arith.trySolveIntStandardEffortWasSetByUser) {
690
        opts.arith.trySolveIntStandardEffort = value;
691
    }
692
}
693
void setDefaultArithSimplexCheckPeriod(Options& opts, uint64_t value)
694
{
695
    if (!opts.arith.arithSimplexCheckPeriodWasSetByUser) {
696
        opts.arith.arithSimplexCheckPeriod = value;
697
    }
698
}
699
void setDefaultSoiQuickExplain(Options& opts, bool value)
700
{
701
    if (!opts.arith.soiQuickExplainWasSetByUser) {
702
        opts.arith.soiQuickExplain = value;
703
    }
704
}
705
void setDefaultArithStandardCheckVarOrderPivots(Options& opts, int64_t value)
706
{
707
    if (!opts.arith.arithStandardCheckVarOrderPivotsWasSetByUser) {
708
        opts.arith.arithStandardCheckVarOrderPivots = value;
709
    }
710
}
711
void setDefaultArithUnateLemmaMode(Options& opts, ArithUnateLemmaMode value)
712
{
713
    if (!opts.arith.arithUnateLemmaModeWasSetByUser) {
714
        opts.arith.arithUnateLemmaMode = value;
715
    }
716
}
717
void setDefaultUseApprox(Options& opts, bool value)
718
{
719
    if (!opts.arith.useApproxWasSetByUser) {
720
        opts.arith.useApprox = value;
721
    }
722
}
723
void setDefaultUseFC(Options& opts, bool value)
724
{
725
    if (!opts.arith.useFCWasSetByUser) {
726
        opts.arith.useFC = value;
727
    }
728
}
729
void setDefaultUseSOI(Options& opts, bool value)
730
{
731
    if (!opts.arith.useSOIWasSetByUser) {
732
        opts.arith.useSOI = value;
733
    }
734
}
735
// clang-format on
736
}
737
738
29337
}  // namespace cvc5::options
739
// clang-format on