Author:
Hinze Ralf,Swierstra Wouter
Abstract
AbstractWhere do datastructures come from? This paper explores how to systematically derive implementations of one-sided flexible arrays from a simple reference implementation. Using the dependently typed programming language Agda, each calculation constructs an isomorphic—yet more efficient—datastructure using only a handful of laws relating types and arithmetic. Although these calculations do not generally produce novel datastructures they do give insight into how certain datastructures arise and how different implementations are related.
Publisher
Springer International Publishing
Reference31 articles.
1. Abel, A.: Equational reasoning about formal languages in coalgebraic style (2016), submitted to the CMCS 2016 special issue (2016)
2. Lecture Notes in Computer Science;T Altenkirch,2001
3. Lecture Notes in Computer Science;R Bird,1998
4. Braun, W., Rem, M.: A logarithmic implementation of flexible arrays. Technical report, Eindhoven University of Technology (1983). memorandum M83/4
5. Claessen, K.: Finger trees explained anew, and slightly simplified (functional pearl). In: Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell, pp. 31–38. Haskell 2020, New York, NY, USA. Association for Computing Machinery (2020). https://doi.org/10.1145/3406088.3409026