Skip to content
The Sparrow Static Analyzer
Branch: master
Clone or download
Pull request Compare This branch is 19 commits ahead, 26 commits behind ropas:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
etc
src
test
.gitignore
.travis.yml
CONTRIBUTORS
LICENSE
Makefile
README.md
_oasis
_tags
build.sh
configure
formula.json
myocamlbuild.ml
opam
setup.ml

README.md

Sparrow

Sparrow is a state-of-the-art static analyzer that aims to verify the absence of fatal bugs in C source. Sparrow is designed based on the Abstract Interpretation framework and the analysis is sound in design. Sparrow adopts a number of well-founded static analysis techniques for scalability, precision, and user convenience. This is an academic version of Sparrow that is different from the commercial version.

Build Status

Linux MAC OSX
Build Status Build Status

Sparrow Dependencies

To build Sparrow, you need

Optionally, you need the following prerequisites to use machine-learning features

Install Sparrow with OPAM

The easiest way to install Sparrow is to use OPAM. For example:

opam depext --install sparrow

Install Sparrow from source with OPAM

Once you have cloned the source codes, run the build script to install the prerequisites and Sparrow:

$ git clone git@github.com:ropas/sparrow.git
$ cd sparrow
$ ./build.sh

After that, you can directly run make or make install.

Optionally, you need to set up environment variables to use machine-learning features depending on the installation prefix.

$ export SPARROW_BIN_PATH= # PREFIX/bin
$ export SPARROW_DATA_PATH= # PREFIX/etc

For example, if you install Sparrow using OPAM:

$ export SPARROW_BIN_PATH=`opam config var sparrow:bin`
$ export SPARROW_DATA_PATH=`opam config var sparrow:etc`

Run the analysis

You can run Sparrow for buffer overflow detection on pre-processed C files. For example:

$ ./bin/sparrow test.i
# partially flow-sensitive analysis with degree [0-100]
$ ./bin/sparrow -pfs 10 test.i
# selectively unsound analysis with bugfinder level [0-2]
$ ./bin/sparrow -bugfinder 2 test.i
You can’t perform that action at this time.