3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-20 12:53:38 +00:00

merge with master branch

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-09-19 09:39:22 -07:00
commit 651587ce01
1602 changed files with 40496 additions and 27837 deletions

View file

@ -1530,7 +1530,7 @@ extern "C" {
In contrast to #Z3_mk_context_rc, the life time of Z3_ast objects
are determined by the scope level of #Z3_solver_push and #Z3_solver_pop.
In other words, a Z3_ast object remains valid until there is a
call to Z3_pop that takes the current scope below the level where
call to Z3_solver_pop that takes the current scope below the level where
the object was created.
Note that all other reference counted objects, including Z3_model,
@ -4680,6 +4680,14 @@ extern "C" {
/** @name Models */
/*@{*/
/**
\brief Create a fresh model object. It has reference count 0.
def_API('Z3_mk_model', MODEL, (_in(CONTEXT),))
*/
Z3_model Z3_API Z3_mk_model(Z3_context c);
/**
\brief Increment the reference counter of the given model.
@ -4850,6 +4858,26 @@ extern "C" {
*/
Z3_func_decl Z3_API Z3_get_as_array_func_decl(Z3_context c, Z3_ast a);
/**
\brief Create a fresh func_interp object, add it to a model for a specified function.
It has reference count 0.
\param c context
\param m model
\param f function declaration
\param default_value default value for function interpretation
def_API('Z3_add_func_interp', FUNC_INTERP, (_in(CONTEXT), _in(MODEL), _in(FUNC_DECL), _in(AST)))
*/
Z3_func_interp Z3_API Z3_add_func_interp(Z3_context c, Z3_model m, Z3_func_decl f, Z3_ast default_value);
/**
\brief Add a constant interpretation.
def_API('Z3_add_const_interp', VOID, (_in(CONTEXT), _in(MODEL), _in(FUNC_DECL), _in(AST)))
*/
void Z3_API Z3_add_const_interp(Z3_context c, Z3_model m, Z3_func_decl f, Z3_ast a);
/**
\brief Increment the reference counter of the given Z3_func_interp object.
@ -4897,6 +4925,16 @@ extern "C" {
*/
Z3_ast Z3_API Z3_func_interp_get_else(Z3_context c, Z3_func_interp f);
/**
\brief Return the 'else' value of the given function interpretation.
A function interpretation is represented as a finite map and an 'else' value.
This procedure can be used to update the 'else' value.
def_API('Z3_func_interp_set_else', VOID, (_in(CONTEXT), _in(FUNC_INTERP), _in(AST)))
*/
void Z3_API Z3_func_interp_set_else(Z3_context c, Z3_func_interp f, Z3_ast else_value);
/**
\brief Return the arity (number of arguments) of the given function interpretation.
@ -4904,6 +4942,22 @@ extern "C" {
*/
unsigned Z3_API Z3_func_interp_get_arity(Z3_context c, Z3_func_interp f);
/**
\brief add a function entry to a function interpretation.
\param c logical context
\param fi a function interpregation to be updated.
\param args list of arguments. They should be constant values (such as integers) and be of the same types as the domain of the function.
\param value value of the function when the parameters match args.
It is assumed that entries added to a function cover disjoint arguments.
If an two entries are added with the same arguments, only the second insertion survives and the
first inserted entry is removed.
def_API('Z3_func_interp_add_entry', VOID, (_in(CONTEXT), _in(FUNC_INTERP), _in(AST_VECTOR), _in(AST)))
*/
void Z3_API Z3_func_interp_add_entry(Z3_context c, Z3_func_interp fi, Z3_ast_vector args, Z3_ast value);
/**
\brief Increment the reference counter of the given Z3_func_entry object.