mirror of
https://github.com/Z3Prover/z3
synced 2026-06-13 12:25:37 +00:00
The doctests for Statistics.__len__ and Statistics.__getitem__ in src/api/python/z3/z3.py asserted a fixed counter count (len(st) == 7). This is fragile because the ":time" entry is only added to statistics when the elapsed wall-clock time of check() is non-zero (see collect_timer_stats in src/solver/check_sat_result.h). On fast native builds, ":time" rounds to 0 and is omitted; under slow environments (e.g. riscv64 under qemu emulation), it becomes non-zero and is included, changing len(st). Fix this by checking the presence of statistics rather than an exact count. Signed-off-by: Julien Stephan <jstephan@baylibre.com> |
||
|---|---|---|
| .. | ||
| z3 | ||
| .gitignore | ||
| CMakeLists.txt | ||
| MANIFEST.in | ||
| pyproject.toml | ||
| README.txt | ||
| setup.py | ||
| z3test.py | ||
On Windows, to build Z3, you should executed the following command
in the Z3 root directory at the Visual Studio Command Prompt
msbuild /p:configuration=external
If you are using a 64-bit Python interpreter, you should use
msbuild /p:configuration=external /p:platform=x64
On Linux and macOS, you must install python bindings, before trying example.py.
To install python on Linux and macOS, you should execute the following
command in the Z3 root directory
sudo make install-z3py