Skip to content

goto_rw/range_spect: wrap in a class instead of using just a typedef [blocks: #6749, #6768] #6753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions src/analyses/dependence_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,22 +125,28 @@ void dep_graph_domaint::control_dependencies(
}

static bool may_be_def_use_pair(
const mp_integer &w_start,
const mp_integer &w_end,
const mp_integer &r_start,
const mp_integer &r_end)
const range_spect &w_start,
const range_spect &w_end,
const range_spect &r_start,
const range_spect &r_end)
{
assert(w_start>=0);
assert(r_start>=0);
PRECONDITION(w_start >= range_spect{0});
PRECONDITION(r_start >= range_spect{0});

if((w_end!=-1 && w_end <= r_start) || // we < rs
(r_end!=-1 && w_start >= r_end)) // re < we
if(
(!w_end.is_unknown() && w_end <= r_start) || // we < rs
(!r_end.is_unknown() && w_start >= r_end)) // re < we
{
return false;
}
else if(w_start >= r_start) // rs <= ws < we,re
return true;
else if(w_end==-1 ||
(r_end!=-1 && w_end > r_start)) // ws <= rs < we,re
else if(
w_end.is_unknown() ||
(!r_end.is_unknown() && w_end > r_start)) // ws <= rs < we,re
{
return true;
}
else
return false;
}
Expand Down
Loading