Z3
 
Loading...
Searching...
No Matches
array.go
Go to the documentation of this file.
1package z3
2
3/*
4#include "z3.h"
5#include <stdlib.h>
6*/
7import "C"
8
9// Array operations and sorts
10
11// MkArraySort creates an array sort.
12func (c *Context) MkArraySort(domain, range_ *Sort) *Sort {
13 return newSort(c, C.Z3_mk_array_sort(c.ptr, domain.ptr, range_.ptr))
14}
15
16// MkSelect creates an array read (select) operation.
17func (c *Context) MkSelect(array, index *Expr) *Expr {
18 return newExpr(c, C.Z3_mk_select(c.ptr, array.ptr, index.ptr))
19}
20
21// MkStore creates an array write (store) operation.
22func (c *Context) MkStore(array, index, value *Expr) *Expr {
23 return newExpr(c, C.Z3_mk_store(c.ptr, array.ptr, index.ptr, value.ptr))
24}
25
26// MkConstArray creates a constant array.
27func (c *Context) MkConstArray(sort *Sort, value *Expr) *Expr {
28 return newExpr(c, C.Z3_mk_const_array(c.ptr, sort.ptr, value.ptr))
29}