- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
中文模板-LAMDA.doc
文章题目
作者姓名(
(南京大学 计算机科学与技术系, 南京 210093)
Subject of Your Survey
NAME*
(Department of Computer Science and Technology, Nanjing University, Nanjing 210093, China)
Abstract: The combination of concurrency and object orientation is definitely natural except for inheritance. One of the interferences between inheritance and concurrency is inheritance anomaly. Although having been researched extensively, inheritance anomalies are still only vaguely defined and often misunderstood, and no much formal work has been done. A new viewpoint is set forth for understanding inheritance anomalies, in which each subtyping relation has its specific incremental inheritance. Related concepts and definitions are formalized through the language of Category. Some issues are well adapted to distinguish and explain different standpoints about inheritance anomalies, and can serve as guidelines in the modeling of inheritance.
Key words: concurrency; object orientation; inheritance anomaly; incremental inheritance; category theory
摘 要: 如果不考虑继承性,并发性与对象技术的结合是很自然的.继承反常(又称继承异常)现象是继承性和并发性不相容的主要原因之一.现阶段人们对继承反常现象的认识有许多模糊之处,出发点不尽相同,形式化的工作也很少.对不同的subtyping关系考虑其特有的渐增式继承方法有利于把握继承反常现象的实质,也丰富了“在并发面向对象语言中应将inheritance层次和subtyping层次区别对待”这一认识的内涵.在阐述基本观点之后,采用范畴论的术语对相关的概念和定义做了形式化工作.一些观点和结论适用于区分和解释相关工作的出发点和贡献,并对并发面向对象技术中继承性的建模问题有所启示.
关键词: 并发性;面向对象;继承反常;渐增式继承;范畴论
中图法分类号: TP301 文献标识码: A
引言
如图1所示,类Buffer实现了一个有界缓冲区类型,可以并发地接受消息put和get.同步机制采用了“method guards”方式,即为每一个method附加一个guard谓词[2].构造Buffer的另一个子类LockableBuffer也会引发同样的问题.这种“为获得有效继承而必须对父类代码进行实质性修改的现象”就是所谓的继承反常(inheritance anomaly)[3~5].
理解继承反常现象
区别Inheritance和Subtyping
综合各种观点,要理解和解释继承反常现象,首先必须正确区别inheritance层次和subtyping层次,并深刻领会二者的联系[6,7].对于这个问题,文献[1,8]的观点是比较权威的.在此基础上,我们的理解是:Inheritance是在代码层次上作修改,而subtyping是在语义层次上作修改.前者是代码共享的一种重要途径,但不能保证subclass能够继承superclass的行为;后者要求subtype保持supertype的某种外部可观察行为(或语义行为),在规范一级共享,同代码没有关系.Inheritance层次关系可以理解为“is_similar_to”(或“like”)的关系,而将“is_a”关系更适合用在理解subtyping层次关系上,见表1[9].
Table 1 Latency of macro-instructions
表1 宏指令的时延
Acronym Macr
文档评论(0)