Delta 2006.07.15 review

Download
by rbytes.net on

Delta project assists users in minimizing "interesting" files, subject to a test of their "interestingness". A common such situati

License: GPL (GNU General Public License)
File size: 0K
Developer: Daniel S. Wilkerson and Scott McPeak
0 stars award from rbytes.net

Delta project assists users in minimizing "interesting" files, subject to a test of their "interestingness".

A common such situation is when attempting to isolate a small failure-inducing substring of a large input that causes a program to exhibit a bug.

The best way to understand how to use delta is with an example of its usage. Below is one example helpfully written up for me by Simon Goldsmith; read it first. For those wanting more, I also wrote a more detailed and harder to read document describing each tool: Using Delta.

Note that what follows is an example of using delta to minimize an input file to a program that reads programs, much as a compiler does. Note two features of file minimization that are present in the example.

Do a controlled experiment.

Below we don't just minimize a file that causes Oink to produce an error message, we minimize a file that causes gcc to accept AND oink to reject in a specific way. That is, the test delta does is a controlled experiment, where gcc is the control. Ignoring this aspect of the problem seems to be a frequent mistake of first time users.

Exploit nested structure.

One may minimize files of simpler syntax than C++ but really all files are interesting in the first place because they are in some language or another. Some simple configuration files are literally just a list of lines but most languages have some nested structure. Multidelta filters the input through the topformflat utility (included) to suppress any newlines past a particular nesting depth; this "explains" the nesting structure to the otherwise line-oriented delta utility (a brilliantly simple idea of Scott McPeak's).

If your input file language has no nesting structure, you can hack on multidelta to remove the filtration through topformflat or just use the raw delta program. If your language has a different nesting structure than C/C++, you can write your own multidelta and substitute it. A simple flex program should suffice; it need not be terribly accurate for delta to do well.

What's New in This Release:
It is now much easier to stop delta.
It catches signals and distinguishes them from return codes.
It watches for the DELTA-STOP file at the same granularity as the tests are run.
In multidelta, running the input file through cpp is off by default and can be turned on with the flag -cpp.

Delta 2006.07.15 search tags