feat(dbc): CAN message flows as AADL ports + bus-bound connections (REQ-INGEST-DBC-FLOWS-001)#289
Merged
Merged
Conversation
…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>
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
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:
out event data porton itsBO_transmitter node,in event data porton everySG_receiver node (union of the frame's signal receiver lists),portconnections, each carryingDeployment_Properties::Actual_Connection_Binding => (reference (can_bus)).Event-data ports model the discrete, data-carrying CAN frame; one broadcast
outport fanning out to severalinports mirrors CAN's one-to-many. A frame is wired only when it has both a known transmitter and ≥1 known receiver (theVector__XXXplaceholder and unknown names are dropped) — so no port is left dangling. Frames lacking either end still emit theirdatatype, 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, soextract_network_graphcorrectly 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::instantiatewith zero diagnostics. New testsample_dbc_emits_message_flowspins the EngineData (EngineECU → Gateway+System) and Status (Gateway → EngineECU) flows, the bus binding, and that theVector__XXXBroadcast frame yields its data type but no flow ports.Traceability
REQ-INGEST-DBC-FLOWS-001→implemented(description corrected to the faithful-modelling, not-NC-feeder scope).TEST-INGEST-DBC-FLOWSadded inverification.yaml,satisfiesthe requirement.🤖 Generated with Claude Code