ideas-1.2: Feedback services for intelligent tutoring systems

Portabilityportable (depends on ghc)
Safe HaskellNone



A prefix encodes a sequence of steps already performed (a so-called trace), and allows to continue the derivation at that particular point.



type Prefix = ParseState LabelInfoSource

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.

emptyPrefix :: LabeledStrategy a -> a -> Prefix aSource

Construct the empty prefix for a labeled strategy

makePrefix :: Monad m => Path -> LabeledStrategy a -> a -> m (Prefix a)Source

Construct a prefix for a given list of integers and a labeled strategy.

prefixTree :: a -> Prefix a -> DerivationTree (Prefix a) aSource

Create a derivation tree with a prefix as annotation.

stepsToRules :: [Step l a] -> [Rule a]Source

Retrieves the rules from a list of steps

lastStepInPrefix :: Prefix a -> Maybe (Step LabelInfo a)Source

Returns the last rule of a prefix (if such a rule exists)

activeLabels :: Prefix a -> [LabelInfo]Source

Calculate the active labels