MODULAR REASONING IN THE PRESENCE OF SUBCLASSING

Authors
Citation
R. Stata et Jv. Guttag, MODULAR REASONING IN THE PRESENCE OF SUBCLASSING, ACM SIGPLAN NOTICES, 30(10), 1995, pp. 200-214
Citations number
15
Categorie Soggetti
Computer Sciences","Computer Science Software Graphycs Programming
Journal title
Volume
30
Issue
10
Year of publication
1995
Pages
200 - 214
Database
ISI
SICI code
Abstract
Considerable progress has been made in understanding how to use subtyp ing in a way that facilitates modular reasoning. However, using subcla ssing in a way that facilitates modular reasoning is not well understo od. 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 supercla sses to tell what assumptions inherited methods make about the behavio r of overriden methods. We present a systematic way to use subclassing that facilitates formal and informal modular reasoning, Separate spec ifications are given to programmers writing code that manipulates inst ances of a class and to programmers writing subclasses of the class. T he specifications given to programmers of subclasses are divided, by d ivision of labor specifications, into multiple parts. Subclasses may i nherit or override entire parts, but not sub-parts. Reasoning about th e implementation of each part is done independently of other parts.