3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-03 01:40: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

@ -126,14 +126,14 @@ namespace opt {
wth->reset_local();
}
else {
wth = alloc(smt::theory_wmaxsat, m, m_c.fm());
wth = alloc(smt::theory_wmaxsat, m_c.smt_context(), m, m_c.fm());
m_c.smt_context().register_plugin(wth);
}
smt::theory_id th_pb = m.get_family_id("pb");
smt::theory_pb* pb = dynamic_cast<smt::theory_pb*>(m_c.smt_context().get_theory(th_pb));
if (!pb) {
theory_pb_params params;
pb = alloc(smt::theory_pb, m, params);
pb = alloc(smt::theory_pb, m_c.smt_context());
m_c.smt_context().register_plugin(pb);
}
return wth;

View file

@ -109,7 +109,7 @@ namespace opt {
smt::theory_id th_id = m.get_family_id("pb");
smt::theory* th = get_context().get_theory(th_id);
if (!th) {
get_context().register_plugin(alloc(smt::theory_pb, m, m_params));
get_context().register_plugin(alloc(smt::theory_pb, get_context()));
}
}
@ -119,7 +119,7 @@ namespace opt {
smt::theory* arith_theory = ctx.get_theory(arith_id);
if (!arith_theory) {
ctx.register_plugin(alloc(smt::theory_mi_arith, m, m_params));
ctx.register_plugin(alloc(smt::theory_mi_arith, ctx));
arith_theory = ctx.get_theory(arith_id);
SASSERT(arith_theory);
}