3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-11-23 22:21:28 +00:00

Add Z3_parser_context examples for C and C++

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-20 17:49:58 +00:00
parent 52b7df22cb
commit d9499fb00b
7 changed files with 733 additions and 0 deletions

View file

@ -0,0 +1,18 @@
Example demonstrating Z3_parser_context for incremental SMTLIB2 parsing.
To build the example using the Python build system, execute:
make examples
in the build directory.
This will create the executable cpp_parser_context_example.
To build using CMake, from the examples/cpp_parser_context directory:
mkdir build
cd build
cmake -DZ3_DIR=<path-to-z3-build> ..
make
On Windows, you can just execute the binary.
On macOS and Linux, you must install z3 first using
sudo make install
OR update LD_LIBRARY_PATH (Linux) or DYLD_LIBRARY_PATH (macOS) with the build directory to find the Z3 shared library.