[Haskell-cafe] "Least common supertype"?
Richard O'Keefe
ok at cs.otago.ac.nz
Wed Nov 11 17:57:39 EST 2009
On Nov 12, 2009, at 9:24 AM, Sean Leather wrote:
> Is there a name for the following concept?
[Generalising from
(Int, Char) -> (Char, Int)
(Char, Int) -> (Int, Char)
to (x, y ) -> (y, x )]
It's the "least specific generalisation", also known as anti-
unification.
(Because unification finds the most general specialisation.)
As far as I know, it originated in this paper:
Gordon D. Plotkin. A Note on Inductive Generalization. In B. Meltzer
and D. Michie, editors, Machine Intelligence, volume 5, pages 153-163.
Elsevier North-Holland, New York, 1970.
More precisely, with the type constraints, it's sorted anti-unification.
http://www.dfki.uni-kl.de/dfkidok/publications/TM/94/04/abstract.html
might be worth a look.
More information about the Haskell-Cafe
mailing list