[Soot-list] Counting the number of fields, locals and classes

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Sat Feb 27 02:54:34 EST 2010


Hi Khilan.

> I was just wondering, what is the most accurate way to count the number of
> fields, locals and classes in a given program? For fields, I've tried two
> ways:

The FieldNumberer looks inadequate. Certain parts of Soot model
certain elements that are not actually fields using fields, for
instance array elements in the points-to analysis. This makes the
count higher than usual. On the other hand, the numberer will only be
called for reference/typed fields, which makes the count appear too
low, as you say. So iterating through all (application?) classes seems
to make more sense.

Eric


More information about the Soot-list mailing list