Skip to content

Add warning about unsound simplification in goto-analyzer #7163

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
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
4 changes: 4 additions & 0 deletions regression/goto-analyzer-simplify/soundness-warning/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

void main()
{
}
7 changes: 7 additions & 0 deletions regression/goto-analyzer-simplify/soundness-warning/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CORE
main.c
--vsd --vsd-values constants
\*\*\*\* WARNING\: This simplification is currently known to be unsound for input programs which include recursion\. Do not use it if soundness is important for your use case\.
^SIGNAL=0$
^EXIT=0$
--
4 changes: 4 additions & 0 deletions src/goto-analyzer/static_simplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ bool static_simplifier(

messaget m(message_handler);
m.status() << "Simplifying program" << messaget::eom;
m.warning() << "**** WARNING: This simplification is currently known to be "
"unsound for input programs which include recursion. Do not "
"use it if soundness is important for your use case."
<< messaget::eom;

for(auto &gf_entry : goto_model.goto_functions.function_map)
{
Expand Down