From bc3ad29fedadc32c59855c63305627b3924660af Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sat, 26 Jan 2008 18:54:40 +0000 Subject: [PATCH] Added code to build the flow graph for procs and functions in specifications --- common/FlowGraph.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/FlowGraph.hs b/common/FlowGraph.hs index 32d5719..e9c9964 100644 --- a/common/FlowGraph.hs +++ b/common/FlowGraph.hs @@ -278,6 +278,12 @@ buildFlowGraph funcs s = do n <- addNode' (findMeta spec) labelScopeIn spec (AlterSpec $ route23 route A.Spec) n' <- addNode' (findMeta spec) labelScopeOut spec (AlterSpec $ route23 route A.Spec) (s,e) <- buildStructured outer str (route33 route A.Spec) + -- If it's a process or function spec we must process it too. No need to + -- connect it up to the outer part though + case spec of + (A.Specification _ _ (A.Proc _ _ _ p)) -> buildProcess p (route44 (route33 (route23 route A.Spec) A.Specification) A.Proc) >> return () + (A.Specification _ _ (A.Function _ _ _ _ s)) -> buildStructured None s (route55 (route33 (route23 route A.Spec) A.Specification) A.Function) >> return () + _ -> return () addEdge ESeq n s addEdge ESeq e n' return (n,n')