feat(analysis): ARINC-653 partition-supply-derived inner RTA (REQ-RTA-ARINC-SUPPLY-001)#332
Merged
Conversation
…-ARINC-SUPPLY-001)
Threads bound inside an ARINC-653 partition run against the partition
supply, not wall-clock. This adds an analysis pass that turns a periodic
resource Γ = (Π, Θ) into a per-inner-task worst-case response-time bound,
reusing the Lean-verified jittered+blocking RTA recurrence unchanged.
- (b) supply-derived release jitter J_i = 2(Π−Θ) (the worst-case
contiguous blackout), emitted as the busy-window w-form R = 2(Π−Θ) + w,
sound under the side condition w ≤ Θ. The recurrence's Converged/Diverged
distinction (deadline = Θ) IS that side-condition test.
- (c) cooperative non-preemptive blocking B_i = max_{lp} C_j^seg, derived
run-to-completion (C_j^seg = C_j) with a Poll_Segment_Time override.
- (d) demand-vs-supply fallback when w > Θ: lsbf_Γ(t) = ⌊Θ(t−2(Π−Θ))/Π⌋,
R = min{t : rbf(t) ≤ lsbf(t)} via a monotone fixed point (efficient on
ps-scale t). Unschedulable / ill-formed / extra-jitter+fallback → hard
Error, never a silently-wrong bound.
Inner threads are discovered by virtual-processor tree containment with no
Actual_Processor_Binding, so the ordinary RtaAnalysis skips them (unbound)
and this pass is the sole analyzer — no contradictory wall-clock number.
Pinned by integration_no_double_analysis_from_rta.
Golden (Γ = 1000µs/300µs, blackout 1400µs): τ1/τ2/τ3 → 1520/1570/1570 µs
in the busy-window w-form (form pinned in the assertion). Four fixtures:
jitter path, w>Θ fallback (2567µs), unschedulable hard Error, extra-jitter
decline. lsbf conservatism regression (τ3 → 1967µs) included.
Lean (ArincSupply.lean, 0 sorry): constant blocking folds into the release
jitter, so monotonicity + least-fixed-point convergence transfer from
RTAJittered.lean; lsbf monotone; conditional fallback soundness under an
explicit SupplyGuarantee hypothesis (PROVEN vs ASSUMED stated precisely —
the OS's supply contract is gust's obligation, not spar's proof).
Docs carry the two honesty caveats (sound-WCET inputs only; no
tool-qualification credit). Companion input-side issue synth#778.
Closes #331.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…an-room) A clean-room audit caught an over-claim (the #294 lesson): the requirement and the arinc_supply module docs listed "lsbf_Γ is a sound lower bound of the supply" under PROVEN. That inequality (lsbf_Γ ≤ real supply) is exactly the SupplyGuarantee hypothesis the Lean file only ASSUMES — spar does not formalize the periodic-resource supply-bound function, so nothing proves it. Move it to ASSUMED and state the actual PROVEN supply-side facts: lsbf_Γ monotonicity + zero-below-blackout, and the CONDITIONAL fallback soundness (given the guarantee, rbf ≤ lsbf ⟹ demand ≤ supply). No code logic changes; every emitted bound stays correct and conditionally sound. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rivet verification gate✅ 20/20 passed
Filter: Failed artifacts(none) Updated automatically by |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
CI proofs.yml (lake build, lean4 v4.29.0-rc6) reported ArincSupply.lean:159:4 "No goals to be solved": gcongr fully closes the lsbf monotonicity goal (discharging t₁−blackout ≤ t₂−blackout from the t₁≤t₂ hypothesis in context), so the trailing omega had no goal. Local Lean toolchain is unavailable here, so this was caught by CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 17, 2026
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.
Closes #331. Requirement
REQ-RTA-ARINC-SUPPLY-001→REQ-RTA-001/REQ-PROOF-SCHED-001/REQ-PROOF-ARINC653-001.Threads bound inside an ARINC-653 partition run against the partition supply, not wall-clock. This adds
Arinc653SupplyRtaAnalysis(crates/spar-analysis/src/arinc_supply.rs) that turns a periodic resourceΓ = (Π, Θ)into a per-inner-task worst-case response-time bound, reusing the Lean-verified jittered+blocking recurrence unchanged.The two paths
J_i = 2(Π−Θ)(worst-case contiguous blackout), emitted as the busy-window w-formR = 2(Π−Θ) + w, sound underw ≤ Θ. The single callcompute_response_time_jittered_blocking(C, deadline=Θ, jitter=0, B, hp=[(T,C,2(Π−Θ))])returnsConverged(w) ⟺ w≤Θ/Diverged ⟺ w>Θ— the divergence bound is the side-condition test.B_i = max_{lp} C_j^seg, derived run-to-completion (C_j^seg = C_j) with aPoll_Segment_Timeoverride.w>Θ:lsbf_Γ(t)=⌊Θ(t−2(Π−Θ))/Π⌋,R = min{t : rbf(t) ≤ lsbf(t)}via a monotone fixed point (efficient on ps-scalet). Unschedulable / ill-formed / extra-jitter+fallback → hard Error, never a silently-wrong bound.No double-analysis
Inner threads are discovered by VP-tree containment with no
Actual_Processor_Binding, so the ordinaryRtaAnalysisskips them (unbound) and this pass is their sole analyzer — no contradictory blackout-ignoring wall-clock number. Pinned byintegration_no_double_analysis_from_rta.Oracle
Golden (
Γ = 1000µs/300µs, blackout 1400µs): τ1/τ2/τ3 → 1520/1570/1570 µs in the busy-window w-form (form pinned in the assertion per #331's form note). Four fixtures: jitter path;w>Θfallback (2567µs); unschedulable hard Error; extra-jitter decline. Plus lsbf-conservatism regression (τ3 → 1967µs). AADL-level integration test builds the two-level model and asserts the emitted bounds + no-double-analysis. spar-analysis lib suite: 913/913. Workspace clippy-D warnings: clean.Lean (
proofs/Proofs/Scheduling/ArincSupply.lean, 0sorry)rtaStepJitteredBlocking_fold), so monotonicity + least-fixed-point convergence transfer fromRTAJittered.leanby the samebounded_mono_nat_seqargument;lsbfmonotone; conditional fallback soundness (fallback_sound_of_supply_guarantee).lsbf_Γ(t)— carried as theSupplyGuaranteeLean hypothesis. gust owns this contract.Honesty caveats (docs)
Sound-WCET inputs only (no measured high-water-marks; companion synth#778); an unqualified proof assistant carries no tool-qualification credit by itself.
Falsification
Reverting
J_i = 2(Π−Θ) → 0drops the golden to the wall-clock 120/170/170 µs (blackout ignored) —golden_jitter_path_*fail. Reverting thew>Θdispatch makesfixture2emit an unsound jitter number instead of the conservative 2567µs fallback.🤖 Generated with Claude Code