Xsmith’s Bundled Generators (And How to Run Them)
1 Cish
2 Schemely
3 Verilog
7.8

Xsmith’s Bundled Generators (And How to Run Them)

William Hatch <william@hatch.uno>,
Pierce Darragh <pierce.darragh@gmail.com>,
and Eric Eide <eeide@cs.utah.edu>

Version xsmith 2.0.1 (42990ec)

The xsmith-examples package has some pre-built fuzzers that vary in their level of quality and/or utility as a learning aid.

Included examples:

When xsmith-examples is installed as a Racket package, executables for some of the bundled generators are placed in your Racket package bin directory. Usually this directory is $HOME/.racket/racket-<version>/bin on Linux, maybe $HOME/Library/Racket/<version>/bin on normal MacOS installs, and maybe /usr/local/bin for MacOS Homebrew installs.

These fuzzers can be run on the command line to generate a single program or as an http server that generates one program per request.

Command-line options for bundled Xsmith generators are all the same, and provided by xsmith-command-line.

1 Cish

Cish is a C program generator made with the Xsmith library. It has co-evolved with Xsmith, and is essentially the reference Xsmith program generator.

The executable for Cish is called xsmith-cish. Additionally, Cish can be run with the command racket -l xsmith/cish -- (the final -- causes further flags to be parsed by cish and not by Racket).

The command-line options available in Cish are:

Cish supports the following features for the --with-<feature> flags:

To compile cish output, you need to include cish’s directory and Csmith’s runtime directory in your header path to get safe_math.h.

eg.

xsmith-cish > cish-output.c && gcc -I $XSMITH_EXAMPLES_DIR/cish -I $CSMITH_DIR/runtime -o cish-output cish-output.c

2 Schemely

The executable for Schemely is called xsmith-schemely. Additionally, Schemely can be run with the command racket -l xsmith/schemely -- (the final -- causes further flags to be parsed by cish and not by Racket).

The command-line options available in Schemely are:

Schemely currently has no features for the --with-<feature> flags.

At the time of writing, Schemely really just supports Racket. At some future point it should generate portable Scheme code.

3 Verilog

The program generator for Verilog is called xsmith-verilog. It can be also run with the command racket -l xsmith/verilog -- (the final -- causes further flags to be parsed by the Verilog generator and not by Racket).

The command-line options for the Verilog generator are:

The Verilog generator currently has no features for the --with-<feature> flags.