|国家预印本平台
首页|基于模块单子语义的动态程序切片

基于模块单子语义的动态程序切片

ynamic Program Slicing Based on Modular Monadic Semantics

中文摘要英文摘要

本文提出了一种新的动态切片方法──模块单子动态切片,它基于程序的模块单子语义。首先通过单子转换器,将切片这一类计算抽象成独立于具体语言的实体:切片单子转换器,并给出其具体定义。然后,将该切片转换器模块化地加载到实际程序中,给出了相应的模块单子动态切片算法。据此,可直接在抽象语法结构上计算动态切片,无需引入诸如控制流图或依赖图的中间结构,也不必记录程序执行历史。这种模块化抽象机制使得文中的动态切片算法具有很强的可扩展性和重用性。

ynamic program slicing is useful for software testing and maintenance phases because it can extract smaller slices than the slices done by static slicing. But dynamic slicing requires a huge overhead for obtaining run-time information. This paper presents a new dynamic slicing method, the modular monadic approach, which is based on modular monadic semantics. With the use of monad transformers, the computation of program slicing can be abstracted as an entity that is independent of the language being analyzed, dynamic-slice monad transformer. Its definition is provided in this paper. This paper also gives and illustrates dynamic slicing algorithm based on modular monadic semantics. The algorithm lets dynamic slices to be computed directly on abstract syntax, without explicit construction of intermediate structures such as dependence graphs and of an execution history. It is showed to be an appropriate approach to program slicing with excellent flexibility and modularity properties.

张迎周、徐宝文

计算技术、计算机技术

程序切片,动态切片,单子,模块性,模块单子语义

program slicing dynamic slicing monads modularity modular monadic semantics

张迎周,徐宝文.基于模块单子语义的动态程序切片[EB/OL].(2004-03-01)[2025-08-11].http://www.paper.edu.cn/releasepaper/content/200403-12.点此复制

评论