| 摘要: |
| 在面向对象程序设计中,继承性是导致语义复杂性的因素之一.本文讨论了作为代码共享机制的继承和表示功能特殊化的子类型的共存及相互关系.采用了将行为规范视为类型的概念,即类型为命名操作的集合.并在此基础上给出了类型、类及子类型关系的形式描述. |
| 关键词: 面向对象程序设计 数据类型 继承 子类型 行为规范 |
| 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. |