[Soot-list] Compare Value instances for equality
Matteo Ceccarello
matteo.ceccarello at gmail.com
Sun May 5 10:17:43 EDT 2013
Thank you very much, I'll definitely give it a look!
And thanks again for the other suggestions, I don't know if you got my emails, since I replied to the list digest, ops! :)
Matteo
> Hi all.
>
> Note that there's a wrapper EquivalentValue that maps equals to equivTo and the same for hashcode…
>
> Eric
>
> On 28.04.2013, at 13:14, Rohan Padhye <rohanpadhye at cse.iitb.ac.in (mailto:rohanpadhye at cse.iitb.ac.in)> wrote:
>
> > Hello Matteo,
> >
> > For atomic soot.Value subtypes such as soot.Local, you can use them
> > directly in flow sets as you will always find unique references - Java's
> > default behaviour for equals() is to test reference equality. The same
> > can be said for SootClass, SootMethod and SootField as well I think.
> >
> > For more complex soot.Value types which are made up of multiple atomic
> > Values (e.g. FieldRef or Expr), the expressions will be different
> > objects when they appear in different statements even if they have the
> > same operands/operators. These can be tested for structural equivalence
> > using the EquivTo interface that Marc-Andre mentioned if you are doing
> > something like common sub-expression elimination. Hence these classes
> > may not be suitable for use in standard Java sets if you want to group
> > expressions with common operands.
> >
> > Hope this clarifies your doubt.
> >
> > Regards,
> > Rohan
> >
> > On 2013-04-27 18:02, Matteo Ceccarello wrote:
> > > Hi all,
> > >
> > > I just started working with SOOT. I'm trying to perform a data flow
> > > analysis using `soot.Value` instances as elements of the flow sets.
> > > However
> > > it seems that none of the classes that implement that interface
> > > override
> > > the method `equals`. Am I right?
> > >
> > > If so, how can I use `soot.Value` instances in my flow analysis?
> > >
> > > Thank you very much
> > >
> > > Matteo
> > >
> > > _______________________________________________
> > > Soot-list mailing list
> > > Soot-list at sable.mcgill.ca (mailto:Soot-list at sable.mcgill.ca)
> > > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> > >
> >
> >
> > --
> > Regards,
> > Rohan Padhye
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca (mailto:Soot-list at sable.mcgill.ca)
> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >
>
>
> --
> Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
> Head of Secure Software Engineering Group at EC SPRIDE
> Tel: +49 6151 16-75422 Fax: +49 6151 16-72051
> Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca (mailto: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/20130505/c5c80323/attachment-0001.html
More information about the Soot-list
mailing list