Skip to content

Instantly share code, notes, and snippets.

@gnarg
Created October 29, 2012 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gnarg/3977309 to your computer and use it in GitHub Desktop.
Save gnarg/3977309 to your computer and use it in GitHub Desktop.
Graphviz files for reference graph refactoring example
digraph AlphaSoup {
"@state0"
"@state1"
"@state2"
node[shape=box]
"E.report"
node[color=green]
"A#ones"
"B#zeros"
"B#get_state"
node[color=orange]
"A#report"
"C#report"
"E.report" -> "A#report"
"E.report" -> "C#report"
"A#report" -> "B#zeros"
"A#report" -> "A#ones"
"A#ones" -> "B#get_state"
"B#zeros" -> "@state0"
"B#get_state" -> "@state1"
"C#report" -> "@state2"
}
digraph AlphaSoup {
"@state0"
"@state1"
"@state2"
node[shape=box]
"E.report"
node[color=red]
"B#munge_state"
"B#get_all_the_state"
"B#get_state"
"D#get_state"
node[color=orange]
"A#report"
"C#report"
"E.report" -> "A#report"
"E.report" -> "C#report"
"A#report" -> "B#get_all_the_state"
"B#get_all_the_state" -> "B#munge_state"
"B#get_all_the_state" -> "B#get_state"
"B#get_all_the_state" -> "D#get_state"
"B#get_all_the_state" -> "@state1"
"B#munge_state" -> "B#get_state"
"B#get_state" -> "@state0"
"C#report" -> "D#get_state"
"D#get_state" -> "@state2"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment