1. A computer implemented method, comprising: processing a source code representation of a computer program in an object-oriented language into a high-level intermediate representation; and translating the high-level intermediate representation into a typed medium-level intermediate representation, comprising combining a name-based class name and corresponding structure-based record type into a combined class type, using an exact class name to represent objects of that class but not those of subclasses and the combined class type as an encoding of an existential type to represent objects of the class and subclasses of the class, and translating interface method invocation of an object by calling an interface method on the object when open, testing whether an object can be cast to a class, to an interface, to a class vector.