|
1 | | -# sv-comp-witness-vscode |
| 1 | +# sv-comp-witness-VS Code |
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 |
| 8 | + |
| 9 | +### Prerequisites |
| 10 | +- VS Code |
| 11 | +- fm-weck installed and working |
| 12 | + (with its own prerequisites, e.g., a container runtime such as Podman) |
| 13 | + |
| 14 | +### Installing |
| 15 | + |
| 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 VS Code && code --install-extension sv-comp-verifiers-0.0.1.vsix |
| 23 | +``` |
| 24 | + |
| 25 | +### Quick start |
| 26 | + |
| 27 | +After installing the extension: |
| 28 | + |
| 29 | +1. Open the project in **VS Code** (e.g., calling `code .` in the project root directory). |
| 30 | +2. Open the file `standard_strcpy_original-2.i` in VS Code. |
| 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. |
| 36 | + |
| 37 | +## Build / Develop the extension |
| 38 | + |
| 39 | +### Prerequisites |
7 | 40 |
|
8 | 41 | Make sure the following are installed: |
9 | 42 | - `JDK 17` |
10 | 43 | - `mvn` |
11 | 44 | - `npm` |
12 | 45 | - `nodejs` |
13 | | -- `vsce` (using `npm install -g @vscode/vsce` for example) |
| 46 | +- `vsce` (using `npm install -g @VS Code/vsce` for example) |
14 | 47 | - [fm-weck](https://gitlab.com/sosy-lab/software/fm-weck) |
15 | 48 |
|
16 | 49 |
|
| 50 | + ### Building |
17 | 51 | To build this extension, run the commands starting from project root directory: |
18 | 52 | 1. `mvn install` (or can use `mvn package -Dmaven.test.skip` if tests are failing) |
19 | | -2. `cd vscode` |
| 53 | +2. `cd VS Code` |
20 | 54 | 3. `npm install` (only needed the first time) |
21 | 55 | 4. `vsce package` |
22 | 56 |
|
23 | | -### Installing |
24 | 57 |
|
25 | | -Install the extension into VS Code with |
26 | | -```shell |
27 | | -cd vscode && code --install-extension sv-comp-verifiers-0.0.1.vsix |
28 | | -``` |
29 | | - |
30 | | -## Testing |
31 | | - |
32 | | -Note that the first time run will take time with fm-weck getting the required tools. |
33 | | - |
34 | | -1. Open the project in VS Code after installing the extension. |
35 | | -2. Open the file `standard_strcpy_original-2.i` in VS Code. |
36 | | -3. The combined invariants should be shown above lines 22, 26, and 31. |
|
0 commit comments