Skip to main content

Coinductive Type Systems for Object-Oriented Languages

  • Conference paper
ECOOP 2009 – Object-Oriented Programming (ECOOP 2009)

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

Included in the following conference series:

Abstract

We propose a novel approach based on coinductive logic to specify type systems of programming languages.

The approach consists in encoding programs in Horn formulas which are interpreted w.r.t. their coinductive Herbrand model.

We illustrate the approach by first specifying a standard type system for a small object-oriented language similar to Featherweight Java. Then we define an idealized type system for a variant of the language where type annotations can be omitted. The type system involves infinite terms and proof trees not representable in a finite way, thus providing a theoretical limit to type inference of object-oriented programs, since only sound approximations of the system can be implemented.

Approximation is naturally captured by the notions of subtyping and subsumption; indeed, rather than increasing the expressive power of the system, as it usually happens, here subtyping is needed for approximating infinite non regular types and proof trees with regular ones.

This work has been partially supported by MIUR EOS DUE - Extensible Object Systems for Dynamic and Unpredictable Environments.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Agesen, O.: The cartesian product algorithm. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 2–26. Springer, Heidelberg (1995)

    Google Scholar 

  2. Amadio, R., Cardelli, L.: Subtyping recursive types. ACM Transactions on Programming Languages and Systems 15(4) (1993)

    Google Scholar 

  3. Ancona, D., Ancona, M., Cuni, A., Matsakis, N.: RPython: a Step Towards Reconciling Dynamically and Statically Typed OO Languages. In: OOPSLA 2007 Proceedings and Companion, DLS 2007: Proceedings of the 2007 Symposium on Dynamic Languages. ACM Press, New York (2007)

    Google Scholar 

  4. Ancona, D., Damiani, F., Drossopoulou, S., Zucca, E.: Polymorphic bytecode: Compositional compilation for Java-like languages. In: ACM Symp. on Principles of Programming Languages 2005. ACM Press, New York (2005)

    Google Scholar 

  5. Ancona, D., Lagorio, G., Zucca, E.: True separate compilation of Java classes. In: PPDP 2002 - Principles and Practice of Declarative Programming. ACM Press, New York (2002)

    Google Scholar 

  6. Ancona, D., Lagorio, G., Zucca, E.: Type inference for polymorphic methods in Java-like languages. In: Italiano, G.F., Moggi, E., Laura, L. (eds.) ICTCS 2007 - 10th Italian Conf. on Theoretical Computer Science 2003, eProceedings. World Scientific, Singapore (2007)

    Google Scholar 

  7. Ancona, D., Zucca, E.: Principal typings for Java-like languages. In: ACM Symp. on Principles of Programming Languages 2004. ACM Press, New York (2004)

    Google Scholar 

  8. Barbanera, F., Dezani-Cincaglini, M., de’Liguoro, U.: Intersection and union types: Syntax and semantics. Information and Computation 119(2) (1995)

    Google Scholar 

  9. Brandt, M., Henglein, F.: Coinductive axiomatization of recursive type equality and subtyping. In: de Groote, P., Hindley, J.R. (eds.) TLCA 1997. LNCS, vol. 1210. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  10. Brandt, M., Henglein, F.: Coinductive axiomatization of recursive type equality and subtyping. Fundam. Inform. 33(4) (1998)

    Google Scholar 

  11. Courcelle, B.: Fundamental properties of infinite trees. Theoretical Computer Science 25 (1983)

    Google Scholar 

  12. Furr, M., An, J., Foster, J.S., Hicks, M.: Static type inference for Ruby. In: SAC 2009 - 24th ACM Symp. on Applied Computing (2009)

    Google Scholar 

  13. Igarashi, A., Nagira, H.: Union types for object-oriented programming. Journ. of Object Technology 6(2) (2007)

    Google Scholar 

  14. Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Transactions on Programming Languages and Systems 23(3) (2001)

    Google Scholar 

  15. Lagorio, G., Zucca, E.: Just: safe unknown types in java-like languages. Journ. of Object Technology, 6(2) (February 2007); Special issue: OOPS track at SAC (2006)

    Google Scholar 

  16. Oxhøj, N., Palsberg, J., Schwartzbach, M.I.: Making type inference practical. In: Lehrmann Madsen, O. (ed.) ECOOP 1992. LNCS, vol. 615, pp. 329–349. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  17. Palsberg, J., Schwartzbach, M.I.: Object-oriented type inference. In: ACM Symp. on Object-Oriented Programming: Systems, Languages and Applications 1991 (1991)

    Google Scholar 

  18. Simon, L., Bansal, A., Mallya, A., Gupta, G.: Co-logic programming: Extending logic programming with coinduction. In: Arge, L., Cachin, C., Jurdziński, T., Tarlecki, A. (eds.) ICALP 2007. LNCS, vol. 4596, pp. 472–483. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  19. Simon, L., Mallya, A., Bansal, A., Gupta, G.: Coinductive logic programming. In: Etalle, S., Truszczyński, M. (eds.) ICLP 2006. LNCS, vol. 4079, pp. 330–345. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  20. Wang, T., Smith, S.: Polymorphic constraint-based type inference for objects. Technical report, The Johns Hopkins University (2008) (submitted for publication)

    Google Scholar 

  21. Wang, T., Smith, S.F.: Precise constraint-based type inference for java. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, p. 99. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ancona, D., Lagorio, G. (2009). Coinductive Type Systems for Object-Oriented Languages. In: Drossopoulou, S. (eds) ECOOP 2009 – Object-Oriented Programming. ECOOP 2009. Lecture Notes in Computer Science, vol 5653. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-03013-0_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-03013-0_2

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-03012-3

  • Online ISBN: 978-3-642-03013-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics