Skip to content
CPAchecker, the Configurable Software-Verification Platform (read-only mirror)
Branch: trunk
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Color coding the important edges in the Counterexample.1.html Report Oct 9, 2018
config adding config for RERS 2019. Mar 21, 2019
contrib Add instructions for use with zsh to autocompletion script Jul 5, 2018
scripts Add support for zipping benchmark result files Jan 18, 2019
test created c files for the analysis of large numbers Mar 21, 2019
.gitignore Revert all recent commits from 'selberg'. Mar 13, 2019
.project Add a Checkstyle config for CPAchecker and enable CI checks Dec 4, 2018
Copyright.txt Release 1.8 Dec 31, 2018 clarify version requirement for building CPAchecker Apr 9, 2018
NEWS.txt Update NEWS.txt to include SLAB, remove TODO block Dec 30, 2018 add an example config that works on Windows to the Readme Jun 1, 2018

Getting Started with CPAchecker

Installation Instructions: Develop and Contribute: doc/

More documentation can be found in the doc folder.

Prepare Programs for Verification by CPAchecker

All programs need to pre-processed with the C pre-processor, i.e., they may not contain #define and #include directives. You can enable pre-processing inside CPAchecker by specifying -preprocess on the command line. Multiple C files can be given and will be linked together and verified as a single program (experimental feature).

CPAchecker is able to parse and analyze a large subset of (GNU)C. If parsing fails for your program, please send a report to

Verifying a Program with CPAchecker

  1. Choose a source code file that you want to be checked. If you use your own program, remember to pre-process it as mentioned above. Example: doc/examples/example.c A good source for more example programs is the benchmark set of the International Competition on Software Verification, which can be checked out from

  2. If you want to enable certain analyses like predicate analysis, choose a configuration file. This file defines for example which CPAs are used. Standard configuration files can be found in the directory config/. If you do not want a specific analysis, we recommend config/ However, note that if you are on Windows or MacOS you need to provide specifically-compiled MathSAT binaries for this configuration to work. The configuration of CPAchecker is explained in doc/

  3. Choose a specification file (you may not need this for some CPAs). The standard configuration files use config/specification/default.spc as the default specification. With this one, CPAchecker will look for labels named ERROR (case insensitive) and assertions in the source code file. Other examples for specifications can be found in config/specification/

  4. Execute scripts/ [ -config <CONFIG_FILE> ] [ -spec <SPEC_FILE> ] <SOURCE_FILE> Either a configuration file or a specification file needs to be given. The current directory should be the CPAchecker project directory. Additional command line switches are described in doc/ Example: scripts/ -config config/ doc/examples/example.c This example can also be abbreviated to: scripts/ -default doc/examples/example.c A Java 1.8 compatible JVM is necessary. If it is not in your PATH, you need to specify it in the environment variable JAVA. Example: export JAVA=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java for 64bit OpenJDK 8 on Ubuntu. On Windows (without Cygwin), you need to use cpa.bat instead of

    Please note that not all analysis configurations are available for Windows and Mac because we do not ship binaries for SMT solvers for these platforms. You either need to build the appropriate binaries yourself or use less powerful analyses that work with Java-based solvers, for example this one instead of -default: -predicateAnalysis-linear -setprop solver.solver=SMTInterpol

  5. Additionally to the console output, an interactive HTML report is generated in the directory output/, either named Report.html (for result TRUE) or Counterexample.*.html (for result FALSE). Open these files in a browser to view the CPAchecker analysis result (cf. doc/

There are also additional output files in the directory output/:

  • Visualization of abstract reachability tree (Graphviz format)
  • cfa*.dot: Visualization of control flow automaton (Graphviz format)
  • Visualization of control flow automaton with the abstract states visualized on top (Graphviz format)
  • Coverage information (similar to those of testing tools) in Gcov format Use the following command line to generate an HTML report as output/index.html: genhtml output/ --output-directory output --legend
  • Counterexample.*.txt: A path through the program that leads to an error
  • Counterexample.*.assignment.txt: Assignments for all variables on the error path.
  • predmap.txt: Predicates used by predicate analysis to prove program safety
  • reached.txt: Dump of all reached abstract states
  • Statistics.txt: Time statistics (can also be printed to console with -stats)

Note that not all of these files will be available for all configurations. Also some of these files are only produced if an error is found (or vice-versa). CPAchecker will overwrite files in this directory!

You can’t perform that action at this time.