[Soot-list] How to convert Jimple to Java Source Code

Barthelemy Dagenais barthed at hotmail.com
Sun Jun 3 10:44:28 EDT 2007


Hi Fayezin,

I ran into the same problem one year ago or so.

You have basically two options:

1- You can convert jimple to java using Dava (use Soot with -src-pref jimple -f 
dava).

2- When using Indus/Soot, ensure that line numbers are preserved in the jimple 
output (e.g. with the -keep-line-number option). Then, if you have access to the 
original java source file, you can create an /imperfect/ mapping between the 
sliced jimple files and the original java files. This is certainly not 
sufficient to produce compilable java, but this might be better for program 
understanding than Dava. I think this is still the solution used by Kaveri 
(Eclipse Indus plug-in) to highlight the sliced lines in the java editor.

I can elaborate more on the issues encountered with the second option if you 
choose this path.

Barthélémy

Fayezin wrote:
> Hello,
>  
> I need to convert Jimple statements to Java source code.
>  
> Let me explain what I am trying to do -
>  
> I am using the Indus slicer to produce program slices of Java programs.
> The slices come out in Jimple or Class files.
> I need to map or convert them into Java source code.
>  
> Any ideas how to achieve this?
>  
> Thanks,
>  
> Fayezin
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list




More information about the Soot-list mailing list