mirror of
https://github.com/Z3Prover/z3
synced 2025-04-26 02:25:32 +00:00
additional array functions exposed over API, ping #1223
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
d76566bf83
commit
c9f540b066
13 changed files with 354 additions and 72 deletions
|
@ -1881,6 +1881,17 @@ extern "C" {
|
|||
*/
|
||||
Z3_sort Z3_API Z3_mk_array_sort(Z3_context c, Z3_sort domain, Z3_sort range);
|
||||
|
||||
/**
|
||||
\brief Create an array type with N arguments
|
||||
|
||||
\sa Z3_mk_select_n
|
||||
\sa Z3_mk_store_n
|
||||
|
||||
def_API('Z3_mk_array_sort_n', SORT, (_in(CONTEXT), _in(UINT), _in_array(1, SORT), _in(SORT)))
|
||||
*/
|
||||
Z3_sort Z3_API Z3_mk_array_sort_n(Z3_context c, unsigned n, Z3_sort const * domain, Z3_sort range);
|
||||
|
||||
|
||||
/**
|
||||
\brief Create a tuple type.
|
||||
|
||||
|
@ -2973,6 +2984,15 @@ extern "C" {
|
|||
*/
|
||||
Z3_ast Z3_API Z3_mk_select(Z3_context c, Z3_ast a, Z3_ast i);
|
||||
|
||||
/**
|
||||
\brief n-ary Array read.
|
||||
The argument \c a is the array and \c idxs are the indices of the array that gets read.
|
||||
|
||||
def_API('Z3_mk_select_n', AST, (_in(CONTEXT), _in(AST), _in(UINT), _in_array(2, AST)))
|
||||
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_select_n(Z3_context c, Z3_ast a, unsigned n, Z3_ast const* idxs);
|
||||
|
||||
/**
|
||||
\brief Array update.
|
||||
|
||||
|
@ -2991,6 +3011,14 @@ extern "C" {
|
|||
*/
|
||||
Z3_ast Z3_API Z3_mk_store(Z3_context c, Z3_ast a, Z3_ast i, Z3_ast v);
|
||||
|
||||
/**
|
||||
\brief n-ary Array update.
|
||||
|
||||
def_API('Z3_mk_store_n', AST, (_in(CONTEXT), _in(AST), _in(UINT), _in_array(2, AST), _in(AST)))
|
||||
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_store_n(Z3_context c, Z3_ast a, unsigned n, Z3_ast const* idxs, Z3_ast v);
|
||||
|
||||
/**
|
||||
\brief Create the constant array.
|
||||
|
||||
|
@ -3031,6 +3059,15 @@ extern "C" {
|
|||
def_API('Z3_mk_array_default', AST, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_array_default(Z3_context c, Z3_ast array);
|
||||
|
||||
/**
|
||||
\brief Create array with the same interpretation as a function.
|
||||
The array satisfies the property (f x) = (select (_ as-array f) x)
|
||||
for every argument x.
|
||||
|
||||
def_API('Z3_mk_as_array', AST, (_in(CONTEXT), _in(FUNC_DECL)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_as_array(Z3_context c, Z3_func_decl f);
|
||||
/*@}*/
|
||||
|
||||
/** @name Sets */
|
||||
|
@ -3854,6 +3891,7 @@ extern "C" {
|
|||
|
||||
/**
|
||||
\brief Return the domain of the given array sort.
|
||||
In the case of a multi-dimensional array, this function returns the sort of the first dimension.
|
||||
|
||||
\pre Z3_get_sort_kind(c, t) == Z3_ARRAY_SORT
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue