Skip to main content

On Polymorphic Recursion, Type Systems, and Abstract Interpretation

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5079))

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Coppo, M.: An extended polymorphic type system. In: Dembinski, P. (ed.) MFCS 1980. LNCS, vol. 88, pp. 194–204. Springer, Heidelberg (1980)

    Chapter  Google Scholar 

  2. Cousot, P.: Types as abstract interpretations. In: POPL 1997, pp. 316–331. ACM, New York (1997)

    Chapter  Google Scholar 

  3. Damas, L.M.M., Milner, R.: Principal type schemas for functional programs. In: POPL 1982, pp. 207–212. ACM, New York (1982)

    Chapter  Google Scholar 

  4. Damiani, F.: Rank 2 intersection types for local definitions and conditional expressions. ACM Trans. Prog. Lang. Syst. 25(4), 401–451 (2003)

    Article  Google Scholar 

  5. Damiani, F.: Rank 2 Intersection for Recursive Definitions. Fundam. Inform. 77(4), 451–488 (2007); (Special Issue on TLCA 2005)

    MATH  MathSciNet  Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. 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)

    Chapter  Google Scholar 

  8. Henglein, F.: Type inference with polymorphic recursion. ACM Trans. Prog. Lang. Syst. 15(2), 253–289 (1993)

    Article  Google Scholar 

  9. Hindley, R.: Basic Simple Type Theory. Cambridge Tracts in Theoretical Computer Science, vol. 42. Cambridge University Press, London (1997)

    MATH  Google Scholar 

  10. Jim, T.: What are principal typings and what are they good for?. In: POPL 1996, pp. 42–53. ACM, New York (1996)

    Chapter  Google Scholar 

  11. Kfoury, A.J., Pericas-Geertsen, S.M.: Type inference for recursive definitions. In: LICS 1999, pp. 119–128. IEEE, Los Alamitos (1999)

    Google Scholar 

  12. 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)

    Article  Google Scholar 

  13. Meertens, L.: Incremental polymorphic type checking in B. In: POPL 1983, pp. 265–275. ACM, New York (1983)

    Chapter  Google Scholar 

  14. Monsuez, B.: Polymorphic typing by abstract interpretation. Theoretical Computer Science 652, 217–228 (1992)

    MathSciNet  Google Scholar 

  15. 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)

    Google Scholar 

  16. 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)

    Google Scholar 

  17. Okasaki, C.: Purely Functional Data Structures. Cambridge University Press, Cambridge (1998)

    Google Scholar 

  18. Terauchi, T., Aiken, A.: On typability for polymorphic recursive rank-2 intersection types. In: LICS 2006, pp. 111–122. IEEE, Los Alamitos (2006)

    Google Scholar 

  19. 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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

María Alpuente Germán Vidal

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics