Type-safe modular hash-consing

  • Authors:
  • Jean-Christophe Filliâtre;Sylvain Conchon

  • Affiliations:
  • LRI, Université Paris Sud, Orsay, France;LRI, Université Paris Sud, Orsay, France

  • Venue:
  • Proceedings of the 2006 workshop on ML
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Hash-consing is a technique to share values that are structurally equal. Beyond the obvious advantage of saving memory blocks, hash-consing may also be used to speed up fundamental operations and data structures by several orders of magnitude when sharing is maximal. This paper introduces an \ocaml\ hash-consing library that encapsulates hash-consed terms in an abstract datatype, thus safely ensuring maximal sharing. This library is also parameterized by an equality that allows the user to identify terms according to an arbitrary equivalence relation.