Hashing modulo alpha-equivalence
@article{Maziarz2021HashingMA, title={Hashing modulo alpha-equivalence}, author={Krzysztof Maziarz and Tom Ellis and Alan Christopher Lawrence and Andrew William Fitzgibbon and Simon L. Peyton Jones}, journal={Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation}, year={2021} }
In many applications one wants to identify identical subtrees of a program syntax tree. This identification should ideally be robust to alpha-renaming of the program, but no existing technique has been shown to achieve this with good efficiency (better than O(n2) in expression size). We present a new, asymptotically efficient way to hash modulo alpha-equivalence. A key insight of our method is to use a weak (commutative) hash combiner at exactly one point in the construction, which admits an…Â
One Citation
Sketch-Guided Equality Saturation: Scaling Equality Saturation to Complex Optimizations in Languages with Bindings
- Computer ScienceArXiv
- 2021
This paper demonstrates how to drastically improve the efficiency of equality saturation for a functional language based on the typed lambda calculus and introduces sketch-guided equality saturation, a semi-automatic technique that allows programmers to provide sketches guiding rewriting when performing complex optimizations.
References
SHOWING 1-10 OF 22 REFERENCES
Type-safe modular hash-consing
- Computer Science, MathematicsML '06
- 2006
This paper introduces anocaml library that encapsulates hash-consed terms in an abstract datatype, thus safely ensuring maximal sharing and is parameterized by an equality that allows the user to identify terms according to an arbitrary equivalence relation.
Functional pearl: i am not a number--i am a free variable
- Computer ScienceHaskell '04
- 2004
This paper shows how to manipulate syntax with binding using a mixed representation of names for free variables (with respect to the task in hand) and de Bruijn indices and gives a hierarchical representation for names which naturally reflects the structure of the operations the authors implement.
Everybody's Got To Be Somewhere
- Computer ScienceMSFP@FSCD
- 2018
This paper introduces a nameless 'co-de-Bruijn' representation which makes the opposite canonical choice, delaying discarding minimally, as near as possible to the root.
cHash: Detection of Redundant Compilations via AST Hashing
- Computer ScienceUSENIX Annual Technical Conference
- 2017
Software projects that use a compiled language are built hundreds of thousands of times during their lifespan. Hence, the compiler is invoked over and over again on an incrementally changing source…
The Wizard of TILT: Efficient?, Convenient, and Abstract Type Representations
- Computer Science
- 2002
This paper recounts the experience in attempting to implement a more e cient type representation strategy into the substantial existing code base, and concludes that the abstraction and optimizations are successful, but in the end the overhead is overwhelmed by the overhead necessary to implement them.
Implementing typed intermediate languages
- Computer ScienceICFP '98
- 1998
This paper describes the experience with implementing the FLINT typed intermediate language in the SML/NJ production compiler and observes that a type-preserving compiler will not scale to handle large types unless all of its type- Preserving stages preserve the asymptotic time and space usage in representing and manipulating types.
Clone detection using rolling hashing, suffix trees and dagification: A case study
- Computer Science2012 6th International Workshop on Software Clones (IWSC)
- 2012
It is found that the subsequent dag analysis to discover Type-3 clones performs well on NAV source code, both in terms of computational complexity and precision, which suggests that efficient dagification and independently configurable dag interpretation may be valuable ingredients for modular clone detection.
A Lambda Term Representation Inspired by Linear Ordered Logic
- Computer ScienceLFMTP
- 2011
A new nameless representation of lambda terms inspired by ordered logic is introduced and an experimental evaluation of its performance in a proof checker for the Edinburgh Logical Framework is presented.
The Locally Nameless Representation
- Computer ScienceJournal of Automated Reasoning
- 2011
This paper provides an introduction to the locally nameless approach to the representation of syntax with variable binding, focusing in particular on the use of this technique in formal proofs.…