kdrag.utils.find_calls
- kdrag.utils.find_calls(decl: FuncDeclRef, t: ExprRef) list[ExprRef]
Find subterms that are calls of decl in t.
>>> f = smt.Function("f", smt.IntSort(), smt.IntSort()) >>> find_calls(f, f(f(4*f(3)) + 2)) [f(f(4*f(3)) + 2), f(4*f(3)), f(3)]
- Parameters:
decl (FuncDeclRef)
t (ExprRef)
- Return type:
list[ExprRef]