Commit 55a99caf authored by Tom Bower's avatar Tom Bower
Browse files

Finished composeTransitions (2012 LTS)

parent c38156ab
......@@ -71,8 +71,13 @@ composeTransitions :: Transition -> Transition
-- drawn; likewise the second.
--Pre: All (four) pairs of source and target states drawn from the two transitions
-- are contained in the given StateMap.
composeTransitions ((s, s'), a) ((t, t'), a') a1 a2 sm
| a == a' =
composeTransitions ((s, t), a) ((s', t'), a') al1 al2 sm
| a == a' = [((lookUp (s, s') sm, lookUp (t, t') sm), a)]
| elem a al2 && elem a' al1 = []
| elem a' al1 = [((lookUp (s, s') sm, lookUp (t, s') sm), a)]
| elem a al2 = [((lookUp (s, s') sm, lookUp (s, t') sm), a')]
| otherwise = [((lookUp (s, s') sm, lookUp (t, s') sm), a),
((lookUp (s, s') sm, lookUp (s, t') sm), a')]
pruneTransitions :: [Transition] -> LTS
pruneTransitions
......
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