首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 156 毫秒
1.
类是面向对象软件的基本构成单元,要提高面向对象软件的可靠性,必须对类进行深入、全面的测试.文中提出了一种新的类测试框架,用XML脚本来描述和组织测试用例,用测试驱动程序来读取测试用例,驱动被测程序运行,并自动比较测试结果.采用本框架,能够自动、高效地对类进行测试,同时能够使测试数据与测试驱动程序相分离,有利于测试数据的维护与重用,在实际应用中取得了很好的效果.  相似文献   

2.
面向对象中多态机制﹑类及方法两级结构以及代码克隆现象都对程序聚类结果有较大的影响.已有的程序聚类的研究工作大多针对结构化程序,对于这些面向对象机制的影响没有进行深入分析.本文针对面向对象程序聚类中这些因素(多态机制﹑类及方法)的影响,通过一个针对开源软件系统的程序聚类实验进行了对比分析,并根据这三种因素的聚类结果特点分别提出了相应的应用场景(如软件体系结构恢复、特征定位、重构等),并以此对面向对象程序聚类策略的选择进行了分析与讨论.  相似文献   

3.
基于XML描述的类测试框架   总被引:4,自引:0,他引:4  
类是面向对象软件的基本构成单元,要提高面向对象软件的可靠性,必须对类进行深入、全面的测试。文中提出了一种新的类测试框架,用XML脚本来描述和组织测试用例,用测试驱动程序来读取测试用例,驱动被测程序运行,并自动比较测试结果。采用本框架,能够自动、高效地对类进行测试,同时能够使测试数据与测试驱动程序相分离,有利于测试数据的维护与重用,在实际应用中取得了很好的效果。  相似文献   

4.
面向对象软件测试是面向对象软件开发的一个重要阶段,是保证软件质量、提高软件可靠性的关键,而类测试又是面向对象软件测试的关键。文章针对面向对象程序的特性对软件测试的影响,研究了一种基于状态的类测试方法,从而能够更有效地对面向对象软件进行测试,提高了软件的质量。  相似文献   

5.
Java软件由于Java语言面向对象和编译成中间码执行的特点,其在抗反编译和反盗版方面显得尤其脆弱,本文针对Java软件的特点,综合运用各种加密方法,探索设计出一个实用型软件加密保护算法。  相似文献   

6.
一种面向对象系统基于角色的访问控制模型研究   总被引:1,自引:0,他引:1  
针对面向对象系统,提出面向对象的基于角色的访问控制模型.本模型通过在模型中添加角色类,并描述了角色类的继承关系,从而有效地减少了面向对象系统中类和类之间的关系表达,更加便于类和类之间安全策略的描述和管理.描述该模型的信息流控制特征,其能够有效地保障面向对象系统中对象与对象之间消息传递的可控性,防止信息的泄漏.  相似文献   

7.
状态依赖的类内聚度量   总被引:1,自引:0,他引:1  
类是面向对象软件中的模块,包含属性和方法。类内聚度量是对类属性和方法相关程度的度量。通过对类方法和属性的分类及其与类状态之间的关系分析,提出了类核的概念和状态依赖的类内聚度量方法。该方法有利于克服类内聚度量复杂性和判断模糊性问题,并可以在设计阶段对类的内聚进行度量。  相似文献   

8.
屈迟文 《计算机与现代化》2012,(12):136-138,142
面向对象软件是由类及其类之间的关联所实现,类测试是面向对象软件测试的关键。本文研究一种将包含层次和并发结构的状态图转化为可扩展有限状态机(EFSM)并获得相应的测试生成树,由测试树产生软件测试数据的类级软件测试方法。实验证明,该测试方法是有效可行的,在实践中能够取得较好的效果。  相似文献   

9.
二进制代码的逆向工程是一个底层的技术,被应用于计算机安全、系统验证、加密解密等相关领域。在逆向工程中,C++的反编译技术是一个难点,尤其是其类型信息的恢复。该文提出了一种利用异常处理机制的类型恢复方法,该方法可以用来分析出每个函数的所有局部类变量,还能分析出这个类的构造函数和析构函数的地址。该方法在特定的环境下可以准确高效地解决C++反编译中的一个难点。  相似文献   

10.
8086C反编译系统中库函数识别技术及其实现   总被引:5,自引:1,他引:4  
在8086 C反编译系统中,我们把模式识别原理应用于 C库函数的识别.本文首先分析了C库函数在目标代码中的组成特点,然后介绍了8086 C反编译系统中的库函数模式识别技术,即C库函数识别特征的提取、识别的模式匹配方式和库函数特征代码识别表的建立,最后介绍了该库函数识别技术在 8086 C反编译系统中的实现方法.  相似文献   

11.
在一些数学软件、统计软件和数值模拟软件中需要的一元函数表达式并不确定。因此,需要一种方法能够动态生成任意复杂的一元函数表达式。本文提出了一种构造函数表达式的动态组合法,该方法将四则运算符、基本初等函数、复合函数和常数项看成是对象,并采用C++实现了这些对象的类定义。通过这些对象的动态创建与组合可以复合成任意的一元函数表达式。结果表明,一元函数表达式对象能够通过接口向其调用者输出正确的表达式计算功能。  相似文献   

12.
协议软件实现的面向对象的方法   总被引:2,自引:0,他引:2  
提出一种用面向对象的方法来实现协议,协议由FSM说明,然后FSM由一组相关的对象实现,对象的成员函数是接口事件,它们激发状态变迁,与状态变迁相联系的行为构成成函数的主体,当状态变迁产生时,一个对象成为另一个对象。文中给出了一个实例,还提出一个软件工具,使设计者可以用图形方式编辑状态机,并且自动产生C++的类定义。  相似文献   

