3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00

Simplified binding and logging support generation. Now, everything is generated by update_api.py script. The binding commands can be included in the .h files (e.g., z3_api.h

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-17 23:00:21 -07:00
parent 8459401b6e
commit 15fb18c65d
20 changed files with 20879 additions and 20568 deletions

View file

@ -1,26 +1,11 @@
Instructions for updating external Z3 API
-----------------------------------------
1) Add the new function to the file lib\z3_api.h
2) If the function requires logging, then add its definition to lib\api.py.
Each definition is a call to the API function in this python script.
This function has the following signature:
API(function name, return type, argument list)
The return type only needs to be specified if the function returns a Z3 object.
The file lib\api.py contains many examples.
3) Execute update_api.cmd (on Windows) update_api.sh (on Linux or OSX)
This script updates the .def files in the directory dll, and generates the API logging macros.
If one only wants to generate the logging macros. Then it only needs to execute
cd lib
python api.py
The script api.py generates the following files:
lib\z3_api_log.h: macros and function definitions for logging API invocations.
lib\z3_api_log.cpp
lib\z3_api_commands.cpp: bindings for z3_replayer.cpp (log interpreter)
The python "macros": def_Type() and def_API() are used to add new types and function definitions to the Z3 API.
The .h files listed at update_api.py contain these definitions.
See lib\z3_api.py for many examples.
To generate bindings and the API logging infrastructure, the following command must be used:
python update_api.py