Skip to content

Add the SMT solver Bitwuzla to JavaSMT#370

Merged
baierd merged 165 commits into
masterfrom
bitwuzla_updates
May 2, 2024
Merged

Add the SMT solver Bitwuzla to JavaSMT#370
baierd merged 165 commits into
masterfrom
bitwuzla_updates

Conversation

@baierd

@baierd baierd commented Apr 11, 2024

Copy link
Copy Markdown
Contributor

This PR discusses the addition of Bitwuzla to JavaSMT.
This PR is based on 2 previous PRs:

  • PR332 is the original PR adding Bitwuzla support to JavaSMT

  • PR369 is an addition that combines PR332 with an automatic, SWIG based build script for the JNI wrapper and the most recent update of Bitwuzla with its new term manager, allowing solver instance and thread independent creation/handling of terms. The automatic, SWIG based build script generates a new wrapper based on the C++ bindings automatically for Bitwuzla. This can be toggled on and off. Also, this handles resources automatically via phantom references.

Remaining problems:

  • There is no support to translate FPs to decimal numbers. We are currently working on a general and independent Java based solution for all solvers and more for this.
  • We got FILE handle independent parsing support in the most recent Bitwuzla update. While we integrated this, parsing now is kinda a mess and we should ask for a function that translates a full SMTLIB2 file into a single Term.

…swig_cpp

# Conflicts:
#	lib/native/source/libbitwuzla/compile.sh
#	src/org/sosy_lab/java_smt/solvers/bitwuzla/BitwuzlaFormulaCreator.java
#	src/org/sosy_lab/java_smt/solvers/bitwuzla/BitwuzlaOption.java
…swig_cpp

# Conflicts:
#	src/org/sosy_lab/java_smt/solvers/bitwuzla/BitwuzlaFloatingPointManager.java
#	src/org/sosy_lab/java_smt/solvers/bitwuzla/BitwuzlaOption.java
…ws us to handle arbitrary size fp values. Improved native method mk_fp_value to handle scientific notation in input strings.
…d the affected tests and added a FIXME note to BitwuzlaFloatingPointManager.
…ovides a temporary fix to the phantom reference issue.
… to bitvector, which is not supported by the solver.
daniel-raffler and others added 25 commits April 12, 2024 01:50
…nnotation, as this filters all solvers that don't support both and add requireQuantifierElimination()
…n call that does throw the exception in its signature
…la, as they state that it might be corrupted"

This reverts commit dd009bd.
… function call that does throw the exception in its signature"

This reverts commit fb8376b.
… this is problematic for OpenSMT2 and Bitwuzla)"

This reverts commit 181d750.
…Before annotation, as this filters all solvers that don't support both and add requireQuantifierElimination()"

This reverts commit a0b02d3.
@baierd baierd merged commit 7162b64 into master May 2, 2024
@kfriedberger

kfriedberger commented May 11, 2024

Copy link
Copy Markdown
Member

Can someone give details on the compilation process of Bitwuzla:

  • Where is documentation for Bitwuzla in doc/How-to-...?
  • On which target system is it expected to be executed? Is Ubuntu 18.04 sufficient or is something newer required?
  • Was the checked-in artifact tested on several systems? (Gitlab-Runner does not execute Bitwuzla. Ubuntu 22.04 does not execute Bitwuzla.)
  • Was Bitwuzla compiled with an existing Docker-file for Ubuntu 18.04? Was it modified?
  • Why was Bitwuzla not added to the main documentation in the Readme-file?
  • Was Bitwuzla uploaded to all required artifact systems, namely Ivy and Maven?

@baierd

baierd commented May 13, 2024

Copy link
Copy Markdown
Contributor Author

Thank you for your rigor!

  • I will add a more detailed guide on how to compile Bitwuzla.
  • It needs Ubuntu 20.04+ due to dependencies. (I used a 22.04 Ubuntu docker locally)
  • Also we should switch to 20.04 as standard as discussed a while back. I can do that as well.
  • 22.04 should work, that seems like a problem that needs investigation.
  • I will also add it to the README
  • It was uploaded to Ivy but not Maven (you need to do this since i don't have access. I will contact you once i investigated/fixed the current issues)

@kfriedberger kfriedberger deleted the bitwuzla_updates branch July 4, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants