addSoft method

int addSoft(
  1. AST a, {
  2. required Rat weight,
  3. required Sym id,
})

Implementation

int addSoft(AST a, {required Rat weight, required Sym id}) {
  final weightPtr = '$weight'.toNativeUtf8();
  try {
    return _c._z3.optimize_assert_soft(
      _optimize,
      _c._createAST(a),
      weightPtr.cast(),
      _c._createSymbol(id),
    );
  } finally {
    malloc.free(weightPtr);
  }
}