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

Copyright(c) Masahiro Sakai 2012 2015
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilitynon-portable (TypeSynonymInstances, FlexibleInstances, ScopedTypeVariables, MultiParamTypeClasses)
Safe HaskellNone
LanguageHaskell2010

ToySolver.EUF.FiniteModelFinder

Contents

Description

A simple model finder.

References:

Synopsis

Formula types

type Var = String Source #

Variable

type FSym = String Source #

Function Symbol

type PSym = String Source #

Predicate Symbol

data GenLit a Source #

Generalized literal type parameterized by atom type

Constructors

Pos a 
Neg a 

Instances

Eq a => Eq (GenLit a) Source # 

Methods

(==) :: GenLit a -> GenLit a -> Bool #

(/=) :: GenLit a -> GenLit a -> Bool #

Ord a => Ord (GenLit a) Source # 

Methods

compare :: GenLit a -> GenLit a -> Ordering #

(<) :: GenLit a -> GenLit a -> Bool #

(<=) :: GenLit a -> GenLit a -> Bool #

(>) :: GenLit a -> GenLit a -> Bool #

(>=) :: GenLit a -> GenLit a -> Bool #

max :: GenLit a -> GenLit a -> GenLit a #

min :: GenLit a -> GenLit a -> GenLit a #

Show a => Show (GenLit a) Source # 

Methods

showsPrec :: Int -> GenLit a -> ShowS #

show :: GenLit a -> String #

showList :: [GenLit a] -> ShowS #

Complement (GenLit a) Source # 

Methods

notB :: GenLit a -> GenLit a Source #

data Term Source #

Term

Constructors

TmApp FSym [Term] 
TmVar Var 

Instances

Eq Term Source # 

Methods

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

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

Ord Term Source # 

Methods

compare :: Term -> Term -> Ordering #

(<) :: Term -> Term -> Bool #

(<=) :: Term -> Term -> Bool #

(>) :: Term -> Term -> Bool #

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

max :: Term -> Term -> Term #

min :: Term -> Term -> Term #

Show Term Source # 

Methods

showsPrec :: Int -> Term -> ShowS #

show :: Term -> String #

showList :: [Term] -> ShowS #

data Atom Source #

Constructors

PApp PSym [Term] 

Instances

Eq Atom Source # 

Methods

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

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

Ord Atom Source # 

Methods

compare :: Atom -> Atom -> Ordering #

(<) :: Atom -> Atom -> Bool #

(<=) :: Atom -> Atom -> Bool #

(>) :: Atom -> Atom -> Bool #

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

max :: Atom -> Atom -> Atom #

min :: Atom -> Atom -> Atom #

Show Atom Source # 

Methods

showsPrec :: Int -> Atom -> ShowS #

show :: Atom -> String #

showList :: [Atom] -> ShowS #

type Clause = [Lit] Source #

data GenFormula a Source #

toSkolemNF :: forall m. Monad m => (String -> Int -> m FSym) -> Formula -> m [Clause] Source #

normalize a formula into a skolem normal form.

TODO:

  • Tseitin encoding

Model types

type Entity = Int Source #

Element of model.

showEntity :: Entity -> String Source #

print entity

Main function