mirror of
https://github.com/Z3Prover/z3
synced 2025-07-18 02:16:40 +00:00
add at-least and pbge to API, fix for issue #864
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c69a86e647
commit
8d09b6e4a8
11 changed files with 182 additions and 48 deletions
|
@ -496,13 +496,15 @@ namespace smt {
|
|||
|
||||
unsigned idx = skip_literals_above_conflict_level();
|
||||
|
||||
TRACE("conflict", m_ctx.display_literal_verbose(tout, not_l); m_ctx.display(tout << " ", conflict););
|
||||
|
||||
// save space for first uip
|
||||
m_lemma.push_back(null_literal);
|
||||
m_lemma_atoms.push_back(0);
|
||||
|
||||
unsigned num_marks = 0;
|
||||
if (not_l != null_literal) {
|
||||
TRACE("conflict", tout << "not_l: "; m_ctx.display_literal(tout, not_l); tout << "\n";);
|
||||
TRACE("conflict", tout << "not_l: "; m_ctx.display_literal_verbose(tout, not_l); tout << "\n";);
|
||||
process_antecedent(not_l, num_marks);
|
||||
}
|
||||
|
||||
|
@ -514,7 +516,7 @@ namespace smt {
|
|||
get_manager().trace_stream() << "\n";
|
||||
}
|
||||
|
||||
TRACE("conflict", tout << "processing consequent: "; m_ctx.display_literal(tout, consequent); tout << "\n";
|
||||
TRACE("conflict", tout << "processing consequent: "; m_ctx.display_literal_verbose(tout, consequent); tout << "\n";
|
||||
tout << "num_marks: " << num_marks << ", js kind: " << js.get_kind() << "\n";);
|
||||
SASSERT(js != null_b_justification);
|
||||
switch (js.get_kind()) {
|
||||
|
@ -1076,6 +1078,7 @@ namespace smt {
|
|||
return true;
|
||||
SASSERT(js.get_kind() != b_justification::BIN_CLAUSE);
|
||||
CTRACE("visit_b_justification_bug", js.get_kind() == b_justification::AXIOM, tout << "l: " << l << "\n"; m_ctx.display(tout););
|
||||
|
||||
if (js.get_kind() == b_justification::AXIOM)
|
||||
return true;
|
||||
SASSERT(js.get_kind() != b_justification::AXIOM);
|
||||
|
@ -1089,14 +1092,17 @@ namespace smt {
|
|||
i = 1;
|
||||
}
|
||||
else {
|
||||
SASSERT(cls->get_literal(1) == l);
|
||||
if (get_proof(~cls->get_literal(0)) == 0)
|
||||
visited = false;
|
||||
i = 2;
|
||||
}
|
||||
}
|
||||
for (; i < num_lits; i++)
|
||||
for (; i < num_lits; i++) {
|
||||
SASSERT(cls->get_literal(i) != l);
|
||||
if (get_proof(~cls->get_literal(i)) == 0)
|
||||
visited = false;
|
||||
}
|
||||
return visited;
|
||||
}
|
||||
else
|
||||
|
@ -1251,14 +1257,19 @@ namespace smt {
|
|||
}
|
||||
tout << "\n";);
|
||||
init_mk_proof();
|
||||
literal consequent = false_literal;
|
||||
if (not_l != null_literal)
|
||||
consequent = ~not_l;
|
||||
visit_b_justification(consequent, conflict);
|
||||
if (not_l != null_literal)
|
||||
literal consequent;
|
||||
if (not_l == null_literal) {
|
||||
consequent = false_literal;
|
||||
}
|
||||
else {
|
||||
consequent = ~not_l;
|
||||
m_todo_pr.push_back(tp_elem(not_l));
|
||||
}
|
||||
visit_b_justification(consequent, conflict);
|
||||
|
||||
while (!m_todo_pr.empty()) {
|
||||
tp_elem & elem = m_todo_pr.back();
|
||||
|
||||
switch (elem.m_kind) {
|
||||
case tp_elem::EQUALITY: {
|
||||
enode * lhs = elem.m_lhs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue