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
.smt
.checkModels
= true;
58 if (options::checkModels() || options::dumpModels())
60 opts
.smt
.produceModels
= true;
62 if (options::checkModels())
64 opts
.smt
.produceAssignments
= true;
66 // unsat cores and proofs shenanigans
67 if (options::dumpUnsatCoresFull())
69 opts
.driver
.dumpUnsatCores
= true;
71 if (options::checkUnsatCores() || options::dumpUnsatCores()
72 || options::unsatAssumptions() || options::minimalUnsatCores()
73 || options::unsatCoresMode() != options::UnsatCoresMode::OFF
)
75 opts
.smt
.unsatCores
= true;
77 if (options::unsatCores()
78 && options::unsatCoresMode() == options::UnsatCoresMode::OFF
)
80 if (opts
.smt
.unsatCoresModeWasSetByUser
)
83 << "Overriding OFF unsat-core mode since cores were requested.\n";
85 opts
.smt
.unsatCoresMode
= options::UnsatCoresMode::ASSUMPTIONS
;
88 if (options::checkProofs() || options::dumpProofs())
90 opts
.smt
.produceProofs
= true;
93 if (options::produceProofs()
94 && options::unsatCoresMode() != options::UnsatCoresMode::FULL_PROOF
)
96 if (opts
.smt
.unsatCoresModeWasSetByUser
)
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
.smt
.unsatCores
= true;
103 opts
.smt
.unsatCoresMode
= options::UnsatCoresMode::FULL_PROOF
;
106 // set proofs on if not yet set
107 if (options::unsatCores() && !options::produceProofs())
109 if (opts
.smt
.produceProofsWasSetByUser
)
112 << "Forcing proof production since new unsat cores were requested.\n";
114 opts
.smt
.produceProofs
= true;
117 // if unsat cores are disabled, then unsat cores mode should be OFF
118 Assert(options::unsatCores()
119 == (options::unsatCoresMode() != options::UnsatCoresMode::OFF
));
121 if (opts
.bv
.bitvectorAigSimplificationsWasSetByUser
)
123 Notice() << "SmtEngine: setting bitvectorAig" << std::endl
;
124 opts
.bv
.bitvectorAig
= true;
126 if (opts
.bv
.bitvectorAlgebraicBudgetWasSetByUser
)
128 Notice() << "SmtEngine: setting bitvectorAlgebraicSolver" << std::endl
;
129 opts
.bv
.bitvectorAlgebraicSolver
= true;
132 bool isSygus
= language::isInputLangSygus(options::inputLanguage());
133 bool usesSygus
= isSygus
;
135 if (options::bitblastMode() == options::BitblastMode::EAGER
)
137 if (options::produceModels()
138 && (logic
.isTheoryEnabled(THEORY_ARRAYS
)
139 || logic
.isTheoryEnabled(THEORY_UF
)))
141 if (opts
.bv
.bitblastModeWasSetByUser
142 || opts
.smt
.produceModelsWasSetByUser
)
144 throw OptionException(std::string(
145 "Eager bit-blasting currently does not support model generation "
146 "for the combination of bit-vectors with arrays or uinterpreted "
147 "functions. Try --bitblast=lazy"));
149 Notice() << "SmtEngine: setting bit-blast mode to lazy to support model"
150 << "generation" << std::endl
;
151 opts
.bv
.bitblastMode
= options::BitblastMode::LAZY
;
153 else if (!options::incrementalSolving())
155 opts
.smt
.ackermann
= true;
158 if (options::incrementalSolving() && !logic
.isPure(THEORY_BV
))
160 throw OptionException(
161 "Incremental eager bit-blasting is currently "
162 "only supported for QF_BV. Try --bitblast=lazy.");
166 /* Disable bit-level propagation by default for the BITBLAST solver. */
167 if (options::bvSolver() == options::BVSolver::BITBLAST
)
169 opts
.bv
.bitvectorPropagate
= false;
172 if (options::solveIntAsBV() > 0)
174 // not compatible with incremental
175 if (options::incrementalSolving())
177 throw OptionException(
178 "solving integers as bitvectors is currently not supported "
179 "when solving incrementally.");
181 // Int to BV currently always eliminates arithmetic completely (or otherwise
182 // fails). Thus, it is safe to eliminate arithmetic. Also, bit-vectors
184 logic
= logic
.getUnlockedCopy();
185 logic
.enableTheory(THEORY_BV
);
186 logic
.disableTheory(THEORY_ARITH
);
190 if (options::solveBVAsInt() != options::SolveBVAsIntMode::OFF
)
192 if (options::boolToBitvector() != options::BoolToBVMode::OFF
)
194 throw OptionException(
195 "solving bitvectors as integers is incompatible with --bool-to-bv.");
197 if (options::BVAndIntegerGranularity() > 8)
200 * The granularity sets the size of the ITE in each element
201 * of the sum that is generated for bitwise operators.
202 * The size of the ITE is 2^{2*granularity}.
203 * Since we don't want to introduce ITEs with unbounded size,
204 * we bound the granularity.
206 throw OptionException("solve-bv-as-int accepts values from 0 to 8.");
208 if (logic
.isTheoryEnabled(THEORY_BV
))
210 logic
= logic
.getUnlockedCopy();
211 logic
.enableTheory(THEORY_ARITH
);
212 logic
.arithNonLinear();
217 // set options about ackermannization
218 if (options::ackermann() && options::produceModels()
219 && (logic
.isTheoryEnabled(THEORY_ARRAYS
)
220 || logic
.isTheoryEnabled(THEORY_UF
)))
222 if (opts
.smt
.produceModelsWasSetByUser
)
224 throw OptionException(std::string(
225 "Ackermannization currently does not support model generation."));
227 Notice() << "SmtEngine: turn off ackermannization to support model"
228 << "generation" << std::endl
;
229 opts
.smt
.ackermann
= false;
232 if (options::ackermann())
234 if (options::incrementalSolving())
236 throw OptionException(
237 "Incremental Ackermannization is currently not supported.");
240 if (logic
.isQuantified())
242 throw LogicException("Cannot use Ackermannization on quantified formula");
245 if (logic
.isTheoryEnabled(THEORY_UF
))
247 logic
= logic
.getUnlockedCopy();
248 logic
.disableTheory(THEORY_UF
);
251 if (logic
.isTheoryEnabled(THEORY_ARRAYS
))
253 logic
= logic
.getUnlockedCopy();
254 logic
.disableTheory(THEORY_ARRAYS
);
259 // --ite-simp is an experimental option designed for QF_LIA/nec. This
260 // technique is experimental. This benchmark set also requires removing ITEs
261 // during preprocessing, before repeating simplification. Hence, we enable
263 if (options::doITESimp())
265 if (!opts
.smt
.earlyIteRemovalWasSetByUser
)
267 opts
.smt
.earlyIteRemoval
= true;
271 // Set default options associated with strings-exp. We also set these options
272 // if we are using eager string preprocessing, which may introduce quantified
273 // formulas at preprocess time.
275 // We don't want to set this option when we are in logics that contain ALL.
276 if (!logic
.hasEverything() && logic
.isTheoryEnabled(THEORY_STRINGS
))
278 // If the user explicitly set a logic that includes strings, but is not
279 // the generic "ALL" logic, then enable stringsExp.
280 opts
.strings
.stringExp
= true;
281 Trace("smt") << "Turning stringExp on since logic does not have everything "
282 "and string theory is enabled\n";
284 if (options::stringExp() || !options::stringLazyPreproc())
286 // We require quantifiers since extended functions reduce using them.
287 if (!logic
.isQuantified())
289 logic
= logic
.getUnlockedCopy();
290 logic
.enableQuantifiers();
292 Trace("smt") << "turning on quantifier logic, for strings-exp"
295 // Note we allow E-matching by default to support combinations of sequences
296 // and quantifiers. We also do not enable fmfBound here, which would
297 // enable bounded integer instantiation for *all* quantifiers. Instead,
298 // the bounded integers module will always process internally generated
299 // quantifiers (those marked with InternalQuantAttribute).
301 // whether we must disable proofs
302 bool disableProofs
= false;
303 if (options::globalNegate())
305 // When global negate answers "unsat", it is not due to showing a set of
306 // formulas is unsat. Thus, proofs do not apply.
307 disableProofs
= true;
310 // new unsat core specific restrictions for proofs
311 if (options::unsatCores()
312 && options::unsatCoresMode() != options::UnsatCoresMode::FULL_PROOF
)
314 // no fine-graininess
315 if (!opts
.proof
.proofGranularityModeWasSetByUser
)
317 opts
.proof
.proofGranularityMode
= options::ProofGranularityMode::OFF
;
321 if (options::arraysExp())
323 if (!logic
.isQuantified())
325 logic
= logic
.getUnlockedCopy();
326 logic
.enableQuantifiers();
329 // Allows to answer sat more often by default.
330 if (!opts
.quantifiers
.fmfBoundWasSetByUser
)
332 opts
.quantifiers
.fmfBound
= true;
333 Trace("smt") << "turning on fmf-bound, for arrays-exp" << std::endl
;
337 // sygus inference may require datatypes
338 if (!isInternalSubsolver
)
340 if (options::produceAbducts()
341 || options::produceInterpols() != options::ProduceInterpols::NONE
342 || options::sygusInference() || options::sygusRewSynthInput())
344 // since we are trying to recast as sygus, we assume the input is sygus
348 else if (options::sygusInst())
350 // sygus instantiation uses sygus, but it is not a sygus problem
355 // We now know whether the input uses sygus. Update the logic to incorporate
356 // the theories we need internally for handling sygus problems.
359 logic
= logic
.getUnlockedCopy();
364 // When sygus answers "unsat", it is not due to showing a set of
365 // formulas is unsat in the standard way. Thus, proofs do not apply.
366 disableProofs
= true;
370 // if we requiring disabling proofs, disable them now
371 if (disableProofs
&& options::produceProofs())
373 opts
.smt
.unsatCores
= false;
374 opts
.smt
.unsatCoresMode
= options::UnsatCoresMode::OFF
;
375 if (options::produceProofs())
377 Notice() << "SmtEngine: turning off produce-proofs." << std::endl
;
379 opts
.smt
.produceProofs
= false;
380 opts
.smt
.checkProofs
= false;
381 opts
.proof
.proofEagerChecking
= false;
384 // sygus core connective requires unsat cores
385 if (options::sygusCoreConnective())
387 opts
.smt
.unsatCores
= true;
388 if (options::unsatCoresMode() == options::UnsatCoresMode::OFF
)
390 opts
.smt
.unsatCoresMode
= options::UnsatCoresMode::ASSUMPTIONS
;
394 if ((options::checkModels() || options::checkSynthSol()
395 || options::produceAbducts()
396 || options::produceInterpols() != options::ProduceInterpols::NONE
397 || options::modelCoresMode() != options::ModelCoresMode::NONE
398 || options::blockModelsMode() != options::BlockModelsMode::NONE
399 || options::produceProofs())
400 && !options::produceAssertions())
402 Notice() << "SmtEngine: turning on produce-assertions to support "
403 << "option requiring assertions." << std::endl
;
404 opts
.smt
.produceAssertions
= true;
407 if (options::bvAssertInput() && options::produceProofs())
409 Notice() << "Disabling bv-assert-input since it is incompatible with proofs."
411 opts
.bv
.bvAssertInput
= false;
414 // whether we want to force safe unsat cores, i.e., if we are in the default
415 // ASSUMPTIONS mode, since other ones are experimental
416 bool safeUnsatCores
=
417 options::unsatCoresMode() == options::UnsatCoresMode::ASSUMPTIONS
;
419 // Disable options incompatible with incremental solving, unsat cores or
420 // output an error if enabled explicitly. It is also currently incompatible
421 // with arithmetic, force the option off.
422 if (options::incrementalSolving() || safeUnsatCores
)
424 if (options::unconstrainedSimp())
426 if (opts
.smt
.unconstrainedSimpWasSetByUser
)
428 throw OptionException(
429 "unconstrained simplification not supported with old unsat "
430 "cores/incremental solving");
432 Notice() << "SmtEngine: turning off unconstrained simplification to "
433 "support old unsat cores/incremental solving"
435 opts
.smt
.unconstrainedSimp
= false;
440 // Turn on unconstrained simplification for QF_AUFBV
441 if (!opts
.smt
.unconstrainedSimpWasSetByUser
)
443 bool uncSimp
= !logic
.isQuantified() && !options::produceModels()
444 && !options::produceAssignments()
445 && !options::checkModels()
446 && logic
.isTheoryEnabled(THEORY_ARRAYS
)
447 && logic
.isTheoryEnabled(THEORY_BV
)
448 && !logic
.isTheoryEnabled(THEORY_ARITH
);
449 Trace("smt") << "setting unconstrained simplification to " << uncSimp
451 opts
.smt
.unconstrainedSimp
= uncSimp
;
455 if (options::incrementalSolving())
457 if (options::sygusInference())
459 if (opts
.quantifiers
.sygusInferenceWasSetByUser
)
461 throw OptionException(
462 "sygus inference not supported with incremental solving");
464 Notice() << "SmtEngine: turning off sygus inference to support "
465 "incremental solving"
467 opts
.quantifiers
.sygusInference
= false;
471 if (options::solveBVAsInt() != options::SolveBVAsIntMode::OFF
)
474 * Operations on 1 bits are better handled as Boolean operations
475 * than as integer operations.
476 * Therefore, we enable bv-to-bool, which runs before
477 * the translation to integers.
479 opts
.bv
.bitvectorToBool
= true;
482 // Disable options incompatible with unsat cores or output an error if enabled
486 if (options::simplificationMode() != options::SimplificationMode::NONE
)
488 if (opts
.smt
.simplificationModeWasSetByUser
)
490 throw OptionException(
491 "simplification not supported with old unsat cores");
493 Notice() << "SmtEngine: turning off simplification to support unsat "
496 opts
.smt
.simplificationMode
= options::SimplificationMode::NONE
;
499 if (options::learnedRewrite())
501 if (opts
.smt
.learnedRewriteWasSetByUser
)
503 throw OptionException(
504 "learned rewrites not supported with unsat cores");
506 Notice() << "SmtEngine: turning off learned rewrites to support "
508 opts
.smt
.learnedRewrite
= false;
511 if (options::pbRewrites())
513 if (opts
.arith
.pbRewritesWasSetByUser
)
515 throw OptionException(
516 "pseudoboolean rewrites not supported with unsat cores");
518 Notice() << "SmtEngine: turning off pseudoboolean rewrites to support "
520 opts
.arith
.pbRewrites
= false;
523 if (options::sortInference())
525 if (opts
.smt
.sortInferenceWasSetByUser
)
527 throw OptionException("sort inference not supported with unsat cores");
529 Notice() << "SmtEngine: turning off sort inference to support unsat "
531 opts
.smt
.sortInference
= false;
534 if (options::preSkolemQuant())
536 if (opts
.quantifiers
.preSkolemQuantWasSetByUser
)
538 throw OptionException(
539 "pre-skolemization not supported with unsat cores");
541 Notice() << "SmtEngine: turning off pre-skolemization to support "
543 opts
.quantifiers
.preSkolemQuant
= false;
546 if (options::bitvectorToBool())
548 if (opts
.bv
.bitvectorToBoolWasSetByUser
)
550 throw OptionException("bv-to-bool not supported with unsat cores");
552 Notice() << "SmtEngine: turning off bitvector-to-bool to support "
554 opts
.bv
.bitvectorToBool
= false;
557 if (options::boolToBitvector() != options::BoolToBVMode::OFF
)
559 if (opts
.bv
.boolToBitvectorWasSetByUser
)
561 throw OptionException(
562 "bool-to-bv != off not supported with unsat cores");
564 Notice() << "SmtEngine: turning off bool-to-bv to support unsat cores\n";
565 opts
.bv
.boolToBitvector
= options::BoolToBVMode::OFF
;
568 if (options::bvIntroducePow2())
570 if (opts
.bv
.bvIntroducePow2WasSetByUser
)
572 throw OptionException("bv-intro-pow2 not supported with unsat cores");
574 Notice() << "SmtEngine: turning off bv-intro-pow2 to support unsat cores";
575 opts
.bv
.bvIntroducePow2
= false;
578 if (options::repeatSimp())
580 if (opts
.smt
.repeatSimpWasSetByUser
)
582 throw OptionException("repeat-simp not supported with unsat cores");
584 Notice() << "SmtEngine: turning off repeat-simp to support unsat cores\n";
585 opts
.smt
.repeatSimp
= false;
588 if (options::globalNegate())
590 if (opts
.quantifiers
.globalNegateWasSetByUser
)
592 throw OptionException("global-negate not supported with unsat cores");
594 Notice() << "SmtEngine: turning off global-negate to support unsat "
596 opts
.quantifiers
.globalNegate
= false;
599 if (options::bitvectorAig())
601 throw OptionException("bitblast-aig not supported with unsat cores");
604 if (options::doITESimp())
606 throw OptionException("ITE simp not supported with unsat cores");
611 // by default, nonclausal simplification is off for QF_SAT
612 if (!opts
.smt
.simplificationModeWasSetByUser
)
614 bool qf_sat
= logic
.isPure(THEORY_BOOL
) && !logic
.isQuantified();
615 Trace("smt") << "setting simplification mode to <"
616 << logic
.getLogicString() << "> " << (!qf_sat
) << std::endl
;
617 // simplification=none works better for SMT LIB benchmarks with
618 // quantifiers, not others opts.set(options::simplificationMode, qf_sat ||
619 // quantifiers ? options::SimplificationMode::NONE :
620 // options::SimplificationMode::BATCH);
621 opts
.smt
.simplificationMode
= qf_sat
622 ? options::SimplificationMode::NONE
623 : options::SimplificationMode::BATCH
;
627 if (options::cegqiBv() && logic
.isQuantified())
629 if (options::boolToBitvector() != options::BoolToBVMode::OFF
)
631 if (opts
.bv
.boolToBitvectorWasSetByUser
)
633 throw OptionException(
634 "bool-to-bv != off not supported with CBQI BV for quantified "
637 Notice() << "SmtEngine: turning off bool-to-bitvector to support CBQI BV"
639 opts
.bv
.boolToBitvector
= options::BoolToBVMode::OFF
;
643 // cases where we need produce models
644 if (!options::produceModels()
645 && (options::produceAssignments() || options::sygusRewSynthCheck()
648 Notice() << "SmtEngine: turning on produce-models" << std::endl
;
649 opts
.smt
.produceModels
= true;
652 /////////////////////////////////////////////////////////////////////////////
655 // Some theories imply the use of other theories to handle certain operators,
656 // e.g. UF to handle partial functions.
657 /////////////////////////////////////////////////////////////////////////////
658 bool needsUf
= false;
659 // strings require LIA, UF; widen the logic
660 if (logic
.isTheoryEnabled(THEORY_STRINGS
))
662 LogicInfo
log(logic
.getUnlockedCopy());
663 // Strings requires arith for length constraints, and also UF
665 if (!logic
.isTheoryEnabled(THEORY_ARITH
) || logic
.isDifferenceLogic())
668 << "Enabling linear integer arithmetic because strings are enabled"
670 log
.enableTheory(THEORY_ARITH
);
671 log
.enableIntegers();
672 log
.arithOnlyLinear();
674 else if (!logic
.areIntegersUsed())
676 Notice() << "Enabling integer arithmetic because strings are enabled"
678 log
.enableIntegers();
683 if (options::bvAbstraction())
685 // bv abstraction may require UF
686 Notice() << "Enabling UF because bvAbstraction requires it." << std::endl
;
689 else if (options::preSkolemQuantNested()
690 && opts
.quantifiers
.preSkolemQuantNestedWasSetByUser
)
692 // if pre-skolem nested is explictly set, then we require UF. If it is
693 // not explicitly set, it is disabled below if UF is not present.
694 Notice() << "Enabling UF because preSkolemQuantNested requires it."
699 // Arrays, datatypes and sets permit Boolean terms and thus require UF
700 || logic
.isTheoryEnabled(THEORY_ARRAYS
)
701 || logic
.isTheoryEnabled(THEORY_DATATYPES
)
702 || logic
.isTheoryEnabled(THEORY_SETS
)
703 || logic
.isTheoryEnabled(THEORY_BAGS
)
704 // Non-linear arithmetic requires UF to deal with division/mod because
705 // their expansion introduces UFs for the division/mod-by-zero case.
706 // If we are eliminating non-linear arithmetic via solve-int-as-bv,
707 // then this is not required, since non-linear arithmetic will be
708 // eliminated altogether (or otherwise fail at preprocessing).
709 || (logic
.isTheoryEnabled(THEORY_ARITH
) && !logic
.isLinear()
710 && options::solveIntAsBV() == 0)
711 // FP requires UF since there are multiple operators that are partially
712 // defined (see http://smtlib.cs.uiowa.edu/papers/BTRW15.pdf for more
714 || logic
.isTheoryEnabled(THEORY_FP
))
716 if (!logic
.isTheoryEnabled(THEORY_UF
))
718 LogicInfo
log(logic
.getUnlockedCopy());
721 Notice() << "Enabling UF because " << logic
<< " requires it."
724 log
.enableTheory(THEORY_UF
);
729 if (options::arithMLTrick())
731 if (!logic
.areIntegersUsed())
734 LogicInfo
log(logic
.getUnlockedCopy());
735 Notice() << "Enabling integers because arithMLTrick requires it."
737 log
.enableIntegers();
742 /////////////////////////////////////////////////////////////////////////////
744 // Set the options for the theoryOf
745 if (!opts
.theory
.theoryOfModeWasSetByUser
)
747 if (logic
.isSharingEnabled() && !logic
.isTheoryEnabled(THEORY_BV
)
748 && !logic
.isTheoryEnabled(THEORY_STRINGS
)
749 && !logic
.isTheoryEnabled(THEORY_SETS
)
750 && !logic
.isTheoryEnabled(THEORY_BAGS
)
751 && !(logic
.isTheoryEnabled(THEORY_ARITH
) && !logic
.isLinear()
752 && !logic
.isQuantified()))
754 Trace("smt") << "setting theoryof-mode to term-based" << std::endl
;
755 opts
.theory
.theoryOfMode
= options::TheoryOfMode::THEORY_OF_TERM_BASED
;
759 // by default, symmetry breaker is on only for non-incremental QF_UF
760 if (!opts
.uf
.ufSymmetryBreakerWasSetByUser
)
762 bool qf_uf_noinc
= logic
.isPure(THEORY_UF
) && !logic
.isQuantified()
763 && !options::incrementalSolving() && !safeUnsatCores
;
764 Trace("smt") << "setting uf symmetry breaker to " << qf_uf_noinc
766 opts
.uf
.ufSymmetryBreaker
= qf_uf_noinc
;
769 // If in arrays, set the UF handler to arrays
770 if (logic
.isTheoryEnabled(THEORY_ARRAYS
) && !logic
.isHigherOrder()
771 && !options::finiteModelFind()
772 && (!logic
.isQuantified()
773 || (logic
.isQuantified() && !logic
.isTheoryEnabled(THEORY_UF
))))
775 Theory::setUninterpretedSortOwner(THEORY_ARRAYS
);
779 Theory::setUninterpretedSortOwner(THEORY_UF
);
782 if (!opts
.smt
.simplifyWithCareEnabledWasSetByUser
)
785 !logic
.isQuantified() && logic
.isTheoryEnabled(THEORY_ARRAYS
)
786 && logic
.isTheoryEnabled(THEORY_UF
) && logic
.isTheoryEnabled(THEORY_BV
);
788 bool withCare
= qf_aufbv
;
789 Trace("smt") << "setting ite simplify with care to " << withCare
791 opts
.smt
.simplifyWithCareEnabled
= withCare
;
793 // Turn off array eager index splitting for QF_AUFLIA
794 if (!opts
.arrays
.arraysEagerIndexSplittingWasSetByUser
)
796 if (not logic
.isQuantified() && logic
.isTheoryEnabled(THEORY_ARRAYS
)
797 && logic
.isTheoryEnabled(THEORY_UF
)
798 && logic
.isTheoryEnabled(THEORY_ARITH
))
800 Trace("smt") << "setting array eager index splitting to false"
802 opts
.arrays
.arraysEagerIndexSplitting
= false;
805 // Turn on multiple-pass non-clausal simplification for QF_AUFBV
806 if (!opts
.smt
.repeatSimpWasSetByUser
)
808 bool repeatSimp
= !logic
.isQuantified()
809 && (logic
.isTheoryEnabled(THEORY_ARRAYS
)
810 && logic
.isTheoryEnabled(THEORY_UF
)
811 && logic
.isTheoryEnabled(THEORY_BV
))
813 Trace("smt") << "setting repeat simplification to " << repeatSimp
815 opts
.smt
.repeatSimp
= repeatSimp
;
818 if (options::boolToBitvector() == options::BoolToBVMode::ALL
819 && !logic
.isTheoryEnabled(THEORY_BV
))
821 if (opts
.bv
.boolToBitvectorWasSetByUser
)
823 throw OptionException(
824 "bool-to-bv=all not supported for non-bitvector logics.");
826 Notice() << "SmtEngine: turning off bool-to-bv for non-bv logic: "
827 << logic
.getLogicString() << std::endl
;
828 opts
.bv
.boolToBitvector
= options::BoolToBVMode::OFF
;
831 if (!opts
.bv
.bvEagerExplanationsWasSetByUser
832 && logic
.isTheoryEnabled(THEORY_ARRAYS
)
833 && logic
.isTheoryEnabled(THEORY_BV
))
835 Trace("smt") << "enabling eager bit-vector explanations " << std::endl
;
836 opts
.bv
.bvEagerExplanations
= true;
839 // Turn on arith rewrite equalities only for pure arithmetic
840 if (!opts
.arith
.arithRewriteEqWasSetByUser
)
842 bool arithRewriteEq
=
843 logic
.isPure(THEORY_ARITH
) && logic
.isLinear() && !logic
.isQuantified();
844 Trace("smt") << "setting arith rewrite equalities " << arithRewriteEq
846 opts
.arith
.arithRewriteEq
= arithRewriteEq
;
848 if (!opts
.arith
.arithHeuristicPivotsWasSetByUser
)
850 int16_t heuristicPivots
= 5;
851 if (logic
.isPure(THEORY_ARITH
) && !logic
.isQuantified())
853 if (logic
.isDifferenceLogic())
855 heuristicPivots
= -1;
857 else if (!logic
.areIntegersUsed())
862 Trace("smt") << "setting arithHeuristicPivots " << heuristicPivots
864 opts
.arith
.arithHeuristicPivots
= heuristicPivots
;
866 if (!opts
.arith
.arithPivotThresholdWasSetByUser
)
868 uint16_t pivotThreshold
= 2;
869 if (logic
.isPure(THEORY_ARITH
) && !logic
.isQuantified())
871 if (logic
.isDifferenceLogic())
876 Trace("smt") << "setting arith arithPivotThreshold " << pivotThreshold
878 opts
.arith
.arithPivotThreshold
= pivotThreshold
;
880 if (!opts
.arith
.arithStandardCheckVarOrderPivotsWasSetByUser
)
882 int16_t varOrderPivots
= -1;
883 if (logic
.isPure(THEORY_ARITH
) && !logic
.isQuantified())
885 varOrderPivots
= 200;
887 Trace("smt") << "setting arithStandardCheckVarOrderPivots "
888 << varOrderPivots
<< std::endl
;
889 opts
.arith
.arithStandardCheckVarOrderPivots
= varOrderPivots
;
891 if (logic
.isPure(THEORY_ARITH
) && !logic
.areRealsUsed())
893 if (!opts
.arith
.nlExtTangentPlanesInterleaveWasSetByUser
)
895 Trace("smt") << "setting nlExtTangentPlanesInterleave to true"
897 opts
.arith
.nlExtTangentPlanesInterleave
= true;
901 // Set decision mode based on logic (if not set by user)
902 if (!opts
.decision
.decisionModeWasSetByUser
)
904 options::DecisionMode decMode
=
905 // anything that uses sygus uses internal
906 usesSygus
? options::DecisionMode::INTERNAL
:
907 // ALL or its supersets
908 logic
.hasEverything()
909 ? options::DecisionMode::JUSTIFICATION
911 (not logic
.isQuantified() && logic
.isPure(THEORY_BV
)) ||
912 // QF_AUFBV or QF_ABV or QF_UFBV
913 (not logic
.isQuantified()
914 && (logic
.isTheoryEnabled(THEORY_ARRAYS
)
915 || logic
.isTheoryEnabled(THEORY_UF
))
916 && logic
.isTheoryEnabled(THEORY_BV
))
918 // QF_AUFLIA (and may be ends up enabling
920 (not logic
.isQuantified()
921 && logic
.isTheoryEnabled(THEORY_ARRAYS
)
922 && logic
.isTheoryEnabled(THEORY_UF
)
923 && logic
.isTheoryEnabled(THEORY_ARITH
))
926 (not logic
.isQuantified()
927 && logic
.isPure(THEORY_ARITH
) && logic
.isLinear()
928 && !logic
.isDifferenceLogic()
929 && !logic
.areIntegersUsed())
932 logic
.isQuantified() ||
934 logic
.isTheoryEnabled(THEORY_STRINGS
)
935 ? options::DecisionMode::JUSTIFICATION
936 : options::DecisionMode::INTERNAL
);
939 // ALL or its supersets
940 logic
.hasEverything() || logic
.isTheoryEnabled(THEORY_STRINGS
)
943 (not logic
.isQuantified()
944 && logic
.isTheoryEnabled(THEORY_ARRAYS
)
945 && logic
.isTheoryEnabled(THEORY_UF
)
946 && logic
.isTheoryEnabled(THEORY_ARITH
))
949 (not logic
.isQuantified()
950 && logic
.isPure(THEORY_ARITH
) && logic
.isLinear()
951 && !logic
.isDifferenceLogic()
952 && !logic
.areIntegersUsed())
956 opts
.decision
.decisionMode
= decMode
;
959 if (opts
.decision
.decisionMode
== options::DecisionMode::JUSTIFICATION
)
961 opts
.decision
.decisionMode
= options::DecisionMode::STOPONLY
;
965 Assert(opts
.decision
.decisionMode
== options::DecisionMode::INTERNAL
);
968 Trace("smt") << "setting decision mode to " << opts
.decision
.decisionMode
972 // set up of central equality engine
973 if (opts
.theory
.eeMode
== options::EqEngineMode::CENTRAL
)
975 if (!opts
.arith
.arithEqSolverWasSetByUser
)
977 // use the arithmetic equality solver by default
978 opts
.arith
.arithEqSolver
= true;
981 if (opts
.arith
.arithEqSolver
)
983 if (!opts
.arith
.arithCongManWasSetByUser
)
985 // if we are using the arithmetic equality solver, do not use the
986 // arithmetic congruence manager by default
987 opts
.arith
.arithCongMan
= false;
991 if (options::incrementalSolving())
993 // disable modes not supported by incremental
994 opts
.smt
.sortInference
= false;
995 opts
.uf
.ufssFairnessMonotone
= false;
996 opts
.quantifiers
.globalNegate
= false;
997 opts
.bv
.bvAbstraction
= false;
998 opts
.arith
.arithMLTrick
= false;
1000 if (logic
.hasCardinalityConstraints())
1002 // must have finite model finding on
1003 opts
.quantifiers
.finiteModelFind
= true;
1006 if (options::instMaxLevel() != -1)
1008 Notice() << "SmtEngine: turning off cbqi to support instMaxLevel"
1010 opts
.quantifiers
.cegqi
= false;
1013 if ((opts
.quantifiers
.fmfBoundLazyWasSetByUser
&& options::fmfBoundLazy())
1014 || (opts
.quantifiers
.fmfBoundIntWasSetByUser
&& options::fmfBoundInt()))
1016 opts
.quantifiers
.fmfBound
= true;
1018 << "turning on fmf-bound, for fmf-bound-int or fmf-bound-lazy\n";
1020 // now have determined whether fmfBound is on/off
1021 // apply fmfBound options
1022 if (options::fmfBound())
1024 if (!opts
.quantifiers
.mbqiModeWasSetByUser
1025 || (options::mbqiMode() != options::MbqiMode::NONE
1026 && options::mbqiMode() != options::MbqiMode::FMC
))
1028 // if bounded integers are set, use no MBQI by default
1029 opts
.quantifiers
.mbqiMode
= options::MbqiMode::NONE
;
1031 if (!opts
.quantifiers
.prenexQuantUserWasSetByUser
)
1033 opts
.quantifiers
.prenexQuant
= options::PrenexQuantMode::NONE
;
1036 if (logic
.isHigherOrder())
1038 opts
.uf
.ufHo
= true;
1039 // if higher-order, then current variants of model-based instantiation
1041 if (options::mbqiMode() != options::MbqiMode::NONE
)
1043 opts
.quantifiers
.mbqiMode
= options::MbqiMode::NONE
;
1045 if (!opts
.quantifiers
.hoElimStoreAxWasSetByUser
)
1047 // by default, use store axioms only if --ho-elim is set
1048 opts
.quantifiers
.hoElimStoreAx
= options::hoElim();
1050 if (!options::assignFunctionValues())
1052 // must assign function values
1053 opts
.theory
.assignFunctionValues
= true;
1055 // Cannot use macros, since lambda lifting and macro elimination are inverse
1057 if (options::macrosQuant())
1059 opts
.quantifiers
.macrosQuant
= false;
1061 // HOL is incompatible with fmfBound
1062 if (options::fmfBound())
1064 if (opts
.quantifiers
.fmfBoundWasSetByUser
1065 || opts
.quantifiers
.fmfBoundLazyWasSetByUser
1066 || opts
.quantifiers
.fmfBoundIntWasSetByUser
)
1068 Notice() << "Disabling bound finite-model finding since it is "
1069 "incompatible with HOL.\n";
1072 opts
.quantifiers
.fmfBound
= false;
1073 Trace("smt") << "turning off fmf-bound, since HOL\n";
1076 if (options::fmfFunWellDefinedRelevant())
1078 if (!opts
.quantifiers
.fmfFunWellDefinedWasSetByUser
)
1080 opts
.quantifiers
.fmfFunWellDefined
= true;
1083 if (options::fmfFunWellDefined())
1085 if (!opts
.quantifiers
.finiteModelFindWasSetByUser
)
1087 opts
.quantifiers
.finiteModelFind
= true;
1091 // now, have determined whether finite model find is on/off
1092 // apply finite model finding options
1093 if (options::finiteModelFind())
1095 // apply conservative quantifiers splitting
1096 if (!opts
.quantifiers
.quantDynamicSplitWasSetByUser
)
1098 opts
.quantifiers
.quantDynamicSplit
= options::QuantDSplitMode::DEFAULT
;
1100 if (!opts
.quantifiers
.eMatchingWasSetByUser
)
1102 opts
.quantifiers
.eMatching
= options::fmfInstEngine();
1104 if (!opts
.quantifiers
.instWhenModeWasSetByUser
)
1106 // instantiate only on last call
1107 if (options::eMatching())
1109 opts
.quantifiers
.instWhenMode
= options::InstWhenMode::LAST_CALL
;
1114 // apply sygus options
1115 // if we are attempting to rewrite everything to SyGuS, use sygus()
1118 if (!options::sygus())
1120 Trace("smt") << "turning on sygus" << std::endl
;
1122 opts
.quantifiers
.sygus
= true;
1123 // must use Ferrante/Rackoff for real arithmetic
1124 if (!opts
.quantifiers
.cegqiMidpointWasSetByUser
)
1126 opts
.quantifiers
.cegqiMidpoint
= true;
1128 // must disable cegqi-bv since it may introduce witness terms, which
1129 // cannot appear in synthesis solutions
1130 if (!opts
.quantifiers
.cegqiBvWasSetByUser
)
1132 opts
.quantifiers
.cegqiBv
= false;
1134 if (options::sygusRepairConst())
1136 if (!opts
.quantifiers
.cegqiWasSetByUser
)
1138 opts
.quantifiers
.cegqi
= true;
1141 if (options::sygusInference())
1143 // optimization: apply preskolemization, makes it succeed more often
1144 if (!opts
.quantifiers
.preSkolemQuantWasSetByUser
)
1146 opts
.quantifiers
.preSkolemQuant
= true;
1148 if (!opts
.quantifiers
.preSkolemQuantNestedWasSetByUser
)
1150 opts
.quantifiers
.preSkolemQuantNested
= true;
1153 // counterexample-guided instantiation for sygus
1154 if (!opts
.quantifiers
.cegqiSingleInvModeWasSetByUser
)
1156 opts
.quantifiers
.cegqiSingleInvMode
= options::CegqiSingleInvMode::USE
;
1158 if (!opts
.quantifiers
.quantConflictFindWasSetByUser
)
1160 opts
.quantifiers
.quantConflictFind
= false;
1162 if (!opts
.quantifiers
.instNoEntailWasSetByUser
)
1164 opts
.quantifiers
.instNoEntail
= false;
1166 if (!opts
.quantifiers
.cegqiFullEffortWasSetByUser
)
1168 // should use full effort cbqi for single invocation and repair const
1169 opts
.quantifiers
.cegqiFullEffort
= true;
1171 if (options::sygusRew())
1173 opts
.quantifiers
.sygusRewSynth
= true;
1174 opts
.quantifiers
.sygusRewVerify
= true;
1176 if (options::sygusRewSynthInput())
1178 // If we are using synthesis rewrite rules from input, we use
1179 // sygusRewSynth after preprocessing. See passes/synth_rew_rules.h for
1180 // details on this technique.
1181 opts
.quantifiers
.sygusRewSynth
= true;
1182 // we should not use the extended rewriter, since we are interested
1183 // in rewrites that are not in the main rewriter
1184 if (!opts
.quantifiers
.sygusExtRewWasSetByUser
)
1186 opts
.quantifiers
.sygusExtRew
= false;
1189 // Whether we must use "basic" sygus algorithms. A non-basic sygus algorithm
1190 // is one that is specialized for returning a single solution. Non-basic
1191 // sygus algorithms currently include the PBE solver, UNIF+PI, static
1192 // template inference for invariant synthesis, and single invocation
1194 bool reqBasicSygus
= false;
1195 if (options::produceAbducts())
1197 // if doing abduction, we should filter strong solutions
1198 if (!opts
.quantifiers
.sygusFilterSolModeWasSetByUser
)
1200 opts
.quantifiers
.sygusFilterSolMode
= options::SygusFilterSolMode::STRONG
;
1202 // we must use basic sygus algorithms, since e.g. we require checking
1203 // a sygus side condition for consistency with axioms.
1204 reqBasicSygus
= true;
1206 if (options::sygusRewSynth() || options::sygusRewVerify()
1207 || options::sygusQueryGen())
1209 // rewrite rule synthesis implies that sygus stream must be true
1210 opts
.quantifiers
.sygusStream
= true;
1212 if (options::sygusStream() || options::incrementalSolving())
1214 // Streaming and incremental mode are incompatible with techniques that
1215 // focus the search towards finding a single solution.
1216 reqBasicSygus
= true;
1218 // Now, disable options for non-basic sygus algorithms, if necessary.
1221 if (!opts
.quantifiers
.sygusUnifPbeWasSetByUser
)
1223 opts
.quantifiers
.sygusUnifPbe
= false;
1225 if (opts
.quantifiers
.sygusUnifPiWasSetByUser
)
1227 opts
.quantifiers
.sygusUnifPi
= options::SygusUnifPiMode::NONE
;
1229 if (!opts
.quantifiers
.sygusInvTemplModeWasSetByUser
)
1231 opts
.quantifiers
.sygusInvTemplMode
= options::SygusInvTemplMode::NONE
;
1233 if (!opts
.quantifiers
.cegqiSingleInvModeWasSetByUser
)
1235 opts
.quantifiers
.cegqiSingleInvMode
= options::CegqiSingleInvMode::NONE
;
1238 if (!opts
.datatypes
.dtRewriteErrorSelWasSetByUser
)
1240 opts
.datatypes
.dtRewriteErrorSel
= true;
1243 if (!opts
.quantifiers
.miniscopeQuantWasSetByUser
)
1245 opts
.quantifiers
.miniscopeQuant
= false;
1247 if (!opts
.quantifiers
.miniscopeQuantFreeVarWasSetByUser
)
1249 opts
.quantifiers
.miniscopeQuantFreeVar
= false;
1251 if (!opts
.quantifiers
.quantSplitWasSetByUser
)
1253 opts
.quantifiers
.quantSplit
= false;
1256 if (!opts
.quantifiers
.macrosQuantWasSetByUser
)
1258 opts
.quantifiers
.macrosQuant
= false;
1260 // use tangent planes by default, since we want to put effort into
1261 // the verification step for sygus queries with non-linear arithmetic
1262 if (!opts
.arith
.nlExtTangentPlanesWasSetByUser
)
1264 opts
.arith
.nlExtTangentPlanes
= true;
1267 // counterexample-guided instantiation for non-sygus
1268 // enable if any possible quantifiers with arithmetic, datatypes or bitvectors
1269 if ((logic
.isQuantified()
1270 && (logic
.isTheoryEnabled(THEORY_ARITH
)
1271 || logic
.isTheoryEnabled(THEORY_DATATYPES
)
1272 || logic
.isTheoryEnabled(THEORY_BV
)
1273 || logic
.isTheoryEnabled(THEORY_FP
)))
1274 || options::cegqiAll())
1276 if (!opts
.quantifiers
.cegqiWasSetByUser
)
1278 opts
.quantifiers
.cegqi
= true;
1280 // check whether we should apply full cbqi
1281 if (logic
.isPure(THEORY_BV
))
1283 if (!opts
.quantifiers
.cegqiFullEffortWasSetByUser
)
1285 opts
.quantifiers
.cegqiFullEffort
= true;
1289 if (options::cegqi())
1291 if (options::incrementalSolving())
1293 // cannot do nested quantifier elimination in incremental mode
1294 opts
.quantifiers
.cegqiNestedQE
= false;
1296 if (logic
.isPure(THEORY_ARITH
) || logic
.isPure(THEORY_BV
))
1298 if (!opts
.quantifiers
.quantConflictFindWasSetByUser
)
1300 opts
.quantifiers
.quantConflictFind
= false;
1302 if (!opts
.quantifiers
.instNoEntailWasSetByUser
)
1304 opts
.quantifiers
.instNoEntail
= false;
1306 if (!opts
.quantifiers
.instWhenModeWasSetByUser
&& options::cegqiModel())
1308 // only instantiation should happen at last call when model is avaiable
1309 opts
.quantifiers
.instWhenMode
= options::InstWhenMode::LAST_CALL
;
1314 // only supported in pure arithmetic or pure BV
1315 opts
.quantifiers
.cegqiNestedQE
= false;
1317 if (options::globalNegate())
1319 if (!opts
.quantifiers
.prenexQuantWasSetByUser
)
1321 opts
.quantifiers
.prenexQuant
= options::PrenexQuantMode::NONE
;
1325 // implied options...
1326 if (options::strictTriggers())
1328 if (!opts
.quantifiers
.userPatternsQuantWasSetByUser
)
1330 opts
.quantifiers
.userPatternsQuant
= options::UserPatMode::TRUST
;
1333 if (opts
.quantifiers
.qcfModeWasSetByUser
|| options::qcfTConstraint())
1335 opts
.quantifiers
.quantConflictFind
= true;
1337 if (options::cegqiNestedQE())
1339 opts
.quantifiers
.prenexQuantUser
= true;
1340 if (!opts
.quantifiers
.preSkolemQuantWasSetByUser
)
1342 opts
.quantifiers
.preSkolemQuant
= true;
1345 // for induction techniques
1346 if (options::quantInduction())
1348 if (!opts
.quantifiers
.dtStcInductionWasSetByUser
)
1350 opts
.quantifiers
.dtStcInduction
= true;
1352 if (!opts
.quantifiers
.intWfInductionWasSetByUser
)
1354 opts
.quantifiers
.intWfInduction
= true;
1357 if (options::dtStcInduction())
1359 // try to remove ITEs from quantified formulas
1360 if (!opts
.quantifiers
.iteDtTesterSplitQuantWasSetByUser
)
1362 opts
.quantifiers
.iteDtTesterSplitQuant
= true;
1364 if (!opts
.quantifiers
.iteLiftQuantWasSetByUser
)
1366 opts
.quantifiers
.iteLiftQuant
= options::IteLiftQuantMode::ALL
;
1369 if (options::intWfInduction())
1371 if (!opts
.quantifiers
.purifyTriggersWasSetByUser
)
1373 opts
.quantifiers
.purifyTriggers
= true;
1376 if (options::conjectureNoFilter())
1378 if (!opts
.quantifiers
.conjectureFilterActiveTermsWasSetByUser
)
1380 opts
.quantifiers
.conjectureFilterActiveTerms
= false;
1382 if (!opts
.quantifiers
.conjectureFilterCanonicalWasSetByUser
)
1384 opts
.quantifiers
.conjectureFilterCanonical
= false;
1386 if (!opts
.quantifiers
.conjectureFilterModelWasSetByUser
)
1388 opts
.quantifiers
.conjectureFilterModel
= false;
1391 if (opts
.quantifiers
.conjectureGenPerRoundWasSetByUser
)
1393 if (options::conjectureGenPerRound() > 0)
1395 opts
.quantifiers
.conjectureGen
= true;
1399 opts
.quantifiers
.conjectureGen
= false;
1402 // can't pre-skolemize nested quantifiers without UF theory
1403 if (!logic
.isTheoryEnabled(THEORY_UF
) && options::preSkolemQuant())
1405 if (!opts
.quantifiers
.preSkolemQuantNestedWasSetByUser
)
1407 opts
.quantifiers
.preSkolemQuantNested
= false;
1410 if (!logic
.isTheoryEnabled(THEORY_DATATYPES
))
1412 opts
.quantifiers
.quantDynamicSplit
= options::QuantDSplitMode::NONE
;
1415 // until bugs 371,431 are fixed
1416 if (!opts
.prop
.minisatUseElimWasSetByUser
)
1418 // cannot use minisat elimination for logics where a theory solver
1419 // introduces new literals into the search. This includes quantifiers
1420 // (quantifier instantiation), and the lemma schemas used in non-linear
1421 // and sets. We also can't use it if models are enabled.
1422 if (logic
.isTheoryEnabled(THEORY_SETS
)
1423 || logic
.isTheoryEnabled(THEORY_BAGS
)
1424 || logic
.isQuantified()
1425 || options::produceModels() || options::produceAssignments()
1426 || options::checkModels()
1427 || (logic
.isTheoryEnabled(THEORY_ARITH
) && !logic
.isLinear()))
1429 opts
.prop
.minisatUseElim
= false;
1433 if (logic
.isTheoryEnabled(THEORY_ARITH
) && !logic
.isLinear()
1434 && options::nlRlvMode() != options::NlRlvMode::NONE
)
1436 if (!options::relevanceFilter())
1438 if (opts
.theory
.relevanceFilterWasSetByUser
)
1440 Warning() << "SmtEngine: turning on relevance filtering to support "
1442 << options::nlRlvMode() << std::endl
;
1444 // must use relevance filtering techniques
1445 opts
.theory
.relevanceFilter
= true;
1449 // For now, these array theory optimizations do not support model-building
1450 if (options::produceModels() || options::produceAssignments()
1451 || options::checkModels())
1453 opts
.arrays
.arraysOptimizeLinear
= false;
1456 if (options::stringFMF() && !opts
.strings
.stringProcessLoopModeWasSetByUser
)
1458 Trace("smt") << "settting stringProcessLoopMode to 'simple' since "
1459 "--strings-fmf enabled"
1461 opts
.strings
.stringProcessLoopMode
= options::ProcessLoopMode::SIMPLE
;
1464 // !!! All options that require disabling models go here
1465 bool disableModels
= false;
1466 std::string sOptNoModel
;
1467 if (opts
.smt
.unconstrainedSimpWasSetByUser
&& options::unconstrainedSimp())
1469 disableModels
= true;
1470 sOptNoModel
= "unconstrained-simp";
1472 else if (options::sortInference())
1474 disableModels
= true;
1475 sOptNoModel
= "sort-inference";
1477 else if (options::minisatUseElim())
1479 disableModels
= true;
1480 sOptNoModel
= "minisat-elimination";
1482 else if (options::globalNegate())
1484 disableModels
= true;
1485 sOptNoModel
= "global-negate";
1489 if (options::produceModels())
1491 if (opts
.smt
.produceModelsWasSetByUser
)
1493 std::stringstream ss
;
1494 ss
<< "Cannot use " << sOptNoModel
<< " with model generation.";
1495 throw OptionException(ss
.str());
1497 Notice() << "SmtEngine: turning off produce-models to support "
1498 << sOptNoModel
<< std::endl
;
1499 opts
.smt
.produceModels
= false;
1501 if (options::produceAssignments())
1503 if (opts
.smt
.produceAssignmentsWasSetByUser
)
1505 std::stringstream ss
;
1506 ss
<< "Cannot use " << sOptNoModel
1507 << " with model generation (produce-assignments).";
1508 throw OptionException(ss
.str());
1510 Notice() << "SmtEngine: turning off produce-assignments to support "
1511 << sOptNoModel
<< std::endl
;
1512 opts
.smt
.produceAssignments
= false;
1514 if (options::checkModels())
1516 if (opts
.smt
.checkModelsWasSetByUser
)
1518 std::stringstream ss
;
1519 ss
<< "Cannot use " << sOptNoModel
1520 << " with model generation (check-models).";
1521 throw OptionException(ss
.str());
1523 Notice() << "SmtEngine: turning off check-models to support "
1524 << sOptNoModel
<< std::endl
;
1525 opts
.smt
.checkModels
= false;
1529 if (options::bitblastMode() == options::BitblastMode::EAGER
1530 && !logic
.isPure(THEORY_BV
) && logic
.getLogicString() != "QF_UFBV"
1531 && logic
.getLogicString() != "QF_ABV")
1533 throw OptionException(
1534 "Eager bit-blasting does not currently support theory combination. "
1535 "Note that in a QF_BV problem UF symbols can be introduced for "
1537 "Try --bv-div-zero-const to interpret division by zero as a constant.");
1540 if (logic
== LogicInfo("QF_UFNRA"))
1542 #ifdef CVC5_USE_POLY
1543 if (!options::nlCad() && !opts
.arith
.nlCadWasSetByUser
)
1545 opts
.arith
.nlCad
= true;
1546 if (!opts
.arith
.nlExtWasSetByUser
)
1548 opts
.arith
.nlExt
= options::NlExtMode::LIGHT
;
1550 if (!opts
.arith
.nlRlvModeWasSetByUser
)
1552 opts
.arith
.nlRlvMode
= options::NlRlvMode::INTERLEAVE
;
1557 #ifndef CVC5_USE_POLY
1558 if (options::nlCad())
1560 if (opts
.arith
.nlCadWasSetByUser
)
1562 std::stringstream ss
;
1563 ss
<< "Cannot use " << options::arith::nlCad__name
<< " without configuring with --poly.";
1564 throw OptionException(ss
.str());
1568 Notice() << "Cannot use --" << options::arith::nlCad__name
1569 << " without configuring with --poly." << std::endl
;
1570 opts
.arith
.nlCad
= false;
1571 opts
.arith
.nlExt
= options::NlExtMode::FULL
;