Corrected the implicit mobility so that it now works properly on the Rain move testcase
This commit is contained in:
parent
a5fca4816b
commit
947f252e66
|
@ -53,9 +53,13 @@ calculateUsedAgainAfter g startNode
|
||||||
|
|
||||||
iterate :: (Node, EdgeLabel) -> Set.Set Var -> Maybe (Set.Set Var) -> Set.Set
|
iterate :: (Node, EdgeLabel) -> Set.Set Var -> Maybe (Set.Set Var) -> Set.Set
|
||||||
Var
|
Var
|
||||||
iterate node _ mvs = case lab g (fst node) of
|
iterate node prevVars maybeVars = case lab g (fst node) of
|
||||||
Just ul -> let nvars = writtenVars $ nodeVars $ getNodeData ul in
|
Just ul ->
|
||||||
maybe nvars (Set.union nvars) mvs
|
let vs = nodeVars $ getNodeData ul
|
||||||
|
readFromVars = readVars vs
|
||||||
|
writtenToVars = writtenVars vs
|
||||||
|
addTo = fromMaybe prevVars maybeVars
|
||||||
|
in (readFromVars `Set.union` addTo) `Set.difference` writtenToVars
|
||||||
Nothing -> error "Node label not found in calculateUsedAgainAfter"
|
Nothing -> error "Node label not found in calculateUsedAgainAfter"
|
||||||
|
|
||||||
--TODO rememember to take note of declarations/scope, otherwise this:
|
--TODO rememember to take note of declarations/scope, otherwise this:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user