首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 0 毫秒
1.
重构是当下软件工程领域研究的一个重要研究课题,在软件开发和软件维护的过程中,程序员逐渐认识到其重要性。本文先从重构的定义,重构的意义和重构的时机等几个方面系统地介代码件重构的相关内容,然后列举了重构所要解决的几种常见的代码坏味。最后后结合一个具体实例展示了重复代码这一常见坏味产生的原因以及重构过程。  相似文献   

2.
在现代软件开发和维护中,重构是提高软件可维护性和软件质量的常用手段.而大量重构模式掺杂在日常的bug修复、功能增加等代码变更中,使得变更理解变得非常复杂.识别重构模式可以将重构与其它类型的代码变更隔离,利于变更理解.目前在识别重构模式的相关研究中,并没有结合变更类型和相似性比较的识别重构模式的方法及工具.为此,提出了一种基于细粒度变更类型和文本相似性比较识别重构模式的方法.将该方法应用于抽取类重构模式,并在4个开源项目中进行了实验,其平均准确率在82.6%左右.  相似文献   

3.
4.
Tile basic features of object-oriented software makes it difficult to apply traditional testing methods in objectoriented systems. Control Flow Graph (CFG) is a well-known model used for identification of independent paths in procedural software. This paper highlights the problem of constructing CFG in object-oriented systems and proposes a new model named Extended Control Flow Graph (ECFG) for code based analysis of Object-Oriented (OO) software. ECFG is a layered CFG where nodes refer to methods rather than statements. A new metrics Extended Cyclomatic Complexity (E-CC) is developed which is analogous to McCabe's Cyclomatic Complexity (CC) and refers to the number of independent execution paths within the OO software. The different ways in which CFG's of individual methods are connected in an ECFG are presented and formulas for E-CC for these different cases are proposed. Finally we have considered an example in Java and based on its ECFG, applied these cases to arrive at the E-CC of the total system as well as proposed a methodology for calculating the basis set, i.e., the set of independent paths for the OO system that will help in creation of test cases for code testing.  相似文献   

5.
本文阐述了面向服务架构的实质及Web Service技术与面向服务架构的契合性,然后结合一个现有系统的业务,分析其现有架构的弊端,利用面向服务架构设计理念对系统业务进行整合分析,提出一个基于面向服务架构改造方案。方案基于.NET平台和其Web Service技术。文中还就利用现有技术的实现环节及其细节进行描述与分析。最后阐述了面向服务架构的优越性及其一些不足之处,并得出面向服务架构是无关具体技术,以业务为主导的开发理念。  相似文献   

6.
信息编码与面向对象的信息编码模型研究   总被引:5,自引:1,他引:5  
首先对信息编码的原理进行了讨论,在此基础上用面向对象方法对信息编码进行分析并建立了面向对象的信息编码描述模型。通过该模型描述企业内部的信息编码,从而实现企业内部信息分类、编码的集成,达到信息编码和应用系统的分离,提高了信息编码的柔性。  相似文献   

7.
使用抽象语法树和静态分析的克隆代码自动重构方法   总被引:4,自引:0,他引:4  
单个软件系统中以及若干个相似系统之间的代码克隆给软件维护增加了很大困难.本文针对运用克隆侦测发现的相似代码片断,提出一种基于抽象语法树和静态分析的代码自动重构方法.该方法首先为克隆代码分别构造抽象语法树,然后运用语句差异度指标建立起语法树之间流程控制语句的对应关系.在此基础上,该方法根据控制流程和基本语句块两个层次上的差异性分析,最终通过代码可变点提取实现克隆代码的自动合并.针对Java代码开发了克隆代码重构支持工具原型,并分别针对JDK1.5和一个业务系统进行了自动重构实验.初步的结果表明,该方法能够准确、有效地辅助开发者实现克隆代码的自动重构.  相似文献   

8.
王云峰  庞军  查鸣  杨朝晖  郑国梁 《软件学报》2000,11(8):1041-1046
COOZ(complete object-oriented Z)的优势在于精确描述大型程序的规约.COOZ本身的结构 不支持精化演算,这限制了COOZ的应用能力,使COOZ难以作为完整的方法应用于软件的开发. 将精化演算引入COOZ,弥补了COOZ在设计和实现阶段的不足,同时也消除了规约与实现之间在 结构和表示方法上的完全分离,使程序开发在一个完整的框架下平滑进行.该文提出了基于CO OZ和精化演算的软件开发模型,通过实例讨论了数据精化和操作精化问题.在精化演算实现技 术方面构造了一种数据精化算子,提出一  相似文献   

9.
Tool-Supported Verification of Product Line Requirements   总被引:1,自引:0,他引:1  
A recurring difficulty for organizations that employ a product-line approach to development is that when a new product is added to an existing product line, there is currently no automated way to verify the completeness and consistency of the new product’s requirements in terms of the product line. In this paper we address the issue of requirements verification for product lines. We have implemented our approach in a requirements engineering tool called DECIMAL (DECIsion Modeling AppLication). DECIMAL is a requirements verification tool with a rich graphical user interface that automatically checks for completeness and consistency between a new product and the product line to which it belongs. The verification uses an SQL database server as the underlying analysis engine. The paper describes the tool and evaluates it in two applications: a virtual-reality, positional device-driver product line and the feature-interaction resolution problem.Research is supported in part by National Science Foundation Grants 0204139 and 0205588. An early version of this paper was presented at REPL’02 (Padmanabhan and Lutz, 2002).  相似文献   

10.
11.
In recent years there has been a growing interest in empirically investigating object-oriented technology (OOT). Much of this empirical work has been experimental in nature. This paper reviews the published output of such experiments—18 in total—with the twin aims of, first, assessing what has been learnt about OOT and, second, what has been learnt about conducting experimental work. We note that much work has focused upon evaluation of the inheritance mechanism. Whilst such experiments are of some interest, we observe that this may be of less significance to the OOT community than experimenters seem to believe. Instead, OOT workers place more emphasis upon other mechanisms such as composition, components, frameworks, architectural styles and design patterns. This leads us to conclude that the empirical researchers need to ensure that their work keeps pace with technological developments in the fields they aim to investigate.  相似文献   

12.
规则大量存在于面向对象系统中,反映了诸如业务流程控制、数据处理准则、信息过滤策略等特点。但由于面向对象技术本身不具备规则推理能力,因此将现有的基于规则技术集成到面向对象系统中成为一个研究的兴趣点。近年来,商务规则广泛应用更是推进了这项研究的进程。论文分析了国内外现有的集成机制,并加以比较总结。而且,在此基础上还给出了一种符合紧耦合机制的构架分析。  相似文献   

13.
针对“面向对象程序设计”课程实验内容的设置容易使学生产生学之无用的思想及学后不会用的问题,结合电子信息专业培养特色,压缩了传统的、基本的实验内容,增加了应用性强的实验项目,并将硬件引入实验教学。实践表明,改进后的实验教学模式效果良好。  相似文献   

14.
提出一种将面向对象程序重构为面向方面范型的自动化方法。该方法分挖掘和重构两个阶段进行。第一阶段挖掘面向对象程序中潜在的横切关注点,第二阶段将横切关注点重构为方面。给出一个约13 000行代码的程序自动重构的评价结果。  相似文献   

15.
工作流重构技术研究   总被引:1,自引:0,他引:1  
先进的工作流技术与传统的企业管理信息系统相结合,日益成为提高企业信息化的一个重要手段。目前的工作流是基于模型驱动的,定义一个完整的模型是相当复杂和费时的;而且,实际业务流程同流程模型之间必然存在差异。本文介绍了工作流网,工作流日志的概念;提出了一种基于日志包含的信息来重构业务流程模型的算法,该算法还能处理日志中的干扰信息和有效地度量流程模型和实际业务流程之间的差异。  相似文献   

16.
Executing concurrent specifications on sequential hardware is important for both simulation of systems that are eventually implemented on concurrent hardware and for those most conveniently described as a set of concurrent processes. As with most forms of simulation, this is easy to do correctly but difficult to do efficiently. Solutions such as preemptive operating systems and discrete-event simulators present significant overhead.In this paper, we present a technique for compiling the concurrent language Esterel into very efficient C code. Our technique minimizes runtime overhead by making most scheduling decisions at compile time and using a very simple linked-list-based event queue at runtime.While these techniques work particularly well for Esterel with its high-level concurrent semantics, the same technique could also be applied to efficiently execute other concurrent specifications.  相似文献   

17.
In this paper we consider empirical evidence in support of a set of object-oriented software metrics. In particular, we look at the object oriented design metrics of Chidamber and Kemerer, and their applicability in different application domains.We briefly describe the metrics, and present our empirical findings, arising from our analysis of systems taken from a number of different application domains. Our investigations have led us to conclude that a subset of the metrics can be of great value to software developers, maintainers and project managers.  相似文献   

18.
Placement of attributes/methods within classes in an object-oriented system is usually guided by conceptual criteria and aided by appropriate metrics. Moving state and behavior between classes can help reduce coupling and increase cohesion, but it is nontrivial to identify where such refactorings should be applied. In this paper, we propose a methodology for the identification of Move Method refactoring opportunities that constitute a way for solving many common Feature Envy bad smells. An algorithm that employs the notion of distance between system entities (attributes/methods) and classes extracts a list of behavior-preserving refactorings based on the examination of a set of preconditions. In practice, a software system may exhibit such problems in many different places. Therefore, our approach measures the effect of all refactoring suggestions based on a novel Entity Placement metric that quantifies how well entities have been placed in system classes. The proposed methodology can be regarded as a semi-automatic approach since the designer will eventually decide whether a suggested refactoring should be applied or not based on conceptual or other design quality criteria. The evaluation of the proposed approach has been performed considering qualitative, metric, conceptual, and efficiency aspects of the suggested refactorings in a number of open-source projects.  相似文献   

19.
随着CPU多核架构的普及,应用的复杂和数据集的膨胀,基于Matlab的遗留系统中的串行程序代码无法充分发挥系统潜在的性能优势,无力应对当前大型数据集的处理应用需求。Matlab的并行计算模型为数据密集型的处理任务提供了并行支持。本文首先从系统架构扩展和业务代码并行化入手,分析遗留系统并行化重构过程要点和方法,应用案例的并行化重构实验数据表明了系统重构处理大型数据集的性能提升。  相似文献   

20.
张京军  韩范玉  李慧 《微计算机信息》2007,23(33):266-267,245
重构是保留软件外部行为的同时重新组织代码的过程和一组技术,由于它在创建敏捷代码方面的实用价值而受到普遍欢迎。但是,目前的重构步骤只是将代码模块化为整洁的OO实现,不能很好得解决横切关注点引发的问题;面向方面编程(AOP)由于封装系统中的横切关注点的强大能力而日益受到关注,它使用了一种成为方面的新模块化单元。本文将AOP引入到重构中,协同地组合这两种技术来重构横切元素,研究面向方面重构的基本原理、所涉及的步骤以及一些常用技术。  相似文献   

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

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