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

2.
前向切片和后向切片是两种不同的切片技术,为了研究它们之间的异同,通过实验,得到两个结论:后向切片分析的平均缩减率等于前向切片分析的平均缩减率;后向切片分析的缩减率较均衡,前向切片分析的缩减率变化较大,极端情况较多。  相似文献   

3.
基于面向对象程序的对象间语义级关系,提出了一种对象级粗粒度切片方法,用于解决以往传统程序切片构造过程复杂,切片结构庞大,可理解性不强等问题.该方法并非基于传统的程序依赖图或系统依赖图,而是建立在对象间的关联、组合等语义级关系的基础之上.依据对象间语义级关系构造程序的对象图,在对象图的基础上获取程序的前向对象级粗粒度切片和后向对象级粗粒度切片,并结合了对象间的组合关系使得所得后向对象级粗粒度切片更加精简.  相似文献   

4.
Conditioned slicing is a source code extraction technique. The extraction is performed with respect to a slicing criterion which contains a set of variables and conditions of interest. Conditioned slicing removes the parts of the original program which cannot affect the variables at the point of interest, when the conditions are satisfied. This produces a conditioned slice, which preserves the behaviour of the original with respect to the slicing criterion. Conditioned slicing has applications in source code comprehension, reuse, restructuring and testing. Unfortunately, implementation is not straightforward because the full exploitation of conditions requires the combination of symbolic execution, theorem proving and traditional static slicing. Hitherto, this difficultly has hindered development of fully automated conditioning slicing tools. This paper describes the first fully automated conditioned slicing system, CON SIT, detailing the theory that underlies it, its architecture and the way it combines symbolic execution, theorem proving and slicing technologies. The use of CON SIT is illustrated with respect to the applications of testing and comprehension. Copyright © 2003 John Wiley & Sons, Ltd.  相似文献   

5.
典型软件体系结构切片方法的研究   总被引:1,自引:0,他引:1  
吴方君  易彤  邓敏 《计算机工程》2005,31(6):9-11,29
近年来,软件体系结构逐渐成为软件工程领域的研究热点以及大型软件系统与软件产品线开发中的关键技术之一.该文从软件体系结构的主要构成、形式化表示、静态切片和动态切片、前向切片和后向切片以及切片的应用等方面为基本思路,对该领域中已提出的主要研究方案进行了分类阐述和比较分析,总结了其最新研究进展,为下一步的研究提出了新的课题和设想.  相似文献   

6.
将程序切片技术引入到过程模型中,定义过程模型中的关联关系和数据连接关系,在此基础上给出了过程模型的切片定义,并定义了过程模型的三种切片:前向切片,后向切片和双向切片,提出了前向切片、后向切片和双向切片的算法,最后通过实例分析证明了该算法的可行性和实用性。  相似文献   

7.
程序切片作为软件理解领域的一种重要的分析技术,可以将程序分解为独立的程序线程。系统依赖图的概念及两阶段图形可达性算法的出现,则有效解决了程序切片的过程调用问题。文章介绍了程序切片的基本概念,并给出了在面向对象程序中进行静态分层切片的思想。作为分层切片思想的应用,文章给出了在一种Java程序切片工具模型JSTM(JavaSlicingToolsModel)中运用系统依赖图进行方法内切片的具体算法。  相似文献   

8.
This paper presents a context‐sensitive dynamic slicing technique for the concurrent and aspectized programs. To effectively represent the concurrent aspect‐oriented programs, we propose an intermediate graph called the multithreaded aspect‐oriented dependence graph (MAODG). The MAODG is a dynamic graph generated from the execution trace of a given program with respect to a particular set of values given as an input. Interference dependencies between the statements are shown by a distinguished edge called the interference dependence edge in the MAODG. Based on this intermediate representation, we propose a precise and accurate dynamic slicing algorithm for the concurrent aspect‐oriented programs implemented using AspectJ. The proposed dynamic slicing algorithm is implemented in a slicing tool developed using the ASM framework. Several open source programs are studied and evaluated using the proposed technique along with some existing techniques. The experimentation shows that our proposed slicing algorithm generates slices of the same or smaller size, as compared with the existing algorithms. Furthermore, we found that the slice computation time is significantly less in our proposed algorithm, as compared with the existing algorithms.  相似文献   

9.
一种基于模块单子语义的动态程序切片方法   总被引:2,自引:0,他引:2  
提出一种基于程序模块单子语义的新动态切片方法--模块单子动态切片.首先通过单子转换器,将切片这一类计算抽象成独立于具体语言的实体:切片单子转换器.然后,将该切片转换器作为模块加载到实际程序中,并给出相应的模块单子动态切片算法.据此,可直接在抽象语法结构上计算动态切片,不必记录程序执行历史;相应单子切片器也无需显式地构造诸如依赖图的中间结构.这种模块化抽象机制使得文中的动态切片算法具有很强的可扩展性和重用性.  相似文献   

10.
Slicing is a program analysis technique originally developed for imperative languages. It facilitates understanding of data flow and debugging.This paper discusses slicing of Constraint Logic Programs. Constraint Logic Programming (CLP) is an emerging software technology with a growing number of applications. Data flow in constraint programs is not explicit, and for this reason the concepts of slice and the slicing techniques of imperative languages are not directly applicable.This paper formulates declarative notions of slice suitable for CLP. They provide a basis for defining slicing techniques (both dynamic and static) based on variable sharing. The techniques are further extended by using groundness information.A prototype dynamic slicer of CLP programs implementing the presented ideas is briefly described together with the results of some slicing experiments.  相似文献   

