mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 12:28:44 +00:00
Add 2 new API functions to get depth & groundness of exprs (#7479)
* Update api_ast.cpp * Update z3_api.h
This commit is contained in:
parent
f99e1ee581
commit
322dcec531
|
@ -425,6 +425,20 @@ extern "C" {
|
|||
RETURN_Z3(of_app(reinterpret_cast<app*>(a)));
|
||||
}
|
||||
|
||||
bool Z3_API Z3_is_ground(Z3_context c, Z3_ast a) {
|
||||
LOG_Z3_is_ground(c, a);
|
||||
RESET_ERROR_CODE();
|
||||
CHECK_IS_EXPR(a, 0);
|
||||
return is_ground(to_expr(a));
|
||||
}
|
||||
|
||||
unsigned Z3_API Z3_get_depth(Z3_context c, Z3_ast a) {
|
||||
LOG_Z3_get_depth(c, a);
|
||||
RESET_ERROR_CODE();
|
||||
CHECK_IS_EXPR(a, 0);
|
||||
return get_depth(to_expr(a));
|
||||
}
|
||||
|
||||
Z3_func_decl Z3_API Z3_to_func_decl(Z3_context c, Z3_ast a) {
|
||||
LOG_Z3_to_func_decl(c, a);
|
||||
RESET_ERROR_CODE();
|
||||
|
|
|
@ -4992,6 +4992,16 @@ extern "C" {
|
|||
*/
|
||||
bool Z3_API Z3_is_app(Z3_context c, Z3_ast a);
|
||||
|
||||
/**
|
||||
def_API('Z3_is_ground', BOOL, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
bool Z3_API Z3_is_ground(Z3_context c, Z3_ast a);
|
||||
|
||||
/**
|
||||
def_API('Z3_get_depth', UINT, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
unsigned Z3_API Z3_get_depth(Z3_context c, Z3_ast a);
|
||||
|
||||
/**
|
||||
def_API('Z3_is_numeral_ast', BOOL, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue