Skip to content

Retry timed-out SMT queries with perturbed seeds; report slowest VCs - #21

Open
larskuhtz wants to merge 1 commit into
verse-lab:mainfrom
larskuhtz:port/smt-retry
Open

Retry timed-out SMT queries with perturbed seeds; report slowest VCs#21
larskuhtz wants to merge 1 commit into
verse-lab:mainfrom
larskuhtz:port/smt-retry

Conversation

@larskuhtz

Copy link
Copy Markdown

Large sweeps are tail-dominated, and part of the tail is seed luck: cvc5's e-matching on Veil's VC shapes can diverge under one random seed and finish in seconds under another, so a query that timed out once may be provable cheaply on a second attempt.

  • Retry-on-timeout (veil.smt.retries, default 1): each VC gets retry dischargers that only fire after an earlier attempt timed out (never after sat, genuine unknown, or non-timeout errors). Attempt k re-runs the discharge tactic with the solver seed set to k (veil.smt.seed -> cvc5 seed/sat-random-seed) and a short budget (veil.smt.retryTimeout, default 120 s) -- timed-out-but-provable queries either finish fast under a fresh seed or not at all. The perturbed options are baked into the proof term via set_option ... in, so witness (re-)elaboration at #gen_theorems time replays the exact configuration that succeeded. Retried successes are reported as "(retry k, seed k)" so flakiness stays visible.

  • Slowest-VCs report (veil.report.slowVCs, default 10): check commands now list the slowest discharge attempts (including failed ones, which burn the full timeout), flagging any above veil.report.nearTimeoutPercent of veil.smt.timeout as near-timeout -- these are the divergence candidates one model change away from a timeout. Attempts under veil.report.slowVCsMinMs (default 5 s) are not reported, so output stays deterministic for fast specifications (#guard_msgs).

…slowest VCs

Large sweeps are tail-dominated, and part of the tail is seed luck:
cvc5's e-matching on Veil's VC shapes can diverge under one random seed
and finish in seconds under another, so a query that timed out once may
be provable cheaply on a second attempt.

* Retry-on-timeout (veil.smt.retries, default 1): each VC gets retry
  dischargers that only fire after an earlier attempt *timed out* (never
  after sat, genuine unknown, or non-timeout errors). Attempt k re-runs
  the discharge tactic with the solver seed set to k
  (veil.smt.seed -> cvc5 seed/sat-random-seed) and a short budget
  (veil.smt.retryTimeout, default 120 s) -- timed-out-but-provable
  queries either finish fast under a fresh seed or not at all. The
  perturbed options are baked into the proof term via `set_option ... in`,
  so witness (re-)elaboration at #gen_theorems time replays the exact
  configuration that succeeded. Retried successes are reported as
  "(retry k, seed k)" so flakiness stays visible.

* Slowest-VCs report (veil.report.slowVCs, default 10): check commands
  now list the slowest discharge attempts (including failed ones, which
  burn the full timeout), flagging any above
  veil.report.nearTimeoutPercent of veil.smt.timeout as near-timeout --
  these are the divergence candidates one model change away from a
  timeout. Attempts under veil.report.slowVCsMinMs (default 5 s) are
  not reported, so output stays deterministic for fast specifications
  (#guard_msgs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@larskuhtz
larskuhtz changed the base branch from veil-2.0-preview to main August 21, 2026 22: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