mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
fix #6376
have solver throw an exception when user supplies a non-propositional assumption
This commit is contained in:
parent
6eb2d2acfa
commit
ccda49bad5
|
@ -140,8 +140,18 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void check_assumptions(unsigned num_assumptions, expr * const * assumptions) {
|
||||
for (unsigned i = 0; i < num_assumptions; ++i) {
|
||||
expr* arg = assumptions[i];
|
||||
m.is_not(arg, arg);
|
||||
if (!is_uninterp_const(arg))
|
||||
throw default_exception("only propositional assumptions are supported for finite domains " + mk_pp(arg, m));
|
||||
}
|
||||
}
|
||||
|
||||
lbool check_sat_core2(unsigned num_assumptions, expr * const * assumptions) override {
|
||||
flush_assertions();
|
||||
check_assumptions(num_assumptions, assumptions);
|
||||
return m_solver->check_sat_core(num_assumptions, assumptions);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue