Adams' trees revisited: correctness proof and efficient implementation

  • Authors:
  • Milan Straka

  • Affiliations:
  • Department of Applied Mathematics, Charles University in Prague, Czech Republic

  • Venue:
  • TFP'11 Proceedings of the 12th international conference on Trends in Functional Programming
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a correctness proof of Adams' trees of bounded balance, which are used in Haskell to implement Data.Map and Data.Set. Our analysis includes the previously ignored join operation, and also guarantees trees with smaller depth than the original one. Because the Adams' trees can be parametrized, we use benchmarking to find the best choice of parameters. Finally, a saving memory technique based on introducing additional data constructor is evaluated.