A BEHAVIORAL NOTION OF SUBTYPING

被引:483
作者
LISKOV, BH [1 ]
WING, JM [1 ]
机构
[1] CARNEGIE MELLON UNIV, SCH COMP SCI, PITTSBURGH, PA 15213 USA
来源
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS | 1994年 / 16卷 / 06期
关键词
DESIGN; LANGUAGES; VERIFICATION; SUBTYPING; FORMAL SPECIFICATIONS; LARCH;
D O I
10.1145/197320.197383
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The use of hierarchy is an important component of object-oriented design. Hierarchy allows the use of type families, in which higher level supertypes capture the behavior that all of their subtypes have in common. For this methodology to be effective, it is necessary to have a clear understanding of how subtypes and supertypes are related. This paper takes the position that the relationship should ensure that any property proved about supertype objects also holds for its subtype objects. It presents two ways of defining the subtype relation, each of which meets this criterion, and each of which is easy for programmers to use, The subtype relation is based on the specifications of the sub- and supertypes; the paper presents a way of specifying types that makes it convenient to define the subtype relation. The paper also discusses the ramifications of this notion of subtyping on the design of type families.
引用
收藏
页码:1811 / 1841
页数:31
相关论文
共 37 条
[1]  
AMERICA P, 1990, SIGPLAN NOTICES, V25, P161, DOI 10.1145/97946.97966
[2]  
AMERICA P, 1991, LECT NOTES COMPUT SC, V489, P60
[3]   DISTRIBUTION AND ABSTRACT TYPES IN EMERALD [J].
BLACK, A ;
HUTCHINSON, N ;
JUL, E ;
LEVY, H ;
CARTER, L .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1987, 13 (01) :65-76
[4]  
BRUCE KB, 1990, ADV DATABASE PROGRAM, P75
[5]   A SEMANTICS OF MULTIPLE INHERITANCE [J].
CARDELLI, L .
INFORMATION AND COMPUTATION, 1988, 76 (2-3) :138-164
[6]  
CARRINGTON D, 1989, FORTE89 INT C FORMAL
[7]  
CUSACK E, 1991, LECT NOTES COMPUT SC, V489, P179
[8]  
CUSACK E, 1991, P ECOOP 91
[9]  
DAHL OJ, 1970, 22 NORW COMP CTR TEC
[10]  
DHARA KK, 1992, 9236 IOW STAT U DEP