Skip to main content

No project description provided

Project description

vnnlib

PyPI - Version PyPI - Python Version


A python package for parsing neural network properties in the VNN-LIB format. It should currently parse a superset of the VNN-LIB spec that was supported by the example parser written by Stan Bak for VNN-COMP, and will produce compiled specs in the same format. Additionally, we allow parsing of gzip, bzip2, and lzma compressed specs.

Our parser is currently slower for some large files than the previous scripts due to the increased specification support. However, we expect significant optimization opportunities are available, and that overhead will decrease over time.

This package is still alpha software and APIs other than the compatibility API may change before the first release.

Installation

For the latest stable version, you can install from PyPI with:

pip install vnnlib

For the latest updates of vnnlib, you can pip install directly from the GitHub repo with:

pip install git+https://github.com/dlshriver/vnnlib.git@main

Usage

This package can be used as a drop-in replacement for the VNN-COMP utility script by importing

from vnnlib.compat import read_vnnlib_simple

wherever you previously imported read_vnnlib_simple.

Standalone

The parser can also be used to compile vnnlib ahead of time to reduce future property read times. The result of parsing will be pickled and saved to the location specified.

python -m vnnlib [FILE] --compat -o [OUTPUTFILE]

API

We provide a full VNN-LIB parser which will generate an AST for a given specification. To manipulate this AST to generate useful representations that can be dispatched to a verifier, we provide a transformer class which visits the nodes of the AST. We implement one version of this to parse and generate outputs in the format used in prior years of VNN-COMP in vnnlib/compat.py

Documentation will hopefully be coming soon.

License

vnnlib is distributed under the terms of the MIT license.

Project details


Download files

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

Source Distribution

vnnlib-0.0.1.post1.tar.gz (15.3 kB view details)

Uploaded Source

File details

Details for the file vnnlib-0.0.1.post1.tar.gz.

File metadata

  • Download URL: vnnlib-0.0.1.post1.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for vnnlib-0.0.1.post1.tar.gz
Algorithm Hash digest
SHA256 f0d1f1563abee693517e22599592cb9a13c00c4afaf86d008b934b6e98028a02
MD5 a7eaf8c3f09ae473e869b9117301e101
BLAKE2b-256 9a0fe732641ca01da2b30a4c829ba04314c7987db6aab2b5106321a717d7d607

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page