Skip to content

goto_checkt: keep same-assertion for different expressions #5845

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 2 commits into from
Feb 20, 2021

Conversation

tautschnig
Copy link
Collaborator

@tautschnig tautschnig commented Feb 19, 2021

[Only the second commit is relevant, the first one is #5844 and only required to have the necessary test in place.]

Purging redundant assertions results in surprising user output as it would seem that certain properties aren't being checked.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig added the RFC Request for comment label Feb 19, 2021
@tautschnig tautschnig self-assigned this Feb 19, 2021
Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going with a tentative 'yes'. Assorted thoughts:

  • When doing work on how to QA / evaluate / certify program analysis tools, I came to the conclusion that omitting VCs was actually quite a bit worse than simply getting them wrong. If you have a VC and a status then you have a reasonable chance of being able to check that it is correct; there are a bunch of techniques. If you don't have the VC there are many fewer ways of finding that it is missing. As such I am suspicious of anything that removes VCs, even the ones that are "obviously" safe or redundant.
  • I am working with a colleague on tracking down missing VCs. This is a much more tedious and harder process than it should be. Let's not have concealed cracks where VCs can just vanish.
  • If a VC is trivial then we should still report it, we just need to make sure that it is minimal overhead.

@tautschnig
Copy link
Collaborator Author

@martin-cs Thank you very much for your elaboration, I fully concur. It seems a further fix is in order: d974aa3 introduced a "retain-trivial" option, but this option was never made available in any command-line parser...

Purging redundant assertions results in surprising user output as it
would seem that certain properties aren't being checked.
@tautschnig tautschnig force-pushed the keep-redundant-checks branch 2 times, most recently from 7aeee35 to 572a00d Compare February 19, 2021 21:35
@tautschnig
Copy link
Collaborator Author

@martin-cs Thank you very much for your elaboration, I fully concur. It seems a further fix is in order: d974aa3 introduced a "retain-trivial" option, but this option was never made available in any command-line parser...

Such a fix is now included as well.

@tautschnig tautschnig changed the title [RFC] goto_checkt: keep same-assertion for different expressions goto_checkt: keep same-assertion for different expressions Feb 19, 2021
@tautschnig tautschnig removed the RFC Request for comment label Feb 19, 2021
@tautschnig tautschnig removed their assignment Feb 19, 2021
@tautschnig tautschnig marked this pull request as ready for review February 19, 2021 21:41
@tautschnig tautschnig self-assigned this Feb 19, 2021
In some settings it is desirable to obtain a report of all properties
being checked, including those that are trivially true. There used to be
an option "all-claims", then renamed to "retain-trivial", but the latter
was never made available in command-line front-ends.

The option is now renamed to retain-trivial-checks, and made available
in all front-ends.
@tautschnig tautschnig force-pushed the keep-redundant-checks branch from 572a00d to 93bd022 Compare February 19, 2021 22:26
@codecov
Copy link

codecov bot commented Feb 19, 2021

Codecov Report

Merging #5845 (93bd022) into develop (3acdb52) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5845   +/-   ##
========================================
  Coverage    72.87%   72.88%           
========================================
  Files         1421     1421           
  Lines       154181   154217   +36     
========================================
+ Hits        112359   112395   +36     
  Misses       41822    41822           
Impacted Files Coverage Δ
src/analyses/goto_check.cpp 88.36% <100.00%> (+0.15%) ⬆️
src/solvers/flattening/bv_pointers.cpp 84.93% <100.00%> (+0.69%) ⬆️
src/solvers/flattening/bv_utils.h 85.71% <0.00%> (+1.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bbd1c9...93bd022. Read the comment docs.

@tautschnig tautschnig merged commit 726bf13 into diffblue:develop Feb 20, 2021
@tautschnig tautschnig deleted the keep-redundant-checks branch February 20, 2021 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants