def remove_duplicates_clauses(clauses): # tricky: store all z3 fmlas in list so not GC'd until all id's computed! z3fs = [(c, formula_to_z3(c)) for c in clauses.fmlas] return Clauses(list(ivy_utils.unique2((x, get_id(y)) for x, y in z3fs)), clauses.defs)
def remove_duplicates_clauses(clauses): # tricky: store all z3 fmlas in list so not GC'd until all id's computed! z3fs = [(c, formula_to_z3(c)) for c in clauses.fmlas] return Clauses(list(iu.unique2((x, get_id(y)) for x, y in z3fs)), clauses.defs)