Advise-me-0.1: Assessment services for the Advise-Me project
Portabilityportable (depends on ghc)
Safe HaskellNone




This module defines commonly used functions within the subexpression recognizer.


Functions on Symbols

hasMatch :: Expr -> Bool Source #

Does this expression have a matched subexpression?

extractMatched :: Expr -> Expr Source #

If this expression has been matched, then extracted the matched expression

subMatched :: Expr -> Expr Source #

Substitue any matching with its matched expression

Auxillary functions

cleanExpr :: Expr -> Expr Source #

Remove all custom symbols from the expression Useful/necessary for comandisons. Note that it is not possible to remove all symbols (and,or,magicNat,magicVar)

underSubst :: (Expr -> (Expr, [Attribute])) -> Expr -> Maybe (Expr, [Attribute]) Source #

Substitutes all special vars with a unique regular Var then applies some function after which the substitution is reversed

subExprsCombs :: [Expr] -> [([Expr], [Attribute])] Source #

Compute all possible combinations for a list of expressions