mios-1.6.2: A Minisat-based CDCL SAT solver in Haskell

Safe HaskellSafe
LanguageHaskell2010

SAT.Mios.Util.DIMACS.Writer

Contents

Description

Write SAT data to DIMACS file

Synopsis

Interface

toFile :: FilePath -> [[Int]] -> IO () Source #

Write the DIMACS to file f, using toDIMACSString

toDIMACSString :: [[Int]] -> String Source #

Convert [Clause] to String, where Clause is [Int]

>>> toDIMACSString []
"p cnf 0 0\n"
>>> toDIMACSString [[-1, 2], [-3, -4]]
"p cnf 4 2\n-1 2 0\n-3 -4 0\n"
>>> toDIMACSString [[1], [-2], [-3, -4], [1,2,3,4]]
"p cnf 4 4\n1 0\n-2 0\n-3 -4 0\n1 2 3 4 0\n"

toString :: [[Int]] -> String -> String -> String Source #

converts [[Int]] to a String

toLatexString :: [[Int]] -> String Source #

converts [[Int]] to a LaTeX expression