Object-oriented programming has been considered a most promising method in program development and maintenance. An important feature of object-oriented programs (OOPs) is their reusability which can be achieved through the inheritance of classes or reusable components.Dynamic program slicing is an effective technique for narrowing the errors to the relevant parts of a program when debugging. Given a slicing criterion, the dynamic slice contains only those statements that actually affect the variables in the slicing criterion. This paper proposes a method to dynamically slice object-oriented (00) programs based on dependence analysis. It uses the Control Dependency Graph for object program and other static information to reduce the information to be traced during program execution. In this paper we present a method to find the dynamic Slice of object oriented programs where we are finding the slices for object and in case of function overloading.
程序切片是一种通过关注程序行为的选定方面来简化程序的技术。当前主流的静态切片方法在PDG(程序依赖图)或SDG(系统依赖图)上操作,但是这些友好的图表示对于一些用户来说可能是昂贵的并且容易出错。在本文中,我们试图研究一个轻量级的静态程序切片的方法,称为符号程序切片(Symbolic Program Slicing,SymbolPas),它的工作原理是对LLVM(低级虚拟机)的一个简单的分析。在我们的SymPas方法中,切片是符号化存储的,而不是重新分析的过程(参见。程序摘要)。SymPas不是多次重新分析过程以找到每个调用上下文的切片,而是计算单个符号(或参数化)切片,该切片可以在调用站点实例化,避免重新分析;它在LLVM中实现以对其中间表示(IR)执行切片。为了比较,我们系统地适应IFDS(过程间有限分布子集)分析和基于SDG的切片方法(SDG-IFDS)静态IR切片程序。在开源和基准程序上进行评估,与后向SDG-IFDS相比,我们的后向SymPas显示出时间成本降低了6倍,空间成本降低了4倍,因此更高效。此外,结果表明,在研究了66个程序的切片后,大小范围高达336,800条IR指令,SymPas具有高度的大小可伸缩性。
Static Program Slicing Using Language Models With Dataflow-Aware Pretraining and Constrained Decoding
Department of Computer Science, University of Manitoba(曼尼托巴大学计算机科学系);School of Engineering and Computer Science, Concordia University(Concordia大学工程与计算机科学学院);School of Computer Science, University of Windsor(温莎大学计算机科学学院)