3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-09-06 01:48:02 +00:00

Fix Issue #405: Horn normal form ignores implication

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-01-10 19:16:59 -08:00
parent fce286db91
commit 082dcda7f7
3 changed files with 15 additions and 2 deletions

View file

@ -325,9 +325,10 @@ private:
void eliminate_disjunctions(expr_ref_vector::element_ref& body, proof_ref_vector& proofs) {
expr* b = body.get();
expr* e1;
expr* e1, *e2;
bool negate_args = false;
bool is_disj = false;
expr_ref_vector _body(m);
unsigned num_disj = 0;
expr* const* disjs = 0;
if (!contains_predicate(b)) {
@ -346,6 +347,14 @@ private:
num_disj = to_app(e1)->get_num_args();
disjs = to_app(e1)->get_args();
}
if (m.is_implies(b, e1, e2)) {
is_disj = true;
_body.push_back(mk_not(m, e1));
_body.push_back(e2);
disjs = _body.c_ptr();
num_disj = 2;
negate_args = false;
}
if (is_disj) {
app* old_head = 0;
if (m_memoize_disj.find(b, old_head)) {