pub fn genuine_projection3_residual() -> Result<String, String>Expand description
Run genuine PE(pe_source, pe_bti(targetExpr)) and return the specialized cogen residual as LOGOS source code.
This is the actual Futamura Projection 3: the outer PE (pe_source) specializes pe_bti (a full PE with memoization) with known state (empty env, empty funcs, depth 200). pe_bti is structurally identical to pe_source with renamed entry points (peExprB, peBlockB, etc.) — so this is genuinely PE(PE, PE).
The result is a specialized cogen: pe_bti’s dispatch partially evaluated away, producing a program that takes a target CExpr and compiles it.