[Soot-list] Performing analysis on Java Source Code

John Dee jdsoot at hotmail.com
Fri Jul 8 19:48:55 EDT 2011


Hi there. 
I am interested in using Soot to perform some program slicing.
However, ultimately, I will need to be able to map the analysis (jimple code) back to the java source code in order to remove some source code. I can perform the code manipulation using Eclipse JDT.
I have read from the following thread (http://www.sable.mcgill.ca/pipermail/soot-list/2011-February/003495.html)that the way to be able to map jimple code back to java source code is by preserving the line number when performing the analysis. My question therefore is,how can you perform analysis from Java source code using Soot, instead of bytecode? I was working through the tutorials todayand came across a code snippet:
public static void main(String... args) {	args = new String[]{"soot.backward.analysis.TestClass"};	SootClass sClass = Scene.v().loadClassAndSupport(args[0]);	sClass.setApplicationClass();		// ...}
As you can see above, the 'loadClassAndSupport' method is called on the 'TestClass' to load the class.However, will using the above code mean that the produced Jimple representation is generated from java bytecodeor java source code? 
Many thanks,JD 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20110709/acfa6b0e/attachment.html 


More information about the Soot-list mailing list