toysolver-0.8.1: Assorted decision procedures for SAT, SMT, Max-SAT, PB, MIP, etc
Copyright(c) Masahiro Sakai 2016-2018
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010
Extensions
  • BangPatterns
  • OverloadedStrings

ToySolver.FileFormat.CNF

Description

Reader and Writer for DIMACS CNF and family of similar formats.

Synopsis

FileFormat class

CNF format

data CNF Source #

DIMACS CNF format

Constructors

CNF 

Fields

Instances

Instances details
Read CNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Show CNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Methods

showsPrec :: Int -> CNF -> ShowS #

show :: CNF -> String #

showList :: [CNF] -> ShowS #

Eq CNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Methods

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

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

Ord CNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Methods

compare :: CNF -> CNF -> Ordering #

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

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

(>) :: CNF -> CNF -> Bool #

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

max :: CNF -> CNF -> CNF #

min :: CNF -> CNF -> CNF #

FileFormat CNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

WCNF formats

(Old) WCNF format

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

Instances details
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 #

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 #

FileFormat WCNF Source #

Note that parse also accepts new WCNF files and (unweighted) CNF files and converts them into WCNF.

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.

New WCNF format

newtype NewWCNF Source #

New WCNF file format

This format is used for for MAX-SAT evaluations >=2020.

References:

Constructors

NewWCNF 

Fields

Instances

Instances details
Read NewWCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Show NewWCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Eq NewWCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Methods

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

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

Ord NewWCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

FileFormat NewWCNF Source #

Note that parse also accepts (old) WCNF files and (unweighted) CNF files and converts them into NewWCNF.

Instance details

Defined in ToySolver.FileFormat.CNF

Old or new WCNF

GCNF format

data GCNF Source #

Group oriented CNF Input Format

This format is used in Group oriented MUS track of the SAT Competition 2011.

References:

Constructors

GCNF 

Fields

Instances

Instances details
Read GCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Show GCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Methods

showsPrec :: Int -> GCNF -> ShowS #

show :: GCNF -> String #

showList :: [GCNF] -> ShowS #

Eq GCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Methods

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

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

Ord GCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Methods

compare :: GCNF -> GCNF -> Ordering #

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

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

(>) :: GCNF -> GCNF -> Bool #

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

max :: GCNF -> GCNF -> GCNF #

min :: GCNF -> GCNF -> GCNF #

FileFormat GCNF Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

type GroupIndex = Int Source #

Component number between 0 and gcnfLastGroupIndex

type GClause = (GroupIndex, PackedClause) Source #

Clause together with component number

QDIMACS format

data QDimacs Source #

QDIMACS format

Quantified boolean expression in prenex normal form, consisting of a sequence of quantifiers (qdimacsPrefix) and a quantifier-free CNF part (qdimacsMatrix).

References:

Constructors

QDimacs 

Fields

data Quantifier Source #

Quantifier

Constructors

E

existential quantifier (∃)

A

universal quantifier (∀)

Instances

Instances details
Bounded Quantifier Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Enum Quantifier Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Read Quantifier Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Show Quantifier Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Eq Quantifier Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

Ord Quantifier Source # 
Instance details

Defined in ToySolver.FileFormat.CNF

type QuantSet = (Quantifier, [Atom]) Source #

Quantified set of variables

type Atom = Var Source #

Synonym of Var

Re-exports

type Lit = Int Source #

Positive (resp. negative) literals are represented as positive (resp. negative) integers. (DIMACS format).

type Clause = [Lit] Source #

Disjunction of Lit.