Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.0.12 instead.
Reason given by maintainers: typo in dependency

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).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvcg-1.0.11.tar.gz (39.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvcg-1.0.11-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file pyvcg-1.0.11.tar.gz.

File metadata

  • Download URL: pyvcg-1.0.11.tar.gz
  • Upload date:
  • Size: 39.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pyvcg-1.0.11.tar.gz
Algorithm Hash digest
SHA256 2e37e8b96fd2c8500ca9c7d9e4f3703bf88c1bfffdf7933913da37874fe262c9
MD5 3bfa2d86f414be230b026d6fccf84e9f
BLAKE2b-256 9eeafc42ab4067c3ea126f1d5fd0f298c6d37409f6375a01c1eabba33f76c307

See more details on using hashes here.

File details

Details for the file pyvcg-1.0.11-py3-none-any.whl.

File metadata

  • Download URL: pyvcg-1.0.11-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pyvcg-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 c5970c7c646c16a241d1fb07a84b86fb490e24ba36d94823e469672cea2d0839
MD5 c66779e044dd086fdebc3080deb53c3c
BLAKE2b-256 36597310d46141e5aca54ecb767910eea78c75d40b6053108abab51cdd5de8fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page