FStar icon indicating copy to clipboard operation
FStar copied to clipboard

WIP: printing used rlimit

Open mtzguido opened this issue 10 months ago • 1 comments

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.

mtzguido avatar Feb 12 '25 21:02 mtzguido

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.

mat888 avatar Feb 19 '25 02:02 mat888

A check world run: https://github.com/mtzguido/FStar/actions/runs/15992705758, failures are expected (same as for master right now)

mtzguido avatar Jul 01 '25 15:07 mtzguido