#include "options/datatypes_options.h"
#include "options/decision_mode.h"
#include "options/decision_options.h"
+#include "options/language.h"
#include "options/main_options.h"
#include "options/open_ostream.h"
#include "options/option_exception.h"
#include "options/proof_options.h"
#include "options/prop_options.h"
#include "options/quantifiers_options.h"
+#include "options/sep_options.h"
#include "options/set_language.h"
#include "options/smt_options.h"
#include "options/strings_options.h"
#include "printer/printer.h"
#include "proof/proof.h"
#include "proof/proof_manager.h"
-#include "proof/proof_manager.h"
#include "proof/theory_proof.h"
#include "proof/unsat_core.h"
#include "prop/prop_engine.h"
#include "smt/command.h"
#include "smt/command_list.h"
-#include "smt/term_formula_removal.h"
#include "smt/logic_request.h"
#include "smt/managed_ostreams.h"
#include "smt/smt_engine_scope.h"
+#include "smt/term_formula_removal.h"
#include "smt/update_ostream.h"
#include "smt_util/boolean_simplification.h"
#include "smt_util/nary_builder.h"
#include "util/hash.h"
#include "util/proof.h"
#include "util/resource_manager.h"
-#include "options/sep_options.h"
using namespace std;
using namespace CVC4;
}
void SmtEngine::setDefaults() {
+ // Language-based defaults
+ if (!options::bitvectorDivByZeroConst.wasSetByUser())
+ {
+ options::bitvectorDivByZeroConst.set(options::inputLanguage()
+ == language::input::LANG_SMTLIB_V2_6);
+ }
+
if(options::forceLogicString.wasSetByUser()) {
d_logic = LogicInfo(options::forceLogicString());
}else if (options::solveIntAsBV() > 0) {
(value.isRational() && value.getRationalValue() == Rational(2)) ||
value.getValue() == "2" ||
value.getValue() == "2.0" ) {
+ options::inputLanguage.set(language::input::LANG_SMTLIB_V2_0);
+
// supported SMT-LIB version
if(!options::outputLanguage.wasSetByUser() &&
( options::outputLanguage() == language::output::LANG_SMTLIB_V2_5 || options::outputLanguage() == language::output::LANG_SMTLIB_V2_6 )) {
return;
} else if( (value.isRational() && value.getRationalValue() == Rational(5, 2)) ||
value.getValue() == "2.5" ) {
+ options::inputLanguage.set(language::input::LANG_SMTLIB_V2_5);
+
// supported SMT-LIB version
if(!options::outputLanguage.wasSetByUser() &&
options::outputLanguage() == language::output::LANG_SMTLIB_V2_0) {
return;
} else if( (value.isRational() && value.getRationalValue() == Rational(13, 5)) ||
value.getValue() == "2.6" ) {
+ options::inputLanguage.set(language::input::LANG_SMTLIB_V2_6);
+
// supported SMT-LIB version
if(!options::outputLanguage.wasSetByUser() &&
options::outputLanguage() == language::output::LANG_SMTLIB_V2_0) {