Abstract

In the last couple of years several dynamically-typed, object-oriented programming languages have been equipped with optional static type checkers. This typically requires these languages to be extended with a downcast operator, which is a common operator in statically-typed languages but not in dynamically-typed languages.Our objective is to investigate an approach for static type checking of object-oriented languages that does not require such an additional downcast operator. We systematically weaken the rules for static type checking to avoid reporting errors that can be resolved using downcast operators. This leads to an approach similar to quasi-static typing that enables to make type annotations stricter in a gradual way.These static type checking rules can be applied to dynamically-typed languages by interpreting the dynamic type as the top of the subtype relation. Based on these ideas we have implemented a static type checker for the dynamically-typed, object-oriented language POOSL without introducing a downcast operator. Practical experiences with this type checker indicate that it is useful for early validation.

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