Skip to main content
QUICK REVIEW

[论文解读] Program slicing techniques and its applications

N. Sasirekha, A. Edwin Robert|arXiv (Cornell University)|Aug 5, 2011
Software Testing and Debugging Techniques被引用 8
一句话总结

本文全面综述了程序切片技术——静态切片、动态切片、条件切片和准静态切片——展示了其在软件工程任务(如调试、维护和测试)中的应用。该研究基于 Java 实现,阐述了前向切片和后向切片方法,强调通过语法和语义分析,根据数据流和控制流隔离相关程序组件。

ABSTRACT

Program understanding is an important aspect in Software Maintenance and Reengineering. Understanding the program is related to execution behaviour and relationship of variable involved in the program. The task of finding all statements in a program that directly or indirectly influence the value for an occurrence of a variable gives the set of statements that can affect the value of a variable at some point in a program is called a program slice. Program slicing is a technique for extracting parts of computer programs by tracing the programs' control and data flow related to some data item. This technique is applicable in various areas such as debugging, program comprehension and understanding, program integration, cohesion measurement, re-engineering, maintenance, testing where it is useful to be able to focus on relevant parts of large programs. This paper focuses on the various slicing techniques (not limited to) like static slicing, quasi static slicing, dynamic slicing and conditional slicing. This paper also includes various methods in performing the slicing like forward slicing, backward slicing, syntactic slicing and semantic slicing. The slicing of a program is carried out using Java which is a object oriented programming language.

研究动机与目标

  • 分析并分类适用于软件维护和重构的各种程序切片技术。
  • 研究切片如何通过基于数据流和控制依赖关系隔离相关代码段,提升程序理解能力。
  • 评估不同切片方法(静态、动态、前向、后向、语法、语义)在聚焦影响特定变量的程序组件方面的有效性。
  • 展示切片技术在调试、测试、内聚性度量和程序集成中的实际应用。
  • 提供一种基于 Java 面向对象原则的系统化切片方法,用于现实世界软件分析。

提出的方法

  • 采用静态切片,在不执行程序的情况下,基于数据依赖和控制依赖分析程序语句。
  • 通过追踪实际运行时的数据流,应用动态切片以识别在特定执行点影响某个变量的语句。
  • 使用后向切片,从变量的使用位置回溯其定义语句的依赖关系。
  • 使用前向切片,识别从给定点开始可能影响变量值的所有语句。
  • 基于源代码结构实现语法切片,基于程序语义和执行上下文实现语义切片。
  • 对 Java 程序进行切片分析,评估面向对象特性对切片准确性和相关性的影响。

实验结果

研究问题

  • RQ1在软件维护过程中,静态切片与动态切片在隔离相关程序组件方面的能力有何差异?
  • RQ2条件切片和准静态切片在调试和测试大规模软件系统方面具有哪些实际优势?
  • RQ3语法切片与语义切片在面向对象程序中对程序理解的提升程度如何?
  • RQ4切片技术如何增强重构过程中的内聚性度量和程序集成?
  • RQ5传统切片技术在应用于 Java 等面向对象语言时存在哪些局限性?

主要发现

  • 程序切片通过追踪数据流和控制依赖关系,有效隔离相关代码段,显著提升调试和维护效率。
  • 在实际程序执行过程中,动态切片在识别相关语句方面比静态切片提供更准确的结果。
  • 后向切片在调试中特别有效,可通过回溯变量值来源定位问题。
  • 前向切片有助于理解数据值在程序中的传播过程,支持测试和影响分析。
  • 在复杂的面向对象程序中,语义切片优于语法切片,因其能上下文感知地分析程序行为。
  • 将切片技术整合到软件维护工作流中,可显著减少理解和修改大型代码库所需的时间与精力。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。