skillfed

pyvcg

Verification Condition Generator

pyvcg v1.0.12 79.4K downloads/30d#14,361 on PyPI4
Copyleft license GNU General Public License v3 Active released

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 pyvcg

uv

uv add pyvcg

poetry

poetry add pyvcg

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Operating System :: POSIX :: LinuxTopic :: Scientific/Engineering :: MathematicsTopic :: Software Development :: Compilers

Tags

verification condition generatorSMT solver interfaceCVC5 wrapperformal verification librarySMTLIB2 code generationsymbolic reasoningconstraint solver
formal-verificationsmt-solverconstraint-solving

More Mathematics packages