Replace reach_error (or equivalent) with assert(0) #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, all unreach_call benchmarks would call reach_error() which would contain assert(0). 2LS and CBMC relied on this fact to check the property. However, as per the rules, assert(0) may not necesarilly be present and just calling a function specified in the property file suffices.
To overcome this, parse the function which causes a fail from the property file and replace its body with assert(0) using goto-instrument.
I've tried to update this for all the relevant archives. I am not great with bash and perl but hopefully this fix should work. I've tried it with 2LS, unreach-call property and https://gitlab.com/sosy-lab/benchmarking/sv-benchmarks/-/blob/main/c/hardware-verification-bv/btor2c-eagerMod.adding.1.prop1-back-serstep.c and 2LS produced an error thanks to the instrumentation which it previously did not.
CC: @viktormalik @peterschrammel @tautschnig