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

[Verif] Generalize Formal Contracts #7495

Merged
merged 2 commits into from
Aug 12, 2024
Merged

Conversation

dobios
Copy link
Member

@dobios dobios commented Aug 9, 2024

This PR redesigns the recent formal contract ops to allow for them to be used within an arbitrary scope and not just at the level of an entire module. This also removes the need for the verif.instance op.

@dobios dobios added the verif label Aug 9, 2024
Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

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

This looks reasonable!

One thing that isn't totally clear to me yet is what the basic block arguments do. Are they replaced by symbolic values when the contract is applied? In that case, can you pick any arbitrary number of block arguments since you may need any number of symbolic values to express your contract? Might this be easier to read with a verif.symbolic_value op that you've proposed before?

@dobios
Copy link
Member Author

dobios commented Aug 12, 2024

This looks reasonable!

One thing that isn't totally clear to me yet is what the basic block arguments do. Are they replaced by symbolic values when the contract is applied? In that case, can you pick any arbitrary number of block arguments since you may need any number of symbolic values to express your contract? Might this be easier to read with a verif.symbolic_value op that you've proposed before?

Thanks for the review! The reason I opted for block arguments was because I receive some push-back as to the usefulness of a dedicated symbolic value op, so I chose to use block arguments to generate the ssa values instead. Do you think that restoring the symbolic op is a better idea? I don't think that it will particularly make it easier to convert to btor2 later.

@dobios dobios merged commit bb6471f into main Aug 12, 2024
4 checks passed
@dobios dobios deleted the dev/dobios/update-contracts branch August 12, 2024 17:42
@fabianschuiki
Copy link
Contributor

👍 Sounds good. I guess the two are pretty much equivalent, either an arbitrary list of block arguments that are understood to become symbolic values, or a dedicated op and no block args. Whichever works best -- we can always change things later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants