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

Re: ApplicationClass



Hi there...

I am replying to your several messages in one big e-mail.

On Fri, Apr 18, 2003 at 05:50:40PM +0200, Christophe Massol wrote:
> Can you help me on the notion of ApplicationClass of an object SootClass ?

Soot distinguishes between four different types of classes. They are
defined in Raja Vallee-Rai's thesis at
http://www.sable.mcgill.ca/publications/thesis/#korMastersThesis,
on page 74. Briefly, application classes are classes that are both read
and written by Soot.

On Fri, Apr 18, 2003 at 03:48:04PM +0200, Christophe Massol wrote:
> Ok I can create a PAG but how to lunch the processing method in order to build 
> the PAG object correesponding to the classes I analysed (stored into the 
> scene object) ?

The recommended method of extending Soot is by creating a subclass
of SceneTransformer or BodyTransformer, and creating a main class
that inserts it into the Scene, as described in the tutorial at
http://www.sable.mcgill.ca/soot/tutorial/analysis/, under the section
"Extending Soot". You may of course extend Soot in other ways, but then
you will have to redo some of the work that Soot already does, such
as parsing command line options and ordering the verious phases. In
future versions, we are trying to make it a bit easier to extend Soot
in other ways. Anyway, if you want to call into Spark yourself, have
a look at the SparkTransformer class, which is the SceneTransformer
that Soot normally uses to invoke Spark. Specifically, the propagation
of points-to sets is done by a Propagator that takes the PAG in its
constructor. Spark provides several different implementations of
Propagators. The most stable and generally applicable one is
PropWorklist.

On Fri, Apr 18, 2003 at 02:35:21PM +0200, Christophe Massol wrote:
> ok I resolved this problem. But I have now a problem with 
> soot.jimple.spark.sparkOptions
> 
> I don't understant what's the use of the method setImpl and how create a impl 
> class

SparkOptions is a class whose sole purpose is to provide access to the
command-line options given to Spark. setImpl() is not a setter method
(it doesn't take a parameter), but rather returns the value of the
setImpl command-line option.

On Fri, Apr 18, 2003 at 02:09:15PM +0200, Christophe Massol wrote:
> When I init the soot.jimple.spark.pag.PAG, I have this error :
> 
> Exception in thread "main" java.lang.RuntimeException:
> Aborting: can't find classfilejava.lang.Object
>         at soot.Scene.getSootClass(Scene.java:455)
>         at soot.FastHierarchy.<init>(FastHierarchy.java:123)
>         at soot.Scene.getOrMakeFastHierarchy(Scene.java:593)
>         at soot.jimple.spark.pag.PAG.<init>(PAG.java:39)
> 
> I don't know why pag don't find the java.lang.Object class... (it has the 
> classpath of this class...)

As Eric Bodden mentioned, the classpath that Soot uses is separate from
the Java classpath. If you extend Soot in the recommended way, the
default Soot classpath includes that Java classpath. It can be changed
with the --soot-classpath command-line option.

On Fri, Apr 18, 2003 at 11:43:39AM +0200, Christophe Massol wrote:
> 
> How create a java.util.Map OptionMap with default values in order to have a 
> soot.jimple.spark.SparkOptions object ?

These maps are created by the Soot option parsing code, which is mainly
in soot.Main. Look for methods with "PhaseOption" in their name. In the
development version of Soot, this code has been cleaned up and
modularized, so it will be quite different in upcoming versions of Soot.

On Fri, Apr 18, 2003 at 10:11:20AM +0200, Christophe Massol wrote:
> Do you have some examples on the use of Spark to determine the possible values 
> of a pointer ?

Not at the moment, but it is on my list of things to do in the next
month and a half or so.

I hope this answers your questions.

Ondrej