[Soot-list] Question about StronglyConnectedComponentsFast behaviour

Patrick Lam plam at cs.mcgill.ca
Wed Sep 21 17:06:42 EDT 2011


On 09/08/11 13:12, Eric Bodden wrote:
> I think this should be true unless you have a single-statement SCC,
> i.e., a statement jumping to itself, which would be very odd. (and
> would not terminate when executed)

I'm pretty sure that it's true. However, I just committed a fix to 
StronglyConnectedComponentsFast. It used to find a strongly connected 
component in this obviously loop-free code:

     private java.lang.String trimAnyPathSep(java.lang.String)
     {
         net.sourceforge.pmd.FileDataSource r0;
         java.lang.String r1, $r2, $r3;
         boolean $z0;

         r0 := @this;
         r1 := @parameter0;
         $r2 = net.sourceforge.pmd.FileDataSource.fileSeparator;
         $z0 = r1.startsWith($r2);
         if $z0 == 0 goto label0;

         $r3 = r1.substring(1);
         goto label1;

      label0:
         $r3 = r1;

      label1:
         return $r3;
     }

Revision 3583 contains the fix. You might want to be aware of it if you 
used StronglyConnectedComponentsFast.

pat


More information about the Soot-list mailing list