mirror of
https://github.com/Z3Prover/z3
synced 2026-06-19 23:26:30 +00:00
Fix high and medium priority API coherence issues (Go, Java, C++, TypeScript) (#8983)
* Initial plan * Add missing API functions to Go, Java, C++, and TypeScript bindings Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
b8e15f2121
commit
21bfb115ea
9 changed files with 337 additions and 0 deletions
|
|
@ -70,3 +70,17 @@ func (c *Context) MkArrayExt(a1, a2 *Expr) *Expr {
|
|||
func (c *Context) MkAsArray(f *FuncDecl) *Expr {
|
||||
return newExpr(c, C.Z3_mk_as_array(c.ptr, f.ptr))
|
||||
}
|
||||
|
||||
// MkMap applies a function to the elements of one or more arrays, returning a new array.
|
||||
// The function f is applied element-wise to the given arrays.
|
||||
func (c *Context) MkMap(f *FuncDecl, arrays ...*Expr) *Expr {
|
||||
cArrays := make([]C.Z3_ast, len(arrays))
|
||||
for i, a := range arrays {
|
||||
cArrays[i] = a.ptr
|
||||
}
|
||||
var cArraysPtr *C.Z3_ast
|
||||
if len(cArrays) > 0 {
|
||||
cArraysPtr = &cArrays[0]
|
||||
}
|
||||
return newExpr(c, C.Z3_mk_map(c.ptr, f.ptr, C.uint(len(arrays)), cArraysPtr))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue