Talk:Control-flow graph

Latest comment: 7 years ago by Tea2min in topic Reducibility

Sample

edit

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 85.59.40.134 (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)Reply

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... --129.13.72.198 (talk) 09:10, 17 July 2009 (UTC)Reply

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.

195.212.29.186 (talk) —Preceding undated comment added 07:35, 3 May 2013 (UTC)Reply

Sample doesn't exist anymore

edit

The example on this page doesn't exist anymore:
http://www.icd.de/es/icd-c/example.html
You'll get an Error 404.
--84.61.112.44 (talk) 15:58, 11 May 2014 (UTC)Reply

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 6
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)Reply

Reducibility

edit

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)Reply

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)Reply