term-rewriting-0.3.0.1: Term Rewriting Library

Safe HaskellNone
LanguageHaskell98

Data.Rewriting.Rules.Ops

Contents

Synopsis

Operations on Rules

funs :: [Rule f v] -> [f] Source #

Lifting of Term.funs to list of rules.

funsDL :: [Rule f v] -> [f] -> [f] Source #

Difference List version of funs. We have funsDL r vs = funs r ++ vs.

vars :: [Rule f v] -> [v] Source #

Lifting of Term.vars to list of rules.

varsDL :: [Rule f v] -> [v] -> [v] Source #

Difference List version of vars. We have varsDL r vs = vars r ++ vs.

lhss :: [Rule f v] -> [Term f v] Source #

lhss rs returns the list of left-hand sides of rs

rhss :: [Rule f v] -> [Term f v] Source #

lhss rs returns the list of right-hand sides of rs

map :: (f -> f') -> (v -> v') -> [Rule f v] -> [Rule f' v'] Source #

Lifting of Rule.map to list of rules.

restrictFuns :: (f -> Bool) -> [Rule f v] -> [Rule f v] Source #

Restrict the rules to those only using function symbols satisfying the given predicate.

Predicates on Rules

isLinear :: Ord v => [Rule f v] -> Bool Source #

Returns True iff all given rules satisfy isLinear

isLeftLinear :: Ord v => [Rule f v] -> Bool Source #

Returns True iff all given rules satisfy isLeftLinear

isRightLinear :: Ord v => [Rule f v] -> Bool Source #

Returns True iff all given rules satisfy isRightLinear

isGround :: [Rule f v] -> Bool Source #

Returns True iff all given rules satisfy isGroundLinear

isLeftGround :: [Rule f v] -> Bool Source #

Returns True iff all given rules satisfy isLeftGround

isRightGround :: [Rule f v] -> Bool Source #

Returns True iff all given rules satisfy isRightGround

isErasing :: Ord v => [Rule f v] -> Bool Source #

Returns True iff any of the given rules satisfy isErasing

isCreating :: Ord v => [Rule f v] -> Bool Source #

Returns True iff any of the given rules satisfy isCreating

isExpanding :: [Rule f v] -> Bool Source #

Returns True iff any of the given rules satisfy isExpanding

isDuplicating :: Ord v => [Rule f v] -> Bool Source #

Returns True iff any of the given rules satisfy isDuplicating

isCollapsing :: [Rule f v] -> Bool Source #

Returns True iff any of the given rules satisfy isCollapsing

isValid :: Ord v => [Rule f v] -> Bool Source #

Returns True iff all rules satisfy isValid