mios-1.4.0: A Minisat-based SAT solver in Haskell
SAT.Mios.Util.DIMACS.Reader
Contents
Description
Read a CNF file without haskell-platform
Synopsis
fromFile :: FilePath -> IO (Maybe ((Int, Int), [[Int]])) Source #
read a CNF file and return: ((numbefOfVariables, numberOfClauses), [Literal])
>>> fromFile "acnf" ((3, 4), [[1, 2], [-2, 3], [-1, 2, -3], [3]]
>>>
fromFile "acnf"
clauseListFromFile :: FilePath -> IO [[Int]] Source #
return clauses as [[Int]] from file
file
>>> clauseListFromFile "a.cnf" [[1, 2], [-2, 3], [-1, 2, -3], [3]]
clauseListFromFile "a.cnf"