combinatorial-problems-0.0.3: A number of data structures to represent and allow the manipulation of standard combinatorial problems, used as test problems in computer science.

MaintainerRichard Senington <>



The loading routines for the Conjunctive Normal Form (cnf) styled files that can be found on the SATLIB website. Relies upon the CombinatorialOptimisation.SAT library for the data structures.



loadCNFFile :: FilePath -> IO SATProblemSource

Loading routine that takes the file path and returns a SATProblem. All variables will be set to false in the initial setup, and the truth values of all clauses set appropriately.

saveAsCNF :: FilePath -> SATProblem -> IO ()Source

Save routine for SATProblem, outputs back into SATLIB cnf format. The code (loadCNFFile f) >>= (saveAsCNF f) should have no effect upon the file. All information such as variable settings and the truth values of clauses is lost. To save extra information use standard prelude write file function with show. I will try to improve on that at some point.