mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
na
This commit is contained in:
parent
4b22434739
commit
95493f78f9
2 changed files with 26 additions and 19 deletions
|
@ -7,7 +7,7 @@ Module Name:
|
|||
|
||||
Abstract:
|
||||
|
||||
Theory plugins
|
||||
Theory plugin base classes
|
||||
|
||||
Author:
|
||||
|
||||
|
@ -26,12 +26,30 @@ namespace euf {
|
|||
ctx(ctx)
|
||||
{}
|
||||
|
||||
theory_var th_euf_solver::mk_var(enode * n) {
|
||||
SASSERT(!is_attached_to_var(n));
|
||||
euf::theory_var v = m_var2enode.size();
|
||||
m_var2enode.push_back(n);
|
||||
return v;
|
||||
}
|
||||
|
||||
bool th_euf_solver::is_attached_to_var(enode* n) const {
|
||||
theory_var v = n->get_th_var(get_id());
|
||||
return v != null_theory_var && get_enode(v) == n;
|
||||
}
|
||||
|
||||
theory_var th_euf_solver::get_th_var(expr* e) const {
|
||||
return get_th_var(ctx.get_enode(e));
|
||||
}
|
||||
|
||||
void th_euf_solver::push() {
|
||||
m_var2enode_lim.push_back(m_var2enode.size());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void th_euf_solver::pop(unsigned num_scopes) {
|
||||
unsigned new_lvl = m_var2enode_lim.size() - num_scopes;
|
||||
m_var2enode.shrink(m_var2enode_lim[new_lvl]);
|
||||
m_var2enode_lim.shrink(new_lvl);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue