|
1 | 1 | ## Overview
|
2 | 2 |
|
3 |
| -The `cfa-cli` project is an executable (command line) tool for running CEGAR-based location-reachability analyses on CFAs. |
| 3 | +The `cfa-cli` project is an executable (command line) tool for running CEGAR-based |
| 4 | +location-reachability analyses on CFAs. |
4 | 5 | Furthermore, it also includes some utilities, such as calculating metrics or visualizing the CFA.
|
5 |
| -For more information about the CFA formalism and its supported language elements, take a look at the [`cfa`](../cfa/README.md) project. |
| 6 | +For more information about the CFA formalism and its supported language elements, take a look at |
| 7 | +the [`cfa`](../cfa/README.md) project. |
6 | 8 |
|
7 | 9 | ### Related projects
|
8 | 10 |
|
9 |
| -* [`cfa`](../cfa/README.md): Classes to represent CFAs and a domain specific language (DSL) to parse CFAs from a textual representation. |
10 |
| -* [`cfa-analysis`](../cfa-analysis/README.md): CFA specific analysis modules enabling the algorithms to operate on them. |
| 11 | +* [`cfa`](../cfa/README.md): Classes to represent CFAs and a domain specific language (DSL) to parse |
| 12 | + CFAs from a textual representation. |
| 13 | +* [`cfa-analysis`](../cfa-analysis/README.md): CFA specific analysis modules enabling the algorithms |
| 14 | + to operate on them. |
11 | 15 |
|
12 | 16 | ### Frontends
|
13 | 17 |
|
14 |
| -* [Gazer](https://github.com/ftsrg/gazer) is an [LLVM](https://llvm.org/)-based frontend to verify C programs using theta-cfa-cli, also giving support towards [SV-COMP](https://sv-comp.sosy-lab.org/2021/). See our [tool paper at TACAS](https://ftsrg.mit.bme.hu/theta/publications/tacas2021.pdf) for more information. |
15 |
| -* [PLCverif](https://cern.ch/plcverif) is a tool developed at CERN for the formal specification and verification of PLC (Programmable Logic Controller) programs, supporting theta-cfa-cli as one of its verification backends. |
| 18 | +* [Gazer](https://github.com/ftsrg/gazer) is an [LLVM](https://llvm.org/)-based frontend to verify C |
| 19 | + programs using theta-cfa-cli, also giving support |
| 20 | + towards [SV-COMP](https://sv-comp.sosy-lab.org/2021/). See |
| 21 | + our [tool paper at TACAS](https://ftsrg.mit.bme.hu/theta/publications/tacas2021.pdf) for more |
| 22 | + information. |
| 23 | +* [PLCverif](https://cern.ch/plcverif) is a tool developed at CERN for the formal specification and |
| 24 | + verification of PLC (Programmable Logic Controller) programs, supporting theta-cfa-cli as one of |
| 25 | + its verification backends. |
16 | 26 |
|
17 | 27 | ## Using the tool
|
18 | 28 |
|
19 | 29 | 1. First, get the tool.
|
20 | 30 | * The easiest way is to download a [pre-built release](https://github.com/ftsrg/theta/releases).
|
21 |
| - * You can also [build](../../../doc/Build.md) the tool yourself. The runnable jar file will appear under _build/libs/_ with the name _theta-cfa-cli-\<VERSION\>-all.jar_, you can simply rename it to _theta-cfa-cli.jar_. |
| 31 | + * You can also [build](../../../doc/Build.md) the tool yourself. The runnable jar file will |
| 32 | + appear under _build/libs/_ with the name _theta-cfa-cli-\<VERSION\>-all.jar_, you can simply |
| 33 | + rename it to _theta-cfa-cli.jar_. |
22 | 34 | * Alternatively, you can use our docker image (see below).
|
23 | 35 | 2. Running the tool requires Java (JRE) 17.
|
24 |
| -3. The tool also requires the [Z3 SMT solver libraries](../../../doc/Build.md) to be available on `PATH`. |
| 36 | +3. The tool also requires the [Z3 SMT solver libraries](../../../doc/Build.md) to be available |
| 37 | + on `PATH`. |
25 | 38 | 4. The tool can be executed with `java -jar theta-cfa-cli.jar [ARGUMENTS]`.
|
26 |
| - * If no arguments are given, a help screen is displayed about the arguments and their possible values. |
27 |
| - More information can also be found below. |
28 |
| - * For example `java -jar theta-cfa-cli.jar --model counter.cfa --loglevel INFO` runs the default analysis with logging on the `counter.cfa` input file. |
| 39 | + * If no arguments are given, a help screen is displayed about the arguments and their possible |
| 40 | + values. |
| 41 | + More information can also be found below. |
| 42 | + * For example `java -jar theta-cfa-cli.jar --model counter.cfa --loglevel INFO` runs the default |
| 43 | + analysis with logging on the `counter.cfa` input file. |
29 | 44 |
|
30 | 45 | ### Docker
|
31 | 46 |
|
32 | 47 | A Dockerfile is also available under the _docker_ directory in the root of the repository.
|
33 | 48 | The image can be built using the following command (from the root of the repository):
|
| 49 | + |
34 | 50 | ```
|
35 | 51 | docker build -t theta-cfa-cli -f docker/theta-cfa-cli.Dockerfile .
|
36 | 52 | ```
|
37 | 53 |
|
38 |
| -The script `run-theta-cfa-cli.sh` can be used for running the containerized version on models residing on the host: |
| 54 | +The script `run-theta-cfa-cli.sh` can be used for running the containerized version on models |
| 55 | +residing on the host: |
| 56 | + |
39 | 57 | ```
|
40 | 58 | ./docker/run-theta-cfa-cli.sh model.cfa [OTHER ARGUMENTS]
|
41 | 59 | ```
|
| 60 | + |
42 | 61 | Note that the model must be given as the first positional argument (without `--model`).
|
43 | 62 |
|
44 | 63 | ## Arguments
|
45 | 64 |
|
46 | 65 | All arguments are optional, except `--model`.
|
47 | 66 |
|
48 | 67 | * `--model`: Path of the input CFA model (mandatory).
|
49 |
| -* `--errorloc`: Name of the error (target) location in the CFA, which is checked for reachability. The CFA is safe if the error location is not reachable, and unsafe otherwise. This argument can be omitted if a location in the CFA is marked with the error keyword. If there is an error location marked in the CFA and this argument is also given, the argument has priority. |
50 |
| -* `--cex`: Output file where the counterexample is written (if the result is unsafe). If the argument is not given (default) the counterexample is not printed. Use `CON` (Windows) or `/dev/stdout` (Linux) as argument to print to the standard output. |
| 68 | +* `--errorloc`: Name of the error (target) location in the CFA, which is checked for reachability. |
| 69 | + The CFA is safe if the error location is not reachable, and unsafe otherwise. This argument can be |
| 70 | + omitted if a location in the CFA is marked with the error keyword. If there is an error location |
| 71 | + marked in the CFA and this argument is also given, the argument has priority. |
| 72 | +* `--cex`: Output file where the counterexample is written (if the result is unsafe). If the |
| 73 | + argument is not given (default) the counterexample is not printed. Use `CON` (Windows) |
| 74 | + or `/dev/stdout` (Linux) as argument to print to the standard output. |
51 | 75 | * `--loglevel`: Detailedness of logging.
|
52 |
| - * Possible values (from the least to the most detailed): `RESULT`, `MAINSTEP`, `SUBSTEP` (default), `INFO`, `DETAIL`, `VERBOSE`. |
| 76 | + * Possible values (from the least to the most detailed): `RESULT`, `MAINSTEP`, `SUBSTEP` ( |
| 77 | + default), `INFO`, `DETAIL`, `VERBOSE`. |
53 | 78 | * `--metrics`: Print metrics about the CFA without running the algorithm.
|
54 | 79 | * `--visualize`: Visualize the CFA without running the algorithm.
|
55 |
| -If the extension of the output file is `pdf`, `png` or `svg` an automatic visualization is performed, for which [GraphViz](../../../doc/Build.md) has to be available on `PATH`. |
56 |
| -Otherwise, the output is simply in `dot` format. |
| 80 | + If the extension of the output file is `pdf`, `png` or `svg` an automatic visualization is |
| 81 | + performed, for which [GraphViz](../../../doc/Build.md) has to be available on `PATH`. |
| 82 | + Otherwise, the output is simply in `dot` format. |
57 | 83 | * `--version`: Print version info (in this case `--model` is of course not required).
|
58 | 84 |
|
59 |
| -The arguments related to the algorithm are described in more detail (along with best practices) in [CEGAR-algorithms.md](../../../doc/CEGAR-algorithms.md). |
| 85 | +The arguments related to the algorithm are described in more detail (along with best practices) |
| 86 | +in [CEGAR-algorithms.md](../../../doc/CEGAR-algorithms.md). |
60 | 87 |
|
61 | 88 | ### For developer usage
|
62 | 89 |
|
63 |
| -| Flag | Description | |
64 |
| -|--|--| |
65 |
| -| `--stacktrace` | Print full stack trace for exceptions. | |
66 |
| -| `--benchmark` | Benchmark mode, only print metrics in csv format. | |
67 |
| -| `--header` | Print the header for the benchmark mode csv format. | |
| 90 | +| Flag | Description | |
| 91 | +|----------------|-----------------------------------------------------| |
| 92 | +| `--stacktrace` | Print full stack trace for exceptions. | |
| 93 | +| `--benchmark` | Benchmark mode, only print metrics in csv format. | |
| 94 | +| `--header` | Print the header for the benchmark mode csv format. | |
0 commit comments