[Soot-list] Soot-list Digest, Vol 105, Issue 1

Zhoulai zell08v at gmail.com
Fri Jan 3 01:24:28 EST 2014


The problem of finding the exact set of values of program variables is
known to be undecidable, and approximate solutions have been extensively
studied. A value in the soot terminology is a only a variable or an
expression, and  its getValue().toString()  returns their names, but never
their values as stored in the memory.

No, such analysis is not necessarily inter-procedural as approximation can
be done intra-procedurally as well. In addition, you may want to avoid
regarding such analysis  as data-flow kind as traditional data-flow
analysis techniques are commonly not enough to give a decent approximation
of program values, in particular if you are interested in numeric values.
See A. Miné's thesis [http://www.di.ens.fr/~mine/these/index.html.en].

Zhoulai


On Fri, Jan 3, 2014 at 3:45 AM, <wangjyee at gmail.com> wrote:

> More details on the question.
>
> The primary goal is we want to excute a program and capture the varibales’
> values that has been used along the execution path, not the reference. So
> it’s kind of inter-procedural dataflow analysis and being dynamic.
>
> Thanks and best regards,
> Jingyi
>
>  *发件人:* soot-list-request at sable.mcgill.ca
> *发送时间:* 2014年1月3日 1:00
> *收件人:* soot-list at sable.mcgill.ca
> *主题:* Soot-list Digest, Vol 105, Issue 1
>
> Send Soot-list mailing list submissions to
>  soot-list at sable.mcgill.ca
>
> To subscribe or unsubscribe via the World Wide Web, visit
>  http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> or, via email, send a message with subject or body 'help' to
>  soot-list-request at sable.mcgill.ca
>
> You can reach the person managing the list at
>  soot-list-owner at sable.mcgill.ca
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Soot-list digest..."
>
>
> Today's Topics:
>
>    1. How to print out the values of variables in a valuebox in
>       soot? (Jingyi Wang)
>    2. Re: How to print out the values of variables in a valuebox in
>       soot? (Zhoulai)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 2 Jan 2014 11:36:41 +0800
> From: Jingyi Wang <wangjyee at gmail.com>
> Subject: [Soot-list] How to print out the values of variables in a
>  valuebox in soot?
> To: soot-list at sable.mcgill.ca
> Message-ID:
>  <CAJ1AeGE9gB+2bWGrnfs-=vhVJk+K-o2N+J5cBtUF+ZrHcVWELg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> This is the related code fragment where I can't print out the values from
> valuebox. May I know what's the problem?
>
> public GuaranteedDefsAnalysis(UnitGraph graph)
> {
>     super(graph);
>     DominatorsFinder df = new MHGDominatorsFinder(graph);
>     unitToGenerateSet = new HashMap<Unit, FlowSet>(graph.size() * 2 + 1,
> 0.7f);
>
>     // pre-compute generate sets
>     for(Iterator unitIt = graph.iterator(); unitIt.hasNext();){
>         Unit s = (Unit) unitIt.next();
>         FlowSet genSet = emptySet.clone();
>
>         for(Iterator domsIt = df.getDominators(s).iterator();
> domsIt.hasNext();){
>             Unit dom = (Unit) domsIt.next();
>             for(Iterator boxIt = dom.getDefBoxes().iterator();
> boxIt.hasNext();){
>                 ValueBox box = (ValueBox) boxIt.next();
>                 box.getValue().toString(); // simply using toString
> does not work
>                 if(box.getValue() instanceof Local)
>                     genSet.add(box.getValue(), genSet);
>             }
>         }
>
>         unitToGenerateSet.put(s, genSet);
>     }
>
>     doAnalysis();
> }
>
>
> --
> Wang Jingyi, PhD Student
> Information Systems Technology and Design
> Singapore University of Technology and Design
> Tel: 65-84187716
> Email: jingyi_wang at mymail.sutd.edu.sg
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140102/ff03467b/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Thu, 2 Jan 2014 12:30:18 +0100
> From: Zhoulai <zell08v at gmail.com>
> Subject: Re: [Soot-list] How to print out the values of variables in a
>  valuebox in soot?
> To: Jingyi Wang <wangjyee at gmail.com>
> Cc: Soot List <soot-list at sable.mcgill.ca>
> Message-ID:
>  <CAKV0nke6_FZKTnYsQEBUhYm=KPEs+xFURPFbV9o=uXKtjKMhcw at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> toString() returns a String, so you might have forgot to print it to your
> console~
>
> Zhoulai Fu
>
>
> On Thu, Jan 2, 2014 at 4:36 AM, Jingyi Wang <wangjyee at gmail.com> wrote:
>
> > This is the related code fragment where I can't print out the values from
> > valuebox. May I know what's the problem?
> >
> > public GuaranteedDefsAnalysis(UnitGraph graph)
> > {
> >     super(graph);
> >     DominatorsFinder df = new MHGDominatorsFinder(graph);
> >     unitToGenerateSet = new HashMap<Unit, FlowSet>(graph.size() * 2 + 1,
> 0.7f);
> >
> >     // pre-compute generate sets
> >     for(Iterator unitIt = graph.iterator(); unitIt.hasNext();){
> >         Unit s = (Unit) unitIt.next();
> >         FlowSet genSet = emptySet.clone();
> >
> >         for(Iterator domsIt = df.getDominators(s).iterator();
> domsIt.hasNext();){
> >             Unit dom = (Unit) domsIt.next();
> >             for(Iterator boxIt = dom.getDefBoxes().iterator();
> boxIt.hasNext();){
> >                 ValueBox box = (ValueBox) boxIt.next();
> >                 box.getValue().toString(); // simply using toString does
> not work
> >                 if(box.getValue() instanceof Local)
> >                     genSet.add(box.getValue(), genSet);
> >             }
> >         }
> >
> >         unitToGenerateSet.put(s, genSet);
> >     }
> >
> >     doAnalysis();
> > }
> >
> >
> > --
> > Wang Jingyi, PhD Student
> > Information Systems Technology and Design
> > Singapore University of Technology and Design
> > Tel: 65-84187716
> > Email: jingyi_wang at mymail.sutd.edu.sg
> >
> >
> >
> >
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca
> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140102/09e571db/attachment-0001.html
>
> ------------------------------
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
> End of Soot-list Digest, Vol 105, Issue 1
> *****************************************
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140103/92ff1868/attachment-0001.html 


More information about the Soot-list mailing list