Untitled
unknown
plain_text
4 years ago
480 B
4
Indexable
def clean(clause_set, partial_assignment):
for clause in clause_set:
for literal in partial_assignment:
negated_literal = -1 * literal
# If literal in clause, remove the clause
if literal in clause:
clause_set.remove(clause)
# If negated literal is in the clause, remove the negated literal
if negated_literal in clause:
clause.remove(negated_literal)
return clause_setEditor is loading...