传统的含指针程序切片方法将指向分析与切片计算分开,增加了一定系统开销,为此文中提出一种可同时进行切片计算和指向分析的单子切片算法.该算法将程序正向切片思想与数据流迭代分析相结合,它是流敏感的,具有一定的精度,而且因指向分析和切片计算同时进行,故不需要像一般的流敏感分析方法那样记录每一个程序点的指向信息,而只需记录当前所分析的程序点处指向信息,从而节省了存储空间.此外,它还继承了原有单子切片方法所具有的强语言适应性和组合性.
Program slicing is a family of program decomposition techniques.By introducing point-to analysis to the previous monadic slicing,the authors present and implement an approach of monadic slicing for a program with pointers.This approach obtains the point-to information through the data-flow iteration.Being different from the traditional methods,the point-to information and slicing are computed in the same phase in the method,by combining the forward monad slicing with data-flow iteration.Instead of recording point-to information for every statement,it is only needed to record the information for current analysis statements.So the method saves space without losing the precision.In addition,the approach also reserve the excellent properties of compositionality and language-flexibility from the original monadic slicing method.