Repository navigation
[API Coherence] Report for 2026-11-17 - BitVector operations #11736
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by API Coherence Checker. A newer discussion is available at Discussion #11741. |
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: Bit-vector operations (arithmetic, bitwise, rotate, extension, overflow checks, BV<->Int conversion) across C API, Java, .NET, C++, Python, TypeScript, OCaml, Go. (Rust
z3crate not cloned in this run.) ~11 C API functions checked. No cached state existed (first run), so no prior issues were resolved.Findings
Medium: Go lacks several bit-vector wrappers (
src/api/go/bitvec.go)Present in C, Java, .NET, C++, Python, TypeScript, OCaml, but no Go wrapper exists for:
Z3_mk_bvnand(alsoZ3_mk_bvnor,Z3_mk_bvxnor)Z3_mk_bvsmodZ3_mk_bv2int/Z3_mk_int2bvFix: add
MkBVNand,MkBVNor,MkBVXnor,MkBVSMod,MkBV2Int(expr, isSigned),MkInt2BV(size, expr)inbitvec.go.Verified: grep of
src/api/gofor these C functions returned nothing.Low: Naming inconsistencies
Go uses
MkBVSdivNoOverflow(lowercase "div") while sibling names useMkBVSDiv; GoMkBVRotateLeftvs. CZ3_mk_rotate_left/JavamkRotateLeft(acceptable, but differs fromMkBVExtRotateLeftfamily naming).Verified OK
Java (Context.java), .NET, C++, Python, TypeScript (
BV2Int,Int2BV,smod,nand), OCaml all expose sign_ext, rotate, ext_rotate, redor, nand, smod, bv2int, int2bv, overflow/underflow checks, repeat.Progress
~1 of ~12 API families analyzed (~8%). Next: Solver APIs, Array theory, Floating-point, Sequences/Strings, Rust crate comparison.
All reactions