摘要 |
Described herein are methods and systems for applying typing rules for type checking typed intermediate representations of computer program whose source code was written in an object-oriented language. The typing rules are decidable in part because the typed intermediate representation retains class name-based information related to classes from the source code representation. The class name-based information includes information related to class hierarchies, which in part can be used to express sub-classing. Typing rules are applied to parts of the intermediate representation that are typed based on class name-based types and the corresponding structure-based record types. Thus, some typing rules are described herein that are based on sub-classing bounds of type variables. The typing rules include rules related to method calls including type arguments, coercions, existential type operations such as, open and pack.
|