ProveIR: Compile Once, Prove Many — Inside Achronyme's Circuit Template System
This article explores ProveIR, the intermediate representation that powers Achronyme's prove blocks. ProveIR is a parametric circuit template system: prove blocks are compiled once at compile time, serialized into the bytecode constant pool, and instantiated at runtime with captured values from the surrounding scope. The article deconstructs the full pipeline — from AST to ProveIR template, capture classification, serialization, instantiation into SSA IR, optimization, and finally R1CS or Plonkish constraint generation — explaining why this intermediate layer is essential for correctness, performance, and portability across prime fields.