mirror of
https://github.com/Z3Prover/z3
synced 2025-08-06 03:10:25 +00:00
fix #4447, or mask it
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
af90992858
commit
743573aac5
3 changed files with 14 additions and 21 deletions
|
@ -354,10 +354,9 @@ namespace datalog {
|
||||||
|
|
||||||
void context::restrict_predicates(func_decl_set const& preds) {
|
void context::restrict_predicates(func_decl_set const& preds) {
|
||||||
m_preds.reset();
|
m_preds.reset();
|
||||||
func_decl_set::iterator it = preds.begin(), end = preds.end();
|
for (func_decl* p : preds) {
|
||||||
for (; it != end; ++it) {
|
TRACE("dl", tout << mk_pp(p, m) << "\n";);
|
||||||
TRACE("dl", tout << mk_pp(*it, m) << "\n";);
|
m_preds.insert(p);
|
||||||
m_preds.insert(*it);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -742,7 +741,7 @@ namespace datalog {
|
||||||
}
|
}
|
||||||
|
|
||||||
expr_ref context::get_background_assertion() {
|
expr_ref context::get_background_assertion() {
|
||||||
return mk_and(m_background);
|
return mk_and(m_background);
|
||||||
}
|
}
|
||||||
|
|
||||||
void context::assert_expr(expr* e) {
|
void context::assert_expr(expr* e) {
|
||||||
|
@ -961,18 +960,17 @@ namespace datalog {
|
||||||
rule_ref_vector rv (rm);
|
rule_ref_vector rv (rm);
|
||||||
get_rules_along_trace (rv);
|
get_rules_along_trace (rv);
|
||||||
expr_ref fml (m);
|
expr_ref fml (m);
|
||||||
rule_ref_vector::iterator it = rv.begin (), end = rv.end ();
|
for (auto* r : rv) {
|
||||||
for (; it != end; it++) {
|
m_rule_manager.to_formula (*r, fml);
|
||||||
m_rule_manager.to_formula (**it, fml);
|
|
||||||
rules.push_back (fml);
|
rules.push_back (fml);
|
||||||
// The concatenated names are already stored last-first, so do not need to be reversed here
|
// The concatenated names are already stored last-first, so do not need to be reversed here
|
||||||
const symbol& rule_name = (*it)->name();
|
const symbol& rule_name = r->name();
|
||||||
names.push_back (rule_name);
|
names.push_back (rule_name);
|
||||||
|
|
||||||
TRACE ("dl",
|
TRACE ("dl",
|
||||||
if (rule_name == symbol::null) {
|
if (rule_name == symbol::null) {
|
||||||
tout << "Encountered unnamed rule: ";
|
tout << "Encountered unnamed rule: ";
|
||||||
(*it)->display(*this, tout);
|
r->display(*this, tout);
|
||||||
tout << "\n";
|
tout << "\n";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1064,9 +1062,7 @@ namespace datalog {
|
||||||
--i;
|
--i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rule_set::iterator it = m_rule_set.begin(), end = m_rule_set.end();
|
for (rule* r : m_rule_set) {
|
||||||
for (; it != end; ++it) {
|
|
||||||
rule* r = *it;
|
|
||||||
rm.to_formula(*r, fml);
|
rm.to_formula(*r, fml);
|
||||||
func_decl* h = r->get_decl();
|
func_decl* h = r->get_decl();
|
||||||
if (m_rule_set.is_output_predicate(h)) {
|
if (m_rule_set.is_output_predicate(h)) {
|
||||||
|
|
|
@ -4483,9 +4483,9 @@ namespace smt {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void context::get_model(model_ref & m) {
|
void context::get_model(model_ref & mdl) {
|
||||||
if (inconsistent())
|
if (inconsistent() || !m.inc())
|
||||||
m = nullptr;
|
mdl = nullptr;
|
||||||
else {
|
else {
|
||||||
mk_proto_model();
|
mk_proto_model();
|
||||||
if (!m_model && m_proto_model) {
|
if (!m_model && m_proto_model) {
|
||||||
|
@ -4497,7 +4497,7 @@ namespace smt {
|
||||||
// no op
|
// no op
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m = m_model.get();
|
mdl = m_model.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -507,8 +507,6 @@ bool theory_seq::fixed_length(expr* len_e, bool is_zero) {
|
||||||
m_fixed.contains(e)) {
|
m_fixed.contains(e)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
m_trail_stack.push(insert_obj_trail<theory_seq, expr>(m_fixed, e));
|
m_trail_stack.push(insert_obj_trail<theory_seq, expr>(m_fixed, e));
|
||||||
m_fixed.insert(e);
|
m_fixed.insert(e);
|
||||||
|
@ -520,8 +518,7 @@ bool theory_seq::fixed_length(expr* len_e, bool is_zero) {
|
||||||
}
|
}
|
||||||
else if (!is_zero) {
|
else if (!is_zero) {
|
||||||
unsigned _lo = lo.get_unsigned();
|
unsigned _lo = lo.get_unsigned();
|
||||||
expr_ref_vector elems(m);
|
expr_ref_vector elems(m);
|
||||||
|
|
||||||
for (unsigned j = 0; j < _lo; ++j) {
|
for (unsigned j = 0; j < _lo; ++j) {
|
||||||
m_sk.decompose(seq, head, tail);
|
m_sk.decompose(seq, head, tail);
|
||||||
elems.push_back(head);
|
elems.push_back(head);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue