satchmo-2.9.9.3: SAT encoding monad

Safe HaskellNone
LanguageHaskell98

Satchmo.Boolean

Synopsis

Documentation

class (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

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

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

assertAnd :: (Foldable t, MonadSAT m) => t 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