11.
控制流图恢复是进行二进制文件安全性分析的基础,静态恢复分析速度快,但其精确度欠缺;动态恢复方法的优点是精确度高,但分析效率较低。将两者优点结合,提出了面向二进制程序的混合分析恢复方法,在对二进制文件进行静态分析生成控制流图的基础上,结合局部符号执行技术和反向切片技术对间接分支跳转的目的地址进行求解,之后再分析边和节点的可达性,合并不可达的边和节点。经实验验证,混合方法的分析效率与静态方法相近,远高于纯动态分析方法,其精确度较静态方法有较大提高。  相似文献   

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

13.
当前程序切片的相关理论已经较为成熟,但针对Java程序的静态切片工具却非常少见。为便于展开切片应用研究,设计并实现了一个基于系统依赖图的Eclipse切片插件——Slithice。该插件支持不同粒度的底层分析和系统依赖图构建,从而可以使切片算法能够在精度和性能之间进行权衡,适应各种规模程序的分析需要。  相似文献   

14.
Dynamic slicing algorithms have been considered to aid in debugging for many years. However, as far as we know, no detailed studies on evaluating the benefits of using dynamic slicing for locating real faults present in programs have been carried out. In this paper we study the effectiveness of fault location using dynamic slicing for a set of real bugs reported in some widely used software programs. Our results show that of the 19 faults studied, 12 faults were captured by data slices, 7 required the use of full slices, and none of them required the use of relevant slices. Moreover, it was observed that dynamic slicing considerably reduced the subset of program statements that needed to be examined to locate faulty statements. Interestingly, we observed that all of the memory bugs in the faulty versions were captured by data slices. The dynamic slices that captured faulty code included 0.45 to 63.18% of statements that were executed at least once.
Rajiv Gupta (Corresponding author)Email:
  相似文献   

15.
为了提高静态切片精度,本文结合程序抛出异常时产生的堆栈追踪信息进行程序执行轨迹的推测,找出那些确定没有执行的方法或语句,设计并实现考虑实时栈信息的Java程序静态切片工具.实验结果表明,该切片工具进一步减少搜索空间,可以提高普通静态切片方法的精度和效率.  相似文献   

16.
该文介绍了一种C++程序的分层切片方法。通过构造系统程序层依赖图、类层依赖图、方法层依赖图和语句层依赖图,对C++程序进行分层切片,有效地表示了C++中的单重继承、多重继承、多态和动态绑定,该方法比其它C++切片技术更清晰地描述了C++程序中类之间的各种关系和消息传递机制。  相似文献   

17.
程序切片技术的研究与应用   总被引:6,自引:1,他引:5  
软件逆向工程和维护通常是一种繁复的任务,它需要对程序的大量阅读,透切理解,耗费大量的人力物力。正是基于这种情况,产生了大量有关程序理解的技术,而程序切片技术是其中比较突出的一种。程序切片技术(Program slicing)最早由MarkWeiser提出,他论述了通过遍历程序依赖图(ProgramDependence Graph,PDG)得到过程内切片(intrapro cedural slice)的技术。此后,Horwitz通过将PDG扩展为系统依赖图(System Dependence Graph,SDG)从而  相似文献   

18.
针对程序切片方法不提供语句的可疑程度描述,而覆盖分析方法不能充分分析程序元素间的相互影响等问题,提出上下文统计分析的软件故障定位方法。首先,将源程序转换为抽象语法树和程序依赖图;接下来,插桩程序,收集运行时信息;然后,根据失效点,执行按需的反向动态切片,确定失效产生的上下文;最后,对于反向动态切片中的节点,统计计算可疑度,输出带可疑度排序的动态程序切片。该方法不但描述了失效产生的上下文,还计算上下文中各个语句的可疑度。实验结果表明,所提方法与单一的覆盖分析方法相比,平均Expense降低了1.3%,与单一的切片方法相比,平均Expense降低了5.6%,所提方法可以有效辅助开发人员定位与修正软件缺陷。  相似文献   

19.
An amorphous slice of a program is constructed with respect to a set of variables. The amorphous slice is an executable program which preserves the behaviour of the original on the variables of interest. Unlike syntax-preserving slices, amorphous slices need not preserve a projection of the syntax of a program. This makes the task of amorphous slice construction harder, but it also often makes the result thinner and thereby preferable in applications where syntax preservation is unimportant.This paper describes an approach to the construction of amorphous slices which is based on the Abstract Syntax Tree of the program to be sliced, and does not require the construction of control flow graphs nor of program dependence graphs. The approach has some strengths and weaknesses which the paper discusses.The amorphous slicer, is part of the GUSTT slicing system, which includes syntax preserving static and conditioned slicers, a side effect removal transformation phase, slicing criterion guidance and for which much of the correctness proofs for transformation steps are mechanically verified. The system handles a subset of WSL, into which more general WSL constructs can be transformed.The paper focuses upon the way in which the GUSTT System uses dependence reduction transformation tactics. Such dependence reduction is at the heart of all approaches to amorphous slicing. The algorithms used are described and their performance is assessed with a simple empirical study of best and worst case execution times for an implementation built on top of the FermaT transformation system for maintenance and re-engineering.  相似文献   

20.
分析了Krinke切片算法对循环体内嵌套有线程的程序结构会产生切片不精确的现象,认为其原因是该算法对线程间数据依赖的定义过于粗糙,且对程序行为约束不够。该文提出一种新算法,在并发程序内部表示中,增加跨线程边界循环-承载数据依赖,并引入区域化执行证据约束程序行为。实例研究表明,该算法克服了Krinke算法的不精确现象。  相似文献   

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

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

京公网安备 11010802026262号