Repository navigation
[API Coherence] Report for 2026-10-19 - Solver APIs, BitVector Rotation, Global Config Params #11225
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by API Coherence Checker. A newer discussion is available at Discussion #11238. |
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 19, 2026
Summary
This is the first run of the API Coherence Checker (no prior cache found). I analyzed three API families across all 8 language bindings maintained in-repo (C, C++, Java, .NET, Python, TypeScript/JS, OCaml, Go) plus the external Rust
z3.rscrate:rotate_left/rotate_right, extended variants)Z3_global_param_set/get/reset_all)Progress
High Priority Issues
1. Missing
Solver.SolveForin .NET bindingsWhat:
Z3_solver_solve_for(symbolic elimination/substitution of variables) has no .NET wrapper.Available in: C (
Z3_solver_solve_for), Java (Solver.solveFor), Python (Solver.solve_for), C++ (solver::solve_for), Go (Solver.SolveFor), OCaml (Solver.solve_for), TypeScript (Solver.solveFor)Missing in: .NET (C#), Rust (
z3.rs, external)Suggested fix: Add
public void SolveFor(IEnumerable<Expr> variables, out Expr[] terms, out Expr[] guards)tosrc/api/dotnet/Solver.cs(andNativeSolver.cs), wrappingNative.Z3_solver_solve_for.File:
src/api/dotnet/Solver.csPriority: High — this is supported in 6 of the 9 bindings surveyed.
2. Missing
Solver.AddSimplifierin .NET bindingsWhat:
Z3_solver_add_simplifier, which attaches a custom simplifier pipeline to a solver (returning a new solver), has no .NET equivalent.Available in: C (
Z3_solver_add_simplifier), Java (Solver.addSimplifier), Python/C++ (constructor overload taking asimplifier), Go (Solver.AddSimplifier), TypeScript (Solver.addSimplifier)Missing in: .NET (C#), Rust (
z3.rs, external), and OCaml'sSolvermodule (OCaml has a standaloneSimplifiermodule but noSolver.add_simplifierbinding inz3.mli)Suggested fix: Add
public Solver AddSimplifier(Simplifier simplifier)tosrc/api/dotnet/Solver.cswrappingNative.Z3_solver_add_simplifier. Consider also addingSolver.add_simplifierto the OCamlSolvermodule inz3.mli/z3.ml.Files:
src/api/dotnet/Solver.cs,src/api/ml/z3.mliPriority: High — simplifier pipelines are increasingly used; 6/9 bindings already support attaching them to a
Solver.Medium Priority Issues
3. Rust (
z3.rs, external repo) Solver API is missing many advanced features present in other bindingsWhat: The external Rust crate's
Solver(z3/src/solver.rs) exposes only:assert,assert_and_track,check,check_assumptions,check_and_get_model,push,pop,reset,get_model,get_proof,get_unsat_core,get_assertions,get_consequences,get_reason_unknown,get_statistics,from_string,set_params,solutions/into_solutions,to_smt2.It lacks: per-solver
interrupt(only available viaContext::interrupt/ContextHandle),get_help,param_descrs,num_scopes,units/non_units,trail/trail_levels,congruence_root/congruence_next/congruence_explain,cube,solve_for,set_initial_value,import_model_converter,add_simplifier,from_file,dimacs,translate.Available in: C, Python, Java, .NET, C++, Go, OCaml, TypeScript expose most/all of these on their Solver types.
Missing in: Rust (
z3.rs)Suggested fix: Since
z3.rsis an external community crate rather than part ofZ3Prover/z3, this is informational — worth sharing with theprove-rs/z3.rsmaintainers for upstream contribution, not a change to this repository.Priority: Medium (not directly actionable in
Z3Prover/z3, but a real coherence gap for Rust users relying on congruence-closure/cube/trail features for advanced incremental solving).Low Priority Issues
4. BitVector rotation: naming convention differences across bindings (informational, not a functional gap)
What: All 9 bindings correctly expose both the "rotate by constant" (
Z3_mk_rotate_left/right) and "rotate by expression" (Z3_mk_ext_rotate_left/right) variants in terms of underlying C API coverage, but naming/ergonomics differ:rotate_left(i)(constant) vsext_rotate_left(expr)(dynamic).MkBVRotateLeft/MkBVRotateRight(constant) vsMkBVExtRotateLeft/MkBVExtRotateRight(dynamic).RotateLeft(a, b)/RotateRight(a, b)always call the extended (Z3_mk_ext_rotate_left/right) variant; the constant-onlyZ3_mk_rotate_left/rightis never exposed as a separate convenience function.rotateLeft/rotateRightmethods, always using the dynamic/ext variant under the hood.z3.rs):bvrotl/bvrotrmap only toZ3_mk_ext_rotate_left/right; the constant-only variant is not exposed in the high-level crate at all.Suggested fix: No functional gap (constant rotation is a special case of dynamic rotation with a numeral operand), but for consistency/discoverability, consider documenting that Python/TS/Rust always use the extended variant, or adding an explicit constant-rotate convenience wrapper to those bindings to mirror C++/Java/.NET/Go naming.
Priority: Low (cosmetic/discoverability only).
Verified Non-Issues
Z3_global_param_set/get/reset_all) is consistently exposed across all 9 bindings: C++ (z3::set_param/reset_params), Java (Global.setParameter/getParameter/resetAll), .NET (Global.cs), Python (set_param/get_param/reset_params), Go (SetGlobalParam/GetGlobalParam/ResetAllGlobalParams), OCaml (set_global_param/get_global_param/global_param_reset_all), TypeScript (setParam/getParam/resetParams), Rust (set_global_param/get_global_param/reset_all_global_params). No action needed.Next Areas to Analyze
Z3_mk_select,Z3_mk_store, array lambdas, array extensionality)Progress and open issues have been cached for re-verification in the next run.
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