soot.options
Class CGOptions
java.lang.Object
|
+--soot.options.CGOptions
- public class CGOptions
- extends java.lang.Object
Option parser for Call Graph Constructor.
Constructor Summary |
CGOptions(java.util.Map options)
|
Method Summary |
boolean |
all_reachable()
All Application Class Methods Reachable --
Assume all methods of application classes are reachable.. |
boolean |
enabled()
Enabled --
. |
boolean |
safe_forname()
Safe forName --
Handle Class.forName() calls conservatively. |
boolean |
safe_newinstance()
Safe newInstance --
Handle Class.newInstance() calls conservatively. |
boolean |
trim_clinit()
Trim Static Initializer Edges --
Removes redundant static initializer calls. |
boolean |
verbose()
Verbose --
Print warnings about where the call graph may be incomplete. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CGOptions
public CGOptions(java.util.Map options)
enabled
public boolean enabled()
- Enabled --
.
safe_forname
public boolean safe_forname()
- Safe forName --
Handle Class.forName() calls conservatively.
When a program calls Class.forName(), the named class is
resolved, and its static initializer executed. In many cases, it
cannot be determined statically which class will be loaded, and
which static initializer executed. When this option is set to
true, Soot will conservatively assume that any static
initializer could be executed. This may make the call graph very
large. When this option is set to false, any calls to
Class.forName() for which the class cannot be determined
statically are assumed to call no static initializers.
safe_newinstance
public boolean safe_newinstance()
- Safe newInstance --
Handle Class.newInstance() calls conservatively.
When a program calls Class.newInstance(), a new object is
created and its constructor executed. Soot does not determine
statically which type of object will be created, and which
constructor executed. When this option is set to true, Soot will
conservatively assume that any constructor could be executed.
This may make the call graph very large. When this option is set
to false, any calls to Class.newInstance() are assumed not to
call the constructor of the created object.
verbose
public boolean verbose()
- Verbose --
Print warnings about where the call graph may be incomplete.
Due to the effects of native methods and reflection, it may not
always be possible to construct a fully conservative call graph.
Setting this option to true causes Soot to point out the parts
of the call graph that may be incomplete, so that they can be
checked by hand.
all_reachable
public boolean all_reachable()
- All Application Class Methods Reachable --
Assume all methods of application classes are reachable..
When this option is false, the call graph is built starting at a
set of entry points, and only methods reachable from those entry
points are processed. Unreachable methods will not have any call
graph edges generated out of them. Setting this option to true
makes Soot consider all methods of application classes to be
reachable, so call edges are generated for all of them. This
leads to a larger call graph. For program visualization
purposes, it is sometimes desirable to include edges from
unreachable methods; although these methods are unreachable in
the version being analyzed, they may become reachable if the
program is modified.
trim_clinit
public boolean trim_clinit()
- Trim Static Initializer Edges --
Removes redundant static initializer calls.
The call graph contains an edge from each statement that could
trigger execution of a static initializer to that static
initializer. However, each static initializer is triggered only
once. When this option is enabled, after the call graph is
built, an intra-procedural analysis is performed to detect
static initializer edges leading to methods that must have
already been executed. Since these static initializers cannot be
executed again, the corresponding call graph edges are removed
from the call graph.