Talk:Control flow graph

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computer science (Rated C-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.


As we are talking about control flow graph, I would expect to see at least a sample graph in this page. That's something really missing. —Preceding unsigned comment added by (talkcontribs) 2007-08-06 13:37:46

Here is a sample I created for the provided example. However, it ends up quite small and not really readable.
The example control flow graph in typical graphical form.
Anonyoptimizer 14:58, 9 October 2007 (UTC)

Abnormal Edges[edit]

The definition of an abnormal edge as an edge whose destination is unknown is misleading. To my understanding this mainly happens for exceptions and computed goto. Where you indeed know a number of possible destinations, but have no way to determine which of the destinations will be reached. Another typical property is that the destinations are forced and can't be changed (so you can't do things like splitting critical edges with additional blocks). Unfortunately I have no textbook citation at hand right now... -- (talk) 09:10, 17 July 2009 (UTC)

Definition of domination is flawed[edit]

"A block M dominates a block N if every path from the entry that reaches block N has to pass through block M. The entry block dominates all blocks."

With this definition, the entry block does *not* dominate all blocks because it does *not* dominate itself. The further definitions in that section are equally wrong. (talk) —Preceding undated comment added 07:35, 3 May 2013 (UTC)

Sample doesn't exist anymore[edit]

The example on this page doesn't exist anymore:
You'll get an Error 404.
-- (talk) 15:58, 11 May 2014 (UTC)

Example Code[edit]

Would explicitly stating "else" for the "C" block clean up this code? I think changing the example code to the following would be more clear:

0: (A) t0 = read_num
1: (A) if t0 mod 2 == 0
2: (B)   print t0 + " is even."
3: (B)   goto 5
4: (C) else
5: (C)   print t0 + " is odd."
6: (D) end program

In the above, we have 4 basic blocks: A from 0 to 1, B from 2 to 3, C from 4 to 5, and D at 6. In particular, in this case, A is the "entry block", D the "exit block" and lines 4 and 6 are jump targets. A graph for this fragment has edges from A to B, A to C, B to D and C to D.

Is there a reason for the else to be implicit?

— Preceding unsigned comment added by FLmosaic (talkcontribs) 04:59, 28 October 2014 (UTC)


The terms reducible and irreducible are used in comments on the image in the introduction's sidebar, but are not defined or linked to in the article. JustinBlank (talk) 16:44, 2 January 2017 (UTC)

Presumably, that's reducibility in the sense of reducible flow graphs. That link currently redirects to interval (graph theory); however see the discussion at Talk:Interval (graph theory)#Reducible flow graphs. Perhaps Rooted graph#Flow graphs would be a better target for that redirect.
@JMP EAX:, I think you added that image and its caption. Can you help? – Tea2min (talk) 09:50, 3 January 2017 (UTC)