3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-11 21:50:52 +00:00

build fixes, add lazy push/pop state to avoid overhead on unused theories

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-08-17 00:13:46 -07:00
parent ca3ec22b7a
commit 558233dd8e
8 changed files with 61 additions and 2 deletions

View file

@ -4072,9 +4072,11 @@ void theory_lra::init() {
m_imp->init();
}
bool theory_lra::internalize_atom(app * atom, bool gate_ctx) {
force_push();
return m_imp->internalize_atom(atom, gate_ctx);
}
bool theory_lra::internalize_term(app * term) {
force_push();
return m_imp->internalize_term(term);
}
void theory_lra::internalize_eq_eh(app * atom, bool_var v) {
@ -4099,10 +4101,14 @@ void theory_lra::apply_sort_cnstr(enode* n, sort* s) {
m_imp->apply_sort_cnstr(n, s);
}
void theory_lra::push_scope_eh() {
if (lazy_push())
return;
theory::push_scope_eh();
m_imp->push_scope_eh();
}
void theory_lra::pop_scope_eh(unsigned num_scopes) {
if (lazy_pop(num_scopes))
return;
m_imp->pop_scope_eh(num_scopes);
theory::pop_scope_eh(num_scopes);
}