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.
• Theory of computation → Design and analysis of algorithms; • Software and its engineering;
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f6abbf6e-a4c4-428d-a2cb-82704b85e0e7Cited 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
- Size measures and alphabetic equivalence in the μ-calculusClemens Kupke, Johannes Marti, Yde VenemaLICS 2022 · 3 citations
- Equihash: Asymmetric Proof-of-Work Based on the Generalized Birthday ProblemAlex Biryukov, Dmitry KhovratovichNDSS 2016 · 110 citations
- Heap Abstraction via Early-Confluent Object Merging for Pointer AnalysisJinpeng Wang, Yufei Liang, Zhongsheng Zhan, Tian Tan et al.OOPSLA 2026
