Copyright | (c) Masahiro Sakai 2018 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Stability | provisional |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Extensions |
|
Not-All-Equal SAT problems.
Synopsis
- type NAESAT = (Int, [NAEClause])
- evalNAESAT :: IModel m => m -> NAESAT -> Bool
- type NAEClause = Vector PackedLit
- evalNAEClause :: IModel m => m -> NAEClause -> Bool
- newtype SAT2NAESATInfo = SAT2NAESATInfo Var
- sat2naesat :: CNF -> (NAESAT, SAT2NAESATInfo)
- type NAESAT2SATInfo = IdentityTransformer Model
- naesat2sat :: NAESAT -> (CNF, NAESAT2SATInfo)
- data NAESAT2NAEKSATInfo = NAESAT2NAEKSATInfo !Int !Int [(Var, NAEClause, NAEClause)]
- naesat2naeksat :: Int -> NAESAT -> (NAESAT, NAESAT2NAEKSATInfo)
- type NAESAT2Max2SATInfo = ComposedTransformer NAESAT2NAEKSATInfo NAE3SAT2Max2SATInfo
- naesat2max2sat :: NAESAT -> ((WCNF, Integer), NAESAT2Max2SATInfo)
- type NAE3SAT2Max2SATInfo = IdentityTransformer Model
- nae3sat2max2sat :: NAESAT -> ((WCNF, Integer), NAE3SAT2Max2SATInfo)
Definition of NAE (Not-All-Equall) SAT problems.
Conversion with SAT problem
newtype SAT2NAESATInfo Source #
Information of sat2naesat
conversion
Instances
Read SAT2NAESATInfo Source # | |
Defined in ToySolver.Converter.NAESAT readsPrec :: Int -> ReadS SAT2NAESATInfo # readList :: ReadS [SAT2NAESATInfo] # | |
Show SAT2NAESATInfo Source # | |
Defined in ToySolver.Converter.NAESAT showsPrec :: Int -> SAT2NAESATInfo -> ShowS # show :: SAT2NAESATInfo -> String # showList :: [SAT2NAESATInfo] -> ShowS # | |
Eq SAT2NAESATInfo Source # | |
Defined in ToySolver.Converter.NAESAT (==) :: SAT2NAESATInfo -> SAT2NAESATInfo -> Bool # (/=) :: SAT2NAESATInfo -> SAT2NAESATInfo -> Bool # | |
BackwardTransformer SAT2NAESATInfo Source # | |
Defined in ToySolver.Converter.NAESAT | |
ForwardTransformer SAT2NAESATInfo Source # | |
Defined in ToySolver.Converter.NAESAT | |
Transformer SAT2NAESATInfo Source # | |
Defined in ToySolver.Converter.NAESAT type Source SAT2NAESATInfo Source # type Target SAT2NAESATInfo Source # | |
type Source SAT2NAESATInfo Source # | |
Defined in ToySolver.Converter.NAESAT | |
type Target SAT2NAESATInfo Source # | |
Defined in ToySolver.Converter.NAESAT |
sat2naesat :: CNF -> (NAESAT, SAT2NAESATInfo) Source #
Convert a CNF formula φ to an equisatifiable NAE-SAT formula ψ,
together with a SAT2NAESATInfo
type NAESAT2SATInfo = IdentityTransformer Model Source #
Information of naesat2sat
conversion
naesat2sat :: NAESAT -> (CNF, NAESAT2SATInfo) Source #
Convert a NAE-SAT formula φ to an equisatifiable CNF formula ψ,
together with a NAESAT2SATInfo
Conversion from general NAE-SAT to NAE-k-SAT
data NAESAT2NAEKSATInfo Source #
Instances
Read NAESAT2NAEKSATInfo Source # | |
Defined in ToySolver.Converter.NAESAT | |
Show NAESAT2NAEKSATInfo Source # | |
Defined in ToySolver.Converter.NAESAT showsPrec :: Int -> NAESAT2NAEKSATInfo -> ShowS # show :: NAESAT2NAEKSATInfo -> String # showList :: [NAESAT2NAEKSATInfo] -> ShowS # | |
Eq NAESAT2NAEKSATInfo Source # | |
Defined in ToySolver.Converter.NAESAT (==) :: NAESAT2NAEKSATInfo -> NAESAT2NAEKSATInfo -> Bool # (/=) :: NAESAT2NAEKSATInfo -> NAESAT2NAEKSATInfo -> Bool # | |
BackwardTransformer NAESAT2NAEKSATInfo Source # | |
ForwardTransformer NAESAT2NAEKSATInfo Source # | |
Transformer NAESAT2NAEKSATInfo Source # | |
Defined in ToySolver.Converter.NAESAT type Source NAESAT2NAEKSATInfo Source # type Target NAESAT2NAEKSATInfo Source # | |
type Source NAESAT2NAEKSATInfo Source # | |
Defined in ToySolver.Converter.NAESAT | |
type Target NAESAT2NAEKSATInfo Source # | |
Defined in ToySolver.Converter.NAESAT |
naesat2naeksat :: Int -> NAESAT -> (NAESAT, NAESAT2NAEKSATInfo) Source #
NAE-SAT to MAX-2-SAT
naesat2max2sat :: NAESAT -> ((WCNF, Integer), NAESAT2Max2SATInfo) Source #
nae3sat2max2sat :: NAESAT -> ((WCNF, Integer), NAE3SAT2Max2SATInfo) Source #