首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到17条相似文献,搜索用时 156 毫秒
1.
将程序切片技术引入到过程模型中,定义过程模型中的关联关系和数据连接关系,在此基础上给出了过程模型的切片定义,并定义了过程模型的三种切片:前向切片,后向切片和双向切片,提出了前向切片、后向切片和双向切片的算法,最后通过实例分析证明了该算法的可行性和实用性。  相似文献   

2.
动态程序切片技术是一种重要的程序分析技术,在软件分析、测试与调试过程中有着广泛的应用。给出一种基于前向计算的动态程序切片方法,该方法首先在对当前执行语句进行定义使用分析的基础上计算该语句定义变量的影响集,其次计算该语句的直接动态依赖关系,最后计算当前执行语句中变量的动态切片。根据该方法设计并实现了一个Java动态程序切片系统,基于一组基准测试程序开展了切片实验,并与已有的切片方法进行了比较。实验结果表明,该方法可以得到比较精确的动态程序切片结果。  相似文献   

3.
一种用于测试数据生成的动态程序切片算法   总被引:3,自引:0,他引:3  
王雪莲  赵瑞莲  李立健 《计算机应用》2005,25(6):1445-1447,1450
介绍了程序切片技术的基本概念,提出了一种基于前向分析的动态程序切片算法,探讨了程序切片在软件测试数据生成中的应用,结果表明可以有效地提高基于路径的测试数据生成效率。  相似文献   

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

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

6.
缪力  张大方 《软件学报》2004,15(Z1):169-178
切片是一种重要的约减技术,基于代码的程序切片已经得到广泛的研究和大量的应用,但基于规格和模型的切片研究不多.EFSM是一种重要的规格模型,将切片技术引入EFSM对于分析和测试基于EFSM的软件模型具有重要的作用.由于一个实际的EFSM相当复杂,导致对EFSM模型的分析和修改非常困难.EFSM的切片对于测试和分析EFSM模型具有重要意义.由于EFSM依赖关系的特殊性,依赖图的可达性问题对于EFSM依赖图中并不是一个简单的图可达性问题.而且现有的基于标志已访问节点的遍历算法不适于解决该问题.对EFSM的依赖关系的传递性进行了详细的讨论和分析,定义了一个递归的依赖传递函数来描述变迁的影响如何通过依赖关系传递,而计算后向切片则可以通过逆依赖传递函数来描述,最后给出一个基于变迁的EFSM后向切片算法.  相似文献   

7.
为了保证当底层网络的多条物理链路发生故障时用户业务能够不间断,提出一种基于多链路故障的网络切片生存性算法。通过区分切片上承载的业务类型,当高可靠低延迟切片请求到达后,将物理节点按节点重要度排序后进行映射,再对故障链路采用多备份路径算法,选取带宽资源消耗最少的路径依次对故障链路进行重映射,当高带宽切片请求到达后,采用广度优先搜索的节点映射算法,再通过多备份路径对故障链路进行恢复。仿真结果表明,该算法能够提高切片平均映射成功率、长期平均收益开销比、物理链路利用率和故障恢复率,缩短平均故障恢复时延。  相似文献   

8.
戎玫  何志学  张广泉 《计算机应用》2008,28(5):1300-1302
为了缩减程序验证的状态空间,针对面向对象程序的并发机制,定义了程序中存在的依赖关系,提出一种从待验证的线性时序逻辑(LTL)性质中提取出切片准则对程序进行切片的方法。切片后的程序与原程序对待验证的LTL性质具有相同的可满足性,而其对应的状态转换图中的状态个数明显减少。  相似文献   

9.
程序切片是一种传统的程序分析方法:通过去掉无关代码,获取可能影响某行代码的子集。程序切片在程序理解、软件测试和程序调试等众多领域有着广泛的应用。随着互联网技术的发展,JavaScript语言得到广泛应用,但针对该语言的切片工具非常有限。本文针对JavaScript语言的特殊性,提出一种基于程序依赖图的JavaScript程序切片算法,并基于WALA程序分析框架实现了该切片算法。试验结果表明,本文的切片算法可以得到较为理想的切片结果。试验中切片平均大小约为原程序代码的70%,较手工切片仅有约19%冗余。  相似文献   

10.
为了加速软件开发,提高软件质量,本文针对开发过程提出了一种改进的有条件切片算法.该算法改造了程序控制流程图,扩充了程序数据依赖定义,按照条件切片的一阶逻辑谓词缩减目标程序,并用扩充后的数据依赖计算有务件程序切片.在程序编码阶段,该算法能够抽取需要关注的代码段给开发人员,并能利用边的信息计算出程序的路径数目.从而为开发人员发现软件缺陷、冗余提供了有利的支撑.  相似文献   

11.
Program slicing is a technique for simplifying programs by focusing on selected aspects of their behavior.Current mainstream static slicing methods operate on dependence graph PDG (program dependence graph) or SDG (system dependence graph),but these friendly graph representations may be a bit expensive for some users.In this paper we attempt to study a light-weight approach of static program slicing,called Symbolic Program Slicing (SymPas),which works as a dataflow analysis on LLVM (low-level virtual machine).In our SymPas approach,slices are stored in symbolic forms,not in procedures being re-analyzed (cf.procedure summaries).Instead of re-analyzing a procedure multiple times to find its slices for each callling context,we calculate a single symbolic slice which can be instantiated at call sites avoiding re-analysis;SymPas is implemented with LLVM to perform slicing on LLVM intermediate representation (IR).For comparison,we systematically adapt IFDS (interprocedural finite distributive subset) analysis and the SDG-based slicing method (SDG-IFDS) to statically slice IR programs.Evaluated on open-source and benchmark programs,our backward SymPas shows a factor-of-6 reduction in time cost and a factor-of-4 reduction in space cost,compared with backward SDG-IFDS,thus being more efficient.In addition,the result shows that after studying slices from 66 programs,ranging up to 336800 IR instructions in size,SymPas is highly size-scalable.  相似文献   

