Skip to content

Replace reach_error (or equivalent) with assert(0) #66

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 1 commit into from
Nov 18, 2022

Conversation

FrNecas
Copy link
Contributor

@FrNecas FrNecas commented Nov 1, 2022

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

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.

Signed-off-by: František Nečas <[email protected]>
@tautschnig tautschnig merged commit 0266e23 into diffblue:master Nov 18, 2022
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.

4 participants