File:Some types of control flow graphs.svg

原始文件(SVG文件,尺寸为270 × 491像素,文件大小:9 KB)


摘要

描述
English: Some examples of control flow graphs (CFG):

(a) the CFG of a if-then-else (b) a while loop (c) a natural loop with two exits, e.g. while with an if...break in the middle; non-structured by reducible (d) an irreducible CFG: a loop with to entry points, e.g. goto into a while loop

Source code in DOT, svg generated with graphviz:

digraph CFG_examples {
  node [shape=circle width=0.3 height=0.3 label="" fixedsize=true]
  edge [arrowsize=0.5]
  if -> { then; else } -> fi
  while -> body [weight=3]
  body -> while:w
  while -> end
  body -> end [style="invis" weight=3]
  fi -> exit1 [style="invis"]
  exit1 -> exit2
  exit2 -> body2 [weight=4]
  body2 -> exit1:w
  exit1 -> out:e
  exit2 -> out
  body2 -> out [style="invis" weight=4]
  end -> top [style="invis"]
  top -> entry1 [weight=2]
  entry1 -> out2
  top -> entry2:w 
  entry1 -> entry2 [weight=4]
  entry2 -> entry1:w
  entry2 -> out2 [style="invis" weight=4]
  if [xlabel = "(a)"]
  while [xlabel = "(b)"]
  exit1 [xlabel = "(c)"]
  top [xlabel = "(d)"]
} /*end digraph*/
日期
来源 自己的作品
作者 JMP EAX

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
w:zh:知识共享
署名 相同方式共享
本文件采用知识共享署名-相同方式共享 4.0 国际许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2014年7月27日 (日) 06:572014年7月27日 (日) 06:57版本的缩略图270 × 491(9 KB)JMP EAXUser created page with UploadWizard

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据