feat(analysis): AADL→CQF synthesis bridge (REQ-TSN-SYNTH-CQF-BRIDGE-001)#292
Merged
Conversation
Extract CQF synthesis inputs directly from an AADL SystemInstance and run the literature-pinned synthesizer (synthesize_cqf, REQ-TSN-SYNTH-CQF-BASE-001) over them, so a real model drives standard 802.1Qch CQF configuration. The synthesized schedule (or any synthesis error / soundness warning) is surfaced as analysis diagnostics. Scope — table-stakes, NOT the wedge. This is AADL→TSN-config glue: the demonstrable end-to-end ship that makes spar a configuration generator a user can run on their own model. It composes NO network calculus and is explicitly NOT the PLP≪TFA strategic wedge. CQF's bounded delay depends only on (hops, cycle time) (IETF draft-eckert-detnet-tcqf-05), so the bridge needs the routing topology and a few per-flow scalars — nothing from the NC engine, no per-class composition soundness obligation. Extraction reuses the WCTT routing walk (collect_streams, made pub(crate)) rather than reimplementing the Actual_Connection_Binding resolution. Per stream: deadline (skip with an Info diag if absent — no invented deadline), Spar_TSN::Max_Frame_Size × 8 (default one MTU), the bound switch sequence as the hop path, and the minimum switch Output_Rate as the conservative homogeneous link rate. Soundness guard: one frame per cycle is sound only when the synthesized cycle time T ≤ a flow's period. Deadline > Period is AADL-legal; the bridge checks T ≤ period post-synthesis and emits CqfSynthUnsound rather than silently under-reserving. NO new dependency. register_all 31→32. Tests (11, all green) are mutation-complete: `cargo mutants -f cqf_synth.rs` reports 0 survivors (12 caught, 3 unviable) — spar-analysis is the mutation-gated crate, so every branch is killed: - hand-computed schedule oracle pinned to D_max = (H+1)·T = deadline - schedule-diagnostic emission; min-rate over a 2-hop path - CqfSynthUnsound on Deadline>Period; non-regression (no switched buses) - CqfSynthSkipped (no timing budget); CqfSynthError (deadline below floor) - link_rate None early-return; DEFAULT_FRAME_BYTES fallback - name() identity; soundness-guard boundary T == period stays sound (> not >=) Traceability: REQ-TSN-SYNTH-CQF-BRIDGE-001 (requirements.yaml), TEST-TSN-SYNTH-CQF-BRIDGE (verification.yaml), both v0.20.0. 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! |
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.
What
Extracts CQF synthesis inputs directly from an AADL
SystemInstanceand runs the literature-pinned synthesizer (synthesize_cqf, REQ-TSN-SYNTH-CQF-BASE-001) over them, so a real model — not a hand-builtCqfFlowset — drives standard 802.1Qch CQF configuration. The synthesized schedule (or any synthesis error / soundness warning) surfaces as analysis diagnostics via a newCqfSynthAnalysispass.Scope — table-stakes, NOT the wedge
This is AADL→TSN-config glue: the demonstrable end-to-end ship that makes spar a configuration generator a user can run on their own model. It composes no network calculus and is explicitly NOT the PLP≪TFA strategic wedge. CQF's bounded delay depends only on
(hops, cycle time)(IETFdraft-eckert-detnet-tcqf-05), so the bridge needs the routing topology and a few per-flow scalars — nothing from the NC engine, no per-class composition soundness obligation.How
collect_streams(WCTT pass) is madepub(crate)and reused — theActual_Connection_Bindingresolution is the genuinely hard part and already exists.CqfFlow: deadline (skip with an Info diag if absent — never an invented deadline),Spar_TSN::Max_Frame_Size × 8(default one MTU), the bound switch sequence as the hop path, and the minimum switchOutput_Rateas the conservative homogeneous link rate (slowest link binds the cycle budget).T ≤ period.Deadline > Periodis AADL-legal, so the bridge checksT ≤ periodpost-synthesis and emitsCqfSynthUnsoundrather than silently under-reserving.register_all31→32.Oracle / verification
Tests are mutation-complete:
cargo mutants -f cqf_synth.rs→ 0 survivors (12 caught, 3 unviable).spar-analysisis the mutation-gated crate, so every viable branch is killed. Highlights:D_max = (H+1)·T = deadline.CqfSynthSkipped(no timing budget),CqfSynthError(deadline below the irreducible cycle floor),link_rate Noneearly-return,DEFAULT_FRAME_BYTESfallback.T == periodstays sound (pins>, not>=).CqfSynthUnsoundonDeadline>Period; non-regression (no switched buses → no diagnostics).Local gates: 889
spar-analysislib tests pass;cargo fmt --all --checkclean;clippy -D warningsclean.Traceability
REQ-TSN-SYNTH-CQF-BRIDGE-001(requirements.yaml),TEST-TSN-SYNTH-CQF-BRIDGE(verification.yaml) — bothrelease: v0.20.0.Falsification statement
If an AADL model declares switched buses with
Output_Rate, bound end-to-end streams with deadlines, and frame sizes, thenCqfSynthAnalysisemits a CQF schedule whose structural delay(H+1)·Tmeets every flow's deadline and whose per-cycle reservation fitscsize = T·link_rate— or a precise diagnostic (CqfSynthSkipped/CqfSynthError/CqfSynthUnsound) explaining why it cannot. It composes no network calculus and makes no PLP/TFA tightness claim.🤖 Generated with Claude Code