exploring-interpreters-1.4.0.0: A generic exploring interpreter for exploratory programming
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Explorer.Monadic

Synopsis

Documentation

data Explorer programs m configs output Source #

mkExplorer :: Language p m c o => Bool -> (c -> c -> Bool) -> (p -> c -> m (Maybe c, o)) -> c -> Explorer p m c o Source #

mkExplorerNoSharing :: Language p m c o => (p -> c -> m (Maybe c, o)) -> c -> Explorer p m c o Source #

execute :: Language p m c o => p -> Explorer p m c o -> m (Explorer p m c o, o) Source #

executeAll :: Language p m c o => [p] -> Explorer p m c o -> m (Explorer p m c o, o) Source #

revert :: Ref -> Explorer p m c o -> Maybe (Explorer p m c o) Source #

jump :: Ref -> Explorer p m c o -> Maybe (Explorer p m c o) Source #

toTree :: Explorer p m c o -> Tree (Ref, c) Source #

incomingEdges :: Ref -> Explorer p m c o -> [((Ref, c), (p, o), (Ref, c))] Source #

config :: Explorer programs m configs output -> configs Source #

execEnv :: Explorer programs m configs output -> Gr Ref (programs, output) Source #

currRef :: Explorer programs m configs output -> Ref Source #

leaves :: Explorer p m c o -> [(Ref, c)] Source #

Returns all configurations that have not been the source for an execute action. This corresponds to leaves in a tree or nodes without an outbound-edge in a graph.

type Ref = Int Source #

type Language p m c o = (Eq p, Eq o, Monad m, Monoid o) Source #

deref :: Explorer p m c o -> Ref -> Maybe c Source #

getTrace :: Explorer p m c o -> [((Ref, c), (p, o), (Ref, c))] Source #

getTraces :: Explorer p m c o -> [[((Ref, c), (p, o), (Ref, c))]] Source #

getPathsFromTo :: Explorer p m c o -> Ref -> Ref -> [[((Ref, c), (p, o), (Ref, c))]] Source #

getPathFromTo :: Explorer p m c o -> Ref -> Ref -> [((Ref, c), (p, o), (Ref, c))] Source #

executionGraph :: Explorer p m c o -> ((Ref, c), [(Ref, c)], [((Ref, c), (p, o), (Ref, c))]) Source #

shadowExecEnv :: Explorer programs m configs output -> Gr [Ref] (programs, output) Source #

eqClasses :: Explorer p m c o -> [[Ref]] Source #

fromExport :: Explorer p m c o -> (Ref, [(Ref, c)], [(Ref, Ref, (p, o))]) -> Explorer p m c o Source #

toExport :: Explorer p m c o -> (Ref, [(Ref, c)], [(Ref, Ref, (p, o))]) Source #