12.
Most of the existing fault localization approaches use execution coverage of test cases to isolate the suspicious codes that likely contain faults. Program slicing can extract the dependencies of program entities with respect to a specific criterion. Therefore this technique is expected to have a beneficial effect on fault localization. In this paper, we propose a novel approach using a hybrid spectrum of full slices and execution slices to improve the effectiveness of fault localization. In particular, our approach firstly computes full slices of failed test cases and execution slices of passed test cases respectively. Secondly it constructs the hybrid spectrum by intersecting full slices and execution slices. Finally it computes the suspiciousness of each statement in the hybrid slice spectrum and generates a fault location report with descending suspiciousness of each statement. We also implement our proposed approach in our prototype tool HSFal by Java programming language. To verify the effectiveness of our approach, we performed an empirical study by the prototype on several widely used open source programs. Our approach is compared with eight representative coverage-based and slice-based fault localization approaches. Final experimental results show that our proposed approach is more effective in fault localization than other compared approaches, and can reduce almost 2.98–31.79% of the average cost of examined code significantly.  相似文献   

13.
Program Slicing is a well-known decomposition technique that transforms a large program into a smaller one that contains only statements relevant to the computation of a selected function. In this paper, we present two novel predicate-based dynamic slicing algorithms for message passing programs. Unlike more traditional slicing criteria that focus only on parts of the program that influence a variable of interest at a specific position in the program, a predicate focuses on those parts of the program that influence the predicate. The dynamic predicate slices capture some global requirements or suspected error properties of a distributed program and computes all statements that are relevant. The presented algorithms differ from each other in their computational approaches (forward versus backward) and in the granularity of information they provide. A proof of correctness of these algorithms is provided. Through the introduction of dominant states and dominant events, critical statement executions are identified that change the value of the global predicate. Under this formulation, optimizing dynamic predicate slicing becomes a meaningful goal as well. Finally, we present how predicate slices can be applied to support comprehension tasks for analyzing and maintaining distributed programs.  相似文献   

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

15.
Slicing is a program analysis technique which can be used for reducing the size of the model and avoid state space explosion in model checking. In this work a static slicing technique is proposed for reducing Rebeca models with respect to a property. For applying the actor-based slicing techniques, the Rebeca control flow graph (RCFG) and the Rebeca dependence graph (RDG) are introduced. We propose two different approaches for constructing the RDG, where each approach can be more effective under certain conditions. As the static slicing usually produces large slices, two other slicing-based reduction techniques, step-wise slicing and bounded slicing, are proposed as simple novel ideas. Step-wise slicing first generates slices that overapproximate the behavior of the original model and then refines it, and bounded slicing is based on the semantics of nondeterministic assignments in Rebeca. We also propose a static slicing algorithm for deadlock detection (in absence of any particular property). The efficiency of these techniques is checked by applying them to several case studies which are included in this paper. Similar techniques can be applied on the other actor-based languages.  相似文献   

16.
A program schema defines a class of programs, all of which have identical statement structure, but whose functions and predicates may differ. A schema thus defines an entire class of programs according to how its symbols are interpreted. As defined in this paper, a slice of a schema is obtained from a schema by deleting some of its statements. We prove that given a schema S which is function-linear, free and liberal, and a slicing criterion defined by the final value of a given variable after execution of any program defined by S, the minimal slice of S which respects this slicing criterion contains only the symbols ‘needed’ by the variable according to the data dependence and control dependence relations used in program slicing, which is the symbol set given by Weiser’s static slicing algorithm. Thus this algorithm gives minimal slices for programs representable by function-linear, free, liberal schemas. We also prove a similar result with termination behaviour used as a slicing criterion. This strengthens a recent result, in which S was required to be linear, free and liberal, and termination behaviour as a slicing criterion was not considered.  相似文献   

17.
A program schema defines a class of programs, all of which have identical statement structure, but whose functions and predicates may differ. A schema thus defines an entire class of programs according to how its symbols are interpreted. A subschema of a schema is obtained from a schema by deleting some of its statements. We prove that given a schema S which is predicate-linear, free and liberal, such that the true and false parts of every if predicate satisfy a simple additional condition, and a slicing criterion defined by the final value of a given variable after execution of any program defined by S, the minimal subschema of S which respects this slicing criterion contains all the function and predicate symbols ‘needed’ by the variable according to the data dependence and control dependence relations used in program slicing, which is the symbol set given by Weiser’s static slicing algorithm. Thus this algorithm gives predicate-minimal slices for classes of programs represented by schemas satisfying our set of conditions. We also give an example to show that the corresponding result with respect to the slicing criterion defined by termination behaviour is incorrect. This complements a result by the authors in which S was required to be function-linear, instead of predicate-linear.  相似文献   

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

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