13

阅读 Andreas Zeller 的调试书后,我对动态切片产生了兴趣。

目前我只找到了Java分析的相关工具。你知道这样的 C/C++ 工具吗?

4

3 回答 3

4

A little information in addition to Rob's

  • the Wisconsin Program-Slicing Tool has evolved in a tool called CodeSurfer. Good news: it's commercially available and supported, and it works great for what it does. Bad news (perhaps): it does not actually produce a reduced program that computes the same value that you selected, but it's very convenient for navigating source code that you have not written.

  • Frama-C handles only C (no C++ for the foreseeable future). It is nice, not great, for navigating source code, but it can produce an equivalent smaller program for the criterion that you specify, if the original program is of the kind that it can analyze automatically (no recursion, no dynamic allocation). Frama-C is Open Source and has a mailing list in which your questions will be welcome if you are interested in the techniques it uses.

The reason CodeSurfer does not risk itself to produce an equivalent program and Frama-C can only do it for code with embedded-like restrictions is, in short, that doing so requires knowing the values of pointers, which can be arbitrarily difficult to compute with precision.

于 2009-09-15T23:39:55.477 回答
3

您引用的维基百科页面上列出了一个工具。它适用于 C,所以我想它适用于任何“C/C++”。

也适用于 C,并且在 Wikipedia 页面上也提到过:

于 2009-09-15T20:44:06.873 回答
0

Giri在 LLVM 编译器中实现了动态向后切片,据我所知,这是在现代编译器中构建一个可用的、有效的和线程感知的动态切片器的最新努力。

于 2015-05-11T19:29:22.433 回答