Anti-Unification with Type Classes
Résumé
The anti-unification problem is that of finding the most specific pattern of two terms. While dual to the unification problem, anti-unification has rarely been considered at the level of types. In this paper, we present an algorithm to compute the least general type of two types in Haskell, using the logic programming power of type classes. That is, we define a type class for which the type class instances resolution performs anti-unification. We then use this type class to define a type-safe embedding of aspects in Haskell.
Domaines
Langage de programmation [cs.PL]Origine | Fichiers produits par l'(les) auteur(s) |
---|
Loading...