mirror of
https://github.com/Z3Prover/z3
synced 2025-08-08 20:21:23 +00:00
minor fixes
- ensure mk_extract performs simplification to distribute over extract and removing extract if the range is the entire bit-vector - ensure bool_rewriter simplifeis disjunctions when applicable.
This commit is contained in:
parent
9fc4015c46
commit
1646a41b2f
9 changed files with 24 additions and 18 deletions
|
@ -32,8 +32,15 @@ mk_extract_proc::~mk_extract_proc() {
|
|||
}
|
||||
|
||||
app * mk_extract_proc::operator()(unsigned high, unsigned low, expr * arg) {
|
||||
unsigned l, h;
|
||||
while (m_util.is_extract(arg, l, h, arg)) {
|
||||
low += l;
|
||||
high += l;
|
||||
}
|
||||
ast_manager & m = m_util.get_manager();
|
||||
sort * s = arg->get_sort();
|
||||
if (low == 0 && high + 1 == m_util.get_bv_size(arg) && is_app(arg))
|
||||
return to_app(arg);
|
||||
if (m_low == low && m_high == high && m_domain == s)
|
||||
return m.mk_app(m_f_cached, arg);
|
||||
// m_f_cached has a reference to m_domain, so, I don't need to inc_ref m_domain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue