Affiliation:
1. Inria, Paris, France
2. Université Paris-Saclay - CNRS - ENS Paris-Saclay - Inria - Laboratoire Méthodes Formelles, Gif-sur-Yvette, France
3. Université Paris-Saclay - CNRS - ENS Paris-Saclay - Laboratoire Méthodes Formelles, Gif-sur-Yvette, France
Abstract
A thunk is a mutable data structure that offers a simple memoization service:
it stores either a suspended computation or the result of this computation.
Okasaki [1999] presents many data structures that exploit thunks to achieve
good amortized time complexity. He analyzes their complexity by associating a
debit with every thunk. A debit can be paid off in several increments; a thunk
whose debit has been fully paid off can be forced. Quite strikingly, a debit is
associated also with future thunks, which do not yet exist in memory. Some of
the debit of a faraway future thunk can be transferred to a nearer future
thunk. We present a complete machine-checked reconstruction of Okasaki's
reasoning rules in Iris
$
, a rich separation logic with time credits. We
demonstrate the applicability of the rules by verifying a few operations on
streams as well as several of Okasaki's data structures, namely the
physicist's queue, implicit queues, and the banker's queue.
Publisher
Association for Computing Machinery (ACM)
Reference22 articles.
1. Robert Atkey. 2011. Amortised Resource Analysis with Separation Logic. Logical Methods in Computer Science, 7, 2:17 (2011), http://bentnib.org/amortised-sep-logic-journal.pdf
2. Verifying the Correctness and Amortized Complexity of a Union-Find Implementation in Separation Logic with Time Credits;Charguéraud Arthur;Journal of Automated Reasoning,2017
3. Nils Anders Danielsson. 2008. Lightweight Semiformal Time Complexity Analysis for Purely Functional Data Structures. In Principles of Programming Languages (POPL). http://www.cse.chalmers.se/~nad/publications/danielsson-popl2008.pdf
4. Making data structures persistent
5. Call-by-need is clairvoyant call-by-value
Cited by
3 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献