Count a timeout retry's flips instead of forbidding them - #29
Merged
Merged
Conversation
alanhc
force-pushed
the
timeout-retry-flip
branch
from
September 17, 2026 14:08
5b2c13a to
a4e4b95
Compare
jserv
reviewed
Sep 17, 2026
jserv
reviewed
Sep 17, 2026
Comment on lines
+7689
to
+7692
| /// The assertion here is one no prover discharges, so it times out again and | ||
| /// never flips. The overflow obligations RTE adds are provable, and whether one | ||
| /// exceeds T and proves within 2T is a fact about the machine: on a riscv64 VM | ||
| /// one does. So flips are counted rather than forbidden, and the unit test |
Contributor
There was a problem hiding this comment.
This comment now says a live flip can happen, but the doc comment on timeout_retry_report in src/mcp/server.rs still says "the live test only ever reaches this with an empty flip set". Update that sentence in this PR, or the two comments contradict each other.
alanhc
force-pushed
the
timeout-retry-flip
branch
from
September 18, 2026 10:48
a4e4b95 to
ca4f03c
Compare
a_timed_out_goal_is_retried_at_double_the_timeout asserted that every goal timing out at 1 s stayed unproved at 2 s and that nothing flipped. prover-timeout.c has one assertion no prover discharges, but RTE adds signed-overflow obligations for its cubes, and those are provable. Its own comment says how many of them exhaust one second is a fact about the machine, and the same holds for whether one then proves within two. On Ubuntu 24.04 riscv64 under qemu-system-riscv64, with Frama-C 33.0 and Alt-Ergo 2.6.3, it failed alone and in every full stdio run: two goals timed out, one stayed unproved, and typed_nocast_slow_assert_rte_signed_overflow flipped. The test now requires that at least one goal times out, that the goal named typed_nocast_slow_assert is still a timeout once the retry is done, and that it is never among the flips, matched exactly since the overflow obligations share its prefix. Pinning that goal by name is what keeps the flip check from passing vacuously if the id ever changes, and it subsumes the report's still_unproved, which is only the flip count subtracted from the timeout count. The retry, the doubled timeout and the cache check are unchanged. timeout_retry_report said the live test only ever reaches it with an empty flip set. It does not any more, so its doc comment says instead that the test cannot produce a flip on demand. Fixes sysprog21#28.
alanhc
force-pushed
the
timeout-retry-flip
branch
from
September 18, 2026 14:00
ca4f03c to
2a14875
Compare
This file contains hidden or 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
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.
a_timed_out_goal_is_retried_at_double_the_timeoutasserted that no goalflips, but the fixture has provable goals, and whether one of them times out at
1 s and then proves at 2 s depends on the host. Fixes #28.
Change
prover-timeout.chas one assertion,typed_nocast_slow_assert, that noprover discharges. RTE adds signed-overflow obligations for its cubes, and
those are provable. The test now requires that:
typed_nocast_slow_assertis never among the flips. The match is exact,because the overflow obligations share its prefix
(
typed_nocast_slow_assert_rte_signed_overflow).It does not assert that
still_unprovedandflippedadd up totimed_out_first_pass:timeout_retry_reportderivesstill_unprovedbysubtracting the flip count, so that equality holds by construction and says
nothing about WP.
The checks for the retry, the doubled timeout and the cache are unchanged. The
doc comment no longer says the flip set stays empty.
Testing
The goal name comes from running Frama-C 33.0 WP on the fixture directly
(
-wp-rte -wp-model Typed+nocast -wp-timeout 1 -wp-fct slow), which reports[Timeout] typed_nocast_slow_assert.2.6.3. Before this change the test failed alone and in every full stdio run,
with the same test body as on main. At 5b2c13a it passed 3 of 3 alone.
and
cargo clippy --all-targetsis clean.The full gate was not rerun, because the change is limited to this one test.
Summary by cubic
Fixes the timeout retry test so it counts flips instead of forbidding them, resolving a host-dependent failure on riscv64. The test previously asserted no goal could flip; now it requires at least one timed-out goal to remain unproved and never lets
typed_nocast_slow_assertitself flip. Retry, doubled timeout, and cache checks are unchanged. Thetimeout_retry_reportdoc comment now notes the live test can't force a flip on demand. Fixes #28.Written for commit 2a14875. Summary will update on new commits.