Skip to content

Add a build script for Yices on macOS#628

Open
daniel-raffler wants to merge 2 commits intomasterfrom
yices-macOS
Open

Add a build script for Yices on macOS#628
daniel-raffler wants to merge 2 commits intomasterfrom
yices-macOS

Conversation

@daniel-raffler
Copy link
Copy Markdown
Contributor

Hello,

this PR adds an ant target for building the Yices library on macOS. We can't currently ship the binary due to a lack of Apple hardware and the signing issue. However, the script allows users to at least build the binaries themselves

I've tested this on my JavaSMT fork with a github runner and was able to build the binaries and then run the tests

@kfriedberger
We could also include some of the changes I made to the CI on my fork. Building the Yices binaries separately adds 5-10 minutes to each test run, so we should probably limit it to just one Java version on macOS

Do you think it's worth the extra trouble?

@ThomasHaas
Copy link
Copy Markdown
Contributor

I tried to build script and while it worked fine, I still couldn't get Yices2 to run via JavaSMT.

First, I got a class load error for Yices2SolverContext, but that was because I needed to update our pom.xml.
Then I added the binary to our standard location for solver libraries.
I got this error

The SMT solver YICES2 is not available on this machine because of missing libraries 
(no yices2j in java.library.path: [...])

Notice how the library name yices2j JavaSMT (v5.0.1) looks for does not match with the library name libyices2java.dylib the build script generates. Thinking it was just a name mismatch, I renamed the binary to yices2j.dylib but that didn't resolve the problem.

Any ideas about what could have gone wrong? Maybe it just doesn't work with the JavaSMT v5.0.1? The newest version is not yet available on maven.

@daniel-raffler
Copy link
Copy Markdown
Contributor Author

Hello Thomas,

thanks for giving it a try!

Any ideas about what could have gone wrong? Maybe it just doesn't work with the JavaSMT v5.0.1? The newest version is not yet available on maven.

Yes, this will require the upcoming JavaSMT 6.1 release. We recently made some changes to the Yices backend, so the binary won't work with older versions

If you're interested, you should be able to check that the binary is working like this:

ant build
java -cp bin:lib/java/core/*:lib/java/runtime-yices2/* org.sosy_lab.java_smt.example.SolverOverviewTable

or by simply running the tests:

ant unit-tests-quick

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

Labels

Development

Successfully merging this pull request may close these issues.

2 participants