Skip to content

Conversation

@daniel-raffler
Copy link
Contributor

Hello everyone,
Bitwuzla has released a new version 0.6.0 yesterday and we should update our bindings. The new release adds support for quantification over array variables and a new abstraction module for abstracting bit-vector arithmetic operators. A full changelog can be found here.

This pull request updates the Bitwuzla version to 0.6.0 and fixes a minor bug when passing boolean arguments to the solver using the solver.bitwuzla.furtherOptions option. (This was needed to actually use the new option with --option solver.bitwuzla.furtherOptions="ABSTRACTION=1, ABSTRACTION_BV_SIZE=32")

@kfriedberger: Could you handle uploading the solver binaries please?

…zla with `solver.bitwuzla.furtherOptions`

Bitwuzla uses 0 or 1 to encode boolean options, so we need to use Options.set(Option, int) to set their value. The other method Option.set(Option, String) is only be used for options that expect a `Mode` (= Enum value).
Copy link
Member

@kfriedberger kfriedberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Well done.
I will compile and update Bitwuzla in the next days.

@daniel-raffler
Copy link
Contributor Author

daniel-raffler commented Oct 26, 2024

Here's a quick performance test for the new "abstraction" feature:
Screenshot From 2024-10-26 11-51-52
(The brown line is with abstractions enabled)

We may still add our own option to enable this, or possibly even turn it on by default. Bitwuzla offers a large number of different configuration options:

      abstraction(this,
                  Option::ABSTRACTION,
                  false,
                  "enable abstraction module",
                  "abstraction"),
      abstraction_bv_size(
          this,
          Option::ABSTRACTION_BV_SIZE,
          32,
          0,
          UINT64_MAX,
          "enable abstraction for bit-vector terms of given minimum size",
          "abstraction-bv-size"),
      abstraction_eager_refine(this,
                               Option::ABSTRACTION_EAGER_REFINE,
                               false,
                               "add all violated abstraction lemmas at once",
                               "abstraction-eager-refine"),
      abstraction_value_limit(this,
                              Option::ABSTRACTION_VALUE_LIMIT,
                              8,
                              0,
                              UINT64_MAX,
                              "value instantiation limit bv-size/<n> until "
                              "adding original term as refinement",
                              "abstraction-value-limit"),
      abstraction_value_only(this,
                             Option::ABSTRACTION_VALUE_ONLY,
                             false,
                             "only add value instantiations",
                             "abstraction-value-only"),
      abstraction_assert(this,
                         Option::ABSTRACTION_ASSERT,
                         false,
                         "assertion abstraction",
                         "abstraction-assert"),
      abstraction_assert_refs(this,
                              Option::ABSTRACTION_ASSERT_REFS,
                              100,
                              1,
                              UINT64_MAX,
                              "number of assertion refinements per check",
                              "abstraction-assert-refs"),
      abstraction_initial_lemmas(this,
                                 Option::ABSTRACTION_INITIAL_LEMMAS,
                                 false,
                                 "use initial lemma refinements only",
                                 "abstraction-initial-lemmas"),
      abstraction_inc_bitblast(this,
                               Option::ABSTRACTION_INC_BITBLAST,
                               false,
                               "incrementally bit-blast bvmul and bvadd",
                               "abstraction-inc-bitblast"),
      abstraction_bv_add(this,
                         Option::ABSTRACTION_BV_ADD,
                         false,
                         "term abstraction for bvadd",
                         "abstraction-bvadd"),
      abstraction_bv_mul(this,
                         Option::ABSTRACTION_BV_MUL,
                         true,
                         "term abstraction for bvmul",
                         "abstraction-bvmul"),
      abstraction_bv_udiv(this,
                          Option::ABSTRACTION_BV_UDIV,
                          true,
                          "term abstraction for bvudiv",
                          "abstraction-bvudiv"),
      abstraction_bv_urem(this,
                          Option::ABSTRACTION_BV_UREM,
                          true,
                          "term abstraction for bvurem",
                          "abstraction-bvurem"),
      abstraction_eq(this,
                     Option::ABSTRACTION_EQUAL,
                     false,
                     "term abstraction for =",
                     "abstraction-eq"),
      abstraction_ite(this,
                      Option::ABSTRACTION_ITE,
                      false,
                      "term abstraction for ite",
                      "abstraction-ite"),

However, it should to be enough to just enable it with ABSTRACTION=1 and then set the minimum bitvector size for abstraction with ABSTRACTION_BV_SIZE=XXX.

@kfriedberger kfriedberger merged commit 46ed247 into master Oct 27, 2024
2 of 3 checks passed
@kfriedberger kfriedberger deleted the update_bitwuzla_to_0.6.0 branch October 27, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants