A C++ library for parsing and manipulating neural network queries in the VNN-LIB format.
Features include:
- Parsing: Convert a VNN-LIB file or string into a type-checked AST.
- Manipulations:
- Generic traversal of the AST.
- Conversion of arithmetic expressions into a linear form.
- Conversion of boolean expressions to Disjunctive Normal Form (DNF).
- Conversion of query into the reachability format used in prior VNN-COMPs.
You can either download the latest release of the pre-built library or can follow the CONTRIBUTING.md instructions to build from source. Note if doning the latter then you must follow the instructions to regenerate the parser if you are not on a Linux system.
#include "VNNLib.h"
TQuery* query = parseQueryFile(std::string path);
for (auto assertion : query.assertions) {
...
}| VNNLIB-C++ version | VNNLIB version |
|---|---|
| v1.0 | v2.0 |