Skip to content

Conversation

kfriedberger
Copy link
Member

No description provided.

BaierD added 25 commits September 29, 2023 18:16
…for a term, if there is not, its not a constant)
…recise in Bitwuzla and use convertValue for constants)
…terms/sorts etc. are shared) and fix pop bug
…sary C code and use it in the formula manager (TODO: proper temporary files in the C wrapper)
…substitute variables w bound variables, but this changes existing terms!
…now, not variables that are named after the number....)

Note: Bitwuzla does not accept real numbers in scientific notation for FPs
…lues ourselfs, which fails, and will always fail in Java (I reported that we need a function to get the decimal value of a FP in Bitwuzla to the devs)
…nd add the correct options for unsat core and unsat core w assumptions
@baierd
Copy link
Contributor

baierd commented Oct 7, 2023

Bitwuzla has several critical issues that need to be resolved before it can be merged:

  • Bitwuzla does not add || around symbol names with non valid characters. Example: main::a should be returned as |main::a|. SMTLIB2.6 states that both symbols are equivalent. So this might be a non-issue in the end. But we should nevertheless decide if this is critical to us (in regard to CPAchecker for example) and if we want to solve this ourselfs.
  • It is not possible to get a decimal value out of a Floating-Point value. (And this is extremely hard to solve in Java) I already requested help however.

There are also minor issues that can be resolved later:

@baierd
Copy link
Contributor

baierd commented Oct 7, 2023

@kfriedberger could you review the model, especially the ValueAssignments for UFs and Arrays for me please? I would like some feedback for my implementation.

@baierd
Copy link
Contributor

baierd commented Oct 8, 2023

It seems like trivial Boolean based formulas are rewritten/simplified by Bitwuzla even if the option BITWUZLA_OPT_REWRITE_LEVEL is set to no rewrites. However, since dumping of formulas is currently being done by a selfmade method in Java based on the visitor instead of the Bitwuzla native API call bitwuzla_print_formula(). I plan on wrapping bitwuzla_print_formula() in our JNI wrapper, such that we can use it and then test again. (bitwuzla_print_formula() wants a file to dump into, so it is significantly easier to handle this in the C wrapper directly.)

@baierd
Copy link
Contributor

baierd commented Oct 8, 2023

Update on the symbol naming: if there is a space in a symbol name, we expect that the symbol name will be wrapped in || (similar to the main::a problem described above, just that spaces need to be encased.). The dump of Bitwuzla does not do this currently. However, since we are not using Bitwuzlas dump mechanism, but a selfmade one, i will test this again after i added the native dump function.

@daniel-raffler
Copy link
Contributor

I've opened a new discussion about our issues with the parser on the Bitwuzla bugtracker:
bitwuzla/bitwuzla#101

@baierd
Copy link
Contributor

baierd commented Jan 24, 2024

I've published the new version 0.3.1 and updated our code for it.
The only 2 issues are the parsing problem mentioned above and that we can't use formulas on stacks distinct to the creation stack. But both don't block a merge in my opinion.
There is a test failing because of the outdated CI. So we need to update that.

We should update the CI and then we can merge.

@baierd
Copy link
Contributor

baierd commented Feb 28, 2024

Formulas in the new version of Bitwutzla just released are now capable of being used thread independently.
We should update our wrapper and code before merging this.

@baierd baierd merged commit b729cdc into master Apr 9, 2024
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