
Visualizing Code Execution

From the website:

  Dr. Andrew Davison
  Dept. of Computer Engineering
  Prince of Songkla University
  Hat Yai, Songkhla 90112, Thailand
  E-mail: ad@fivedots.coe.psu.ac.th
  http://fivedots.coe.psu.ac.th/~ad/


If you use this code, please mention my name, and include a link
to the website.

Thanks,
  Andrew

============================

This directory contains examples using the Java CallGraph class. 

Aside from CallGraph.java, there are 8 examples:

* Ackermann.java
* Fact.java
* Fib.java
* Hanoi.java and Pole.java
* MergeSort.java
* Queens.java
* Quicksort.java
* Sierpinski.java


----------------------------
Before Compilation/Execution:

You need to download and install:
  * GraphViz: https://graphviz.gitlab.io/

----------------------------
Compiling the examples:

> javac *.java

----------------------------
Testing

You can test the GraphViz interface by calling main()
in Callgraph.java

> java CallGraph

If everything is working, a small "Hello World" graph
will be written to test.png. 


----------------------------
Execution 

The code will generate a call graph and store it in a
PNG image file.

e.g.

> java Ackermann 2 4
     // easy to run out of stack space 
     // with larger numbers

> java Fact 4

> java Fib 5

> java Hanoi 5

> java MergeSort

> java Queens 4

> java Quicksort

> java Sierpinski


-----------------------------
Last updated: 20th July 2020
