Abstract
The problem of typing polymorphic recursion (i.e. recursive function definitions rec {x=e} where different occurrences of x in e are used with different types) has been investigated both by people working on type systems and by people working on abstract interpretation.
Recently, Gori and Levi have developed a family of abstract interpreters that are able to type all the ML typable recursive definitions and interesting examples of polymorphic recursion. The problem of finding type systems corresponding to their abstract interpreters was open (such systems would lie between the let-free-free fragments of the ML and of the Milner-Mycroft systems).
In this paper we exploit the notion of principal typing to: (i) provide a complete stratification of (let-free) Milner-Mycroft typability, and (ii) solve the problem of finding type systems corresponding to the type abstract interpreters proposed by Gori and Levi.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Coppo, M.: An extended polymorphic type system. In: Dembinski, P. (ed.) MFCS 1980. LNCS, vol. 88, pp. 194–204. Springer, Heidelberg (1980)
Cousot, P.: Types as abstract interpretations. In: POPL 1997, pp. 316–331. ACM, New York (1997)
Damas, L.M.M., Milner, R.: Principal type schemas for functional programs. In: POPL 1982, pp. 207–212. ACM, New York (1982)
Damiani, F.: Rank 2 intersection types for local definitions and conditional expressions. ACM Trans. Prog. Lang. Syst. 25(4), 401–451 (2003)
Damiani, F.: Rank 2 Intersection for Recursive Definitions. Fundam. Inform. 77(4), 451–488 (2007); (Special Issue on TLCA 2005)
Gori, R., Levi, G.: An experiment in type inference and verification by abstract interpretation. In: Cortesi, A. (ed.) VMCAI 2002. LNCS, vol. 2294, pp. 225–239. Springer, Heidelberg (2002)
Gori, R., Levi, G.: Properties of a type abstract interpreter. In: Zuck, L.D., Attie, P.C., Cortesi, A., Mukhopadhyay, S. (eds.) VMCAI 2003. LNCS, vol. 2575, pp. 132–145. Springer, Heidelberg (2002)
Henglein, F.: Type inference with polymorphic recursion. ACM Trans. Prog. Lang. Syst. 15(2), 253–289 (1993)
Hindley, R.: Basic Simple Type Theory. Cambridge Tracts in Theoretical Computer Science, vol. 42. Cambridge University Press, London (1997)
Jim, T.: What are principal typings and what are they good for?. In: POPL 1996, pp. 42–53. ACM, New York (1996)
Kfoury, A.J., Pericas-Geertsen, S.M.: Type inference for recursive definitions. In: LICS 1999, pp. 119–128. IEEE, Los Alamitos (1999)
Kfoury, A.J., Tiuryn, J., Urzyczyn, P.: Type reconstruction in the presence of polymorphic recursion. ACM Trans. Prog. Lang. Syst. 15(2), 290–311 (1993)
Meertens, L.: Incremental polymorphic type checking in B. In: POPL 1983, pp. 265–275. ACM, New York (1983)
Monsuez, B.: Polymorphic typing by abstract interpretation. Theoretical Computer Science 652, 217–228 (1992)
Monsuez, B.: Polymorphic types and widening operators. In: Cousot, P., Filé, G., Falaschi, M., Rauzy, A. (eds.) WSA 1993. LNCS, vol. 724, pp. 224–281. Springer, Heidelberg (1993)
Mycroft, A.: Polymorphic type schemes and recursive definitions. In: Paul, M., Robinet, B. (eds.) Programming 1984. LNCS, vol. 167, pp. 217–228. Springer, Heidelberg (1984)
Okasaki, C.: Purely Functional Data Structures. Cambridge University Press, Cambridge (1998)
Terauchi, T., Aiken, A.: On typability for polymorphic recursive rank-2 intersection types. In: LICS 2006, pp. 111–122. IEEE, Los Alamitos (2006)
Wells, J.B.: The essence of principal typings. In: Widmayer, P., Triguero, F., Morales, R., Hennessy, M., Eidenbenz, S., Conejo, R. (eds.) ICALP 2002. LNCS, vol. 2380, pp. 913–925. Springer, Heidelberg (2002)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Comini, M., Damiani, F., Vrech, S. (2008). On Polymorphic Recursion, Type Systems, and Abstract Interpretation. In: Alpuente, M., Vidal, G. (eds) Static Analysis. SAS 2008. Lecture Notes in Computer Science, vol 5079. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69166-2_10
Download citation
DOI: https://doi.org/10.1007/978-3-540-69166-2_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69163-1
Online ISBN: 978-3-540-69166-2
eBook Packages: Computer ScienceComputer Science (R0)