ch:amortized-resource-analysis: heap-trace checker
Problem and invariant. Execute two finite chapter reconstructions and compare their emitted heap-cell events with the two paper bounds. For pairs, every event is emitted by an actual pair or cons constructor. For startBreadth, every event names one site in the chapter’s explicit accounting schedule; the unavailable 2010 source program is not claimed as the trace source.
Two representations. One can interpret the whole first-order RAML syntax. The companion instead implements attach, spine-copying append, and pairs directly, then a compact-tree traversal and a named allocation schedule over a two-list queue. The two representations are intentionally distinguished.
First complete version. Implement the reconstructed programs and event counter first. Implement
A failing version. Delete
Acceptance test and boundary. Run the four appendix E commands and require the exact trace, a passing inline test, and audit []. This proves the finite arithmetic assertions, not AARA soundness or agreement with any RAML release.