Higher-Order Pattern Anti-Unification in Linear Time

Alexander Baumgartner, Temur Kutsia, Jordi Levy, Mateu Villaret
2016 Journal of automated reasoning  
We present a rule-based Huet's style anti-unification algorithm for simply typed lambda-terms, which computes a least general higher-order pattern generalization. For a pair of arbitrary terms of the same type, such a generalization always exists and is unique modulo α-equivalence and variable renaming. With a minor modification, the algorithm works for untyped lambda-terms as well. The time complexity of both algorithms is linear.
doi:10.1007/s10817-016-9383-3 pmid:30174364 pmcid:PMC6109779 fatcat:g7mvr2b7c5fmlp74pta5ymrg7e