Verification Condition Generator
PyVCG is a utility library to generate VCs directly for CVC5 or standard-compliant SMTLIB2. The interface is deliberately generic and it should be easy to add API support for other solvers in the future.
This is pretty limited for now as the initial target is the expression language of TRLC.
Please refer to the Changelog for what's new.
Features
This library provides a wrapper around SMTLIB with some additional features:
- SMTLIB Scripts
- Automatic (minimal) logic discovery
- Basic sorts: Bool, Int, Real, and String
- Parametric sorts: Sequences
- Convenience wrappers around datatype sorts:
- Enumerations
- Records (including self-recursive records)
- Optionals
- Uninterpreted functions
- Quantifiers
- Boolean expressions: not, and, or, xor, implication
- If-then-else expressions
- Comparisons: =, <, >, <=, >=
- Int -> Real conversion
- Real -> Int conversion (smtlib rounding (round-to-negative) and arithmetic rounding (round-nearest-away))
- Unary arithmetic: -, abs
- Binary Int arithmetic: +, -, *, smtlib div, smtlib mod, python div, ada remainder
- Binary Real arithmetic: +, -, *, /
- String operations: length, contains, prefix, suffix, concatenation
- Sequence operations: length, contains, access, concatenation
- Record operations: access, check for null (for recursive records)
- Optional operations: value, check for null
In addition this library provides a graph to build VCs with multiple paths; and generating VCs for all paths. FastWP and higher-level modelling for language features (e.g. ite, loops) are planned later.
Drivers
Current support for outputs:
- SMTLIB File Output (for debugging)
- CVC5 via Python API (for solving)
- CVC5 via Binary + SMTLIB (for solving)
When getting models, both API and SMTLIB drivers translate back to
Python values. For example if you have an optional Int, then asking
for the model value you will get e.g. None, 0, 1, ...
Dependencies
Run-time
- Python >= 3.8
- cvc5
Development
Copyright & License
The sole copyright holder is Florian Schanda.
This library is licensed under the GNU GPL version 3 (or later).
Metadata
Release files for pyvcg 1.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyvcg-1.0.12.tar.gz | 39.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyvcg-1.0.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.3 kB
Release files / pyvcg-1.0.12.tar.gz
| Download URL | pyvcg-1.0.12.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf3e5a5bd46d4cf7ca9eaef57d7f4223fae0fd96791fbff10f437641adb34c97
|
|
BLAKE2b-256 checksum How to use checksums |
604370c55a26b47c020db8da2f7b3b63a58083db49357df3c8eecce1e5fc5552
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / pyvcg-1.0.12-py3-none-any.whl
| Download URL | pyvcg-1.0.12-py3-none-any.whl |
|---|---|
| Size | 35.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92bddd207740948cf14c37822f0a1f7118aeac30f5b3eb3839c1b5dc251c3e93
|
|
BLAKE2b-256 checksum How to use checksums |
960a351668d0d08e0e00f04cfce6f9900f61b38f1241808ddc538c120c539372
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|