# Systems Perspective Description Language — Rail Transit (SPDL-RAIL) **Specification Document ID:** `SPDL-RAIL-SPEC-2026-v4.2` **Classification:** Open Epistemic Standard / Hard Real-Time Train Control Substrate **Principal Architect:** Asse van Nix | Systems Perspective Framework & Proof-Driven Architecture Group **Target Environment:** Zig 0.16.0 Freestanding Bare-Metal · Vital Trackside Computers · ETCS/CBTC Replacement **Applied Standards:** ISO/IEC 14977 EBNF · GBNF Maskable · EN 50126/50128/50129 (SIL-4 Rail Software) · ETCS Baseline 3/4 Replacement · IEEE 1474 (CBTC) --- ## 1. Epistemic Architecture: Why ETCS and CBTC Must Be Replaced 1. **Fixed-Block & Adhesion Rigidity:** ETCS Baseline 3/4 computes conservative braking curves based on worst-case static adhesion assumptions. Under changing track conditions (wet rail, autumn leaves), trains either brake thousands of meters too early—limiting line throughput—or experience dangerous wheel-slide transitions. 2. **Balise Telegram Opaque Serialization:** Balise telegrams transmit fixed-width, bit-packed binary arrays with zero native type semantics. Diagnostic debugging of intermittent balise read faults requires heavy decoding tools and introduces latency into Automatic Train Protection (ATP) computers. **SPDL-RAIL** unifies real-time wheel-rail tribology with moving-block movement authorities governed by SIL-4 barrier certificates. --- ## 2. Physical Invariants, DAEs & Mathematical Proof Gates ``` SPDL-RAIL DYNAMIC MANIFOLD ┌─────────────────────────────────────────────────────────────────────────────┐ │ NON-LINEAR TRAIN BRAKING DYNAMICS & ADHESION LIMITATION │ │ m_train * (dv/dt) = - F_pneumatic_brake - F_eddy_brake - mu(v) * m * g │ ├─────────────────────────────────────────────────────────────────────────────┤ │ EMERGENCY BRAKE DECELERATION PROFILE (EBD Barrier) │ │ h_safe_stop(x_train, x_target, v) = (x_target - x_train) - (v^2 / (2 * a_min)) >= d_buffer│ ├─────────────────────────────────────────────────────────────────────────────┤ │ MOVING-BLOCK SPATIAL SEPARATION BARRIER (SIL-4) │ │ dist(Train_Lead, Train_Follow) - Braking_Distance_Max >= 50.0m │ └─────────────────────────────────────────────────────────────────────────────┘ ``` --- ## 3. Formal ISO/IEC 14977 EBNF Grammar ```ebnf RailManifest = { Line } ; Line = [ Whitespace ] , ( Comment | RailRecord ) , Newline ; Whitespace = { " " | "\t" | "\r" } ; Newline = "\n" | "\r\n" ; Comment = "#" , { AnyChar - Newline } ; RailRecord = "(I) @RAIL_INVARIANT" , " " , InvariantFields | "(M) @TRAIN_CONSIST" , " " , ConsistFields | "(B) @BRAKING_BARRIER" , " " , BrakingBarrierFields | "(M) @MOVEMENT_AUTHORITY", " " , AuthorityFields | "(T) @ODOMETRY_OBSERVER" , " " , ObserverFields ; InvariantFields = "id:" , Token , " sil_rating:SIL_4" , " cycle_ms:" , Integer , " alloc_policy:ZERO_HEAP" ; ConsistFields = "id:" , Token , " length_m:" , Number , " mass_tons:" , Number , " max_speed_kph:" , Number ; BrakingBarrierFields = "id:" , Token , " min_decel_m_s2:" , Number , " buffer_margin_m:" , Number ; AuthorityFields = "id:" , Token , " eoa_meter:" , Number , " target_speed_kph:" , Number , " gradient_permil:" , Number ; ObserverFields = "id:" , Token , " pos_m:" , Number , " speed_kph:" , Number , " accel_m_s2:" , Number , " wheel_slip:FALSE" ; Token = Letter , { Letter | Digit | "_" | "-" } ; Number = [ "-" ] , Digit , { Digit } , [ "." , { Digit } ] ; Integer = [ "-" ] , Digit , { Digit } ; Letter = "A".."Z" | "a".."z" ; Digit = "0".."9" ; AnyChar = ? Any valid Unicode code point ? ; ``` --- ## 4. GBNF Structured Sampling Grammar ```gbnf root ::= RailRecord "\n" RailRecord ::= "(I) @RAIL_INVARIANT" " " InvariantFields | "(M) @TRAIN_CONSIST" " " ConsistFields | "(B) @BRAKING_BARRIER" " " BrakingBarrierFields | "(M) @MOVEMENT_AUTHORITY" " " AuthorityFields | "(T) @ODOMETRY_OBSERVER" " " ObserverFields InvariantFields ::= "id:" [A-Za-z0-9_-]+ " sil_rating:SIL_4 cycle_ms:" [0-9]+ " alloc_policy:ZERO_HEAP" ConsistFields ::= "id:" [A-Za-z0-9_-]+ " length_m:" [0-9.]+ " mass_tons:" [0-9.]+ " max_speed_kph:" [0-9.]+ BrakingBarrierFields ::= "id:" [A-Za-z0-9_-]+ " min_decel_m_s2:" [0-9.]+ " buffer_margin_m:" [0-9.]+ AuthorityFields ::= "id:" [A-Za-z0-9_-]+ " eoa_meter:" [0-9.]+ " target_speed_kph:" [0-9.]+ " gradient_permil:" [0-9.-]+ ObserverFields ::= "id:" [A-Za-z0-9_-]+ " pos_m:" [0-9.]+ " speed_kph:" [0-9.]+ " accel_m_s2:" [0-9.-]+ " wheel_slip:FALSE" ``` --- ## 5. Production SPDL-RAIL Manifest Exemplar ```spdl # ============================================================================== # SPDL-RAIL v4.2 MANIFEST: HIGH-SPEED TRAINSET VITAL ATP MODULE # Standard: EN 50128 SIL-4 | Baseline: Moving Block ETCS-3 Replacement # ============================================================================== (I) @RAIL_INVARIANT id:INV-ATP-CORE sil_rating:SIL_4 cycle_ms:10 alloc_policy:ZERO_HEAP # --- PHYSICAL TRAIN CHARACTERISTICS --- (M) @TRAIN_CONSIST id:TGV_EURO_01 length_m:200.0 mass_tons:385.0 max_speed_kph:320.0 # --- SIL-4 PROVABLE BRAKING DISTANCE BARRIER --- (B) @BRAKING_BARRIER id:BAR_EBD min_decel_m_s2:0.95 buffer_margin_m:50.0 # --- DYNAMIC MOVEMENT AUTHORITY --- (M) @MOVEMENT_AUTHORITY id:MA_BLOCK_491 eoa_meter:14850.0 target_speed_kph:280.0 gradient_permil:-4.5 # --- MULTI-SENSOR VITAL ODOMETRY --- (T) @ODOMETRY_OBSERVER id:TEL_DOPPLER_RADAR pos_m:11240.5 speed_kph:279.4 accel_m_s2:-0.05 wheel_slip:FALSE ``` --- ## 6. Standards Compliance Matrix ``` ╔═════════════════════════════════╦══════════════════════╦═════════════════════════════════════════════════════╗ ║ Dimension │ Verification Standard│ Enforced Implementation Evidence ║ ╠═════════════════════════════════╬══════════════════════╬═════════════════════════════════════════════════════╣ ║ Vital Safety Verification │ EN 50128 / EN 50129 │ SIL-4 certification; bounded 10ms execution. ║ ║ Moving-Block Collision Guard │ IEEE 1474 CBTC │ Forward-invariant braking distance barrier verified.║ ║ Memory Execution Bound │ Freestanding Silicon │ Zero heap allocations; M_aux <= 128 bytes stack. ║ ║ Autonomous Movement Authority │ GBNF Structured Mask │ Mathematical elimination of out-of-bounds speeds. ║ ╚═════════════════════════════════╩══════════════════════╩═════════════════════════════════════════════════════╝ ```