Repository navigation
[API Coherence] Report for 2026-10-23 - Solver APIs #11278
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by API Coherence Checker. A newer discussion is available at Discussion #11293. |
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
Analyzed (Solver family): reason-unknown, unsat cores/assert_and_track, consequences/cubes, from_file/from_string, SMT-LIB2 export (
to_smt2), trail/levels/non-units, initial value, translate.Languages: C, Java, .NET, C++, Python, TS/JS, OCaml, Go (Rust not cloned: external repo not analyzed this run).
Method: keyword counts per binding plus spot checks. First run, so there were no cached issues to re-verify.
Findings
Medium: Solver SMT-LIB2 export (
Z3_benchmark_to_smtlib_string) is inconsistent.NET:Solver.ToSmt2(status)(dotnet/Solver.cs:630)C++:solver::to_smt2(z3++.h:3267)Python:Solver.to_smt2(z3.py:8167)TS:solver.toSmtlib2(status). The name differs from the others (toSmt2).Java: onlyContext.benchmarkToSMTString(...)(Context.java:3223), with noSolver.toSmt2convenience.OCaml: only the low-levelZ3native.benchmark_to_smtlib_string(z3.ml:2240); nothing is exposed inz3.mliSolver.Go: no wrapper at all (no references insrc/api/go).Fix: add
Solver.ToSMT2/Stringto Go,Solver.toSmt2to Java,Solver.to_smt2to OCaml. Consider atoSmt2alias in TS.Low: OCaml missing Solver helpers
solver_set_initial_valueexists (z3.mli:3593), but OCaml does not exposeZ3_solver_get_levels-style helpers beyond those listed (get_levels, get_trail and get_non_units exist, so this is fine).solver_from_file/stringas written in.mli, but they exist asSolver.from_file/from_string(z3.mli:3586-3589) — verified OK.Verified consistent
reason_unknown, unsat_core, assert_and_track, consequences, cube, from_file/from_string, get_levels, get_trail, get_non_units, set_initial_value, translate are present in all bindings checked.
Progress
~15% of API surface (Solver family partially). Next: Optimize, Fixedpoint, Arrays, BitVectors, FloatingPoint, Sequences/Strings. Rust clone to be included next run.
All reactions