Compiling effectful calls into an imported traversal library #
The existing import client calls the library traversal twice. Each selected library contract is transported through the generated source embedding. The first call's actual frame establishes the second call's input; neither loop, array-correctness argument nor register-level lowering is proved again.
The client has the same emitted call structure as the original two-buffer composition. Its bound reuses that existing numerical expression and the proved preservation of callee overhead under embedding. The final theorem concerns the client's actual invocation in the combined program, with two mapped buffers, the outside-both frame and one represented final heap. Code and three-frame stack capacity refer to this combined program, not the smaller library table.
The existing source correctness proof supplies both array results and the outside-both frame, without reopening either imported traversal.
The client, imported traversal and increment helper need two nested call levels. The original value ranges and actual intermediate-heap frame are retained.
The imported callees retain their actual instruction bounds and frame overhead. The client's unchanged call structure therefore admits the original pair bound, while the first call's frame supplies the second call's current input.
The imported client's invocation budget includes its own outer call and final halt, reusing the library pair's inferred body budget.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The imported client returns both ordinary mapped arrays in one typed actual execution, preserving observations outside both borrowed views. The launch keeps the combined program's original code/stack capacities and argument ranges.
The actual imported-traversal client halts with both mapped arrays and the outside-both frame in one represented final heap. The independent instruction bound covers both calls; capacity allows the client, traversal and helper frames.