<div dir="ltr">Hi @reijin!<div><br></div><div>Did you eventually find a solution to the problem?</div><div>Did you manage to graphically represent the AST?</div><div><br></div><div>Best,</div><div>Anjan</div><div><br>On Monday, February 26, 2018 at 2:30:59 PM UTC+1, reijin wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Hi!<div><br></div><div>I'm currently working on a project where I have to figure out a way to graphically represent an AST. Sadly I'm having problems figuring out my next steps. What I did so far: created the .jimple files from my .class files. Now my code basicially loads the jimple file:</div><div><pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'DejaVu Sans Mono';font-size:11.3pt"><span style="color:#cc7832">try </span>{<br>    InputStream is = <span style="color:#cc7832">new </span>FileInputStream(jf)<span style="color:#cc7832">;<br></span><span style="color:#cc7832">    </span>JimpleAST jast = <span style="color:#cc7832">new </span>JimpleAST(is)<span style="color:#cc7832">;<br></span><span style="color:#cc7832">    </span>SootClass sc = jast.createSootClass()<span style="color:#cc7832">;<br></span><span style="color:#cc7832">    </span>System.<span style="color:#9876aa;font-style:italic">out</span>.println(sc.<wbr>toString())<span style="color:#cc7832">;<br></span>} <span style="color:#cc7832">catch </span>(FileNotFoundException e) {<br>    e.printStackTrace()<span style="color:#cc7832">;<br></span>}</pre></div><div><br></div><div>Obviously the print line is not enough to iterate through the AST. Reading the documentation, there seems to be no iterator however. <a href="http://www.sable.mcgill.ca/~plam/doc/soot/jimple/parser/JimpleAST.html" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.sable.mcgill.ca%2F~plam%2Fdoc%2Fsoot%2Fjimple%2Fparser%2FJimpleAST.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHYuu80otsUNVqtWfh9ysP29ehxKg';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.sable.mcgill.ca%2F~plam%2Fdoc%2Fsoot%2Fjimple%2Fparser%2FJimpleAST.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHYuu80otsUNVqtWfh9ysP29ehxKg';return true;">http://www.sable.<wbr>mcgill.ca/~plam/doc/soot/<wbr>jimple/parser/JimpleAST.html</a></div><div>When creating a CFG I had to iterate through the UnitGraph object, but how do I proceed now? Any hint would be greatly appreciated.</div><div><br></div><div>Best!</div></div></blockquote></div></div>