首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
程序切片是一种重要的程序分析技术,广泛应用于程序的调试、测试与维护等领域。面向方面程序设计作为一种新的软件开发范型,能够实现横切关注点的模块化,其特有的语言元素和功能为切片增加了难度。从静态切片和动态切片两种类型,讨论了面向方面程序切片技术。在此基础上,提出了一种基于简化动态依赖图的面向方面程序切片方法,可以减少动态依赖图中节点和边的数量,生成准确的面向方面程序的动态切片,从而有助于人们更好地对面向方面程序进行分析和理解。  相似文献   

2.
一种分析和理解程序的方法--程序切片   总被引:21,自引:0,他引:21       下载免费PDF全文
程序切片是一种分析和理解程序的技术,是通过对源程序中每个兴趣点分别计算切片来达到对程序的分析和理解。程序中某个兴趣点的程序切片不仅与该点定义和使用变量有关,而且与影响该变量的值的语名和谓词以及受该变量的值影响的语名的谓词有关。文中详细阐述了程序切片技术的研究与进展情况,并对目前存在各种程序切片方法和工具进行了比较;简单介绍了文中提出的面向对象的分层切片方法及其算法的思想;最后分析了程序切片技术目前  相似文献   

3.
用Z形式化描述程序切片   总被引:1,自引:0,他引:1  
程序切片是一种重要技术,已广泛地应用于软件工程的各个领域,如程序理解、维护、调试、测试、复用、度量等.虽然,越来越多的研究者致力于程序切片工作,然而由于缺少形式化方面的工作导致程序切片可能存在不一致性和模糊性.本文尝试着用Z语言来形式化描述程序切片,考虑了程序切片中诸如程序依赖图和程序切片算法等常用的方面.该形式化描述不仅能帮助人们正确地理解程序切片的含义,而且还能够从比较严格的意义上明确程序切片的应用领域.  相似文献   

4.
We propose an efficient method for computing dynamic slices of programs. Our method is based on construction of data dependence edges of program dependence graph at run-time. We introduce the concept of compact dynamic dependence graphs (CDDGs) of programs. We show computation of dynamic slices using CDDGs to be more efficient than existing methods.  相似文献   

5.
周婕  慕晓冬  王杰 《微机发展》2006,16(7):20-22
程序切片是一种程序分析技术,它主要应用在程序的调试和逆向工程。文中介绍了笔者设计并实现的一个C 程序切片系统。其中包括系统的总体框架,系统中使用的数据结构以及切片生成算法。本系统已经成功应用到了X型导弹指挥软件的故障诊断中。  相似文献   

6.
Slicing, Chopping, and Path Conditions with Barriers   总被引:2,自引:0,他引:2  
One of the critiques on program slicing is that slices presented to the user are hard to understand. This is mainly related to the problem that slicing dumps the results onto the user without any explanation. This work will present an approach that can be used to filter slices. This approach basically introduces barriers which are not allowed to be passed during slice computation. An earlier filtering approach is chopping which is also extended to obey such a barrier. The barrier variants of slicing and chopping provide filtering possibilities for smaller slices and better comprehensibility. The concept of barriers is then applied to path conditions, which provide necessary conditions under which an influence between the source and target criterion exists. Barriers make those conditions more precise.  相似文献   

7.
JAVA语言是目前一种主要的面向对象编程语言,由于JAVA语言复杂的结构,使得对JAVA程序进行程序切片非常困难.本文提出一种层次的构造JAVA系统依赖图的算法,基于JAVA程序本身的层次结构,自顶向下构造系统依赖图,然后基于构造的系统依赖图,用一种改进的两阶段算法得到JAVA程序切片.  相似文献   

8.
Exception是一类特殊的对象,它在Java方法出错时被创建,并利用try/catch/finally机制抛出、处理异常。本文提出了一种合理的新方法,在系统依赖图中表示异常处理模块,利用图可迭性算法实现了Java程序切片。  相似文献   

9.
The computation of program slices on Web applications may be useful during debugging, when the amount of code to be inspected can be reduced, and during understanding, since the search for a given functionality can be better focused. The system dependence graph is an appropriate data structure for slice computation, in that it explicitly represents all dependences that have to be taken into account in slice determination.Construction of the system dependence graph for Web applications is complicated by the presence of dynamically generated code. In fact, a Web application builds the HTML code to be transmitted to the browser at run time. Knowledge of such code is essential for slicing. In this paper an algorithm for the static approximation of the dynamically generated HTML code is proposed. The concatenations of constant strings and variables are propagated according to special purpose flow equations, allowing the estimation of the generated code and the refinement of the system dependence graph.  相似文献   

10.
一种改进的静态程序切片算法   总被引:1,自引:0,他引:1  
提出了一种改进的静态程序切片算法,并应用到软件逆向工程中。在处理目标程序的过程间调用时,通过建立参数影射关系表,将过程间调用转换为过程内调用,简化了建立程序依赖图的复杂度;在归纳分析目标程序变量类型的基础上,给出了代数运算法则,对程序中的线性运算代码进行等价变换,缩减了切片程序的规模。最后通过具体的切片实例,证明了改进算法的有效性。  相似文献   

11.
一种系统依赖图的面向对象扩充方案   总被引:3,自引:0,他引:3       下载免费PDF全文
提出一种对传统的系统依赖图进行面向对象扩充的方案.把传统的系统依赖图和类依赖子图、类层次子图相结合,从而构成了适合描述面向对象程序的面向对象系统依赖图.详细说明了对系统依赖图进行面向对象语法、语义扩充的过程,同时给出了构造面向对象系统依赖图的一般算法以及应用分析.  相似文献   

