Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Static Function Property Verification (Succeeded by http://github.com/fundamental/stoat )
C++ C
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
cmake
data
doc Adds man page
src
test
.clang_complete
CMakeLists.txt
COPYING
README.asciidoc

README.asciidoc

sfpv - Static Function Property Verification

THIS PROJECT IS NO LONGER MAINTAINED PLEASE SEE THE LESS BUGGY REPLACEMENT AT http://github.com/fundamental/stoat

This is a static analysis tool built upon clang to verify annotated function properties in C/C++ code. It is primarily intended to verify realtime safety of audio processing code, but as the name implies, it shall evolve into something much more general with time.

How To Build

First make sure you have copies of:

  • llvm/clang 3.5 or better

  • cmake 2.8 or better

Then run

git clone git://github.com/fundamental/sfpv.git
cd sfpv
mkdir build
cd build
cmake .. && make && make test

Basic Usage

For basic use of sfpv, just pass the file to be tested as an argument. If the file is annotated, then sfpv will validate the properties, otherwise it will be quite useless. Below is an example of annotated functions:

sample-code.c
void __attribute__((annotate("!realtime"))) nrt_function(void)
{}
void __attribute__((annotate("realtime"))) rt_function(void)
{
    nrt_function();
}

Then this program can be tested with

sfpv sample-code.c

As a result of a realtime function calling a non-realtime function, an error will print to indicate the issue.

Documentation

See doc/User_Manual.txt for more information.

Bug Reporting

Please report all bugs to the github issue tracker at:

If possible include a test case for inclusion in the test suite, as this makes fixing bugs much easier.

License

This program is licenced under the GPL v3 or greater, Copyright Mark McCurry.

Something went wrong with that request. Please try again.