Hashing modulo alpha-equivalence
Krzysztof Maziarz, Tom Ellis, Alan Lawrence, Andrew W. Fitzgibbon, Simon Peyton Jones
Abstract
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 (𝑛 2 ) in expression size). We present a new, asymptotically efficient way to hash modulo alphaequivalence. A key insight of our method is to use a weak (commutative) hash combiner at exactly one point in the construction, which admits an algorithm with O (𝑛(log 𝑛) 2 ) time complexity. We prove that the use of the commutative combiner nevertheless yields a strong hash with low collision probability. Numerical benchmarks attest to the asymptotic behaviour of the method.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
Cited by top-tier papers3
- Hashing Modulo Context-Sensitive 𝛼-EquivalenceLasse Blaauwbroek, Miroslav Olsák, Herman GeuversPLDI 2024 · 1 citation
- MimIR: An Extensible and Type-Safe Intermediate Representation for the DSL AgeRoland Leißa, Marcel Ullrich, Joachim Meyer, Sebastian HackPOPL 2025 · 1 citation
- Slotted E-Graphs: First-Class Support for (Bound) Variables in E-GraphsRudi Schneider, Marcus Rossel, Amir Shaikhha, Andrés Goens et al.PLDI 2025 · 1 citation
Related papers
- Compactness of Hashing Modes and Efficiency Beyond Merkle TreeElena Andreeva, Rishiraj Bhattacharyya, Arnab RoyEUROCRYPT 2021 · 8 citations
- babble: Learning Better Abstractions with E-Graphs and Anti-unificationDavid Cao, Rose Kunkel, Chandrakana Nandi, Max Willsey et al.POPL 2023 · 38 citations
- Equihash: Asymmetric Proof-of-Work Based on the Generalized Birthday ProblemAlex Biryukov, Dmitry KhovratovichNDSS 2016 · 110 citations
- Size measures and alphabetic equivalence in the μ-calculusClemens Kupke, Johannes Marti, Yde VenemaLICS 2022 · 3 citations
- Heap Abstraction via Early-Confluent Object Merging for Pointer AnalysisJinpeng Wang, Yufei Liang, Zhongsheng Zhan, Tian Tan et al.OOPSLA 2026
