Skip to content

Commit 78d1139

Browse files
add shortcut to retrieve kind of application
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
1 parent 0ebea1c commit 78d1139

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/api/python/z3/z3.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,12 @@ def decl(self):
10731073
_z3_assert(is_app(self), "Z3 application expected")
10741074
return FuncDeclRef(Z3_get_app_decl(self.ctx_ref(), self.as_ast()), self.ctx)
10751075

1076-
1076+
def kind(self):
1077+
"""Return the Z3 internal kind of a function application."""
1078+
if z3_debug():
1079+
_z3_assert(is_app(self), "Z3 application expected")
1080+
return Z3_get_decl_kind(self.ctx_ref(), Z3_get_app_decl(self.ctx_ref(), self.ast))
1081+
10771082

10781083
def num_args(self):
10791084
"""Return the number of arguments of a Z3 application.

0 commit comments

Comments
 (0)