uhc-util-0.1.6.5: UHC utilities

Safe HaskellNone
LanguageHaskell98

UHC.Util.CHR.Rule

Description

Derived from work by Gerrit vd Geest, but with searching structures for predicates to avoid explosion of search space during resolution.

Synopsis

Documentation

data CHRRule env subst Source

Constructors

CHRRule 

Fields

chrRule :: Rule (CHRConstraint env subst) (CHRGuard env subst) ()
 

Instances

Show (CHRRule env subst) Source 
PP (CHRRule env subst) Source 
type TTKey (CHRRule env subst) = TTKey (CHRConstraint env subst) Source 

data Rule cnstr guard prio Source

A CHR (rule) consist of head (simplification + propagation, boundary indicated by an Int), guard, and a body. All may be empty, but not all at the same time.

Constructors

Rule 

Fields

ruleHead :: ![cnstr]
 
ruleSimpSz :: !Int

length of the part of the head which is the simplification part

ruleGuard :: ![guard]
 
ruleBody :: ![cnstr]
 
rulePrio :: !(Maybe prio)

optional priority, if absent it is considered the lowest possible

Instances

Show (Rule c g p) Source 
(PP c, PP g, PP p) => PP (Rule c g p) Source 
(Serialize c, Serialize g, Serialize p) => Serialize (Rule c g p) Source 
TTKeyable cnstr => TTKeyable (Rule cnstr guard prio) Source 
(VarExtractable c, VarExtractable g, (~) * (ExtrValVarKey c) (ExtrValVarKey g)) => VarExtractable (Rule c g p) Source 
(VarUpdatable c s, VarUpdatable g s) => VarUpdatable (Rule c g p) s Source 
type TTKey (Rule cnstr guard prio) = TTKey cnstr Source 
type ExtrValVarKey (Rule c g p) = ExtrValVarKey c Source 

(<==>) :: forall r c1 c2. (MkRule r, MkSolverConstraint (SolverConstraint r) c1, MkSolverConstraint (SolverConstraint r) c2) => [c1] -> [c2] -> r infix 1 Source

(==>) :: forall r c1 c2. (MkRule r, MkSolverConstraint (SolverConstraint r) c1, MkSolverConstraint (SolverConstraint r) c2) => [c1] -> [c2] -> r infix 1 Source

(|>) :: (MkRule r, MkSolverGuard (SolverGuard r) g') => r -> [g'] -> r infixr 0 Source

class MkSolverGuard g g' where Source

Methods

toSolverGuard :: g' -> g Source

fromSolverGuard :: g -> Maybe g' Source

Instances

class MkSolverPrio p p' where Source

Methods

toSolverPrio :: p' -> p Source

fromSolverPrio :: p -> Maybe p' Source

Instances