netom / satispy

An interface to SAT solver tools (like minisat)
Other
58 stars 17 forks source link

Use `frozenset` for `Cnf.dis` #8

Closed costas-basdekis closed 8 years ago

costas-basdekis commented 8 years ago

So that we can compare two Cnfs, and have them being equal, regardless of the order of operations that where applied:

The test introduced at bf755df in this PR fails:

>>> (v1 & v2) == (v2 & v1)
False

But the conversion to frozenset rectifies that:

>>> (v1 & v2) == (v2 & v1)
True
netom commented 8 years ago

Thank you!