Modular reasoning in the presence of subclassing
Authors:
Open Access
- 17 October 1995
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 30 (10) , 200-214
Abstract
Considerable progress has been made in understanding how to use subtyping in a way that facilitates modular reasoning. However, using subclassing in a way that facilitates modular reasoning is not well understood. Often methods must be overriden as a group because of dependencies on instance variables, and the programmers of subclasses cannot tell which methods are grouped without looking at the code of superclasses. Also, the programmers of subclasses must look at the code of superclasses to tell what assumptions inherited methods make about the behavior of overriden methods.We present a systematic way to use subclassing that facilitates formal and informal modular reasoning. Separate specifications are given to programmers writing code that manipulates instances of a class and to programmers writing subclasses of the class. The specifications given to programmers of subclasses are divided, by division of labor specifications , into multiple parts. Subclasses may inherit or override entire parts, but not sub-parts. Reasoning about the implementation of each part is done independently of other parts.Keywords
This publication has 9 references indexed in Scilit:
- A behavioral notion of subtypingACM Transactions on Programming Languages and Systems, 1994
- Typing the specialization interface1993
- Specifications and their use in defining subtypes1993
- Safe type checking in a statically-typed object-oriented programming language1993
- Issues in the design and specification of class libraries1992
- Reuse (panel)1992
- Reasoning about object-oriented programs that use subtypes1990
- Inheritance is not subtyping1990
- Proof of correctness of data representationsActa Informatica, 1972