A Valgrind tool for Herbie
C Assembly Racket Python C++ Makefile Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Herbgrind -- A Valgrind Tool For Herbie

Herbgrind logo

Herbgrind is a valgrind tool for tracking floating point imprecision in binary programs, inspired by FpDebug. Herbgrind is still pretty early in development, but its goals are:

  • Determining whether a program is generally accurate

  • Identifying places in source code of a binary program where inaccuracy occurs

  • Identifying input distributions of unstable numerical code

  • Extracting enough other information from programs to make improvement with herbie easy

Herbgrind is documented at http://uwplse.github.io/herbgrind/

Herbgrind is licensed under GPLv3 (and some dependencies are under other, similar licenses). If that doesn't work for your use case, let us know, and we're happy to talk about licensing under other terms.

Herbgrind is documented at http://uwplse.github.io/herbgrind/

Installation Instructions

The project was developed on a 64-bit linux platform that supports 32-bit compilation. If you're running on a platform like this, running just "make" or "make compile" after cloning the repo should just work. Otherwise, you'll want to open up the toplevel makefile, and modify some variables. Set TARGET_PLAT and ARCH_PRI appropriately for your platform. If you're on a platform for which valgrind wants to build a secondary version (certain 64-bit configurations will cause valgrind to want to do 32-bit too), then set ARCH_SEC to that secondary architecture.

If you just want to configure everything, but not compile, run "make setup".

NEVER modify the code in $toplevel/valgrind/herbgrind, only modify $toplevel/herbgrind. $toplevel/valgrind/herbgrind gets overwritten on every build.

To build on OS X, you need XCode Command Line Tools, which you can install with:

$ xcode-select --install

You will also need the GNU versions of awk and sed. The best way to install these is through Homebrew:

$ brew install gawk
$ brew install gnu-sed --with-default-names

Running

To run, just run "path-to-herbgrind/valgrind/herbgrind-install/bin/valgrind --tool=herbgrind executable-to-run-on"

Herbgrind logo