[Soot-list] Creating mutants in Java classes

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Fri Oct 11 09:47:10 EDT 2013


Namaskar Guru,

Are you talking static fields or instance fields? If instance fields, do
you are about distinguishing the base object or not? Are you talking
transitively or not?

There is a lot of information in the PAG - but the API isn't trivial to
use. I remember suggesting having a design session at SOAP but I don't
know what happened. If you want to go that route, you can just cast the
PointsToAnalysis object and use that.

I haven't really used it much since I'm using Heros anyway. In Heros, we
go through all the statements, so there is no need to look much for
another way to get the information :)

If you want to avoid doing the lookup, I suggest that you have a look at
Value.getUseBoxes and Body.getUseAndDefBoxes. But note that the lookup
isn't very slow anyway. I an going through JEE applications to find some
patterns of interest and I don't think it takes much more than a second.


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

On 10/08/2013 02:20 PM, Guru Devanla wrote:
> Thanks Marc-André! I have started work on this. I will try to make this
> generic so as to submit a PR.  Is there a similar method that gives "all
> references" in the set of classes to a particular member attribute. I
> understand I could loop around and figure this out. But, I thought I
> could use one if it is part of the framework.
> 
> Thanks
> Guru
> 
> 
> 
> On Thu, Sep 26, 2013 at 6:32 AM, Marc-André Laverdière
> <marc-andre.laverdiere-papineau at polymtl.ca
> <mailto:marc-andre.laverdiere-papineau at polymtl.ca>> wrote:
> 
>     Hello,
> 
>     There is nothing in place as far as I know. One challenge you may hit is
>     that the hierarchy objects (esp. FastHierarchy) are expensive to compute
>     and need to be updated every time a change is made.
> 
>     So if you do something like:
>     (this is Scala syntax - but I'm sure you get the point)
> 
>     for (abc <- worklist){
>       val fh = Scene.v.fastHierarchy
>       val toChange = computeChanges(fh.XYZ(abc))
>       changeSomething(toChange)
>     }
> 
>     Then you will waste a ton of time on the hierarchies.
> 
>     So I would suggest to use the hierarchy to determine the changes to make
>     and then make all the changes.
> 
>     So that would be (using a mutable collection for understandability)
>     val fh = Scene.v.fastHierarchy
>     val toChange = List()
>     for (abc <- worklist){
>       toChange ++= computeChanges(fh.XYZ(abc))
>     }
>     changeSomething(toChange)
> 
> 
>     As for integrating in Soot, that is just a pull request away :) That
>     being said, it would be good if you commit not just your code, but your
>     availability as a maintainer. Soot has too much unmaintained code
>     already...
> 
>     Marc-André Laverdière-Papineau
>     Doctorant - PhD Candidate
> 
>     On 09/26/2013 12:04 AM, Guru Devanla wrote:
>     > Also, if such a module is not available, would it be a good
>     addition to
>     > the toolkit? I can make it a separate module such that it can be made
>     > part of one the existing the toolkits
>     >
>     > Thanks
>     > Guru
>     >
>     >
>     > On Wed, Sep 25, 2013 at 8:41 PM, Guru Devanla <gdevan2 at uic.edu
>     <mailto:gdevan2 at uic.edu>
>     > <mailto:gdevan2 at uic.edu <mailto:gdevan2 at uic.edu>>> wrote:
>     >
>     >     Hello Soot-List,
>     >
>     >     I am in the process of generating java classes by injecting
>     various
>     >     mutants that changes the structure of classes in the inheritance
>     >     hierarchy or changes behavior of methods.
>     >
>     >     Is there any already available modules in the toolkit which does
>     >     anything close to this? I just would like to leverage existing
>     soot
>     >     extensions before I do anything from scratch.
>     >
>     >     Any pointers would be of great help!
>     >
>     >     Thanks
>     >     Guru
>     >
>     >
>     >
>     >
>     > _______________________________________________
>     > 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
>     >
>     _______________________________________________
>     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
> 
> 


More information about the Soot-list mailing list