From 7acc79d7c26f7b4786289ca052e5d9eb4d97a247 Mon Sep 17 00:00:00 2001 From: Christian Heitman Date: Wed, 13 Sep 2023 15:05:12 -0300 Subject: [PATCH] Upgrade Bitwuzla to version 0.2.0 --- .github/workflows/codecov.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/osx.yml | 2 +- .github/workflows/python.yml | 2 +- src/libtriton/engines/solver/bitwuzla/bitwuzlaSolver.cpp | 4 ++-- src/scripts/docker/Dockerfile | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 9f0eb244f..9f5deeaa1 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -48,7 +48,7 @@ jobs: run: | git clone https://github.com/bitwuzla/bitwuzla.git cd bitwuzla - git checkout -b 0.1.0 0.1.0 + git checkout -b 0.2.0 0.2.0 python ./configure.py --shared cd build sudo ninja install diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f61b429cf..df3deb70e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -50,7 +50,7 @@ jobs: run: | git clone https://github.com/bitwuzla/bitwuzla.git cd bitwuzla - git checkout -b 0.1.0 0.1.0 + git checkout -b 0.2.0 0.2.0 python ./configure.py --shared cd build sudo ninja install diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 1e830deb6..887621a90 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -54,7 +54,7 @@ jobs: run: | git clone https://github.com/bitwuzla/bitwuzla.git cd bitwuzla - git checkout -b 0.1.0 0.1.0 + git checkout -b 0.2.0 0.2.0 python ./configure.py --shared --prefix $(pwd)/install cd build sudo ninja install diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index f703b7185..094f920f0 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -186,7 +186,7 @@ jobs: run: | git clone https://github.com/bitwuzla/bitwuzla.git cd bitwuzla - git checkout -b 0.1.0 0.1.0 + git checkout -b 0.2.0 0.2.0 python ./configure.py --shared --prefix $(pwd)/install cd build sudo ninja install diff --git a/src/libtriton/engines/solver/bitwuzla/bitwuzlaSolver.cpp b/src/libtriton/engines/solver/bitwuzla/bitwuzlaSolver.cpp index 3f12d8aa0..d26fccf06 100644 --- a/src/libtriton/engines/solver/bitwuzla/bitwuzlaSolver.cpp +++ b/src/libtriton/engines/solver/bitwuzla/bitwuzlaSolver.cpp @@ -142,7 +142,7 @@ namespace triton { // Parse model. std::unordered_map model; for (const auto& it : bzlaAst.getVariables()) { - const char* svalue = bitwuzla_term_value_get_str(bitwuzla_get_value(bzla, it.first), 2); + const char* svalue = bitwuzla_term_value_get_str_fmt(bitwuzla_get_value(bzla, it.first), 2); auto value = this->fromBvalueToUint512(svalue); auto m = SolverModel(it.second, value); model[m.getId()] = m; @@ -231,7 +231,7 @@ namespace triton { if (bitwuzla_term_is_bool(term_value)) { res = bitwuzla_term_value_get_bool(term_value); } else { - res = triton::uint512{bitwuzla_term_value_get_str(term_value, 10)}; + res = triton::uint512{bitwuzla_term_value_get_str_fmt(term_value, 10)}; } bitwuzla_delete(bzla); diff --git a/src/scripts/docker/Dockerfile b/src/scripts/docker/Dockerfile index 107838a80..31b4e08f5 100644 --- a/src/scripts/docker/Dockerfile +++ b/src/scripts/docker/Dockerfile @@ -34,7 +34,7 @@ RUN echo "[+] Download, build and install Bitwuzla" && \ cd $DEPENDENCIES_DIR && \ git clone https://github.com/bitwuzla/bitwuzla.git && \ cd bitwuzla && \ - git checkout -b 0.1.0 0.1.0 && \ + git checkout -b 0.2.0 0.2.0 && \ CC=clang CXX=clang++ PATH=$PATH:/opt/_internal/cpython-3.10.13/bin python3.10 ./configure.py --shared --prefix $(pwd)/install && \ cd build && \ PATH=$PATH:/opt/_internal/cpython-3.10.13/bin ninja install