引用本文:梅宏,孙永强.行为规范作为类型.软件学报,1995,6(5):280-289
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 4413次   下载 5115 本文二维码信息
码上扫一扫!
分享到: 微信 更多
行为规范作为类型
梅宏1, 孙永强2
1.北京大学计算机系,北京,100871;2.上海交通大学计算机系,上海,200030
摘要:
在面向对象程序设计中,继承性是导致语义复杂性的因素之一.本文讨论了作为代码共享机制的继承和表示功能特殊化的子类型的共存及相互关系.采用了将行为规范视为类型的概念,即类型为命名操作的集合.并在此基础上给出了类型、类及子类型关系的形式描述.
关键词:  面向对象程序设计  数据类型  继承  子类型  行为规范  
DOI:
分类号:
基金项目:本研究得到国家自然科学基金及863高科技资助.
BEHAVIORAL SPECIFICATIONS AS TYPES
Mei Hong,Sun Yongqiang
Abstract:
In object-oriented programming,the inheritance is one of the factors which induce semantic complexity.In this paper,the coexistence and relationship of inheritance,as a mechanism for sharing codes,and subtyping,which expresses specialization in functionality, are discussed.The concept of type, which states that types are behavioral specifications of objects,that is,the sets of named operations,is presented. Based on this concept, types, classes and subtyping relationship are described formally.
Key words:  Object-oriented programming  data type  inheritance  subtyping  behavioral specification.