-
Notifications
You must be signed in to change notification settings - Fork 273
Expr-to-C: output type information with nondet_symbol #7675
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
Expr-to-C: output type information with nondet_symbol #7675
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #7675 +/- ##
===========================================
+ Coverage 78.54% 78.55% +0.01%
===========================================
Files 1686 1686
Lines 192905 192905
===========================================
+ Hits 151512 151536 +24
+ Misses 41393 41369 -24
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve as a simple improvement, but it does question whether other places should also have type information.
@@ -1663,7 +1663,7 @@ std::string expr2ct::convert_symbol(const exprt &src) | |||
std::string expr2ct::convert_nondet_symbol(const nondet_symbol_exprt &src) | |||
{ | |||
const irep_idt id=src.get_identifier(); | |||
return "nondet_symbol("+id2string(id)+")"; | |||
return "nondet_symbol<" + convert(src.type()) + ">(" + id2string(id) + ")"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we use that syntax elsewhere? An alternative would be cast syntax?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that the output of --program-only
is the only place where this can currently be observed.
This is a debugging aid to make the output of `--program-only` more helpful when trying to see whether a call to malloc/calloc included type information (via a sizeof annotation).
dbbc575
to
1a22d3e
Compare
This is a debugging aid to make the output of
--program-only
more helpful when trying to see whether a call to malloc/calloc included type information (via a sizeof annotation).