Copyright | (c) Masahiro Sakai 2012 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Deprecated: Use ToySolver.FileFormat.CNF instead
Synopsis
- data WCNF = WCNF {
- wcnfNumVars :: !Int
- wcnfNumClauses :: !Int
- wcnfTopCost :: !Weight
- wcnfClauses :: [WeightedClause]
- type WeightedClause = (Weight, PackedClause)
- type Weight = Integer
- parseFile :: (FileFormat a, MonadIO m) => FilePath -> m (Either String a)
- parseByteString :: ByteString -> Either String WCNF
- writeFile :: (FileFormat a, MonadIO m) => FilePath -> a -> m ()
- hPutWCNF :: Handle -> WCNF -> IO ()
- wcnfBuilder :: WCNF -> Builder
Documentation
WCNF format for representing partial weighted Max-SAT problems.
This format is used for for MAX-SAT evaluations.
References:
WCNF | |
|
type WeightedClause = (Weight, PackedClause) Source #
Weighted clauses
Parsing .cnf/.wcnf files
parseFile :: (FileFormat a, MonadIO m) => FilePath -> m (Either String a) Source #
Parse a file but returns an error message when parsing fails.
parseByteString :: ByteString -> Either String WCNF Source #
Parse a WCNF file but returns an error message when parsing fails.