跳至內容

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:創用CC
姓名標示 相同方式分享
您可以自由:
  • 分享 – 複製、發佈和傳播本作品
  • 重新修改 – 創作演繹作品
惟需遵照下列條件:
  • 姓名標示 – 您必須指名出正確的製作者,和提供授權條款的連結,以及表示是否有對內容上做出變更。您可以用任何合理的方式來行動,但不得以任何方式表明授權條款是對您許可或是由您所使用。
  • 相同方式分享 – 如果您利用本素材進行再混合、轉換或創作,您必須基於如同原先的相同或兼容的條款,來分布您的貢獻成品。

說明

添加單行說明來描述出檔案所代表的內容

在此檔案描寫的項目

描繪內容

檔案歷史

點選日期/時間以檢視該時間的檔案版本。

日期/時間縮⁠圖尺寸使用者備⁠註
目前2014年7月27日 (日) 06:57於 2014年7月27日 (日) 06:57 版本的縮圖270 × 491(9 KB)JMP EAXUser created page with UploadWizard

下列頁面有用到此檔案:

全域檔案使用狀況

以下其他 wiki 使用了這個檔案:

詮釋資料