Persistent Amortised Analysis, Operationally

📅 2026-05-10
📈 Citations: 0
Influential: 0
📄 PDF

career value

185K/year
🤖 AI Summary
This work addresses the failure of traditional amortized analysis in persistent data structures, where it cannot properly account for reconstruction costs incurred by accessing historical versions. By formalizing an operational semantics for call-by-value λ-calculus extended with lazy thunks, the paper rigorously examines the applicability of amortized methods in persistent settings. It establishes, for the first time, that credit-based amortized analysis remains valid when credits are stored exclusively in thunks—thereby challenging Okasaki’s long-standing claim that the credit method is unsuitable for persistence. Furthermore, the study clarifies the formal foundations of the debit method and precisely characterizes the conditions under which the credit method is sound in persistent environments, significantly enhancing the theoretical rigor and clarity of amortized analysis for functional data structures.
📝 Abstract
Amortised analysis is a technique for proving a combined time bound for a batch of operations on a data structure, even if some of those operations are expensive. But the traditional method of amortised analysis yields incorrect time bounds when the data structure is used persistently. Persistence allows operations to be performed on previous versions of the data structure, which prevents us from amortising expensive restructuring work. In his seminal book, Chris Okasaki showed how to extend amortised analysis to persistent usage. His method works by extending the data structure with thunks and performing the analysis with debits rather than credits. His argument, that credits are unsound for analysing persistent usage, has become folklore. In this paper, we provide a new perspective on the role of debits in Okasaki's work. First, we set up an operational semantics of call-by-value lambda calculus with thunks, and show formally that traditional amortised analysis does not work in a persistent setting. Then we show that, contrary to the folklore, credit-based amortised analysis can be sound in a persistent setting as long as credits are only stored on thunks. Finally, we provide a formal semantics for Okasaki's debit-based approach. Our paper clarifies the formal foundation of Okasaki's work and makes it accessible to a wider audience.
Problem

Research questions and friction points this paper is trying to address.

persistent data structures
amortised analysis
credits
debits
operational semantics
Innovation

Methods, ideas, or system contributions that make the work stand out.

persistent data structures
amortised analysis
operational semantics
credits and debits
lazy evaluation
🔎 Similar Papers
No similar papers found.