File:Some types of control flow graphs.svg

From Vero - Wikipedia
Jump to navigation Jump to search

Original file (SVG file, nominally 270 × 491 pixels, file size: 9 KB)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
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

DOT language (Q900927) – This Wikidata item has no property P154 (logo). Click here to edit the Wikidata item
DOT language (Q900927) – This Wikidata item has no property P154 (logo). Click here to edit the Wikidata item
This media was created with DOT language (file format for Graphviz graphs)
Here is a listing of the source used to create this file.

Deutsch  English  +/−

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*/
Date
Source Own work
Author JMP EAX
SVG development
InfoField
 The SVG code is valid.
 This chart was created with Graphviz.
  This file uses embedded text that can be easily translated using a text editor.

Licensing

JMP EAX, the copyright holder of this work, hereby publishes it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
Attribution:
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

27 July 2014

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current06:57, 27 July 2014Thumbnail for version as of 06:57, 27 July 2014270 × 491 (9 KB)wikimediacommons>JMP EAXUser created page with UploadWizard

The following page uses this file: