3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-04 12:40:23 +00:00

testing / debugging arithmetic

This commit is contained in:
Nikolaj Bjorner 2024-07-19 11:31:43 -07:00
parent ae55d30961
commit 5b0d49cd76
10 changed files with 269 additions and 139 deletions

View file

@ -59,15 +59,19 @@ namespace sls {
// Use timestamps to make it incremental.
//
init();
verbose_stream() << "check " << unsat().size() << "\n";
while (unsat().empty()) {
propagate_boolean_assignment();
verbose_stream() << "propagate " << unsat().size() << " " << m_new_constraint << "\n";
// display(verbose_stream());
if (m_new_constraint || !unsat().empty())
return l_undef;
verbose_stream() << unsat().size() << " " << m_new_constraint << "\n";
if (all_of(m_plugins, [&](auto* p) { return !p || p->is_sat(); })) {
model_ref mdl = alloc(model, m);
for (expr* e : subterms())
@ -97,8 +101,8 @@ namespace sls {
while (!m_new_constraint && (!m_repair_up.empty() || !m_repair_down.empty())) {
while (!m_repair_down.empty() && !m_new_constraint) {
auto id = m_repair_down.erase_min();
expr* e = term(id);
// verbose_stream() << "repair down " << mk_bounded_pp(e, m) << "\n";
expr* e = term(id);
TRACE("sls", tout << "repair down " << mk_bounded_pp(e, m) << "\n");
if (is_app(e)) {
auto p = m_plugins.get(to_app(e)->get_family_id(), nullptr);
if (p)
@ -108,7 +112,7 @@ namespace sls {
while (!m_repair_up.empty() && !m_new_constraint) {
auto id = m_repair_up.erase_min();
expr* e = term(id);
// verbose_stream() << "repair up " << mk_bounded_pp(e, m) << "\n";
TRACE("sls", tout << "repair up " << mk_bounded_pp(e, m) << "\n");
if (is_app(e)) {
auto p = m_plugins.get(to_app(e)->get_family_id(), nullptr);
if (p)