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

Portabilitynon-portable (TypeSynonymInstances, FlexibleInstances, ScopedTypeVariables)
Stabilityprovisional
Maintainermasahiro.sakai@gmail.com
Safe HaskellNone

Algorithm.FOLModelFinder

Contents

Description

A simple model finder.

References:

Synopsis

Formula types

type Var = StringSource

Variable

type FSym = StringSource

Function Symbol

type PSym = StringSource

Predicate Symbol

data GenLit a Source

Generalized literal type parameterized by atom type

Constructors

Pos a 
Neg a 

Instances

Eq a => Eq (GenLit a) 
Ord a => Ord (GenLit a) 
Show a => Show (GenLit a) 

data Term Source

Term

Constructors

TmApp FSym [Term] 
TmVar Var 

Instances

data Atom Source

Constructors

PApp PSym [Term] 

Instances

type Clause = [Lit]Source

data GenFormula a Source

Instances

Eq a => Eq (GenFormula a) 
Ord a => Ord (GenFormula a) 
Show a => Show (GenFormula a) 

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

data Model Source

Constructors

Model 

type Entity = IntSource

Element of model.

showEntity :: Entity -> StringSource

print entity

Main function