build method

  1. @override
Z3_ast build(
  1. Context c
)
override

Implementation

@override
Z3_ast build(Context c) {
  if (_cached != null) {
    return _context!._translateTo(c, this, _cached!);
  }
  final argsPtr = calloc<Z3_ast>(args.length);
  try {
    for (var i = 0; i < args.length; i++) {
      argsPtr[i] = c._createAST(args[i]);
    }
    final result = c._z3.mk_app(
      c._createFuncDecl(decl),
      args.length,
      argsPtr,
    );
    return result.cast();
  } finally {
    malloc.free(argsPtr);
  }
}