-
Notifications
You must be signed in to change notification settings - Fork 274
Show abstract states in program source code #3215
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
Conversation
38b0695
to
3004c58
Compare
c63de97
to
7258f15
Compare
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.
Passed Diffblue compatibility checks (cbmc commit: 7258f15).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/88660117
d8faf32
to
77e7459
Compare
77e7459
to
fb8bffa
Compare
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.
This PR failed Diffblue compatibility checks (cbmc commit: 77e7459).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/88822020
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
fb8bffa
to
70269f5
Compare
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.
Passed Diffblue compatibility checks (cbmc commit: 70269f5).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/88836441
70269f5
to
ed7da5b
Compare
b8f7688
to
4598b6b
Compare
Both done! |
@@ -626,7 +627,18 @@ int goto_analyzer_parse_optionst::perform_analysis(const optionst &options) | |||
|
|||
if(options.get_bool_option("show")) | |||
{ | |||
static_show_domain(goto_model, *analyzer, options, out); | |||
if( |
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 think I would prefer a new option for output "text-on-source" or something like that and have show_on_source
just called for that. That way we maintain backwards compatibility.
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.
Ok, it's now --show-on-source.
4598b6b
to
cf04144
Compare
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.
🚫
This PR failed Diffblue compatibility checks (cbmc commit: cf04144).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/89636240
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
05a5c0c
to
d5d204e
Compare
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.
Diffblue compatibility check is currently unavailable.
Please create manual bump.
(cbmc commit: d5d204e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/90749109
d5d204e
to
38d0fa0
Compare
@@ -800,7 +811,8 @@ void goto_analyzer_parse_optionst::help() | |||
" goto-analyzer file.c ... source file names\n" | |||
"\n" | |||
"Task options:\n" | |||
" --show display the abstract domains\n" | |||
" --show display the abstract states on the goto program\n" |
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.
" --show display the abstract states on the goto program\n" | |
// NOLINTNEXTLINE(whitespace/line_length) | |
" --show display the abstract states on the goto program\n" |
The abstract states are shown in a different color on the source code text of the program, as opposed to the goto-program dump. Indentation of the output of the abstract is made to match the indentation of the source code.
38d0fa0
to
5dd3760
Compare
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.
Diffblue compatibility check is currently unavailable.
Please create manual bump.
(cbmc commit: 5dd3760).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/90819223
Co-Authored-By: kroening <[email protected]>
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 3658167).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/90955098
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.
Looks good, and a nice feature.
{ | ||
const auto abstract_state = ai.abstract_state_before(loc); | ||
if(abstract_state->is_top()) | ||
return {}; |
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.
This doesn't match the name of the function or the documentation; why should the file name depend on the domain?
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'm happy with the way this is implemented. I'm ... undecided on the change in the usage model. My understanding is that the usage model of CPROVER has been very much pipeline : you need the source to create the goto-program but after that you don't need it any more. This then loops back around and changes the relationship between analysis results and code. This is not a bad thing but it is a change of abstraction / architecture. If we are going to go this way (and I am not for or against doing so at this stage) then we should probably think about the consequences / necessary architectural changes. For example, do we need to store / be able to do byte-exact reconstruction of source from goto-programs?
So, I think the answer is merge this and if we find that we're adding lots more features, think about changing the architecture.
Yes, we do want pipeline! However, note that "view abstract fixedpoint on source code" is still very much a feature aimed at developers of analysis tools, as opposed to users, so if this gets broken by some transformation it's not a big deal. You'll then have to view using the goto-program, which is what we currently do. |
Uh oh!
There was an error while loading. Please reload this page.