[Soot-list] About reaching definitions analysis in soot

Marc-Andre Laverdiere-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Fri Mar 28 09:46:01 EDT 2014


Hello,

By the way, have a look at the Soot options and phase options. There is 
an option to keep the variable names that mostly works (some edge cases 
are there, but hopefully you'll be fine). You can set an option in phase 
jb: use-original-names:true.

-- 
Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 2014-03-28 02:52, Steven Lee wrote:
> Hello M Alsob:
>
> 1.I have also found SimpleLocalDefs, which seems indeed a solution of my
> problem, I think the method getDefsOfAt(Local l, Unit s) may be helpful.
> But now I’m wondering how to obtain some Locals in a Unit? The Unit
> class only offers methods like getUseBoxes() which gives me the
> ValueBox, then the Value of those Locals, not a Local class instance.
>
> 2.What I really want to do is mark something in the source code
> directly, for example, find one variable, then all the places where the
> value of this variable is being changed. If the work of my first problem
> above goes well, I can do this in a jimple file, then how do I know one
> Local in jimple file is corresponding to which one variable in source
> file? And the definition sites also? So the line number option is
> necessary, except this, I also need to know the source variables’ and
> the jimple Locals’ mapping list(or something else similar). Now I’m
> reading the annotation part of soot, am I on the correct direction?
>
> Thanks for your help! J
>
> *From:* M Alsob [mailto:m99m20 at hotmail.com]
> *Sent:* Thursday, March 27, 2014 22:14
> *To:* Steven Arzt; 'Steven Lee'; soot-list at sable.mcgill.ca
> *Subject:* Re: [Soot-list] About reaching definitions analysis in soot
>
> Hi Steven,
>
>  1. you can use SimpleLocalDefs, simply create an instance from the
>     class and then pass the unit graph : SimpleLocalDefs sld = new
>     SimpleLocalDefs(unitGraph);
>
>  2. do you mean how to relate the jimple file to the source code? if so,
>     use the keep line number option, this way you know what line in the
>     source generated a certain part of the jimple code!
>
> -modhi
>
> Sent from Windows Mail
>
> *From:*Steven Arzt <mailto:Steven.Arzt at cased.de>
> *Sent:* ‎Thursday‎, ‎March‎ ‎27‎, ‎2014 ‎4‎:‎45‎ ‎AM
> *To:* 'Steven Lee' <mailto:Elderry at outlook.com>,
> soot-list at sable.mcgill.ca <mailto:soot-list at sable.mcgill.ca>
>
> Hi Steven,
>
> Soot implements an interprocedural reaching definitions analysis based
> on the Heros IFDS/IDE framework. Actually, this is one of the example
> problem implementations we ship with Soot to show how Heros is used with
> Soot. You can find the implementation in class
> ”soot.jimple.toolkits.ide.exampleproblems. IFDSReachingDefinitions”.
> What you need to do to use it, is fairly simple: Create an instance of
> the IFDSSolver class, give it an instance of the problem class above,
> call “solve” and fetch the results using “resultsAt”.
>
> Best regards,
>
>    Steven
>
> PS: It’s funny to  reply to someone who has the same first name ^^
>
> M.Sc. M.Sc. Steven Arzt
>
> Secure Software Engineering Group (SSE)
>
> European Center for Security and Privacy by Design (EC SPRIDE)
>
> Mornewegstraße 32
>
> D-64293 Darmstadt
>
> Phone: +49 61 51 16-75426
>
> Fax: +49 61 51 16-72118
>
> eMail: steven.arzt at ec-spride.de <mailto:steven.arzt at ec-spride.de>
>
> Web: http://sse.ec-spride.de <http://sse.ec-spride.de/>
>
> *Von:*soot-list-bounces at sable.mcgill.ca
> <mailto:soot-list-bounces at sable.mcgill.ca>
> [mailto:soot-list-bounces at sable.mcgill.ca] *Im Auftrag von *Steven Lee
> *Gesendet:* Donnerstag, 27. März 2014 08:00
> *An:* Soot Group
> *Betreff:* [Soot-list] About reaching definitions analysis in soot
>
> Hello everyone, would anyone can help me with some questions?
>
> 1.How to do reaching definitions analysis with soot? Does soot already
> implement it, or I need to implement it myself with the data-flow
> framework?
>
> 2.I want to do this analysis for some java source code and then mark
> each variables potential definitions, but I find that soot does its main
> analysis on the corresponding jimple file. So my question is: if I
> finished the analysis on a jimple file, how to I transform these results
> to my java source file?
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>


More information about the Soot-list mailing list