-
Notifications
You must be signed in to change notification settings - Fork 63
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
Cryptol comparisons don't translate nicely into saw-core #1565
Comments
Turns out this is not specific to signed comparisons. Ordinary
|
<$
doesn't translate nicely into saw-core
The problem comes from the way the saw-script/cryptol-saw-core/saw/Cryptol.sawcore Lines 537 to 541 in db538d3
saw-script/cryptol-saw-core/saw/Cryptol.sawcore Lines 583 to 587 in db538d3
Instead of only a single continuation-style all-purpose comparison operator, the class dictionary also needs ordinary comparison operators that can be defined without extra |
Does the standard simpset not include boolean identities that would collapse this? |
There are some rewrite rules in |
Looks like that design choice first came in here: 0e78371 Do you recall if there was a particular reason to do things that way, or was it just convenient? |
I remember implementing that dictionary passing translation. There was a specific reason for using the |
Maybe we could change the type of |
Yeah, I thought about using a |
Also add similar `slt` field to `SignedCmp` dictionary. These fields are used to simplify the formulas generated by the cryptol-saw-core translator for Cryptol operators like `<` and `<$`, avoiding redundant logical connectives. Fixes #1565.
Also add similar `slt` field to `SignedCmp` dictionary. These fields are used to simplify the formulas generated by the cryptol-saw-core translator for Cryptol operators like `<` and `<$`, avoiding redundant logical connectives. Fixes #1565.
When you translate a Cryptol term using the
<$
operator into SAW, you currently get an unnecessarily complicated term:The
or _ (and (bvEq x y) False)
part is completely redundant. We should translate this simply asbvslt
.The text was updated successfully, but these errors were encountered: