-
Notifications
You must be signed in to change notification settings - Fork 273
remove_returns now preserves signature #4266
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
e60c7c8
to
460c788
Compare
Could you please elaborate? Notably, that test was introduced in #3089 together with changes (only) to remove_returns. |
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: 460c788).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102144138
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.
Removed previously disabled checks: Not every instruction has a code member - so removed checks that both instruction sourcelocation and code sourcelocation are set and identical Remove also remaining check that every instruction have a non-nil sourcelocation as this would have to be optional (if enabled fails many regression tests). This also simplifies considerably the overall validation pass (removes much passing around of the options structure). Removes check on function return type - this will be preserved (diffblue#4266) goto_model::validate now has default parameters. Minor fixes.
Removed previously disabled checks: Not every instruction has a code member - so removed checks that both instruction sourcelocation and code sourcelocation are set and identical Remove also remaining check that every instruction have a non-nil sourcelocation as this would have to be optional (if enabled fails many regression tests). This also simplifies considerably the overall validation pass (removes much passing around of the options structure). Removes check on function return type - this will be preserved (diffblue#4266) goto_model::validate now has default parameters. Minor fixes.
460c788
to
696b1f4
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: 696b1f4).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102950599
Status will be re-evaluated on next push.
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 compatibility was already broken by an earlier merge.
696b1f4
to
1365203
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: 1365203).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/103247677
Status will be re-evaluated on next push.
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 compatibility was already broken by an earlier merge.
1365203
to
476b698
Compare
This simplifies removal, and removes the need to query the 'original' return type.
476b698
to
aecd491
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: 476b698).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/104397771
Status will be re-evaluated on next push.
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 compatibility was already broken by an earlier merge.
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: aecd491).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/104402256
Status will be re-evaluated on next push.
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 compatibility was already broken by an earlier merge.
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.
One suggestion: document in remove_returns.h what the new contract is (leave the signature alone but leave the . return value undefined?)
@smowton I felt that the documentation is reasonably clear -- what do you mean by "leave the . return value undefined"? The #return_value variable is set, which is nicely illustrated towards the end of the comment block. |
I mean if the type indicates it returns int, then we have both the "natural" return value and the global. Subsequent passes need to know that return type and return behaviour may no longer coincide, whereas previously the void return type meant a naive pass would also do fine, as the function really was void-typed. |
Ah; that may be a matter of viewpoint. My view is that we have two different semantics for goto-programs, one with return instructions, and one without. The "without" semantics is a strict subset of the one "with", which implies that you don't actually need to know which to apply. |
This simplifies removal, and removes the need to query the 'original' return
type.