rme-0.1: Reed-Muller Expansion normal form for Boolean Formulas
CopyrightGalois Inc. 2016
LicenseBSD3
Maintainer[email protected]
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.RME.Base

Description

Reed-Muller Expansion normal form for Boolean Formulas.

Synopsis

Documentation

data RME Source #

Boolean formulas in Algebraic Normal Form, using a representation based on the Reed-Muller expansion.

Instances

Instances details
Show RME Source # 
Instance details

Defined in Data.RME.Base

Methods

showsPrec :: Int -> RME -> ShowS #

show :: RME -> String #

showList :: [RME] -> ShowS #

Eq RME Source # 
Instance details

Defined in Data.RME.Base

Methods

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

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

true :: RME Source #

Constant true formula.

false :: RME Source #

Constant false formula.

lit :: Int -> RME Source #

Boolean literals.

constant :: Bool -> RME Source #

Boolean constant formulas.

isBool :: RME -> Maybe Bool Source #

Test whether an RME formula is a constant boolean.

compl :: RME -> RME Source #

Logical complement.

xor :: RME -> RME -> RME Source #

Logical exclusive-or.

conj :: RME -> RME -> RME Source #

Logical conjunction.

disj :: RME -> RME -> RME Source #

Logical disjunction.

iff :: RME -> RME -> RME Source #

Logical equivalence.

mux :: RME -> RME -> RME -> RME Source #

Logical if-then-else.

eval :: RME -> (Int -> Bool) -> Bool Source #

Evaluate formula with given variable assignment.

sat :: RME -> Maybe [(Int, Bool)] Source #

Satisfiability checker.

allsat :: RME -> [[(Int, Bool)]] Source #

List of all satisfying assignments.

degree :: RME -> Int Source #

Maximum polynomial degree.

depth :: RME -> Int Source #

Tree depth.

size :: RME -> Int Source #

Tree size.

explode :: RME -> [[Int]] Source #

Convert to an explicit polynomial representation.