World's most popular travel blog for travel bloggers.

What is the difference between control flow graph & interprocedural control flow graph?

, , No Comments
Problem Detail: 

I am doing research on control flow analysis on aspect oriented programs and I found in some papers an interprocedural approach for doing control flow analysis on others call graph or control flow graph. Is there a real difference between control flow graphs and interprocedural control flow graphs?

Asked By : user1125516

Answered By : Ravindra Bagale

inter-procedural view of a program makes use of call graph as a representation of the calling relationships between subroutines in a program. In a call graph, an edge between two nodes f and g:

  f --> g 

represents the fact that subroutine f calls subroutine g.

A control flow graph (CFG) provides finer "details" into the structure of the program as a whole, and of the subroutines in particular. For instance, the CFG of a subroutine f will make explicit all of the paths that are induced by a conditional branch:

                         / branch1 \ begin --> condition -->             --> codeblock --> g --> end                          \ branch2 / 

This kind of CFG is used to build an intra-procedural view of a subroutine.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/7054

0 comments:

Post a Comment

Let us know your responses and feedback