Module Dimacs.FromFD

Summary of exported operations:

ilog2 :: Int -> Int   
numBits :: Int -> Int   
numBitsFor :: Int -> Int -> Int   
dTrue :: Boolean   
dFalse :: Boolean   
convertFDVars :: [FDExpr] -> (Int,[(String,[Boolean])]) -> ((),(Int,[(String,[Boolean])]))   
convertFDVar :: FDExpr -> (Int,[(String,[Boolean])]) -> ((),(Int,[(String,[Boolean])]))   
convertSimplifications :: [Simplification] -> Int -> (Int,[(String,[Boolean])]) -> (Boolean,(Int,[(String,[Boolean])]))   
convertSimplification :: [(String,[Boolean])] -> Simplification -> [Boolean] -> (Boolean,[Boolean])   
convertFDConstr :: FDConstr -> (Int,[(String,[Boolean])]) -> (Boolean,(Int,[(String,[Boolean])]))   
convertFDRel :: FDRel -> FDExpr -> FDExpr -> (Int,[(String,[Boolean])]) -> (Boolean,(Int,[(String,[Boolean])]))   
convertEqual :: FDExpr -> FDExpr -> (Int,[(String,[Boolean])]) -> (Boolean,(Int,[(String,[Boolean])]))   
booleanEqual :: FDExpr -> FDExpr -> (Int,[(String,[Boolean])]) -> (Boolean,(Int,[(String,[Boolean])]))   
setEq :: [Boolean] -> [Boolean] -> Boolean   
toBits :: Int -> [Boolean]   
lookupVar :: String -> [(String,[Boolean])] -> [Boolean]   
convert :: ((Int,[(String,[Boolean])]) -> (a,(Int,[(String,[Boolean])]))) -> (a,(Int,[(String,[Boolean])]))   
fullAdder :: Boolean -> Boolean -> Boolean -> Boolean -> Boolean -> Boolean   
arithmetic :: Simplification -> [(String,[Boolean])] -> [Boolean] -> (Boolean,[Boolean])   
adder :: FDExpr -> FDExpr -> FDExpr -> [(String,[Boolean])] -> [Boolean] -> (Boolean,[Boolean])   
simplifyConstr :: FDConstr -> ([Simplification],Int,FDConstr)   
extractSolution :: [String] -> [(String,[Boolean])] -> [Boolean] -> [FDExpr]   
binVal :: [Boolean] -> Int   

Exported datatypes:


DimacsState

Type synonym: DimacsState = (Int,[(String,[Boolean])])


ConvertState

Type synonym: ConvertState a = State DimacsState a


SimplificationState

Type synonym: SimplificationState a = State [Boolean] a


Simplification

Constructors:


Simplified

Type synonym: Simplified a = ([Simplification],Int,a)


Exported operations:

ilog2 :: Int -> Int   

numBits :: Int -> Int   

numBitsFor :: Int -> Int -> Int   

dTrue :: Boolean   

dFalse :: Boolean   

convertFDVars :: [FDExpr] -> (Int,[(String,[Boolean])]) -> ((),(Int,[(String,[Boolean])]))   

convertFDVar :: FDExpr -> (Int,[(String,[Boolean])]) -> ((),(Int,[(String,[Boolean])]))   

convertSimplifications :: [Simplification] -> Int -> (Int,[(String,[Boolean])]) -> (Boolean,(Int,[(String,[Boolean])]))   

convertSimplification :: [(String,[Boolean])] -> Simplification -> [Boolean] -> (Boolean,[Boolean])   

convertFDConstr :: FDConstr -> (Int,[(String,[Boolean])]) -> (Boolean,(Int,[(String,[Boolean])]))   

convertFDRel :: FDRel -> FDExpr -> FDExpr -> (Int,[(String,[Boolean])]) -> (Boolean,(Int,[(String,[Boolean])]))   

convertEqual :: FDExpr -> FDExpr -> (Int,[(String,[Boolean])]) -> (Boolean,(Int,[(String,[Boolean])]))   

booleanEqual :: FDExpr -> FDExpr -> (Int,[(String,[Boolean])]) -> (Boolean,(Int,[(String,[Boolean])]))   

setEq :: [Boolean] -> [Boolean] -> Boolean   

toBits :: Int -> [Boolean]   

lookupVar :: String -> [(String,[Boolean])] -> [Boolean]   

convert :: ((Int,[(String,[Boolean])]) -> (a,(Int,[(String,[Boolean])]))) -> (a,(Int,[(String,[Boolean])]))   

arithmetic :: Simplification -> [(String,[Boolean])] -> [Boolean] -> (Boolean,[Boolean])   

adder :: FDExpr -> FDExpr -> FDExpr -> [(String,[Boolean])] -> [Boolean] -> (Boolean,[Boolean])   

extractSolution :: [String] -> [(String,[Boolean])] -> [Boolean] -> [FDExpr]   

binVal :: [Boolean] -> Int