A Type Checked Prototype-Based Model with Linearity
CARNEGIE-MELLON UNIV PITTSBURGH PA SCHOOL OF COMPUTER SCIENCE
Pagination or Media Count:
Dynamic inheritance, originating in the SELF programming language, is the ability of an object to change the code that it inherits at run time. This ability is useful for modeling objects that behave in different ways at different points in the objects life cycle. Unstructured dynamic inheritance, however, allows arbitrary changes to the interface of the object, and thus is incompatible with statically type-checked languages such as C, C, and Java. This paper provides a more structured facility for dynamic inheritance, where a type system tracks the changes in an objects interface that occur as the inheritance hierarchy is changed. The authors define a formal model of a language and type system with dynamic inheritance, and prove that the type system is sound in that it prevents run-time type errors. The type system tracks the linearity of objects and methods to ensure that objects whose interfaces change are not aliased.
- Computer Programming and Software