rest-rewrite-0.4.3: Rewriting library with online termination checking
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.REST.Internal.WorkStrategy

Synopsis

Documentation

type GetWork m rule term oc = [Path rule term oc] -> ExploredTerms term oc m -> (Path rule term oc, [Path rule term oc]) Source #

newtype WorkStrategy rule term oc Source #

WorkStrategy defines the procedure for choosing which pending path REST explores

Constructors

WorkStrategy (forall m. GetWork m rule term oc) 

bfs :: WorkStrategy rule term oc Source #

Explore the rewrite tree in BFS style. Using this strategy enables finding the shortest rewrite path to a desired term.

notVisitedFirst :: (Eq term, Eq rule, Eq oc, Hashable term) => WorkStrategy rule term oc Source #

Prioritize searching for terms that haven't been seen before. This strategy may explore all reachable terms earlier, reducing the need to explore down the remaining unexplored paths.