Compiling bounded natural-scalar computations #
For the natural scalar basis, one source instruction increases the largest scalar by at most
one and allocates at most one record. An initial scalar bound and an instruction bound therefore
supply a sufficient word width for the complete execution. executes_compile discharges all
intermediate word-fit and scalar-admissibility premises of the general compiler.
The target begins with the canonical encoded input; input preparation is not charged. The bounds are conservative: a particular algorithm may need much less scalar headroom.
The natural basis has a uniform compiler overhead depending only on the record layout, not on the source program's length or control flow.
Compile a natural-scalar execution with explicit sufficient width. All initial data is
at most b; at most limit instructions execute. Fitting b + limit and the next-free address
after limit allocations suffices, with no hypotheses about intermediate machine states.
The produced target run includes the general compiler's halt and constant time overhead.