Add missing API bindings: Go sets/char/relations, Julia sets/relations, TypeScript char/relations, OCaml special relations, Java order constructors#9432
Merged
Conversation
…t, OCaml, and Java Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/b89f3b76-dfd7-47ec-97dd-8ae5e8e88a4a Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
NikolajBjorner
April 30, 2026 17:54
View session
This file contains hidden or 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
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.
Several language bindings were missing API coverage that exists in the C API (
z3_api.h) and other bindings. This adds the missing wrappers across 5 languages.Go
src/api/go/set.go— new file wrapping all 11Z3_mk_set_*functions:MkSetSort,MkEmptySet,MkFullSet,MkSetAdd,MkSetDel,MkSetUnion,MkSetIntersect,MkSetDifference,MkSetComplement,MkSetMember,MkSetSubsetsrc/api/go/char.go— new file wrapping all 7Z3_mk_char_*functions:MkCharSort,MkChar,MkCharLe,MkCharToInt,MkCharToBV,MkCharFromBV,MkCharIsDigitsrc/api/go/relations.go— new file wrapping all 5 special relation constructors:MkLinearOrder,MkPartialOrder,MkPiecewiseLinearOrder,MkTreeOrder,MkTransitiveClosureJulia (
src/api/julia/z3jl.cpp)set_sortcontext method (lambda overZ3_mk_set_sort) and 10 free-function wrappers:empty_set,full_set,set_add,set_del,set_union,set_intersect,set_difference,set_complement,set_member,set_subsetchar_sortcontext methodlinear_order,partial_order,piecewise_linear_order,tree_order(note:transitive_closurewas already bound viafunc_decl.transitive_closure)TypeScript (
src/api/js/src/high-level/)high-level.ts— implementations formkChar,mkCharLe,mkCharToInt,mkCharToBV,mkCharFromBV,mkCharIsDigit,mkLinearOrder,mkPiecewiseLinearOrder,mkTreeOrdertypes.ts— corresponding type signatures on theContext<Name>interfaceOCaml (
src/api/ml/)SpecialRelationmodule to bothz3.mlandz3.mliexposingmk_linear_order,mk_partial_order,mk_piecewise_linear_order,mk_tree_order,mk_transitive_closureviaZ3nativeJava (
src/api/java/Context.java)mkPiecewiseLinearOrderandmkTreeOrderto match the existingmkLinearOrder,mkPartialOrder,mkTransitiveClosurepattern