GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/quantifiers_options.cpp Lines: 54 1399 3.9 %
Date: 2021-08-17 Branches: 37 1067 3.5 %

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::EQ_SLACK:
78
      return os << "CegqiBvIneqMode::EQ_SLACK";
79
    case CegqiBvIneqMode::KEEP:
80
      return os << "CegqiBvIneqMode::KEEP";
81
    case CegqiBvIneqMode::EQ_BOUNDARY:
82
      return os << "CegqiBvIneqMode::EQ_BOUNDARY";
83
    default:
84
      Unreachable();
85
  }
86
  return os;
87
}
88
82
CegqiBvIneqMode stringToCegqiBvIneqMode(const std::string& optarg)
89
{
90
82
  if (optarg == "eq-slack")
91
  {
92
    return CegqiBvIneqMode::EQ_SLACK;
93
  }
94
82
  else if (optarg == "keep")
95
  {
96
79
    return CegqiBvIneqMode::KEEP;
97
  }
98
3
  else if (optarg == "eq-boundary")
99
  {
100
3
    return CegqiBvIneqMode::EQ_BOUNDARY;
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
         "+ eq-slack\n"
108
         "  Solve for the inequality using the slack value in the model, e.g., t > s\n"
109
         "  becomes t = s + ( t-s )^M.\n"
110
         "+ keep\n"
111
         "  Solve for the inequality directly using side conditions for invertibility.\n"
112
         "+ eq-boundary (default)\n"
113
         "  Solve for the boundary point of the inequality, e.g., t > s becomes t = s+1.\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_DELAY:
123
      return os << "InstWhenMode::FULL_DELAY";
124
    case InstWhenMode::FULL_DELAY_LAST_CALL:
125
      return os << "InstWhenMode::FULL_DELAY_LAST_CALL";
126
    case InstWhenMode::LAST_CALL:
127
      return os << "InstWhenMode::LAST_CALL";
128
    case InstWhenMode::PRE_FULL:
129
      return os << "InstWhenMode::PRE_FULL";
130
    case InstWhenMode::FULL:
131
      return os << "InstWhenMode::FULL";
132
    case InstWhenMode::FULL_LAST_CALL:
133
      return os << "InstWhenMode::FULL_LAST_CALL";
134
    default:
135
      Unreachable();
136
  }
137
  return os;
138
}
139
3
InstWhenMode stringToInstWhenMode(const std::string& optarg)
140
{
141
3
  if (optarg == "full-delay")
142
  {
143
    return InstWhenMode::FULL_DELAY;
144
  }
145
3
  else if (optarg == "full-delay-last-call")
146
  {
147
    return InstWhenMode::FULL_DELAY_LAST_CALL;
148
  }
149
3
  else if (optarg == "last-call")
150
  {
151
    return InstWhenMode::LAST_CALL;
152
  }
153
3
  else if (optarg == "pre-full")
154
  {
155
    return InstWhenMode::PRE_FULL;
156
  }
157
3
  else if (optarg == "full")
158
  {
159
3
    return InstWhenMode::FULL;
160
  }
161
  else if (optarg == "full-last-call")
162
  {
163
    return InstWhenMode::FULL_LAST_CALL;
164
  }
165
  else if (optarg == "help")
166
  {
167
    std::cerr << "Instantiation modes.\n"
168
         "Available modes for --inst-when are:\n"
169
         "+ full-delay\n"
170
         "  Run instantiation round at full effort, before theory combination, after all\n"
171
         "  other theories have finished.\n"
172
         "+ full-delay-last-call\n"
173
         "  Alternate running instantiation rounds at full effort after all other theories\n"
174
         "  have finished, and last call.\n"
175
         "+ last-call\n"
176
         "  Run instantiation at last call effort, after theory combination and and\n"
177
         "  theories report sat.\n"
178
         "+ pre-full\n"
179
         "  Run instantiation round before full effort (possibly at standard effort).\n"
180
         "+ full\n"
181
         "  Run instantiation round at full effort, before theory combination.\n"
182
         "+ full-last-call (default)\n"
183
         "  Alternate running instantiation rounds at full effort and last call.  In other\n"
184
         "  words, interleave instantiation and theory combination.\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::SIMPLE:
194
      return os << "IteLiftQuantMode::SIMPLE";
195
    case IteLiftQuantMode::ALL:
196
      return os << "IteLiftQuantMode::ALL";
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 == "simple")
207
  {
208
    return IteLiftQuantMode::SIMPLE;
209
  }
210
  else if (optarg == "all")
211
  {
212
    return IteLiftQuantMode::ALL;
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
         "+ simple (default)\n"
223
         "  Lift if-then-else in quantified formulas if results in smaller term size.\n"
224
         "+ all\n"
225
         "  Lift if-then-else in quantified formulas.\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:
294
      return os << "MacrosQuantMode::GROUND";
295
    case MacrosQuantMode::GROUND_UF:
296
      return os << "MacrosQuantMode::GROUND_UF";
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")
309
  {
310
2
    return MacrosQuantMode::GROUND;
311
  }
312
  else if (optarg == "ground-uf")
313
  {
314
    return MacrosQuantMode::GROUND_UF;
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\n"
324
         "  Only infer ground definitions for functions.\n"
325
         "+ ground-uf (default)\n"
326
         "  Only infer ground definitions for functions that result in triggers for all\n"
327
         "  free variables.\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::TRUST:
337
      return os << "MbqiMode::TRUST";
338
    case MbqiMode::FMC:
339
      return os << "MbqiMode::FMC";
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 == "trust")
350
  {
351
    return MbqiMode::TRUST;
352
  }
353
  else if (optarg == "fmc")
354
  {
355
    return MbqiMode::FMC;
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
         "+ trust\n"
366
         "  Do not instantiate quantified formulas (incomplete technique).\n"
367
         "+ fmc (default)\n"
368
         "  Use algorithm from Section 5.4.2 of thesis Finite Model Finding in\n"
369
         "  Satisfiability Modulo Theories.\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::SIMPLE:
381
      return os << "PrenexQuantMode::SIMPLE";
382
    case PrenexQuantMode::NORMAL:
383
      return os << "PrenexQuantMode::NORMAL";
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 == "simple")
394
  {
395
    return PrenexQuantMode::SIMPLE;
396
  }
397
  else if (optarg == "norm")
398
  {
399
    return PrenexQuantMode::NORMAL;
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
         "+ simple (default)\n"
410
         "  Do simple prenexing of same sign quantifiers.\n"
411
         "+ norm\n"
412
         "  Prenex to prenex normal form.\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::PROP_EQ:
424
      return os << "QcfMode::PROP_EQ";
425
    case QcfMode::PARTIAL:
426
      return os << "QcfMode::PARTIAL";
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 == "prop-eq")
437
  {
438
    return QcfMode::PROP_EQ;
439
  }
440
  else if (optarg == "partial")
441
  {
442
    return QcfMode::PARTIAL;
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
         "+ prop-eq (default)\n"
453
         "  Apply QCF algorithm to propagate equalities as well as conflicts.\n"
454
         "+ partial\n"
455
         "  Use QCF for conflicts, propagations and heuristic instantiations.\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:
467
      return os << "QcfWhenMode::STD";
468
    case QcfWhenMode::LAST_CALL:
469
      return os << "QcfWhenMode::LAST_CALL";
470
    case QcfWhenMode::DEFAULT:
471
      return os << "QcfWhenMode::DEFAULT";
472
    case QcfWhenMode::STD_H:
473
      return os << "QcfWhenMode::STD_H";
474
    default:
475
      Unreachable();
476
  }
477
  return os;
478
}
479
QcfWhenMode stringToQcfWhenMode(const std::string& optarg)
480
{
481
  if (optarg == "std")
482
  {
483
    return QcfWhenMode::STD;
484
  }
485
  else if (optarg == "last-call")
486
  {
487
    return QcfWhenMode::LAST_CALL;
488
  }
489
  else if (optarg == "default")
490
  {
491
    return QcfWhenMode::DEFAULT;
492
  }
493
  else if (optarg == "std-h")
494
  {
495
    return QcfWhenMode::STD_H;
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\n"
502
         "  Apply conflict finding at standard effort.\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
         "+ default\n"
507
         "  Default, apply conflict finding at full effort.\n"
508
         "+ std-h\n"
509
         "  Apply conflict finding at standard effort when heuristic says to.\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::DEFAULT:
519
      return os << "QuantDSplitMode::DEFAULT";
520
    case QuantDSplitMode::AGG:
521
      return os << "QuantDSplitMode::AGG";
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 == "default")
532
  {
533
    return QuantDSplitMode::DEFAULT;
534
  }
535
  else if (optarg == "agg")
536
  {
537
    return QuantDSplitMode::AGG;
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
         "+ default\n"
548
         "  Split quantified formulas over some finite datatypes when finite model finding\n"
549
         "  is enabled.\n"
550
         "+ agg\n"
551
         "  Aggressively split quantified formulas.\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::FIRST:
563
      return os << "QuantRepMode::FIRST";
564
    case QuantRepMode::EE:
565
      return os << "QuantRepMode::EE";
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 == "first")
576
  {
577
    return QuantRepMode::FIRST;
578
  }
579
  else if (optarg == "ee")
580
  {
581
    return QuantRepMode::EE;
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
         "+ first (default)\n"
592
         "  Choose terms that appear first.\n"
593
         "+ ee\n"
594
         "  Let equality engine choose representatives.\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::VAR_AGNOSTIC:
606
      return os << "SygusActiveGenMode::VAR_AGNOSTIC";
607
    case SygusActiveGenMode::ENUM:
608
      return os << "SygusActiveGenMode::ENUM";
609
    case SygusActiveGenMode::ENUM_BASIC:
610
      return os << "SygusActiveGenMode::ENUM_BASIC";
611
    case SygusActiveGenMode::AUTO:
612
      return os << "SygusActiveGenMode::AUTO";
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 == "var-agnostic")
623
  {
624
1
    return SygusActiveGenMode::VAR_AGNOSTIC;
625
  }
626
13
  else if (optarg == "enum")
627
  {
628
10
    return SygusActiveGenMode::ENUM;
629
  }
630
3
  else if (optarg == "basic")
631
  {
632
    return SygusActiveGenMode::ENUM_BASIC;
633
  }
634
3
  else if (optarg == "auto")
635
  {
636
    return SygusActiveGenMode::AUTO;
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
         "+ var-agnostic\n"
647
         "  Use sygus solver to enumerate terms that are agnostic to variables.\n"
648
         "+ enum\n"
649
         "  Use optimized enumerator for actively-generated sygus enumerators.\n"
650
         "+ basic\n"
651
         "  Use basic type enumerator for actively-generated sygus enumerators.\n"
652
         "+ auto (default)\n"
653
         "  Internally decide the best policy for each enumerator.\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::WEAK:
665
      return os << "SygusFilterSolMode::WEAK";
666
    case SygusFilterSolMode::STRONG:
667
      return os << "SygusFilterSolMode::STRONG";
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 == "weak")
678
  {
679
    return SygusFilterSolMode::WEAK;
680
  }
681
  else if (optarg == "strong")
682
  {
683
    return SygusFilterSolMode::STRONG;
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
         "+ weak\n"
694
         "  Filter solutions that are logically weaker than others.\n"
695
         "+ strong\n"
696
         "  Filter solutions that are logically stronger 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::SIMPLE:
708
      return os << "SygusGrammarConsMode::SIMPLE";
709
    case SygusGrammarConsMode::ANY_CONST:
710
      return os << "SygusGrammarConsMode::ANY_CONST";
711
    case SygusGrammarConsMode::ANY_TERM_CONCISE:
712
      return os << "SygusGrammarConsMode::ANY_TERM_CONCISE";
713
    case SygusGrammarConsMode::ANY_TERM:
714
      return os << "SygusGrammarConsMode::ANY_TERM";
715
    default:
716
      Unreachable();
717
  }
718
  return os;
719
}
720
6
SygusGrammarConsMode stringToSygusGrammarConsMode(const std::string& optarg)
721
{
722
6
  if (optarg == "simple")
723
  {
724
    return SygusGrammarConsMode::SIMPLE;
725
  }
726
6
  else if (optarg == "any-const")
727
  {
728
2
    return SygusGrammarConsMode::ANY_CONST;
729
  }
730
4
  else if (optarg == "any-term-concise")
731
  {
732
2
    return SygusGrammarConsMode::ANY_TERM_CONCISE;
733
  }
734
2
  else if (optarg == "any-term")
735
  {
736
2
    return SygusGrammarConsMode::ANY_TERM;
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
         "+ simple (default)\n"
743
         "  Use simple grammar construction (no symbolic terms or constants).\n"
744
         "+ any-const\n"
745
         "  Use symoblic constant constructors.\n"
746
         "+ any-term-concise\n"
747
         "  When applicable, use constructors corresponding to any symbolic term, favoring\n"
748
         "  conciseness over generality. This option is equivalent to any-term but enables\n"
749
         "  a polynomial grammar for arithmetic when not in a combined theory.\n"
750
         "+ any-term\n"
751
         "  When applicable, use constructors corresponding to any symbolic term. This\n"
752
         "  option enables a sum-of-monomials grammar for arithmetic. For all other types,\n"
753
         "  it enables symbolic 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::IN:
808
      return os << "SygusInstScope::IN";
809
    case SygusInstScope::BOTH:
810
      return os << "SygusInstScope::BOTH";
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 == "in")
821
  {
822
    return SygusInstScope::IN;
823
  }
824
  else if (optarg == "both")
825
  {
826
    return SygusInstScope::BOTH;
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
         "+ in (default)\n"
837
         "  use ground terms inside given quantified formula only.\n"
838
         "+ both\n"
839
         "  combines inside and outside.\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::MIN:
851
      return os << "SygusInstTermSelMode::MIN";
852
    case SygusInstTermSelMode::MAX:
853
      return os << "SygusInstTermSelMode::MAX";
854
    case SygusInstTermSelMode::BOTH:
855
      return os << "SygusInstTermSelMode::BOTH";
856
    default:
857
      Unreachable();
858
  }
859
  return os;
860
}
861
SygusInstTermSelMode stringToSygusInstTermSelMode(const std::string& optarg)
862
{
863
  if (optarg == "min")
864
  {
865
    return SygusInstTermSelMode::MIN;
866
  }
867
  else if (optarg == "max")
868
  {
869
    return SygusInstTermSelMode::MAX;
870
  }
871
  else if (optarg == "both")
872
  {
873
    return SygusInstTermSelMode::BOTH;
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
         "+ min (default)\n"
880
         "  collect minimal ground terms only.\n"
881
         "+ max\n"
882
         "  collect maximal ground terms only.\n"
883
         "+ both\n"
884
         "  combines minimal and maximal .\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::ALL:
1036
      return os << "CegqiSingleInvMode::ALL";
1037
    case CegqiSingleInvMode::USE:
1038
      return os << "CegqiSingleInvMode::USE";
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 == "all")
1049
  {
1050
25
    return CegqiSingleInvMode::ALL;
1051
  }
1052
22
  else if (optarg == "use")
1053
  {
1054
    return CegqiSingleInvMode::USE;
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
         "+ all\n"
1065
         "  Always use single invocation techniques.\n"
1066
         "+ use\n"
1067
         "  Use single invocation techniques only if grammar is not restrictive.\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::COMPLETE:
1079
      return os << "SygusUnifPiMode::COMPLETE";
1080
    case SygusUnifPiMode::CENUM:
1081
      return os << "SygusUnifPiMode::CENUM";
1082
    case SygusUnifPiMode::CENUM_IGAIN:
1083
      return os << "SygusUnifPiMode::CENUM_IGAIN";
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 == "complete")
1094
  {
1095
9
    return SygusUnifPiMode::COMPLETE;
1096
  }
1097
  else if (optarg == "cond-enum")
1098
  {
1099
    return SygusUnifPiMode::CENUM;
1100
  }
1101
  else if (optarg == "cond-enum-igain")
1102
  {
1103
    return SygusUnifPiMode::CENUM_IGAIN;
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
         "+ complete\n"
1114
         "  Use complete approach for piecewise-independent unification (see Section 3 of\n"
1115
         "  Barbosa et al FMCAD 2019)\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
         "+ cond-enum-igain\n"
1120
         "  Same as cond-enum, but additionally uses an information gain heuristic when\n"
1121
         "  doing decision tree learning.\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::ALL:
1133
      return os << "TermDbMode::ALL";
1134
    case TermDbMode::RELEVANT:
1135
      return os << "TermDbMode::RELEVANT";
1136
    default:
1137
      Unreachable();
1138
  }
1139
  return os;
1140
}
1141
TermDbMode stringToTermDbMode(const std::string& optarg)
1142
{
1143
  if (optarg == "all")
1144
  {
1145
    return TermDbMode::ALL;
1146
  }
1147
  else if (optarg == "relevant")
1148
  {
1149
    return TermDbMode::RELEVANT;
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
         "+ all (default)\n"
1156
         "  Quantifiers module considers all ground terms.\n"
1157
         "+ relevant\n"
1158
         "  Quantifiers module considers only ground terms connected to current\n"
1159
         "  assertions.\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::MIN:
1171
      return os << "TriggerActiveSelMode::MIN";
1172
    case TriggerActiveSelMode::MAX:
1173
      return os << "TriggerActiveSelMode::MAX";
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 == "min")
1186
  {
1187
    return TriggerActiveSelMode::MIN;
1188
  }
1189
  else if (optarg == "max")
1190
  {
1191
    return TriggerActiveSelMode::MAX;
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
         "+ min\n"
1200
         "  Activate triggers with minimal ground terms.\n"
1201
         "+ max\n"
1202
         "  Activate triggers with maximal 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::MIN:
1212
      return os << "TriggerSelMode::MIN";
1213
    case TriggerSelMode::ALL:
1214
      return os << "TriggerSelMode::ALL";
1215
    case TriggerSelMode::MIN_SINGLE_MAX:
1216
      return os << "TriggerSelMode::MIN_SINGLE_MAX";
1217
    case TriggerSelMode::MAX:
1218
      return os << "TriggerSelMode::MAX";
1219
    case TriggerSelMode::MIN_SINGLE_ALL:
1220
      return os << "TriggerSelMode::MIN_SINGLE_ALL";
1221
    default:
1222
      Unreachable();
1223
  }
1224
  return os;
1225
}
1226
TriggerSelMode stringToTriggerSelMode(const std::string& optarg)
1227
{
1228
  if (optarg == "min")
1229
  {
1230
    return TriggerSelMode::MIN;
1231
  }
1232
  else if (optarg == "all")
1233
  {
1234
    return TriggerSelMode::ALL;
1235
  }
1236
  else if (optarg == "min-s-max")
1237
  {
1238
    return TriggerSelMode::MIN_SINGLE_MAX;
1239
  }
1240
  else if (optarg == "max")
1241
  {
1242
    return TriggerSelMode::MAX;
1243
  }
1244
  else if (optarg == "min-s-all")
1245
  {
1246
    return TriggerSelMode::MIN_SINGLE_ALL;
1247
  }
1248
  else if (optarg == "help")
1249
  {
1250
    std::cerr << "Trigger selection modes.\n"
1251
         "Available modes for --trigger-sel are:\n"
1252
         "+ min (default)\n"
1253
         "  Consider only minimal subterms that meet criteria for triggers.\n"
1254
         "+ all\n"
1255
         "  Consider all subterms that meet criteria for triggers.\n"
1256
         "+ min-s-max\n"
1257
         "  Consider only minimal subterms that meet criteria for single triggers, maximal\n"
1258
         "  otherwise.\n"
1259
         "+ max\n"
1260
         "  Consider only maximal subterms that meet criteria for triggers.\n"
1261
         "+ min-s-all\n"
1262
         "  Consider only minimal subterms that meet criteria for single triggers, all\n"
1263
         "  otherwise.\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::TRUST:
1279
      return os << "UserPatMode::TRUST";
1280
    case UserPatMode::IGNORE:
1281
      return os << "UserPatMode::IGNORE";
1282
    default:
1283
      Unreachable();
1284
  }
1285
  return os;
1286
}
1287
UserPatMode stringToUserPatMode(const std::string& optarg)
1288
{
1289
  if (optarg == "use")
1290
  {
1291
    return UserPatMode::USE;
1292
  }
1293
  else if (optarg == "resort")
1294
  {
1295
    return UserPatMode::RESORT;
1296
  }
1297
  else if (optarg == "interleave")
1298
  {
1299
    return UserPatMode::INTERLEAVE;
1300
  }
1301
  else if (optarg == "trust")
1302
  {
1303
    return UserPatMode::TRUST;
1304
  }
1305
  else if (optarg == "ignore")
1306
  {
1307
    return UserPatMode::IGNORE;
1308
  }
1309
  else if (optarg == "help")
1310
  {
1311
    std::cerr << "These modes determine how user provided patterns (triggers) are used during\n"
1312
         "E-matching. The modes vary on when instantiation based on user-provided\n"
1313
         "triggers is combined with instantiation based on automatically selected\n"
1314
         "triggers.\n"
1315
         "Available modes for --user-pat are:\n"
1316
         "+ use\n"
1317
         "  Use both user-provided and auto-generated patterns when patterns are provided\n"
1318
         "  for a quantified formula.\n"
1319
         "+ resort\n"
1320
         "  Use user-provided patterns only after auto-generated patterns saturate.\n"
1321
         "+ interleave\n"
1322
         "  Alternate between use/resort.\n"
1323
         "+ trust (default)\n"
1324
         "  When provided, use only user-provided patterns for a quantified formula.\n"
1325
         "+ ignore\n"
1326
         "  Ignore user-provided patterns.\n";
1327
    std::exit(1);
1328
  }
1329
  throw OptionException(std::string("unknown option for --user-pat: `") +
1330
                        optarg + "'.  Try --user-pat=help.");
1331
}
1332
1333
namespace quantifiers
1334
{
1335
// clang-format off
1336
void setDefaultAggressiveMiniscopeQuant(Options& opts, bool value)
1337
{
1338
    if (!opts.quantifiers.aggressiveMiniscopeQuantWasSetByUser) {
1339
        opts.quantifiers.aggressiveMiniscopeQuant = value;
1340
    }
1341
}
1342
void setDefaultCegisSample(Options& opts, CegisSampleMode value)
1343
{
1344
    if (!opts.quantifiers.cegisSampleWasSetByUser) {
1345
        opts.quantifiers.cegisSample = value;
1346
    }
1347
}
1348
void setDefaultCegqi(Options& opts, bool value)
1349
{
1350
    if (!opts.quantifiers.cegqiWasSetByUser) {
1351
        opts.quantifiers.cegqi = value;
1352
    }
1353
}
1354
void setDefaultCegqiAll(Options& opts, bool value)
1355
{
1356
    if (!opts.quantifiers.cegqiAllWasSetByUser) {
1357
        opts.quantifiers.cegqiAll = value;
1358
    }
1359
}
1360
void setDefaultCegqiBv(Options& opts, bool value)
1361
{
1362
    if (!opts.quantifiers.cegqiBvWasSetByUser) {
1363
        opts.quantifiers.cegqiBv = value;
1364
    }
1365
}
1366
void setDefaultCegqiBvConcInv(Options& opts, bool value)
1367
{
1368
    if (!opts.quantifiers.cegqiBvConcInvWasSetByUser) {
1369
        opts.quantifiers.cegqiBvConcInv = value;
1370
    }
1371
}
1372
void setDefaultCegqiBvIneqMode(Options& opts, CegqiBvIneqMode value)
1373
{
1374
    if (!opts.quantifiers.cegqiBvIneqModeWasSetByUser) {
1375
        opts.quantifiers.cegqiBvIneqMode = value;
1376
    }
1377
}
1378
void setDefaultCegqiBvInterleaveValue(Options& opts, bool value)
1379
{
1380
    if (!opts.quantifiers.cegqiBvInterleaveValueWasSetByUser) {
1381
        opts.quantifiers.cegqiBvInterleaveValue = value;
1382
    }
1383
}
1384
void setDefaultCegqiBvLinearize(Options& opts, bool value)
1385
{
1386
    if (!opts.quantifiers.cegqiBvLinearizeWasSetByUser) {
1387
        opts.quantifiers.cegqiBvLinearize = value;
1388
    }
1389
}
1390
void setDefaultCegqiBvRmExtract(Options& opts, bool value)
1391
{
1392
    if (!opts.quantifiers.cegqiBvRmExtractWasSetByUser) {
1393
        opts.quantifiers.cegqiBvRmExtract = value;
1394
    }
1395
}
1396
void setDefaultCegqiBvSolveNl(Options& opts, bool value)
1397
{
1398
    if (!opts.quantifiers.cegqiBvSolveNlWasSetByUser) {
1399
        opts.quantifiers.cegqiBvSolveNl = value;
1400
    }
1401
}
1402
void setDefaultCegqiFullEffort(Options& opts, bool value)
1403
{
1404
    if (!opts.quantifiers.cegqiFullEffortWasSetByUser) {
1405
        opts.quantifiers.cegqiFullEffort = value;
1406
    }
1407
}
1408
void setDefaultCegqiInnermost(Options& opts, bool value)
1409
{
1410
    if (!opts.quantifiers.cegqiInnermostWasSetByUser) {
1411
        opts.quantifiers.cegqiInnermost = value;
1412
    }
1413
}
1414
void setDefaultCegqiMidpoint(Options& opts, bool value)
1415
{
1416
    if (!opts.quantifiers.cegqiMidpointWasSetByUser) {
1417
        opts.quantifiers.cegqiMidpoint = value;
1418
    }
1419
}
1420
void setDefaultCegqiMinBounds(Options& opts, bool value)
1421
{
1422
    if (!opts.quantifiers.cegqiMinBoundsWasSetByUser) {
1423
        opts.quantifiers.cegqiMinBounds = value;
1424
    }
1425
}
1426
void setDefaultCegqiModel(Options& opts, bool value)
1427
{
1428
    if (!opts.quantifiers.cegqiModelWasSetByUser) {
1429
        opts.quantifiers.cegqiModel = value;
1430
    }
1431
}
1432
void setDefaultCegqiMultiInst(Options& opts, bool value)
1433
{
1434
    if (!opts.quantifiers.cegqiMultiInstWasSetByUser) {
1435
        opts.quantifiers.cegqiMultiInst = value;
1436
    }
1437
}
1438
void setDefaultCegqiNestedQE(Options& opts, bool value)
1439
{
1440
    if (!opts.quantifiers.cegqiNestedQEWasSetByUser) {
1441
        opts.quantifiers.cegqiNestedQE = value;
1442
    }
1443
}
1444
void setDefaultCegqiNopt(Options& opts, bool value)
1445
{
1446
    if (!opts.quantifiers.cegqiNoptWasSetByUser) {
1447
        opts.quantifiers.cegqiNopt = value;
1448
    }
1449
}
1450
void setDefaultCegqiRepeatLit(Options& opts, bool value)
1451
{
1452
    if (!opts.quantifiers.cegqiRepeatLitWasSetByUser) {
1453
        opts.quantifiers.cegqiRepeatLit = value;
1454
    }
1455
}
1456
void setDefaultCegqiRoundUpLowerLia(Options& opts, bool value)
1457
{
1458
    if (!opts.quantifiers.cegqiRoundUpLowerLiaWasSetByUser) {
1459
        opts.quantifiers.cegqiRoundUpLowerLia = value;
1460
    }
1461
}
1462
void setDefaultCegqiSat(Options& opts, bool value)
1463
{
1464
    if (!opts.quantifiers.cegqiSatWasSetByUser) {
1465
        opts.quantifiers.cegqiSat = value;
1466
    }
1467
}
1468
void setDefaultCegqiUseInfInt(Options& opts, bool value)
1469
{
1470
    if (!opts.quantifiers.cegqiUseInfIntWasSetByUser) {
1471
        opts.quantifiers.cegqiUseInfInt = value;
1472
    }
1473
}
1474
void setDefaultCegqiUseInfReal(Options& opts, bool value)
1475
{
1476
    if (!opts.quantifiers.cegqiUseInfRealWasSetByUser) {
1477
        opts.quantifiers.cegqiUseInfReal = value;
1478
    }
1479
}
1480
void setDefaultCondVarSplitQuantAgg(Options& opts, bool value)
1481
{
1482
    if (!opts.quantifiers.condVarSplitQuantAggWasSetByUser) {
1483
        opts.quantifiers.condVarSplitQuantAgg = value;
1484
    }
1485
}
1486
void setDefaultCondVarSplitQuant(Options& opts, bool value)
1487
{
1488
    if (!opts.quantifiers.condVarSplitQuantWasSetByUser) {
1489
        opts.quantifiers.condVarSplitQuant = value;
1490
    }
1491
}
1492
void setDefaultConjectureFilterActiveTerms(Options& opts, bool value)
1493
{
1494
    if (!opts.quantifiers.conjectureFilterActiveTermsWasSetByUser) {
1495
        opts.quantifiers.conjectureFilterActiveTerms = value;
1496
    }
1497
}
1498
void setDefaultConjectureFilterCanonical(Options& opts, bool value)
1499
{
1500
    if (!opts.quantifiers.conjectureFilterCanonicalWasSetByUser) {
1501
        opts.quantifiers.conjectureFilterCanonical = value;
1502
    }
1503
}
1504
void setDefaultConjectureFilterModel(Options& opts, bool value)
1505
{
1506
    if (!opts.quantifiers.conjectureFilterModelWasSetByUser) {
1507
        opts.quantifiers.conjectureFilterModel = value;
1508
    }
1509
}
1510
void setDefaultConjectureGen(Options& opts, bool value)
1511
{
1512
    if (!opts.quantifiers.conjectureGenWasSetByUser) {
1513
        opts.quantifiers.conjectureGen = value;
1514
    }
1515
}
1516
void setDefaultConjectureGenGtEnum(Options& opts, int64_t value)
1517
{
1518
    if (!opts.quantifiers.conjectureGenGtEnumWasSetByUser) {
1519
        opts.quantifiers.conjectureGenGtEnum = value;
1520
    }
1521
}
1522
void setDefaultConjectureGenMaxDepth(Options& opts, int64_t value)
1523
{
1524
    if (!opts.quantifiers.conjectureGenMaxDepthWasSetByUser) {
1525
        opts.quantifiers.conjectureGenMaxDepth = value;
1526
    }
1527
}
1528
void setDefaultConjectureGenPerRound(Options& opts, int64_t value)
1529
{
1530
    if (!opts.quantifiers.conjectureGenPerRoundWasSetByUser) {
1531
        opts.quantifiers.conjectureGenPerRound = value;
1532
    }
1533
}
1534
void setDefaultConjectureUeeIntro(Options& opts, bool value)
1535
{
1536
    if (!opts.quantifiers.conjectureUeeIntroWasSetByUser) {
1537
        opts.quantifiers.conjectureUeeIntro = value;
1538
    }
1539
}
1540
void setDefaultConjectureNoFilter(Options& opts, bool value)
1541
{
1542
    if (!opts.quantifiers.conjectureNoFilterWasSetByUser) {
1543
        opts.quantifiers.conjectureNoFilter = value;
1544
    }
1545
}
1546
void setDefaultDtStcInduction(Options& opts, bool value)
1547
{
1548
    if (!opts.quantifiers.dtStcInductionWasSetByUser) {
1549
        opts.quantifiers.dtStcInduction = value;
1550
    }
1551
}
1552
void setDefaultDtVarExpandQuant(Options& opts, bool value)
1553
{
1554
    if (!opts.quantifiers.dtVarExpandQuantWasSetByUser) {
1555
        opts.quantifiers.dtVarExpandQuant = value;
1556
    }
1557
}
1558
void setDefaultEMatching(Options& opts, bool value)
1559
{
1560
    if (!opts.quantifiers.eMatchingWasSetByUser) {
1561
        opts.quantifiers.eMatching = value;
1562
    }
1563
}
1564
void setDefaultElimTautQuant(Options& opts, bool value)
1565
{
1566
    if (!opts.quantifiers.elimTautQuantWasSetByUser) {
1567
        opts.quantifiers.elimTautQuant = value;
1568
    }
1569
}
1570
void setDefaultExtRewriteQuant(Options& opts, bool value)
1571
{
1572
    if (!opts.quantifiers.extRewriteQuantWasSetByUser) {
1573
        opts.quantifiers.extRewriteQuant = value;
1574
    }
1575
}
1576
void setDefaultFiniteModelFind(Options& opts, bool value)
1577
{
1578
    if (!opts.quantifiers.finiteModelFindWasSetByUser) {
1579
        opts.quantifiers.finiteModelFind = value;
1580
    }
1581
}
1582
void setDefaultFmfBound(Options& opts, bool value)
1583
{
1584
    if (!opts.quantifiers.fmfBoundWasSetByUser) {
1585
        opts.quantifiers.fmfBound = value;
1586
    }
1587
}
1588
void setDefaultFmfBoundInt(Options& opts, bool value)
1589
{
1590
    if (!opts.quantifiers.fmfBoundIntWasSetByUser) {
1591
        opts.quantifiers.fmfBoundInt = value;
1592
    }
1593
}
1594
void setDefaultFmfBoundLazy(Options& opts, bool value)
1595
{
1596
    if (!opts.quantifiers.fmfBoundLazyWasSetByUser) {
1597
        opts.quantifiers.fmfBoundLazy = value;
1598
    }
1599
}
1600
void setDefaultFmfFmcSimple(Options& opts, bool value)
1601
{
1602
    if (!opts.quantifiers.fmfFmcSimpleWasSetByUser) {
1603
        opts.quantifiers.fmfFmcSimple = value;
1604
    }
1605
}
1606
void setDefaultFmfFreshDistConst(Options& opts, bool value)
1607
{
1608
    if (!opts.quantifiers.fmfFreshDistConstWasSetByUser) {
1609
        opts.quantifiers.fmfFreshDistConst = value;
1610
    }
1611
}
1612
void setDefaultFmfFunWellDefined(Options& opts, bool value)
1613
{
1614
    if (!opts.quantifiers.fmfFunWellDefinedWasSetByUser) {
1615
        opts.quantifiers.fmfFunWellDefined = value;
1616
    }
1617
}
1618
void setDefaultFmfFunWellDefinedRelevant(Options& opts, bool value)
1619
{
1620
    if (!opts.quantifiers.fmfFunWellDefinedRelevantWasSetByUser) {
1621
        opts.quantifiers.fmfFunWellDefinedRelevant = value;
1622
    }
1623
}
1624
void setDefaultFmfInstEngine(Options& opts, bool value)
1625
{
1626
    if (!opts.quantifiers.fmfInstEngineWasSetByUser) {
1627
        opts.quantifiers.fmfInstEngine = value;
1628
    }
1629
}
1630
void setDefaultFmfTypeCompletionThresh(Options& opts, int64_t value)
1631
{
1632
    if (!opts.quantifiers.fmfTypeCompletionThreshWasSetByUser) {
1633
        opts.quantifiers.fmfTypeCompletionThresh = value;
1634
    }
1635
}
1636
void setDefaultFullSaturateInterleave(Options& opts, bool value)
1637
{
1638
    if (!opts.quantifiers.fullSaturateInterleaveWasSetByUser) {
1639
        opts.quantifiers.fullSaturateInterleave = value;
1640
    }
1641
}
1642
void setDefaultFullSaturateStratify(Options& opts, bool value)
1643
{
1644
    if (!opts.quantifiers.fullSaturateStratifyWasSetByUser) {
1645
        opts.quantifiers.fullSaturateStratify = value;
1646
    }
1647
}
1648
void setDefaultFullSaturateSum(Options& opts, bool value)
1649
{
1650
    if (!opts.quantifiers.fullSaturateSumWasSetByUser) {
1651
        opts.quantifiers.fullSaturateSum = value;
1652
    }
1653
}
1654
void setDefaultFullSaturateQuant(Options& opts, bool value)
1655
{
1656
    if (!opts.quantifiers.fullSaturateQuantWasSetByUser) {
1657
        opts.quantifiers.fullSaturateQuant = value;
1658
    }
1659
}
1660
void setDefaultFullSaturateLimit(Options& opts, int64_t value)
1661
{
1662
    if (!opts.quantifiers.fullSaturateLimitWasSetByUser) {
1663
        opts.quantifiers.fullSaturateLimit = value;
1664
    }
1665
}
1666
void setDefaultFullSaturateQuantRd(Options& opts, bool value)
1667
{
1668
    if (!opts.quantifiers.fullSaturateQuantRdWasSetByUser) {
1669
        opts.quantifiers.fullSaturateQuantRd = value;
1670
    }
1671
}
1672
void setDefaultGlobalNegate(Options& opts, bool value)
1673
{
1674
    if (!opts.quantifiers.globalNegateWasSetByUser) {
1675
        opts.quantifiers.globalNegate = value;
1676
    }
1677
}
1678
void setDefaultHoElim(Options& opts, bool value)
1679
{
1680
    if (!opts.quantifiers.hoElimWasSetByUser) {
1681
        opts.quantifiers.hoElim = value;
1682
    }
1683
}
1684
void setDefaultHoElimStoreAx(Options& opts, bool value)
1685
{
1686
    if (!opts.quantifiers.hoElimStoreAxWasSetByUser) {
1687
        opts.quantifiers.hoElimStoreAx = value;
1688
    }
1689
}
1690
void setDefaultHoMatching(Options& opts, bool value)
1691
{
1692
    if (!opts.quantifiers.hoMatchingWasSetByUser) {
1693
        opts.quantifiers.hoMatching = value;
1694
    }
1695
}
1696
void setDefaultHoMatchingVarArgPriority(Options& opts, bool value)
1697
{
1698
    if (!opts.quantifiers.hoMatchingVarArgPriorityWasSetByUser) {
1699
        opts.quantifiers.hoMatchingVarArgPriority = value;
1700
    }
1701
}
1702
void setDefaultHoMergeTermDb(Options& opts, bool value)
1703
{
1704
    if (!opts.quantifiers.hoMergeTermDbWasSetByUser) {
1705
        opts.quantifiers.hoMergeTermDb = value;
1706
    }
1707
}
1708
void setDefaultIncrementTriggers(Options& opts, bool value)
1709
{
1710
    if (!opts.quantifiers.incrementTriggersWasSetByUser) {
1711
        opts.quantifiers.incrementTriggers = value;
1712
    }
1713
}
1714
void setDefaultInstLevelInputOnly(Options& opts, bool value)
1715
{
1716
    if (!opts.quantifiers.instLevelInputOnlyWasSetByUser) {
1717
        opts.quantifiers.instLevelInputOnly = value;
1718
    }
1719
}
1720
void setDefaultInstMaxLevel(Options& opts, int64_t value)
1721
{
1722
    if (!opts.quantifiers.instMaxLevelWasSetByUser) {
1723
        opts.quantifiers.instMaxLevel = value;
1724
    }
1725
}
1726
void setDefaultInstMaxRounds(Options& opts, int64_t value)
1727
{
1728
    if (!opts.quantifiers.instMaxRoundsWasSetByUser) {
1729
        opts.quantifiers.instMaxRounds = value;
1730
    }
1731
}
1732
void setDefaultInstNoEntail(Options& opts, bool value)
1733
{
1734
    if (!opts.quantifiers.instNoEntailWasSetByUser) {
1735
        opts.quantifiers.instNoEntail = value;
1736
    }
1737
}
1738
void setDefaultInstWhenPhase(Options& opts, int64_t value)
1739
{
1740
    if (!opts.quantifiers.instWhenPhaseWasSetByUser) {
1741
        opts.quantifiers.instWhenPhase = value;
1742
    }
1743
}
1744
void setDefaultInstWhenStrictInterleave(Options& opts, bool value)
1745
{
1746
    if (!opts.quantifiers.instWhenStrictInterleaveWasSetByUser) {
1747
        opts.quantifiers.instWhenStrictInterleave = value;
1748
    }
1749
}
1750
void setDefaultInstWhenTcFirst(Options& opts, bool value)
1751
{
1752
    if (!opts.quantifiers.instWhenTcFirstWasSetByUser) {
1753
        opts.quantifiers.instWhenTcFirst = value;
1754
    }
1755
}
1756
void setDefaultInstWhenMode(Options& opts, InstWhenMode value)
1757
{
1758
    if (!opts.quantifiers.instWhenModeWasSetByUser) {
1759
        opts.quantifiers.instWhenMode = value;
1760
    }
1761
}
1762
void setDefaultIntWfInduction(Options& opts, bool value)
1763
{
1764
    if (!opts.quantifiers.intWfInductionWasSetByUser) {
1765
        opts.quantifiers.intWfInduction = value;
1766
    }
1767
}
1768
void setDefaultIteDtTesterSplitQuant(Options& opts, bool value)
1769
{
1770
    if (!opts.quantifiers.iteDtTesterSplitQuantWasSetByUser) {
1771
        opts.quantifiers.iteDtTesterSplitQuant = value;
1772
    }
1773
}
1774
void setDefaultIteLiftQuant(Options& opts, IteLiftQuantMode value)
1775
{
1776
    if (!opts.quantifiers.iteLiftQuantWasSetByUser) {
1777
        opts.quantifiers.iteLiftQuant = value;
1778
    }
1779
}
1780
void setDefaultLiteralMatchMode(Options& opts, LiteralMatchMode value)
1781
{
1782
    if (!opts.quantifiers.literalMatchModeWasSetByUser) {
1783
        opts.quantifiers.literalMatchMode = value;
1784
    }
1785
}
1786
void setDefaultMacrosQuant(Options& opts, bool value)
1787
{
1788
    if (!opts.quantifiers.macrosQuantWasSetByUser) {
1789
        opts.quantifiers.macrosQuant = value;
1790
    }
1791
}
1792
void setDefaultMacrosQuantMode(Options& opts, MacrosQuantMode value)
1793
{
1794
    if (!opts.quantifiers.macrosQuantModeWasSetByUser) {
1795
        opts.quantifiers.macrosQuantMode = value;
1796
    }
1797
}
1798
void setDefaultMbqiInterleave(Options& opts, bool value)
1799
{
1800
    if (!opts.quantifiers.mbqiInterleaveWasSetByUser) {
1801
        opts.quantifiers.mbqiInterleave = value;
1802
    }
1803
}
1804
void setDefaultFmfOneInstPerRound(Options& opts, bool value)
1805
{
1806
    if (!opts.quantifiers.fmfOneInstPerRoundWasSetByUser) {
1807
        opts.quantifiers.fmfOneInstPerRound = value;
1808
    }
1809
}
1810
void setDefaultMbqiMode(Options& opts, MbqiMode value)
1811
{
1812
    if (!opts.quantifiers.mbqiModeWasSetByUser) {
1813
        opts.quantifiers.mbqiMode = value;
1814
    }
1815
}
1816
void setDefaultMiniscopeQuant(Options& opts, bool value)
1817
{
1818
    if (!opts.quantifiers.miniscopeQuantWasSetByUser) {
1819
        opts.quantifiers.miniscopeQuant = value;
1820
    }
1821
}
1822
void setDefaultMiniscopeQuantFreeVar(Options& opts, bool value)
1823
{
1824
    if (!opts.quantifiers.miniscopeQuantFreeVarWasSetByUser) {
1825
        opts.quantifiers.miniscopeQuantFreeVar = value;
1826
    }
1827
}
1828
void setDefaultMultiTriggerCache(Options& opts, bool value)
1829
{
1830
    if (!opts.quantifiers.multiTriggerCacheWasSetByUser) {
1831
        opts.quantifiers.multiTriggerCache = value;
1832
    }
1833
}
1834
void setDefaultMultiTriggerLinear(Options& opts, bool value)
1835
{
1836
    if (!opts.quantifiers.multiTriggerLinearWasSetByUser) {
1837
        opts.quantifiers.multiTriggerLinear = value;
1838
    }
1839
}
1840
void setDefaultMultiTriggerPriority(Options& opts, bool value)
1841
{
1842
    if (!opts.quantifiers.multiTriggerPriorityWasSetByUser) {
1843
        opts.quantifiers.multiTriggerPriority = value;
1844
    }
1845
}
1846
void setDefaultMultiTriggerWhenSingle(Options& opts, bool value)
1847
{
1848
    if (!opts.quantifiers.multiTriggerWhenSingleWasSetByUser) {
1849
        opts.quantifiers.multiTriggerWhenSingle = value;
1850
    }
1851
}
1852
void setDefaultPartialTriggers(Options& opts, bool value)
1853
{
1854
    if (!opts.quantifiers.partialTriggersWasSetByUser) {
1855
        opts.quantifiers.partialTriggers = value;
1856
    }
1857
}
1858
void setDefaultPoolInst(Options& opts, bool value)
1859
{
1860
    if (!opts.quantifiers.poolInstWasSetByUser) {
1861
        opts.quantifiers.poolInst = value;
1862
    }
1863
}
1864
void setDefaultPreSkolemQuant(Options& opts, bool value)
1865
{
1866
    if (!opts.quantifiers.preSkolemQuantWasSetByUser) {
1867
        opts.quantifiers.preSkolemQuant = value;
1868
    }
1869
}
1870
void setDefaultPreSkolemQuantAgg(Options& opts, bool value)
1871
{
1872
    if (!opts.quantifiers.preSkolemQuantAggWasSetByUser) {
1873
        opts.quantifiers.preSkolemQuantAgg = value;
1874
    }
1875
}
1876
void setDefaultPreSkolemQuantNested(Options& opts, bool value)
1877
{
1878
    if (!opts.quantifiers.preSkolemQuantNestedWasSetByUser) {
1879
        opts.quantifiers.preSkolemQuantNested = value;
1880
    }
1881
}
1882
void setDefaultPrenexQuantUser(Options& opts, bool value)
1883
{
1884
    if (!opts.quantifiers.prenexQuantUserWasSetByUser) {
1885
        opts.quantifiers.prenexQuantUser = value;
1886
    }
1887
}
1888
void setDefaultPrenexQuant(Options& opts, PrenexQuantMode value)
1889
{
1890
    if (!opts.quantifiers.prenexQuantWasSetByUser) {
1891
        opts.quantifiers.prenexQuant = value;
1892
    }
1893
}
1894
void setDefaultPurifyTriggers(Options& opts, bool value)
1895
{
1896
    if (!opts.quantifiers.purifyTriggersWasSetByUser) {
1897
        opts.quantifiers.purifyTriggers = value;
1898
    }
1899
}
1900
void setDefaultQcfAllConflict(Options& opts, bool value)
1901
{
1902
    if (!opts.quantifiers.qcfAllConflictWasSetByUser) {
1903
        opts.quantifiers.qcfAllConflict = value;
1904
    }
1905
}
1906
void setDefaultQcfEagerCheckRd(Options& opts, bool value)
1907
{
1908
    if (!opts.quantifiers.qcfEagerCheckRdWasSetByUser) {
1909
        opts.quantifiers.qcfEagerCheckRd = value;
1910
    }
1911
}
1912
void setDefaultQcfEagerTest(Options& opts, bool value)
1913
{
1914
    if (!opts.quantifiers.qcfEagerTestWasSetByUser) {
1915
        opts.quantifiers.qcfEagerTest = value;
1916
    }
1917
}
1918
void setDefaultQcfNestedConflict(Options& opts, bool value)
1919
{
1920
    if (!opts.quantifiers.qcfNestedConflictWasSetByUser) {
1921
        opts.quantifiers.qcfNestedConflict = value;
1922
    }
1923
}
1924
void setDefaultQcfSkipRd(Options& opts, bool value)
1925
{
1926
    if (!opts.quantifiers.qcfSkipRdWasSetByUser) {
1927
        opts.quantifiers.qcfSkipRd = value;
1928
    }
1929
}
1930
void setDefaultQcfTConstraint(Options& opts, bool value)
1931
{
1932
    if (!opts.quantifiers.qcfTConstraintWasSetByUser) {
1933
        opts.quantifiers.qcfTConstraint = value;
1934
    }
1935
}
1936
void setDefaultQcfVoExp(Options& opts, bool value)
1937
{
1938
    if (!opts.quantifiers.qcfVoExpWasSetByUser) {
1939
        opts.quantifiers.qcfVoExp = value;
1940
    }
1941
}
1942
void setDefaultQuantAlphaEquiv(Options& opts, bool value)
1943
{
1944
    if (!opts.quantifiers.quantAlphaEquivWasSetByUser) {
1945
        opts.quantifiers.quantAlphaEquiv = value;
1946
    }
1947
}
1948
void setDefaultQuantConflictFind(Options& opts, bool value)
1949
{
1950
    if (!opts.quantifiers.quantConflictFindWasSetByUser) {
1951
        opts.quantifiers.quantConflictFind = value;
1952
    }
1953
}
1954
void setDefaultQcfMode(Options& opts, QcfMode value)
1955
{
1956
    if (!opts.quantifiers.qcfModeWasSetByUser) {
1957
        opts.quantifiers.qcfMode = value;
1958
    }
1959
}
1960
void setDefaultQcfWhenMode(Options& opts, QcfWhenMode value)
1961
{
1962
    if (!opts.quantifiers.qcfWhenModeWasSetByUser) {
1963
        opts.quantifiers.qcfWhenMode = value;
1964
    }
1965
}
1966
void setDefaultQuantDynamicSplit(Options& opts, QuantDSplitMode value)
1967
{
1968
    if (!opts.quantifiers.quantDynamicSplitWasSetByUser) {
1969
        opts.quantifiers.quantDynamicSplit = value;
1970
    }
1971
}
1972
void setDefaultQuantFunWellDefined(Options& opts, bool value)
1973
{
1974
    if (!opts.quantifiers.quantFunWellDefinedWasSetByUser) {
1975
        opts.quantifiers.quantFunWellDefined = value;
1976
    }
1977
}
1978
void setDefaultQuantInduction(Options& opts, bool value)
1979
{
1980
    if (!opts.quantifiers.quantInductionWasSetByUser) {
1981
        opts.quantifiers.quantInduction = value;
1982
    }
1983
}
1984
void setDefaultQuantRepMode(Options& opts, QuantRepMode value)
1985
{
1986
    if (!opts.quantifiers.quantRepModeWasSetByUser) {
1987
        opts.quantifiers.quantRepMode = value;
1988
    }
1989
}
1990
void setDefaultQuantSplit(Options& opts, bool value)
1991
{
1992
    if (!opts.quantifiers.quantSplitWasSetByUser) {
1993
        opts.quantifiers.quantSplit = value;
1994
    }
1995
}
1996
void setDefaultRegisterQuantBodyTerms(Options& opts, bool value)
1997
{
1998
    if (!opts.quantifiers.registerQuantBodyTermsWasSetByUser) {
1999
        opts.quantifiers.registerQuantBodyTerms = value;
2000
    }
2001
}
2002
void setDefaultRelationalTriggers(Options& opts, bool value)
2003
{
2004
    if (!opts.quantifiers.relationalTriggersWasSetByUser) {
2005
        opts.quantifiers.relationalTriggers = value;
2006
    }
2007
}
2008
void setDefaultRelevantTriggers(Options& opts, bool value)
2009
{
2010
    if (!opts.quantifiers.relevantTriggersWasSetByUser) {
2011
        opts.quantifiers.relevantTriggers = value;
2012
    }
2013
}
2014
void setDefaultStrictTriggers(Options& opts, bool value)
2015
{
2016
    if (!opts.quantifiers.strictTriggersWasSetByUser) {
2017
        opts.quantifiers.strictTriggers = value;
2018
    }
2019
}
2020
void setDefaultSygus(Options& opts, bool value)
2021
{
2022
    if (!opts.quantifiers.sygusWasSetByUser) {
2023
        opts.quantifiers.sygus = value;
2024
    }
2025
}
2026
void setDefaultSygusActiveGenEnumConsts(Options& opts, uint64_t value)
2027
{
2028
    if (!opts.quantifiers.sygusActiveGenEnumConstsWasSetByUser) {
2029
        opts.quantifiers.sygusActiveGenEnumConsts = value;
2030
    }
2031
}
2032
void setDefaultSygusActiveGenMode(Options& opts, SygusActiveGenMode value)
2033
{
2034
    if (!opts.quantifiers.sygusActiveGenModeWasSetByUser) {
2035
        opts.quantifiers.sygusActiveGenMode = value;
2036
    }
2037
}
2038
void setDefaultSygusAddConstGrammar(Options& opts, bool value)
2039
{
2040
    if (!opts.quantifiers.sygusAddConstGrammarWasSetByUser) {
2041
        opts.quantifiers.sygusAddConstGrammar = value;
2042
    }
2043
}
2044
void setDefaultSygusArgRelevant(Options& opts, bool value)
2045
{
2046
    if (!opts.quantifiers.sygusArgRelevantWasSetByUser) {
2047
        opts.quantifiers.sygusArgRelevant = value;
2048
    }
2049
}
2050
void setDefaultSygusInvAutoUnfold(Options& opts, bool value)
2051
{
2052
    if (!opts.quantifiers.sygusInvAutoUnfoldWasSetByUser) {
2053
        opts.quantifiers.sygusInvAutoUnfold = value;
2054
    }
2055
}
2056
void setDefaultSygusBoolIteReturnConst(Options& opts, bool value)
2057
{
2058
    if (!opts.quantifiers.sygusBoolIteReturnConstWasSetByUser) {
2059
        opts.quantifiers.sygusBoolIteReturnConst = value;
2060
    }
2061
}
2062
void setDefaultSygusCoreConnective(Options& opts, bool value)
2063
{
2064
    if (!opts.quantifiers.sygusCoreConnectiveWasSetByUser) {
2065
        opts.quantifiers.sygusCoreConnective = value;
2066
    }
2067
}
2068
void setDefaultSygusConstRepairAbort(Options& opts, bool value)
2069
{
2070
    if (!opts.quantifiers.sygusConstRepairAbortWasSetByUser) {
2071
        opts.quantifiers.sygusConstRepairAbort = value;
2072
    }
2073
}
2074
void setDefaultSygusEvalOpt(Options& opts, bool value)
2075
{
2076
    if (!opts.quantifiers.sygusEvalOptWasSetByUser) {
2077
        opts.quantifiers.sygusEvalOpt = value;
2078
    }
2079
}
2080
void setDefaultSygusEvalUnfold(Options& opts, bool value)
2081
{
2082
    if (!opts.quantifiers.sygusEvalUnfoldWasSetByUser) {
2083
        opts.quantifiers.sygusEvalUnfold = value;
2084
    }
2085
}
2086
void setDefaultSygusEvalUnfoldBool(Options& opts, bool value)
2087
{
2088
    if (!opts.quantifiers.sygusEvalUnfoldBoolWasSetByUser) {
2089
        opts.quantifiers.sygusEvalUnfoldBool = value;
2090
    }
2091
}
2092
void setDefaultSygusExprMinerCheckTimeout(Options& opts, uint64_t value)
2093
{
2094
    if (!opts.quantifiers.sygusExprMinerCheckTimeoutWasSetByUser) {
2095
        opts.quantifiers.sygusExprMinerCheckTimeout = value;
2096
    }
2097
}
2098
void setDefaultSygusExtRew(Options& opts, bool value)
2099
{
2100
    if (!opts.quantifiers.sygusExtRewWasSetByUser) {
2101
        opts.quantifiers.sygusExtRew = value;
2102
    }
2103
}
2104
void setDefaultSygusFilterSolRevSubsume(Options& opts, bool value)
2105
{
2106
    if (!opts.quantifiers.sygusFilterSolRevSubsumeWasSetByUser) {
2107
        opts.quantifiers.sygusFilterSolRevSubsume = value;
2108
    }
2109
}
2110
void setDefaultSygusFilterSolMode(Options& opts, SygusFilterSolMode value)
2111
{
2112
    if (!opts.quantifiers.sygusFilterSolModeWasSetByUser) {
2113
        opts.quantifiers.sygusFilterSolMode = value;
2114
    }
2115
}
2116
void setDefaultSygusGrammarConsMode(Options& opts, SygusGrammarConsMode value)
2117
{
2118
    if (!opts.quantifiers.sygusGrammarConsModeWasSetByUser) {
2119
        opts.quantifiers.sygusGrammarConsMode = value;
2120
    }
2121
}
2122
void setDefaultSygusGrammarNorm(Options& opts, bool value)
2123
{
2124
    if (!opts.quantifiers.sygusGrammarNormWasSetByUser) {
2125
        opts.quantifiers.sygusGrammarNorm = value;
2126
    }
2127
}
2128
void setDefaultSygusInference(Options& opts, bool value)
2129
{
2130
    if (!opts.quantifiers.sygusInferenceWasSetByUser) {
2131
        opts.quantifiers.sygusInference = value;
2132
    }
2133
}
2134
void setDefaultSygusInst(Options& opts, bool value)
2135
{
2136
    if (!opts.quantifiers.sygusInstWasSetByUser) {
2137
        opts.quantifiers.sygusInst = value;
2138
    }
2139
}
2140
void setDefaultSygusInstMode(Options& opts, SygusInstMode value)
2141
{
2142
    if (!opts.quantifiers.sygusInstModeWasSetByUser) {
2143
        opts.quantifiers.sygusInstMode = value;
2144
    }
2145
}
2146
void setDefaultSygusInstScope(Options& opts, SygusInstScope value)
2147
{
2148
    if (!opts.quantifiers.sygusInstScopeWasSetByUser) {
2149
        opts.quantifiers.sygusInstScope = value;
2150
    }
2151
}
2152
void setDefaultSygusInstTermSel(Options& opts, SygusInstTermSelMode value)
2153
{
2154
    if (!opts.quantifiers.sygusInstTermSelWasSetByUser) {
2155
        opts.quantifiers.sygusInstTermSel = value;
2156
    }
2157
}
2158
void setDefaultSygusInvTemplWhenSyntax(Options& opts, bool value)
2159
{
2160
    if (!opts.quantifiers.sygusInvTemplWhenSyntaxWasSetByUser) {
2161
        opts.quantifiers.sygusInvTemplWhenSyntax = value;
2162
    }
2163
}
2164
void setDefaultSygusInvTemplMode(Options& opts, SygusInvTemplMode value)
2165
{
2166
    if (!opts.quantifiers.sygusInvTemplModeWasSetByUser) {
2167
        opts.quantifiers.sygusInvTemplMode = value;
2168
    }
2169
}
2170
void setDefaultSygusMinGrammar(Options& opts, bool value)
2171
{
2172
    if (!opts.quantifiers.sygusMinGrammarWasSetByUser) {
2173
        opts.quantifiers.sygusMinGrammar = value;
2174
    }
2175
}
2176
void setDefaultSygusUnifPbe(Options& opts, bool value)
2177
{
2178
    if (!opts.quantifiers.sygusUnifPbeWasSetByUser) {
2179
        opts.quantifiers.sygusUnifPbe = value;
2180
    }
2181
}
2182
void setDefaultSygusPbeMultiFair(Options& opts, bool value)
2183
{
2184
    if (!opts.quantifiers.sygusPbeMultiFairWasSetByUser) {
2185
        opts.quantifiers.sygusPbeMultiFair = value;
2186
    }
2187
}
2188
void setDefaultSygusPbeMultiFairDiff(Options& opts, int64_t value)
2189
{
2190
    if (!opts.quantifiers.sygusPbeMultiFairDiffWasSetByUser) {
2191
        opts.quantifiers.sygusPbeMultiFairDiff = value;
2192
    }
2193
}
2194
void setDefaultSygusQePreproc(Options& opts, bool value)
2195
{
2196
    if (!opts.quantifiers.sygusQePreprocWasSetByUser) {
2197
        opts.quantifiers.sygusQePreproc = value;
2198
    }
2199
}
2200
void setDefaultSygusQueryGen(Options& opts, bool value)
2201
{
2202
    if (!opts.quantifiers.sygusQueryGenWasSetByUser) {
2203
        opts.quantifiers.sygusQueryGen = value;
2204
    }
2205
}
2206
void setDefaultSygusQueryGenCheck(Options& opts, bool value)
2207
{
2208
    if (!opts.quantifiers.sygusQueryGenCheckWasSetByUser) {
2209
        opts.quantifiers.sygusQueryGenCheck = value;
2210
    }
2211
}
2212
void setDefaultSygusQueryGenDumpFiles(Options& opts, SygusQueryDumpFilesMode value)
2213
{
2214
    if (!opts.quantifiers.sygusQueryGenDumpFilesWasSetByUser) {
2215
        opts.quantifiers.sygusQueryGenDumpFiles = value;
2216
    }
2217
}
2218
void setDefaultSygusQueryGenThresh(Options& opts, uint64_t value)
2219
{
2220
    if (!opts.quantifiers.sygusQueryGenThreshWasSetByUser) {
2221
        opts.quantifiers.sygusQueryGenThresh = value;
2222
    }
2223
}
2224
void setDefaultSygusRecFun(Options& opts, bool value)
2225
{
2226
    if (!opts.quantifiers.sygusRecFunWasSetByUser) {
2227
        opts.quantifiers.sygusRecFun = value;
2228
    }
2229
}
2230
void setDefaultSygusRecFunEvalLimit(Options& opts, uint64_t value)
2231
{
2232
    if (!opts.quantifiers.sygusRecFunEvalLimitWasSetByUser) {
2233
        opts.quantifiers.sygusRecFunEvalLimit = value;
2234
    }
2235
}
2236
void setDefaultSygusRepairConst(Options& opts, bool value)
2237
{
2238
    if (!opts.quantifiers.sygusRepairConstWasSetByUser) {
2239
        opts.quantifiers.sygusRepairConst = value;
2240
    }
2241
}
2242
void setDefaultSygusRepairConstTimeout(Options& opts, uint64_t value)
2243
{
2244
    if (!opts.quantifiers.sygusRepairConstTimeoutWasSetByUser) {
2245
        opts.quantifiers.sygusRepairConstTimeout = value;
2246
    }
2247
}
2248
void setDefaultSygusRew(Options& opts, bool value)
2249
{
2250
    if (!opts.quantifiers.sygusRewWasSetByUser) {
2251
        opts.quantifiers.sygusRew = value;
2252
    }
2253
}
2254
void setDefaultSygusRewSynth(Options& opts, bool value)
2255
{
2256
    if (!opts.quantifiers.sygusRewSynthWasSetByUser) {
2257
        opts.quantifiers.sygusRewSynth = value;
2258
    }
2259
}
2260
void setDefaultSygusRewSynthAccel(Options& opts, bool value)
2261
{
2262
    if (!opts.quantifiers.sygusRewSynthAccelWasSetByUser) {
2263
        opts.quantifiers.sygusRewSynthAccel = value;
2264
    }
2265
}
2266
void setDefaultSygusRewSynthCheck(Options& opts, bool value)
2267
{
2268
    if (!opts.quantifiers.sygusRewSynthCheckWasSetByUser) {
2269
        opts.quantifiers.sygusRewSynthCheck = value;
2270
    }
2271
}
2272
void setDefaultSygusRewSynthFilterCong(Options& opts, bool value)
2273
{
2274
    if (!opts.quantifiers.sygusRewSynthFilterCongWasSetByUser) {
2275
        opts.quantifiers.sygusRewSynthFilterCong = value;
2276
    }
2277
}
2278
void setDefaultSygusRewSynthFilterMatch(Options& opts, bool value)
2279
{
2280
    if (!opts.quantifiers.sygusRewSynthFilterMatchWasSetByUser) {
2281
        opts.quantifiers.sygusRewSynthFilterMatch = value;
2282
    }
2283
}
2284
void setDefaultSygusRewSynthFilterNonLinear(Options& opts, bool value)
2285
{
2286
    if (!opts.quantifiers.sygusRewSynthFilterNonLinearWasSetByUser) {
2287
        opts.quantifiers.sygusRewSynthFilterNonLinear = value;
2288
    }
2289
}
2290
void setDefaultSygusRewSynthFilterOrder(Options& opts, bool value)
2291
{
2292
    if (!opts.quantifiers.sygusRewSynthFilterOrderWasSetByUser) {
2293
        opts.quantifiers.sygusRewSynthFilterOrder = value;
2294
    }
2295
}
2296
void setDefaultSygusRewSynthInput(Options& opts, bool value)
2297
{
2298
    if (!opts.quantifiers.sygusRewSynthInputWasSetByUser) {
2299
        opts.quantifiers.sygusRewSynthInput = value;
2300
    }
2301
}
2302
void setDefaultSygusRewSynthInputNVars(Options& opts, int64_t value)
2303
{
2304
    if (!opts.quantifiers.sygusRewSynthInputNVarsWasSetByUser) {
2305
        opts.quantifiers.sygusRewSynthInputNVars = value;
2306
    }
2307
}
2308
void setDefaultSygusRewSynthInputUseBool(Options& opts, bool value)
2309
{
2310
    if (!opts.quantifiers.sygusRewSynthInputUseBoolWasSetByUser) {
2311
        opts.quantifiers.sygusRewSynthInputUseBool = value;
2312
    }
2313
}
2314
void setDefaultSygusRewSynthRec(Options& opts, bool value)
2315
{
2316
    if (!opts.quantifiers.sygusRewSynthRecWasSetByUser) {
2317
        opts.quantifiers.sygusRewSynthRec = value;
2318
    }
2319
}
2320
void setDefaultSygusRewVerify(Options& opts, bool value)
2321
{
2322
    if (!opts.quantifiers.sygusRewVerifyWasSetByUser) {
2323
        opts.quantifiers.sygusRewVerify = value;
2324
    }
2325
}
2326
void setDefaultSygusRewVerifyAbort(Options& opts, bool value)
2327
{
2328
    if (!opts.quantifiers.sygusRewVerifyAbortWasSetByUser) {
2329
        opts.quantifiers.sygusRewVerifyAbort = value;
2330
    }
2331
}
2332
void setDefaultSygusSampleFpUniform(Options& opts, bool value)
2333
{
2334
    if (!opts.quantifiers.sygusSampleFpUniformWasSetByUser) {
2335
        opts.quantifiers.sygusSampleFpUniform = value;
2336
    }
2337
}
2338
void setDefaultSygusSampleGrammar(Options& opts, bool value)
2339
{
2340
    if (!opts.quantifiers.sygusSampleGrammarWasSetByUser) {
2341
        opts.quantifiers.sygusSampleGrammar = value;
2342
    }
2343
}
2344
void setDefaultSygusSamples(Options& opts, int64_t value)
2345
{
2346
    if (!opts.quantifiers.sygusSamplesWasSetByUser) {
2347
        opts.quantifiers.sygusSamples = value;
2348
    }
2349
}
2350
void setDefaultCegqiSingleInvAbort(Options& opts, bool value)
2351
{
2352
    if (!opts.quantifiers.cegqiSingleInvAbortWasSetByUser) {
2353
        opts.quantifiers.cegqiSingleInvAbort = value;
2354
    }
2355
}
2356
void setDefaultCegqiSingleInvPartial(Options& opts, bool value)
2357
{
2358
    if (!opts.quantifiers.cegqiSingleInvPartialWasSetByUser) {
2359
        opts.quantifiers.cegqiSingleInvPartial = value;
2360
    }
2361
}
2362
void setDefaultCegqiSingleInvReconstructLimit(Options& opts, int64_t value)
2363
{
2364
    if (!opts.quantifiers.cegqiSingleInvReconstructLimitWasSetByUser) {
2365
        opts.quantifiers.cegqiSingleInvReconstructLimit = value;
2366
    }
2367
}
2368
void setDefaultCegqiSingleInvReconstruct(Options& opts, CegqiSingleInvRconsMode value)
2369
{
2370
    if (!opts.quantifiers.cegqiSingleInvReconstructWasSetByUser) {
2371
        opts.quantifiers.cegqiSingleInvReconstruct = value;
2372
    }
2373
}
2374
void setDefaultCegqiSingleInvReconstructConst(Options& opts, bool value)
2375
{
2376
    if (!opts.quantifiers.cegqiSingleInvReconstructConstWasSetByUser) {
2377
        opts.quantifiers.cegqiSingleInvReconstructConst = value;
2378
    }
2379
}
2380
void setDefaultCegqiSingleInvMode(Options& opts, CegqiSingleInvMode value)
2381
{
2382
    if (!opts.quantifiers.cegqiSingleInvModeWasSetByUser) {
2383
        opts.quantifiers.cegqiSingleInvMode = value;
2384
    }
2385
}
2386
void setDefaultSygusStream(Options& opts, bool value)
2387
{
2388
    if (!opts.quantifiers.sygusStreamWasSetByUser) {
2389
        opts.quantifiers.sygusStream = value;
2390
    }
2391
}
2392
void setDefaultSygusTemplEmbedGrammar(Options& opts, bool value)
2393
{
2394
    if (!opts.quantifiers.sygusTemplEmbedGrammarWasSetByUser) {
2395
        opts.quantifiers.sygusTemplEmbedGrammar = value;
2396
    }
2397
}
2398
void setDefaultSygusUnifCondIndNoRepeatSol(Options& opts, bool value)
2399
{
2400
    if (!opts.quantifiers.sygusUnifCondIndNoRepeatSolWasSetByUser) {
2401
        opts.quantifiers.sygusUnifCondIndNoRepeatSol = value;
2402
    }
2403
}
2404
void setDefaultSygusUnifPi(Options& opts, SygusUnifPiMode value)
2405
{
2406
    if (!opts.quantifiers.sygusUnifPiWasSetByUser) {
2407
        opts.quantifiers.sygusUnifPi = value;
2408
    }
2409
}
2410
void setDefaultSygusUnifShuffleCond(Options& opts, bool value)
2411
{
2412
    if (!opts.quantifiers.sygusUnifShuffleCondWasSetByUser) {
2413
        opts.quantifiers.sygusUnifShuffleCond = value;
2414
    }
2415
}
2416
void setDefaultSygusVerifyInstMaxRounds(Options& opts, int64_t value)
2417
{
2418
    if (!opts.quantifiers.sygusVerifyInstMaxRoundsWasSetByUser) {
2419
        opts.quantifiers.sygusVerifyInstMaxRounds = value;
2420
    }
2421
}
2422
void setDefaultTermDbCd(Options& opts, bool value)
2423
{
2424
    if (!opts.quantifiers.termDbCdWasSetByUser) {
2425
        opts.quantifiers.termDbCd = value;
2426
    }
2427
}
2428
void setDefaultTermDbMode(Options& opts, TermDbMode value)
2429
{
2430
    if (!opts.quantifiers.termDbModeWasSetByUser) {
2431
        opts.quantifiers.termDbMode = value;
2432
    }
2433
}
2434
void setDefaultTriggerActiveSelMode(Options& opts, TriggerActiveSelMode value)
2435
{
2436
    if (!opts.quantifiers.triggerActiveSelModeWasSetByUser) {
2437
        opts.quantifiers.triggerActiveSelMode = value;
2438
    }
2439
}
2440
void setDefaultTriggerSelMode(Options& opts, TriggerSelMode value)
2441
{
2442
    if (!opts.quantifiers.triggerSelModeWasSetByUser) {
2443
        opts.quantifiers.triggerSelMode = value;
2444
    }
2445
}
2446
void setDefaultUserPatternsQuant(Options& opts, UserPatMode value)
2447
{
2448
    if (!opts.quantifiers.userPatternsQuantWasSetByUser) {
2449
        opts.quantifiers.userPatternsQuant = value;
2450
    }
2451
}
2452
void setDefaultVarElimQuant(Options& opts, bool value)
2453
{
2454
    if (!opts.quantifiers.varElimQuantWasSetByUser) {
2455
        opts.quantifiers.varElimQuant = value;
2456
    }
2457
}
2458
void setDefaultVarIneqElimQuant(Options& opts, bool value)
2459
{
2460
    if (!opts.quantifiers.varIneqElimQuantWasSetByUser) {
2461
        opts.quantifiers.varIneqElimQuant = value;
2462
    }
2463
}
2464
// clang-format on
2465
}
2466
2467
29337
}  // namespace cvc5::options
2468
// clang-format on