Command Line Interface

See java -jar /path/to/stanse.jar -h

Option                                  Description                            
------                                  -----------                            
-?, -h, --help                          Shows this help message.               
-c, --checker <name[[:                  Checker name and (possibly)            
  configuration_file1]:                   configuration. Can be used multiple  
  configuration_file2:name ...]>          times.                               
-d, --debug-level <Integer: n>          Sets the debug level                   
--dir <directory>                       Directory to be (non-recursively)      
                                          searched for input files.            
--dump-callgraph                        Dump callgraph in Dot format           
--dump-cfg                              Dump control flow graphs in Dot format 
--dump-xml                              Dump XML representation of AST         
-g, --gui [GUI style name (DEFAULT,     Starts GUI. GUI may be run in these    
  SYSTEM, METAL)]                         styles: DEFAULT (equal to METAL      
                                          style), SYSTEM (system dependant     
                                          widgets), METAL - (system independet 
                                          widgets)                             
--intraprocedural                       Use simpler intraprocedural analysis   
                                          instead of much more complex         
                                          interprocedural analysis. Affects    
                                          all the checkers.                    
--jobfile <file>                        Jobfile specifying input files.        
--make-params <parameters>              Parameters passed to the make tool.    
--makefile <file>                       Makefile specifying input files.       
--output-dir <File: directory>          Sets the output directory for          
                                          generated files                      
--rdir <directory>                      Directory to be recursively searched   
                                          for input files.                     
--stats-build <file>                    Builds statistical data in XML format  
                                          of processed checking. Output file   
                                          for statistical data must be         
                                          provided as an argument              
--stats-err-guitracing                  Loads statistical database file and    
  <XMLdatabaseFile:outputFile[:           parses all its error messages and    
  Original-sources-dir:Current-sources-   deliveres them into Stanse's GUI to  
  dir]>                                   enable easy error-tracing. It is     
                                          also possible to specify relocation  
                                          of source code files by specifying   
                                          original and current location        
                                          (directory) of souces. Original      
                                          reports are updated by user-defined  
                                          resolution state and are written to  
                                          the output file.                     
--stats-err-merge <XMLdatabaseFile:     Loads statistical database file and    
  outputDatabaseFile:                     all XML file in specified directory. 
  RootOfDirectoryStructure>               All these files combined (merged) to 
                                          form one output XML database file.   
                                          Merge is realized this way. Content  
                                          of sections 'files','internals',     
                                          'checkers' and 'checkfails' are      
                                          simply copiedfrom original database  
                                          file. The last section 'errors' is   
                                          computed by simple concatenation of  
                                          contents of 'errors' sections in XML 
                                          files inside specified directory     
                                          structure. Content of 'errors'       
                                          section in original database file    
                                          does not participate in this merge   
                                          of 'errors' sections.                
--stats-err-sort <XMLdatabaseFile:      Loads statistical database file and    
  outputDirectory:SortKeyword1:           then it will sort error messages by  
  SortKeyword2 ...>                       lexicografical order defined by      
                                          these keywords: checker_name         
                                          (checker name), description (short   
                                          description of report), unit (unit   
                                          of error report), importance         
                                          (importance). Output consists of     
                                          directory tree with information      
                                          files (.txt) and data files (.xml).  
                                          Root of this directory structure is  
                                          passed as the second argument here.  
--stats-performance <XMLdatabaseFile:   Loads statistical database file and    
  outputFile:OutputFormat>                then it searched in the data to      
                                          collect all performace information.  
                                          Collected performance data are then  
                                          written into specified output file,  
                                          in specified output format. Valid    
                                          formats are: simple-text (human-     
                                          readable simple text file)           
--stats-reports <XMLdatabaseFile:       Loads statistical database file and    
  outputFile:OutputFormat>                then it searched in the data to      
                                          collect all reports related          
                                          information. Collected data are then 
                                          written into specified output file,  
                                          in specified output format. Valid    
                                          formats are: simple-text (human-     
                                          readable simple text file)           
--version                               Prints the program version.            

Typical usage

java -jar stanse.jar foo.c Check file foo.c with the default checker.
java -jar stanse.jar --makefile=/path/to/Makefile Check all files compiled by /path/to/Makefile with the default checker.
java -jar stanse.jar -c AutomatonChecker:/path/to/conf1.xml -c AutomatonChecker:/path/to/conf2.xml --jobfile /my/jobfile Check all files specified in /my/jobfile with the AutomatonChecker. The checker is configured by the files /path/to/conf1.xml and /path/to/conf1.xml.
 
java -jar stanse.jar -g foo.c bar.c Start GUI and open the files foo.c and bar.c.