GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/quantifiers_options.cpp Lines: 49 1399 3.5 %
Date: 2021-08-01 Branches: 32 1067 3.0 %

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