Repository navigation
[API Coherence] Report for 2026-10-05 - FuncDecl Parameter Introspection API #11054
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by API Coherence Checker. A newer discussion is available at Discussion #11070. |
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: FuncDecl Parameter Introspection API (new), plus re-verification spot-checks of 2 previously cached issues.
Total functions checked: 9 C API functions (
Z3_get_decl_num_parameters,Z3_get_decl_parameter_kind,Z3_get_decl_{int,double,symbol,sort,ast,func_decl,rational}_parameter) across 8 languages.Languages covered: C++, Python, .NET, Java, OCaml, TypeScript, Go, Rust.
Previously cached issues resolved: 0
New inconsistencies found: 2
Cached issues re-confirmed open: 2 (spot-check sample)
Resolution Updates
No previously cached issues were resolved since the last run (2026-10-04). All spot-checked issues remain open:
MkLinearOrder/MkPiecewiseLinearOrder/MkTreeOrder(still absent fromContext.cs)Z3_set_error_handlerregistration (still zero occurrences insrc/api/go/*.go, meaning any internal Z3 error crashes the process instead of raising a Go error)Progress
High Priority Issues
1. Go missing FuncDecl Parameter Introspection API entirely
What: The C API exposes
Z3_get_decl_num_parameters,Z3_get_decl_parameter_kind, and per-kind accessors (Z3_get_decl_int_parameter,_double_parameter,_symbol_parameter,_sort_parameter,_ast_parameter,_func_decl_parameter,_rational_parameter). These let callers introspect parameters attached to specially-constructed function declarations (e.g. special-relationspartial_order/linear_order, numeral-parameterized decls).Available in: C++ (
z3++.h:3046-3060,parameterclass), Python (z3.py:852-869,FuncDeclRef.params()), .NET (FuncDecl.csNumParameters/Parameters[]), Java (FuncDecl.java:139-147getNumParameters()/getParameters()), OCaml (z3.mli:411get_parameters), TypeScript (high-level.tsFuncDeclImpl.params())Missing in: Go —
src/api/go/*.gohas zero references to this function familySuggested fix: Add
FuncDecl.NumParameters(),FuncDecl.ParameterKind(idx), and typed accessors (or a singleFuncDecl.Parameters() []Parameterconvenience method mirroring the Java/.NET pattern) tosrc/api/go/z3.goPriority: High (core introspection capability, needed for special-relations and advanced datatype work)
Verified: Checked current codebase 2026-10-05
2. Go missing custom error handler registration (re-confirmed)
What: Go never calls
Z3_set_error_handler, so any internal Z3 error aborts the process instead of surfacing as a recoverable Go error.Available in: All other 7 language bindings install a custom error handler that converts Z3 errors into language-native exceptions/errors.
Missing in: Go
Suggested fix: Register a
Z3_set_error_handlercallback per context that captures the error code/message and returns it via Go's conventional(T, error)pattern.Priority: High (robustness — unrecoverable crashes vs. graceful error propagation)
Verified: Re-confirmed 2026-10-05 (originally found in earlier run)
Medium Priority Issues
3. Rust
z3crate FuncDecl missing params()/parameters() wrapperWhat:
func_decl.rsin the high-level Rust crate exposeskind(),name(),domain(),range(),arity(), but noparams()/parameters()method to readZ3_get_decl_*_parametervalues, even thoughz3-sysalready generates the raw FFI bindings (z3-sys/src/generated/functions.rs).Available in: C++, Python, .NET, Java, OCaml, TypeScript (see above)
Missing in: Rust (high-level crate only; low-level
z3-syshas the raw bindings)Suggested fix: Add a
FuncDecl::params(&self) -> Vec<Parameter>method (with aParameterenum mirroring theZ3_parameter_kindvariants) toz3/src/func_decl.rsPriority: Medium
Verified: Checked current codebase via GitHub MCP
get_file_contentsonprove-rs/z3.rsz3/src/func_decl.rs2026-10-05 (git clone still blocked with 403, 28th consecutive run)Low Priority Issues
(No new low-priority issues from this run; see full backlog of 44 pending issues in cache memory for previously identified low-priority gaps such as
Model.has_interpconvenience wrapper,Z3_params_validatewrapper for C++/Go.)Full Pending Backlog
44 issues are tracked cumulatively in cache memory across priorities (high/medium/low), spanning Go, C++, TypeScript, Rust, .NET, Java, and OCaml gaps identified over the course of ~87 analyzed API families. Highlights not re-detailed above (still open, re-verified in recent runs):
TupleSort,isItepredicate, Probe creation/comparison (MkProbe/ConstProbe/comparisons), quantifier pattern support inForAll/ExistsZ3_get_decl_kind/Z3_get_sort_kindwrappers (root cause of missing boolean predicates likeIsTrue/IsAnd),ASTVectorPush/Set/Resize/Translate,MkPattern,datatype_update_fieldZ3_mk_model,add_func_interp, etc.)Z3_mk_patternwrapper,Z3_global_param_getwrapperSimplifier,FiniteSet, logging wrappers,substitute_vars/substitute_funs,is_true/is_and/etc. predicate family,ParamDescrstypeFull details with file/line references are maintained in the persistent cache (
/tmp/gh-aw/cache-memory/api_coherence.json) for continuity across runs.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