|Portability||portable (depends on ghc)|
A prefix encodes a sequence of steps already performed (a so-called trace), and allows to continue the derivation at that particular point.
- data Prefix a
- emptyPrefix :: LabeledStrategy a -> Prefix a
- makePrefix :: Monad m => [Int] -> LabeledStrategy a -> m (Prefix a)
- prefixToSteps :: Prefix a -> [Step LabelInfo a]
- prefixTree :: Bool -> Prefix a -> a -> DerivationTree (Prefix a) a
- stepsToRules :: [Step l a] -> [Rule a]
- lastStepInPrefix :: Prefix a -> Maybe (Step LabelInfo a)
- activeLabels :: Prefix a -> [LabelInfo]
Abstract data type for a (labeled) strategy with a prefix (a sequence of
executed rules). A prefix is still aware of the labels that appear in the
strategy. A prefix is encoded as a list of integers (and can be reconstructed
from such a list: see
makePrefix). The list is stored in reversed order.
Construct a prefix for a given list of integers and a labeled strategy.
Create a derivation tree with a prefix as annotation.
Returns the last rule of a prefix (if such a rule exists)