Skip to content

Field sensitivity: also rewrite byte extract to type casts #7739

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 31, 2023
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CORE
main.c
--enforce-contract update _ --program-only
^EXIT=0$
^SIGNAL=0$
--
^\(\d+\) guard#\d+ == .*byte_extract
--
Confirms that field sensitivity can resolve pointer byte extracts to type casts.
14 changes: 14 additions & 0 deletions src/goto-symex/field_sensitivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,20 @@ exprt field_sensitivityt::apply(
else
return apply(ns, state, std::move(tmp), write);
}
else if(
recursive_member.has_value() && recursive_member->id() == ID_typecast)
{
if(was_l2)
{
return apply(
ns,
state,
state.rename(std::move(*recursive_member), ns).get(),
write);
}
else
return apply(ns, state, std::move(*recursive_member), write);
}
}
}
}
Expand Down