satchmo-2.8.2: SAT encoding monad

Safe HaskellNone
LanguageHaskell98

Satchmo.Boolean

Synopsis

Documentation

class (MonadFix m, Applicative m, Monad m) => MonadSAT m where Source

Associated Types

type Decoder m :: * -> * Source

Methods

fresh, fresh_forall :: m Literal Source

emit :: Clause -> m () Source

note :: String -> m () Source

emit some note (could be printed by the backend)

decode_variable :: Variable -> Decoder m Bool Source

Instances

monadic :: Monad m => ([a] -> m b) -> [m a] -> m b Source

assertOr :: MonadSAT m => [Boolean] -> m () Source

assertAnd :: MonadSAT m => [Boolean] -> m () Source

assert :: MonadSAT m => [Boolean] -> m () Source

fun2 :: MonadSAT m => (Bool -> Bool -> Bool) -> Boolean -> Boolean -> m Boolean Source

implement the function by giving a full CNF that determines the outcome

fun3 :: MonadSAT m => (Bool -> Bool -> Bool -> Bool) -> Boolean -> Boolean -> Boolean -> m Boolean Source

implement the function by giving a full CNF that determines the outcome

assert_fun2 :: MonadSAT m => (Bool -> Bool -> Bool) -> Boolean -> Boolean -> m () Source

assert_fun3 :: MonadSAT m => (Bool -> Bool -> Bool -> Bool) -> Boolean -> Boolean -> Boolean -> m () Source

monadic :: Monad m => ([a] -> m b) -> [m a] -> m b Source