UMinho Haskell Libraries (2004.11.10)ContentsIndex
Language.Java.CallGraph
Portability portable
Stability experimental
Maintainer joost.visser@di.uminho.pt
Contents
Representation
CCG generation
Description
Extraction of conditional call graphs from Java programs.
Synopsis
type CallGraph = LRel CGNode CGNode CGEdgeType
type CGNode = String
type CGEdgeType = String
emptyCG :: CallGraph
appendCG :: CallGraph -> CallGraph -> CallGraph
addEdgeToCG :: CGNode -> CGNode -> CGEdgeType -> CallGraph -> CallGraph
addCallEdge :: CGNode -> CGNode -> CallGraph -> CallGraph
addNestEdge :: CGNode -> CGNode -> CallGraph -> CallGraph
java2ccg :: (Term a, Monad m) => String -> a -> StateT Integer m CallGraph
supplyName :: MonadState Integer m => m String
localNameSupply :: Monad m => Integer -> StateT Integer m a -> m a
name2str :: Name -> Identifier
cg2dot :: String -> CallGraph -> String
lrel2dot :: String -> (((NodeName, NodeName), et) -> DotStatement) -> FiniteMap (NodeName, NodeName) et -> String
Representation
type CallGraph = LRel CGNode CGNode CGEdgeType
The type of conditional call graphs.
type CGNode = String
The type of call graph nodes.
type CGEdgeType = String
The type of edges types in call graphs.
emptyCG :: CallGraph
Empty call graph.
appendCG :: CallGraph -> CallGraph -> CallGraph
Append two call graphs to form a new one.
addEdgeToCG :: CGNode -> CGNode -> CGEdgeType -> CallGraph -> CallGraph
Add an edge of given type to a call graph.
addCallEdge :: CGNode -> CGNode -> CallGraph -> CallGraph
Add a call edge to a call graph.
addNestEdge :: CGNode -> CGNode -> CallGraph -> CallGraph
Add a nesting edge to a call graph.
CCG generation
java2ccg
:: (Term a, Monad m)
=> StringName of the current parent node.
-> a
-> StateT Integer m CallGraph
Create a call graph. Use a name supply to generate unique node names Basically follows the Propagage design pattern, where the name of the parent node is the environment.
supplyName :: MonadState Integer m => m String
localNameSupply :: Monad m => Integer -> StateT Integer m a -> m a
name2str :: Name -> Identifier
cg2dot :: String -> CallGraph -> String
lrel2dot :: String -> (((NodeName, NodeName), et) -> DotStatement) -> FiniteMap (NodeName, NodeName) et -> String
Produced by Haddock version 0.6