13.
Java access modifiers regulate interactions among software components. In particular, class modifiers specify which classes from a component are publicly exposed and therefore belong to the component public interface. Restricting the accessibility as specified by a programmer is key to ensure a proper software modularity. It has been said that failing to do so is likely to produce maintenance problems, poor system quality, and architecture decay. However, how developers uses class access modifiers or how inadequate access modifiers affect software systems has not been investigated yet in the literature.In this work, we empirically analyze the use of class access modifiers across a collection of 15 Java libraries and 15 applications, totaling over 3.6M lines of code. We have found that an average of 25% of classes are over-exposed, i.e., classes defined with an accessibility that is broader than necessary. A number of code patterns involving over-exposed classes have been formalized, characterizing programmers׳ habits. Furthermore, we propose an Eclipse plugin to make component public interfaces match with the programmer׳s intent.  相似文献   

14.
面向对象软件的基本测试单元是类,文中提出了用一种基于代码的测试技术-数据流测试来全面地测试类。对类测试分为3级:单个成员函数的测试;公有成员函数的测试;公有成员函数接口的测试。  相似文献   

15.
ContextClass maintainability is the likelihood that a class can be easily modified. Before releasing an object-oriented software system, it is impossible to know with certainty when, where, how, and how often a class will be modified. At that stage, this likelihood can be estimated using the internal quality attributes of a class, which include cohesion, coupling, and size. To reduce the future class maintenance efforts and cost, developers are encouraged to carefully test and well document low maintainability classes before releasing the object-oriented system.ObjectiveWe empirically study the relationship between internal class quality attributes (size, cohesion, and coupling) and an external quality attribute (class maintainability). Using statistical techniques, we also construct models based on the selected internal attributes to predict class maintainability.MethodWe consider classes of three open-source systems. For each class, we account for two actual maintainability indicators, the number of revised lines of code and the number of revisions in which the class was involved. Using 19 internal quality measures, we empirically explore the impact of size, cohesion, and coupling on class maintainability. We also empirically investigate the abilities of the measures, considered both individually and combined, to estimate class maintainability. Statistically based prediction models are constructed and validated.ResultsOur results demonstrate that classes with better qualities (i.e., higher cohesion values and lower size and coupling values) have better maintainability (i.e., are more likely to be easily modified) than those of worse qualities. Most of the considered measures are shown to be predictors of the considered maintainability indicators to some degree. The abilities of the considered internal quality measures to predict class maintainability are improved when the measures are combined using optimized multivariate statistical models.ConclusionThe prediction models can help software engineers locate classes with low maintainability. These classes must be carefully tested and well documented.  相似文献   

16.
Assigning responsibilities to classes is a vital task in object-oriented analysis and design, and it directly affects the maintainability and reusability of software systems. There are many methodologies to help recognize the responsibilities of a system and assign them to classes, but all of them depend greatly on human judgment and decision-making. In this paper, we propose a clustering-based model to solve the class responsibility assignment (CRA) problem. The proposed model employs a novel interactive graph-based method to find inheritance hierarchies, and two novel criteria to determine the appropriate number of classes. It reduces the dependency of CRA on human judgment and provides a decision-making support for CRA in class diagrams. To evaluate the proposed model, we apply three different hierarchical agglomerative clustering algorithms and two different types of similarity measures. By comparing the obtained results of clustering techniques with the models designed by multi-objective genetic algorithm (MOGA), it is revealed that clustering techniques yield promising results.  相似文献   

17.
DCS是一种新型的控制系统。它目前已被广泛应用于工业生产的各个领域。在DCS系统中,信息的表示是一个非常重要的组成部分。系统中的信息表棕形式种类繁多,既要避免软件开发的大量重复劳动又要使用户能操作便利且信息表示直观易于用户接受,利用面向对象技术与传统设计思想相结合的方法是目前DCS信息表示软件开发的一种最佳途径。  相似文献   

18.
沈琦  钱旭 《计算机工程》1998,24(9):64-65
为了有效、快捷地开发CAI软件,使开发的软件能达到通用化及实用化,提出利用面向对象技术与传统的软件设计方法相结合的软件设计思想,把软件过程分为″三阶段″的设想。这种开发方法对于提高软件产品质量以及缩短开发周期有一定的参考价值。.  相似文献   

19.
wxWidgets是一个优秀的开源应用程序框架,但在基于该框架的应用程序中不能直接使用ActiveX控件.在大量开发实践的基础上,通过深入研究wxWidgets框架及COM、ActiveX控件的相关知识,提出一种在基于wxWidgets框架的应用程序中使用ActiveX控件的通用方法,并将相关代码使用类进行了封装.通过实际项目的检验,该方法切实可行,封装得到的类简单易用,在相关软件开发中取得了很好的效果.  相似文献   

20.
基于EDPN的类测试框架及测试用例生成技术的研究   总被引:1,自引:0,他引:1  
针对基于状态的面向对象软件的类测试过程中存在的不可预测、不可达状态、状态组合“爆炸”和测试用例“爆炸”等问题,提出了基于EDPN模型的类测试、类的交互测试和类的层次测试框架,设计了相应的测试模型;提出了基于EDPN的有标记的唯一输入输出(UIO)测试用例的自动生成方法,生成状态转移路径序列,测试类的状态;提出了基于扩展的EDPN的状态组合的标记关联递推法,生成扩展的正交阵列表,测试类的交互;提出了基于扩展的EMDPN的协同路径(copaths)测试用例的生成方法,生成协同路径序列,测试类的层次。  相似文献   

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

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