Skip to main content

projection2_source_real

Function projection2_source_real 

Source
pub fn projection2_source_real(
    _core_types: &str,
    _interpreter: &str,
) -> Result<GenuineProjectionResult, String>
Expand description

Genuine Futamura Projection 2 via self-application: PE(pe_source, pe_mini(targetStmts))

The outer PE (pe_source) specializes pe_mini’s FULL BLOCK evaluator with known state (empty env, empty funcs, depth 200). targetStmts is a free/dynamic variable; state is fully static. The PE produces a specialized peBlockM_ function that IS the compiler — handling all CStmt variants with specialized expression processing.

This eliminates the need for a Rust-generated block wrapper: the PE naturally produces block-level dispatch through specialization of peBlockM.