Repository navigation
[API Coherence] Report for 2026-11-07 - Solver, Optimize, BitVector #11593
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by API Coherence Checker. A newer discussion is available at Discussion #11609. |
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.
Summary
First run (cache empty). Analyzed Solver, Optimize and BitVector API families by cross-checking about 20 C API functions across the bindings. The Rust crate was not cloned this run, so Rust is not covered. Cached issues resolved: 0 (none cached).
Findings (verified against the current tree)
Medium
Z3_optimize_translateis missing from the Java, .NET and OCaml Optimize wrappers.Optimize.translate), Go (go/optimize.go).src/api/java/Optimize.java,src/api/dotnet/Optimize.cs,src/api/ml/z3.ml(i).Optimize.translate(Context)in Java and .NET. AddOptimize.translatein OCaml.Optimizemodule lacksget_unsat_core.Z3_optimize_get_unsat_coreis not used inz3.ml.Optimize.get_unsat_core : optimize -> Expr.expr list..mlicoverage is thin for newer Solver and Optimize functions.solver_cube,solver_get_consequences,solver_get_non_units,solver_get_trailandsolver_get_levelsappear only inz3.ml(the rawZ3nativecall). They have novalentry inz3.mli, so they are not part of the public interface.solver_translateis not exposed either. For Solver, this only counts the string match inz3.ml/z3.mli, which is rough.Z3_optimize_assert_and_track, assertions and objectives accessors were not checked.z3.mli.Z3_mk_bvsmodandZ3_mk_bv2inthave no wrappers (go/bitvec.go). Everything else spot-checked is present (rotate, ext-rotate, overflow checks,bvredand).MkBVSmodandMkBV2Int(t, isSigned).Low
to_stringnaming differs across bindings. Java does not callNative.solverToStringdirectly. It probably uses its owntoString, so this is likely fine. A wrapper check is still worth doing.Coverage
prove-rs/z3.rsand check Rust.All reactions