monadiccp-0.5.2: Constraint Programming

Control.CP.Solver

Documentation

class Monad solver => Solver solver whereSource

Associated Types

type Constraint solver :: *Source

the constraints

type Label solver :: *Source

the labels

Methods

add :: Constraint solver -> solver BoolSource

add a constraint to the current state, and return whethe the resulting state is consistent

run :: solver a -> aSource

run a computation

mark :: solver (Label solver)Source

mark the current state, and return its label

goto :: Label solver -> solver ()Source

go to the state with given label

Instances

Solver FD 
Solver Prolog 
HTerm t => Solver (Herbrand t)

Solver instance

(Monoid w, Solver s) => Solver (WriterT w s)

WriterT decoration of a solver useful for producing statistics during solving

(Solver s, HTerm t) => Solver (HerbrandT t s) 

class Solver solver => Term solver term whereSource

Methods

newvar :: solver termSource

produce a fresh constraint variable

Instances

Term FD FD_Term 
Term Prolog PrologTerm 
HTerm t => Term (Herbrand t) t 
(Monoid w, Term s t) => Term (WriterT w s) t 
(HTerm t, Solver s, Term s st) => Term (HerbrandT t s) (R st) 
(HTerm t, Solver s) => Term (HerbrandT t s) (L t)