GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/arith_options.cpp Lines: 12 419 2.9 %
Date: 2021-08-06 Branches: 9 306 2.9 %

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