Portability | portable |
---|---|
Stability | provisional |
Maintainer | Richard Senington <sc06r2s@leeds.ac.uk> |
Safe Haskell | None |
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 SATProblem
- saveAsCNF :: FilePath -> SATProblem -> IO ()
Documentation
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.