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

Copyright(c) Masahiro Sakai 2011
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilitynon-portable (FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies)
Safe HaskellSafe-Inferred
LanguageHaskell2010

ToySolver.Data.ArithRel

Contents

Description

Arithmetic relations

Synopsis

Relational operators

data RelOp Source

relational operators

Constructors

Lt 
Le 
Ge 
Gt 
Eql 
NEq 

Instances

flipOp :: RelOp -> RelOp Source

flipping relational operator

rel (flipOp op) a b is equivalent to rel op b a

negOp :: RelOp -> RelOp Source

negating relational operator

rel (negOp op) a b is equivalent to notB (rel op a b)

showOp :: RelOp -> String Source

operator symbol

evalOp :: Ord a => RelOp -> a -> a -> Bool Source

evaluate an operator into a comparision function

Relation

data ArithRel e Source

Atomic formula

Constructors

ArithRel e RelOp e 

DSL

class IsArithRel e r | r -> e where Source

type class for constructing relational formula

Methods

arithRel :: RelOp -> e -> e -> r Source

(.<.) :: IsArithRel e r => e -> e -> r infix 4 Source

constructing relational formula

(.<=.) :: IsArithRel e r => e -> e -> r infix 4 Source

constructing relational formula

(.>=.) :: IsArithRel e r => e -> e -> r infix 4 Source

constructing relational formula

(.>.) :: IsArithRel e r => e -> e -> r infix 4 Source

constructing relational formula

(.==.) :: IsArithRel e r => e -> e -> r infix 4 Source

constructing relational formula

(./=.) :: IsArithRel e r => e -> e -> r infix 4 Source

constructing relational formula