Skip to content

feat(network): Spar_Network property set + spar-network crate skeleton (Track D commit 1/6)#155

Merged
avrabe merged 1 commit intomainfrom
feat/v0.8.0-track-d-commit1
Apr 25, 2026
Merged

feat(network): Spar_Network property set + spar-network crate skeleton (Track D commit 1/6)#155
avrabe merged 1 commit intomainfrom
feat/v0.8.0-track-d-commit1

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 25, 2026

Summary

Foundation only for v0.8.0 Track D (TSN/Ethernet WCTT analysis,
#149). This is commit 1 of 6 — surface only, no algorithms.

What's in (Phase 1 surface)

Property AADL type Applies to
Switch_Type enumeration (FIFO, Priority, TSN) bus
Queue_Depth aadlinteger bus, port
Forwarding_Latency Time_Range bus
Output_Rate Data_Rate bus, port

Switch_Type is the Option C discriminator (research PR #152, §5.2):
a switch is modeled as bus implementation carrying this property.

Output_Rate's type description is the literal string Data_Rate;
proper unit-aware parsing is deferred to the WCTT analysis pass
(commit 4) — same pragma Communication_Properties::Data_Rate uses
today.

What's out (lands in later Track D commits)

  • Network graph extraction from SystemInstance — commit 2
  • Network Calculus primitives (ArrivalCurve, ServiceCurve,
    min-plus convolution/deconvolution) — commit 3
  • wctt.rs analysis pass + latency.rs integration — commit 4
  • Lean min-plus algebra theorems — commit 5
  • COMPLIANCE.md + close-out — commit 6
  • TSN-specific properties (Spar_TSN::*) — Phase 2 (v0.8.x or
    v0.9.0)

Tests

Three new unit tests in crates/spar-hir-def/src/standard_properties.rs:

  • test_standard_properties_in_spar_network — all 4 props resolve
    to expected types (case-insensitive).
  • test_spar_network_property_set_resolved_via_global_scope
    GlobalScope::resolve_property returns PropertyDef without
    explicit with.
  • test_spar_network_unknown_property_returns_none — both layers
    (lookup table + global scope) reject unknown names.

Existing tests updated for the new total count (110 -> 114) and the
extended is_standard_property_set enumeration.

Rivet artifacts

  • REQ-NETWORK-001..003 appended to artifacts/requirements.yaml.
  • TEST-SPAR-NETWORK-PROPS appended to artifacts/verification.yaml,
    links to all three new requirements; mirrors the schema shape of
    TEST-SPAR-TIMING-PROPS.

Quality gates

  • cargo build --workspace — clean
  • cargo test -p spar-hir-def — 429 passed (3 new + 426 pre-existing)
  • cargo build -p spar-network — clean (skeleton compiles)
  • cargo test -p spar-network — 0 tests (skeleton, by design)
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • rivet validate — PASS (91 warnings, all pre-existing schema-info)

Refs

Test plan

  • Reviewer confirms property set surface matches the §5.1
    Phase 1 table and the issue's Switch_Type enum
    (FIFO / Priority / TSN — not the legacy none / store_and_forward / cut_through from the research doc, which was superseded).
  • Reviewer confirms pub mod types {} placeholder is acceptable
    vs. omitting it entirely; included so commit 2 is purely additive.
  • CI green (build, clippy, fmt, tests, rivet validate).

🤖 Generated with Claude Code

…n (Track D commit 1/6)

Foundation for v0.8.0 Track D (TSN/Ethernet WCTT analysis, #149).
This commit adds surface only — the new spar-network crate is a
skeleton placeholder, and the Spar_Network property set provides the
AADL vocabulary for switch modeling per the Option C decision in
PR #152's research (`bus implementation` + `Switch_Type` discriminator).

Spar_Network::{Switch_Type, Queue_Depth, Forwarding_Latency, Output_Rate}
covers Phase 1 (FIFO + Priority networks). Phase 2 TSN-specific
properties (Spar_TSN::*) land later.

No analysis wiring, no Network Calculus primitives, no Lean theorems
in this commit — those are Track D commits 2-5.

New requirements: REQ-NETWORK-{001,002,003}.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit 3ccf888 into main Apr 25, 2026
14 checks passed
@avrabe avrabe deleted the feat/v0.8.0-track-d-commit1 branch April 25, 2026 13:43
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