From c250209a3f1e11317280ec956a64f8558526e99e Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Mon, 16 Dec 2024 12:12:24 +0000 Subject: [PATCH] Update api_ast.cpp --- src/api/api_ast.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/api/api_ast.cpp b/src/api/api_ast.cpp index ecbf86b37..b220443bc 100644 --- a/src/api/api_ast.cpp +++ b/src/api/api_ast.cpp @@ -425,6 +425,20 @@ extern "C" { RETURN_Z3(of_app(reinterpret_cast(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();