首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
This paper presents a new approach to the use of design patterns for the reengineering of legacy code, using a mapping from procedural design patterns to object-oriented patterns. We show also how object-oriented design patterns can be formalised and correctness conditions for their application derived, in order to justify the preservation of functionality in the reengineering process. We give examples taken from case studies of reengineering legacy COBOL applications.  相似文献   

2.
一种基于图转换的模型重构描述语言   总被引:1,自引:0,他引:1  
刘辉  麻志毅  邵维忠 《软件学报》2009,20(8):2087-2101
提出了一种基于图转换的模型重构描述语言.针对模型重构的特征,设计了模型重构描述语言的基本元素,并给出了如何通过这些基本元素描述模型重构及重构规则的方法.在此基础上,给出了根据形式化重构规则执行模型重构的具体步骤和策略,并提供了较为完整的模型重构CASE支撑工具.通过实例讨论了该模型重构描述语言的描述能力.结果表明,该语言具有较强的描述能力,能够比较简洁地描述复杂的模型重构规则.  相似文献   

3.
刘阳  刘秋荣  刘辉 《计算机科学》2015,42(12):105-107
软件重构历史的自动检测是目前软件重构领域的一个研究热点。其主要目的是方便程序员或软件维护人员理解 软件演化的历史,也便于根据服务代码重构历史对其客户代码进行相应的重构操作。虽然相关研究人员已经提出了多种自动化的重构历史检测方法,但目前未见关于函数提取重构历史检测的方法或工具。为此,提出了一种基于版本比较的函数抽取重构自动检测方法,实现并验证了该方法的有效性。在8个开源项目上进行了实验验证,结果表明其查准率为65%~90%。此外,在一个小型项目上通过监控程序员的重构操作获得了全部的函数提取重构操作,进而计算出检测算法的查全率和查准率均为85%。  相似文献   

4.
对当前软件重构领域中的研究作了概括性介绍。对作为重构的主导思想和系统体系结构的总体转换方向的设计模式进行介绍,针对原有的Visitor设计模式在运行中操作调用频繁时资源消耗过大和运行效率降低的不足,在原模式基础上进行改良和优化,生成一种新的设计模式Visitor*,并对其具体分析,通过操作函数的上移和accept方法的重定义,实现了操作定义由Element层到Visitor层的等价转化,大大节省资源和提高运行效率。最后运用Visitor^*实现了一个面向对象设计过程中的重构,并结合一些重要概念对其进行具体分析。  相似文献   

5.
This paper describes a refactoring process that transforms a Java source code base into a functionally equivalent AspectJ source code base. The process illustrates the use of a collection of refactorings for aspect‐oriented source code, covering the extraction of scattered implementation elements to aspects, the internal reorganization of the extracted aspects and the extraction of commonalities to super‐aspects. Copyright © 2007 John Wiley & Sons, Ltd.  相似文献   

6.
首先设计并实现一个基于摄像头的阅卷系统,该系统由试卷获取、灰度化、二值化、畸变变换、倾斜校正、图像定位和识别等图像处理流程组成。然后以此为依据,通过对重构技术及设计模式原则和方法的系统研究,对该系统框架进行优化和重构。本文充分参照现有的设计模式,通过重构技术,改善现有代码的质量,增加系统的可维护性和可复用性。  相似文献   

7.
Progress was made in the understanding of object-oriented (O-O) design through the introduction of patterns of design and architecture. Few works, however, offer methods of precise specification for O-O design.This article provides a well-defined ontology and an underlying framework for the formal specification of O-O design: (1) We observe key design motifs in O-O design and architectures. (2) We provide a computational model in mathematical logic suitable for the discussion in O-O design. (3) We use our conceptual toolkit to analyze and compare proposed formalisms.  相似文献   

8.
重构可以改进软件设计、提高软件质量。自动化重构工具的使用可以避免手工重构时引入的错误,提高软件开发效率。通过对自动化重构技术的研究,结合Java语言的特点,给出了基于Java的重构分类,在此基础上开发了一个基于Java的自动化重构工具ARTJ,给出了ARTJ的模型,分析了它的工作原理和各主要组件的功能,并展示利用ARTJ自动实现程序的改进。  相似文献   

9.
基于Design Patterns的大型工控软件研究与实践   总被引:6,自引:0,他引:6  
针对大型工控软件开发面临的各种难题,提出了基于设计模式(Design Patterns)的工控软件设计的解决方案.在大型电力系统监控软件设计中,采用设计模式进行工控软件框架和工位的设计,实现了功能模块的松耦合关系,降低了代码的复杂度,从而提高了运行效率,同时也加快了系统开发、调试的效率.论证了设计模式在工控软件设计中应用的潜力,提出了大型工控软件设计的新思路。  相似文献   

10.
应用遗传算法求解函数优化问题的程序实现   总被引:1,自引:1,他引:0  
分析了应用遗传算法求解函数优化问题的程序设计中的常见问题,并分别提出了适用方法。  相似文献   

11.
一种从Z规约到并行程序的精化方法   总被引:3,自引:0,他引:3  
万剑怡  孙永强  薛锦云 《软件学报》2002,13(11):2106-2111
提出了一种通过对设计模式进行精化,从Z规约开发并行程序的方法.该方法对Z语言进行了并行扩充,从Z功能规约出发,通过使用扩展的设计模式逐步精化得到并行的设计规约,再通过保持语义的转换,得到可最后转换为并行代码的抽象并行程序.通过实例对这一方法进行了详细的描述.  相似文献   

