mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
completing user print experience with seq/re #2200
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
fca8ffd948
commit
dc0e9c1919
9 changed files with 115 additions and 11 deletions
|
@ -75,7 +75,7 @@ namespace sat {
|
|||
void model_converter::operator()(model & m) const {
|
||||
vector<entry>::const_iterator begin = m_entries.begin();
|
||||
vector<entry>::const_iterator it = m_entries.end();
|
||||
bool first = false; // true; // false; // // true;
|
||||
bool first = false;
|
||||
//SASSERT(!m_solver || m_solver->check_clauses(m));
|
||||
while (it != begin) {
|
||||
--it;
|
||||
|
@ -146,6 +146,10 @@ namespace sat {
|
|||
bool sat = false;
|
||||
for (literal l : it->m_clauses) {
|
||||
if (l == null_literal) {
|
||||
CTRACE("sat", !sat,
|
||||
display(tout);
|
||||
for (unsigned v = 0; v < m.size(); ++v) tout << v << ": " << m[v] << "\n";
|
||||
);
|
||||
SASSERT(sat);
|
||||
sat = false;
|
||||
continue;
|
||||
|
|
|
@ -1608,6 +1608,7 @@ namespace sat {
|
|||
if (inconsistent()) break;
|
||||
assign_scoped(lit);
|
||||
}
|
||||
propagate(false);
|
||||
TRACE("sat",
|
||||
for (literal a : m_assumptions) {
|
||||
index_set s;
|
||||
|
|
|
@ -879,6 +879,7 @@ private:
|
|||
mdl = nullptr;
|
||||
return;
|
||||
}
|
||||
TRACE("sat", m_solver.display_model(tout););
|
||||
sat::model const & ll_m = m_solver.get_model();
|
||||
mdl = alloc(model, m);
|
||||
for (sat::bool_var v = 0; v < ll_m.size(); ++v) {
|
||||
|
@ -899,11 +900,9 @@ private:
|
|||
}
|
||||
|
||||
if (m_sat_mc) {
|
||||
// IF_VERBOSE(0, m_sat_mc->display(verbose_stream() << "satmc\n"););
|
||||
(*m_sat_mc)(mdl);
|
||||
}
|
||||
if (m_mcs.back()) {
|
||||
//IF_VERBOSE(0, m_mc0->display(verbose_stream() << "mc0\n"););
|
||||
(*m_mcs.back())(mdl);
|
||||
}
|
||||
TRACE("sat", model_smt2_pp(tout, m, *mdl, 0););
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
mc(ast_manager& m);
|
||||
~mc() override {}
|
||||
// flush model converter from SAT solver to this structure.
|
||||
void flush_smc(sat::solver_core& s, atom2bool_var const& map);
|
||||
void flush_smc(sat::solver_core& s, atom2bool_var const& map);
|
||||
void operator()(model_ref& md) override;
|
||||
void operator()(expr_ref& fml) override;
|
||||
model_converter* translate(ast_translation& translator) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue