Computing ML Equality Kinds Using Abstract Interpretation

C.A. Gunter, E.L. Gunter, D.B. Macqueen
1993 Information and Computation  
The denition of Standard ML provides a form of generic equality which is inferred for certain types, called equality types, on which it is possible to dene an equality relation in ML. However, the standard denition is incomplete in the sense that there are interesting and useful types which are not inferred to be equality types but for which an equality relation can be dened in ML in a uniform manner. In this paper, a renement of the Standard ML system of equality types is introduced and is
more » ... en sound and complete with respect to the existence of a denable equality. The technique used here is based on an abstract interpretation of ML operators as monotone functions over a three point lattice. It is shown how the equality relation can be dened (as an ML program) from the denition of a type with our equality property. Finally, a sound, ecient algorithm for inferring the equality property which corrects the limitations of the standard denition in all cases of practical interest is demonstrated.
doi:10.1006/inco.1993.1070 fatcat:x7os75w4szbppobaul6rnfxckq