monadiccp-0.7.4: Constraint Programming

Safe HaskellSafe-Infered

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 whether 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

markn :: Int -> solver (Label solver)Source

mark the current state as discontinued, yet return a label that is usable n times

goto :: Label solver -> solver ()Source

go to the state with given label

Instances

Solver DummySolver 
Solver OvertonFD 
Solver CodegenGecodeSolver 
FDSolver s => Solver (FDInstance s) 
(GecodeSolver s, ~ * (Constraint s) (GecodeConstraint s)) => Solver (GecodeWrappedSolver s) 
(Monoid w, Solver s) => Solver (WriterT w s)

WriterT decoration of a solver useful for producing statistics during solving

class Solver solver => Term solver term whereSource

Associated Types

type Help solver term Source

Methods

newvar :: solver termSource

produce a fresh constraint variable

help :: solver () -> term -> Help solver termSource