updateTerm<A extends Expr> method

A updateTerm<A extends Expr>(
  1. A expr,
  2. List<Expr> args
)

Updates the arguments of an App, Lambda, Exists, or Forall.

Implementation

A updateTerm<A extends Expr>(A expr, List<Expr> args) {
  final argsPtr = calloc<Z3_ast>(args.length);
  try {
    for (var i = 0; i < args.length; i++) {
      argsPtr[i] = _createAST(args[i]);
    }
    final result = _z3.update_term(_createAST(expr), args.length, argsPtr);
    return _getAST(result) as A;
  } finally {
    malloc.free(argsPtr);
  }
}