Repository navigation
[API Coherence] Report for 2026-10-12 - Solver, Optimize, Statistics APIs #11142
Closed
Replies: 1 comment
|
This discussion was automatically closed because it expired on 2026-10-19T04:07:21.579Z.
|
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 Report - October 12, 2026
Summary
Analyzed: Solver APIs, Optimize APIs, Statistics APIs
Total functions/methods checked: ~60 across 8 language bindings (C/C++, Java, .NET, Python, TypeScript/JS, OCaml, Go, Rust via external
prove-rs/z3.rscrate)Previously cached issues resolved: 0 (first run — no prior cache found)
Inconsistencies found: 6
Progress
High Priority Issues
1. Rust
z3crateSolveris missing many core features present everywhere elseWhat's missing:
congruence_root,congruence_next,congruence_explain,cube/cube iteration,solve_for,set_initial_value,import_model_converter,get_help,get_param_descrs,to_dimacs_string,units/non_units/trail/get_levels,add_simplifier,from_file,interrupt,register_on_clause, user-propagator hooks (propagate_*).Available in: C, C++, Python, .NET, Java, Go, OCaml, (partially) TypeScript.
Missing in: Rust (
prove-rs/z3.rs,z3/src/solver.rs).Suggested fix: Add thin wrappers in
z3/src/solver.rsmirroring the C++solverclass, starting withget_help/get_param_descrs(trivial, low risk) andset_initial_value/solve_for(commonly requested incremental-solving features). User-propagator support is a larger effort and may warrant a separate module.Priority: High (widest discrepancy found this run; core functionality gap).
2. TypeScript/JS
Solveris missinggetHelp()andparamDescrs()What's missing: Wrappers for
Z3_solver_get_helpandZ3_solver_get_param_descrs.Available in: C++ (
solver::get_param_descrs), Python (Solver.help/param_descrs), .NET (Solver.Help/ParameterDescriptions), Java (Solver.getHelp/getParameterDescriptions), Go (Solver.GetHelp/GetParamDescrs), OCaml (Solver.get_help/get_param_descrs).Missing in: TypeScript (
src/api/js/src/high-level/types.ts,Solverinterface near line 1050, and implementation inhigh-level.tsSolverImplnear line 2089).Suggested fix: Add
help(): stringandparamDescrs(): ParamDescrs<Name>to theSolverinterface, implemented viaZ3.solver_get_help/Z3.solver_get_param_descrs.Priority: High (discoverability feature for tuning solver parameters, present in every other binding).
3. TypeScript/JS
Solveris missingimportModelConverter()What's missing: Wrapper for
Z3_solver_import_model_converter.Available in: C++, Python, .NET, Java, Go, OCaml.
Missing in: TypeScript.
Suggested fix: Add
importModelConverter(src: Solver<Name>): voidto theSolverinterface, implemented viaZ3.solver_import_model_converter.Priority: Medium-High (used for model-converter chaining, e.g. tactic pre-processing + solving).
Medium Priority Issues
4. Go
Optimizeis missingGetStatistics(),SetInitialValue(), andGetParamDescrs()What's missing: Wrappers for
Z3_optimize_get_statistics,Z3_optimize_set_initial_value,Z3_optimize_get_param_descrs.Available in: C++ (
optimize::statistics,set_initial_value), Python (Optimize.statistics,set_initial_value,param_descrs), .NET (Optimize.Statistics,SetInitialValue,ParameterDescriptions), Java (Optimize.getStatistics,setInitialValue,getParameterDescriptions).Missing in: Go (
src/api/go/optimize.go).Suggested fix: Add
func (o *Optimize) GetStatistics() *Statistics,func (o *Optimize) SetInitialValue(variable, value *Expr), andfunc (o *Optimize) GetParamDescrs() *ParamDescrstosrc/api/go/optimize.go, following the pattern already used insolver.gofor the equivalentSolvermethods.Priority: Medium (parity gap — Go already supports these for
Solver, just notOptimize).5. TypeScript/JS
Optimizeis missinggetHelp()andparamDescrs()What's missing: Same gap as issue #2 but for
Optimize(Z3_optimize_get_help,Z3_optimize_get_param_descrs).Available in: C++, Python, .NET, Java, Go, OCaml.
Missing in: TypeScript (
Optimizeinterface,types.tslines ~1518–1686).Suggested fix: Mirror the fix from issue #2 for the
Optimizeinterface/implementation.Priority: Medium.
6. Rust
StatisticsDisplayimpl does not use the real C API valueWhat's missing:
impl fmt::Display for Statisticsinz3/src/statistics.rscurrently hard-codes"<z3.stats>"instead of callingZ3_stats_to_string.Available in: C++ (
operator<<viaZ3_stats_to_string), Python (__repr__), .NET/Java/Go/OCaml (ToString/toString/String()/to_stringall call the real C function).Missing in: Rust.
Suggested fix: Call
Z3_stats_to_string(ctx, z3_stats)in theDisplayimpl and convert the returnedZ3_stringviaCStr, matching the pattern already used for other values in the same file.Priority: Medium (cosmetic/debugging usability issue, easy fix).
Verification Notes
All findings above were verified directly against the current repository HEAD and the
prove-rs/z3.rsHEAD. Directgit cloneof the external Rust repo was blocked by network policy in this sandbox; the GitHub API/MCP file-read tool was used instead to fetchz3/src/solver.rs,z3/src/optimize.rs, andz3/src/statistics.rsfor analysis. No cached issues existed to re-verify, since this is the first run — cache memory has been initialized with the 6 issues above for future resolution tracking.Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
github.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.
All reactions