Thanks to visit codestin.com
Credit goes to github.com

Skip to content

WIP: printing used rlimit #3745

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

mtzguido
Copy link
Member

This adds a component in the output of --query_stats showing how much rlimit was actually used by a query. Marking this WIP since it uses a mutable variable to keep track of the previous rlimit-count, but this is wrong and probably an approximation too. The right thing is issuing another GetStatistics just prior to the check-sat and record the original rlimit-count.

Example:

(ulib/FStar.ModifiesGen.fst(888,0-932,19))      Query-stats (FStar.ModifiesGen.modifies_intro_strong, 1)        succeeded in 57 milliseconds with fuel 2 and ifuel 1 and rlimit 5 (used rlimit 0)
(ulib/FStar.ModifiesGen.fst(936,2-962,3))       Query-stats (FStar.ModifiesGen.modifies_intro_strong, 2)        succeeded in 1347 milliseconds with fuel 2 and ifuel 1 and rlimit 20 (used rlimit 10)
(ulib/FStar.ModifiesGen.fst(936,2-962,3))       Query-stats (FStar.ModifiesGen.modifies_intro_strong, 3)        failed {reason-unknown=unknown because unknown} in 2311 milliseconds with fuel 2 and ifuel 1 and rlimit 20 (used rlimit 20)
(ulib/FStar.ModifiesGen.fst(936,2-962,3))       Query-stats (FStar.ModifiesGen.modifies_intro_strong, 3)        succeeded in 675 milliseconds with fuel 2 and ifuel 2 and rlimit 20 (used rlimit 5)

Would be nice to print some decimal points too, and/or the percentage of total rlimit used.

This adds a component in the output of --query_stats showing how much
rlimit was actually used by a query. Marking this WIP since it uses a
mutable variable to keep track of the previous rlimit-count, but this is
wrong and probably an approximation too. The right thing is issuing
another GetStatistics just prior to the check-sat and record the
original rlimit-count.

Example:
```
(ulib/FStar.ModifiesGen.fst(888,0-932,19))      Query-stats (FStar.ModifiesGen.modifies_intro_strong, 1)        succeeded in 57 milliseconds with fuel 2 and ifuel 1 and rlimit 5 (used rlimit 0)
(ulib/FStar.ModifiesGen.fst(936,2-962,3))       Query-stats (FStar.ModifiesGen.modifies_intro_strong, 2)        succeeded in 1347 milliseconds with fuel 2 and ifuel 1 and rlimit 20 (used rlimit 10)
(ulib/FStar.ModifiesGen.fst(936,2-962,3))       Query-stats (FStar.ModifiesGen.modifies_intro_strong, 3)        failed {reason-unknown=unknown because unknown} in 2311 milliseconds with fuel 2 and ifuel 1 and rlimit 20 (used rlimit 20)
(ulib/FStar.ModifiesGen.fst(936,2-962,3))       Query-stats (FStar.ModifiesGen.modifies_intro_strong, 3)        succeeded in 675 milliseconds with fuel 2 and ifuel 2 and rlimit 20 (used rlimit 5)
```

Would be nice to print some decimal points too, and/or the percentage of
total rlimit used.
@mat888
Copy link

mat888 commented Feb 19, 2025

This would be very useful. Untrusted F* could be shared with the minimum rlimit required to succeed and skeptical parties would have an upper limit on 'time wasted' if it were to fail.

But as it is now, the only way to find this minimum rlimit seems to be guessing various values.

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.

2 participants