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

[Boogie Backend] Add SMT bit-vector builtin operations #2901

Merged

Conversation

zhassan-aws
Copy link
Contributor

Define SMT bit-vector builtin operations (e.g. bvult, bvadd, bvand, etc.) as functions in the preamble and codegen MIR binary operations as calls to those functions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@zhassan-aws zhassan-aws requested a review from a team as a code owner November 28, 2023 22:14
@github-actions github-actions bot added the Z-BenchCI Tag a PR to run benchmark CI label Nov 28, 2023
@zhassan-aws zhassan-aws changed the title Add SMT bit-vector builtin operations [Boogie Backend] Add SMT bit-vector builtin operations Nov 29, 2023
Copy link
Contributor

@celinval celinval left a comment

Choose a reason for hiding this comment

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

It looks good. I really think it would be great if you could add some sort of tests. It would likely help catch any mistake, more than our eyes can.

@zhassan-aws
Copy link
Contributor Author

I really think it would be great if you could add some sort of tests. It would likely help catch any mistake, more than our eyes can.

Yes, this is something I'm annoyed about. I currently manually run tests locally before opening a PR to make sure nothing broke. to To have proper tests, we'd need to install the Boogie verifier in our CI and update the Kani driver to call it. This will require a bit of work though. In the meantime, we can add tests that check that the generated Boogie file is what we expect it to be (or at least contains some of the lines we're expecting). Such tests may be fragile though due to changes in MIR.

@celinval
Copy link
Contributor

celinval commented Dec 4, 2023

I really think it would be great if you could add some sort of tests. It would likely help catch any mistake, more than our eyes can.

Yes, this is something I'm annoyed about. I currently manually run tests locally before opening a PR to make sure nothing broke. to To have proper tests, we'd need to install the Boogie verifier in our CI and update the Kani driver to call it. This will require a bit of work though. In the meantime, we can add tests that check that the generated Boogie file is what we expect it to be (or at least contains some of the lines we're expecting). Such tests may be fragile though due to changes in MIR.

I think the second option might be helpful while you are still working from a branch. I'm assuming you don't merge with main very often, do you?

@zhassan-aws
Copy link
Contributor Author

zhassan-aws commented Dec 4, 2023

I think the second option might be helpful while you are still working from a branch.

Sounds good. If you don't mind, I'll add those tests in a follow-up PR.

I'm assuming you don't merge with main very often, do you?

No, this is kept separate from main for now. I do rebase it off of main frequently though, so it wouldn't be difficult to merge to main.

@zhassan-aws
Copy link
Contributor Author

Sounds good. If you don't mind, I'll add those tests in a follow-up PR.

Created #2914.

@zhassan-aws zhassan-aws merged commit e907a73 into model-checking:features/boogie Dec 6, 2023
13 of 14 checks passed
@zhassan-aws zhassan-aws deleted the smt-builtins branch December 6, 2023 00:47
zhassan-aws added a commit that referenced this pull request Dec 7, 2023
Define SMT bit-vector builtin operations (e.g. `bvult`, `bvadd`,
`bvand`, etc.) as functions in the preamble and codegen MIR binary
operations as calls to those functions.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
zhassan-aws added a commit that referenced this pull request Dec 13, 2023
Define SMT bit-vector builtin operations (e.g. `bvult`, `bvadd`,
`bvand`, etc.) as functions in the preamble and codegen MIR binary
operations as calls to those functions.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
zhassan-aws added a commit that referenced this pull request Dec 15, 2023
Define SMT bit-vector builtin operations (e.g. `bvult`, `bvadd`,
`bvand`, etc.) as functions in the preamble and codegen MIR binary
operations as calls to those functions.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
zhassan-aws added a commit that referenced this pull request Dec 19, 2023
Define SMT bit-vector builtin operations (e.g. `bvult`, `bvadd`,
`bvand`, etc.) as functions in the preamble and codegen MIR binary
operations as calls to those functions.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-BenchCI Tag a PR to run benchmark CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants