mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
arrays (#4684)
* arrays Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * arrays Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * na Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * arrays Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * na Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * fill Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * update drat and fix euf bugs Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * na Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * na Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * na Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * const qualifiers Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * na Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * reorg ba Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * reorg Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * build warnings Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
d56dd1db7b
commit
796e2fd9eb
79 changed files with 2571 additions and 1850 deletions
|
@ -15,24 +15,32 @@ Author:
|
|||
|
||||
--*/
|
||||
|
||||
#include "ast/ast_ll_pp.h"
|
||||
#include "sat/smt/euf_solver.h"
|
||||
|
||||
namespace euf {
|
||||
|
||||
void solver::init_drat() {
|
||||
if (!m_drat_initialized)
|
||||
get_drat().add_theory(m.get_basic_family_id(), symbol("euf"));
|
||||
if (!m_drat_initialized) {
|
||||
get_drat().add_theory(get_id(), symbol("euf"));
|
||||
get_drat().add_theory(m.get_basic_family_id(), symbol("bool"));
|
||||
}
|
||||
m_drat_initialized = true;
|
||||
}
|
||||
|
||||
void solver::log_node(expr* e) {
|
||||
void solver::drat_log_node(expr* e) {
|
||||
if (!use_drat())
|
||||
return;
|
||||
if (is_app(e)) {
|
||||
std::stringstream strm;
|
||||
strm << mk_ismt2_func(to_app(e)->get_decl(), m);
|
||||
get_drat().def_begin(e->get_id(), strm.str());
|
||||
for (expr* arg : *to_app(e))
|
||||
app* a = to_app(e);
|
||||
if (a->get_num_parameters() == 0)
|
||||
get_drat().def_begin(e->get_id(), a->get_decl()->get_name().str());
|
||||
else {
|
||||
std::stringstream strm;
|
||||
strm << mk_ismt2_func(a->get_decl(), m);
|
||||
get_drat().def_begin(e->get_id(), strm.str());
|
||||
}
|
||||
for (expr* arg : *a)
|
||||
get_drat().def_add_arg(arg->get_id());
|
||||
get_drat().def_end();
|
||||
}
|
||||
|
@ -57,7 +65,7 @@ namespace euf {
|
|||
for (literal lit : r) lits.push_back(~lit);
|
||||
if (l != sat::null_literal)
|
||||
lits.push_back(l);
|
||||
get_drat().add(lits, sat::status::th(true, m.get_basic_family_id()));
|
||||
get_drat().add(lits, sat::status::th(true, get_id()));
|
||||
}
|
||||
|
||||
void solver::log_antecedents(std::ostream& out, literal l, literal_vector const& r) {
|
||||
|
@ -65,14 +73,14 @@ namespace euf {
|
|||
expr* n = m_var2expr[l.var()];
|
||||
out << ~l << ": ";
|
||||
if (!l.sign()) out << "! ";
|
||||
out << mk_pp(n, m) << "\n";
|
||||
out << mk_bounded_pp(n, m) << "\n";
|
||||
SASSERT(s().value(l) == l_true);
|
||||
}
|
||||
if (l != sat::null_literal) {
|
||||
out << l << ": ";
|
||||
if (l.sign()) out << "! ";
|
||||
expr* n = m_var2expr[l.var()];
|
||||
out << mk_pp(n, m) << "\n";
|
||||
out << mk_bounded_pp(n, m) << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue