Repository navigation
[API Coherence] Report for 2026-10-11 - Array Theory & Floating-Point APIs #11135
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by API Coherence Checker. A newer discussion is available at Discussion #11142. |
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
Families analyzed this run: Array theory APIs, Floating-point APIs (re-verified cached issues from the previous run: Solver/BitVector/Optimize)
Languages covered: C, C++, Python, Java, .NET, OCaml, Go, TypeScript/JS, Rust (blocked — see below)
Total C API functions examined: ~40 (array theory: ~15, floating-point: ~25)
Previously cached issues re-verified: 2 (both still open, unchanged)
New inconsistencies found this run: 3
Resolution Updates
No previously cached issues have been resolved. Both remain open after re-verification against the current codebase:
Z3_mk_bv2int/Z3_mk_int2bvin Go bindings (src/api/go/*.gocontains noBv2Int/Int2Bv/bv2int/int2bvmatches).Optimize.Translate(Z3_optimize_translate) in Java (src/api/java/Optimize.java) and .NET (src/api/dotnet/Optimize.cs).Rust Bindings Status
Cloning
https://github.com/prove-rs/z3.rswas attempted again this run (git clone --depth=1 ...) and still fails with a network 403 in this sandbox. Rust coverage remains unverified; retry in a future run with network access, or ask a maintainer to supply a local mirror/tarball.High Priority Issues
1. Missing BitVector
Z3_mk_bv2int/Z3_mk_int2bvin Go (carried over)What: BitVector-to-integer and integer-to-BitVector conversions are not exposed.
Available in: C, C++, Python, Java, .NET, OCaml, TypeScript/JS
Missing in: Go
Suggested fix: Add
MkBV2Int(t *Expr, isSigned bool) *ExprandMkInt2BV(n uint, t *Expr) *Exprtosrc/api/go/bitvec.go, following the existing wrapper pattern (e.g.MkBVAddNoOverflow).Priority: High
2. Missing floating-point numeral introspection in Go, C++, and TypeScript
What: The C API exposes 9 introspection functions on FP numerals —
Z3_fpa_get_numeral_sign,Z3_fpa_get_numeral_sign_bv,Z3_fpa_get_numeral_significand_string,Z3_fpa_get_numeral_significand_uint64,Z3_fpa_get_numeral_significand_bv,Z3_fpa_get_numeral_exponent_string,Z3_fpa_get_numeral_exponent_int64,Z3_fpa_get_numeral_exponent_bv, and theZ3_fpa_is_numeral_{nan,inf,zero,normal,subnormal,positive,negative}predicates.Available in: Python (
FPNumRefclass,src/api/python/z3/z3.py:10566-10676), Java (FPNum.java), .NET (FPNum.cs), OCaml (z3.mli:2514-2562)Missing in: Go (no
fp.gomethods for numeral introspection at all), C++ (z3++.hhas nofpa_get_numeral_*/is_numeral_nanwrappers — only generic numeral helpers), TypeScript (FPNumImplinhigh-level.ts:4370-4378has only a singlevalue(): numbermethod and loses precision for out-of-range doubles)Suggested fix:
FPNumwrapper type or methods on*Exprinsrc/api/go/fp.goexposing sign/significand/exponent getters and NaN/Inf/Zero/Normal/Subnormal predicates.class fpa_expr-style numeral accessors (or free functions) wrappingZ3_fpa_get_numeral_*/Z3_fpa_is_numeral_*inz3++.h.FPNumImplinhigh-level.tswithsign(),significand(),significandAsBV(),exponent(biased),exponentAsBV(biased),isNaN(),isInf(),isZero(),isNormal(),isSubnormal(),isPositive(),isNegative()backed by the corresponding low-levelZ3.fpa_*calls.Priority: High (FP numeral introspection is routinely needed to extract model values; its absence forces users into brittle string parsing via
.toString()/get_numeral_stringworkarounds in these three languages)Medium Priority Issues
3.
Optimize.Translatemissing in Java and .NET (carried over)What:
Z3_optimize_translate(context migration for anOptimizeobject) has no wrapper.Available in: Python, C++, Go, OCaml, TypeScript/JS
Missing in: Java, .NET
Suggested fix: Add
Optimize.Translate(Context to)insrc/api/java/Optimize.javaandsrc/api/dotnet/Optimize.cs, mirroring the existingSolver.Translate/Goal.Translatepattern already present in both languages.Priority: Medium
4.
Z3_mk_map(array map) not wrapped in C++ or TypeScriptWhat:
Z3_mk_mapconstructs an array by applying a function pointwise to one or more arrays of the same domain. It is distinct from the sequencemap/mapihelpers already present in C++ (z3++.h:2732-2745, which wrapZ3_mk_seq_map/Z3_mk_seq_mapi, not the array version) and from TypeScript'sSeq.map(high-level.ts:4520, wrappingmk_seq_map).Available in: Python (
Map,z3.py:5060), Go (MkMap,array.go:85), Java (mkMap,Context.java:2001), .NET (MkMap,Context.cs:2325), OCaml (mk_map,z3.mli:912)Missing in: C++, TypeScript/JS
Suggested fix:
inline expr map(func_decl const& f, expr_vector const& args)wrappingZ3_mk_map, placed neararray_ext/array_default(z3++.h:4375-4384) rather than alongside the unrelated sequencemaphelper to avoid confusion; consider anarray_mapname if overload resolution with the existing seqmap()is ambiguous.Array.map(f: FuncDecl, ...arrays: SMTArray[])function inhigh-level.tsnear the existingArray.sort/Array.const/Array.Khelpers (~line 1101), wrappingZ3.mk_map.Priority: Medium (less commonly used than select/store/const, but is a documented core array-theory primitive available in 5 of 7 directly-checked bindings)
Low Priority Issues
None identified this run beyond the above.
Progress
Notes
prove-rs/z3.rs) coverage could not be checked again this run due to a persistent network 403 when cloning from this sandbox. All statements above about "all checked languages" exclude Rust until this is resolved.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