[API Coherence] Report for 2026-03-14 – Datatype, Model, Tactic/Goal/Probe, Fixedpoint APIs #8992
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by API Coherence Checker. A newer discussion is available at Discussion #9021. |
Beta Was this translation helpful? Give feedback.
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
Run 4 of ongoing API coherence analysis.
✅ Resolution Updates (9 Resolved Since Run 3)
The following previously tracked gaps have been resolved and removed from the open-issues list:
bvredand/bvredorContext.java:1195,1207bvredand/bvredorbitvec.go:227,232ext_rotate_left/ext_rotate_rightz3++.h:1536-1537); Go addedMkBVExtRotateLeft/Right(bitvec.go:237-243)MkPower,MkAbs,MkInt2Real,MkReal2Int,MkIsInt,MkDivides)arith.go:128-155fp.go:172+to_fp_bv,to_fp_float,to_fp_real,to_fp_signed/unsigned,to_sbv,to_ubv,MkFPFP)fp.go:196-283fp.go:226-247fp.go:201-223MkSeqReplaceAll,MkSeqNth,MkSeqLastIndex,MkSeqMap, etc.)seq.go:234+MkMaparray.go:76The Go bindings have seen substantial improvement since the last run.
Progress
Open Issues
Medium Priority
1. Go
GoalMissing Introspection MethodsWhat's missing:
Goal.Depth(),Goal.ConvertModel(),Goal.Translate(),Goal.Precision()C API:
Z3_goal_depth,Z3_goal_convert_model,Z3_goal_translate,Z3_goal_prec/Z3_goal_precisionAvailable in: Python, Java, .NET, C++, OCaml, TypeScript, Rust (
goal.rshasget_depth,get_precision)Missing in: Go (
src/api/go/tactic.go—Goalstruct only hasAssert,Size,Formula,NumExprs,IsDecidedSat,IsDecidedUnsat,Reset,String)Suggested fix: Add
Depth() uint,Precision() uint,Translate(ctx *Context) *Goal, andConvertModel(s *Solver) *Modelmethods toGoalintactic.goPriority: Medium
2. Go
Model/FuncInterpMissing Entry-Level APIsWhat's missing: A
FuncEntrytype and corresponding methods:FuncInterp.GetEntry(i uint) *FuncEntry,FuncInterp.AddEntry(args []*Expr, val *Expr),FuncInterp.SetElse(val *Expr),Model.HasInterp(decl *FuncDecl) boolC API:
Z3_func_interp_get_entry,Z3_func_interp_add_entry,Z3_func_interp_set_else,Z3_func_entry_get_value,Z3_func_entry_get_arg,Z3_func_entry_get_num_args,Z3_model_has_interpAvailable in: Python, Java, .NET, C++, OCaml, TypeScript, Rust (
func_interp.rsandfunc_entry.rsexpose all these)Missing in: Go (
src/api/go/solver.go—FuncInterponly hasNumEntries,GetElse,GetArity)Suggested fix: Add a
FuncEntrystruct withGetValue,GetArg,GetNumArgsmethods; addGetEntry(i uint) *FuncEntry,AddEntry,SetElsetoFuncInterp; addHasInterptoModelPriority: Medium
3. Rust
FixedpointMissing High-Level WrappersWhat's missing: The Rust high-level
Fixedpointtype (inz3/src/fixedpoint.rs) exposes most C API functions but is missing:get_rules→Z3_fixedpoint_get_rules(returns the set of rules as an AstVector)get_assertions→Z3_fixedpoint_get_assertions(returns asserted axioms as an AstVector)get_param_descrs→Z3_fixedpoint_get_param_descrsset_predicate_representation→Z3_fixedpoint_set_predicate_representationAll four bindings exist in
z3-sys(verified atz3-sys/src/lib.rs:6559,6568,6571,6595).Available in: Python, Java, .NET, C++, Go (
fixedpoint.gohasGetRules,GetAssertions,GetParamDescrs,SetPredicateRepresentation)Missing in: Rust (
z3/src/fixedpoint.rs)Suggested fix: Add four methods to the
Fixedpointstruct inz3.rs; the z3-sys bindings are already in placePriority: Medium
4. Rust
SeqMissing Most Sequence OperationsWhat's missing: The Rust
Seqtype (z3/src/ast/seq.rs) only implements:new_const,fresh_const,empty,unit,at,nth,length,contains,concatMissing operations with C API equivalents available in z3-sys:
extract/Z3_mk_seq_extract(subsequence by offset+length)replace/Z3_mk_seq_replacereplace_all/Z3_mk_seq_replace_allreplace_re/Z3_mk_seq_replace_rereplace_re_all/Z3_mk_seq_replace_re_allis_prefix/Z3_mk_seq_prefixis_suffix/Z3_mk_seq_suffixindex_of/Z3_mk_seq_indexlast_index_of/Z3_mk_seq_last_indexmap/Z3_mk_seq_mapmapi/Z3_mk_seq_mapifoldl/Z3_mk_seq_foldlfoldli/Z3_mk_seq_foldliAvailable in: Python, Java, .NET, C++, Go, TypeScript (except map/mapi/foldl/foldli)
Missing in: Rust
Suggested fix: Expand
z3/src/ast/seq.rswith the above methods; all underlying z3-sys bindings already existPriority: Medium
5. TypeScript Missing Sequence Higher-Order Operations
What's missing: TypeScript (
src/api/js/src/high-level/high-level.ts) is missing:seqMap/Z3_mk_seq_mapseqMapi/Z3_mk_seq_mapiseqFoldl/Z3_mk_seq_foldlseqFoldli/Z3_mk_seq_foldliNote: Most other previously-missing seq functions (
replace_re,str_to_int,string_to_code,str_lt,str_le, etc.) have been added and are no longer missing.Available in: Python, Java, .NET, C++, Go, OCaml
Missing in: TypeScript
Suggested fix: Add wrapper methods to the
SeqImplclass inhigh-level.tsPriority: Medium
Low Priority
6. Rust BV Missing
repeatOperationWhat's missing:
BV::repeat(n)wrappingZ3_mk_repeatz3-sys binding exists at
z3-sys/src/lib.rs:2760Available in: Python, C++, Java, .NET, OCaml, TypeScript, Go
Missing in: Rust (
z3/src/ast/bv.rs— all other BV unary/binary/shift ops use the macro pattern, butrepeatis missing)Suggested fix: Add
pub fn repeat(&self, i: u32) -> SelftoBVinbv.rsPriority: Low
7. Rust Tactic Missing Parallel Combinators
What's missing:
Tactic::par_or(run tactics in parallel, return first success),Tactic::par_and_then(parallel composition), andTactic::fail_if_not_decidedC API:
Z3_tactic_par_or,Z3_tactic_par_and_then,Z3_tactic_fail_if_not_decidedAvailable in: Python, Java, .NET, C++, Go (
tactic.go:114-124), TypeScriptMissing in: Rust (
z3/src/tactic.rs— hasor_else,and_then,cond,fail_if, but no parallel variants)Suggested fix: Add
par_or,par_and_then,fail_if_not_decidedtoTacticintactic.rs; z3-sys bindings existPriority: Low
8. Rust Solver Missing Advanced APIs (Ongoing)
What's missing: The Rust
Solver(z3/src/solver.rs) is missing newer APIs:cube/Z3_solver_cubeget_trail/Z3_solver_get_trailcongruence_root/Z3_solver_congruence_rootcongruence_next/Z3_solver_congruence_nextsolve_for/Z3_solver_solve_forset_initial_value/Z3_solver_set_initial_valueadd_simplifier/Z3_solver_add_simplifierregister_on_clause/Z3_solver_register_on_clauseto_dimacs/Z3_solver_to_dimacs_stringSeveral of these are also missing from z3-sys FFI bindings, blocking the Rust high-level from implementing them.
Available in: Python, Java, .NET, C++, Go
Missing in: Rust
Priority: Low (some of these are niche/advanced features)
Notes for Maintainers
prove-rs/z3.rs) remains the most incomplete binding, particularly for sequence operations and newer solver features.Beta Was this translation helpful? Give feedback.
All reactions