Abstract

Object-oriented languages can he translated into a lambda-calculus with records. Therefore, type inference for record languages is one aspect of the yet unsolved problem of inferring types for object-oriented languages. In order to obtain the necessary flexibility for such a type system, we can either introduce a general subtyping notion or use extensible record types. Subtyping, especially in combination with imperative features, poses many hard problems. Therefore, the second approach is promising. The problem is that, in previous type inference systems that used extensible record types, principal types could not be inferred. We have found that, for an object-oriented language where classes are not first-class citizens, we could greatly simplify the underlying record language. We show that, for our simple record language, there exists a type inference algorithm that infers principal types.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call