On Wed, Sep 10, 2003 at 08:46:59PM -0700, Stephen Andrew Neuendorffer wrote:
> I'm finally getting around to upgrading to 2.0.1, but I've run into some
> difficulties...
>
> It used to be that a transformer declared the valid options, which was
> convenient for the rest of the world, if not for you guys, since it made a
> transformer self contained... Can this come back?
The reason for this is historical, namely that some Transformers are
repeated in different Transforms, and have different options in each
one. Under the old system, there were default defaults, which were
overridden by default options in the Transformer, which could be
overridden by default options in the Transform, which were then further
overridden by default options passed in from the pack, which were
finally overridden by the options finally specified on the command line.
We're trying to reduce the number of places where the set of options can
be specified, to reduce confusion.
It may be possible to somehow merge transform and transformer, and for
the relatively rare case when a transformer appears in more than one
transform, we could just have (possibly anonymous) subclasses of the
transformer. But I think some people trying to reuse existing
transformers might object to this strongly.
We did consider a hierarchy of packs, but decided against it, again for
historical reasons. There are still things that Soot does in between
packs that are not standard packs and phases, and we were unable to
agree on ways that this could be changed. Unfortunately, Soot is not
just a list of passes that always get executed one after another; it
takes various inputs and produces various outputs, taking possibly
very different paths along the way. This means that it's not enough to
just tell some root pack to "execute yourself and recursively all your
subpacks".
Originally, Soot was only
intra-procedural, and contained only BodyTransformers. For each method,
all of the body transformers would be executed in sequence. Then
everything associated with the method would be freed, and we would go
onto the next method. With SceneTransformers, you cannot do that; you
need to execute the SceneTransformers one after another on the whole
Scene. Currently, we first execute all the SceneTransformers that are
to be executed (if any), and then, for each method, for each
BodyTransformer, we execute it. This means that if you are not doing a
whole-program analysis (which many people don't), you don't need to have
all of the intermediate representations of all the methods loaded at the
same time; you can do one method at a time.