[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is signature class?



yes, the "cannot setActiveBody error" was raised when trying to
setActiveBody for the Class Initialization method clinit(), not for
abstarct method.

Can you tellme what is the Context class and signature class? Is this
clinit() one of the context class?

You suggested me to invoke my slicer through Soot.Main, and your replies
to my questions always involve this Soot.Main. What is the procedure to
make this work, I mean how to start any Java program based on soot through
Soot.Main? 'Cause this solution to my problem of context class seems
to need me to use this Soot.Main. So, Thanks a lot for your comments
and time. :-))

Liang
------

> I don't think that the problem is that it's trying to set the active body
> for an abstract method; in that case, the error reported would've been
> 'cannot set body for non-concrete method!'.
> 
> What is the method in question?  What class does it belong to?  I think
> that the class is either (1) not loadable (because it's not in the soot
> class path) or (2) a context class, because the --analyze-context flag
> is not set.  
> 
> You can try to fix (1) in the obvious manner, and (2) by emulating the
> following code in soot.Main:
> 
>             if (isAnalyzingLibraries)
>             {
>                 Iterator contextClassesIt = 
>                      Scene.v().getContextClasses().iterator();
>                 while (contextClassesIt.hasNext())
> 			((SootClass)contextClassesIt.next()).setLibraryClass();
>             }
> 
> By the way, the latest internal version has a really nice way of using
> external code.  You get to use soot.Main, and specify additional classes
> to load.  (Or that's the idea.  I don't quite remember how it works out in
> practice -- ask Raja.)  This might be good to look into.
> 
> pat
> 
>