mirror of
https://github.com/Z3Prover/z3
synced 2026-04-27 22:33:35 +00:00
Missing internalization
This commit is contained in:
parent
495921ca17
commit
910c68cd42
2 changed files with 9 additions and 2 deletions
|
|
@ -95,7 +95,7 @@ namespace smt {
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
bool theory_nseq::internalize_atom(app* atom, bool /*gate_ctx*/) {
|
bool theory_nseq::internalize_atom(app* atom, bool /*gate_ctx*/) {
|
||||||
// std::cout << "internalize_atom: " << mk_pp(atom, m) << std::endl;
|
std::cout << "internalize_atom: " << mk_pp(atom, m) << std::endl;
|
||||||
// str.in_re atoms are boolean predicates: register as bool_var
|
// str.in_re atoms are boolean predicates: register as bool_var
|
||||||
// so that assign_eh fires when the SAT solver assigns them.
|
// so that assign_eh fires when the SAT solver assigns them.
|
||||||
// Following theory_seq: create a bool_var directly without an enode
|
// Following theory_seq: create a bool_var directly without an enode
|
||||||
|
|
@ -127,7 +127,7 @@ namespace smt {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool theory_nseq::internalize_term(app* term) {
|
bool theory_nseq::internalize_term(app* term) {
|
||||||
// std::cout << "internalize_term: " << mk_pp(term, m) << std::endl;
|
std::cout << "internalize_term: " << mk_pp(term, m) << std::endl;
|
||||||
// ensure ALL children are internalized (following theory_seq pattern)
|
// ensure ALL children are internalized (following theory_seq pattern)
|
||||||
for (auto arg : *term) {
|
for (auto arg : *term) {
|
||||||
mk_var(ensure_enode(arg));
|
mk_var(ensure_enode(arg));
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,13 @@ namespace smt {
|
||||||
mk_var(ctx.get_enode(s));
|
mk_var(ctx.get_enode(s));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (m_util.is_skolem(atom)) {
|
||||||
|
// char2bit
|
||||||
|
bool_var bv = ctx.mk_bool_var(atom);
|
||||||
|
ctx.set_var_theory(bv, get_id());
|
||||||
|
ctx.mark_as_relevant(bv);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return internalize_term(atom);
|
return internalize_term(atom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue