Skip to content
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

w4_abc_{aiger,verilog}: Handle variable-less properties correctly #1943

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

RyanGlScott
Copy link
Contributor

Previously, any proofs involving the w4_abc_aiger (a.k.a., abc) or w4_abc_verilog proof scripts would succeed if they did not involve any variables, even false properties (e.g., False). This happened for a very silly reason: the counterexamples that the abc would generate contained a blank output (since there are no variables to describe), and SAW was misinterpreting this as a successful proof. Oops!

With this patch, SAW now properly distinguishes between an successful proof (in which case no counterexample file will be generated) and a unsuccessful proof involving no variables (in which case a blank counterexample file will be generated). This is admittedly a bit fiddly, as it requires making some assumptions about the format of the counterexample files that abc produces. Nevertheless, this does work on all the examples that I have tried.

Fixes #1938.

Previously, any proofs involving the `w4_abc_aiger` (a.k.a., `abc`) or
`w4_abc_verilog` proof scripts would succeed if they did not involve any
variables, even false properties (e.g., `False`). This happened for a very
silly reason: the counterexamples that the `abc` would generate contained a
blank output (since there are no variables to describe), and SAW was
misinterpreting this as a successful proof. Oops!

With this patch, SAW now properly distinguishes between an successful proof (in
which case no counterexample file will be generated) and a unsuccessful proof
involving no variables (in which case a blank counterexample file will be
generated). This is admittedly a bit fiddly, as it requires making some
assumptions about the format of the counterexample files that `abc` produces.
Nevertheless, this does work on all the examples that I have tried.

Fixes #1938.
@RyanGlScott RyanGlScott requested a review from qsctr September 19, 2023 19:11
Copy link
Contributor

@qsctr qsctr left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this! I don't know too much about SAW backend stuff but based on what you said in the ticket this looks good to me.

@RyanGlScott RyanGlScott added the PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run label Sep 20, 2023
@mergify mergify bot merged commit 9a390f3 into master Sep 20, 2023
@mergify mergify bot deleted the T1938 branch September 20, 2023 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

w4_abc_aiger proves False
2 participants