12.
Program errors are hard to find because of the cause-effect gap between the instant when an error occurs and when the error becomes apparent to the programmer. Although debugging techniques such as conditional and data breakpoints help in finding errors in simple cases, they fail to effectively bridge the cause-effect gap in many situations. This paper proposes two debuggers that provide programmers with an instant error alert by continuously checking inter-object relationships while the debugged program is running. We call such tool a dynamic query-based debugger. To speed up dynamic query evaluation, our debugger implemented in portable Java uses a combination of program instrumentation, load-time code generation, query optimization, and incremental reevaluation. Experiments and a query cost model show that selection queries are efficient in most cases, while more costly join queries are practical when query evaluations are infrequent or query domains are small. To enable query-based debugging in the middle of program execution in a portable way, our debugger performs efficient Java class file instrumentation. We call such debugger an on-the-fly debugger. Though the on-the-fly debugger has a higher overhead than a dynamic query-based debugger, it offers additional interactive power and flexibility while maintaining complete portability.  相似文献   

13.
针对常用公路 CAD 软件中路线平、纵、横成果只能独立显示,无法联合查询的问题,提出了实现平、纵、横成果联合显示、查询的编程思路,并介绍了该程序在设计中的应用,以期为提高设计工作效率提供更好的解决方案。  相似文献   

14.
提出了一个基于工作站网(networkofworkstations,简称NOW)的分布式程序设计语言NC++(NOWC++).它是DC++语言的扩充.NC++提供了一个完备的编程环境,包括NC++预编译器、图视编程界面、多目通信机制和测试系统.它完善了组管理机制和进程通信机制,提出了一个基于信度推理网络的分布共享内存(distributedsharedmemory,简称DSM)机制以管理C++公共变量.实践证明,NC++语言在确保编程方便性的前提下保证了分布式程序的性能.  相似文献   

15.
Thispaper aims at empirically exploring the relationships betweenmost of the existing design coupling, cohesion, and inheritancemeasures for object-oriented (OO) systems, and the fault-pronenessof OO system classes. The underlying goal of this study is tobetter understand the relationship between existing design measurementin OO systems and the quality of the software developed. in addition,we aim at assessing whether such relationships, once modeled,can be used to effectively drive and focus inspections or testing.The study described here is a replication of an analogous studyconducted in a university environment with systems developedby students. In order to draw more general conclusions and to(dis)confirm the results obtained there, we now replicated thestudy using data collected on an industrial system developedby professionals. Results show that many of our findings areconsistent across systems, despite the very disparate natureof the systems under study. Some of the strong dimensions capturedby the measures in each data set are visible in both the universityand industrial case study. For example, the frequency of methodinvocations appears to be the main driving factor of fault-pronenessin all systems. However, there are also differences across studies,which illustrate the fact that, although many principles andtechniques can be reused, quality does not follow universal lawsand quality models must be developed locally, wherever needed.  相似文献   

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

17.
Esterel is a design language for the specification of real time embedded systems. Based on the synchronous concurrency paradigm, its semantics describes execution as a succession of instants of computation. In this work, we consider the introduction of a new gotopause instruction in the language, which acts as a non-instantaneous jump instruction compatible with concurrency. It allows the programmer to activate state control points anywhere in the program, from where the execution is resumed in the next instant. In order to provide the formal semantics of the extended language, we first define a state semantics of Esterel, which we prove observationally equivalent to the original logical behavioral semantics. Including gotopause in the state semantics is then straightforward. We sketch two key applications of our new primitive: a direct encoding of automata and a quasi-linear rewriting of programs eliminating schizophrenic behaviors.  相似文献   

18.
We present a formal specification of unCurrying for a higher-order, functional language with ML-style let-polymorphism. This specification supports the general unCurrying of functions, even for functions that are passed as arguments or returned as values. The specification also supports partial unCurrying of any consecutive parameters of a function, rather than only unCurrying all of a function's parameters. We present the specification as a deductive system that axiomatizes a judgment relating a source term with an unCurried form of the term. We prove that this system relates only typable terms and that it is correct with respect to an operational semantics. We define a practical algorithm, based on algorithm , that implements unCurrying and prove this algorithm sound and complete with respect to the deductive system. This algorithm generates maximally unCurried forms of source terms. These results provide a declarative framework for reasoning about unCurrying and support a richer form of unCurrying than is currently found in compilers for functional languages.  相似文献   

19.
面向对象设计模式的C语言实现   总被引:3,自引:0,他引:3  
朱进 《微机发展》2005,15(11):99-101,105
介绍了C语言成为嵌入式技术领域主要的程序设计语言的原因,及当前用C语言所编写的程序仍然存在的问题,然后介绍了面向对象的设计模式的概念及优点.并提出将面向对象的思想与C语言结合起来,接着用C语言实现了部分面向对象的设计模式,给出了其代码,并做了相应的注释,为优化C程序的结构提供了途径.最后总结了在C程序中使用这些设计模式的价值.文中所指的C语言均为标准C(ANSIC).  相似文献   

20.
The expediency of the use of object-oriented models of data as datalogical models in designing databases is shown, and methods of integration of relational and object-oriented models are considered. A relational scheme for storage of attributes and relations of object-oriented models is proposed.  相似文献   

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

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