feat(network): NetworkGraph types + extractor (Track D commit 2/6)#157
Merged
feat(network): NetworkGraph types + extractor (Track D commit 2/6)#157
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Adds the bridge between AADL ItemTree and WCTT analysis. crates/spar-network/src/types.rs — NetworkNode, NetworkLink, SwitchType, NetworkGraph. Switch types: FIFO/Priority (Phase 1) and TSN (opaque until Phase 2's service curves land). crates/spar-network/src/extract.rs — walks SystemInstance, reads Spar_Network::* properties, emits a typed NetworkGraph. No Network Calculus, no analysis pass, no latency.rs integration — those are Track D commits 3, 4, and 6 respectively. New requirement: REQ-NETWORK-004. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8a97196 to
b0692c6
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.
Summary
Track D commit 2 of 6 for v0.8.0 — adds the typed network graph that
bridges the AADL
SystemInstanceand the upcoming WCTT analysis.crates/spar-network/src/types.rs—NetworkNode,NetworkLink,SwitchType(FIFO / Priority / TSN),NetworkGraphwithnodes,links,switches,end_stations, andreachable_fromaccessors.Phase 1 classifies TSN switches but treats them as opaque; full
TSN-shaped service curves arrive with the
Spar_TSNproperty set inPhase 2.
crates/spar-network/src/extract.rs— walksSystemInstance,classifies buses by
Spar_Network::Switch_Type, registers thedevices/processors connected to each switched bus as end stations,
and emits one
NetworkLinkper bus-touching connection. Each linkcarries
Output_Rate,Forwarding_Latency, andQueue_Depthfromthe bus, using a typed-first / string-fallback property accessor
pattern that mirrors
spar-analysis::property_accessors.crates/spar-network/tests/extract_tests.rs— 6 integration testsdriving small inline AADL fixtures: simple FIFO topology, Priority
switch classification, opaque TSN switch (with link annotations
still propagating), unannotated-bus skip, range latency lowering,
and graph reachability.
REQ-NETWORK-004(network graph extraction)and
TEST-SPAR-NETWORK-GRAPH(the new integration tests).What is intentionally out of scope
wctt.rsanalysis pass — Track D commit 4.latency.rsintegration or COMPLIANCE.md update — Track D commit 6.Links
docs/designs/track-d-tsn-wctt-research.md§5.4 / §6.1.Test plan
cargo build --workspacecleancargo test -p spar-network— 18 tests green (12 unit + 6 integration)cargo test -p spar-hir-def— 429 tests green (no regression)cargo test --workspace— all crates greencargo clippy --workspace --all-targets -- -D warningscleancargo fmt --all -- --checkcleanrivet validate—Result: PASS🤖 Generated with Claude Code