Alloy Community

User login

jforge Control Flow tab has no graph

 
Posted on: Wed, 09/10/2008 - 09:28
Joined: 2008-09-10
Points: 15
User is offline
jforge Control Flow tab has no graph
I have a new eclipse install--Ganymede on a AMD64 SuSE 11 box--and I added the JForge 0.0.9 plugin. I tried the "JForge Analysis | Check and Simulate" command on various methods of the supplied IntTree.java package. Mostly, I get the expected results. But, following a simulation, the Control Flow Graph tab does not have a graph in it, just text. I was expecting something similar to the  Trace tab, where the Visual Trace selection does indeed bring up a new window with a graph as shown on the the JForge web page. No example of the Control Flow Graph is shown, so I am in the dark as to what the proper output is.

Example Control Flow Graph window for the minAll method:


proc edu.mit.csail.sdg.annotations.test.IntTree.minAll (this) : (minAll_return, minAll_throw) {
   Stmt2: minAll_return := null goto Stmt1
   Stmt1: minAll_throw := null goto Stmt5
   Stmt5: if !(this in null) then  goto Stmt3 else  goto Stmt4
   Stmt3: start := (this . root) goto Stmt6
   Stmt4: minAll_throw := java.lang.NullPointerException$Lit goto Stmt13
   Stmt6: if (start in Null) then  goto Stmt7 else  goto Stmt9
   Stmt13: spec nodes goto Stmt0

all x|
((x . nodes) in edu.mit.csail.sdg.annotations.test.IntTree$Node) &&
   ((x . nodes) = (((x . root) . (^(left + right) + <[0, 0]>([[java.lang.NegativeArraySizeException], [java.lang.ArrayIndexOutOfBoundsException], [java.lang.IndexOutOfBoundsException], [ClientFailure], [java.lang.NullPointerException], [java.lang.ArithmeticException], [java.lang.ClassCastException], [java.lang.RuntimeException], [java.lang.Exception], [java.lang.Throwable], [edu.mit.csail.sdg.annotations.test.IntTree], [edu.mit.csail.sdg.annotations.test.IntTree$Node], [java.lang.Object], [Null]]))) - null))

   Stmt7: minAll_return := start goto Stmt13
   Stmt9: if !(start in null) then  goto Stmt8 else  goto Stmt4
   Stmt8: $r0 := (start . left) goto Stmt10
   Stmt10: if !($r0 in Null) then  goto Stmt12 else  goto Stmt7
   Stmt12: if !(start in null) then  goto Stmt11 else  goto Stmt4
   Stmt11: start := (start . left) goto Stmt9
   Stmt0: exit
}


What should I be seeing here?

Thanks
 
Posted on: Wed, 09/10/2008 - 11:59    #1
Joined: 2008-07-21
Points: 1
User is offline
Hi,

The text in the control flow graph tab shows a print out of the Forge procedure which is the intermediate representation of both Java byte code and specifications. It does look like similar to Java code but it also includes specification statements (Stmt 13 above.) I guess a more appropriate name should be "Forge procedure" or "Intermediate representation". The name CFG comes from the fact that Forge programs are not linear but can have arbitrary connections between statements.

-- kuat
 
Posted on: Wed, 09/10/2008 - 16:07    #2
Joined: 2008-09-10
Points: 15
User is offline
Thanks for the explanation. It's the textual representation of a graph; not a pictorial, as I had imagined.

Syndicate content  

The development of this site is supported by the National Science Foundation under Computing Research Infrastructure Grant No. 0707612.

Theme originally designed by Chris Herberte