defineRecursiveFunc method
Define the body of a recursive function declared using RecursiveFunc.
Implementation
void defineRecursiveFunc(
RecursiveFunc decl,
AST body, [
List<Expr> args = const [],
]) {
final funcDecl = _createFuncDecl(decl);
final bodyAst = _createAST(body);
final argsPtr = calloc<Z3_ast>(args.length);
try {
for (var i = 0; i < args.length; i++) {
argsPtr[i] = _createAST(args[i]);
}
_z3.add_rec_def(
funcDecl,
args.length,
argsPtr,
bodyAst,
);
} finally {
malloc.free(argsPtr);
}
}