setOnReduceApply method

void setOnReduceApply(
  1. AST? f(
    1. FuncDecl func,
    2. List<AST> args
    )?
)

Implementation

void setOnReduceApply(AST? Function(FuncDecl func, List<AST> args)? f) {
  if (f == null && _onReduceApply != null) {
    _c._z3.fixedpoint_set_reduce_app_callback(
      _fp,
      nullptr,
    );
    _onReduceApply = null;
  } else if (f != null && _onReduceApply == null) {
    _c._z3.fixedpoint_set_reduce_app_callback(
      _fp,
      Pointer.fromFunction<
          Void Function(
            Pointer<Void>,
            Z3_func_decl,
            UnsignedInt,
            Pointer<Z3_ast>,
            Pointer<Z3_ast>,
          )>(_onReduceApplyCallback),
    );
  }
  _onReduceApply = f;
}