tags:

views:

331

answers:

2

Hi,

after reading the book of debugging from Andreas Zeller, I became interested in Dynamic Slicing (http://en.wikipedia.org/wiki/Program%5Fslicing).

At the moment I only found relevant tools for Java analysis. Do you know such tools for C/C++?

Thanks in advance

+1  A: 

There's a tool listed on the Wikipedia page you cite. It's for C, so I guess it could work for whatever "C/C++" is.

Also for C, and also mentioned on the Wikipedia page:

Rob Kennedy
A: 

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.

Pascal Cuoq