pyvcg
Verification Condition Generator
What it is and what it does
PyVCG is a Python library that generates verification conditions (VCs) for formal verification solvers, primarily CVC5 and SMTLIB2-compliant solvers. It provides a high-level API to construct logical formulas, datatypes (enumerations, records, optionals), and arithmetic expressions, then translates them into solver-compatible formats. The library handles automatic logic discovery, supports quantifiers and complex boolean operations, and can solve constraints by interfacing with CVC5 either through its Python API or via SMTLIB file output.
The package is designed for developers and researchers building formal verification tools, particularly those working with the TRLC expression language. It abstracts away low-level SMTLIB details while remaining generic enough to support other solvers in the future. With no runtime dependencies beyond cvc5, it installs cleanly and maintains active development, though its GPL v3 license restricts use to copyleft-compatible projects.
Use it for:
- Generate verification conditions for formal proof of program correctness using CVC5 as the backend solver.
- Build symbolic reasoning tools that need to express and solve constraints over integers, reals, strings, and sequences.
- Construct datatype-heavy formal specifications (records, enumerations, optionals) and verify their properties automatically.
- Translate high-level requirement expressions (e.g., from TRLC) into SMT solver queries for automated checking.
- Debug and test constraint satisfaction problems by generating human-readable SMTLIB files for inspection.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyVCG generates verification conditions for SMT solvers like CVC5 and SMTLIB2, supporting a range of logical sorts, datatypes, and arithmetic operations to build and solve formal verification problems.
Yes, if your project is GPL v3 compatible and you need to generate verification conditions for CVC5 or SMTLIB2 solvers. The library is actively maintained, has low install friction, and provides a clean abstraction over solver APIs. No, if your project is proprietary or uses a permissive license—the GPL v3 copyleft requirement is a hard blocker. Conditional: evaluate whether the TRLC-focused feature set and current solver support meet your formal verification needs.
Install
pyvcg on PyPI
pip
pip install pyvcguv
uv add pyvcgpoetry
poetry add pyvcgInstalling pyvcg
Before you install
Low friction: pure Python wheel with no compiled dependencies. Active maintenance—last commit 2026-07-12, release 33 days ago. Requires Python >= 3.8 and cvc5 as a runtime dependency.
License in practice
GNU GPL v3 or later (copyleft). Any code that imports and uses PyVCG must be distributed under a compatible copyleft license; proprietary or permissively licensed projects cannot use it without separate licensing.
Quickstart
pip install pyvcg
from pyvcg import Script
script = Script()
bool_var = script.bool_const('x')
script.assert_formula(bool_var)
Requires Python >= 3.8 and cvc5 package installed; CVC5 solver binary or Python API must be available at runtime.
Verify before relying
- Whether cvc5 is automatically installed as a declared runtime dependency or must be installed separately.
- Scope and maturity of the TRLC expression language support mentioned as the initial target.
- Whether the library is suitable for production formal verification workflows or primarily for research/prototyping.
Package facts
| License | GNU General Public License v3 (copyleft) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 33 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 79,413/month — #14,361 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyvcg-1.0.12-py3-none-any.whl
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
cvc5cvc5 is a satisfiability modulo theories (SMT)…
unclear · top 15,000 on PyPI
z3-solverZ3 is a theorem prover and SMT (satisfiability…
permissive · top 5,000 on PyPI
PyBoolectorPython wrapper around Boolector, a…
permissive · top 15,000 on PyPI
cvxpy-basecvxpy-base provides compiled solver kernels for…
permissive · top 15,000 on PyPI
pyvscPyVSC generates randomized test stimulus and…
permissive · top 15,000 on PyPI
pybammsolverspybammsolvers provides a Python interface to…
unclear · top 15,000 on PyPI
pycosatProvides efficient Python bindings to PicoSAT,…
permissive · top 15,000 on PyPI
optlangOptlang formulates and solves linear,…
permissive · top 15,000 on PyPI
pyamgPyAMG provides Algebraic Multigrid (AMG)…
permissive · top 15,000 on PyPI