[Soot-list] Rendering an AST

Anjan Karmakar anjan8 at gmail.com
Mon Nov 11 09:01:39 EST 2019


Hi @reijin!

Did you eventually find a solution to the problem?
Did you manage to graphically represent the AST?

Best,
Anjan

On Monday, February 26, 2018 at 2:30:59 PM UTC+1, reijin wrote:
>
> Hi!
>
> 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:
>
> try {
>     InputStream is = new FileInputStream(jf);
>     JimpleAST jast = new JimpleAST(is);
>     SootClass sc = jast.createSootClass();
>     System.out.println(sc.toString());
> } catch (FileNotFoundException e) {
>     e.printStackTrace();
> }
>
>
> Obviously the print line is not enough to iterate through the AST. Reading 
> the documentation, there seems to be no iterator however. 
> http://www.sable.mcgill.ca/~plam/doc/soot/jimple/parser/JimpleAST.html
> When creating a CFG I had to iterate through the UnitGraph object, but how 
> do I proceed now? Any hint would be greatly appreciated.
>
> Best!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20191111/feeef7c9/attachment.html>


More information about the Soot-list mailing list