Skip to content

Mechanized LeanGuard replay lemmas.#97

Merged
baochunli merged 1 commit into
mainfrom
leanguard-tracespec-replay
May 29, 2026
Merged

Mechanized LeanGuard replay lemmas.#97
baochunli merged 1 commit into
mainfrom
leanguard-tracespec-replay

Conversation

@baochunli

Copy link
Copy Markdown
Collaborator

This PR mechanized the checker-side replay scope needed by the LeanGuard paper revision. It adds a shared TraceSpec replay skeleton and representative AQM/PFC instantiations without claiming independent validation of every protocol specification.

Changes

  • Added a shared TraceSpec interface for canonical trace replay, with executable replay, coverage-observing replay, a replay relation induced by the checker step function, replay soundness lemmas, and invariant-preservation lemmas.

  • Refactored the AQM and PFC event-log checkers to replay canonical rows through the shared TraceSpec skeleton while preserving coverage reporting and first-failure behavior.

  • Added AQM and PFC soundness theorems connecting successful checker runs to canonical TraceSpec replay over the sorted row sequence.

Validation

  • Ran cd /Users/bli/Playground/days/lean && lake build dcqcn_check pfc_check cubic_check drr_check wfq_check aqm_check aqm_dcqcn_check.

  • Ran cd /Users/bli/Playground/days && bash lean/scripts/run-aqm-fixtures.sh.

  • Ran cd /Users/bli/Playground/days && bash lean/scripts/run-aqm-coverage-fixtures.sh.

  • Ran cd /Users/bli/Playground/days && cargo run --features "l2_pfc,lean" --bin leanguard-run -- --config configs/ci/leanguard_pfc.toml --checker-dir lean/.lake/build/bin.

  • Ran git diff --check.

Add a shared TraceSpec replay skeleton with mechanized soundness and invariant-preservation lemmas for canonical trace replay.

Instantiate the replay skeleton for the AQM and PFC event-log checkers, including coverage-observing replay and checker-level soundness theorems that connect successful checks to canonical TraceSpec replay.

Validation:
- cd /Users/bli/Playground/days/lean && lake build dcqcn_check pfc_check cubic_check drr_check wfq_check aqm_check aqm_dcqcn_check
- cd /Users/bli/Playground/days && bash lean/scripts/run-aqm-fixtures.sh
- cd /Users/bli/Playground/days && bash lean/scripts/run-aqm-coverage-fixtures.sh
- cd /Users/bli/Playground/days && cargo run --features "l2_pfc,lean" --bin leanguard-run -- --config configs/ci/leanguard_pfc.toml --checker-dir lean/.lake/build/bin

Co-authored-by: Codex <codex@openai.com>
@baochunli baochunli merged commit c182184 into main May 29, 2026
8 checks passed
@baochunli baochunli deleted the leanguard-tracespec-replay branch May 29, 2026 08:51
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