Skip to content

Commit

Permalink
fix unsound rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Mar 20, 2023
1 parent f075dc2 commit 53ca65a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ast/rewriter/seq_rewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5954,6 +5954,7 @@ bool seq_rewriter::reduce_non_overlap(expr_ref_vector& ls, expr_ref_vector& rs,
*/
bool seq_rewriter::reduce_value_clash(expr_ref_vector& ls, expr_ref_vector& rs, expr_ref_pair_vector& eqs) {
ptr_buffer<expr> es;

if (ls.empty() || rs.empty())
return true;
es.append(ls.size(), ls.data());
Expand All @@ -5976,7 +5977,12 @@ bool seq_rewriter::reduce_value_clash(expr_ref_vector& ls, expr_ref_vector& rs,
if (!is_unit_value(r))
return true;
}
return any_of(es, [&](expr* e) { return is_unit_value(e); });
if (es.empty())
return true;
for (expr* e : es)
if (!is_unit_value(e))
return true;
return false;
}

bool seq_rewriter::reduce_subsequence(expr_ref_vector& ls, expr_ref_vector& rs, expr_ref_pair_vector& eqs) {
Expand Down

0 comments on commit 53ca65a

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy