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

Bv synonyms #1406

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Bv synonyms #1406

wants to merge 23 commits into from

Conversation

typerSniper
Copy link
Contributor

@typerSniper typerSniper commented Aug 31, 2021

feat: /useBvSynonyms flag to use bv synonyms. Instead of defining bit vector operations directly as Z3 builtins, I add a dafny level function with an axiom saying that it is equal to the builtin. Just like multiplication.

I've also inserted split_here assertions to make one of the tests go through faster.

Future Work: Allow synonyms and builtins to be used at a finer granularity, i.e., let the programmer control for each method/function, whether or not the synonyms are used.

@typerSniper typerSniper marked this pull request as ready for review August 31, 2021 22:01
@typerSniper
Copy link
Contributor Author

@RustanLeino, I couldn't figure out some of the code formatting errors. It looks like a recent change?

@keyboardDrummer
Copy link
Member

@RustanLeino, I couldn't figure out some of the code formatting errors. It looks like a recent change?

You can run dotnet-format -w Source/Dafny.sln to resolve them, although if you're editing with Rider/Visual Studio I wouldn't expect them to occur. You can also use pre-commit to run the dotnet-format command on your commits.

@typerSniper
Copy link
Contributor Author

That works! Thanks

@typerSniper
Copy link
Contributor Author

@RustanLeino, can you take a look and merge ;p

Copy link
Collaborator

@RustanLeino RustanLeino left a comment

Choose a reason for hiding this comment

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

Looks good, and I have but one comment: Please make the flag /useBvSynonyms take an argument (like 0 or 1). This will make it easier for us to change the default of this option in the future, without breaking anyone using the switch already.

@typerSniper
Copy link
Contributor Author

typerSniper commented Sep 17, 2021

I updated the flag to take a 0/1 argument.

@RustanLeino, @keyboardDrummer, the failing case is a SegFault during build. Can you take a look?

@keyboardDrummer
Copy link
Member

@RustanLeino, @keyboardDrummer, the failing case is a SegFault during build. Can you take a look?

Not sure what causes those. Restarted the build.

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.

3 participants