-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Lots of OCaml API bugfixes/improvements courtesy of @martin-neuhaeusser #583
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use a custom block for storing a Z3_config in the ML bindings.
The Z3 context and its reference counters are stored in a structure which is allocated by the C layer outside the OCaml heap, whenever a Z3 context is created. The structure and its Z3 context are disposed, once the last reference counter reaches zero. Reference counters are decremented by C-level finalizers. The OCaml representations for a Z3 context wrap only a pointer to the corresponding structure.
This patch refactors the update_api script and the z3.ml implementation to properly translate between OCaml options and NULL pointers. Some unifications and simplifications (avoidance of unnecessary value allocation) in the script that creates the native bindings.
This patch avoids the use of physical equality wherever possible and improves some details of the OCaml implementation.
Correct reference counting and handling of NULL pointers in new OCaml bindings.
This patch simplifies the implementation of the OCaml bindings. For example, the applyX wrapper functions have become unnecessary in the new OCaml API. It also removes the internal ML2C structure that was used as an intermediate layer between the C and the OCaml layer.
Improvements of the OCaml API implementation
…Caml bindings This patch fixes a bug detected by valgrind, where a custom error handler did not get installed correctly.
This patch eliminates the conversion between OCaml arrays and lists from Z3's OCaml API.
Fix installation of custom error handler during context creation in O…
This patch fixes a segmentation fault that occurs due to incorrect wrapping of double values in the OCaml API.
Fix bug in OCaml API where double values have been wrapped incorrectly.
@martin-neuhaeusser: Just one detail: I had to change the "inline" annotation on compare_pointers and try_to_delete_context, see here: 140f0bb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.