首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到17条相似文献,搜索用时 125 毫秒
1.
基于双层类结构的继承异常处理方法   总被引:2,自引:1,他引:2  
张鸣  吕建  杨大军  陶先平 《软件学报》1999,10(6):619-625
继承异常是并发面向对象语言中的一个很重要而且也是处理起来很困难的问题,它会使同步代码难以重用.为解决此问题,文章提出了一种新的双层类结构模型的方法,来解决继承异常问题,它可对同步代码的复用提供全方位的支持.  相似文献   

2.
并发面向对象模型中继承异常的一种解决方案   总被引:2,自引:0,他引:2  
1 引言继承机制是面向对象软件开发中的重要设施,是实现软件复用和扩充的一种有效的语言机制,它是顺序面向对象语言的一个基本特点。但是,在将面向对象技术与并发相结合的过程中,对并发控制机制处理不当,将会引起继承机制与并发控制间的冲突问题。这种冲突主要表现在:定义子类时需要修改(重定义)父类中的所有代码才能实现自身的并发控制,从而使得子类无法继承父类的代码,产生继承异常现象、继承异常的出现将进一步破坏面向对象技术的两大优点,即:继承和封装。所以,如何有效地避免继承异常或将继承异常的产生降低到最小的程度是并发面向对象模型所要研究的一个重要问题。  相似文献   

3.
型构兼容的继承及其语义   总被引:1,自引:0,他引:1  
本文揭示了在面向对象程序设计语言中,若劲旅子类重定义其继承的分类方法以发迹这些方法的规约,并且采用类似于Smaltalk-80中的继承机制的语义,将导致封将与继承之间的一个新总是为此,本文提出了一种新的继承机制-型构兼容的继承,以代替传统的增量继承。型构兼容的继承是一种灵活的代码复用机制,并且能够充分支持封装。  相似文献   

4.
李宣东  郑国梁 《软件学报》1995,6(1):187-193
本给出一种包含多种继承行为的,非常灵活的代码复用机制-广义继承,通过给出其操作语义和一个支持类间子类型关系确认的类机制,为其在面向对象程序设计语言中的实现奠定了基础。  相似文献   

5.
广义继承及其在面向对象程序设计语言中的实现*   总被引:1,自引:0,他引:1  
李宣东  郑国梁 《软件学报》1995,6(Z1):187-193
本文给出一种包含多种继承行为的、非常灵活的代码复用机制——广义继承,通过给出其操作语义和一个支持类间子类型关系确认的类机制.为其在面向对象程序设计语言中的实现奠定了基础.  相似文献   

6.
继承异常是用来描述在并发面向对象语言中继承与并发的冲突 .为分析并解决这种冲突 ,人们做了大量的工作 ,但我们认为以前的分类是不完全的 .本文对继承异常做了系统的分析 ,并设计了一个新的同步模型 ,为每个方法增加了同步策略与同步状态控制 ,加大了并发对象的代码可重用性 .本文用实例说明了该模型 ,在很大程度上避免或减少了“继承异常”的发生 .  相似文献   

7.
陆嘉  温冬婵  王鼎兴 《软件学报》2000,11(4):494-501
面向对象并发程序设计语言能够帮助程序员利用面向对象技术编写并发程序,从而获得面向对象技术给软件开发带来的种种好处.然而,由于继承异常现象的存在,影响了并发程序设计语言引入继承特性.Ada95语言是支持并发程序设计的面向对象语言之一,但并不支持保护对象的继承.Ada-I语言在Ada95语言的基础上进行扩充,从而支持保护对象的继承,并且避免了继承异常现象的出现.  相似文献   

8.
面向对象程序中的对象回调技术   总被引:1,自引:0,他引:1  
王跃宣  钱锦棠 《计算机工程》2000,26(3):103-103,F003
为了提高面向对象程序中代码的复用性和效率,提出了两种在C++环境中利用对象回调实现代码复用的方法,即多重继承和动态类。实践证明,这两种方法能够极大地提高代码效率。  相似文献   

