Note that "unification" as implemented in Prolog is NOT unification as
understood by logicians, since the "occurs check" is not performed.
This check is a significant complication of the algorithm, and has
significant cost (see my rendering of A&S just posted).
The ML'ers must have done a unification with an occurs check
for SML in Poplog, though I doubt if their code is general-purpose, dealing
as it does with unification of SML type structures. Failure of the occurs
check is manifest by the distressing message "unification failure - cyclic
type structure".
Robin.
|