Skip to content

fundamental/sfpv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Static Function Property Verification (Succeeded by http://github.com/fundamental/stoat )

Resources

License

Stars

Watchers

Forks

Packages

No packages published