Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Z3-TurnKey instead of a bespoke Z3 build #219

Merged
merged 5 commits into from
Sep 23, 2020
Merged

Conversation

shonfeder
Copy link
Contributor

Closes #213 (I hope!)

Our bespoke build and local installation of the Z3 API dependency adds a lot of configuration overhead and brittleness
to our build. While investigating #213, I read about Z3-Turnkey on https://stackoverflow.com/a/62015869/1187277. The purpose of this library is to provide a Java artifact that

  1. ships its own native libraries,
  2. can use them without administrative privileges, and
  3. can be obtained using Maven.

I'm hopeful that it can simplify our build overall, and address #213.

@shonfeder shonfeder requested a review from konnov September 19, 2020 04:24
@shonfeder shonfeder changed the title WIP: Use Z3-TurnKey instead of a bespoke Z3 build Use Z3-TurnKey instead of a bespoke Z3 build Sep 19, 2020
@shonfeder shonfeder marked this pull request as ready for review September 19, 2020 04:24
@shonfeder
Copy link
Contributor Author

I just finished a clean build on macOS with this branch using Zulu. Here's my configuration:

% mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/sf/opt/apache-maven-3.6.3
Java version: 1.8.0_265, vendor: Azul Systems, Inc., runtime: /Users/sf/opt/zulu8.48.0.53-ca-jdk8.0.265-macosx_x64/zulu-8.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.6", arch: "x86_64", family: "mac"

@istoilkovska, at your convenience, perhaps you could try a clean build off this branch, and see if it works for you as well? I recommend checking out the repo afresh, since this PR changes the 3rdparty libs and the current build configuration doesn't clean up after itself there.

Regardless of whether this solves #213, since it reduces the initial build time considerably and simplifies our dependencies and build configuration, and seems to be passing all our tests, I think we'll probably want to keep Z3-TurnKey until #182 is closed as per Z3Prover/z3#182 (comment), by integrating it into Z3 itself.

Copy link
Collaborator

@konnov konnov left a comment

Choose a reason for hiding this comment

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

Wow! This is just amazing. Building z3 has been painful for quite a long time.

@konnov
Copy link
Collaborator

konnov commented Sep 23, 2020

@shonfeder I just have merged your PR, as @Kukovec needs it to fix his issue.

@shonfeder shonfeder deleted the shon/use-z3-turnkey branch September 23, 2020 12:11
@romac
Copy link
Contributor

romac commented Sep 23, 2020

Really cool stuff! I didn't know about z3-turnkey, sounds like it could be very useful for the Scala wrapper we've been developing and using for Stainless/Inox at @epfl-lara.

@konnov
Copy link
Collaborator

konnov commented Sep 23, 2020

I hope that the maintainer of z3-turnkey will keep doing their great work!

@shonfeder
Copy link
Contributor Author

The author is trying to integrate it it into z3, but said they'll continue maintaining in tandem with z3 releases in the meantime: Z3Prover/z3#182 (comment)

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.

[BUG] Building Apalache from source with Zulu JDK and Maven fails on MacOS
3 participants