12.
一种新的检测结构克隆的方法   总被引:1,自引:0,他引:1  
结构克隆是一种运用相似原理与思想结构的克隆,它不拘泥于语句表达和顺序。本文首先用程序依赖图来检测克隆代码,并在检测过程中运用程序切片技术。针对结构克隆的特征,对需要改进的问题进行总结,对程序依赖图的特征类型进一步泛化和量化来计算相似度。这有利于在数值上更好地评估相似度,并提高克隆检测的查全率。  相似文献   

13.
传统程序切片技术在计算BPEL程序切片时会产生切片不完备问题,为此,提出一种基于程序依赖图的BPEL静态程序切片技术。该技术根据BPEL语言的特点,通过建立BPEL程序依赖图,计算BPEL程序切片。案例分析表明,该技术能够获得更加全面的程序切片,从而可以帮助软件工程人员更好地测试、调试和维护BPEL程序。  相似文献   

14.
软件的变量完整性测试方法   总被引:2,自引:1,他引:2  
由于软件测试用例的输出部分很难确定,而通过测试变量自身的定义域和变量间的一致性约束关系,只需要确定输出值的范围而不用知道其确切的值,就可以提高了错误检测的效率.同时,检测的范围不局限于程序最后的输出结果,而是散布在程序中的各个有意义的变量,正如调试过程中设置断点观察的那些变量,使得检测错误更加精准.  相似文献   

15.
类间数据依赖分析是类间数据流测试的基础。本文通过分析类簇级测试中的异常传播对程序数据依赖的影响,提出一种包括异常结构在内的类间C++程序数据依赖分析方法,根据类间关系增量式地构造类间数据依赖图,并给出类间数据依赖图的构造算法。最后,在程序切片中应用了该数据依赖分析方法。结果证明,该方法通过分析异常传播对数据依赖的影响能够带来切片精度的提高。  相似文献   

16.
Although the slicing of programs written in a high-level language has been widely studied in the literature, relatively few papers have been published on the slicing of binary executable programs. The lack of existing solutions for the latter is really hard to understand since the application domain for slicing binaries is similar to that for slicing high-level languages. Furthermore, there are special applications of the slicing of programs without source code like source code recovery, code transformation and the detection of security critical code fragments. In this paper, in addition to describing the method of interprocedural static slicing of binaries, we discuss how the set of the possible targets of indirect call sites can be reduced by dynamically gathered information. Our evaluation of the slicing method shows that, if indirect function calls are extensively used, both the number of edges in the call graph and the size of the slices can be significantly reduced.Ákos Kiss obtained his M.Sc. in Computer Science from the University of Szeged in 2000. He is currently working on his Ph.D. thesis and his chosen field of research is the analysis and optimization of binary executables. He was the chief programmer of a code compaction project which sought to reduce ARM binaries. He is also interested in GCC and in open source developmentJudit Jász obtained her M.Sc. in Computer Science recently from the University of Szeged and is currently a Ph.D student. Her main research interest is adapting slicing methods—originally intended for high-level languages—to binary executables. She is also actively working on improving the GCC compiler.Tibor Gyimóthy is the head of the Software Engineering Department at the University of Szeged in Hungary. His research interests include program comprehension, slicing, reverse engineering and compiler optimization. He has published over 60 papers in these areas and was the leader of several software engineering R&D projects. He is the Program Co-Chair of the 21th International Conference on Software Maintenance, which will be held in Budapest, Hungary in 2005.  相似文献   

17.
程序切片是一种程序分析技术,它通过把程序减少到只包含与某个特定计算相关的那些语句来分析程序,过程间切片作为图形可达性问题时,需要扩展过程内切片所用的程序依赖图(PDG)成系统依赖图(SDG),然后利用两阶段图形可达性算法计算比较精确的切片,目前程序切片技术的研究以面向对象程序切片为主,文中讨论了一种合适面向对象程序的分层切片方法,并综合分层切片方法和两阶段图形可达性算法提出了一种简化的计算面向对象程序过程间切片的算法。  相似文献   

18.
19.
探讨了在使用总线与主机连接的多DSP系统上构建交叉调试器的方法,分析了在多DSP系统中使用硬件仿真器进行调试的不足,讨论了在DSP上实现软件调试器的基本原理。针对DSP资源有限的特点,提出了动态monitor的方式降低调试器对DSP的资源占用。测试和使用表明,与硬件仿真器相比,基于总线的软件调试器具有更好的性能、更高的性价比以及更好的多处理器支持。  相似文献   

20.
面向方面程序设计是面向对象程序设计技术的补充和完善,高效的面向方面程序测试方法是面向方面程序的质量保证.提出一个基于谓词动态切片技术的测试方法.首先,构造完整的AOP语句控制流图,它包含AOP的方面、切入点、连接点、建议等因素.然后,根据完整的AOP语句控制流图生成所有路径,针对每条路径,构造其分支函数,计算得到相应的测试数据,若路径不可执行,则不再计算其测试数据.在这个过程中,通过构建简化动态依赖图来生成谓词动态切片,再用谓词动态切片来帮助调整测试数据.最后,将各路径的实际输出数据与期望输出数据相比较,即可判断该程序是否有错误.经实例分析和实验验证,此方法可以系统地测试一个完整的面向方面程序,提高了测试数据的生成效率,并产生有效的测试用例.  相似文献   

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

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