3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-07 19:51:22 +00:00

remove level of indirection for context and ast_manager in smt_theory (#4253)

* remove level of indirection for context and ast_manager in smt_theory

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add request by #4252

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* move to def

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* int

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-05-08 16:46:03 -07:00 committed by GitHub
parent 17b8db95c1
commit becf423c77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 750 additions and 1257 deletions

View file

@ -26,7 +26,6 @@ Author:
using namespace smt;
bool theory_seq::solve_nqs(unsigned i) {
context & ctx = get_context();
for (; !ctx.inconsistent() && i < m_nqs.size(); ++i) {
if (solve_ne(i)) {
m_nqs.erase_and_swap(i--);
@ -48,7 +47,6 @@ bool theory_seq::solve_ne(unsigned idx) {
bool theory_seq::check_ne_literals(unsigned idx, unsigned& num_undef_lits) {
ne const& n = m_nqs[idx];
context& ctx = get_context();
for (literal lit : n.lits()) {
switch (ctx.get_assignment(lit)) {
case l_false:
@ -73,7 +71,6 @@ bool theory_seq::check_ne_literals(unsigned idx, unsigned& num_undef_lits) {
bool theory_seq::propagate_ne2lit(unsigned idx) {
ne const& n = m_nqs[idx];
context& ctx = get_context();
if (!n.eqs().empty()) {
return false;
}
@ -145,7 +142,6 @@ bool theory_seq::propagate_ne2eq(unsigned idx, expr_ref_vector const& es) {
bool theory_seq::reduce_ne(unsigned idx) {
ne const& n = m_nqs[idx];
context& ctx = get_context();
bool updated = false;
dependency* new_deps = n.dep();
vector<decomposed_eq> new_eqs;
@ -257,7 +253,6 @@ bool theory_seq::branch_nqs() {
lbool theory_seq::branch_nq(ne const& n) {
context& ctx = get_context();
literal eq_len = mk_eq(mk_len(n.l()), mk_len(n.r()), false);
ctx.mark_as_relevant(eq_len);
switch (ctx.get_assignment(eq_len)) {