1 /******************************************************************************
2 * Top contributors (to current version):
3 * Andrew Reynolds, Andres Noetzli, Haniel Barbosa
5 * This file is part of the cvc5 project.
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 * ****************************************************************************
13 * Implementation of setting default options.
16 #include "smt/set_defaults.h"
20 #include "base/output.h"
21 #include "options/arith_options.h"
22 #include "options/arrays_options.h"
23 #include "options/base_options.h"
24 #include "options/booleans_options.h"
25 #include "options/bv_options.h"
26 #include "options/datatypes_options.h"
27 #include "options/decision_options.h"
28 #include "options/language.h"
29 #include "options/main_options.h"
30 #include "options/open_ostream.h"
31 #include "options/option_exception.h"
32 #include "options/printer_options.h"
33 #include "options/proof_options.h"
34 #include "options/prop_options.h"
35 #include "options/quantifiers_options.h"
36 #include "options/sep_options.h"
37 #include "options/set_language.h"
38 #include "options/smt_options.h"
39 #include "options/strings_options.h"
40 #include "options/theory_options.h"
41 #include "options/uf_options.h"
42 #include "smt/logic_exception.h"
43 #include "theory/theory.h"
45 using namespace cvc5::theory
;
50 void setDefaults(LogicInfo
& logic
, bool isInternalSubsolver
)
52 Options
& opts
= Options::current();
54 if (options::debugCheckModels())
56 opts
.set(options::checkModels
, true);
58 if (options::checkModels() || options::dumpModels())
60 opts
.set(options::produceModels
, true);
62 if (options::checkModels())
64 opts
.set(options::produceAssignments
, true);
66 // unsat cores and proofs shenanigans
67 if (options::dumpUnsatCoresFull())
69 opts
.set(options::dumpUnsatCores
, true);
71 if (options::checkUnsatCores() || options::dumpUnsatCores()
72 || options::unsatAssumptions()
73 || options::unsatCoresMode() != options::UnsatCoresMode::OFF
)
75 opts
.set(options::unsatCores
, true);
77 if (options::unsatCores()
78 && options::unsatCoresMode() == options::UnsatCoresMode::OFF
)
80 if (opts
.wasSetByUser(options::unsatCoresMode
))
83 << "Overriding OFF unsat-core mode since cores were requested.\n";
85 opts
.set(options::unsatCoresMode
, options::UnsatCoresMode::ASSUMPTIONS
);
88 if (options::checkProofs() || options::dumpProofs())
90 opts
.set(options::produceProofs
, true);
93 if (options::produceProofs()
94 && options::unsatCoresMode() != options::UnsatCoresMode::FULL_PROOF
)
96 if (opts
.wasSetByUser(options::unsatCoresMode
))
98 Notice() << "Forcing full-proof mode for unsat cores mode since proofs "
101 // enable unsat cores, because they are available as a consequence of proofs
102 opts
.set(options::unsatCores
, true);
103 opts
.set(options::unsatCoresMode
, options::UnsatCoresMode::FULL_PROOF
);
106 // set proofs on if not yet set
107 if (options::unsatCores() && !options::produceProofs()
108 && options::unsatCoresMode() != options::UnsatCoresMode::OLD_PROOF
)
110 if (opts
.wasSetByUser(options::produceProofs
))
113 << "Forcing proof production since new unsat cores were requested.\n";
115 opts
.set(options::produceProofs
, true);
118 // if unsat cores are disabled, then unsat cores mode should be OFF
119 Assert(options::unsatCores()
120 == (options::unsatCoresMode() != options::UnsatCoresMode::OFF
));
122 if (opts
.wasSetByUser(options::bitvectorAigSimplifications
))
124 Notice() << "SmtEngine: setting bitvectorAig" << std::endl
;
125 opts
.set(options::bitvectorAig
, true);
127 if (opts
.wasSetByUser(options::bitvectorAlgebraicBudget
))
129 Notice() << "SmtEngine: setting bitvectorAlgebraicSolver" << std::endl
;
130 opts
.set(options::bitvectorAlgebraicSolver
, true);
133 bool isSygus
= language::isInputLangSygus(options::inputLanguage());
134 bool usesSygus
= isSygus
;
136 if (options::bitblastMode() == options::BitblastMode::EAGER
)
138 if (options::produceModels()
139 && (logic
.isTheoryEnabled(THEORY_ARRAYS
)
140 || logic
.isTheoryEnabled(THEORY_UF
)))
142 if (opts
.wasSetByUser(options::bitblastMode
)
143 || opts
.wasSetByUser(options::produceModels
))
145 throw OptionException(std::string(
146 "Eager bit-blasting currently does not support model generation "
147 "for the combination of bit-vectors with arrays or uinterpreted "
148 "functions. Try --bitblast=lazy"));
150 Notice() << "SmtEngine: setting bit-blast mode to lazy to support model"
151 << "generation" << std::endl
;
152 opts
.set(options::bitblastMode
, options::BitblastMode::LAZY
);
154 else if (!options::incrementalSolving())
156 opts
.set(options::ackermann
, true);
159 if (options::incrementalSolving() && !logic
.isPure(THEORY_BV
))
161 throw OptionException(
162 "Incremental eager bit-blasting is currently "
163 "only supported for QF_BV. Try --bitblast=lazy.");
167 /* Only BVSolver::LAZY natively supports int2bv and nat2bv, for other solvers
168 * we need to eagerly eliminate the operators. */
169 if (options::bvSolver() == options::BVSolver::SIMPLE
170 || options::bvSolver() == options::BVSolver::BITBLAST
)
172 opts
.set(options::bvLazyReduceExtf
, false);
173 opts
.set(options::bvLazyRewriteExtf
, false);
176 /* Disable bit-level propagation by default for the BITBLAST solver. */
177 if (options::bvSolver() == options::BVSolver::BITBLAST
)
179 opts
.set(options::bitvectorPropagate
, false);
182 if (options::solveIntAsBV() > 0)
184 // not compatible with incremental
185 if (options::incrementalSolving())
187 throw OptionException(
188 "solving integers as bitvectors is currently not supported "
189 "when solving incrementally.");
191 // Int to BV currently always eliminates arithmetic completely (or otherwise
192 // fails). Thus, it is safe to eliminate arithmetic. Also, bit-vectors
194 logic
= logic
.getUnlockedCopy();
195 logic
.enableTheory(THEORY_BV
);
196 logic
.disableTheory(THEORY_ARITH
);
200 if (options::solveBVAsInt() != options::SolveBVAsIntMode::OFF
)
202 if (options::boolToBitvector() != options::BoolToBVMode::OFF
)
204 throw OptionException(
205 "solving bitvectors as integers is incompatible with --bool-to-bv.");
207 if (options::BVAndIntegerGranularity() > 8)
210 * The granularity sets the size of the ITE in each element
211 * of the sum that is generated for bitwise operators.
212 * The size of the ITE is 2^{2*granularity}.
213 * Since we don't want to introduce ITEs with unbounded size,
214 * we bound the granularity.
216 throw OptionException("solve-bv-as-int accepts values from 0 to 8.");
218 if (logic
.isTheoryEnabled(THEORY_BV
))
220 logic
= logic
.getUnlockedCopy();
221 logic
.enableTheory(THEORY_ARITH
);
222 logic
.arithNonLinear();
227 // set options about ackermannization
228 if (options::ackermann() && options::produceModels()
229 && (logic
.isTheoryEnabled(THEORY_ARRAYS
)
230 || logic
.isTheoryEnabled(THEORY_UF
)))
232 if (opts
.wasSetByUser(options::produceModels
))
234 throw OptionException(std::string(
235 "Ackermannization currently does not support model generation."));
237 Notice() << "SmtEngine: turn off ackermannization to support model"
238 << "generation" << std::endl
;
239 opts
.set(options::ackermann
, false);
242 if (options::ackermann())
244 if (options::incrementalSolving())
246 throw OptionException(
247 "Incremental Ackermannization is currently not supported.");
250 if (logic
.isQuantified())
252 throw LogicException("Cannot use Ackermannization on quantified formula");
255 if (logic
.isTheoryEnabled(THEORY_UF
))
257 logic
= logic
.getUnlockedCopy();
258 logic
.disableTheory(THEORY_UF
);
261 if (logic
.isTheoryEnabled(THEORY_ARRAYS
))
263 logic
= logic
.getUnlockedCopy();
264 logic
.disableTheory(THEORY_ARRAYS
);
269 // --ite-simp is an experimental option designed for QF_LIA/nec. This
270 // technique is experimental. This benchmark set also requires removing ITEs
271 // during preprocessing, before repeating simplification. Hence, we enable
273 if (options::doITESimp())
275 if (!opts
.wasSetByUser(options::earlyIteRemoval
))
277 opts
.set(options::earlyIteRemoval
, true);
281 // Set default options associated with strings-exp. We also set these options
282 // if we are using eager string preprocessing, which may introduce quantified
283 // formulas at preprocess time.
284 if (!logic
.hasEverything() && logic
.isTheoryEnabled(THEORY_STRINGS
))
286 // If the user explicitly set a logic that includes strings, but is not
287 // the generic "ALL" logic, then enable stringsExp.
288 opts
.set(options::stringExp
, true);
290 if (options::stringExp() || !options::stringLazyPreproc())
292 // We require quantifiers since extended functions reduce using them.
293 if (!logic
.isQuantified())
295 logic
= logic
.getUnlockedCopy();
296 logic
.enableQuantifiers();
298 Trace("smt") << "turning on quantifier logic, for strings-exp"
301 // We require bounded quantifier handling.
302 if (!opts
.wasSetByUser(options::fmfBound
))
304 opts
.set(options::fmfBound
, true);
305 Trace("smt") << "turning on fmf-bound-int, for strings-exp" << std::endl
;
307 // Note we allow E-matching by default to support combinations of sequences
310 // whether we must disable proofs
311 bool disableProofs
= false;
312 if (options::globalNegate())
314 // When global negate answers "unsat", it is not due to showing a set of
315 // formulas is unsat. Thus, proofs do not apply.
316 disableProofs
= true;
319 // new unsat core specific restrictions for proofs
320 if (options::unsatCores()
321 && options::unsatCoresMode() != options::UnsatCoresMode::OLD_PROOF
322 && options::unsatCoresMode() != options::UnsatCoresMode::FULL_PROOF
)
324 // no fine-graininess
325 if (!opts
.wasSetByUser(options::proofGranularityMode
))
327 opts
.set(options::proofGranularityMode
, options::ProofGranularityMode::OFF
);
331 if (options::arraysExp())
333 if (!logic
.isQuantified())
335 logic
= logic
.getUnlockedCopy();
336 logic
.enableQuantifiers();
339 // Allows to answer sat more often by default.
340 if (!opts
.wasSetByUser(options::fmfBound
))
342 opts
.set(options::fmfBound
, true);
343 Trace("smt") << "turning on fmf-bound, for arrays-exp" << std::endl
;
347 // sygus inference may require datatypes
348 if (!isInternalSubsolver
)
350 if (options::produceAbducts()
351 || options::produceInterpols() != options::ProduceInterpols::NONE
352 || options::sygusInference() || options::sygusRewSynthInput())
354 // since we are trying to recast as sygus, we assume the input is sygus
357 else if (options::sygusInst())
359 // sygus instantiation uses sygus, but it is not a sygus problem
364 // We now know whether the input uses sygus. Update the logic to incorporate
365 // the theories we need internally for handling sygus problems.
368 logic
= logic
.getUnlockedCopy();
373 // When sygus answers "unsat", it is not due to showing a set of
374 // formulas is unsat in the standard way. Thus, proofs do not apply.
375 disableProofs
= true;
379 // if we requiring disabling proofs, disable them now
380 if (disableProofs
&& options::produceProofs())
382 opts
.set(options::unsatCores
, false);
383 opts
.set(options::unsatCoresMode
, options::UnsatCoresMode::OFF
);
384 if (options::produceProofs())
386 Notice() << "SmtEngine: turning off produce-proofs." << std::endl
;
388 opts
.set(options::produceProofs
, false);
389 opts
.set(options::checkProofs
, false);
390 opts
.set(options::proofEagerChecking
, false);
393 // sygus core connective requires unsat cores
394 if (options::sygusCoreConnective())
396 opts
.set(options::unsatCores
, true);
397 if (options::unsatCoresMode() == options::UnsatCoresMode::OFF
)
399 opts
.set(options::unsatCoresMode
, options::UnsatCoresMode::ASSUMPTIONS
);
403 if ((options::checkModels() || options::checkSynthSol()
404 || options::produceAbducts()
405 || options::produceInterpols() != options::ProduceInterpols::NONE
406 || options::modelCoresMode() != options::ModelCoresMode::NONE
407 || options::blockModelsMode() != options::BlockModelsMode::NONE
408 || options::produceProofs())
409 && !options::produceAssertions())
411 Notice() << "SmtEngine: turning on produce-assertions to support "
412 << "option requiring assertions." << std::endl
;
413 opts
.set(options::produceAssertions
, true);
416 // whether we want to force safe unsat cores, i.e., if we are in the OLD_PROOF
417 // unsat core mode or ASSUMPTIONS, the new default, since other ones are
419 bool safeUnsatCores
=
420 options::unsatCoresMode() == options::UnsatCoresMode::OLD_PROOF
421 || options::unsatCoresMode() == options::UnsatCoresMode::ASSUMPTIONS
;
423 // Disable options incompatible with incremental solving, unsat cores or
424 // output an error if enabled explicitly. It is also currently incompatible
425 // with arithmetic, force the option off.
426 if (options::incrementalSolving() || safeUnsatCores
)
428 if (options::unconstrainedSimp())
430 if (opts
.wasSetByUser(options::unconstrainedSimp
))
432 throw OptionException(
433 "unconstrained simplification not supported with old unsat "
434 "cores/incremental solving");
436 Notice() << "SmtEngine: turning off unconstrained simplification to "
437 "support old unsat cores/incremental solving"
439 opts
.set(options::unconstrainedSimp
, false);
444 // Turn on unconstrained simplification for QF_AUFBV
445 if (!opts
.wasSetByUser(options::unconstrainedSimp
))
447 bool uncSimp
= !logic
.isQuantified() && !options::produceModels()
448 && !options::produceAssignments()
449 && !options::checkModels()
450 && logic
.isTheoryEnabled(THEORY_ARRAYS
)
451 && logic
.isTheoryEnabled(THEORY_BV
)
452 && !logic
.isTheoryEnabled(THEORY_ARITH
);
453 Trace("smt") << "setting unconstrained simplification to " << uncSimp
455 opts
.set(options::unconstrainedSimp
, uncSimp
);
459 if (options::incrementalSolving())
461 if (options::sygusInference())
463 if (opts
.wasSetByUser(options::sygusInference
))
465 throw OptionException(
466 "sygus inference not supported with incremental solving");
468 Notice() << "SmtEngine: turning off sygus inference to support "
469 "incremental solving"
471 opts
.set(options::sygusInference
, false);
475 if (options::solveBVAsInt() != options::SolveBVAsIntMode::OFF
)
478 * Operations on 1 bits are better handled as Boolean operations
479 * than as integer operations.
480 * Therefore, we enable bv-to-bool, which runs before
481 * the translation to integers.
483 opts
.set(options::bitvectorToBool
, true);
486 // Disable options incompatible with unsat cores or output an error if enabled
490 if (options::simplificationMode() != options::SimplificationMode::NONE
)
492 if (opts
.wasSetByUser(options::simplificationMode
))
494 throw OptionException(
495 "simplification not supported with old unsat cores");
497 Notice() << "SmtEngine: turning off simplification to support unsat "
500 opts
.set(options::simplificationMode
, options::SimplificationMode::NONE
);
503 if (options::pbRewrites())
505 if (opts
.wasSetByUser(options::pbRewrites
))
507 throw OptionException(
508 "pseudoboolean rewrites not supported with old unsat cores");
510 Notice() << "SmtEngine: turning off pseudoboolean rewrites to support "
512 opts
.set(options::pbRewrites
, false);
515 if (options::sortInference())
517 if (opts
.wasSetByUser(options::sortInference
))
519 throw OptionException(
520 "sort inference not supported with old unsat cores");
522 Notice() << "SmtEngine: turning off sort inference to support old unsat "
524 opts
.set(options::sortInference
, false);
527 if (options::preSkolemQuant())
529 if (opts
.wasSetByUser(options::preSkolemQuant
))
531 throw OptionException(
532 "pre-skolemization not supported with old unsat cores");
534 Notice() << "SmtEngine: turning off pre-skolemization to support old "
536 opts
.set(options::preSkolemQuant
, false);
539 if (options::bitvectorToBool())
541 if (opts
.wasSetByUser(options::bitvectorToBool
))
543 throw OptionException("bv-to-bool not supported with old unsat cores");
545 Notice() << "SmtEngine: turning off bitvector-to-bool to support old "
547 opts
.set(options::bitvectorToBool
, false);
550 if (options::boolToBitvector() != options::BoolToBVMode::OFF
)
552 if (opts
.wasSetByUser(options::boolToBitvector
))
554 throw OptionException(
555 "bool-to-bv != off not supported with old unsat cores");
558 << "SmtEngine: turning off bool-to-bv to support old unsat cores\n";
559 opts
.set(options::boolToBitvector
, options::BoolToBVMode::OFF
);
562 if (options::bvIntroducePow2())
564 if (opts
.wasSetByUser(options::bvIntroducePow2
))
566 throw OptionException(
567 "bv-intro-pow2 not supported with old unsat cores");
570 << "SmtEngine: turning off bv-intro-pow2 to support old unsat cores";
571 opts
.set(options::bvIntroducePow2
, false);
574 if (options::repeatSimp())
576 if (opts
.wasSetByUser(options::repeatSimp
))
578 throw OptionException("repeat-simp not supported with old unsat cores");
581 << "SmtEngine: turning off repeat-simp to support old unsat cores\n";
582 opts
.set(options::repeatSimp
, false);
585 if (options::globalNegate())
587 if (opts
.wasSetByUser(options::globalNegate
))
589 throw OptionException(
590 "global-negate not supported with old unsat cores");
592 Notice() << "SmtEngine: turning off global-negate to support old unsat "
594 opts
.set(options::globalNegate
, false);
597 if (options::bitvectorAig())
599 throw OptionException("bitblast-aig not supported with old unsat cores");
602 if (options::doITESimp())
604 throw OptionException("ITE simp not supported with old unsat cores");
609 // by default, nonclausal simplification is off for QF_SAT
610 if (!opts
.wasSetByUser(options::simplificationMode
))
612 bool qf_sat
= logic
.isPure(THEORY_BOOL
) && !logic
.isQuantified();
613 Trace("smt") << "setting simplification mode to <"
614 << logic
.getLogicString() << "> " << (!qf_sat
) << std::endl
;
615 // simplification=none works better for SMT LIB benchmarks with
616 // quantifiers, not others opts.set(options::simplificationMode, qf_sat ||
617 // quantifiers ? options::SimplificationMode::NONE :
618 // options::SimplificationMode::BATCH);
619 opts
.set(options::simplificationMode
, qf_sat
620 ? options::SimplificationMode::NONE
621 : options::SimplificationMode::BATCH
);
625 if (options::cegqiBv() && logic
.isQuantified())
627 if (options::boolToBitvector() != options::BoolToBVMode::OFF
)
629 if (opts
.wasSetByUser(options::boolToBitvector
))
631 throw OptionException(
632 "bool-to-bv != off not supported with CBQI BV for quantified "
635 Notice() << "SmtEngine: turning off bool-to-bitvector to support CBQI BV"
637 opts
.set(options::boolToBitvector
, options::BoolToBVMode::OFF
);
641 // cases where we need produce models
642 if (!options::produceModels()
643 && (options::produceAssignments() || options::sygusRewSynthCheck()
646 Notice() << "SmtEngine: turning on produce-models" << std::endl
;
647 opts
.set(options::produceModels
, true);
650 /////////////////////////////////////////////////////////////////////////////
653 // Some theories imply the use of other theories to handle certain operators,
654 // e.g. UF to handle partial functions.
655 /////////////////////////////////////////////////////////////////////////////
656 bool needsUf
= false;
657 // strings require LIA, UF; widen the logic
658 if (logic
.isTheoryEnabled(THEORY_STRINGS
))
660 LogicInfo
log(logic
.getUnlockedCopy());
661 // Strings requires arith for length constraints, and also UF
663 if (!logic
.isTheoryEnabled(THEORY_ARITH
) || logic
.isDifferenceLogic())
666 << "Enabling linear integer arithmetic because strings are enabled"
668 log
.enableTheory(THEORY_ARITH
);
669 log
.enableIntegers();
670 log
.arithOnlyLinear();
672 else if (!logic
.areIntegersUsed())
674 Notice() << "Enabling integer arithmetic because strings are enabled"
676 log
.enableIntegers();
681 if (options::bvAbstraction())
683 // bv abstraction may require UF
684 Notice() << "Enabling UF because bvAbstraction requires it." << std::endl
;
687 else if (options::preSkolemQuantNested()
688 && opts
.wasSetByUser(options::preSkolemQuantNested
))
690 // if pre-skolem nested is explictly set, then we require UF. If it is
691 // not explicitly set, it is disabled below if UF is not present.
692 Notice() << "Enabling UF because preSkolemQuantNested requires it."
697 // Arrays, datatypes and sets permit Boolean terms and thus require UF
698 || logic
.isTheoryEnabled(THEORY_ARRAYS
)
699 || logic
.isTheoryEnabled(THEORY_DATATYPES
)
700 || logic
.isTheoryEnabled(THEORY_SETS
)
701 || logic
.isTheoryEnabled(THEORY_BAGS
)
702 // Non-linear arithmetic requires UF to deal with division/mod because
703 // their expansion introduces UFs for the division/mod-by-zero case.
704 // If we are eliminating non-linear arithmetic via solve-int-as-bv,
705 // then this is not required, since non-linear arithmetic will be
706 // eliminated altogether (or otherwise fail at preprocessing).
707 || (logic
.isTheoryEnabled(THEORY_ARITH
) && !logic
.isLinear()
708 && options::solveIntAsBV() == 0)
709 // FP requires UF since there are multiple operators that are partially
710 // defined (see http://smtlib.cs.uiowa.edu/papers/BTRW15.pdf for more
712 || logic
.isTheoryEnabled(THEORY_FP
))
714 if (!logic
.isTheoryEnabled(THEORY_UF
))
716 LogicInfo
log(logic
.getUnlockedCopy());
719 Notice() << "Enabling UF because " << logic
<< " requires it."
722 log
.enableTheory(THEORY_UF
);
727 if (options::arithMLTrick())
729 if (!logic
.areIntegersUsed())
732 LogicInfo
log(logic
.getUnlockedCopy());
733 Notice() << "Enabling integers because arithMLTrick requires it."
735 log
.enableIntegers();
740 /////////////////////////////////////////////////////////////////////////////
742 // Set the options for the theoryOf
743 if (!opts
.wasSetByUser(options::theoryOfMode
))
745 if (logic
.isSharingEnabled() && !logic
.isTheoryEnabled(THEORY_BV
)
746 && !logic
.isTheoryEnabled(THEORY_STRINGS
)
747 && !logic
.isTheoryEnabled(THEORY_SETS
)
748 && !logic
.isTheoryEnabled(THEORY_BAGS
)
749 && !(logic
.isTheoryEnabled(THEORY_ARITH
) && !logic
.isLinear()
750 && !logic
.isQuantified()))
752 Trace("smt") << "setting theoryof-mode to term-based" << std::endl
;
753 opts
.set(options::theoryOfMode
, options::TheoryOfMode::THEORY_OF_TERM_BASED
);
757 // by default, symmetry breaker is on only for non-incremental QF_UF
758 if (!opts
.wasSetByUser(options::ufSymmetryBreaker
))
760 bool qf_uf_noinc
= logic
.isPure(THEORY_UF
) && !logic
.isQuantified()
761 && !options::incrementalSolving() && !safeUnsatCores
;
762 Trace("smt") << "setting uf symmetry breaker to " << qf_uf_noinc
764 opts
.set(options::ufSymmetryBreaker
, qf_uf_noinc
);
767 // If in arrays, set the UF handler to arrays
768 if (logic
.isTheoryEnabled(THEORY_ARRAYS
) && !options::ufHo()
769 && !options::finiteModelFind()
770 && (!logic
.isQuantified()
771 || (logic
.isQuantified() && !logic
.isTheoryEnabled(THEORY_UF
))))
773 Theory::setUninterpretedSortOwner(THEORY_ARRAYS
);
777 Theory::setUninterpretedSortOwner(THEORY_UF
);
780 if (!opts
.wasSetByUser(options::simplifyWithCareEnabled
))
783 !logic
.isQuantified() && logic
.isTheoryEnabled(THEORY_ARRAYS
)
784 && logic
.isTheoryEnabled(THEORY_UF
) && logic
.isTheoryEnabled(THEORY_BV
);
786 bool withCare
= qf_aufbv
;
787 Trace("smt") << "setting ite simplify with care to " << withCare
789 opts
.set(options::simplifyWithCareEnabled
, withCare
);
791 // Turn off array eager index splitting for QF_AUFLIA
792 if (!opts
.wasSetByUser(options::arraysEagerIndexSplitting
))
794 if (not logic
.isQuantified() && logic
.isTheoryEnabled(THEORY_ARRAYS
)
795 && logic
.isTheoryEnabled(THEORY_UF
)
796 && logic
.isTheoryEnabled(THEORY_ARITH
))
798 Trace("smt") << "setting array eager index splitting to false"
800 opts
.set(options::arraysEagerIndexSplitting
, false);
803 // Turn on multiple-pass non-clausal simplification for QF_AUFBV
804 if (!opts
.wasSetByUser(options::repeatSimp
))
806 bool repeatSimp
= !logic
.isQuantified()
807 && (logic
.isTheoryEnabled(THEORY_ARRAYS
)
808 && logic
.isTheoryEnabled(THEORY_UF
)
809 && logic
.isTheoryEnabled(THEORY_BV
))
811 Trace("smt") << "setting repeat simplification to " << repeatSimp
813 opts
.set(options::repeatSimp
, repeatSimp
);
816 if (options::boolToBitvector() == options::BoolToBVMode::ALL
817 && !logic
.isTheoryEnabled(THEORY_BV
))
819 if (opts
.wasSetByUser(options::boolToBitvector
))
821 throw OptionException(
822 "bool-to-bv=all not supported for non-bitvector logics.");
824 Notice() << "SmtEngine: turning off bool-to-bv for non-bv logic: "
825 << logic
.getLogicString() << std::endl
;
826 opts
.set(options::boolToBitvector
, options::BoolToBVMode::OFF
);
829 if (!opts
.wasSetByUser(options::bvEagerExplanations
)
830 && logic
.isTheoryEnabled(THEORY_ARRAYS
)
831 && logic
.isTheoryEnabled(THEORY_BV
))
833 Trace("smt") << "enabling eager bit-vector explanations " << std::endl
;
834 opts
.set(options::bvEagerExplanations
, true);
837 // Turn on arith rewrite equalities only for pure arithmetic
838 if (!opts
.wasSetByUser(options::arithRewriteEq
))
840 bool arithRewriteEq
=
841 logic
.isPure(THEORY_ARITH
) && logic
.isLinear() && !logic
.isQuantified();
842 Trace("smt") << "setting arith rewrite equalities " << arithRewriteEq
844 opts
.set(options::arithRewriteEq
, arithRewriteEq
);
846 if (!opts
.wasSetByUser(options::arithHeuristicPivots
))
848 int16_t heuristicPivots
= 5;
849 if (logic
.isPure(THEORY_ARITH
) && !logic
.isQuantified())
851 if (logic
.isDifferenceLogic())
853 heuristicPivots
= -1;
855 else if (!logic
.areIntegersUsed())
860 Trace("smt") << "setting arithHeuristicPivots " << heuristicPivots
862 opts
.set(options::arithHeuristicPivots
, heuristicPivots
);
864 if (!opts
.wasSetByUser(options::arithPivotThreshold
))
866 uint16_t pivotThreshold
= 2;
867 if (logic
.isPure(THEORY_ARITH
) && !logic
.isQuantified())
869 if (logic
.isDifferenceLogic())
874 Trace("smt") << "setting arith arithPivotThreshold " << pivotThreshold
876 opts
.set(options::arithPivotThreshold
, pivotThreshold
);
878 if (!opts
.wasSetByUser(options::arithStandardCheckVarOrderPivots
))
880 int16_t varOrderPivots
= -1;
881 if (logic
.isPure(THEORY_ARITH
) && !logic
.isQuantified())
883 varOrderPivots
= 200;
885 Trace("smt") << "setting arithStandardCheckVarOrderPivots "
886 << varOrderPivots
<< std::endl
;
887 opts
.set(options::arithStandardCheckVarOrderPivots
, varOrderPivots
);
889 if (logic
.isPure(THEORY_ARITH
) && !logic
.areRealsUsed())
891 if (!opts
.wasSetByUser(options::nlExtTangentPlanesInterleave
))
893 Trace("smt") << "setting nlExtTangentPlanesInterleave to true"
895 opts
.set(options::nlExtTangentPlanesInterleave
, true);
899 // Set decision mode based on logic (if not set by user)
900 if (!opts
.wasSetByUser(options::decisionMode
))
902 options::DecisionMode decMode
=
903 // anything that uses sygus uses internal
904 usesSygus
? options::DecisionMode::INTERNAL
:
906 logic
.hasEverything()
907 ? options::DecisionMode::JUSTIFICATION
909 (not logic
.isQuantified() && logic
.isPure(THEORY_BV
)) ||
910 // QF_AUFBV or QF_ABV or QF_UFBV
911 (not logic
.isQuantified()
912 && (logic
.isTheoryEnabled(THEORY_ARRAYS
)
913 || logic
.isTheoryEnabled(THEORY_UF
))
914 && logic
.isTheoryEnabled(THEORY_BV
))
916 // QF_AUFLIA (and may be ends up enabling
918 (not logic
.isQuantified()
919 && logic
.isTheoryEnabled(THEORY_ARRAYS
)
920 && logic
.isTheoryEnabled(THEORY_UF
)
921 && logic
.isTheoryEnabled(THEORY_ARITH
))
924 (not logic
.isQuantified()
925 && logic
.isPure(THEORY_ARITH
) && logic
.isLinear()
926 && !logic
.isDifferenceLogic()
927 && !logic
.areIntegersUsed())
930 logic
.isQuantified() ||
932 logic
.isTheoryEnabled(THEORY_STRINGS
)
933 ? options::DecisionMode::JUSTIFICATION
934 : options::DecisionMode::INTERNAL
);
938 logic
.hasEverything() || logic
.isTheoryEnabled(THEORY_STRINGS
)
941 (not logic
.isQuantified()
942 && logic
.isTheoryEnabled(THEORY_ARRAYS
)
943 && logic
.isTheoryEnabled(THEORY_UF
)
944 && logic
.isTheoryEnabled(THEORY_ARITH
))
947 (not logic
.isQuantified()
948 && logic
.isPure(THEORY_ARITH
) && logic
.isLinear()
949 && !logic
.isDifferenceLogic()
950 && !logic
.areIntegersUsed())
954 Trace("smt") << "setting decision mode to " << decMode
<< std::endl
;
955 opts
.set(options::decisionMode
, decMode
);
956 opts
.set(options::decisionStopOnly
, stoponly
);
958 if (options::incrementalSolving())
960 // disable modes not supported by incremental
961 opts
.set(options::sortInference
, false);
962 opts
.set(options::ufssFairnessMonotone
, false);
963 opts
.set(options::globalNegate
, false);
964 opts
.set(options::bvAbstraction
, false);
965 opts
.set(options::arithMLTrick
, false);
967 if (logic
.hasCardinalityConstraints())
969 // must have finite model finding on
970 opts
.set(options::finiteModelFind
, true);
973 if (options::instMaxLevel() != -1)
975 Notice() << "SmtEngine: turning off cbqi to support instMaxLevel"
977 opts
.set(options::cegqi
, false);
980 if ((opts
.wasSetByUser(options::fmfBoundLazy
) && options::fmfBoundLazy())
981 || (opts
.wasSetByUser(options::fmfBoundInt
) && options::fmfBoundInt()))
983 opts
.set(options::fmfBound
, true);
985 // now have determined whether fmfBoundInt is on/off
986 // apply fmfBoundInt options
987 if (options::fmfBound())
989 if (!opts
.wasSetByUser(options::mbqiMode
)
990 || (options::mbqiMode() != options::MbqiMode::NONE
991 && options::mbqiMode() != options::MbqiMode::FMC
))
993 // if bounded integers are set, use no MBQI by default
994 opts
.set(options::mbqiMode
, options::MbqiMode::NONE
);
996 if (!opts
.wasSetByUser(options::prenexQuant
))
998 opts
.set(options::prenexQuant
, options::PrenexQuantMode::NONE
);
1001 if (options::ufHo())
1003 // if higher-order, then current variants of model-based instantiation
1005 if (options::mbqiMode() != options::MbqiMode::NONE
)
1007 opts
.set(options::mbqiMode
, options::MbqiMode::NONE
);
1009 if (!opts
.wasSetByUser(options::hoElimStoreAx
))
1011 // by default, use store axioms only if --ho-elim is set
1012 opts
.set(options::hoElimStoreAx
, options::hoElim());
1014 if (!options::assignFunctionValues())
1016 // must assign function values
1017 opts
.set(options::assignFunctionValues
, true);
1019 // Cannot use macros, since lambda lifting and macro elimination are inverse
1021 if (options::macrosQuant())
1023 opts
.set(options::macrosQuant
, false);
1026 if (options::fmfFunWellDefinedRelevant())
1028 if (!opts
.wasSetByUser(options::fmfFunWellDefined
))
1030 opts
.set(options::fmfFunWellDefined
, true);
1033 if (options::fmfFunWellDefined())
1035 if (!opts
.wasSetByUser(options::finiteModelFind
))
1037 opts
.set(options::finiteModelFind
, true);
1041 // now, have determined whether finite model find is on/off
1042 // apply finite model finding options
1043 if (options::finiteModelFind())
1045 // apply conservative quantifiers splitting
1046 if (!opts
.wasSetByUser(options::quantDynamicSplit
))
1048 opts
.set(options::quantDynamicSplit
, options::QuantDSplitMode::DEFAULT
);
1050 if (!opts
.wasSetByUser(options::eMatching
))
1052 opts
.set(options::eMatching
, options::fmfInstEngine());
1054 if (!opts
.wasSetByUser(options::instWhenMode
))
1056 // instantiate only on last call
1057 if (options::eMatching())
1059 opts
.set(options::instWhenMode
, options::InstWhenMode::LAST_CALL
);
1064 // apply sygus options
1065 // if we are attempting to rewrite everything to SyGuS, use sygus()
1068 if (!options::sygus())
1070 Trace("smt") << "turning on sygus" << std::endl
;
1072 opts
.set(options::sygus
, true);
1073 // must use Ferrante/Rackoff for real arithmetic
1074 if (!opts
.wasSetByUser(options::cegqiMidpoint
))
1076 opts
.set(options::cegqiMidpoint
, true);
1078 // must disable cegqi-bv since it may introduce witness terms, which
1079 // cannot appear in synthesis solutions
1080 if (!opts
.wasSetByUser(options::cegqiBv
))
1082 opts
.set(options::cegqiBv
, false);
1084 if (options::sygusRepairConst())
1086 if (!opts
.wasSetByUser(options::cegqi
))
1088 opts
.set(options::cegqi
, true);
1091 if (options::sygusInference())
1093 // optimization: apply preskolemization, makes it succeed more often
1094 if (!opts
.wasSetByUser(options::preSkolemQuant
))
1096 opts
.set(options::preSkolemQuant
, true);
1098 if (!opts
.wasSetByUser(options::preSkolemQuantNested
))
1100 opts
.set(options::preSkolemQuantNested
, true);
1103 // counterexample-guided instantiation for sygus
1104 if (!opts
.wasSetByUser(options::cegqiSingleInvMode
))
1106 opts
.set(options::cegqiSingleInvMode
, options::CegqiSingleInvMode::USE
);
1108 if (!opts
.wasSetByUser(options::quantConflictFind
))
1110 opts
.set(options::quantConflictFind
, false);
1112 if (!opts
.wasSetByUser(options::instNoEntail
))
1114 opts
.set(options::instNoEntail
, false);
1116 if (!opts
.wasSetByUser(options::cegqiFullEffort
))
1118 // should use full effort cbqi for single invocation and repair const
1119 opts
.set(options::cegqiFullEffort
, true);
1121 if (options::sygusRew())
1123 opts
.set(options::sygusRewSynth
, true);
1124 opts
.set(options::sygusRewVerify
, true);
1126 if (options::sygusRewSynthInput())
1128 // If we are using synthesis rewrite rules from input, we use
1129 // sygusRewSynth after preprocessing. See passes/synth_rew_rules.h for
1130 // details on this technique.
1131 opts
.set(options::sygusRewSynth
, true);
1132 // we should not use the extended rewriter, since we are interested
1133 // in rewrites that are not in the main rewriter
1134 if (!opts
.wasSetByUser(options::sygusExtRew
))
1136 opts
.set(options::sygusExtRew
, false);
1139 // Whether we must use "basic" sygus algorithms. A non-basic sygus algorithm
1140 // is one that is specialized for returning a single solution. Non-basic
1141 // sygus algorithms currently include the PBE solver, UNIF+PI, static
1142 // template inference for invariant synthesis, and single invocation
1144 bool reqBasicSygus
= false;
1145 if (options::produceAbducts())
1147 // if doing abduction, we should filter strong solutions
1148 if (!opts
.wasSetByUser(options::sygusFilterSolMode
))
1150 opts
.set(options::sygusFilterSolMode
, options::SygusFilterSolMode::STRONG
);
1152 // we must use basic sygus algorithms, since e.g. we require checking
1153 // a sygus side condition for consistency with axioms.
1154 reqBasicSygus
= true;
1156 if (options::sygusRewSynth() || options::sygusRewVerify()
1157 || options::sygusQueryGen())
1159 // rewrite rule synthesis implies that sygus stream must be true
1160 opts
.set(options::sygusStream
, true);
1162 if (options::sygusStream() || options::incrementalSolving())
1164 // Streaming and incremental mode are incompatible with techniques that
1165 // focus the search towards finding a single solution.
1166 reqBasicSygus
= true;
1168 // Now, disable options for non-basic sygus algorithms, if necessary.
1171 if (!opts
.wasSetByUser(options::sygusUnifPbe
))
1173 opts
.set(options::sygusUnifPbe
, false);
1175 if (opts
.wasSetByUser(options::sygusUnifPi
))
1177 opts
.set(options::sygusUnifPi
, options::SygusUnifPiMode::NONE
);
1179 if (!opts
.wasSetByUser(options::sygusInvTemplMode
))
1181 opts
.set(options::sygusInvTemplMode
, options::SygusInvTemplMode::NONE
);
1183 if (!opts
.wasSetByUser(options::cegqiSingleInvMode
))
1185 opts
.set(options::cegqiSingleInvMode
, options::CegqiSingleInvMode::NONE
);
1188 if (!opts
.wasSetByUser(options::dtRewriteErrorSel
))
1190 opts
.set(options::dtRewriteErrorSel
, true);
1193 if (!opts
.wasSetByUser(options::miniscopeQuant
))
1195 opts
.set(options::miniscopeQuant
, false);
1197 if (!opts
.wasSetByUser(options::miniscopeQuantFreeVar
))
1199 opts
.set(options::miniscopeQuantFreeVar
, false);
1201 if (!opts
.wasSetByUser(options::quantSplit
))
1203 opts
.set(options::quantSplit
, false);
1206 if (!opts
.wasSetByUser(options::macrosQuant
))
1208 opts
.set(options::macrosQuant
, false);
1210 // use tangent planes by default, since we want to put effort into
1211 // the verification step for sygus queries with non-linear arithmetic
1212 if (!opts
.wasSetByUser(options::nlExtTangentPlanes
))
1214 opts
.set(options::nlExtTangentPlanes
, true);
1217 // counterexample-guided instantiation for non-sygus
1218 // enable if any possible quantifiers with arithmetic, datatypes or bitvectors
1219 if ((logic
.isQuantified()
1220 && (logic
.isTheoryEnabled(THEORY_ARITH
)
1221 || logic
.isTheoryEnabled(THEORY_DATATYPES
)
1222 || logic
.isTheoryEnabled(THEORY_BV
)
1223 || logic
.isTheoryEnabled(THEORY_FP
)))
1224 || options::cegqiAll())
1226 if (!opts
.wasSetByUser(options::cegqi
))
1228 opts
.set(options::cegqi
, true);
1230 // check whether we should apply full cbqi
1231 if (logic
.isPure(THEORY_BV
))
1233 if (!opts
.wasSetByUser(options::cegqiFullEffort
))
1235 opts
.set(options::cegqiFullEffort
, true);
1239 if (options::cegqi())
1241 if (options::incrementalSolving())
1243 // cannot do nested quantifier elimination in incremental mode
1244 opts
.set(options::cegqiNestedQE
, false);
1246 if (logic
.isPure(THEORY_ARITH
) || logic
.isPure(THEORY_BV
))
1248 if (!opts
.wasSetByUser(options::quantConflictFind
))
1250 opts
.set(options::quantConflictFind
, false);
1252 if (!opts
.wasSetByUser(options::instNoEntail
))
1254 opts
.set(options::instNoEntail
, false);
1256 if (!opts
.wasSetByUser(options::instWhenMode
) && options::cegqiModel())
1258 // only instantiation should happen at last call when model is avaiable
1259 opts
.set(options::instWhenMode
, options::InstWhenMode::LAST_CALL
);
1264 // only supported in pure arithmetic or pure BV
1265 opts
.set(options::cegqiNestedQE
, false);
1267 if (options::globalNegate())
1269 if (!opts
.wasSetByUser(options::prenexQuant
))
1271 opts
.set(options::prenexQuant
, options::PrenexQuantMode::NONE
);
1275 // implied options...
1276 if (options::strictTriggers())
1278 if (!opts
.wasSetByUser(options::userPatternsQuant
))
1280 opts
.set(options::userPatternsQuant
, options::UserPatMode::TRUST
);
1283 if (opts
.wasSetByUser(options::qcfMode
) || options::qcfTConstraint())
1285 opts
.set(options::quantConflictFind
, true);
1287 if (options::cegqiNestedQE())
1289 opts
.set(options::prenexQuantUser
, true);
1290 if (!opts
.wasSetByUser(options::preSkolemQuant
))
1292 opts
.set(options::preSkolemQuant
, true);
1295 // for induction techniques
1296 if (options::quantInduction())
1298 if (!opts
.wasSetByUser(options::dtStcInduction
))
1300 opts
.set(options::dtStcInduction
, true);
1302 if (!opts
.wasSetByUser(options::intWfInduction
))
1304 opts
.set(options::intWfInduction
, true);
1307 if (options::dtStcInduction())
1309 // try to remove ITEs from quantified formulas
1310 if (!opts
.wasSetByUser(options::iteDtTesterSplitQuant
))
1312 opts
.set(options::iteDtTesterSplitQuant
, true);
1314 if (!opts
.wasSetByUser(options::iteLiftQuant
))
1316 opts
.set(options::iteLiftQuant
, options::IteLiftQuantMode::ALL
);
1319 if (options::intWfInduction())
1321 if (!opts
.wasSetByUser(options::purifyTriggers
))
1323 opts
.set(options::purifyTriggers
, true);
1326 if (options::conjectureNoFilter())
1328 if (!opts
.wasSetByUser(options::conjectureFilterActiveTerms
))
1330 opts
.set(options::conjectureFilterActiveTerms
, false);
1332 if (!opts
.wasSetByUser(options::conjectureFilterCanonical
))
1334 opts
.set(options::conjectureFilterCanonical
, false);
1336 if (!opts
.wasSetByUser(options::conjectureFilterModel
))
1338 opts
.set(options::conjectureFilterModel
, false);
1341 if (opts
.wasSetByUser(options::conjectureGenPerRound
))
1343 if (options::conjectureGenPerRound() > 0)
1345 opts
.set(options::conjectureGen
, true);
1349 opts
.set(options::conjectureGen
, false);
1352 // can't pre-skolemize nested quantifiers without UF theory
1353 if (!logic
.isTheoryEnabled(THEORY_UF
) && options::preSkolemQuant())
1355 if (!opts
.wasSetByUser(options::preSkolemQuantNested
))
1357 opts
.set(options::preSkolemQuantNested
, false);
1360 if (!logic
.isTheoryEnabled(THEORY_DATATYPES
))
1362 opts
.set(options::quantDynamicSplit
, options::QuantDSplitMode::NONE
);
1365 // until bugs 371,431 are fixed
1366 if (!opts
.wasSetByUser(options::minisatUseElim
))
1368 // cannot use minisat elimination for logics where a theory solver
1369 // introduces new literals into the search. This includes quantifiers
1370 // (quantifier instantiation), and the lemma schemas used in non-linear
1371 // and sets. We also can't use it if models are enabled.
1372 if (logic
.isTheoryEnabled(THEORY_SETS
)
1373 || logic
.isTheoryEnabled(THEORY_BAGS
)
1374 || logic
.isQuantified()
1375 || options::produceModels() || options::produceAssignments()
1376 || options::checkModels()
1377 || (logic
.isTheoryEnabled(THEORY_ARITH
) && !logic
.isLinear()))
1379 opts
.set(options::minisatUseElim
, false);
1383 if (logic
.isTheoryEnabled(THEORY_ARITH
) && !logic
.isLinear()
1384 && options::nlRlvMode() != options::NlRlvMode::NONE
)
1386 if (!options::relevanceFilter())
1388 if (opts
.wasSetByUser(options::relevanceFilter
))
1390 Warning() << "SmtEngine: turning on relevance filtering to support "
1392 << options::nlRlvMode() << std::endl
;
1394 // must use relevance filtering techniques
1395 opts
.set(options::relevanceFilter
, true);
1399 // For now, these array theory optimizations do not support model-building
1400 if (options::produceModels() || options::produceAssignments()
1401 || options::checkModels())
1403 opts
.set(options::arraysOptimizeLinear
, false);
1406 if (!options::bitvectorEqualitySolver())
1408 if (options::bvLazyRewriteExtf())
1410 if (opts
.wasSetByUser(options::bvLazyRewriteExtf
))
1412 throw OptionException(
1413 "--bv-lazy-rewrite-extf requires --bv-eq-solver to be set");
1417 << "disabling bvLazyRewriteExtf since equality solver is disabled"
1419 opts
.set(options::bvLazyRewriteExtf
, false);
1422 if (options::stringFMF() && !opts
.wasSetByUser(options::stringProcessLoopMode
))
1424 Trace("smt") << "settting stringProcessLoopMode to 'simple' since "
1425 "--strings-fmf enabled"
1427 opts
.set(options::stringProcessLoopMode
, options::ProcessLoopMode::SIMPLE
);
1430 // !!! All options that require disabling models go here
1431 bool disableModels
= false;
1432 std::string sOptNoModel
;
1433 if (opts
.wasSetByUser(options::unconstrainedSimp
) && options::unconstrainedSimp())
1435 disableModels
= true;
1436 sOptNoModel
= "unconstrained-simp";
1438 else if (options::sortInference())
1440 disableModels
= true;
1441 sOptNoModel
= "sort-inference";
1443 else if (options::minisatUseElim())
1445 disableModels
= true;
1446 sOptNoModel
= "minisat-elimination";
1448 else if (options::globalNegate())
1450 disableModels
= true;
1451 sOptNoModel
= "global-negate";
1455 if (options::produceModels())
1457 if (opts
.wasSetByUser(options::produceModels
))
1459 std::stringstream ss
;
1460 ss
<< "Cannot use " << sOptNoModel
<< " with model generation.";
1461 throw OptionException(ss
.str());
1463 Notice() << "SmtEngine: turning off produce-models to support "
1464 << sOptNoModel
<< std::endl
;
1465 opts
.set(options::produceModels
, false);
1467 if (options::produceAssignments())
1469 if (opts
.wasSetByUser(options::produceAssignments
))
1471 std::stringstream ss
;
1472 ss
<< "Cannot use " << sOptNoModel
1473 << " with model generation (produce-assignments).";
1474 throw OptionException(ss
.str());
1476 Notice() << "SmtEngine: turning off produce-assignments to support "
1477 << sOptNoModel
<< std::endl
;
1478 opts
.set(options::produceAssignments
, false);
1480 if (options::checkModels())
1482 if (opts
.wasSetByUser(options::checkModels
))
1484 std::stringstream ss
;
1485 ss
<< "Cannot use " << sOptNoModel
1486 << " with model generation (check-models).";
1487 throw OptionException(ss
.str());
1489 Notice() << "SmtEngine: turning off check-models to support "
1490 << sOptNoModel
<< std::endl
;
1491 opts
.set(options::checkModels
, false);
1495 if (options::bitblastMode() == options::BitblastMode::EAGER
1496 && !logic
.isPure(THEORY_BV
) && logic
.getLogicString() != "QF_UFBV"
1497 && logic
.getLogicString() != "QF_ABV")
1499 throw OptionException(
1500 "Eager bit-blasting does not currently support theory combination. "
1501 "Note that in a QF_BV problem UF symbols can be introduced for "
1503 "Try --bv-div-zero-const to interpret division by zero as a constant.");
1506 if (logic
== LogicInfo("QF_UFNRA"))
1508 #ifdef CVC5_USE_POLY
1509 if (!options::nlCad() && !opts
.wasSetByUser(options::nlCad
))
1511 opts
.set(options::nlCad
, true);
1512 if (!opts
.wasSetByUser(options::nlExt
))
1514 opts
.set(options::nlExt
, options::NlExtMode::LIGHT
);
1516 if (!opts
.wasSetByUser(options::nlRlvMode
))
1518 opts
.set(options::nlRlvMode
, options::NlRlvMode::INTERLEAVE
);
1523 #ifndef CVC5_USE_POLY
1524 if (options::nlCad())
1526 if (opts
.wasSetByUser(options::nlCad
))
1528 std::stringstream ss
;
1529 ss
<< "Cannot use " << options::nlCad
.name
<< " without configuring with --poly.";
1530 throw OptionException(ss
.str());
1534 Notice() << "Cannot use --" << options::nlCad
.name
1535 << " without configuring with --poly." << std::endl
;
1536 opts
.set(options::nlCad
, false);
1537 opts
.set(options::nlExt
, options::NlExtMode::FULL
);