An Approximate Compiler

This is the documentation for ACCEPT, an approximate compiler for C and C++ programs based on Clang. Think of it as your assistant in breaking your program in small ways to trade off correctness for performance.

This is also the home for ACCEPT’s benchmark suite of approximate C/C++ applications.

Please direct comments or questions to Adrian Sampson or to a GitHub issue.


Here’s how to build the ACCEPT toolchain in four easy steps.


Clone the repository to your Unix-like system. Use the submodules flag to grab the project’s dependencies:

$ git clone --recurse-submodules

CMake, Ninja, and virtualenv

There are three dependencies you need to install yourself before getting started. How you install them depends on your OS:

(If you prefer not to use Ninja, you can fairly easily edit the relevant scripts to have CMake write Makefiles instead.)

make setup

Inside this directory (the repository containing this file), type make setup. This will do several things:

You should now be able to use the bin/enerclang and bin/enerclang++ programs to compile EnerC programs. You can type make test to make sure everything’s working.


The main entry point to the ACCEPT toolchain is the bin/accept script. For convenience, you can put this on your $PATH by running source Or you can add something like this to your shell profile (.profile or .bashrc file):

export PATH=$accept/bin:$PATH

Follow the tutorial to learn how to use ACCEPT to optimize your favorite program. If you get stuck, check out the command-line interface reference.