|
1 | | -# sv-comp-witness-vscode |
| 1 | +# Wiivi |
2 | 2 |
|
3 | | -Integration of [SV-Comp](https://sv-comp.sosy-lab.org/) verification tools for C into VS Code |
4 | | -for visualizing their combined verification witnesses. |
| 3 | +VS Code extension for running [SV-COMP](https://sv-comp.sosy-lab.org/) verification tools and |
| 4 | +visualizing their witnesses (correctness witnesses / invariants) for C programs. |
| 5 | +Runs one or more verifiers via **fm-weck** and renders their invariants inline in the editor. |
5 | 6 |
|
6 | | -## Developing |
| 7 | +## Use the extension |
7 | 8 |
|
8 | | -Make sure the following are installed: `JDK 17`, `mvn`, `npm`, `nodejs`, `@vscode/vsce`. |
| 9 | +### Prerequisites |
| 10 | +- VS Code |
| 11 | +- fm-weck installed and working |
| 12 | + (with its own prerequisites, e.g., a container runtime such as Podman) |
9 | 13 |
|
10 | | -To build this extension, run the commands: |
11 | | -~~~ |
12 | | -mvn install |
13 | | -cd vscode |
14 | | -npm install |
15 | | -npm install -g vsce |
16 | | -vsce package |
17 | | -~~~ |
| 14 | +### Installing |
18 | 15 |
|
19 | | -## Installing |
| 16 | +1. Install [fm-weck](https://gitlab.com/sosy-lab/software/fm-weck) |
| 17 | +2. Get the extension package (`.vsix`) by either: |
| 18 | + * Downloading the extension from [latest GitHub Actions build](https://github.com/sws-lab/sv-comp-witness-vscode/actions) → choose a workflow run → Artifacts → `wiivi-plugin` |
| 19 | + * Building the extension (see [Building](#building)) |
| 20 | +3. Install the extension into VS Code: |
| 21 | +```shell |
| 22 | +cd vscode && code --install-extension sv-comp-verifiers-0.0.1.vsix |
| 23 | +``` |
20 | 24 |
|
21 | | -Install the extension into VS Code with `code --install-extension sv-comp-verifiers-0.0.1.vsix`. |
| 25 | +### Quick start |
22 | 26 |
|
23 | | -## Testing |
| 27 | +After installing the extension: |
24 | 28 |
|
25 | | -1. Open the project in VS Code after installing the extension. |
| 29 | +1. Open the project in **VS Code** (e.g., calling `code .` in the project root directory). |
26 | 30 | 2. Open the file `standard_strcpy_original-2.i` in VS Code. |
27 | | -3. The combined invariants should be shown above lines 22, 26, and 31. |
| 31 | +3. Locate and open the **Witnesses** panel. |
| 32 | +4. In the panel **select** a data model, property, and which tools to run. |
| 33 | +5. Click **Analyze** to start analyzing the currently open file. |
| 34 | + (*Note: the first time run will take time with fm-weck getting the required tools.*) |
| 35 | +3. The invariants from the tools should be shown above lines 22, 26, and 31. |
28 | 36 |
|
29 | | -## Building native CPAchecker |
| 37 | +## Build / Develop the extension |
30 | 38 |
|
31 | | - NOTE: You need to have [GraalVM 22.04](https://www.oracle.com/java/graalvm/) installed to build the native CPAchecker. |
| 39 | +### Prerequisites |
| 40 | + |
| 41 | +Make sure the following are installed: |
| 42 | +- `JDK 17` |
| 43 | +- `mvn` |
| 44 | +- `npm` |
| 45 | +- `nodejs` |
| 46 | +- `vsce` (using `npm install -g @vscode/vsce` for example) |
| 47 | +- [fm-weck](https://gitlab.com/sosy-lab/software/fm-weck) |
| 48 | + |
| 49 | + |
| 50 | + ### Building |
| 51 | +To build this extension, run the commands starting from project root directory: |
| 52 | +1. `mvn install` (or can use `mvn package -Dmaven.test.skip` if tests are failing) |
| 53 | +2. `cd vscode` |
| 54 | +3. `npm install` (only needed the first time) |
| 55 | +4. `vsce package` |
32 | 56 |
|
33 | | -To build the native CPAchecker, run the following commands: |
34 | | -```shell |
35 | | -make cpachecker |
36 | | -``` |
37 | 57 |
|
38 | | -This command takes a while (~10min on a ThinkPad T14) and will produce a native binary in the `lib/cpachecker-native` directory. |
|
0 commit comments