Skip to content

feat(dbc): CAN message flows as AADL ports + bus-bound connections (REQ-INGEST-DBC-FLOWS-001)#289

Merged
avrabe merged 1 commit into
mainfrom
feat/v0.20.0-dbc-flows
Jun 15, 2026
Merged

feat(dbc): CAN message flows as AADL ports + bus-bound connections (REQ-INGEST-DBC-FLOWS-001)#289
avrabe merged 1 commit into
mainfrom
feat/v0.20.0-dbc-flows

Conversation

@avrabe

@avrabe avrabe commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What

First feature of the v0.20.0 ingest track. Extends DBC ingest (REQ-INGEST-DBC-001, v0.17.0) to model per-message dataflow on top of the existing bus + devices + frame-data-types model.

Each CAN frame now becomes:

  • an out event data port on its BO_ transmitter node,
  • an in event data port on every SG_ receiver node (union of the frame's signal receiver lists),
  • joined by port connections, each carrying Deployment_Properties::Actual_Connection_Binding => (reference (can_bus)).

Event-data ports model the discrete, data-carrying CAN frame; one broadcast out port fanning out to several in ports mirrors CAN's one-to-many. A frame is wired only when it has both a known transmitter and ≥1 known receiver (the Vector__XXX placeholder and unknown names are dropped) — so no port is left dangling. Frames lacking either end still emit their data type, unchanged.

Scope — faithful CAN modelling, not a network-calculus feeder

These connections are for traceability, diagrams and codegen. They are not wired into spar's FIFO TFA/PLP network-calculus engine: CAN is priority-arbitrated, not FIFO, so a FIFO bound over it would be unsound. The CAN bus carries no Spar_Network::Switch_Type, so extract_network_graph correctly ignores it (consistent with REQ-NC-BRIDGE-001, which already excludes CAN). CAN response-time analysis remains a separate Tindell track behind its own soundness gate.

Oracle

The spar-dbc round-trip test is the oracle: the emitted AADL (ports, connections, bus binding) must parse → item-tree → scope → SystemInstance::instantiate with zero diagnostics. New test sample_dbc_emits_message_flows pins the EngineData (EngineECU → Gateway+System) and Status (Gateway → EngineECU) flows, the bus binding, and that the Vector__XXX Broadcast frame yields its data type but no flow ports.

Traceability

  • REQ-INGEST-DBC-FLOWS-001implemented (description corrected to the faithful-modelling, not-NC-feeder scope).
  • TEST-INGEST-DBC-FLOWS added in verification.yaml, satisfies the requirement.

🤖 Generated with Claude Code

…ons (REQ-INGEST-DBC-FLOWS-001)

Extend DBC ingest to emit per-message dataflow on top of the v0.17.0
bus+devices+frame-types model. Each frame becomes an `out event data
port` on its `BO_` transmitter node and an `in event data port` on every
`SG_` receiver node, joined by `port` connections carrying
`Deployment_Properties::Actual_Connection_Binding => (reference
(can_bus))`. Event-data ports model the discrete data-carrying CAN frame;
one broadcast `out` port fanning out to several `in` ports mirrors CAN's
one-to-many. A frame is wired only when it has both a known transmitter
and >=1 known receiver (the `Vector__XXX` placeholder and unknown names
dropped), so no port is left dangling; frames lacking either end still
emit their `data` type.

Scope: this is faithful CAN dataflow modelling for traceability, diagrams
and codegen — NOT a network-calculus feeder. spar's TFA/PLP are FIFO; CAN
is priority-arbitrated, so a FIFO bound over it would be unsound. The CAN
bus carries no `Spar_Network::Switch_Type`, so `extract_network_graph`
correctly ignores it (cf. REQ-NC-BRIDGE-001). CAN response-time analysis
stays a separate Tindell track behind its own soundness gate.

Verified by the spar-dbc round-trip oracle: the emitted AADL (ports,
connections, bus binding) must parse + instantiate with zero diagnostics.
New test `sample_dbc_emits_message_flows`; TEST-INGEST-DBC-FLOWS in
verification.yaml; REQ-INGEST-DBC-FLOWS-001 -> implemented.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Rivet verification gate

20/20 passed

count
Passed 20
Failed 0
Skipped (no steps) 0

Filter: (and (= type "feature") (or (has-tag "v093") (has-tag "v0100")))

Failed artifacts

(none)

Updated automatically by tools/post_verification_comment.py. Source of truth: artifacts/verification.yaml.

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.36842% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/spar-dbc/src/lib.rs 97.33% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit 4fab307 into main Jun 15, 2026
18 checks passed
@avrabe avrabe deleted the feat/v0.20.0-dbc-flows branch June 15, 2026 02:45
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