mirror of
https://github.com/Z3Prover/z3
synced 2025-06-20 12:53:38 +00:00
remove deprecated API functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c2108f74f1
commit
0f602d652a
13 changed files with 368 additions and 1772 deletions
770
src/api/z3_api.h
770
src/api/z3_api.h
|
@ -5318,16 +5318,6 @@ END_MLAPI_EXCLUDE
|
|||
*/
|
||||
void Z3_API Z3_set_error(Z3_context c, Z3_error_code e);
|
||||
|
||||
#ifdef Conly
|
||||
/**
|
||||
\brief Return a string describing the given error code.
|
||||
|
||||
\deprecated Use #Z3_get_error_msg_ex instead.
|
||||
|
||||
def_API('Z3_get_error_msg', STRING, (_in(ERROR_CODE),))
|
||||
*/
|
||||
Z3_string Z3_API Z3_get_error_msg(Z3_error_code err);
|
||||
#endif
|
||||
|
||||
BEGIN_MLAPI_EXCLUDE
|
||||
/**
|
||||
|
@ -7372,769 +7362,9 @@ END_MLAPI_EXCLUDE
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef CorML3
|
||||
|
||||
/**
|
||||
@name Deprecated Injective functions API
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
\brief Create injective function declaration
|
||||
|
||||
\deprecated This method just asserts a (universally quantified) formula that asserts that
|
||||
the new function is injective. It is compatible with the old interface for solving:
|
||||
#Z3_assert_cnstr, #Z3_check_assumptions, etc.
|
||||
|
||||
def_API('Z3_mk_injective_function', FUNC_DECL, (_in(CONTEXT), _in(SYMBOL), _in(UINT), _in_array(2, SORT), _in(SORT)))
|
||||
*/
|
||||
Z3_func_decl Z3_API Z3_mk_injective_function(
|
||||
Z3_context c,
|
||||
Z3_symbol s,
|
||||
unsigned domain_size, Z3_sort const domain[],
|
||||
Z3_sort range
|
||||
);
|
||||
|
||||
/*@}*/
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
@name Deprecated Constraints API
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
#ifdef CorML3
|
||||
/**
|
||||
\brief Set the SMTLIB logic to be used in the given logical context.
|
||||
It is incorrect to invoke this function after invoking
|
||||
#Z3_check, #Z3_check_and_get_model, #Z3_check_assumptions and #Z3_push.
|
||||
Return \c Z3_TRUE if the logic was changed successfully, and \c Z3_FALSE otherwise.
|
||||
|
||||
\deprecated Subsumed by #Z3_mk_solver_for_logic
|
||||
|
||||
def_API('Z3_set_logic', VOID, (_in(CONTEXT), _in(STRING)))
|
||||
*/
|
||||
Z3_bool Z3_API Z3_set_logic(Z3_context c, Z3_string logic);
|
||||
|
||||
/**
|
||||
\brief Create a backtracking point.
|
||||
|
||||
The logical context can be viewed as a stack of contexts. The
|
||||
scope level is the number of elements on this stack. The stack
|
||||
of contexts is simulated using trail (undo) stacks.
|
||||
|
||||
\sa Z3_pop
|
||||
|
||||
\deprecated Subsumed by #Z3_solver_push
|
||||
|
||||
def_API('Z3_push', VOID, (_in(CONTEXT),))
|
||||
*/
|
||||
void Z3_API Z3_push(Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Backtrack.
|
||||
|
||||
Restores the context from the top of the stack, and pops it off the
|
||||
stack. Any changes to the logical context (by #Z3_assert_cnstr or
|
||||
other functions) between the matching #Z3_push and \c Z3_pop
|
||||
operators are flushed, and the context is completely restored to
|
||||
what it was right before the #Z3_push.
|
||||
|
||||
\sa Z3_push
|
||||
|
||||
\deprecated Subsumed by #Z3_solver_pop
|
||||
|
||||
def_API('Z3_pop', VOID, (_in(CONTEXT), _in(UINT)))
|
||||
*/
|
||||
void Z3_API Z3_pop(Z3_context c, unsigned num_scopes);
|
||||
|
||||
/**
|
||||
\brief Retrieve the current scope level.
|
||||
|
||||
It retrieves the number of scopes that have been pushed, but not yet popped.
|
||||
|
||||
\sa Z3_push
|
||||
\sa Z3_pop
|
||||
|
||||
\deprecated Subsumed by #Z3_solver_get_num_scopes.
|
||||
|
||||
def_API('Z3_get_num_scopes', UINT, (_in(CONTEXT),))
|
||||
*/
|
||||
unsigned Z3_API Z3_get_num_scopes(Z3_context c);
|
||||
|
||||
/**
|
||||
\conly \brief Persist AST through num_scopes pops.
|
||||
\conly This function is only relevant if \c c was created using #Z3_mk_context.
|
||||
\conly If \c c was created using #Z3_mk_context_rc, this function is a NOOP.
|
||||
|
||||
\conly Normally, for contexts created using #Z3_mk_context,
|
||||
\conly references to terms are no longer valid when
|
||||
\conly popping scopes beyond the level where the terms are created.
|
||||
\conly If you want to reference a term below the scope where it
|
||||
\conly was created, use this method to specify how many pops
|
||||
\conly the term should survive.
|
||||
\conly The num_scopes should be at most equal to the number of
|
||||
\conly calls to Z3_push subtracted with the calls to Z3_pop.
|
||||
|
||||
\conly \deprecated Z3 users should move to #Z3_mk_context_rc and use the
|
||||
\conly reference counting APIs for managing AST nodes.
|
||||
|
||||
\mlonly \deprecated This function has no effect. \endmlonly
|
||||
|
||||
def_API('Z3_persist_ast', VOID, (_in(CONTEXT), _in(AST), _in(UINT)))
|
||||
*/
|
||||
void Z3_API Z3_persist_ast(Z3_context c, Z3_ast a, unsigned num_scopes);
|
||||
|
||||
/**
|
||||
\brief Assert a constraint into the logical context.
|
||||
|
||||
After one assertion, the logical context may become
|
||||
inconsistent.
|
||||
|
||||
The functions #Z3_check or #Z3_check_and_get_model should be
|
||||
used to check whether the logical context is consistent or not.
|
||||
|
||||
\sa Z3_check
|
||||
\sa Z3_check_and_get_model
|
||||
|
||||
\deprecated Subsumed by #Z3_solver_assert
|
||||
|
||||
def_API('Z3_assert_cnstr', VOID, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
void Z3_API Z3_assert_cnstr(Z3_context c, Z3_ast a);
|
||||
|
||||
/**
|
||||
\brief Check whether the given logical context is consistent or not.
|
||||
|
||||
If the logical context is not unsatisfiable (i.e., the return value is different from \c Z3_L_FALSE)
|
||||
and model construction is enabled (see #Z3_mk_config),
|
||||
\conly then a model is stored in \c m. Otherwise, the value \c NULL is stored in \c m.
|
||||
\mlonly then a valid model is returned. Otherwise, it is unsafe to use the returned model.\endmlonly
|
||||
\conly The caller is responsible for deleting the model using the function #Z3_del_model.
|
||||
|
||||
\conly \remark In contrast with the rest of the Z3 API, the reference counter of the
|
||||
\conly model is incremented. This is to guarantee backward compatibility. In previous
|
||||
\conly versions, models did not support reference counting.
|
||||
|
||||
\remark Model construction must be enabled using configuration
|
||||
parameters (See, #Z3_mk_config).
|
||||
|
||||
\sa Z3_check
|
||||
\conly \sa Z3_del_model
|
||||
|
||||
\deprecated Subsumed by #Z3_solver_check
|
||||
|
||||
def_API('Z3_check_and_get_model', INT, (_in(CONTEXT), _out(MODEL)))
|
||||
*/
|
||||
Z3_lbool Z3_API Z3_check_and_get_model(Z3_context c, Z3_model * m);
|
||||
|
||||
/**
|
||||
\brief Check whether the given logical context is consistent or not.
|
||||
|
||||
The function #Z3_check_and_get_model should be used when models are needed.
|
||||
|
||||
\sa Z3_check_and_get_model
|
||||
|
||||
\deprecated Subsumed by #Z3_solver_check
|
||||
|
||||
def_API('Z3_check', INT, (_in(CONTEXT),))
|
||||
*/
|
||||
Z3_lbool Z3_API Z3_check(Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Check whether the given logical context and optional assumptions is consistent or not.
|
||||
|
||||
If the logical context is not unsatisfiable (i.e., the return value is different from \c Z3_L_FALSE),
|
||||
\conly a non-NULL model argument is passed in,
|
||||
and model construction is enabled (see #Z3_mk_config),
|
||||
\conly then a model is stored in \c m. Otherwise, \c m is left unchanged.
|
||||
\mlonly then a valid model is returned. Otherwise, it is unsafe to use the returned model.\endmlonly
|
||||
\conly The caller is responsible for deleting the model using the function #Z3_del_model.
|
||||
|
||||
\conly \remark If the model argument is non-NULL, then model construction must be enabled using configuration
|
||||
\conly parameters (See, #Z3_mk_config).
|
||||
|
||||
\param c logical context.
|
||||
\param num_assumptions number of auxiliary assumptions.
|
||||
\param assumptions array of auxiliary assumptions
|
||||
\param m optional pointer to a model.
|
||||
\param proof optional pointer to a proof term.
|
||||
\param core_size size of unsatisfiable core.
|
||||
\param core pointer to an array receiving unsatisfiable core.
|
||||
The unsatisfiable core is a subset of the assumptions, so the array has the same size as the assumptions.
|
||||
The \c core array is not populated if \c core_size is set to 0.
|
||||
|
||||
\pre assumptions comprises of propositional literals.
|
||||
In other words, you cannot use compound formulas for assumptions,
|
||||
but should use propositional variables or negations of propositional variables.
|
||||
|
||||
\conly \remark In constrast with the rest of the Z3 API, the reference counter of the
|
||||
\conly model is incremented. This is to guarantee backward compatibility. In previous
|
||||
\conly versions, models did not support reference counting.
|
||||
|
||||
\sa Z3_check
|
||||
\conly \sa Z3_del_model
|
||||
|
||||
\deprecated Subsumed by #Z3_solver_check_assumptions
|
||||
|
||||
def_API('Z3_check_assumptions', INT, (_in(CONTEXT), _in(UINT), _in_array(1, AST), _out(MODEL), _out(AST), _out(UINT), _out_array2(1, 5, AST)))
|
||||
*/
|
||||
Z3_lbool Z3_API Z3_check_assumptions(
|
||||
Z3_context c,
|
||||
unsigned num_assumptions, Z3_ast const assumptions[],
|
||||
Z3_model * m, Z3_ast* proof,
|
||||
unsigned* core_size, Z3_ast core[]
|
||||
);
|
||||
#endif
|
||||
|
||||
#ifdef CorML4
|
||||
/**
|
||||
\brief Retrieve congruence class representatives for terms.
|
||||
|
||||
The function can be used for relying on Z3 to identify equal terms under the current
|
||||
set of assumptions. The array of terms and array of class identifiers should have
|
||||
the same length. The class identifiers are numerals that are assigned to the same
|
||||
value for their corresponding terms if the current context forces the terms to be
|
||||
equal. You cannot deduce that terms corresponding to different numerals must be all different,
|
||||
(especially when using non-convex theories).
|
||||
All implied equalities are returned by this call.
|
||||
This means that two terms map to the same class identifier if and only if
|
||||
the current context implies that they are equal.
|
||||
|
||||
A side-effect of the function is a satisfiability check on the assertions on the solver that is passed in.
|
||||
The function return Z3_L_FALSE if the current assertions are not satisfiable.
|
||||
|
||||
\sa Z3_check_and_get_model
|
||||
\sa Z3_check
|
||||
|
||||
\deprecated To be moved outside of API.
|
||||
|
||||
def_API('Z3_get_implied_equalities', INT, (_in(CONTEXT), _in(SOLVER), _in(UINT), _in_array(2, AST), _out_array(2, UINT)))
|
||||
*/
|
||||
Z3_lbool Z3_API Z3_get_implied_equalities(
|
||||
Z3_context c,
|
||||
Z3_solver s,
|
||||
unsigned num_terms,
|
||||
Z3_ast const terms[],
|
||||
unsigned class_ids[]
|
||||
);
|
||||
#endif
|
||||
|
||||
#ifdef CorML3
|
||||
/**
|
||||
\brief Delete a model object.
|
||||
|
||||
\sa Z3_check_and_get_model
|
||||
|
||||
\conly \remark The Z3_check_and_get_model automatically increments a reference count on the model.
|
||||
\conly The expected usage is that models created by that method are deleted using Z3_del_model.
|
||||
\conly This is for backwards compatibility and in contrast to the rest of the API where
|
||||
\conly callers are responsible for managing reference counts.
|
||||
|
||||
\deprecated Subsumed by Z3_solver API
|
||||
|
||||
def_API('Z3_del_model', VOID, (_in(CONTEXT), _in(MODEL)))
|
||||
*/
|
||||
void Z3_API Z3_del_model(Z3_context c, Z3_model m);
|
||||
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
@name Deprecated Search control API
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
\brief Cancel an ongoing check.
|
||||
|
||||
Notifies the current check to abort and return.
|
||||
This method should be called from a different thread
|
||||
than the one performing the check.
|
||||
|
||||
\deprecated Use #Z3_interrupt instead.
|
||||
|
||||
def_API('Z3_soft_check_cancel', VOID, (_in(CONTEXT), ))
|
||||
*/
|
||||
void Z3_API Z3_soft_check_cancel(Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Retrieve reason for search failure.
|
||||
|
||||
If a call to #Z3_check or #Z3_check_and_get_model returns Z3_L_UNDEF,
|
||||
use this facility to determine the more detailed cause of search failure.
|
||||
|
||||
\deprecated Subsumed by #Z3_solver_get_reason_unknown
|
||||
|
||||
def_API('Z3_get_search_failure', UINT, (_in(CONTEXT), ))
|
||||
*/
|
||||
Z3_search_failure Z3_API Z3_get_search_failure(Z3_context c);
|
||||
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
@name Deprecated Labels API
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
\brief Create a labeled formula.
|
||||
|
||||
\param c logical context.
|
||||
\param s name of the label.
|
||||
\param is_pos label polarity.
|
||||
\param f formula being labeled.
|
||||
|
||||
A label behaves as an identity function, so the truth value of the
|
||||
labeled formula is unchanged. Labels are used for identifying
|
||||
useful sub-formulas when generating counter-examples.
|
||||
|
||||
\deprecated Labels are only supported by the old Solver API.
|
||||
This feature is not essential (it can be simulated using auxiliary Boolean variables).
|
||||
It is only available for backward compatibility.
|
||||
|
||||
def_API('Z3_mk_label', AST, (_in(CONTEXT), _in(SYMBOL), _in(BOOL), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_label(Z3_context c, Z3_symbol s, Z3_bool is_pos, Z3_ast f);
|
||||
|
||||
/**
|
||||
\brief Retrieve the set of labels that were relevant in
|
||||
the context of the current satisfied context.
|
||||
|
||||
\sa Z3_del_literals
|
||||
\sa Z3_get_num_literals
|
||||
\sa Z3_get_label_symbol
|
||||
\sa Z3_get_literal
|
||||
|
||||
\deprecated This procedure is based on the old Solver API.
|
||||
|
||||
def_API('Z3_get_relevant_labels', LITERALS, (_in(CONTEXT), ))
|
||||
*/
|
||||
Z3_literals Z3_API Z3_get_relevant_labels(Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Retrieve the set of literals that satisfy the current context.
|
||||
|
||||
\sa Z3_del_literals
|
||||
\sa Z3_get_num_literals
|
||||
\sa Z3_get_label_symbol
|
||||
\sa Z3_get_literal
|
||||
|
||||
\deprecated This procedure is based on the old Solver API.
|
||||
|
||||
def_API('Z3_get_relevant_literals', LITERALS, (_in(CONTEXT), ))
|
||||
*/
|
||||
Z3_literals Z3_API Z3_get_relevant_literals(Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Retrieve the set of literals that whose assignment were
|
||||
guess, but not propagated during the search.
|
||||
|
||||
\sa Z3_del_literals
|
||||
\sa Z3_get_num_literals
|
||||
\sa Z3_get_label_symbol
|
||||
\sa Z3_get_literal
|
||||
|
||||
\deprecated This procedure is based on the old Solver API.
|
||||
|
||||
def_API('Z3_get_guessed_literals', LITERALS, (_in(CONTEXT), ))
|
||||
*/
|
||||
Z3_literals Z3_API Z3_get_guessed_literals(Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Delete a labels context.
|
||||
|
||||
\sa Z3_get_relevant_labels
|
||||
|
||||
\deprecated This procedure is based on the old Solver API.
|
||||
|
||||
def_API('Z3_del_literals', VOID, (_in(CONTEXT), _in(LITERALS)))
|
||||
*/
|
||||
void Z3_API Z3_del_literals(Z3_context c, Z3_literals lbls);
|
||||
|
||||
/**
|
||||
\brief Retrieve the number of label symbols that were returned.
|
||||
|
||||
\sa Z3_get_relevant_labels
|
||||
|
||||
\deprecated This procedure is based on the old Solver API.
|
||||
|
||||
def_API('Z3_get_num_literals', UINT, (_in(CONTEXT), _in(LITERALS)))
|
||||
*/
|
||||
unsigned Z3_API Z3_get_num_literals(Z3_context c, Z3_literals lbls);
|
||||
|
||||
/**
|
||||
\brief Retrieve label symbol at idx.
|
||||
|
||||
\deprecated This procedure is based on the old Solver API.
|
||||
|
||||
def_API('Z3_get_label_symbol', SYMBOL, (_in(CONTEXT), _in(LITERALS), _in(UINT)))
|
||||
*/
|
||||
Z3_symbol Z3_API Z3_get_label_symbol(Z3_context c, Z3_literals lbls, unsigned idx);
|
||||
|
||||
/**
|
||||
\brief Retrieve literal expression at idx.
|
||||
|
||||
\deprecated This procedure is based on the old Solver API.
|
||||
|
||||
def_API('Z3_get_literal', AST, (_in(CONTEXT), _in(LITERALS), _in(UINT)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_get_literal(Z3_context c, Z3_literals lbls, unsigned idx);
|
||||
|
||||
/**
|
||||
\brief Disable label.
|
||||
|
||||
The disabled label is not going to be used when blocking the subsequent search.
|
||||
|
||||
\sa Z3_block_literals
|
||||
|
||||
\deprecated This procedure is based on the old Solver API.
|
||||
|
||||
def_API('Z3_disable_literal', VOID, (_in(CONTEXT), _in(LITERALS), _in(UINT)))
|
||||
*/
|
||||
void Z3_API Z3_disable_literal(Z3_context c, Z3_literals lbls, unsigned idx);
|
||||
|
||||
/**
|
||||
\brief Block subsequent checks using the remaining enabled labels.
|
||||
|
||||
\deprecated This procedure is based on the old Solver API.
|
||||
|
||||
def_API('Z3_block_literals', VOID, (_in(CONTEXT), _in(LITERALS)))
|
||||
*/
|
||||
void Z3_API Z3_block_literals(Z3_context c, Z3_literals lbls);
|
||||
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
@name Deprecated Model API
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
\brief Return the number of constants assigned by the given model.
|
||||
|
||||
\mlonly \remark Consider using {!get_model_constants}. \endmlonly
|
||||
|
||||
\sa Z3_get_model_constant
|
||||
|
||||
\deprecated use #Z3_model_get_num_consts
|
||||
|
||||
def_API('Z3_get_model_num_constants', UINT, (_in(CONTEXT), _in(MODEL)))
|
||||
*/
|
||||
unsigned Z3_API Z3_get_model_num_constants(Z3_context c, Z3_model m);
|
||||
|
||||
/**
|
||||
\brief \mlh get_model_constant c m i \endmlh
|
||||
Return the i-th constant in the given model.
|
||||
|
||||
\mlonly \remark Consider using {!get_model_constants}. \endmlonly
|
||||
|
||||
\pre i < Z3_get_model_num_constants(c, m)
|
||||
|
||||
\deprecated use #Z3_model_get_const_decl
|
||||
|
||||
def_API('Z3_get_model_constant', FUNC_DECL, (_in(CONTEXT), _in(MODEL), _in(UINT)))
|
||||
*/
|
||||
Z3_func_decl Z3_API Z3_get_model_constant(Z3_context c, Z3_model m, unsigned i);
|
||||
|
||||
/**
|
||||
\brief Return the number of function interpretations in the given model.
|
||||
|
||||
A function interpretation is represented as a finite map and an 'else' value.
|
||||
Each entry in the finite map represents the value of a function given a set of arguments.
|
||||
|
||||
\deprecated use #Z3_model_get_num_funcs
|
||||
|
||||
def_API('Z3_get_model_num_funcs', UINT, (_in(CONTEXT), _in(MODEL)))
|
||||
*/
|
||||
unsigned Z3_API Z3_get_model_num_funcs(Z3_context c, Z3_model m);
|
||||
|
||||
/**
|
||||
\brief \mlh get_model_func_decl c m i \endmlh
|
||||
Return the declaration of the i-th function in the given model.
|
||||
|
||||
\pre i < Z3_get_model_num_funcs(c, m)
|
||||
|
||||
\sa Z3_get_model_num_funcs
|
||||
|
||||
\deprecated use #Z3_model_get_func_decl
|
||||
|
||||
def_API('Z3_get_model_func_decl', FUNC_DECL, (_in(CONTEXT), _in(MODEL), _in(UINT)))
|
||||
*/
|
||||
Z3_func_decl Z3_API Z3_get_model_func_decl(Z3_context c, Z3_model m, unsigned i);
|
||||
|
||||
/**
|
||||
\brief Return the value of the given constant or function
|
||||
in the given model.
|
||||
|
||||
\deprecated Consider using #Z3_model_eval or #Z3_model_get_func_interp
|
||||
|
||||
def_API('Z3_eval_func_decl', BOOL, (_in(CONTEXT), _in(MODEL), _in(FUNC_DECL), _out(AST)))
|
||||
*/
|
||||
Z3_bool Z3_API Z3_eval_func_decl(Z3_context c, Z3_model m, Z3_func_decl decl, Z3_ast* v);
|
||||
|
||||
/**
|
||||
\brief \mlh is_array_value c v \endmlh
|
||||
Determine whether the term encodes an array value.
|
||||
A term encodes an array value if it is a nested sequence of
|
||||
applications of store on top of a constant array.
|
||||
The indices to the stores have to be values (for example, integer constants)
|
||||
so that equality between the indices can be evaluated.
|
||||
Array values are useful for representing interpretations for arrays.
|
||||
|
||||
Return the number of entries mapping to non-default values of the array.
|
||||
|
||||
\deprecated Use #Z3_is_as_array
|
||||
|
||||
def_API('Z3_is_array_value', BOOL, (_in(CONTEXT), _in(MODEL), _in(AST), _out(UINT)))
|
||||
*/
|
||||
Z3_bool Z3_API Z3_is_array_value(Z3_context c, Z3_model m, Z3_ast v, unsigned* num_entries);
|
||||
|
||||
/**
|
||||
\brief \mlh get_array_value c v \endmlh
|
||||
An array values is represented as a dictionary plus a
|
||||
default (else) value. This function returns the array graph.
|
||||
|
||||
\pre Z3_TRUE == Z3_is_array_value(c, v, &num_entries)
|
||||
|
||||
\deprecated Use Z3_func_interp objects and #Z3_get_as_array_func_decl
|
||||
|
||||
def_API('Z3_get_array_value', VOID, (_in(CONTEXT), _in(MODEL), _in(AST), _in(UINT), _out_array(3, AST), _out_array(3, AST), _out (AST)))
|
||||
*/
|
||||
void Z3_API Z3_get_array_value(Z3_context c,
|
||||
Z3_model m,
|
||||
Z3_ast v,
|
||||
unsigned num_entries,
|
||||
Z3_ast indices[],
|
||||
Z3_ast values[],
|
||||
Z3_ast* else_value
|
||||
);
|
||||
|
||||
/**
|
||||
\brief \mlh get_model_func_else c m i \endmlh
|
||||
Return the 'else' value of the i-th function interpretation in the given model.
|
||||
|
||||
A function interpretation is represented as a finite map and an 'else' value.
|
||||
|
||||
\mlonly \remark Consider using {!get_model_funcs}. \endmlonly
|
||||
|
||||
\pre i < Z3_get_model_num_funcs(c, m)
|
||||
|
||||
\sa Z3_get_model_num_funcs
|
||||
\sa Z3_get_model_func_num_entries
|
||||
\sa Z3_get_model_func_entry_num_args
|
||||
\sa Z3_get_model_func_entry_arg
|
||||
|
||||
\deprecated Use Z3_func_interp objects
|
||||
|
||||
def_API('Z3_get_model_func_else', AST, (_in(CONTEXT), _in(MODEL), _in(UINT)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_get_model_func_else(Z3_context c, Z3_model m, unsigned i);
|
||||
|
||||
/**
|
||||
\brief \mlh get_model_func_num_entries c m i \endmlh
|
||||
Return the number of entries of the i-th function interpretation in the given model.
|
||||
|
||||
A function interpretation is represented as a finite map and an 'else' value.
|
||||
|
||||
\mlonly \remark Consider using {!get_model_funcs}. \endmlonly
|
||||
|
||||
\pre i < Z3_get_model_num_funcs(c, m)
|
||||
|
||||
\sa Z3_get_model_num_funcs
|
||||
\sa Z3_get_model_func_else
|
||||
\sa Z3_get_model_func_entry_num_args
|
||||
\sa Z3_get_model_func_entry_arg
|
||||
|
||||
\deprecated Use Z3_func_interp objects
|
||||
|
||||
def_API('Z3_get_model_func_num_entries', UINT, (_in(CONTEXT), _in(MODEL), _in(UINT)))
|
||||
*/
|
||||
unsigned Z3_API Z3_get_model_func_num_entries(Z3_context c, Z3_model m, unsigned i);
|
||||
|
||||
/**
|
||||
\brief \mlh get_model_func_entry_num_args c m i j \endmlh
|
||||
Return the number of arguments of the j-th entry of the i-th function interpretation in the given
|
||||
model.
|
||||
|
||||
A function interpretation is represented as a finite map and an 'else' value.
|
||||
This function returns the j-th entry of this map.
|
||||
|
||||
An entry represents the value of a function given a set of arguments.
|
||||
\conly That is: it has the following format <tt>f(args[0],...,args[num_args - 1]) = val</tt>.
|
||||
|
||||
\mlonly \remark Consider using {!get_model_funcs}. \endmlonly
|
||||
|
||||
\pre i < Z3_get_model_num_funcs(c, m)
|
||||
\pre j < Z3_get_model_func_num_entries(c, m, i)
|
||||
|
||||
\sa Z3_get_model_num_funcs
|
||||
\sa Z3_get_model_func_num_entries
|
||||
\sa Z3_get_model_func_entry_arg
|
||||
|
||||
\deprecated Use Z3_func_interp objects
|
||||
|
||||
def_API('Z3_get_model_func_entry_num_args', UINT, (_in(CONTEXT), _in(MODEL), _in(UINT), _in(UINT)))
|
||||
*/
|
||||
unsigned Z3_API Z3_get_model_func_entry_num_args(Z3_context c,
|
||||
Z3_model m,
|
||||
unsigned i,
|
||||
unsigned j);
|
||||
|
||||
/**
|
||||
\brief \mlh get_model_func_entry_arg c m i j k \endmlh
|
||||
Return the k-th argument of the j-th entry of the i-th function interpretation in the given
|
||||
model.
|
||||
|
||||
A function interpretation is represented as a finite map and an 'else' value.
|
||||
This function returns the j-th entry of this map.
|
||||
|
||||
An entry represents the value of a function given a set of arguments.
|
||||
\conly That is: it has the following format <tt>f(args[0],...,args[num_args - 1]) = val</tt>.
|
||||
|
||||
\mlonly \remark Consider using {!get_model_funcs}. \endmlonly
|
||||
|
||||
\pre i < Z3_get_model_num_funcs(c, m)
|
||||
\pre j < Z3_get_model_func_num_entries(c, m, i)
|
||||
\pre k < Z3_get_model_func_entry_num_args(c, m, i, j)
|
||||
|
||||
\sa Z3_get_model_num_funcs
|
||||
\sa Z3_get_model_func_num_entries
|
||||
\sa Z3_get_model_func_entry_num_args
|
||||
|
||||
\deprecated Use Z3_func_interp objects
|
||||
|
||||
def_API('Z3_get_model_func_entry_arg', AST, (_in(CONTEXT), _in(MODEL), _in(UINT), _in(UINT), _in(UINT)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_get_model_func_entry_arg(Z3_context c,
|
||||
Z3_model m,
|
||||
unsigned i,
|
||||
unsigned j,
|
||||
unsigned k);
|
||||
|
||||
/**
|
||||
\brief \mlh get_model_func_entry_value c m i j \endmlh
|
||||
Return the return value of the j-th entry of the i-th function interpretation in the given
|
||||
model.
|
||||
|
||||
A function interpretation is represented as a finite map and an 'else' value.
|
||||
This function returns the j-th entry of this map.
|
||||
|
||||
An entry represents the value of a function given a set of arguments.
|
||||
\conly That is: it has the following format <tt>f(args[0],...,args[num_args - 1]) = val</tt>.
|
||||
|
||||
\mlonly \remark Consider using {!get_model_funcs}. \endmlonly
|
||||
|
||||
\pre i < Z3_get_model_num_funcs(c, m)
|
||||
\pre j < Z3_get_model_func_num_entries(c, m, i)
|
||||
|
||||
\sa Z3_get_model_num_funcs
|
||||
\sa Z3_get_model_func_num_entries
|
||||
|
||||
\deprecated Use Z3_func_interp objects
|
||||
|
||||
def_API('Z3_get_model_func_entry_value', AST, (_in(CONTEXT), _in(MODEL), _in(UINT), _in(UINT)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_get_model_func_entry_value(Z3_context c,
|
||||
Z3_model m,
|
||||
unsigned i,
|
||||
unsigned j);
|
||||
|
||||
/**
|
||||
\brief \mlh eval c m t \endmlh
|
||||
Evaluate the AST node \c t in the given model.
|
||||
\conly Return \c Z3_TRUE if succeeded, and store the result in \c v.
|
||||
\mlonly Return a pair: Boolean and value. The Boolean is true if the term was successfully evaluated. \endmlonly
|
||||
|
||||
The evaluation may fail for the following reasons:
|
||||
|
||||
- \c t contains a quantifier.
|
||||
|
||||
- the model \c m is partial, that is, it doesn't have a complete interpretation for uninterpreted functions.
|
||||
That is, the option <tt>MODEL_PARTIAL=true</tt> was used.
|
||||
|
||||
- \c t is type incorrect.
|
||||
|
||||
\deprecated Use #Z3_model_eval
|
||||
|
||||
def_API('Z3_eval', BOOL, (_in(CONTEXT), _in(MODEL), _in(AST), _out(AST)))
|
||||
*/
|
||||
Z3_bool Z3_API Z3_eval(Z3_context c, Z3_model m, Z3_ast t, Z3_ast * v);
|
||||
|
||||
/**
|
||||
\brief Evaluate declaration given values.
|
||||
|
||||
Provides direct way to evaluate declarations
|
||||
without going over terms.
|
||||
|
||||
\deprecated Consider using #Z3_model_eval and #Z3_substitute_vars
|
||||
|
||||
def_API('Z3_eval_decl', BOOL, (_in(CONTEXT), _in(MODEL), _in(FUNC_DECL), _in(UINT), _in_array(3, AST), _out(AST)))
|
||||
*/
|
||||
Z3_bool Z3_API Z3_eval_decl(Z3_context c, Z3_model m,
|
||||
Z3_func_decl d,
|
||||
unsigned num_args,
|
||||
Z3_ast const args[],
|
||||
Z3_ast* v);
|
||||
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
@name Deprecated String conversion API
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
\brief Convert the given logical context into a string.
|
||||
|
||||
This function is mainly used for debugging purposes. It displays
|
||||
the internal structure of a logical context.
|
||||
|
||||
\conly \warning The result buffer is statically allocated by Z3. It will
|
||||
\conly be automatically deallocated when #Z3_del_context is invoked.
|
||||
\conly So, the buffer is invalidated in the next call to \c Z3_context_to_string.
|
||||
|
||||
\deprecated This method is obsolete. It just displays the internal representation of
|
||||
the global solver available for backward compatibility reasons.
|
||||
|
||||
def_API('Z3_context_to_string', STRING, (_in(CONTEXT),))
|
||||
*/
|
||||
Z3_string Z3_API Z3_context_to_string(Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Return runtime statistics as a string.
|
||||
|
||||
This function is mainly used for debugging purposes. It displays
|
||||
statistics of the search activity.
|
||||
|
||||
\conly \warning The result buffer is statically allocated by Z3. It will
|
||||
\conly be automatically deallocated when #Z3_del_context is invoked.
|
||||
\conly So, the buffer is invalidated in the next call to \c Z3_context_to_string.
|
||||
|
||||
\deprecated This method is based on the old solver API.
|
||||
Use #Z3_stats_to_string when using the new solver API.
|
||||
|
||||
def_API('Z3_statistics_to_string', STRING, (_in(CONTEXT),))
|
||||
*/
|
||||
Z3_string Z3_API Z3_statistics_to_string(Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Extract satisfying assignment from context as a conjunction.
|
||||
|
||||
This function can be used for debugging purposes. It returns a conjunction
|
||||
of formulas that are assigned to true in the current context.
|
||||
This conjunction will contain not only the assertions that are set to true
|
||||
under the current assignment, but will also include additional literals
|
||||
if there has been a call to #Z3_check or #Z3_check_and_get_model.
|
||||
|
||||
\deprecated This method is based on the old solver API.
|
||||
|
||||
def_API('Z3_get_context_assignment', AST, (_in(CONTEXT),))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_get_context_assignment(Z3_context c);
|
||||
|
||||
/*@}*/
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef CAMLIDL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue