GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/quantifiers_options.cpp Lines: 52 1399 3.7 %
Date: 2021-09-07 Branches: 35 1068 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/quantifiers_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, CegisSampleMode mode)
29
{
30
  switch(mode) {
31
    case CegisSampleMode::USE:
32
      return os << "CegisSampleMode::USE";
33
    case CegisSampleMode::TRUST:
34
      return os << "CegisSampleMode::TRUST";
35
    case CegisSampleMode::NONE:
36
      return os << "CegisSampleMode::NONE";
37
    default:
38
      Unreachable();
39
  }
40
  return os;
41
}
42
3
CegisSampleMode stringToCegisSampleMode(const std::string& optarg)
43
{
44
3
  if (optarg == "use")
45
  {
46
2
    return CegisSampleMode::USE;
47
  }
48
1
  else if (optarg == "trust")
49
  {
50
1
    return CegisSampleMode::TRUST;
51
  }
52
  else if (optarg == "none")
53
  {
54
    return CegisSampleMode::NONE;
55
  }
56
  else if (optarg == "help")
57
  {
58
    std::cerr << "Modes for sampling with counterexample-guided inductive synthesis (CEGIS).\n"
59
         "Available modes for --cegis-sample are:\n"
60
         "+ use\n"
61
         "  Use sampling to accelerate CEGIS. This will rule out solutions for a\n"
62
         "  conjecture when they are not satisfied by a sample point.\n"
63
         "+ trust\n"
64
         "  Trust that when a solution for a conjecture is always true under sampling,\n"
65
         "  then it is indeed a solution. Note this option may print out spurious\n"
66
         "  solutions for synthesis conjectures.\n"
67
         "+ none (default)\n"
68
         "  Do not use sampling with CEGIS.\n";
69
    std::exit(1);
70
  }
71
  throw OptionException(std::string("unknown option for --cegis-sample: `") +
72
                        optarg + "'.  Try --cegis-sample=help.");
73
}
74
std::ostream& operator<<(std::ostream& os, CegqiBvIneqMode mode)
75
{
76
  switch(mode) {
77
    case CegqiBvIneqMode::KEEP:
78
      return os << "CegqiBvIneqMode::KEEP";
79
    case CegqiBvIneqMode::EQ_BOUNDARY:
80
      return os << "CegqiBvIneqMode::EQ_BOUNDARY";
81
    case CegqiBvIneqMode::EQ_SLACK:
82
      return os << "CegqiBvIneqMode::EQ_SLACK";
83
    default:
84
      Unreachable();
85
  }
86
  return os;
87
}
88
82
CegqiBvIneqMode stringToCegqiBvIneqMode(const std::string& optarg)
89
{
90
82
  if (optarg == "keep")
91
  {
92
79
    return CegqiBvIneqMode::KEEP;
93
  }
94
3
  else if (optarg == "eq-boundary")
95
  {
96
3
    return CegqiBvIneqMode::EQ_BOUNDARY;
97
  }
98
  else if (optarg == "eq-slack")
99
  {
100
    return CegqiBvIneqMode::EQ_SLACK;
101
  }
102
  else if (optarg == "help")
103
  {
104
    std::cerr << "Modes for handling bit-vector inequalities in counterexample-guided\n"
105
         "instantiation.\n"
106
         "Available modes for --cegqi-bv-ineq are:\n"
107
         "+ keep\n"
108
         "  Solve for the inequality directly using side conditions for invertibility.\n"
109
         "+ eq-boundary (default)\n"
110
         "  Solve for the boundary point of the inequality, e.g., t > s becomes t = s+1.\n"
111
         "+ eq-slack\n"
112
         "  Solve for the inequality using the slack value in the model, e.g., t > s\n"
113
         "  becomes t = s + ( t-s )^M.\n";
114
    std::exit(1);
115
  }
116
  throw OptionException(std::string("unknown option for --cegqi-bv-ineq: `") +
117
                        optarg + "'.  Try --cegqi-bv-ineq=help.");
118
}
119
std::ostream& operator<<(std::ostream& os, InstWhenMode mode)
120
{
121
  switch(mode) {
122
    case InstWhenMode::FULL:
123
      return os << "InstWhenMode::FULL";
124
    case InstWhenMode::FULL_DELAY:
125
      return os << "InstWhenMode::FULL_DELAY";
126
    case InstWhenMode::FULL_DELAY_LAST_CALL:
127
      return os << "InstWhenMode::FULL_DELAY_LAST_CALL";
128
    case InstWhenMode::LAST_CALL:
129
      return os << "InstWhenMode::LAST_CALL";
130
    case InstWhenMode::FULL_LAST_CALL:
131
      return os << "InstWhenMode::FULL_LAST_CALL";
132
    case InstWhenMode::PRE_FULL:
133
      return os << "InstWhenMode::PRE_FULL";
134
    default:
135
      Unreachable();
136
  }
137
  return os;
138
}
139
3
InstWhenMode stringToInstWhenMode(const std::string& optarg)
140
{
141
3
  if (optarg == "full")
142
  {
143
3
    return InstWhenMode::FULL;
144
  }
145
  else if (optarg == "full-delay")
146
  {
147
    return InstWhenMode::FULL_DELAY;
148
  }
149
  else if (optarg == "full-delay-last-call")
150
  {
151
    return InstWhenMode::FULL_DELAY_LAST_CALL;
152
  }
153
  else if (optarg == "last-call")
154
  {
155
    return InstWhenMode::LAST_CALL;
156
  }
157
  else if (optarg == "full-last-call")
158
  {
159
    return InstWhenMode::FULL_LAST_CALL;
160
  }
161
  else if (optarg == "pre-full")
162
  {
163
    return InstWhenMode::PRE_FULL;
164
  }
165
  else if (optarg == "help")
166
  {
167
    std::cerr << "Instantiation modes.\n"
168
         "Available modes for --inst-when are:\n"
169
         "+ full\n"
170
         "  Run instantiation round at full effort, before theory combination.\n"
171
         "+ full-delay\n"
172
         "  Run instantiation round at full effort, before theory combination, after all\n"
173
         "  other theories have finished.\n"
174
         "+ full-delay-last-call\n"
175
         "  Alternate running instantiation rounds at full effort after all other theories\n"
176
         "  have finished, and last call.\n"
177
         "+ last-call\n"
178
         "  Run instantiation at last call effort, after theory combination and and\n"
179
         "  theories report sat.\n"
180
         "+ full-last-call (default)\n"
181
         "  Alternate running instantiation rounds at full effort and last call.  In other\n"
182
         "  words, interleave instantiation and theory combination.\n"
183
         "+ pre-full\n"
184
         "  Run instantiation round before full effort (possibly at standard effort).\n";
185
    std::exit(1);
186
  }
187
  throw OptionException(std::string("unknown option for --inst-when: `") +
188
                        optarg + "'.  Try --inst-when=help.");
189
}
190
std::ostream& operator<<(std::ostream& os, IteLiftQuantMode mode)
191
{
192
  switch(mode) {
193
    case IteLiftQuantMode::ALL:
194
      return os << "IteLiftQuantMode::ALL";
195
    case IteLiftQuantMode::SIMPLE:
196
      return os << "IteLiftQuantMode::SIMPLE";
197
    case IteLiftQuantMode::NONE:
198
      return os << "IteLiftQuantMode::NONE";
199
    default:
200
      Unreachable();
201
  }
202
  return os;
203
}
204
IteLiftQuantMode stringToIteLiftQuantMode(const std::string& optarg)
205
{
206
  if (optarg == "all")
207
  {
208
    return IteLiftQuantMode::ALL;
209
  }
210
  else if (optarg == "simple")
211
  {
212
    return IteLiftQuantMode::SIMPLE;
213
  }
214
  else if (optarg == "none")
215
  {
216
    return IteLiftQuantMode::NONE;
217
  }
218
  else if (optarg == "help")
219
  {
220
    std::cerr << "ITE lifting modes for quantified formulas.\n"
221
         "Available modes for --ite-lift-quant are:\n"
222
         "+ all\n"
223
         "  Lift if-then-else in quantified formulas.\n"
224
         "+ simple (default)\n"
225
         "  Lift if-then-else in quantified formulas if results in smaller term size.\n"
226
         "+ none\n"
227
         "  Do not lift if-then-else in quantified formulas.\n";
228
    std::exit(1);
229
  }
230
  throw OptionException(std::string("unknown option for --ite-lift-quant: `") +
231
                        optarg + "'.  Try --ite-lift-quant=help.");
232
}
233
std::ostream& operator<<(std::ostream& os, LiteralMatchMode mode)
234
{
235
  switch(mode) {
236
    case LiteralMatchMode::USE:
237
      return os << "LiteralMatchMode::USE";
238
    case LiteralMatchMode::AGG_PREDICATE:
239
      return os << "LiteralMatchMode::AGG_PREDICATE";
240
    case LiteralMatchMode::AGG:
241
      return os << "LiteralMatchMode::AGG";
242
    case LiteralMatchMode::NONE:
243
      return os << "LiteralMatchMode::NONE";
244
    default:
245
      Unreachable();
246
  }
247
  return os;
248
}
249
LiteralMatchMode stringToLiteralMatchMode(const std::string& optarg)
250
{
251
  if (optarg == "use")
252
  {
253
    return LiteralMatchMode::USE;
254
  }
255
  else if (optarg == "agg-predicate")
256
  {
257
    return LiteralMatchMode::AGG_PREDICATE;
258
  }
259
  else if (optarg == "agg")
260
  {
261
    return LiteralMatchMode::AGG;
262
  }
263
  else if (optarg == "none")
264
  {
265
    return LiteralMatchMode::NONE;
266
  }
267
  else if (optarg == "help")
268
  {
269
    std::cerr << "Literal match modes.\n"
270
         "Available modes for --literal-matching are:\n"
271
         "+ use (default)\n"
272
         "  Consider phase requirements of triggers conservatively. For example, the\n"
273
         "  trigger P( x ) in forall( x ). ( P( x ) V ~Q( x ) ) will not be matched with\n"
274
         "  terms in the equivalence class of true, and likewise Q( x ) will not be\n"
275
         "  matched terms in the equivalence class of false. Extends to equality.\n"
276
         "+ agg-predicate\n"
277
         "  Consider phase requirements aggressively for predicates. In the above example,\n"
278
         "  only match P( x ) with terms that are in the equivalence class of false.\n"
279
         "+ agg\n"
280
         "  Consider the phase requirements aggressively for all triggers.\n"
281
         "+ none\n"
282
         "  Do not use literal matching.\n";
283
    std::exit(1);
284
  }
285
  throw OptionException(std::string("unknown option for --literal-matching: `") +
286
                        optarg + "'.  Try --literal-matching=help.");
287
}
288
std::ostream& operator<<(std::ostream& os, MacrosQuantMode mode)
289
{
290
  switch(mode) {
291
    case MacrosQuantMode::ALL:
292
      return os << "MacrosQuantMode::ALL";
293
    case MacrosQuantMode::GROUND_UF:
294
      return os << "MacrosQuantMode::GROUND_UF";
295
    case MacrosQuantMode::GROUND:
296
      return os << "MacrosQuantMode::GROUND";
297
    default:
298
      Unreachable();
299
  }
300
  return os;
301
}
302
2
MacrosQuantMode stringToMacrosQuantMode(const std::string& optarg)
303
{
304
2
  if (optarg == "all")
305
  {
306
    return MacrosQuantMode::ALL;
307
  }
308
2
  else if (optarg == "ground-uf")
309
  {
310
    return MacrosQuantMode::GROUND_UF;
311
  }
312
2
  else if (optarg == "ground")
313
  {
314
2
    return MacrosQuantMode::GROUND;
315
  }
316
  else if (optarg == "help")
317
  {
318
    std::cerr << "Modes for quantifiers macro expansion.\n"
319
         "Available modes for --macros-quant-mode are:\n"
320
         "+ all\n"
321
         "  Infer definitions for functions, including those containing quantified\n"
322
         "  formulas.\n"
323
         "+ ground-uf (default)\n"
324
         "  Only infer ground definitions for functions that result in triggers for all\n"
325
         "  free variables.\n"
326
         "+ ground\n"
327
         "  Only infer ground definitions for functions.\n";
328
    std::exit(1);
329
  }
330
  throw OptionException(std::string("unknown option for --macros-quant-mode: `") +
331
                        optarg + "'.  Try --macros-quant-mode=help.");
332
}
333
std::ostream& operator<<(std::ostream& os, MbqiMode mode)
334
{
335
  switch(mode) {
336
    case MbqiMode::FMC:
337
      return os << "MbqiMode::FMC";
338
    case MbqiMode::TRUST:
339
      return os << "MbqiMode::TRUST";
340
    case MbqiMode::NONE:
341
      return os << "MbqiMode::NONE";
342
    default:
343
      Unreachable();
344
  }
345
  return os;
346
}
347
MbqiMode stringToMbqiMode(const std::string& optarg)
348
{
349
  if (optarg == "fmc")
350
  {
351
    return MbqiMode::FMC;
352
  }
353
  else if (optarg == "trust")
354
  {
355
    return MbqiMode::TRUST;
356
  }
357
  else if (optarg == "none")
358
  {
359
    return MbqiMode::NONE;
360
  }
361
  else if (optarg == "help")
362
  {
363
    std::cerr << "Model-based quantifier instantiation modes.\n"
364
         "Available modes for --mbqi are:\n"
365
         "+ fmc (default)\n"
366
         "  Use algorithm from Section 5.4.2 of thesis Finite Model Finding in\n"
367
         "  Satisfiability Modulo Theories.\n"
368
         "+ trust\n"
369
         "  Do not instantiate quantified formulas (incomplete technique).\n"
370
         "+ none\n"
371
         "  Disable model-based quantifier instantiation.\n";
372
    std::exit(1);
373
  }
374
  throw OptionException(std::string("unknown option for --mbqi: `") +
375
                        optarg + "'.  Try --mbqi=help.");
376
}
377
std::ostream& operator<<(std::ostream& os, PrenexQuantMode mode)
378
{
379
  switch(mode) {
380
    case PrenexQuantMode::NORMAL:
381
      return os << "PrenexQuantMode::NORMAL";
382
    case PrenexQuantMode::SIMPLE:
383
      return os << "PrenexQuantMode::SIMPLE";
384
    case PrenexQuantMode::NONE:
385
      return os << "PrenexQuantMode::NONE";
386
    default:
387
      Unreachable();
388
  }
389
  return os;
390
}
391
PrenexQuantMode stringToPrenexQuantMode(const std::string& optarg)
392
{
393
  if (optarg == "norm")
394
  {
395
    return PrenexQuantMode::NORMAL;
396
  }
397
  else if (optarg == "simple")
398
  {
399
    return PrenexQuantMode::SIMPLE;
400
  }
401
  else if (optarg == "none")
402
  {
403
    return PrenexQuantMode::NONE;
404
  }
405
  else if (optarg == "help")
406
  {
407
    std::cerr << "Prenex quantifiers modes.\n"
408
         "Available modes for --prenex-quant are:\n"
409
         "+ norm\n"
410
         "  Prenex to prenex normal form.\n"
411
         "+ simple (default)\n"
412
         "  Do simple prenexing of same sign quantifiers.\n"
413
         "+ none\n"
414
         "  Do no prenex nested quantifiers.\n";
415
    std::exit(1);
416
  }
417
  throw OptionException(std::string("unknown option for --prenex-quant: `") +
418
                        optarg + "'.  Try --prenex-quant=help.");
419
}
420
std::ostream& operator<<(std::ostream& os, QcfMode mode)
421
{
422
  switch(mode) {
423
    case QcfMode::PARTIAL:
424
      return os << "QcfMode::PARTIAL";
425
    case QcfMode::PROP_EQ:
426
      return os << "QcfMode::PROP_EQ";
427
    case QcfMode::CONFLICT_ONLY:
428
      return os << "QcfMode::CONFLICT_ONLY";
429
    default:
430
      Unreachable();
431
  }
432
  return os;
433
}
434
QcfMode stringToQcfMode(const std::string& optarg)
435
{
436
  if (optarg == "partial")
437
  {
438
    return QcfMode::PARTIAL;
439
  }
440
  else if (optarg == "prop-eq")
441
  {
442
    return QcfMode::PROP_EQ;
443
  }
444
  else if (optarg == "conflict")
445
  {
446
    return QcfMode::CONFLICT_ONLY;
447
  }
448
  else if (optarg == "help")
449
  {
450
    std::cerr << "Quantifier conflict find modes.\n"
451
         "Available modes for --quant-cf-mode are:\n"
452
         "+ partial\n"
453
         "  Use QCF for conflicts, propagations and heuristic instantiations.\n"
454
         "+ prop-eq (default)\n"
455
         "  Apply QCF algorithm to propagate equalities as well as conflicts.\n"
456
         "+ conflict\n"
457
         "  Apply QCF algorithm to find conflicts only.\n";
458
    std::exit(1);
459
  }
460
  throw OptionException(std::string("unknown option for --quant-cf-mode: `") +
461
                        optarg + "'.  Try --quant-cf-mode=help.");
462
}
463
std::ostream& operator<<(std::ostream& os, QcfWhenMode mode)
464
{
465
  switch(mode) {
466
    case QcfWhenMode::STD_H:
467
      return os << "QcfWhenMode::STD_H";
468
    case QcfWhenMode::LAST_CALL:
469
      return os << "QcfWhenMode::LAST_CALL";
470
    case QcfWhenMode::STD:
471
      return os << "QcfWhenMode::STD";
472
    case QcfWhenMode::DEFAULT:
473
      return os << "QcfWhenMode::DEFAULT";
474
    default:
475
      Unreachable();
476
  }
477
  return os;
478
}
479
QcfWhenMode stringToQcfWhenMode(const std::string& optarg)
480
{
481
  if (optarg == "std-h")
482
  {
483
    return QcfWhenMode::STD_H;
484
  }
485
  else if (optarg == "last-call")
486
  {
487
    return QcfWhenMode::LAST_CALL;
488
  }
489
  else if (optarg == "std")
490
  {
491
    return QcfWhenMode::STD;
492
  }
493
  else if (optarg == "default")
494
  {
495
    return QcfWhenMode::DEFAULT;
496
  }
497
  else if (optarg == "help")
498
  {
499
    std::cerr << "Quantifier conflict find modes.\n"
500
         "Available modes for --quant-cf-when are:\n"
501
         "+ std-h\n"
502
         "  Apply conflict finding at standard effort when heuristic says to.\n"
503
         "+ last-call\n"
504
         "  Apply conflict finding at last call, after theory combination and and all\n"
505
         "  theories report sat.\n"
506
         "+ std\n"
507
         "  Apply conflict finding at standard effort.\n"
508
         "+ default\n"
509
         "  Default, apply conflict finding at full effort.\n";
510
    std::exit(1);
511
  }
512
  throw OptionException(std::string("unknown option for --quant-cf-when: `") +
513
                        optarg + "'.  Try --quant-cf-when=help.");
514
}
515
std::ostream& operator<<(std::ostream& os, QuantDSplitMode mode)
516
{
517
  switch(mode) {
518
    case QuantDSplitMode::AGG:
519
      return os << "QuantDSplitMode::AGG";
520
    case QuantDSplitMode::DEFAULT:
521
      return os << "QuantDSplitMode::DEFAULT";
522
    case QuantDSplitMode::NONE:
523
      return os << "QuantDSplitMode::NONE";
524
    default:
525
      Unreachable();
526
  }
527
  return os;
528
}
529
QuantDSplitMode stringToQuantDSplitMode(const std::string& optarg)
530
{
531
  if (optarg == "agg")
532
  {
533
    return QuantDSplitMode::AGG;
534
  }
535
  else if (optarg == "default")
536
  {
537
    return QuantDSplitMode::DEFAULT;
538
  }
539
  else if (optarg == "none")
540
  {
541
    return QuantDSplitMode::NONE;
542
  }
543
  else if (optarg == "help")
544
  {
545
    std::cerr << "Modes for quantifiers splitting.\n"
546
         "Available modes for --quant-dsplit-mode are:\n"
547
         "+ agg\n"
548
         "  Aggressively split quantified formulas.\n"
549
         "+ default\n"
550
         "  Split quantified formulas over some finite datatypes when finite model finding\n"
551
         "  is enabled.\n"
552
         "+ none\n"
553
         "  Never split quantified formulas.\n";
554
    std::exit(1);
555
  }
556
  throw OptionException(std::string("unknown option for --quant-dsplit-mode: `") +
557
                        optarg + "'.  Try --quant-dsplit-mode=help.");
558
}
559
std::ostream& operator<<(std::ostream& os, QuantRepMode mode)
560
{
561
  switch(mode) {
562
    case QuantRepMode::EE:
563
      return os << "QuantRepMode::EE";
564
    case QuantRepMode::FIRST:
565
      return os << "QuantRepMode::FIRST";
566
    case QuantRepMode::DEPTH:
567
      return os << "QuantRepMode::DEPTH";
568
    default:
569
      Unreachable();
570
  }
571
  return os;
572
}
573
QuantRepMode stringToQuantRepMode(const std::string& optarg)
574
{
575
  if (optarg == "ee")
576
  {
577
    return QuantRepMode::EE;
578
  }
579
  else if (optarg == "first")
580
  {
581
    return QuantRepMode::FIRST;
582
  }
583
  else if (optarg == "depth")
584
  {
585
    return QuantRepMode::DEPTH;
586
  }
587
  else if (optarg == "help")
588
  {
589
    std::cerr << "Modes for quantifiers representative selection.\n"
590
         "Available modes for --quant-rep-mode are:\n"
591
         "+ ee\n"
592
         "  Let equality engine choose representatives.\n"
593
         "+ first (default)\n"
594
         "  Choose terms that appear first.\n"
595
         "+ depth\n"
596
         "  Choose terms that are of minimal depth.\n";
597
    std::exit(1);
598
  }
599
  throw OptionException(std::string("unknown option for --quant-rep-mode: `") +
600
                        optarg + "'.  Try --quant-rep-mode=help.");
601
}
602
std::ostream& operator<<(std::ostream& os, SygusActiveGenMode mode)
603
{
604
  switch(mode) {
605
    case SygusActiveGenMode::AUTO:
606
      return os << "SygusActiveGenMode::AUTO";
607
    case SygusActiveGenMode::ENUM:
608
      return os << "SygusActiveGenMode::ENUM";
609
    case SygusActiveGenMode::VAR_AGNOSTIC:
610
      return os << "SygusActiveGenMode::VAR_AGNOSTIC";
611
    case SygusActiveGenMode::ENUM_BASIC:
612
      return os << "SygusActiveGenMode::ENUM_BASIC";
613
    case SygusActiveGenMode::NONE:
614
      return os << "SygusActiveGenMode::NONE";
615
    default:
616
      Unreachable();
617
  }
618
  return os;
619
}
620
14
SygusActiveGenMode stringToSygusActiveGenMode(const std::string& optarg)
621
{
622
14
  if (optarg == "auto")
623
  {
624
    return SygusActiveGenMode::AUTO;
625
  }
626
14
  else if (optarg == "enum")
627
  {
628
10
    return SygusActiveGenMode::ENUM;
629
  }
630
4
  else if (optarg == "var-agnostic")
631
  {
632
1
    return SygusActiveGenMode::VAR_AGNOSTIC;
633
  }
634
3
  else if (optarg == "basic")
635
  {
636
    return SygusActiveGenMode::ENUM_BASIC;
637
  }
638
3
  else if (optarg == "none")
639
  {
640
3
    return SygusActiveGenMode::NONE;
641
  }
642
  else if (optarg == "help")
643
  {
644
    std::cerr << "Modes for actively-generated sygus enumerators.\n"
645
         "Available modes for --sygus-active-gen are:\n"
646
         "+ auto (default)\n"
647
         "  Internally decide the best policy for each enumerator.\n"
648
         "+ enum\n"
649
         "  Use optimized enumerator for actively-generated sygus enumerators.\n"
650
         "+ var-agnostic\n"
651
         "  Use sygus solver to enumerate terms that are agnostic to variables.\n"
652
         "+ basic\n"
653
         "  Use basic type enumerator for actively-generated sygus enumerators.\n"
654
         "+ none\n"
655
         "  Do not use actively-generated sygus enumerators.\n";
656
    std::exit(1);
657
  }
658
  throw OptionException(std::string("unknown option for --sygus-active-gen: `") +
659
                        optarg + "'.  Try --sygus-active-gen=help.");
660
}
661
std::ostream& operator<<(std::ostream& os, SygusFilterSolMode mode)
662
{
663
  switch(mode) {
664
    case SygusFilterSolMode::STRONG:
665
      return os << "SygusFilterSolMode::STRONG";
666
    case SygusFilterSolMode::WEAK:
667
      return os << "SygusFilterSolMode::WEAK";
668
    case SygusFilterSolMode::NONE:
669
      return os << "SygusFilterSolMode::NONE";
670
    default:
671
      Unreachable();
672
  }
673
  return os;
674
}
675
SygusFilterSolMode stringToSygusFilterSolMode(const std::string& optarg)
676
{
677
  if (optarg == "strong")
678
  {
679
    return SygusFilterSolMode::STRONG;
680
  }
681
  else if (optarg == "weak")
682
  {
683
    return SygusFilterSolMode::WEAK;
684
  }
685
  else if (optarg == "none")
686
  {
687
    return SygusFilterSolMode::NONE;
688
  }
689
  else if (optarg == "help")
690
  {
691
    std::cerr << "Modes for filtering sygus solutions.\n"
692
         "Available modes for --sygus-filter-sol are:\n"
693
         "+ strong\n"
694
         "  Filter solutions that are logically stronger than others.\n"
695
         "+ weak\n"
696
         "  Filter solutions that are logically weaker than others.\n"
697
         "+ none (default)\n"
698
         "  Do not filter sygus solutions.\n";
699
    std::exit(1);
700
  }
701
  throw OptionException(std::string("unknown option for --sygus-filter-sol: `") +
702
                        optarg + "'.  Try --sygus-filter-sol=help.");
703
}
704
std::ostream& operator<<(std::ostream& os, SygusGrammarConsMode mode)
705
{
706
  switch(mode) {
707
    case SygusGrammarConsMode::ANY_TERM_CONCISE:
708
      return os << "SygusGrammarConsMode::ANY_TERM_CONCISE";
709
    case SygusGrammarConsMode::ANY_TERM:
710
      return os << "SygusGrammarConsMode::ANY_TERM";
711
    case SygusGrammarConsMode::SIMPLE:
712
      return os << "SygusGrammarConsMode::SIMPLE";
713
    case SygusGrammarConsMode::ANY_CONST:
714
      return os << "SygusGrammarConsMode::ANY_CONST";
715
    default:
716
      Unreachable();
717
  }
718
  return os;
719
}
720
6
SygusGrammarConsMode stringToSygusGrammarConsMode(const std::string& optarg)
721
{
722
6
  if (optarg == "any-term-concise")
723
  {
724
2
    return SygusGrammarConsMode::ANY_TERM_CONCISE;
725
  }
726
4
  else if (optarg == "any-term")
727
  {
728
2
    return SygusGrammarConsMode::ANY_TERM;
729
  }
730
2
  else if (optarg == "simple")
731
  {
732
    return SygusGrammarConsMode::SIMPLE;
733
  }
734
2
  else if (optarg == "any-const")
735
  {
736
2
    return SygusGrammarConsMode::ANY_CONST;
737
  }
738
  else if (optarg == "help")
739
  {
740
    std::cerr << "Modes for default SyGuS grammars.\n"
741
         "Available modes for --sygus-grammar-cons are:\n"
742
         "+ any-term-concise\n"
743
         "  When applicable, use constructors corresponding to any symbolic term, favoring\n"
744
         "  conciseness over generality. This option is equivalent to any-term but enables\n"
745
         "  a polynomial grammar for arithmetic when not in a combined theory.\n"
746
         "+ any-term\n"
747
         "  When applicable, use constructors corresponding to any symbolic term. This\n"
748
         "  option enables a sum-of-monomials grammar for arithmetic. For all other types,\n"
749
         "  it enables symbolic constant constructors.\n"
750
         "+ simple (default)\n"
751
         "  Use simple grammar construction (no symbolic terms or constants).\n"
752
         "+ any-const\n"
753
         "  Use symoblic constant constructors.\n";
754
    std::exit(1);
755
  }
756
  throw OptionException(std::string("unknown option for --sygus-grammar-cons: `") +
757
                        optarg + "'.  Try --sygus-grammar-cons=help.");
758
}
759
std::ostream& operator<<(std::ostream& os, SygusInstMode mode)
760
{
761
  switch(mode) {
762
    case SygusInstMode::INTERLEAVE:
763
      return os << "SygusInstMode::INTERLEAVE";
764
    case SygusInstMode::PRIORITY_INST:
765
      return os << "SygusInstMode::PRIORITY_INST";
766
    case SygusInstMode::PRIORITY_EVAL:
767
      return os << "SygusInstMode::PRIORITY_EVAL";
768
    default:
769
      Unreachable();
770
  }
771
  return os;
772
}
773
SygusInstMode stringToSygusInstMode(const std::string& optarg)
774
{
775
  if (optarg == "interleave")
776
  {
777
    return SygusInstMode::INTERLEAVE;
778
  }
779
  else if (optarg == "priority-inst")
780
  {
781
    return SygusInstMode::PRIORITY_INST;
782
  }
783
  else if (optarg == "priority-eval")
784
  {
785
    return SygusInstMode::PRIORITY_EVAL;
786
  }
787
  else if (optarg == "help")
788
  {
789
    std::cerr << "SyGuS instantiation lemma modes.\n"
790
         "Available modes for --sygus-inst-mode are:\n"
791
         "+ interleave\n"
792
         "  add instantiation and evaluation unfolding lemmas in the same step.\n"
793
         "+ priority-inst (default)\n"
794
         "  add instantiation lemmas first, add evaluation unfolding if instantiation\n"
795
         "  fails.\n"
796
         "+ priority-eval\n"
797
         "  add evaluation unfolding lemma first, add instantiation lemma if unfolding\n"
798
         "  lemmas already added.\n";
799
    std::exit(1);
800
  }
801
  throw OptionException(std::string("unknown option for --sygus-inst-mode: `") +
802
                        optarg + "'.  Try --sygus-inst-mode=help.");
803
}
804
std::ostream& operator<<(std::ostream& os, SygusInstScope mode)
805
{
806
  switch(mode) {
807
    case SygusInstScope::BOTH:
808
      return os << "SygusInstScope::BOTH";
809
    case SygusInstScope::IN:
810
      return os << "SygusInstScope::IN";
811
    case SygusInstScope::OUT:
812
      return os << "SygusInstScope::OUT";
813
    default:
814
      Unreachable();
815
  }
816
  return os;
817
}
818
SygusInstScope stringToSygusInstScope(const std::string& optarg)
819
{
820
  if (optarg == "both")
821
  {
822
    return SygusInstScope::BOTH;
823
  }
824
  else if (optarg == "in")
825
  {
826
    return SygusInstScope::IN;
827
  }
828
  else if (optarg == "out")
829
  {
830
    return SygusInstScope::OUT;
831
  }
832
  else if (optarg == "help")
833
  {
834
    std::cerr << "scope for collecting ground terms for the grammar.\n"
835
         "Available modes for --sygus-inst-scope are:\n"
836
         "+ both\n"
837
         "  combines inside and outside.\n"
838
         "+ in (default)\n"
839
         "  use ground terms inside given quantified formula only.\n"
840
         "+ out\n"
841
         "  use ground terms outside of quantified formulas only.\n";
842
    std::exit(1);
843
  }
844
  throw OptionException(std::string("unknown option for --sygus-inst-scope: `") +
845
                        optarg + "'.  Try --sygus-inst-scope=help.");
846
}
847
std::ostream& operator<<(std::ostream& os, SygusInstTermSelMode mode)
848
{
849
  switch(mode) {
850
    case SygusInstTermSelMode::MAX:
851
      return os << "SygusInstTermSelMode::MAX";
852
    case SygusInstTermSelMode::BOTH:
853
      return os << "SygusInstTermSelMode::BOTH";
854
    case SygusInstTermSelMode::MIN:
855
      return os << "SygusInstTermSelMode::MIN";
856
    default:
857
      Unreachable();
858
  }
859
  return os;
860
}
861
SygusInstTermSelMode stringToSygusInstTermSelMode(const std::string& optarg)
862
{
863
  if (optarg == "max")
864
  {
865
    return SygusInstTermSelMode::MAX;
866
  }
867
  else if (optarg == "both")
868
  {
869
    return SygusInstTermSelMode::BOTH;
870
  }
871
  else if (optarg == "min")
872
  {
873
    return SygusInstTermSelMode::MIN;
874
  }
875
  else if (optarg == "help")
876
  {
877
    std::cerr << "Ground term selection modes.\n"
878
         "Available modes for --sygus-inst-term-sel are:\n"
879
         "+ max\n"
880
         "  collect maximal ground terms only.\n"
881
         "+ both\n"
882
         "  combines minimal and maximal .\n"
883
         "+ min (default)\n"
884
         "  collect minimal ground terms only.\n";
885
    std::exit(1);
886
  }
887
  throw OptionException(std::string("unknown option for --sygus-inst-term-sel: `") +
888
                        optarg + "'.  Try --sygus-inst-term-sel=help.");
889
}
890
std::ostream& operator<<(std::ostream& os, SygusInvTemplMode mode)
891
{
892
  switch(mode) {
893
    case SygusInvTemplMode::PRE:
894
      return os << "SygusInvTemplMode::PRE";
895
    case SygusInvTemplMode::POST:
896
      return os << "SygusInvTemplMode::POST";
897
    case SygusInvTemplMode::NONE:
898
      return os << "SygusInvTemplMode::NONE";
899
    default:
900
      Unreachable();
901
  }
902
  return os;
903
}
904
3
SygusInvTemplMode stringToSygusInvTemplMode(const std::string& optarg)
905
{
906
3
  if (optarg == "pre")
907
  {
908
1
    return SygusInvTemplMode::PRE;
909
  }
910
2
  else if (optarg == "post")
911
  {
912
2
    return SygusInvTemplMode::POST;
913
  }
914
  else if (optarg == "none")
915
  {
916
    return SygusInvTemplMode::NONE;
917
  }
918
  else if (optarg == "help")
919
  {
920
    std::cerr << "Template modes for sygus invariant synthesis.\n"
921
         "Available modes for --sygus-inv-templ are:\n"
922
         "+ pre\n"
923
         "  Synthesize invariant based on weakening of precondition.\n"
924
         "+ post (default)\n"
925
         "  Synthesize invariant based on strengthening of postcondition.\n"
926
         "+ none\n"
927
         "  Synthesize invariant directly.\n";
928
    std::exit(1);
929
  }
930
  throw OptionException(std::string("unknown option for --sygus-inv-templ: `") +
931
                        optarg + "'.  Try --sygus-inv-templ=help.");
932
}
933
std::ostream& operator<<(std::ostream& os, SygusQueryDumpFilesMode mode)
934
{
935
  switch(mode) {
936
    case SygusQueryDumpFilesMode::ALL:
937
      return os << "SygusQueryDumpFilesMode::ALL";
938
    case SygusQueryDumpFilesMode::UNSOLVED:
939
      return os << "SygusQueryDumpFilesMode::UNSOLVED";
940
    case SygusQueryDumpFilesMode::NONE:
941
      return os << "SygusQueryDumpFilesMode::NONE";
942
    default:
943
      Unreachable();
944
  }
945
  return os;
946
}
947
SygusQueryDumpFilesMode stringToSygusQueryDumpFilesMode(const std::string& optarg)
948
{
949
  if (optarg == "all")
950
  {
951
    return SygusQueryDumpFilesMode::ALL;
952
  }
953
  else if (optarg == "unsolved")
954
  {
955
    return SygusQueryDumpFilesMode::UNSOLVED;
956
  }
957
  else if (optarg == "none")
958
  {
959
    return SygusQueryDumpFilesMode::NONE;
960
  }
961
  else if (optarg == "help")
962
  {
963
    std::cerr << "Query file options.\n"
964
         "Available modes for --sygus-query-gen-dump-files are:\n"
965
         "+ all\n"
966
         "  Dump all query files.\n"
967
         "+ unsolved\n"
968
         "  Dump query files that the subsolver did not solve.\n"
969
         "+ none (default)\n"
970
         "  Do not dump query files when using --sygus-query-gen.\n";
971
    std::exit(1);
972
  }
973
  throw OptionException(std::string("unknown option for --sygus-query-gen-dump-files: `") +
974
                        optarg + "'.  Try --sygus-query-gen-dump-files=help.");
975
}
976
std::ostream& operator<<(std::ostream& os, CegqiSingleInvRconsMode mode)
977
{
978
  switch(mode) {
979
    case CegqiSingleInvRconsMode::ALL:
980
      return os << "CegqiSingleInvRconsMode::ALL";
981
    case CegqiSingleInvRconsMode::TRY:
982
      return os << "CegqiSingleInvRconsMode::TRY";
983
    case CegqiSingleInvRconsMode::ALL_LIMIT:
984
      return os << "CegqiSingleInvRconsMode::ALL_LIMIT";
985
    case CegqiSingleInvRconsMode::NONE:
986
      return os << "CegqiSingleInvRconsMode::NONE";
987
    default:
988
      Unreachable();
989
  }
990
  return os;
991
}
992
CegqiSingleInvRconsMode stringToCegqiSingleInvRconsMode(const std::string& optarg)
993
{
994
  if (optarg == "all")
995
  {
996
    return CegqiSingleInvRconsMode::ALL;
997
  }
998
  else if (optarg == "try")
999
  {
1000
    return CegqiSingleInvRconsMode::TRY;
1001
  }
1002
  else if (optarg == "all-limit")
1003
  {
1004
    return CegqiSingleInvRconsMode::ALL_LIMIT;
1005
  }
1006
  else if (optarg == "none")
1007
  {
1008
    return CegqiSingleInvRconsMode::NONE;
1009
  }
1010
  else if (optarg == "help")
1011
  {
1012
    std::cerr << "Modes for reconstruction solutions while using single invocation techniques.\n"
1013
         "Available modes for --sygus-si-rcons are:\n"
1014
         "+ all\n"
1015
         "  Try to reconstruct solutions in the original grammar. In this mode, we do not\n"
1016
         "  terminate until a solution is successfully reconstructed.\n"
1017
         "+ try\n"
1018
         "  Try to reconstruct solutions in the original grammar when using single\n"
1019
         "  invocation techniques in an incomplete (fail-fast) manner.\n"
1020
         "+ all-limit (default)\n"
1021
         "  Try to reconstruct solutions in the original grammar, but termintate if a\n"
1022
         "  maximum number of rounds for reconstruction is exceeded.\n"
1023
         "+ none\n"
1024
         "  Do not try to reconstruct solutions in the original (user-provided) grammar\n"
1025
         "  when using single invocation techniques. In this mode, solutions produced by\n"
1026
         "  cvc5 may violate grammar restrictions.\n";
1027
    std::exit(1);
1028
  }
1029
  throw OptionException(std::string("unknown option for --sygus-si-rcons: `") +
1030
                        optarg + "'.  Try --sygus-si-rcons=help.");
1031
}
1032
std::ostream& operator<<(std::ostream& os, CegqiSingleInvMode mode)
1033
{
1034
  switch(mode) {
1035
    case CegqiSingleInvMode::USE:
1036
      return os << "CegqiSingleInvMode::USE";
1037
    case CegqiSingleInvMode::ALL:
1038
      return os << "CegqiSingleInvMode::ALL";
1039
    case CegqiSingleInvMode::NONE:
1040
      return os << "CegqiSingleInvMode::NONE";
1041
    default:
1042
      Unreachable();
1043
  }
1044
  return os;
1045
}
1046
47
CegqiSingleInvMode stringToCegqiSingleInvMode(const std::string& optarg)
1047
{
1048
47
  if (optarg == "use")
1049
  {
1050
    return CegqiSingleInvMode::USE;
1051
  }
1052
47
  else if (optarg == "all")
1053
  {
1054
25
    return CegqiSingleInvMode::ALL;
1055
  }
1056
22
  else if (optarg == "none")
1057
  {
1058
22
    return CegqiSingleInvMode::NONE;
1059
  }
1060
  else if (optarg == "help")
1061
  {
1062
    std::cerr << "Modes for single invocation techniques.\n"
1063
         "Available modes for --sygus-si are:\n"
1064
         "+ use\n"
1065
         "  Use single invocation techniques only if grammar is not restrictive.\n"
1066
         "+ all\n"
1067
         "  Always use single invocation techniques.\n"
1068
         "+ none (default)\n"
1069
         "  Do not use single invocation techniques.\n";
1070
    std::exit(1);
1071
  }
1072
  throw OptionException(std::string("unknown option for --sygus-si: `") +
1073
                        optarg + "'.  Try --sygus-si=help.");
1074
}
1075
std::ostream& operator<<(std::ostream& os, SygusUnifPiMode mode)
1076
{
1077
  switch(mode) {
1078
    case SygusUnifPiMode::CENUM_IGAIN:
1079
      return os << "SygusUnifPiMode::CENUM_IGAIN";
1080
    case SygusUnifPiMode::CENUM:
1081
      return os << "SygusUnifPiMode::CENUM";
1082
    case SygusUnifPiMode::COMPLETE:
1083
      return os << "SygusUnifPiMode::COMPLETE";
1084
    case SygusUnifPiMode::NONE:
1085
      return os << "SygusUnifPiMode::NONE";
1086
    default:
1087
      Unreachable();
1088
  }
1089
  return os;
1090
}
1091
9
SygusUnifPiMode stringToSygusUnifPiMode(const std::string& optarg)
1092
{
1093
9
  if (optarg == "cond-enum-igain")
1094
  {
1095
    return SygusUnifPiMode::CENUM_IGAIN;
1096
  }
1097
9
  else if (optarg == "cond-enum")
1098
  {
1099
    return SygusUnifPiMode::CENUM;
1100
  }
1101
9
  else if (optarg == "complete")
1102
  {
1103
9
    return SygusUnifPiMode::COMPLETE;
1104
  }
1105
  else if (optarg == "none")
1106
  {
1107
    return SygusUnifPiMode::NONE;
1108
  }
1109
  else if (optarg == "help")
1110
  {
1111
    std::cerr << "Modes for piecewise-independent unification.\n"
1112
         "Available modes for --sygus-unif-pi are:\n"
1113
         "+ cond-enum-igain\n"
1114
         "  Same as cond-enum, but additionally uses an information gain heuristic when\n"
1115
         "  doing decision tree learning.\n"
1116
         "+ cond-enum\n"
1117
         "  Use unconstrained condition enumeration for piecewise-independent unification\n"
1118
         "  (see Section 4 of Barbosa et al FMCAD 2019).\n"
1119
         "+ complete\n"
1120
         "  Use complete approach for piecewise-independent unification (see Section 3 of\n"
1121
         "  Barbosa et al FMCAD 2019)\n"
1122
         "+ none (default)\n"
1123
         "  Do not use piecewise-independent unification.\n";
1124
    std::exit(1);
1125
  }
1126
  throw OptionException(std::string("unknown option for --sygus-unif-pi: `") +
1127
                        optarg + "'.  Try --sygus-unif-pi=help.");
1128
}
1129
std::ostream& operator<<(std::ostream& os, TermDbMode mode)
1130
{
1131
  switch(mode) {
1132
    case TermDbMode::RELEVANT:
1133
      return os << "TermDbMode::RELEVANT";
1134
    case TermDbMode::ALL:
1135
      return os << "TermDbMode::ALL";
1136
    default:
1137
      Unreachable();
1138
  }
1139
  return os;
1140
}
1141
TermDbMode stringToTermDbMode(const std::string& optarg)
1142
{
1143
  if (optarg == "relevant")
1144
  {
1145
    return TermDbMode::RELEVANT;
1146
  }
1147
  else if (optarg == "all")
1148
  {
1149
    return TermDbMode::ALL;
1150
  }
1151
  else if (optarg == "help")
1152
  {
1153
    std::cerr << "Modes for terms included in the quantifiers term database.\n"
1154
         "Available modes for --term-db-mode are:\n"
1155
         "+ relevant\n"
1156
         "  Quantifiers module considers only ground terms connected to current\n"
1157
         "  assertions.\n"
1158
         "+ all (default)\n"
1159
         "  Quantifiers module considers all ground terms.\n";
1160
    std::exit(1);
1161
  }
1162
  throw OptionException(std::string("unknown option for --term-db-mode: `") +
1163
                        optarg + "'.  Try --term-db-mode=help.");
1164
}
1165
std::ostream& operator<<(std::ostream& os, TriggerActiveSelMode mode)
1166
{
1167
  switch(mode) {
1168
    case TriggerActiveSelMode::ALL:
1169
      return os << "TriggerActiveSelMode::ALL";
1170
    case TriggerActiveSelMode::MAX:
1171
      return os << "TriggerActiveSelMode::MAX";
1172
    case TriggerActiveSelMode::MIN:
1173
      return os << "TriggerActiveSelMode::MIN";
1174
    default:
1175
      Unreachable();
1176
  }
1177
  return os;
1178
}
1179
TriggerActiveSelMode stringToTriggerActiveSelMode(const std::string& optarg)
1180
{
1181
  if (optarg == "all")
1182
  {
1183
    return TriggerActiveSelMode::ALL;
1184
  }
1185
  else if (optarg == "max")
1186
  {
1187
    return TriggerActiveSelMode::MAX;
1188
  }
1189
  else if (optarg == "min")
1190
  {
1191
    return TriggerActiveSelMode::MIN;
1192
  }
1193
  else if (optarg == "help")
1194
  {
1195
    std::cerr << "Trigger active selection modes.\n"
1196
         "Available modes for --trigger-active-sel are:\n"
1197
         "+ all (default)\n"
1198
         "  Make all triggers active.\n"
1199
         "+ max\n"
1200
         "  Activate triggers with maximal ground terms.\n"
1201
         "+ min\n"
1202
         "  Activate triggers with minimal ground terms.\n";
1203
    std::exit(1);
1204
  }
1205
  throw OptionException(std::string("unknown option for --trigger-active-sel: `") +
1206
                        optarg + "'.  Try --trigger-active-sel=help.");
1207
}
1208
std::ostream& operator<<(std::ostream& os, TriggerSelMode mode)
1209
{
1210
  switch(mode) {
1211
    case TriggerSelMode::MAX:
1212
      return os << "TriggerSelMode::MAX";
1213
    case TriggerSelMode::MIN_SINGLE_ALL:
1214
      return os << "TriggerSelMode::MIN_SINGLE_ALL";
1215
    case TriggerSelMode::ALL:
1216
      return os << "TriggerSelMode::ALL";
1217
    case TriggerSelMode::MIN_SINGLE_MAX:
1218
      return os << "TriggerSelMode::MIN_SINGLE_MAX";
1219
    case TriggerSelMode::MIN:
1220
      return os << "TriggerSelMode::MIN";
1221
    default:
1222
      Unreachable();
1223
  }
1224
  return os;
1225
}
1226
TriggerSelMode stringToTriggerSelMode(const std::string& optarg)
1227
{
1228
  if (optarg == "max")
1229
  {
1230
    return TriggerSelMode::MAX;
1231
  }
1232
  else if (optarg == "min-s-all")
1233
  {
1234
    return TriggerSelMode::MIN_SINGLE_ALL;
1235
  }
1236
  else if (optarg == "all")
1237
  {
1238
    return TriggerSelMode::ALL;
1239
  }
1240
  else if (optarg == "min-s-max")
1241
  {
1242
    return TriggerSelMode::MIN_SINGLE_MAX;
1243
  }
1244
  else if (optarg == "min")
1245
  {
1246
    return TriggerSelMode::MIN;
1247
  }
1248
  else if (optarg == "help")
1249
  {
1250
    std::cerr << "Trigger selection modes.\n"
1251
         "Available modes for --trigger-sel are:\n"
1252
         "+ max\n"
1253
         "  Consider only maximal subterms that meet criteria for triggers.\n"
1254
         "+ min-s-all\n"
1255
         "  Consider only minimal subterms that meet criteria for single triggers, all\n"
1256
         "  otherwise.\n"
1257
         "+ all\n"
1258
         "  Consider all subterms that meet criteria for triggers.\n"
1259
         "+ min-s-max\n"
1260
         "  Consider only minimal subterms that meet criteria for single triggers, maximal\n"
1261
         "  otherwise.\n"
1262
         "+ min (default)\n"
1263
         "  Consider only minimal subterms that meet criteria for triggers.\n";
1264
    std::exit(1);
1265
  }
1266
  throw OptionException(std::string("unknown option for --trigger-sel: `") +
1267
                        optarg + "'.  Try --trigger-sel=help.");
1268
}
1269
std::ostream& operator<<(std::ostream& os, UserPatMode mode)
1270
{
1271
  switch(mode) {
1272
    case UserPatMode::USE:
1273
      return os << "UserPatMode::USE";
1274
    case UserPatMode::RESORT:
1275
      return os << "UserPatMode::RESORT";
1276
    case UserPatMode::INTERLEAVE:
1277
      return os << "UserPatMode::INTERLEAVE";
1278
    case UserPatMode::STRICT:
1279
      return os << "UserPatMode::STRICT";
1280
    case UserPatMode::IGNORE:
1281
      return os << "UserPatMode::IGNORE";
1282
    case UserPatMode::TRUST:
1283
      return os << "UserPatMode::TRUST";
1284
    default:
1285
      Unreachable();
1286
  }
1287
  return os;
1288
}
1289
UserPatMode stringToUserPatMode(const std::string& optarg)
1290
{
1291
  if (optarg == "use")
1292
  {
1293
    return UserPatMode::USE;
1294
  }
1295
  else if (optarg == "resort")
1296
  {
1297
    return UserPatMode::RESORT;
1298
  }
1299
  else if (optarg == "interleave")
1300
  {
1301
    return UserPatMode::INTERLEAVE;
1302
  }
1303
  else if (optarg == "strict")
1304
  {
1305
    return UserPatMode::STRICT;
1306
  }
1307
  else if (optarg == "ignore")
1308
  {
1309
    return UserPatMode::IGNORE;
1310
  }
1311
  else if (optarg == "trust")
1312
  {
1313
    return UserPatMode::TRUST;
1314
  }
1315
  else if (optarg == "help")
1316
  {
1317
    std::cerr << "These modes determine how user provided patterns (triggers) are used during\n"
1318
         "E-matching. The modes vary on when instantiation based on user-provided\n"
1319
         "triggers is combined with instantiation based on automatically selected\n"
1320
         "triggers.\n"
1321
         "Available modes for --user-pat are:\n"
1322
         "+ use\n"
1323
         "  Use both user-provided and auto-generated patterns when patterns are provided\n"
1324
         "  for a quantified formula.\n"
1325
         "+ resort\n"
1326
         "  Use user-provided patterns only after auto-generated patterns saturate.\n"
1327
         "+ interleave\n"
1328
         "  Alternate between use/resort.\n"
1329
         "+ strict\n"
1330
         "  When provided, use only user-provided patterns for a quantified formula, and\n"
1331
         "  do not use any other instantiation techniques.\n"
1332
         "+ ignore\n"
1333
         "  Ignore user-provided patterns.\n"
1334
         "+ trust (default)\n"
1335
         "  When provided, use only user-provided patterns for a quantified formula.\n";
1336
    std::exit(1);
1337
  }
1338
  throw OptionException(std::string("unknown option for --user-pat: `") +
1339
                        optarg + "'.  Try --user-pat=help.");
1340
}
1341
1342
namespace quantifiers
1343
{
1344
// clang-format off
1345
void setDefaultAggressiveMiniscopeQuant(Options& opts, bool value)
1346
{
1347
    if (!opts.quantifiers.aggressiveMiniscopeQuantWasSetByUser) {
1348
        opts.quantifiers.aggressiveMiniscopeQuant = value;
1349
    }
1350
}
1351
void setDefaultCegisSample(Options& opts, CegisSampleMode value)
1352
{
1353
    if (!opts.quantifiers.cegisSampleWasSetByUser) {
1354
        opts.quantifiers.cegisSample = value;
1355
    }
1356
}
1357
void setDefaultCegqi(Options& opts, bool value)
1358
{
1359
    if (!opts.quantifiers.cegqiWasSetByUser) {
1360
        opts.quantifiers.cegqi = value;
1361
    }
1362
}
1363
void setDefaultCegqiAll(Options& opts, bool value)
1364
{
1365
    if (!opts.quantifiers.cegqiAllWasSetByUser) {
1366
        opts.quantifiers.cegqiAll = value;
1367
    }
1368
}
1369
void setDefaultCegqiBv(Options& opts, bool value)
1370
{
1371
    if (!opts.quantifiers.cegqiBvWasSetByUser) {
1372
        opts.quantifiers.cegqiBv = value;
1373
    }
1374
}
1375
void setDefaultCegqiBvConcInv(Options& opts, bool value)
1376
{
1377
    if (!opts.quantifiers.cegqiBvConcInvWasSetByUser) {
1378
        opts.quantifiers.cegqiBvConcInv = value;
1379
    }
1380
}
1381
void setDefaultCegqiBvIneqMode(Options& opts, CegqiBvIneqMode value)
1382
{
1383
    if (!opts.quantifiers.cegqiBvIneqModeWasSetByUser) {
1384
        opts.quantifiers.cegqiBvIneqMode = value;
1385
    }
1386
}
1387
void setDefaultCegqiBvInterleaveValue(Options& opts, bool value)
1388
{
1389
    if (!opts.quantifiers.cegqiBvInterleaveValueWasSetByUser) {
1390
        opts.quantifiers.cegqiBvInterleaveValue = value;
1391
    }
1392
}
1393
void setDefaultCegqiBvLinearize(Options& opts, bool value)
1394
{
1395
    if (!opts.quantifiers.cegqiBvLinearizeWasSetByUser) {
1396
        opts.quantifiers.cegqiBvLinearize = value;
1397
    }
1398
}
1399
void setDefaultCegqiBvRmExtract(Options& opts, bool value)
1400
{
1401
    if (!opts.quantifiers.cegqiBvRmExtractWasSetByUser) {
1402
        opts.quantifiers.cegqiBvRmExtract = value;
1403
    }
1404
}
1405
void setDefaultCegqiBvSolveNl(Options& opts, bool value)
1406
{
1407
    if (!opts.quantifiers.cegqiBvSolveNlWasSetByUser) {
1408
        opts.quantifiers.cegqiBvSolveNl = value;
1409
    }
1410
}
1411
void setDefaultCegqiFullEffort(Options& opts, bool value)
1412
{
1413
    if (!opts.quantifiers.cegqiFullEffortWasSetByUser) {
1414
        opts.quantifiers.cegqiFullEffort = value;
1415
    }
1416
}
1417
void setDefaultCegqiInnermost(Options& opts, bool value)
1418
{
1419
    if (!opts.quantifiers.cegqiInnermostWasSetByUser) {
1420
        opts.quantifiers.cegqiInnermost = value;
1421
    }
1422
}
1423
void setDefaultCegqiMidpoint(Options& opts, bool value)
1424
{
1425
    if (!opts.quantifiers.cegqiMidpointWasSetByUser) {
1426
        opts.quantifiers.cegqiMidpoint = value;
1427
    }
1428
}
1429
void setDefaultCegqiMinBounds(Options& opts, bool value)
1430
{
1431
    if (!opts.quantifiers.cegqiMinBoundsWasSetByUser) {
1432
        opts.quantifiers.cegqiMinBounds = value;
1433
    }
1434
}
1435
void setDefaultCegqiModel(Options& opts, bool value)
1436
{
1437
    if (!opts.quantifiers.cegqiModelWasSetByUser) {
1438
        opts.quantifiers.cegqiModel = value;
1439
    }
1440
}
1441
void setDefaultCegqiMultiInst(Options& opts, bool value)
1442
{
1443
    if (!opts.quantifiers.cegqiMultiInstWasSetByUser) {
1444
        opts.quantifiers.cegqiMultiInst = value;
1445
    }
1446
}
1447
void setDefaultCegqiNestedQE(Options& opts, bool value)
1448
{
1449
    if (!opts.quantifiers.cegqiNestedQEWasSetByUser) {
1450
        opts.quantifiers.cegqiNestedQE = value;
1451
    }
1452
}
1453
void setDefaultCegqiNopt(Options& opts, bool value)
1454
{
1455
    if (!opts.quantifiers.cegqiNoptWasSetByUser) {
1456
        opts.quantifiers.cegqiNopt = value;
1457
    }
1458
}
1459
void setDefaultCegqiRepeatLit(Options& opts, bool value)
1460
{
1461
    if (!opts.quantifiers.cegqiRepeatLitWasSetByUser) {
1462
        opts.quantifiers.cegqiRepeatLit = value;
1463
    }
1464
}
1465
void setDefaultCegqiRoundUpLowerLia(Options& opts, bool value)
1466
{
1467
    if (!opts.quantifiers.cegqiRoundUpLowerLiaWasSetByUser) {
1468
        opts.quantifiers.cegqiRoundUpLowerLia = value;
1469
    }
1470
}
1471
void setDefaultCegqiSat(Options& opts, bool value)
1472
{
1473
    if (!opts.quantifiers.cegqiSatWasSetByUser) {
1474
        opts.quantifiers.cegqiSat = value;
1475
    }
1476
}
1477
void setDefaultCegqiUseInfInt(Options& opts, bool value)
1478
{
1479
    if (!opts.quantifiers.cegqiUseInfIntWasSetByUser) {
1480
        opts.quantifiers.cegqiUseInfInt = value;
1481
    }
1482
}
1483
void setDefaultCegqiUseInfReal(Options& opts, bool value)
1484
{
1485
    if (!opts.quantifiers.cegqiUseInfRealWasSetByUser) {
1486
        opts.quantifiers.cegqiUseInfReal = value;
1487
    }
1488
}
1489
void setDefaultCondVarSplitQuantAgg(Options& opts, bool value)
1490
{
1491
    if (!opts.quantifiers.condVarSplitQuantAggWasSetByUser) {
1492
        opts.quantifiers.condVarSplitQuantAgg = value;
1493
    }
1494
}
1495
void setDefaultCondVarSplitQuant(Options& opts, bool value)
1496
{
1497
    if (!opts.quantifiers.condVarSplitQuantWasSetByUser) {
1498
        opts.quantifiers.condVarSplitQuant = value;
1499
    }
1500
}
1501
void setDefaultConjectureFilterActiveTerms(Options& opts, bool value)
1502
{
1503
    if (!opts.quantifiers.conjectureFilterActiveTermsWasSetByUser) {
1504
        opts.quantifiers.conjectureFilterActiveTerms = value;
1505
    }
1506
}
1507
void setDefaultConjectureFilterCanonical(Options& opts, bool value)
1508
{
1509
    if (!opts.quantifiers.conjectureFilterCanonicalWasSetByUser) {
1510
        opts.quantifiers.conjectureFilterCanonical = value;
1511
    }
1512
}
1513
void setDefaultConjectureFilterModel(Options& opts, bool value)
1514
{
1515
    if (!opts.quantifiers.conjectureFilterModelWasSetByUser) {
1516
        opts.quantifiers.conjectureFilterModel = value;
1517
    }
1518
}
1519
void setDefaultConjectureGen(Options& opts, bool value)
1520
{
1521
    if (!opts.quantifiers.conjectureGenWasSetByUser) {
1522
        opts.quantifiers.conjectureGen = value;
1523
    }
1524
}
1525
void setDefaultConjectureGenGtEnum(Options& opts, int64_t value)
1526
{
1527
    if (!opts.quantifiers.conjectureGenGtEnumWasSetByUser) {
1528
        opts.quantifiers.conjectureGenGtEnum = value;
1529
    }
1530
}
1531
void setDefaultConjectureGenMaxDepth(Options& opts, int64_t value)
1532
{
1533
    if (!opts.quantifiers.conjectureGenMaxDepthWasSetByUser) {
1534
        opts.quantifiers.conjectureGenMaxDepth = value;
1535
    }
1536
}
1537
void setDefaultConjectureGenPerRound(Options& opts, int64_t value)
1538
{
1539
    if (!opts.quantifiers.conjectureGenPerRoundWasSetByUser) {
1540
        opts.quantifiers.conjectureGenPerRound = value;
1541
    }
1542
}
1543
void setDefaultConjectureUeeIntro(Options& opts, bool value)
1544
{
1545
    if (!opts.quantifiers.conjectureUeeIntroWasSetByUser) {
1546
        opts.quantifiers.conjectureUeeIntro = value;
1547
    }
1548
}
1549
void setDefaultConjectureNoFilter(Options& opts, bool value)
1550
{
1551
    if (!opts.quantifiers.conjectureNoFilterWasSetByUser) {
1552
        opts.quantifiers.conjectureNoFilter = value;
1553
    }
1554
}
1555
void setDefaultDtStcInduction(Options& opts, bool value)
1556
{
1557
    if (!opts.quantifiers.dtStcInductionWasSetByUser) {
1558
        opts.quantifiers.dtStcInduction = value;
1559
    }
1560
}
1561
void setDefaultDtVarExpandQuant(Options& opts, bool value)
1562
{
1563
    if (!opts.quantifiers.dtVarExpandQuantWasSetByUser) {
1564
        opts.quantifiers.dtVarExpandQuant = value;
1565
    }
1566
}
1567
void setDefaultEMatching(Options& opts, bool value)
1568
{
1569
    if (!opts.quantifiers.eMatchingWasSetByUser) {
1570
        opts.quantifiers.eMatching = value;
1571
    }
1572
}
1573
void setDefaultElimTautQuant(Options& opts, bool value)
1574
{
1575
    if (!opts.quantifiers.elimTautQuantWasSetByUser) {
1576
        opts.quantifiers.elimTautQuant = value;
1577
    }
1578
}
1579
void setDefaultExtRewriteQuant(Options& opts, bool value)
1580
{
1581
    if (!opts.quantifiers.extRewriteQuantWasSetByUser) {
1582
        opts.quantifiers.extRewriteQuant = value;
1583
    }
1584
}
1585
void setDefaultFiniteModelFind(Options& opts, bool value)
1586
{
1587
    if (!opts.quantifiers.finiteModelFindWasSetByUser) {
1588
        opts.quantifiers.finiteModelFind = value;
1589
    }
1590
}
1591
void setDefaultFmfBound(Options& opts, bool value)
1592
{
1593
    if (!opts.quantifiers.fmfBoundWasSetByUser) {
1594
        opts.quantifiers.fmfBound = value;
1595
    }
1596
}
1597
void setDefaultFmfBoundInt(Options& opts, bool value)
1598
{
1599
    if (!opts.quantifiers.fmfBoundIntWasSetByUser) {
1600
        opts.quantifiers.fmfBoundInt = value;
1601
    }
1602
}
1603
void setDefaultFmfBoundLazy(Options& opts, bool value)
1604
{
1605
    if (!opts.quantifiers.fmfBoundLazyWasSetByUser) {
1606
        opts.quantifiers.fmfBoundLazy = value;
1607
    }
1608
}
1609
void setDefaultFmfFmcSimple(Options& opts, bool value)
1610
{
1611
    if (!opts.quantifiers.fmfFmcSimpleWasSetByUser) {
1612
        opts.quantifiers.fmfFmcSimple = value;
1613
    }
1614
}
1615
void setDefaultFmfFreshDistConst(Options& opts, bool value)
1616
{
1617
    if (!opts.quantifiers.fmfFreshDistConstWasSetByUser) {
1618
        opts.quantifiers.fmfFreshDistConst = value;
1619
    }
1620
}
1621
void setDefaultFmfFunWellDefined(Options& opts, bool value)
1622
{
1623
    if (!opts.quantifiers.fmfFunWellDefinedWasSetByUser) {
1624
        opts.quantifiers.fmfFunWellDefined = value;
1625
    }
1626
}
1627
void setDefaultFmfFunWellDefinedRelevant(Options& opts, bool value)
1628
{
1629
    if (!opts.quantifiers.fmfFunWellDefinedRelevantWasSetByUser) {
1630
        opts.quantifiers.fmfFunWellDefinedRelevant = value;
1631
    }
1632
}
1633
void setDefaultFmfInstEngine(Options& opts, bool value)
1634
{
1635
    if (!opts.quantifiers.fmfInstEngineWasSetByUser) {
1636
        opts.quantifiers.fmfInstEngine = value;
1637
    }
1638
}
1639
void setDefaultFmfTypeCompletionThresh(Options& opts, int64_t value)
1640
{
1641
    if (!opts.quantifiers.fmfTypeCompletionThreshWasSetByUser) {
1642
        opts.quantifiers.fmfTypeCompletionThresh = value;
1643
    }
1644
}
1645
void setDefaultFullSaturateInterleave(Options& opts, bool value)
1646
{
1647
    if (!opts.quantifiers.fullSaturateInterleaveWasSetByUser) {
1648
        opts.quantifiers.fullSaturateInterleave = value;
1649
    }
1650
}
1651
void setDefaultFullSaturateStratify(Options& opts, bool value)
1652
{
1653
    if (!opts.quantifiers.fullSaturateStratifyWasSetByUser) {
1654
        opts.quantifiers.fullSaturateStratify = value;
1655
    }
1656
}
1657
void setDefaultFullSaturateSum(Options& opts, bool value)
1658
{
1659
    if (!opts.quantifiers.fullSaturateSumWasSetByUser) {
1660
        opts.quantifiers.fullSaturateSum = value;
1661
    }
1662
}
1663
void setDefaultFullSaturateQuant(Options& opts, bool value)
1664
{
1665
    if (!opts.quantifiers.fullSaturateQuantWasSetByUser) {
1666
        opts.quantifiers.fullSaturateQuant = value;
1667
    }
1668
}
1669
void setDefaultFullSaturateLimit(Options& opts, int64_t value)
1670
{
1671
    if (!opts.quantifiers.fullSaturateLimitWasSetByUser) {
1672
        opts.quantifiers.fullSaturateLimit = value;
1673
    }
1674
}
1675
void setDefaultFullSaturateQuantRd(Options& opts, bool value)
1676
{
1677
    if (!opts.quantifiers.fullSaturateQuantRdWasSetByUser) {
1678
        opts.quantifiers.fullSaturateQuantRd = value;
1679
    }
1680
}
1681
void setDefaultGlobalNegate(Options& opts, bool value)
1682
{
1683
    if (!opts.quantifiers.globalNegateWasSetByUser) {
1684
        opts.quantifiers.globalNegate = value;
1685
    }
1686
}
1687
void setDefaultHoElim(Options& opts, bool value)
1688
{
1689
    if (!opts.quantifiers.hoElimWasSetByUser) {
1690
        opts.quantifiers.hoElim = value;
1691
    }
1692
}
1693
void setDefaultHoElimStoreAx(Options& opts, bool value)
1694
{
1695
    if (!opts.quantifiers.hoElimStoreAxWasSetByUser) {
1696
        opts.quantifiers.hoElimStoreAx = value;
1697
    }
1698
}
1699
void setDefaultHoMatching(Options& opts, bool value)
1700
{
1701
    if (!opts.quantifiers.hoMatchingWasSetByUser) {
1702
        opts.quantifiers.hoMatching = value;
1703
    }
1704
}
1705
void setDefaultHoMatchingVarArgPriority(Options& opts, bool value)
1706
{
1707
    if (!opts.quantifiers.hoMatchingVarArgPriorityWasSetByUser) {
1708
        opts.quantifiers.hoMatchingVarArgPriority = value;
1709
    }
1710
}
1711
void setDefaultHoMergeTermDb(Options& opts, bool value)
1712
{
1713
    if (!opts.quantifiers.hoMergeTermDbWasSetByUser) {
1714
        opts.quantifiers.hoMergeTermDb = value;
1715
    }
1716
}
1717
void setDefaultIncrementTriggers(Options& opts, bool value)
1718
{
1719
    if (!opts.quantifiers.incrementTriggersWasSetByUser) {
1720
        opts.quantifiers.incrementTriggers = value;
1721
    }
1722
}
1723
void setDefaultInstLevelInputOnly(Options& opts, bool value)
1724
{
1725
    if (!opts.quantifiers.instLevelInputOnlyWasSetByUser) {
1726
        opts.quantifiers.instLevelInputOnly = value;
1727
    }
1728
}
1729
void setDefaultInstMaxLevel(Options& opts, int64_t value)
1730
{
1731
    if (!opts.quantifiers.instMaxLevelWasSetByUser) {
1732
        opts.quantifiers.instMaxLevel = value;
1733
    }
1734
}
1735
void setDefaultInstMaxRounds(Options& opts, int64_t value)
1736
{
1737
    if (!opts.quantifiers.instMaxRoundsWasSetByUser) {
1738
        opts.quantifiers.instMaxRounds = value;
1739
    }
1740
}
1741
void setDefaultInstNoEntail(Options& opts, bool value)
1742
{
1743
    if (!opts.quantifiers.instNoEntailWasSetByUser) {
1744
        opts.quantifiers.instNoEntail = value;
1745
    }
1746
}
1747
void setDefaultInstWhenPhase(Options& opts, int64_t value)
1748
{
1749
    if (!opts.quantifiers.instWhenPhaseWasSetByUser) {
1750
        opts.quantifiers.instWhenPhase = value;
1751
    }
1752
}
1753
void setDefaultInstWhenStrictInterleave(Options& opts, bool value)
1754
{
1755
    if (!opts.quantifiers.instWhenStrictInterleaveWasSetByUser) {
1756
        opts.quantifiers.instWhenStrictInterleave = value;
1757
    }
1758
}
1759
void setDefaultInstWhenTcFirst(Options& opts, bool value)
1760
{
1761
    if (!opts.quantifiers.instWhenTcFirstWasSetByUser) {
1762
        opts.quantifiers.instWhenTcFirst = value;
1763
    }
1764
}
1765
void setDefaultInstWhenMode(Options& opts, InstWhenMode value)
1766
{
1767
    if (!opts.quantifiers.instWhenModeWasSetByUser) {
1768
        opts.quantifiers.instWhenMode = value;
1769
    }
1770
}
1771
void setDefaultIntWfInduction(Options& opts, bool value)
1772
{
1773
    if (!opts.quantifiers.intWfInductionWasSetByUser) {
1774
        opts.quantifiers.intWfInduction = value;
1775
    }
1776
}
1777
void setDefaultIteDtTesterSplitQuant(Options& opts, bool value)
1778
{
1779
    if (!opts.quantifiers.iteDtTesterSplitQuantWasSetByUser) {
1780
        opts.quantifiers.iteDtTesterSplitQuant = value;
1781
    }
1782
}
1783
void setDefaultIteLiftQuant(Options& opts, IteLiftQuantMode value)
1784
{
1785
    if (!opts.quantifiers.iteLiftQuantWasSetByUser) {
1786
        opts.quantifiers.iteLiftQuant = value;
1787
    }
1788
}
1789
void setDefaultLiteralMatchMode(Options& opts, LiteralMatchMode value)
1790
{
1791
    if (!opts.quantifiers.literalMatchModeWasSetByUser) {
1792
        opts.quantifiers.literalMatchMode = value;
1793
    }
1794
}
1795
void setDefaultMacrosQuant(Options& opts, bool value)
1796
{
1797
    if (!opts.quantifiers.macrosQuantWasSetByUser) {
1798
        opts.quantifiers.macrosQuant = value;
1799
    }
1800
}
1801
void setDefaultMacrosQuantMode(Options& opts, MacrosQuantMode value)
1802
{
1803
    if (!opts.quantifiers.macrosQuantModeWasSetByUser) {
1804
        opts.quantifiers.macrosQuantMode = value;
1805
    }
1806
}
1807
void setDefaultMbqiInterleave(Options& opts, bool value)
1808
{
1809
    if (!opts.quantifiers.mbqiInterleaveWasSetByUser) {
1810
        opts.quantifiers.mbqiInterleave = value;
1811
    }
1812
}
1813
void setDefaultFmfOneInstPerRound(Options& opts, bool value)
1814
{
1815
    if (!opts.quantifiers.fmfOneInstPerRoundWasSetByUser) {
1816
        opts.quantifiers.fmfOneInstPerRound = value;
1817
    }
1818
}
1819
void setDefaultMbqiMode(Options& opts, MbqiMode value)
1820
{
1821
    if (!opts.quantifiers.mbqiModeWasSetByUser) {
1822
        opts.quantifiers.mbqiMode = value;
1823
    }
1824
}
1825
void setDefaultMiniscopeQuant(Options& opts, bool value)
1826
{
1827
    if (!opts.quantifiers.miniscopeQuantWasSetByUser) {
1828
        opts.quantifiers.miniscopeQuant = value;
1829
    }
1830
}
1831
void setDefaultMiniscopeQuantFreeVar(Options& opts, bool value)
1832
{
1833
    if (!opts.quantifiers.miniscopeQuantFreeVarWasSetByUser) {
1834
        opts.quantifiers.miniscopeQuantFreeVar = value;
1835
    }
1836
}
1837
void setDefaultMultiTriggerCache(Options& opts, bool value)
1838
{
1839
    if (!opts.quantifiers.multiTriggerCacheWasSetByUser) {
1840
        opts.quantifiers.multiTriggerCache = value;
1841
    }
1842
}
1843
void setDefaultMultiTriggerLinear(Options& opts, bool value)
1844
{
1845
    if (!opts.quantifiers.multiTriggerLinearWasSetByUser) {
1846
        opts.quantifiers.multiTriggerLinear = value;
1847
    }
1848
}
1849
void setDefaultMultiTriggerPriority(Options& opts, bool value)
1850
{
1851
    if (!opts.quantifiers.multiTriggerPriorityWasSetByUser) {
1852
        opts.quantifiers.multiTriggerPriority = value;
1853
    }
1854
}
1855
void setDefaultMultiTriggerWhenSingle(Options& opts, bool value)
1856
{
1857
    if (!opts.quantifiers.multiTriggerWhenSingleWasSetByUser) {
1858
        opts.quantifiers.multiTriggerWhenSingle = value;
1859
    }
1860
}
1861
void setDefaultPartialTriggers(Options& opts, bool value)
1862
{
1863
    if (!opts.quantifiers.partialTriggersWasSetByUser) {
1864
        opts.quantifiers.partialTriggers = value;
1865
    }
1866
}
1867
void setDefaultPoolInst(Options& opts, bool value)
1868
{
1869
    if (!opts.quantifiers.poolInstWasSetByUser) {
1870
        opts.quantifiers.poolInst = value;
1871
    }
1872
}
1873
void setDefaultPreSkolemQuant(Options& opts, bool value)
1874
{
1875
    if (!opts.quantifiers.preSkolemQuantWasSetByUser) {
1876
        opts.quantifiers.preSkolemQuant = value;
1877
    }
1878
}
1879
void setDefaultPreSkolemQuantAgg(Options& opts, bool value)
1880
{
1881
    if (!opts.quantifiers.preSkolemQuantAggWasSetByUser) {
1882
        opts.quantifiers.preSkolemQuantAgg = value;
1883
    }
1884
}
1885
void setDefaultPreSkolemQuantNested(Options& opts, bool value)
1886
{
1887
    if (!opts.quantifiers.preSkolemQuantNestedWasSetByUser) {
1888
        opts.quantifiers.preSkolemQuantNested = value;
1889
    }
1890
}
1891
void setDefaultPrenexQuantUser(Options& opts, bool value)
1892
{
1893
    if (!opts.quantifiers.prenexQuantUserWasSetByUser) {
1894
        opts.quantifiers.prenexQuantUser = value;
1895
    }
1896
}
1897
void setDefaultPrenexQuant(Options& opts, PrenexQuantMode value)
1898
{
1899
    if (!opts.quantifiers.prenexQuantWasSetByUser) {
1900
        opts.quantifiers.prenexQuant = value;
1901
    }
1902
}
1903
void setDefaultPurifyTriggers(Options& opts, bool value)
1904
{
1905
    if (!opts.quantifiers.purifyTriggersWasSetByUser) {
1906
        opts.quantifiers.purifyTriggers = value;
1907
    }
1908
}
1909
void setDefaultQcfAllConflict(Options& opts, bool value)
1910
{
1911
    if (!opts.quantifiers.qcfAllConflictWasSetByUser) {
1912
        opts.quantifiers.qcfAllConflict = value;
1913
    }
1914
}
1915
void setDefaultQcfEagerCheckRd(Options& opts, bool value)
1916
{
1917
    if (!opts.quantifiers.qcfEagerCheckRdWasSetByUser) {
1918
        opts.quantifiers.qcfEagerCheckRd = value;
1919
    }
1920
}
1921
void setDefaultQcfEagerTest(Options& opts, bool value)
1922
{
1923
    if (!opts.quantifiers.qcfEagerTestWasSetByUser) {
1924
        opts.quantifiers.qcfEagerTest = value;
1925
    }
1926
}
1927
void setDefaultQcfNestedConflict(Options& opts, bool value)
1928
{
1929
    if (!opts.quantifiers.qcfNestedConflictWasSetByUser) {
1930
        opts.quantifiers.qcfNestedConflict = value;
1931
    }
1932
}
1933
void setDefaultQcfSkipRd(Options& opts, bool value)
1934
{
1935
    if (!opts.quantifiers.qcfSkipRdWasSetByUser) {
1936
        opts.quantifiers.qcfSkipRd = value;
1937
    }
1938
}
1939
void setDefaultQcfTConstraint(Options& opts, bool value)
1940
{
1941
    if (!opts.quantifiers.qcfTConstraintWasSetByUser) {
1942
        opts.quantifiers.qcfTConstraint = value;
1943
    }
1944
}
1945
void setDefaultQcfVoExp(Options& opts, bool value)
1946
{
1947
    if (!opts.quantifiers.qcfVoExpWasSetByUser) {
1948
        opts.quantifiers.qcfVoExp = value;
1949
    }
1950
}
1951
void setDefaultQuantAlphaEquiv(Options& opts, bool value)
1952
{
1953
    if (!opts.quantifiers.quantAlphaEquivWasSetByUser) {
1954
        opts.quantifiers.quantAlphaEquiv = value;
1955
    }
1956
}
1957
void setDefaultQuantConflictFind(Options& opts, bool value)
1958
{
1959
    if (!opts.quantifiers.quantConflictFindWasSetByUser) {
1960
        opts.quantifiers.quantConflictFind = value;
1961
    }
1962
}
1963
void setDefaultQcfMode(Options& opts, QcfMode value)
1964
{
1965
    if (!opts.quantifiers.qcfModeWasSetByUser) {
1966
        opts.quantifiers.qcfMode = value;
1967
    }
1968
}
1969
void setDefaultQcfWhenMode(Options& opts, QcfWhenMode value)
1970
{
1971
    if (!opts.quantifiers.qcfWhenModeWasSetByUser) {
1972
        opts.quantifiers.qcfWhenMode = value;
1973
    }
1974
}
1975
void setDefaultQuantDynamicSplit(Options& opts, QuantDSplitMode value)
1976
{
1977
    if (!opts.quantifiers.quantDynamicSplitWasSetByUser) {
1978
        opts.quantifiers.quantDynamicSplit = value;
1979
    }
1980
}
1981
void setDefaultQuantFunWellDefined(Options& opts, bool value)
1982
{
1983
    if (!opts.quantifiers.quantFunWellDefinedWasSetByUser) {
1984
        opts.quantifiers.quantFunWellDefined = value;
1985
    }
1986
}
1987
void setDefaultQuantInduction(Options& opts, bool value)
1988
{
1989
    if (!opts.quantifiers.quantInductionWasSetByUser) {
1990
        opts.quantifiers.quantInduction = value;
1991
    }
1992
}
1993
void setDefaultQuantRepMode(Options& opts, QuantRepMode value)
1994
{
1995
    if (!opts.quantifiers.quantRepModeWasSetByUser) {
1996
        opts.quantifiers.quantRepMode = value;
1997
    }
1998
}
1999
void setDefaultQuantSplit(Options& opts, bool value)
2000
{
2001
    if (!opts.quantifiers.quantSplitWasSetByUser) {
2002
        opts.quantifiers.quantSplit = value;
2003
    }
2004
}
2005
void setDefaultRegisterQuantBodyTerms(Options& opts, bool value)
2006
{
2007
    if (!opts.quantifiers.registerQuantBodyTermsWasSetByUser) {
2008
        opts.quantifiers.registerQuantBodyTerms = value;
2009
    }
2010
}
2011
void setDefaultRelationalTriggers(Options& opts, bool value)
2012
{
2013
    if (!opts.quantifiers.relationalTriggersWasSetByUser) {
2014
        opts.quantifiers.relationalTriggers = value;
2015
    }
2016
}
2017
void setDefaultRelevantTriggers(Options& opts, bool value)
2018
{
2019
    if (!opts.quantifiers.relevantTriggersWasSetByUser) {
2020
        opts.quantifiers.relevantTriggers = value;
2021
    }
2022
}
2023
void setDefaultSygus(Options& opts, bool value)
2024
{
2025
    if (!opts.quantifiers.sygusWasSetByUser) {
2026
        opts.quantifiers.sygus = value;
2027
    }
2028
}
2029
void setDefaultSygusActiveGenEnumConsts(Options& opts, uint64_t value)
2030
{
2031
    if (!opts.quantifiers.sygusActiveGenEnumConstsWasSetByUser) {
2032
        opts.quantifiers.sygusActiveGenEnumConsts = value;
2033
    }
2034
}
2035
void setDefaultSygusActiveGenMode(Options& opts, SygusActiveGenMode value)
2036
{
2037
    if (!opts.quantifiers.sygusActiveGenModeWasSetByUser) {
2038
        opts.quantifiers.sygusActiveGenMode = value;
2039
    }
2040
}
2041
void setDefaultSygusAddConstGrammar(Options& opts, bool value)
2042
{
2043
    if (!opts.quantifiers.sygusAddConstGrammarWasSetByUser) {
2044
        opts.quantifiers.sygusAddConstGrammar = value;
2045
    }
2046
}
2047
void setDefaultSygusArgRelevant(Options& opts, bool value)
2048
{
2049
    if (!opts.quantifiers.sygusArgRelevantWasSetByUser) {
2050
        opts.quantifiers.sygusArgRelevant = value;
2051
    }
2052
}
2053
void setDefaultSygusInvAutoUnfold(Options& opts, bool value)
2054
{
2055
    if (!opts.quantifiers.sygusInvAutoUnfoldWasSetByUser) {
2056
        opts.quantifiers.sygusInvAutoUnfold = value;
2057
    }
2058
}
2059
void setDefaultSygusBoolIteReturnConst(Options& opts, bool value)
2060
{
2061
    if (!opts.quantifiers.sygusBoolIteReturnConstWasSetByUser) {
2062
        opts.quantifiers.sygusBoolIteReturnConst = value;
2063
    }
2064
}
2065
void setDefaultSygusCoreConnective(Options& opts, bool value)
2066
{
2067
    if (!opts.quantifiers.sygusCoreConnectiveWasSetByUser) {
2068
        opts.quantifiers.sygusCoreConnective = value;
2069
    }
2070
}
2071
void setDefaultSygusConstRepairAbort(Options& opts, bool value)
2072
{
2073
    if (!opts.quantifiers.sygusConstRepairAbortWasSetByUser) {
2074
        opts.quantifiers.sygusConstRepairAbort = value;
2075
    }
2076
}
2077
void setDefaultSygusEvalOpt(Options& opts, bool value)
2078
{
2079
    if (!opts.quantifiers.sygusEvalOptWasSetByUser) {
2080
        opts.quantifiers.sygusEvalOpt = value;
2081
    }
2082
}
2083
void setDefaultSygusEvalUnfold(Options& opts, bool value)
2084
{
2085
    if (!opts.quantifiers.sygusEvalUnfoldWasSetByUser) {
2086
        opts.quantifiers.sygusEvalUnfold = value;
2087
    }
2088
}
2089
void setDefaultSygusEvalUnfoldBool(Options& opts, bool value)
2090
{
2091
    if (!opts.quantifiers.sygusEvalUnfoldBoolWasSetByUser) {
2092
        opts.quantifiers.sygusEvalUnfoldBool = value;
2093
    }
2094
}
2095
void setDefaultSygusExprMinerCheckTimeout(Options& opts, uint64_t value)
2096
{
2097
    if (!opts.quantifiers.sygusExprMinerCheckTimeoutWasSetByUser) {
2098
        opts.quantifiers.sygusExprMinerCheckTimeout = value;
2099
    }
2100
}
2101
void setDefaultSygusExtRew(Options& opts, bool value)
2102
{
2103
    if (!opts.quantifiers.sygusExtRewWasSetByUser) {
2104
        opts.quantifiers.sygusExtRew = value;
2105
    }
2106
}
2107
void setDefaultSygusFilterSolRevSubsume(Options& opts, bool value)
2108
{
2109
    if (!opts.quantifiers.sygusFilterSolRevSubsumeWasSetByUser) {
2110
        opts.quantifiers.sygusFilterSolRevSubsume = value;
2111
    }
2112
}
2113
void setDefaultSygusFilterSolMode(Options& opts, SygusFilterSolMode value)
2114
{
2115
    if (!opts.quantifiers.sygusFilterSolModeWasSetByUser) {
2116
        opts.quantifiers.sygusFilterSolMode = value;
2117
    }
2118
}
2119
void setDefaultSygusGrammarConsMode(Options& opts, SygusGrammarConsMode value)
2120
{
2121
    if (!opts.quantifiers.sygusGrammarConsModeWasSetByUser) {
2122
        opts.quantifiers.sygusGrammarConsMode = value;
2123
    }
2124
}
2125
void setDefaultSygusGrammarNorm(Options& opts, bool value)
2126
{
2127
    if (!opts.quantifiers.sygusGrammarNormWasSetByUser) {
2128
        opts.quantifiers.sygusGrammarNorm = value;
2129
    }
2130
}
2131
void setDefaultSygusInference(Options& opts, bool value)
2132
{
2133
    if (!opts.quantifiers.sygusInferenceWasSetByUser) {
2134
        opts.quantifiers.sygusInference = value;
2135
    }
2136
}
2137
void setDefaultSygusInst(Options& opts, bool value)
2138
{
2139
    if (!opts.quantifiers.sygusInstWasSetByUser) {
2140
        opts.quantifiers.sygusInst = value;
2141
    }
2142
}
2143
void setDefaultSygusInstMode(Options& opts, SygusInstMode value)
2144
{
2145
    if (!opts.quantifiers.sygusInstModeWasSetByUser) {
2146
        opts.quantifiers.sygusInstMode = value;
2147
    }
2148
}
2149
void setDefaultSygusInstScope(Options& opts, SygusInstScope value)
2150
{
2151
    if (!opts.quantifiers.sygusInstScopeWasSetByUser) {
2152
        opts.quantifiers.sygusInstScope = value;
2153
    }
2154
}
2155
void setDefaultSygusInstTermSel(Options& opts, SygusInstTermSelMode value)
2156
{
2157
    if (!opts.quantifiers.sygusInstTermSelWasSetByUser) {
2158
        opts.quantifiers.sygusInstTermSel = value;
2159
    }
2160
}
2161
void setDefaultSygusInvTemplWhenSyntax(Options& opts, bool value)
2162
{
2163
    if (!opts.quantifiers.sygusInvTemplWhenSyntaxWasSetByUser) {
2164
        opts.quantifiers.sygusInvTemplWhenSyntax = value;
2165
    }
2166
}
2167
void setDefaultSygusInvTemplMode(Options& opts, SygusInvTemplMode value)
2168
{
2169
    if (!opts.quantifiers.sygusInvTemplModeWasSetByUser) {
2170
        opts.quantifiers.sygusInvTemplMode = value;
2171
    }
2172
}
2173
void setDefaultSygusMinGrammar(Options& opts, bool value)
2174
{
2175
    if (!opts.quantifiers.sygusMinGrammarWasSetByUser) {
2176
        opts.quantifiers.sygusMinGrammar = value;
2177
    }
2178
}
2179
void setDefaultSygusUnifPbe(Options& opts, bool value)
2180
{
2181
    if (!opts.quantifiers.sygusUnifPbeWasSetByUser) {
2182
        opts.quantifiers.sygusUnifPbe = value;
2183
    }
2184
}
2185
void setDefaultSygusPbeMultiFair(Options& opts, bool value)
2186
{
2187
    if (!opts.quantifiers.sygusPbeMultiFairWasSetByUser) {
2188
        opts.quantifiers.sygusPbeMultiFair = value;
2189
    }
2190
}
2191
void setDefaultSygusPbeMultiFairDiff(Options& opts, int64_t value)
2192
{
2193
    if (!opts.quantifiers.sygusPbeMultiFairDiffWasSetByUser) {
2194
        opts.quantifiers.sygusPbeMultiFairDiff = value;
2195
    }
2196
}
2197
void setDefaultSygusQePreproc(Options& opts, bool value)
2198
{
2199
    if (!opts.quantifiers.sygusQePreprocWasSetByUser) {
2200
        opts.quantifiers.sygusQePreproc = value;
2201
    }
2202
}
2203
void setDefaultSygusQueryGen(Options& opts, bool value)
2204
{
2205
    if (!opts.quantifiers.sygusQueryGenWasSetByUser) {
2206
        opts.quantifiers.sygusQueryGen = value;
2207
    }
2208
}
2209
void setDefaultSygusQueryGenCheck(Options& opts, bool value)
2210
{
2211
    if (!opts.quantifiers.sygusQueryGenCheckWasSetByUser) {
2212
        opts.quantifiers.sygusQueryGenCheck = value;
2213
    }
2214
}
2215
void setDefaultSygusQueryGenDumpFiles(Options& opts, SygusQueryDumpFilesMode value)
2216
{
2217
    if (!opts.quantifiers.sygusQueryGenDumpFilesWasSetByUser) {
2218
        opts.quantifiers.sygusQueryGenDumpFiles = value;
2219
    }
2220
}
2221
void setDefaultSygusQueryGenThresh(Options& opts, uint64_t value)
2222
{
2223
    if (!opts.quantifiers.sygusQueryGenThreshWasSetByUser) {
2224
        opts.quantifiers.sygusQueryGenThresh = value;
2225
    }
2226
}
2227
void setDefaultSygusRecFun(Options& opts, bool value)
2228
{
2229
    if (!opts.quantifiers.sygusRecFunWasSetByUser) {
2230
        opts.quantifiers.sygusRecFun = value;
2231
    }
2232
}
2233
void setDefaultSygusRecFunEvalLimit(Options& opts, uint64_t value)
2234
{
2235
    if (!opts.quantifiers.sygusRecFunEvalLimitWasSetByUser) {
2236
        opts.quantifiers.sygusRecFunEvalLimit = value;
2237
    }
2238
}
2239
void setDefaultSygusRepairConst(Options& opts, bool value)
2240
{
2241
    if (!opts.quantifiers.sygusRepairConstWasSetByUser) {
2242
        opts.quantifiers.sygusRepairConst = value;
2243
    }
2244
}
2245
void setDefaultSygusRepairConstTimeout(Options& opts, uint64_t value)
2246
{
2247
    if (!opts.quantifiers.sygusRepairConstTimeoutWasSetByUser) {
2248
        opts.quantifiers.sygusRepairConstTimeout = value;
2249
    }
2250
}
2251
void setDefaultSygusRew(Options& opts, bool value)
2252
{
2253
    if (!opts.quantifiers.sygusRewWasSetByUser) {
2254
        opts.quantifiers.sygusRew = value;
2255
    }
2256
}
2257
void setDefaultSygusRewSynth(Options& opts, bool value)
2258
{
2259
    if (!opts.quantifiers.sygusRewSynthWasSetByUser) {
2260
        opts.quantifiers.sygusRewSynth = value;
2261
    }
2262
}
2263
void setDefaultSygusRewSynthAccel(Options& opts, bool value)
2264
{
2265
    if (!opts.quantifiers.sygusRewSynthAccelWasSetByUser) {
2266
        opts.quantifiers.sygusRewSynthAccel = value;
2267
    }
2268
}
2269
void setDefaultSygusRewSynthCheck(Options& opts, bool value)
2270
{
2271
    if (!opts.quantifiers.sygusRewSynthCheckWasSetByUser) {
2272
        opts.quantifiers.sygusRewSynthCheck = value;
2273
    }
2274
}
2275
void setDefaultSygusRewSynthFilterCong(Options& opts, bool value)
2276
{
2277
    if (!opts.quantifiers.sygusRewSynthFilterCongWasSetByUser) {
2278
        opts.quantifiers.sygusRewSynthFilterCong = value;
2279
    }
2280
}
2281
void setDefaultSygusRewSynthFilterMatch(Options& opts, bool value)
2282
{
2283
    if (!opts.quantifiers.sygusRewSynthFilterMatchWasSetByUser) {
2284
        opts.quantifiers.sygusRewSynthFilterMatch = value;
2285
    }
2286
}
2287
void setDefaultSygusRewSynthFilterNonLinear(Options& opts, bool value)
2288
{
2289
    if (!opts.quantifiers.sygusRewSynthFilterNonLinearWasSetByUser) {
2290
        opts.quantifiers.sygusRewSynthFilterNonLinear = value;
2291
    }
2292
}
2293
void setDefaultSygusRewSynthFilterOrder(Options& opts, bool value)
2294
{
2295
    if (!opts.quantifiers.sygusRewSynthFilterOrderWasSetByUser) {
2296
        opts.quantifiers.sygusRewSynthFilterOrder = value;
2297
    }
2298
}
2299
void setDefaultSygusRewSynthInput(Options& opts, bool value)
2300
{
2301
    if (!opts.quantifiers.sygusRewSynthInputWasSetByUser) {
2302
        opts.quantifiers.sygusRewSynthInput = value;
2303
    }
2304
}
2305
void setDefaultSygusRewSynthInputNVars(Options& opts, int64_t value)
2306
{
2307
    if (!opts.quantifiers.sygusRewSynthInputNVarsWasSetByUser) {
2308
        opts.quantifiers.sygusRewSynthInputNVars = value;
2309
    }
2310
}
2311
void setDefaultSygusRewSynthInputUseBool(Options& opts, bool value)
2312
{
2313
    if (!opts.quantifiers.sygusRewSynthInputUseBoolWasSetByUser) {
2314
        opts.quantifiers.sygusRewSynthInputUseBool = value;
2315
    }
2316
}
2317
void setDefaultSygusRewSynthRec(Options& opts, bool value)
2318
{
2319
    if (!opts.quantifiers.sygusRewSynthRecWasSetByUser) {
2320
        opts.quantifiers.sygusRewSynthRec = value;
2321
    }
2322
}
2323
void setDefaultSygusRewVerify(Options& opts, bool value)
2324
{
2325
    if (!opts.quantifiers.sygusRewVerifyWasSetByUser) {
2326
        opts.quantifiers.sygusRewVerify = value;
2327
    }
2328
}
2329
void setDefaultSygusRewVerifyAbort(Options& opts, bool value)
2330
{
2331
    if (!opts.quantifiers.sygusRewVerifyAbortWasSetByUser) {
2332
        opts.quantifiers.sygusRewVerifyAbort = value;
2333
    }
2334
}
2335
void setDefaultSygusSampleFpUniform(Options& opts, bool value)
2336
{
2337
    if (!opts.quantifiers.sygusSampleFpUniformWasSetByUser) {
2338
        opts.quantifiers.sygusSampleFpUniform = value;
2339
    }
2340
}
2341
void setDefaultSygusSampleGrammar(Options& opts, bool value)
2342
{
2343
    if (!opts.quantifiers.sygusSampleGrammarWasSetByUser) {
2344
        opts.quantifiers.sygusSampleGrammar = value;
2345
    }
2346
}
2347
void setDefaultSygusSamples(Options& opts, int64_t value)
2348
{
2349
    if (!opts.quantifiers.sygusSamplesWasSetByUser) {
2350
        opts.quantifiers.sygusSamples = value;
2351
    }
2352
}
2353
void setDefaultCegqiSingleInvAbort(Options& opts, bool value)
2354
{
2355
    if (!opts.quantifiers.cegqiSingleInvAbortWasSetByUser) {
2356
        opts.quantifiers.cegqiSingleInvAbort = value;
2357
    }
2358
}
2359
void setDefaultCegqiSingleInvPartial(Options& opts, bool value)
2360
{
2361
    if (!opts.quantifiers.cegqiSingleInvPartialWasSetByUser) {
2362
        opts.quantifiers.cegqiSingleInvPartial = value;
2363
    }
2364
}
2365
void setDefaultCegqiSingleInvReconstructLimit(Options& opts, int64_t value)
2366
{
2367
    if (!opts.quantifiers.cegqiSingleInvReconstructLimitWasSetByUser) {
2368
        opts.quantifiers.cegqiSingleInvReconstructLimit = value;
2369
    }
2370
}
2371
void setDefaultCegqiSingleInvReconstruct(Options& opts, CegqiSingleInvRconsMode value)
2372
{
2373
    if (!opts.quantifiers.cegqiSingleInvReconstructWasSetByUser) {
2374
        opts.quantifiers.cegqiSingleInvReconstruct = value;
2375
    }
2376
}
2377
void setDefaultCegqiSingleInvReconstructConst(Options& opts, bool value)
2378
{
2379
    if (!opts.quantifiers.cegqiSingleInvReconstructConstWasSetByUser) {
2380
        opts.quantifiers.cegqiSingleInvReconstructConst = value;
2381
    }
2382
}
2383
void setDefaultCegqiSingleInvMode(Options& opts, CegqiSingleInvMode value)
2384
{
2385
    if (!opts.quantifiers.cegqiSingleInvModeWasSetByUser) {
2386
        opts.quantifiers.cegqiSingleInvMode = value;
2387
    }
2388
}
2389
void setDefaultSygusStream(Options& opts, bool value)
2390
{
2391
    if (!opts.quantifiers.sygusStreamWasSetByUser) {
2392
        opts.quantifiers.sygusStream = value;
2393
    }
2394
}
2395
void setDefaultSygusTemplEmbedGrammar(Options& opts, bool value)
2396
{
2397
    if (!opts.quantifiers.sygusTemplEmbedGrammarWasSetByUser) {
2398
        opts.quantifiers.sygusTemplEmbedGrammar = value;
2399
    }
2400
}
2401
void setDefaultSygusUnifCondIndNoRepeatSol(Options& opts, bool value)
2402
{
2403
    if (!opts.quantifiers.sygusUnifCondIndNoRepeatSolWasSetByUser) {
2404
        opts.quantifiers.sygusUnifCondIndNoRepeatSol = value;
2405
    }
2406
}
2407
void setDefaultSygusUnifPi(Options& opts, SygusUnifPiMode value)
2408
{
2409
    if (!opts.quantifiers.sygusUnifPiWasSetByUser) {
2410
        opts.quantifiers.sygusUnifPi = value;
2411
    }
2412
}
2413
void setDefaultSygusUnifShuffleCond(Options& opts, bool value)
2414
{
2415
    if (!opts.quantifiers.sygusUnifShuffleCondWasSetByUser) {
2416
        opts.quantifiers.sygusUnifShuffleCond = value;
2417
    }
2418
}
2419
void setDefaultSygusVerifyInstMaxRounds(Options& opts, int64_t value)
2420
{
2421
    if (!opts.quantifiers.sygusVerifyInstMaxRoundsWasSetByUser) {
2422
        opts.quantifiers.sygusVerifyInstMaxRounds = value;
2423
    }
2424
}
2425
void setDefaultTermDbCd(Options& opts, bool value)
2426
{
2427
    if (!opts.quantifiers.termDbCdWasSetByUser) {
2428
        opts.quantifiers.termDbCd = value;
2429
    }
2430
}
2431
void setDefaultTermDbMode(Options& opts, TermDbMode value)
2432
{
2433
    if (!opts.quantifiers.termDbModeWasSetByUser) {
2434
        opts.quantifiers.termDbMode = value;
2435
    }
2436
}
2437
void setDefaultTriggerActiveSelMode(Options& opts, TriggerActiveSelMode value)
2438
{
2439
    if (!opts.quantifiers.triggerActiveSelModeWasSetByUser) {
2440
        opts.quantifiers.triggerActiveSelMode = value;
2441
    }
2442
}
2443
void setDefaultTriggerSelMode(Options& opts, TriggerSelMode value)
2444
{
2445
    if (!opts.quantifiers.triggerSelModeWasSetByUser) {
2446
        opts.quantifiers.triggerSelMode = value;
2447
    }
2448
}
2449
void setDefaultUserPatternsQuant(Options& opts, UserPatMode value)
2450
{
2451
    if (!opts.quantifiers.userPatternsQuantWasSetByUser) {
2452
        opts.quantifiers.userPatternsQuant = value;
2453
    }
2454
}
2455
void setDefaultVarElimQuant(Options& opts, bool value)
2456
{
2457
    if (!opts.quantifiers.varElimQuantWasSetByUser) {
2458
        opts.quantifiers.varElimQuant = value;
2459
    }
2460
}
2461
void setDefaultVarIneqElimQuant(Options& opts, bool value)
2462
{
2463
    if (!opts.quantifiers.varIneqElimQuantWasSetByUser) {
2464
        opts.quantifiers.varIneqElimQuant = value;
2465
    }
2466
}
2467
// clang-format on
2468
}
2469
2470
29502
}  // namespace cvc5::options
2471
// clang-format on