Skip to content

Update Yices bindings and add some missing features#8

Open
daniel-raffler wants to merge 8 commits intoSRI-CSL:masterfrom
daniel-raffler:master
Open

Update Yices bindings and add some missing features#8
daniel-raffler wants to merge 8 commits intoSRI-CSL:masterfrom
daniel-raffler:master

Conversation

@daniel-raffler
Copy link
Copy Markdown

Hello everyone,

I'm working on the JavaSMT project, which is a library wrapper that provide a unified interface for SMT solvers in Java. We've recently moved the Yices backend from our own JNI bindings to your project. This PR contains some changes that were necessary to get all of our features to work:

  • We updated the bindings for the upcoming 2.8.0 release and added some missing constructors
  • We allowed null to be used as default Parameters
  • We made checks in Model.expandFunction less strict to allow for functions that only have a default value
  • We added support for accessing sums and (power) products
  • We added an option to skip loading the native library (so that we can load it ourselves from a custom location)

We'd like to merge as much of this upstream as possible. Could you have a look at it to see which parts may be useful to you? If you only need some of the changes, the commits should be self-contained, so you can simply pick and choose the parts you need

Cheers,
Daniel

We're not adding the entire ff API, but just the new constructors. This was necessary as the new constructors changed the values of existing constructors

Adding the rest of the API will have to be done in a separate commit
See SRI-CSL/yices2#605
Yices may return zero mappings for a function if it is constant (f.ex `f(x)=0`)
Yices will rewrite terms that were built with regular (binary) addition or multiplication as sums and products. So we need these methods to access the terms, even when we're not creating sums/products ourselves
Set the system property 'yices.skipAutoloader' to 'true' if the binary has already been preloaded
With failifexecutionfails the build only fails if the `make` command can't be found. We should use failonerror instead, and abort if `make` has returned an error
@disteph
Copy link
Copy Markdown

disteph commented Mar 22, 2026

Hi,
Thank you so much for this and helping us keep the bindings up to date. We will review this asap for due diligence and don't expect issues merging that in.

@daniel-raffler
Copy link
Copy Markdown
Author

Thanks for looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants