feat(control_tree): add StepTree→Normalized shadow lowerer (if-only, dev-only)
This commit is contained in:
38
src/mir/control_tree/normalized_shadow/mod.rs
Normal file
38
src/mir/control_tree/normalized_shadow/mod.rs
Normal file
@ -0,0 +1,38 @@
|
||||
//! Phase 121: StepTree → Normalized shadow lowering (dev-only)
|
||||
//!
|
||||
//! ## Purpose
|
||||
//!
|
||||
//! Establish minimal route from StepTree (structure SSOT) to Normalized form,
|
||||
//! verifying parity with existing router for if-only patterns.
|
||||
//!
|
||||
//! ## Scope
|
||||
//!
|
||||
//! - **if-only**: Support if statements without loops
|
||||
//! - **loop rejection**: Reject loops via capability guard
|
||||
//!
|
||||
//! ## Design Rules
|
||||
//!
|
||||
//! **Input SSOT**:
|
||||
//! - `StepTree` + `StepTreeContract` (no facts re-analysis)
|
||||
//! - Lowering decisions based only on contract information
|
||||
//!
|
||||
//! **Output**:
|
||||
//! - `JoinModule` (Normalized dialect)
|
||||
//! - Or "Normalized-equivalent intermediate" expressed in existing JoinIR types
|
||||
//!
|
||||
//! **Execution conditions**:
|
||||
//! - dev-only: Only runs when `joinir_dev_enabled()` returns true
|
||||
//! - strict: Only fail-fast on mismatch when `joinir_strict_enabled()` returns true
|
||||
//!
|
||||
//! **Prohibitions**:
|
||||
//! - No fallback: Shadow conversion failure logs reason in dev-only, fail-fast in strict
|
||||
//! - No direct env reads (must go through `src/config/env/*`)
|
||||
//! - No hardcoding (no branching on fixture names or variable names)
|
||||
|
||||
pub mod builder;
|
||||
pub mod contracts;
|
||||
pub mod parity;
|
||||
|
||||
pub use builder::StepTreeNormalizedShadowLowererBox;
|
||||
pub use contracts::{CapabilityCheckResult, UnsupportedCapability};
|
||||
pub use parity::{MismatchKind, ShadowParityResult};
|
||||
Reference in New Issue
Block a user