Skip to content

Commit

Permalink
add shortcut to retrieve kind of application
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <[email protected]>
  • Loading branch information
NikolajBjorner committed Oct 22, 2024
1 parent 0ebea1c commit 78d1139
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/api/python/z3/z3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,12 @@ def decl(self):
_z3_assert(is_app(self), "Z3 application expected")
return FuncDeclRef(Z3_get_app_decl(self.ctx_ref(), self.as_ast()), self.ctx)


def kind(self):
"""Return the Z3 internal kind of a function application."""
if z3_debug():
_z3_assert(is_app(self), "Z3 application expected")
return Z3_get_decl_kind(self.ctx_ref(), Z3_get_app_decl(self.ctx_ref(), self.ast))


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

0 comments on commit 78d1139

Please sign in to comment.