mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 17:30:23 +00:00
int<->real coercions.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
c48bd1e8de
commit
75457e1393
9 changed files with 184 additions and 21 deletions
|
@ -258,6 +258,7 @@ protected:
|
|||
symbol m_global_decls;
|
||||
symbol m_numeral_as_real;
|
||||
symbol m_error_behavior;
|
||||
symbol m_int_real_coercions;
|
||||
ini_params m_ini;
|
||||
|
||||
bool is_builtin_option(symbol const & s) const {
|
||||
|
@ -288,6 +289,7 @@ public:
|
|||
m_global_decls(":global-decls"),
|
||||
m_numeral_as_real(":numeral-as-real"),
|
||||
m_error_behavior(":error-behavior"),
|
||||
m_int_real_coercions(":int-real-coercions"),
|
||||
m_ini(false) {
|
||||
params.register_params(m_ini);
|
||||
register_pp_params(m_ini);
|
||||
|
@ -376,6 +378,9 @@ class set_option_cmd : public set_get_option_cmd {
|
|||
else if (m_option == m_numeral_as_real) {
|
||||
ctx.set_numeral_as_real(to_bool(value));
|
||||
}
|
||||
else if (m_option == m_int_real_coercions) {
|
||||
ctx.m().enable_int_real_coercions(to_bool(value));
|
||||
}
|
||||
#ifdef Z3DEBUG
|
||||
else if (m_option == ":enable-assertions") {
|
||||
enable_assertions(to_bool(value));
|
||||
|
@ -536,6 +541,9 @@ public:
|
|||
print_string(ctx, "continued-execution");
|
||||
}
|
||||
}
|
||||
else if (opt == m_int_real_coercions) {
|
||||
print_bool(ctx, ctx.m().int_real_coercions());
|
||||
}
|
||||
else {
|
||||
std::string iopt = smt_keyword2opt_name(opt);
|
||||
std::string r;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue