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

Introduce Z3 version switching #2995

Merged
merged 11 commits into from
Aug 3, 2023
Merged

Conversation

mtzguido
Copy link
Member

As proposed in this note #2974.

With this PR F* will now look explicitly for z3-4.8.5 in the PATH, and prefer that over just z3 (in Windows, both would have .exe suffixes), but it will still default to z3 if the former is not found. An option --z3version is also introduced to be able to switch the version, even within a single file, and have F* run the correct executable. F* will verify that it is talking to the correct Z3 version via issuing a (get-info :version) to Z3 and reading the output, failing with an error on a mismatch (though it can be downgraded to a warning or ignored).

This is part of the move to using a new Z3.

F* will also use the version to decide which options to pass to Z3 (as a prefix of the SMT2 file). This PR also includes the options needed for the current Z3 master (which will be 4.12.3), so F* is readily usable with master Z3 right now.

However, we still require some changes to the image creation, documentation, everest script, etc. But this change should be self-contained and not break anything (I think).

@mtzguido mtzguido marked this pull request as draft July 24, 2023 08:13
@mtzguido
Copy link
Member Author

This needs a tweak to fstar-mode before merging, since it always passes the --smt flag to F*.

@mtzguido mtzguido marked this pull request as ready for review August 3, 2023 22:47
@mtzguido
Copy link
Member Author

mtzguido commented Aug 3, 2023

Merging this now. Emacs will still work as before, taking z3 from the PATH, but switching the version won't be possible until I post a fix to fstar-mode.

@mtzguido mtzguido merged commit 928f044 into FStarLang:master Aug 3, 2023
1 check passed
@mtzguido mtzguido deleted the z3_version_switch branch August 3, 2023 23:30
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.

1 participant