3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-22 05:43:39 +00:00

add clause proof module, small improvements to bapa

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-05-30 15:49:19 -07:00
parent 4d30639fd7
commit 48fc3d752e
36 changed files with 722 additions and 250 deletions

View file

@ -27,6 +27,7 @@ Revision History:
#include "smt/smt_eq_justification.h"
#include "smt/smt_justification.h"
#include "smt/smt_bool_var_data.h"
#include "smt/smt_clause_proof.h"
#include "smt/smt_theory.h"
#include "smt/smt_quantifier.h"
#include "smt/smt_quantifier_stat.h"
@ -92,6 +93,7 @@ namespace smt {
mutable unsigned m_lemma_id;
progress_callback * m_progress_callback;
unsigned m_next_progress_sample;
clause_proof m_clause_proof;
region m_region;
@ -525,6 +527,12 @@ namespace smt {
result = bool_var2expr(l.var());
}
expr_ref literal2expr(literal l) const {
expr_ref result(m_manager);
literal2expr(l, result);
return result;
}
bool is_true(enode const * n) const {
return n == m_true_enode;
}
@ -652,7 +660,7 @@ namespace smt {
void remove_cls_occs(clause * cls);
void del_clause(clause * cls);
void del_clause(bool log, clause * cls);
void del_clauses(clause_vector & v, unsigned old_size);
@ -681,9 +689,6 @@ namespace smt {
void remove_watch(bool_var v);
void mark_as_deleted(clause * cls);
// -----------------------------------
//
// Internalization
@ -859,6 +864,9 @@ namespace smt {
void add_lit_occs(clause * cls);
public:
void ensure_internalized(expr* e);
void internalize(expr * n, bool gate_ctx);
void internalize(expr * n, bool gate_ctx, unsigned generation);
@ -1101,7 +1109,7 @@ namespace smt {
m_bvar_inc *= m_fparams.m_inv_decay;
}
bool simplify_clause(clause * cls);
bool simplify_clause(clause& cls);
unsigned simplify_clauses(clause_vector & clauses, unsigned starting_at);
@ -1113,7 +1121,7 @@ namespace smt {
bool is_justifying(clause * cls) const {
for (unsigned i = 0; i < 2; i++) {
b_justification js;
js = get_justification(cls->get_literal(i).var());
js = get_justification((*cls)[i].var());
if (js.get_kind() == b_justification::CLAUSE && js.get_clause() == cls)
return true;
}
@ -1561,6 +1569,8 @@ namespace smt {
proof * get_proof();
conflict_resolution& get_cr() { return *m_conflict_resolution.get(); }
void get_relevant_labels(expr* cnstr, buffer<symbol> & result);
void get_relevant_labeled_literals(bool at_lbls, expr_ref_vector & result);