toysolver-0.6.0: Assorted decision procedures for SAT, SMT, Max-SAT, PB, MIP, etc

Copyright(c) Masahiro Sakai 2012
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ToySolver.Text.WCNF

Contents

Description

Deprecated: Use ToySolver.FileFormat.CNF instead

Synopsis

Documentation

data WCNF Source #

WCNF format for representing partial weighted Max-SAT problems.

This format is used for for MAX-SAT evaluations.

References:

Constructors

WCNF 

Fields

Instances
Eq WCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Methods

(==) :: WCNF -> WCNF -> Bool #

(/=) :: WCNF -> WCNF -> Bool #

Ord WCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Methods

compare :: WCNF -> WCNF -> Ordering #

(<) :: WCNF -> WCNF -> Bool #

(<=) :: WCNF -> WCNF -> Bool #

(>) :: WCNF -> WCNF -> Bool #

(>=) :: WCNF -> WCNF -> Bool #

max :: WCNF -> WCNF -> WCNF #

min :: WCNF -> WCNF -> WCNF #

Read WCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Show WCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Methods

showsPrec :: Int -> WCNF -> ShowS #

show :: WCNF -> String #

showList :: [WCNF] -> ShowS #

FileFormat WCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

type WeightedClause = (Weight, PackedClause) Source #

Weighted clauses

type Weight = Integer Source #

Weigths must be greater than or equal to 1, and smaller than 2^63.

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.

Generating .wcnf files

writeFile :: (FileFormat a, MonadIO m) => FilePath -> a -> m () Source #

Write a value into a file.

hPutWCNF :: Handle -> WCNF -> IO () Source #

Output a WCNF to a Handle.