Documentation
There is not a single document describing Stanse. Of course, most information can be gleaned from the commented source code, specifically the generated Doxygen documentation.
In this document:
External documentation:
- Command Line Interface
- Running Stanse on Linux kernel
- AutomatonChecker configuration files
- XML patterns format
- Tutorials
Running Stanse
java -jar /path/to/stanse.jar
GNU C (at least version 4.0) and Perl 5 are required.
There are two basic concepts which need to be configured: the input files which are to be checked, and the checkers which are to be used.
Sources
Input source files which are to be checked can be specified in multiple ways. These are enumerated below.
- Specified files
- The basic method. You specify the files to be checked by enumerating them on the command line or by opening the files in GUI.
- Directory
- You specify the directory to be checked. The directory is searched
for source files and all found files are then checked. The default
file mask is
"*.c"
. Note that files are not properly preprocessed if the CC command line you use contains any -I -D or similar. - Directory (recursive)
- As for previous, but the directory is searched recursively.
- Batch execution
- Files to be checked are specified in a text file (called jobfile), one file per line. Jobfiles can be used also in advanced mode, which is described in its own section.
- Makefile-based
- Specified Makefile is run, but calls to CC are replaced by calls
to a special script
stcc
. This script in turn generates a jobfile containing all files on which the given Makefile calls the compiler during build. The jobfile also contains all parameters and options passed to the compiler.
Checkers
You can specify one or more checkers, all of which must be known to
Stanse (a.k.a. registered with Stanse). Only one configuration file
can be associated with each checker. These are files whose contents is
dictated by the repective checkers. Currently there are two checkers
registered with Stanse by default, namely AutomatonChecker
and ThreadChecker
.
GUI
Enabled by passing the -g
(or --gui
) parameter to Stanse. The GUI is self-explanatory and contains an interface for examining found errors. Source files/checkers specified on the command line are passed on to GUI.
Generated documentation
The full Doxygen-generated documentation is available at http://stanse.fi.muni.cz/doxygen/.