[Soot-list] Synch-aware MHP analysis?

RichardLHalpert at gmail.com RichardLHalpert at gmail.com
Wed Oct 29 13:40:35 EDT 2008


I believe soot.jimple.toolkits.thread.mhp.MhpAnalysis is package private  
because it's meant to be run only by  
soot.jimple.toolkits.thread.mhp.MhpTransformer (which does not actually  
transform the program). MhpTransformer performs the steps necessary to  
build a PegGraph, which is essentially a whole-program control flow graph.  
MhpAnalysis is meant to operate on this PegGraph. You'll notice that  
MhpTransformer doesn't currently contain a call to MhpAnalysis, but it does  
contain some timing code that is obviously meant to report the duration of  
the analysis. The actual call was removed when I initially investigated  
whether this code worked - the calls that ARE there were working  
consistently, and the calls that were removed were failing regularly. As  
you can see, the process is only really reliable up to the point of  
constructing the PegGraph. The steps that used to follow were:

run MhpAnalysis and report the duration.
run CompactStronglyConnectedComponents.java
run CompactSequentNodes.java
re-run MhpAnalysis and report the duration (for comparison to previous run)

The failures I was seeing were mostly due to changes that had happened to  
Spark and other parts of Soot between 2002 and 2006, when the Mhp code was  
not checked in. As I said before, I have no doubt that this code could be  
made to work if someone can put in the time to check it out. This analysis  
also lacks the ability to deal with virtual method calls that can't be  
statically resolved - whoever tackles the code will need to include a way  
to deal with this. The easiest way is to replace such a call (in the  
PegGraph... not necessarily in the actual code) with a type switch, like  
this:

b.foo();

becomes

if(b instanceof A)
((A)b).foo();
else if(b instanceof B)
((B)b).foo();

continuing on for whatever types b might have. The replacement code should  
work fine with the MhpAnalysis.

-Rich

On Oct 28, 2008 3:59pm, Justin <sun.newsgroup at gmail.com> wrote:
>
>
>
>
>
> Hi,
>
>
>
>
>
> I’m also working on MHP of Soot. I found the  
soot.jimple.toolkits.thread.mhp.MhpAnalysis
> is declared as package private. Is there any way to access this class  
except
> modifying it as public and rebuilding soot? I also tried extending this  
class
> but some protected methods are called from this class, which makes it  
impossible
> to extend.
>
>
>
>
>
> Thanks,
>
>
> Justin
>
>
>
>
>
>
>
> From:
> soot-list-bounces at sable.mcgill.ca  
[mailto:soot-list-bounces at sable.mcgill.ca] On
> Behalf Of Richard L. Halpert
>
> Sent: Thursday, October 23, 2008 4:22 PM
>
> To: walcott at cs.virginia.edu
>
> Cc: soot-list at sable.mcgill.ca
>
> Subject: Re: [Soot-list] Synch-aware MHP analysis?
>
>
>
>
>
>
>
> Not that I'm aware of.
> The only other MHP work I've heard of in the soot ecosystem was also
> lock-oblivious. I have no doubt that the synchronization-aware code in
> soot/jimple/toolkits/thread/mhp could be made to work reliably if someone  
had a
> little time to devote to it. It is definitely conceptually sound.
>
>
>
> According to my thesis advisor, Clark Verbrugge, who also advised the  
original
> author of this package (Lin Li), synchronization awareness doesn't  
actually
> improve precision very much in the typical case. Of course, there may be
> exceptions. What is your goal?
>
>
>
> -Rich
>
>
>
>
> On Thu, Oct 23, 2008 at 11:20 AM, Kristen Walcott  
walcott at cs.virginia.edu> wrote:
>
> Hello,
>
>
>
> I have been working with the code in the soot 2.3.0
> soot/jimple/toolkits/thread/mhp folder, and I was wondering if there is a
> synch-aware MHP analysis that is more trusted than the current
> MhpTransformer/MhpAnalysis code?
>
>
>
> Thanks,
>
> Kristen Walcott
>
>
> --
>
> ____________________________
>
> Kristen R. Walcott
>
> Department of Computer Science
>
> University of Virginia
>
> http://www.cs.virginia.edu/walcott
>
> walcott at cs.virginia.edu
>
> 814-573-1283
>
>
>
> _______________________________________________
>
> 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/20081029/355d4a32/attachment.htm


More information about the Soot-list mailing list