3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 18:05:21 +00:00

add joinability type checking

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-07-30 15:15:55 -03:00
parent d94e12104d
commit ef945fbf77
2 changed files with 6 additions and 3 deletions

View file

@ -1023,8 +1023,11 @@ sort* basic_decl_plugin::join(sort* s1, sort* s2) {
if (s1->get_decl_kind() == REAL_SORT) {
return s1;
}
return s2;
}
return s2;
std::ostringstream buffer;
buffer << "Sorts " << mk_pp(s1, *m_manager) << " and " << mk_pp(s2, *m_manager) << " are incompatible";
throw ast_exception(buffer.str().c_str());
}
func_decl * basic_decl_plugin::mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,

View file

@ -33,7 +33,7 @@ context_params::context_params() {
m_trace = false;
m_debug_ref_count = false;
m_smtlib2_compliant = false;
m_well_sorted_check = true;
m_well_sorted_check = false;
m_timeout = UINT_MAX;
updt_params();
}
@ -130,7 +130,7 @@ void context_params::updt_params(params_ref const & p) {
void context_params::collect_param_descrs(param_descrs & d) {
d.insert("timeout", CPK_UINT, "default timeout (in milliseconds) used for solvers", "4294967295");
d.insert("well_sorted_check", CPK_BOOL, "type checker", "true");
d.insert("well_sorted_check", CPK_BOOL, "type checker", "false");
d.insert("type_check", CPK_BOOL, "type checker (alias for well_sorted_check)", "true");
d.insert("auto_config", CPK_BOOL, "use heuristics to automatically select solver and configure it", "true");
d.insert("model_validate", CPK_BOOL, "validate models produced by solvers", "false");