build method

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

Implementation

@override
Z3_ast build(Context c) {
  final argsPtr = malloc<Z3_ast>(args.length);
  final coeffsPtr = malloc<Int>(args.length);
  try {
    int i = 0;
    for (final MapEntry(:key, :value) in args.entries) {
      argsPtr[i] = c._createAST(key);
      coeffsPtr[i] = value;
      ++i;
    }
    final result = c._z3.mk_pbeq(
      args.length,
      argsPtr,
      coeffsPtr,
      k,
    );
    return result;
  } finally {
    malloc.free(argsPtr);
    malloc.free(coeffsPtr);
  }
}