toysolver-0.8.1: Assorted decision procedures for SAT, SMT, Max-SAT, PB, MIP, etc
Copyright(c) Masahiro Sakai 2012-2021
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010
Extensions
  • MonoLocalBinds
  • TypeFamilies
  • ViewPatterns
  • DeriveGeneric
  • TypeSynonymInstances
  • FlexibleInstances
  • ConstrainedClassMethods
  • MultiParamTypeClasses
  • KindSignatures
  • ExplicitNamespaces
  • PatternSynonyms

ToySolver.SAT.Formula

Description

 
Synopsis

Boolean formula type

data Formula where Source #

Arbitrary formula not restricted to CNF

Bundled Patterns

pattern Atom :: Lit -> Formula 
pattern And :: [Formula] -> Formula 
pattern Or :: [Formula] -> Formula 
pattern Not :: Formula -> Formula 
pattern Equiv :: Formula -> Formula -> Formula 
pattern Imply :: Formula -> Formula -> Formula 
pattern ITE :: Formula -> Formula -> Formula -> Formula 

Instances

Instances details
Read Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

Show Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

Eq Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

Methods

(==) :: Formula -> Formula -> Bool #

(/=) :: Formula -> Formula -> Bool #

Hashable Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

Methods

hashWithSalt :: Int -> Formula -> Int #

hash :: Formula -> Int #

Interned Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

Associated Types

data Description Formula #

type Uninterned Formula #

Uninternable Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

Boolean Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

Complement Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

Methods

notB :: Formula -> Formula Source #

MonotoneBoolean Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

IfThenElse Formula Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

Generic (Description Formula) Source # 
Instance details

Defined in ToySolver.SAT.Formula

Associated Types

type Rep (Description Formula) :: Type -> Type #

Eq (Description Formula) Source # 
Instance details

Defined in ToySolver.SAT.Formula

Hashable (Description Formula) Source # 
Instance details

Defined in ToySolver.SAT.Formula

data Description Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

type Uninterned Formula Source # 
Instance details

Defined in ToySolver.SAT.Formula

type Rep (Description Formula) Source # 
Instance details

Defined in ToySolver.SAT.Formula

type Rep (Description Formula) = D1 ('MetaData "Description" "ToySolver.SAT.Formula" "toysolver-0.8.1-8UpSeeDvJqYHlnd3w7teb3" 'False) ((C1 ('MetaCons "DAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Lit)) :+: (C1 ('MetaCons "DAnd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Id])) :+: C1 ('MetaCons "DOr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Id])))) :+: ((C1 ('MetaCons "DNot" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id)) :+: C1 ('MetaCons "DImply" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id))) :+: (C1 ('MetaCons "DEquiv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id)) :+: C1 ('MetaCons "DITE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id))))))

fold :: Boolean b => (Lit -> b) -> Formula -> b Source #