https://github.com/div72/valve
A WIP static analyzer for V.
https://github.com/div72/valve
static-analysis vlang z3
Last synced: 4 months ago
JSON representation
A WIP static analyzer for V.
- Host: GitHub
- URL: https://github.com/div72/valve
- Owner: div72
- License: gpl-3.0
- Created: 2023-02-19T12:41:56.000Z (over 3 years ago)
- Default Branch: devel
- Last Pushed: 2023-02-20T17:34:58.000Z (over 3 years ago)
- Last Synced: 2025-10-10T16:42:42.405Z (9 months ago)
- Topics: static-analysis, vlang, z3
- Language: V
- Homepage:
- Size: 63.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# valve
A WIP static analyzer for V that uses Z3. Aims to increase the correctness of V programs.
## Usage
```v
$ valve tests/basic.v
$ valve incorrect_program.v
incorrect_program.v:2:12: error: failed to prove assertion
1 | fn main2() {
2 | assert false
| ~~~~~
3 | assert true
4 | assert 1 != 1
incorrect_program.v:4:12: error: failed to prove assertion
2 | assert false
3 | assert true
4 | assert 1 != 1
| ~~~~~~
5 | assert -1 < -2
6 | }
incorrect_program.v:5:12: error: failed to prove assertion
3 | assert true
4 | assert 1 != 1
5 | assert -1 < -2
| ~~~~~~~
6 | }
```
## TODO
- [ ] Check array access
- [ ] Variable support
- [ ] Check memory accesses?
- [ ] Ensure memory is freed?