Coinductive Type Systems for Object-Oriented Languages
- Davide AnconaAffiliated withDISI, Univ. of Genova
- , Giovanni LagorioAffiliated withDISI, Univ. of Genova
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.
- Coinductive Type Systems for Object-Oriented Languages
- Book Title
- ECOOP 2009 – Object-Oriented Programming
- Book Subtitle
- 23rd European Conference, Genoa, Italy, July 6-10, 2009. Proceedings
- pp 2-26
- Print ISBN
- Online ISBN
- Series Title
- Lecture Notes in Computer Science
- Series Volume
- Series ISSN
- Springer Berlin Heidelberg
- Copyright Holder
- Springer-Verlag Berlin Heidelberg
- Additional Links
- Industry Sectors
- eBook Packages
To view the rest of this content please follow the download PDF link above.