Inheritance-Based Subtyping
نویسندگان
چکیده
Classes play a dual rôle in mainstream statically-typed object-oriented languages, serving as both object generators and object types. In such languages, inheritance implies subtyping. In contrast, the theoretical language community has viewed this linkage as a mistake and has focused on subtyping relationships determined by the structure of object types, without regard to their underlying implementations. In this paper, we explore why inheritance-based subtyping relations are useful, and we describe two different approaches to extending the programming language with inheritance-based subtyping relations. In addition, we present a typed object calculus that supports both structural and inheritance-based subtyping, and which provides a formal accounting of our extensions to .
منابع مشابه
Extending Moby with Inheritance-Based Subtyping
There is a great divide between the study of the foundations of object-oriented languages and the practice of mainstream object-oriented languages like JAVA[AG98] and C++[Str97]. One of the most striking examples of this divide is the rôle that class inheritance plays in defining subtyping relations. In most foundational descriptions of OO languages, and in the language designs that these studi...
متن کاملSubtyping and Inheritance for Categorical
We extend Hagino's categorical datatypes with subtyping and a limited form of inheritance. The view of objects as coalgebras provides the inspiration for subtyping and inheritance for coalgebraic (or coinductive) types. Exploiting the duality between coalgebras and algebras then yields notions of subtyping and inheritance for algebraic (or inductive) types.
متن کاملSeventh International Workshop on Foundations of Object-Oriented Languages
The Seventh International Workshop on Foundations of Object-Oriented Languages (FOOL 7) was held on January 22, 2000, and it was colocated with the ACM Symposium on Principles of Programming Languages in Boston, Massachusetts, USA. Martı́n Abadi chaired the program committee, which received 19 submissions and accepted 6 of them. After the workshop, extended versions of 4 articles were solicited ...
متن کاملSubtyping-inheritance Conflicts: the Mobile
In sequential classand mixin-based settings, subtyping is essentially a relation on objects: no subtype relation is defined on classes and mixins, otherwise there would be conflicts with the inheritance mechanism, creating type un-safety. Nevertheless, a width-depth subtyping relation on class and mixin types is useful in the realm of mobile and distributed processes, where object-oriented code...
متن کاملIncremental Reasoning for Multiple Inheritance
Object-orientation supports code reuse and incremental programming. Multiple inheritance increases the power of code reuse, but complicates the binding of method calls and thereby program analysis. Behavioral subtyping allows program analysis under an open world assumption; i.e., under the assumption that class hierarchies are extensible. However, method redefinition is severely restricted by b...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Inf. Comput.
دوره 177 شماره
صفحات -
تاریخ انتشار 2002