9.
商陆军 《计算机学报》1992,15(12):920-926
文献[1]提出了一种新的刻划并发行为的方法.本文继续讨论这种方法在面向对象的程序设计中是如何解决并发代码在继承过程中的冲突问题的.  相似文献   

10.
面向对象程序设计是一种实用的支持模块化设计和代码复用的程序设计方法。大多数面向对象语言均支持信息隐蔽的数据抽象和封装。然而继承性的存在却严重地削弱了封装带来的好外。本文讨论了信息隐蔽和继承性间的关系,并描述了一种支持封装的多路继承机制。  相似文献   

11.
There have been a number of publications illustrating the successes of object-oriented techniques in creating highly reusable software systems. Several concurrent languages have been proposed for specifying reusable synchronization specifications. Recently, a number of real-time object-oriented languages have been introduced for building object-oriented programs with real-time behavior. Composing and reusing object-oriented programs with both synchronization and real-time constraints has not been addressed adequately, although most real-time systems are concurrent. This paper analyzes the origins of the problems in composing and reusing synchronization and real-time specifications, first as separate concerns, and later as composed behavior. To overcome the so-called inheritance anomaly problems, this paper proposes modular and composable synchronization and real-time specification extensions to the object-oriented model. The applicability of the proposed mechanisms is illustrated through a number of examples.  相似文献   

12.
Actor模型是一种面向对象的并发模型,但它缺乏对继承机制的支持。本文试图阐明在Actor模型中该支持什么样的继承以及如何支持这种继承。  相似文献   

13.
面向对象Petri网继承性的研究   总被引:1,自引:1,他引:0  
面向对象Petri网(OOPN)利用面向对象的封装性解决了Petri网不能用于大型系统建模的问题.针对大型系统建模中的面向对象Petri网建模的便捷性进行研究,将面向对象的继承性以及与之紧密联系的多态性引入到OOPN中,以其在更大程度上实现模型的复用,使大型系统建模过程更加便捷、灵活.  相似文献   

14.
Methods in object-oriented concurrent libraries often encapsulate internal synchronization details. As a result of information hiding, clients calling the library methods may cause thread safety violations by invoking methods in an unsafe manner. This is frequently a cause of deadlocks. Given a concurrent library, we present a technique for inferring interface contracts that specify permissible concurrent method calls and patterns of aliasing among method arguments. In this work, we focus on deriving contracts that guarantee deadlock-free execution for the methods in the library. The contracts also help client developers by documenting required assumptions about the library methods. Alternatively, the contracts can be statically enforced in the client code to detect potential deadlocks in the client. Our technique combines static analysis with a symbolic encoding scheme for tracking lock dependencies, allowing us to synthesize contracts using a SMT solver. Additionally, we investigate extensions of our technique to reason about deadlocks in libraries that employ signaling primitives such as wait-notify for cooperative synchronization. Our prototype tool analyzes over a million lines of code for some widely-used Java libraries within an hour, thus demonstrating its scalability and efficiency. Furthermore, the contracts inferred by our approach have been able to pinpoint real deadlocks in clients, i.e. deadlocks that have been a part of bug-reports filed by users and developers of client code.  相似文献   

15.
16.
Solving Inheritance Anomaly with OMNets   总被引:2,自引:0,他引:2       下载免费PDF全文
This paper presents a concurrent object-oriented modeling language based on Petri nets:OMNets,which hepls greatly to avoid the inheritance anomaly problem appeared in concurrent OO languages.OMNets separates th functional part and the synchroniztion part of objects and uses Petri nets to describe the synchronization part.Both parts are reusable through inheritance.  相似文献   

17.
C++的一种并发扩充方案*   总被引:2,自引:1,他引:2  
该文给出了一种对C++进行并发扩充的方案.它基于这样的并发面向对象模型:系统由一组自治的并发对象构成,对象可以有一个体,一旦对象被创建,对象体就开始执行;对象间采用同步消息传递,允许对象内部的并发;对象的并发控制分散在各方法的激励条件中.文章还给出了一种转换策略,把扩充的C++描述转换成C++描述,使之能被现有的C++编译器识别.转换中利用了某些多任务操作系统(如Windows 95)所提供的多线程和同步设施.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号