Skip to content

Commit

Permalink
fix false positives with infinite loops and fn calls
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Dec 12, 2023
1 parent 479cbc5 commit d819881
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@ check_refinement(Errors &errs, const Transform &t, State &src_state,
return;
}

bool eq_sink_src_tgt;
{
auto sink_src = src_state.sinkDomain(false);
if (!sink_src.isTrue() && check_expr(axioms_expr && !sink_src).isUnsat()) {
Expand All @@ -517,7 +516,7 @@ check_refinement(Errors &errs, const Transform &t, State &src_state,
}

auto sink_tgt = tgt_state.sinkDomain(false);
eq_sink_src_tgt = sink_src.eq(sink_tgt);
bool eq_sink_src_tgt = sink_src.eq(sink_tgt);
sink_src = {};

if (!eq_sink_src_tgt &&
Expand Down Expand Up @@ -613,8 +612,7 @@ check_refinement(Errors &errs, const Transform &t, State &src_state,
{
// avoid false-positives in refinement query 1 due to bounded unrolling
expr pre_old = pre;
if (!eq_sink_src_tgt)
pre &= !tgt_state.sinkDomain(true);
pre &= !tgt_state.sinkDomain(true);

// 1. Check UB
CHECK(fndom_a.notImplies(fndom_b),
Expand Down

0 comments on commit d819881

Please sign in to comment.