|
4 | 4 |
|
5 | 5 | (meta |
6 | 6 | (version "0.1.0") |
7 | | - (last-updated "2026-03-20") |
| 7 | + (last-updated "2026-03-21") |
8 | 8 |
|
9 | 9 | (architecture-decisions |
10 | 10 | (adr "001-iser-pattern" |
11 | 11 | (status "accepted") |
12 | | - (context "Need to make powerful languages accessible without steep learning curves") |
13 | | - (decision "Use manifest-driven code generation: user describes WHAT, tool generates HOW") |
14 | | - (consequences "Users write zero target language code; all complexity in the -iser")) |
| 12 | + (context "Need to make Lustre synchronous dataflow programming accessible without requiring Lustre expertise") |
| 13 | + (decision "Use manifest-driven code generation: user describes control system in TOML, lustreiser generates Lustre nodes, proves timing bounds, and compiles to deterministic C") |
| 14 | + (consequences "Users write zero Lustre code; all clock calculus and temporal operators generated automatically")) |
15 | 15 |
|
16 | 16 | (adr "002-abi-ffi-standard" |
17 | 17 | (status "accepted") |
18 | | - (context "Need verified interop between Rust CLI, target language, and user code") |
19 | | - (decision "Idris2 ABI for formal proofs, Zig FFI for C-ABI bridge") |
20 | | - (consequences "Compile-time correctness guarantees; zero runtime overhead from proofs")) |
| 18 | + (context "Need verified interop between Rust CLI, Lustre compilation, and embedded C output") |
| 19 | + (decision "Idris2 ABI for formal timing proofs (WCET bounds, clock calculus soundness), Zig FFI for C-ABI bridge to Lustre compiler") |
| 20 | + (consequences "Compile-time guarantee that every node meets its deadline; zero runtime overhead from proofs")) |
21 | 21 |
|
22 | | - (adr "003-rsr-template" |
| 22 | + (adr "003-synchronous-hypothesis" |
| 23 | + (status "accepted") |
| 24 | + (context "Lustre assumes all computations complete within one clock tick (synchronous hypothesis)") |
| 25 | + (decision "Enforce synchronous hypothesis via Idris2 WCET proofs: prove that worst-case execution time is strictly less than clock period for every node") |
| 26 | + (consequences "Generates only code that provably meets hard real-time deadlines; rejects specifications that cannot be proven safe")) |
| 27 | + |
| 28 | + (adr "004-deterministic-c-output" |
| 29 | + (status "accepted") |
| 30 | + (context "Safety-critical standards (DO-178C, IEC 61508, ISO 26262) require deterministic, bounded-time execution") |
| 31 | + (decision "Generated C code must use no malloc, no recursion, no unbounded loops, and only statically allocated buffers") |
| 32 | + (consequences "Output is certifiable for safety-critical deployment; memory footprint is known at compile time")) |
| 33 | + |
| 34 | + (adr "005-rsr-template" |
23 | 35 | (status "accepted") |
24 | 36 | (context "Need consistent project structure across 29+ -iser repos") |
25 | 37 | (decision "All repos cloned from rsr-template-repo with full CI/CD and governance") |
26 | 38 | (consequences "17 workflows, SECURITY.md, CONTRIBUTING, bot directives from day one"))) |
27 | 39 |
|
28 | 40 | (development-practices |
29 | | - (language "Rust" (purpose "CLI and orchestration")) |
30 | | - (language "Idris2" (purpose "ABI formal proofs")) |
31 | | - (language "Zig" (purpose "FFI C-ABI bridge")) |
| 41 | + (language "Rust" (purpose "CLI, manifest parsing, orchestration")) |
| 42 | + (language "Idris2" (purpose "ABI formal proofs — timing bounds, clock calculus, memory layout")) |
| 43 | + (language "Zig" (purpose "FFI C-ABI bridge — Lustre compilation and timing analysis")) |
| 44 | + (language "Lustre" (purpose "Generated synchronous dataflow code — nodes, clocks, temporal operators")) |
| 45 | + (language "C" (purpose "Final embedded output — deterministic, no-malloc, certifiable")) |
32 | 46 | (build-tool "cargo") |
33 | 47 | (ci "GitHub Actions (17 workflows)")) |
34 | 48 |
|
35 | 49 | (design-rationale |
36 | 50 | (principle "Manifest-driven" |
37 | 51 | (explanation "User intent captured in TOML; all generation is deterministic and reproducible")) |
38 | | - (principle "Formally verified bridges" |
39 | | - (explanation "Idris2 dependent types prove interface correctness at compile time")) |
| 52 | + (principle "Formally verified timing" |
| 53 | + (explanation "Idris2 dependent types prove WCET < clock period for every generated node")) |
| 54 | + (principle "Clock calculus soundness" |
| 55 | + (explanation "Every stream has exactly one clock; when/merge operators are type-checked for consistency")) |
40 | 56 | (principle "Zero target language exposure" |
41 | | - (explanation "Users never write Chapel/Julia/Futhark/etc. — the -iser handles everything")))) |
| 57 | + (explanation "Users never write Lustre, C, or Zig — the -iser handles everything")) |
| 58 | + (principle "Safety-certifiable output" |
| 59 | + (explanation "Generated C code targets DO-178C Level A, IEC 61508 SIL 4, ISO 26262 ASIL D")))) |
0 commit comments