Commit 65667ad8 authored by Tom Bower's avatar Tom Bower
Browse files

Finished pruneTransitions (2012 - LTS)

parent 2f369177
......@@ -80,8 +80,15 @@ composeTransitions ((s, t), a) ((s', t'), a') al1 al2 sm
((lookUp (s, s') sm, lookUp (s, t') sm), a')]
pruneTransitions :: [Transition] -> LTS
pruneTransitions
= undefined
pruneTransitions ts
= visit 0 []
where
visit :: State -> [State] -> [Transition]
visit s vs
| notElem s vs = ts' ++ concatMap (flip visit (s : vs)) (map (snd . fst) ts')
| otherwise = []
where
ts' = transitions s ts
------------------------------------------------------
-- PART IV
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment