toysolver-0.3.0: Assorted decision procedures for SAT, Max-SAT, PB, MIP, etc

Copyright(c) Masahiro Sakai 2012-2014
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

ToySolver.Data.Boolean

Contents

Description

Type classes for lattices and boolean algebras.

Synopsis

Boolean algebra

class MonotoneBoolean a where Source

Minimal complete definition

(true, (.&&.) | andB), (false, (.||.) | orB)

Methods

true, false :: a Source

(.&&.) :: a -> a -> a infixr 3 Source

(.||.) :: a -> a -> a infixr 2 Source

andB :: [a] -> a Source

orB :: [a] -> a Source

class Complement a where Source

types that can be negated.

Methods

notB :: a -> a Source

class (MonotoneBoolean a, Complement a) => Boolean a where Source

types that can be combined with boolean operations.

Minimal complete definition

Nothing

Methods

(.=>.), (.<=>.) :: a -> a -> a infix 1 .=>., .<=>. Source

ite :: a -> a -> a -> a Source

Instances

Boolean Bool 
Boolean (GenFormula a) 
Complement lit => Boolean (DNF lit) 
Boolean (BoolExpr a) 
Boolean (Formula c) 
Boolean a => Boolean (b -> a) 
(Boolean a, Boolean b) => Boolean (a, b)