singledelta(1) heuristic minimizer of interesting files


singledelta -test=test-script [options] [initial-file]


Delta assists you 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 your program to exhibit a bug.

You supply singledelta with

  • a test shell script which decides if its input file is ``interesting'' (test-script) and
  • an initial interesting input file (initial-file or standard input).

Delta uses heuristics to find a sub-file of your input file that is still ``interesting'' according to your test.

Delta has a notion of the granularity of the file: the smallest atomic elements of which the file is seen as a sequence. The default is the line granularity: in this mode, delta will attempt to delete entire lines, but will never try deleting a smaller element than that. You can filter a program through topformflat(1) to produce a file where the line-granularity only goes to a specified nesting depth (if your file is in a nested language). multidelta(1) does this for you.


Use test-script as the test program. This option is mandatory.

The test program accepts a single argument, the name of the candidate file to test. It is run within a directory containing only that file, and it can make temporary files/directories in that directory. It should return zero for a candidate that exhibits the desired property, and nonzero for one that does not.

Set filename suffix to suffix. The default is ".c".
Dump the contents of the initial file after reading it.
Copy the minimal successful test to file.
Use lines as the granularity. This is the default.
Use C top-level forms as the granularity. This currently only works with CIL output.
Log main events to file.
Do not produce any output.
Produce more verbose output.
Overwrite initial-file with inputs.
Print out usage information.


The name singledelta is Debian-specific. The upstream name of this program is simply delta.