-
Notifications
You must be signed in to change notification settings - Fork 237
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
Some basic simplification rules for reals #3305
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mtzguido
added a commit
to mtzguido/pulse
that referenced
this pull request
May 23, 2024
This enables simplification rules (from FStarLang/FStar#3305) to kick in, and potentially significantly reduce the number of queries we send to the SMT. For instance, for DPE.fst: Before (595 total queries): Verified module: DPE All verification conditions discharged successfully ramon: end Thu May 23 10:25:28 2024 ramon: root.execname fstar.exe ramon: root.utime 12.940s ramon: root.stime 0.160s ramon: group.total 139.763s ramon: group.utime 139.459s ramon: group.stime 0.304s ramon: group.mempeak 2181MiB ramon: group.pidpeak 4 ramon: status exited ramon: exitcode 0 ramon: walltime 139.706s ramon: loadavg 1.00 After (448 total queries): Verified module: DPE All verification conditions discharged successfully ramon: end Thu May 23 10:31:30 2024 ramon: root.execname fstar.exe ramon: root.utime 12.550s ramon: root.stime 0.130s ramon: group.total 110.062s ramon: group.utime 109.754s ramon: group.stime 0.308s ramon: group.mempeak 2094MiB ramon: group.pidpeak 4 ramon: status exited ramon: exitcode 0 ramon: walltime 110.032s ramon: loadavg 1.00 So a 21% speedup. There are more optimizations we could do. The F* rules in that PR only check for 1.0/0.5/0.0 and decide comparisons between them.
This was referenced May 23, 2024
Merged
This is definitely incomplete, but already useful, so I'll merge it. |
mtzguido
added a commit
to mtzguido/pulse
that referenced
this pull request
Jun 25, 2024
This enables simplification rules (from FStarLang/FStar#3305) to kick in, and potentially significantly reduce the number of queries we send to the SMT. For instance, for DPE.fst: Before (595 total queries): Verified module: DPE All verification conditions discharged successfully ramon: end Thu May 23 10:25:28 2024 ramon: root.execname fstar.exe ramon: root.utime 12.940s ramon: root.stime 0.160s ramon: group.total 139.763s ramon: group.utime 139.459s ramon: group.stime 0.304s ramon: group.mempeak 2181MiB ramon: group.pidpeak 4 ramon: status exited ramon: exitcode 0 ramon: walltime 139.706s ramon: loadavg 1.00 After (448 total queries): Verified module: DPE All verification conditions discharged successfully ramon: end Thu May 23 10:31:30 2024 ramon: root.execname fstar.exe ramon: root.utime 12.550s ramon: root.stime 0.130s ramon: group.total 110.062s ramon: group.utime 109.754s ramon: group.stime 0.308s ramon: group.mempeak 2094MiB ramon: group.pidpeak 4 ramon: status exited ramon: exitcode 0 ramon: walltime 110.032s ramon: loadavg 1.00 So a 21% speedup. There are more optimizations we could do. The F* rules in that PR only check for 1.0/0.5/0.0 and decide comparisons between them.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are no primops or simplification rules for reals, which means
1.0R >. 0.0R
goes to SMT.I'm marking this as a draft since it's really some special casing to check for common VCs in Pulse. I could write something more general.. it's just slightly annoying as we have to work with the string representations and make sure we check for canonicity (1.0R vs 01.00R, etc). I wonder if, instead, we should write a library of rational numbers.