首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 109 毫秒
1.
并发面向对象语言的组合同步控制模型   总被引:1,自引:1,他引:0  
要将并发性与面向对象及代码重用结合起来,必须解决“继承异常”问题。目前提出的方案大都针对特定问题,有一定的局限性。本文引入了一种新的同步模型,将同步控制分为同步策略控制与同步条件控制,同时引入了策略库,加大了并发对象的代码可重用性,在很大程度上避免或减少了“继承异常”的发生。  相似文献   

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

3.
传统的异常处理代码存在许多问题,尤其是代码不具有模块性,异常代码的维护很困难.面向方面编程(AOP)是一种新的编程技术,它弥补了面向对象编程(OOP)在跨越模块行为上的不足.利用AOP能够很好地分离出"异常处理"这一横切关注点,模块化构建松散耦合的系统.文章研究了在异常处理方面的通用策略和AOP在异常处理方面的应用,并给出了基于JBoss AOP的具体实现.该框架简单灵活,实用.  相似文献   

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

5.
针对类状态测试可能遗漏数据错误问题,利用数据流分析技术对生成的测试序列进行分析,找出数据流异常进而对其改进,能较好地解决数据错误问题。为解决在状态测试执行时需要插装代码来跟踪状态转换以便进行可行性检测分析,以及需要通过改写被测类代码来解决类封装性限制进行类状态验证,导致测试脚本臃肿、强聚合和被测类代码版本不一致问题,提出了一种基于AOP类状态测试执行方法,它通过分离关注点、突破类封装性限制,能有效地解决这些问题。基于上述技术和方法,提出一种类状态测试模型,实例分析和实验结果表明,该模型能较好地实现类状态测试。  相似文献   

6.
刘振安  张强 《测控技术》2006,25(11):61-63
提出一种基于类文件的Java运行时异常分析技术.它可在没有Java源代码文件的情况下,直接对类文件进行处理,分析可能抛出的异常信息,并根据分析结果在类文件中添加适当的异常追踪代码.这种处理后的类文件可无缝替换原类文件运行,并在运行中抛出异常时,能够给出详尽的异常分析报告,从而提高技术人员调试和开发的效率.  相似文献   

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

8.
一种并发面向对象同步模型研究   总被引:1,自引:0,他引:1  
吕建  杨大军  廖宇  唐宝 《软件学报》2002,13(1):71-79
同步是并发语言的一个重要特征,然而在面向对象的框架下,同步约束的存在可能导致不期望的方法的重定义.基于并发面向对象规约语言VDM++(Vienna development method)的两种同步机制,提出一种适合于并发面向对象广谱规约语言的同步模型-卫式路径结构.它不但可以支持一般代码的复用,而且可以全方位地支持对同步代码的复用.  相似文献   

9.
简要描述Java语言多线程机制,阐述了操作系统中生产者/消费者这个经典同步问题,探讨了该问题的多种高效解决策略,并通过Java语言的多线程编程技术,给出了实现此问题相应解决策略的代码.旨在为研究producer-consumer patterns提供新思路.  相似文献   

10.
目前解决Java同步线程模型缺陷采用的是急救包类库的方式,但是此方法面临着一项重大技术难题,就是代码无法或者很难实现优化。针对Java同步线程模型缺陷问题,可以采用扩展synchronised关键字语法,使其能够接受超时说明,并且支持多个参数;解决超时检测问题,可以重新定义wait(),便于返回boolean变量,这样超时检测得以解决;扩展语法来解决同步的问题。从而,Java同步线程模型的缺陷得以解决,程序稳定且可以优化。  相似文献   

11.
Normalization of Class Hierarchy in Databases   总被引:1,自引:0,他引:1       下载免费PDF全文
In complex object oriented databases,the purpose of introducing class hierarchy is to express ISA semantics,to realize inheriting and to reuse schema definition codes.The schema defintition and schema evolution,based on the partial order of lattice,often cause the loss o information inheriting and the redundance of schema definition.Based on the fullness of the inheritance shown by class hierarchy,three normal forms of class hierarchy are given in this paper,and a general algorithm of normalization of class hierarchy is presented,following the Boolean algebra model of class hierarchy.The loss of information inheritance can be avoided when they are applied to schema design and schema evolution.  相似文献   

12.
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.  相似文献   

13.
14.
A major problem for the integration of concurrency in object-oriented languages is the so-called inheritance anomaly, i.e. the conflicts between inheritance and concurrency that often cause the need to redefine inherited methods in order to maintain the integrity of objects. Several solutions have been proposed for resolving these conflicts. However, some of them are incomplete, and do not solve all types of inheritance anomaly; others make the definition of classes complex and/or their implementation inefficient. This paper describes a C++ library for concurrent programming that provides a comprehensive framework particularly suitable for coarse-grained distributed applications. This library copes with the inheritance anomaly problem, presenting a solution that minimizes the redefinition of inherited methods without increasing the complexity to write them. This solution is based on the use of a special set of methods, called interface methods, composed of a body and two sets of synchronization constraints. These two sets of synchronization constraints are respectively used to enable the execution of their method body and to disable the methods that cannot be executed after their method. © 1998 John Wiley & Sons, Ltd.  相似文献   

15.
类是 Visual Basic6 .0中实现软件重用的最基本方法 ,类的多态是面向对象语言中最复杂的概念。大多数面向对象的程序设计语言 (例如 C++,PB,VFP) ,都是通过继承来提供多态的。 Visual Basic不用继承来提供多态 ,而是通过多重 Active X接口来提供多态。着重分析了通过抽象类和具体类来实现多重 Active X接口、从而实现类的多态的有关技术。  相似文献   

16.
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.  相似文献   

17.
The Java programming language has a low‐level concurrency model which is hard to use and does not blend well with inheritance. JAC is an extension of Java that introduces a higher level of concurrency, hiding threads and separating thread synchronization from application logic in a declarative fashion. The emphasis is on limiting the differences between sequential and concurrent code, thus furthering code reuse, and on avoiding inheritance anomalies. This is achieved by taking a middle road between concurrent code on the one hand and complete separation of sequential application logic from concurrency mechanisms on the other. An extensive comparison with related approaches is given for motivating our design decisions. Copyright © 2005 John Wiley & Sons, Ltd.  相似文献   

18.
The concept of object-oriented design and programming has recently received a great deal of attention from the software engineering community. This paper highlights the realisable benefits of using the object-oriented approach in the design and development of clinical decision support systems. These systems seek to build a computational model of some problem domain and therefore tend to be exploratory in nature. Conventional procedural design techniques do not support either the process of model building or rapid prototyping. The central concepts of the object-oriented paradigm are introduced, namely encapsulation, inheritance and polymorphism, and their use illustrated in a case study, taken from the domain of breast histopathology. In particular, the dual roles of inheritance in object-oriented programming are examined, i.e., inheritance as a conceptual modelling tool and inheritance as a code reuse mechanism. It is argued that the use of the former is not entirely intuitive and may be difficult to incorporate into the design process. However, inheritance as a means of optimising code reuse offers substantial technical benefits.  相似文献   

19.
一种基于UML的多态性测试线索生成方法   总被引:1,自引:0,他引:1  
首先分析了多态性的成因及形式化表示;然后借用控制流图的思想分析协作图,将类图中的信息结合到协作图中,对传统的函数间受限控制流图IRCFG进行多态性扩展并带上类图的基本信息;最后分析了测试覆盖准则并给出测试线索的生成方法。  相似文献   

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

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

京公网安备 11010802026262号