[API Coherence] Report for 2026-02-22 - Solver & BitVector APIs #8733
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-03-01T15:18:20.594Z.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
API Coherence Analysis Report
Date: February 22, 2026
Analyzed: Solver APIs, BitVector operations
Languages Covered: 7 (C, C++, Python, Java, .NET/C#, TypeScript/JavaScript, OCaml, Go)
Total APIs Checked: ~52 Solver functions + 40+ BitVector operations
Issues Found: 3 confirmed gaps
Summary
This is the first systematic run of API coherence checking for Z3. I analyzed the core Solver APIs and BitVector operations across all language bindings. Overall, Z3 shows excellent API coverage across most languages, with particularly strong implementations in Python, C++, TypeScript, C#, and Java. However, some advanced features are missing in certain languages.
Key Findings:
Progress:
Issues Found
Medium Priority
1. User Propagator APIs Missing in Go
What: The complete user propagator callback interface (
Z3_solver_propagate_*family) is not exposed in Go bindings.C API Functions Missing:
Z3_solver_propagate_initZ3_solver_propagate_fixedZ3_solver_propagate_finalZ3_solver_propagate_eqZ3_solver_propagate_diseqZ3_solver_propagate_createdZ3_solver_propagate_decideZ3_solver_propagate_on_bindingZ3_solver_propagate_declareZ3_solver_propagate_registerZ3_solver_propagate_register_cbZ3_solver_propagate_consequenceAvailable In: Python, Java, C#, C++
Missing In: Go, OCaml, TypeScript (partial support)
Verified: February 22, 2026 - Confirmed missing via grep search in
src/api/go/Impact: Users cannot implement custom theory propagators in Go, limiting advanced SMT solving capabilities for domain-specific reasoning.
Suggested Fix:
Solver.PropagateInit(),Solver.PropagateFixed(), etc. insrc/api/go/solver.goFiles to Modify:
src/api/go/solver.go- Add propagator methodssrc/api/go/z3.go- Add callback type definitionsexamples/go/- Add user propagator example2. register_on_clause Callback Missing in Java
What: The
Z3_solver_register_on_clausecallback for receiving learned clauses is not exposed in Java.C API Function:
Available In: Python, C++, C#
Missing In: Java, Go, TypeScript, OCaml
Verified: February 22, 2026 - Confirmed by checking
src/api/java/Solver.java(noregisterOnClausemethod)Use Case: Allows users to observe and process clauses learned during solving, useful for:
Suggested Fix:
Add to
src/api/java/Solver.java:Files to Modify:
src/api/java/Solver.java- Add callback interface and registration methodsrc/api/java/Native.java- Add JNI bindingsrc/api/java/enumerations/- May need clause proof hint typesLow Priority
3. import_model_converter Missing in Java and Go
What: The
Z3_solver_import_model_converterfunction for transferring model converters between solvers is missing in Java and Go bindings.C API Function:
Available In: Python, C++, C#
Missing In: Java, Go, TypeScript, OCaml
Verified: February 22, 2026 - Confirmed via grep search across language bindings
Use Case: Enables model converter sharing when:
Why Low Priority:
Suggested Fix for Java:
Add to
src/api/java/Solver.java:Suggested Fix for Go:
Add to
src/api/go/solver.go:Files to Modify:
src/api/java/Solver.java&Native.javasrc/api/go/solver.goAPI Coverage Analysis
Excellent Coverage (100% of core features)
Python -
src/api/python/z3/z3.pyC++ -
src/api/c++/z3++.hC#/.NET -
src/api/dotnet/Solver.csTypeScript/JavaScript -
src/api/js/src/high-level/high-level.tsGood Coverage (90-95% of features)
Java -
src/api/java/Solver.javaUserPropagatorBase)register_on_clausecallbackimport_model_converterOCaml -
src/api/ml/z3.mliPartial Coverage (80-85% of features)
Go -
src/api/go/solver.goimport_model_converterregister_on_clauseMethodology
Tools Used
Verification Process
For each API:
src/api/z3_api.hLanguages Analyzed
src/api/z3_api.h- 52 Solver functionssrc/api/python/z3/z3.py- Solver class (lines 7419-7950)src/api/java/Solver.java- 40+ public methodssrc/api/dotnet/Solver.cs- Complete implementationsrc/api/c++/z3++.h- solver class (lines 2934-3200)src/api/js/src/high-level/high-level.ts- SolverImpl (lines 1996-2250)src/api/go/solver.go- 31 Solver methodssrc/api/ml/z3.mli- Solver module (lines 3309-3495)Next Steps
For Maintainers
Immediate Actions:
register_on_clausegap - assess demand from usersLong-term:
For Next Analysis Run
The next report will focus on:
Z3_mk_select,Z3_mk_store, etc.Estimated completion: 20 more runs to cover all API families
Statistics
Cache Status
This analysis has been cached at
/tmp/gh-aw/cache-memory/api_coherence_progress.jsonfor incremental progress tracking across workflow runs.**Cached (redacted)
Future runs will build on this foundation, re-verifying cached issues and analyzing new API families.
Beta Was this translation helpful? Give feedback.
All reactions