-
Notifications
You must be signed in to change notification settings - Fork 273
No-assertions should not affect assertions in built-ins #681
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
No-assertions should not affect assertions in built-ins #681
Conversation
Is there then any way at all to disable the built-in checks? |
Currently not. Shall we distinguish between no-assertions at all and no-user-assertions? |
On Thu, 2017-03-23 at 01:50 -0700, Peter Schrammel wrote:
Shall we distinguish between no-assertions at all and no-user-assertions?
I can see a possible use for this in other languages which have some
assertions added as part of the semantics, but, on the other hand, I can
see that this could lead to a proliferation of flags. What is the
original need / use case for this?
|
It's a customer request who wants to disable his own assertions while keeping the checks in built-ins (Eg memory checks in free()). |
I believe a user's assertions can be disabled by compiling/running with -DNDEBUG. So maybe more fine-grained control to permit disabled built-in assertions is required. |
Overall, the first two commits are great, the third one seems debatable. |
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 we'll need an additional flag no-built-in-assertions if this is to go in. See my earlier comments in the conversation for further thoughts.
The third commit was the actual reason for the PR ;) The current description of the option --no-assertion says "ignore user assertions", which is confusing because it also disables built-in assertions. A user cannot really understand the difference between an instrumented assertion and a built-in assertion. The user only understands what her own assertions are and then sees assertions being added by CBMC. Suggestion:
More fine-grained control over the latter can be introduced if requested. |
This commit changes the behahaviour of --no-assertions so that only user assertions are ignored. Built-in assertions can be hidden by the new option --no-built-in-assertions.
9dee64e
to
85a7566
Compare
@tautschnig, this is green now. |
This PR includes a clean-up of various checks whether something is a built-in.