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

FractionalPermission: use a literal 0.0R #83

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

mtzguido
Copy link
Member

(this depends on FStarLang/FStar#3305 to make sense)

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 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.
@mtzguido mtzguido force-pushed the real_optimizations branch from cbc1ae5 to 405ba55 Compare June 25, 2024 04:58
@mtzguido mtzguido enabled auto-merge June 25, 2024 05:21
@mtzguido mtzguido merged commit bf61a73 into FStarLang:main Jun 25, 2024
1 check passed
@mtzguido mtzguido deleted the real_optimizations branch June 25, 2024 05:34
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.

1 participant