Solution strategy and decisions¶
arc42 §5 — the architecture decisions that shape the toolchain. Each
arch-decision :refines: the requirement or feature it serves.
Context. taktora already has a device-plane IR
( Decision. Introduce Consequences. ✅ Each plane evolves on its own axis; a CAN signal model does not leak into a device’s object dictionary. ✅ Frontends and backends compose per plane. ❌ Two IR crates to learn — mitigated by their parallel structure, so a reader who knows one reads the other. |
Context. Code emission needs Decision. Put the runtime contract — the Consequences. ✅ A consumer links a tiny, auditable crate, not the codegen toolchain. ✅ The encode/decode contract is verifiable in isolation. ❌ The generated code and the runtime crate must agree on a stable primitive surface — a deliberate, small API boundary. |
Context. The IR’s central invariant is boundedness. OMG IDL and
ROS 2 Decision. Ship DBC first. Every DBC message has a fixed DLC and
every signal a fixed bit width, so lowering a Consequences. ✅ The first proof-of-life is the simplest possible. ✅ The unbounded-rejection path is added later without reworking the pipeline. ❌ The rejection path is unexercised until a second frontend lands (tracked as Unbounded-rejection path un... (RISK_0024)). |
Context. Naming policy, identifier collision detection, and field classification are wire-format-independent; bit-packing a CAN frame is not. Folding both into one crate would force every future backend (CDR, a minimal codec) to recompile the CAN opinion. Decision. Consequences. ✅ New backends are net-additive — no churn in the IR, naming, or resolve layers. ✅ The CAN backend is small: it adds only the wire format. ❌ One more crate boundary than a monolith — accepted, matching the device-plane toolchain’s layering. |