Fork me on GitHub

soot:soot

Full name:

net.ju-n.maven.plugins:soot-maven-plugin:0.1.1:soot

Description:

Mojo that invokes Soot.

Attributes:

  • Requires a Maven project to be executed.
  • Since version: 0.1.
  • Binds by default to the lifecycle phase: compile.

Optional Parameters

Name Type Since Description
allowPhantomRefs boolean 0.1 Allow Soot to process a class even if it cannot find all classes referenced by that class. This may cause Soot to produce incorrect results.
Default value is: false.
applicationMode boolean 0.1 Run in application mode, processing all classes referenced by argument classes.
Default value is: false.
astMetrics boolean 0.1 If this flag is set and soot converts java to jimple then AST metrics will be computed.
Default value is: TODO.
debug boolean 0.1 Print various debugging information as Soot runs, particularly from the Baf Body Phase and the Jimple Annotation Pack Phase.
Default value is: false.
debugResolver boolean 0.1 Print debugging information about class resolving.
Default value is: false.
dumpBody List 0.1 Dump the internal representation of each method before and after given phase.
dumpCfg List 0.1 Dump the internal representation of each CFG constructed during given phase.
dynamicClasses List 0.1 Note that class may be loaded dynamically. Mark class as a class which the application may load dynamically. Soot will read it as a library class even if it is not referenced from the argument classes. This permits whole program optimizations on programs which load classes dynamically if the set of classes that can be loaded is known at compile time.
dynamicDirectories List 0.1 Mark all class files in directory as classes that may be loaded dynamically. Soot will read them as library classes even if they are not referenced from the argument classes. You can specify more than one directory of potentially dynamic classes by specifying multiple dynamic directory options.
dynamicPackages List 0.1 Marks all class files belonging to the package package or any of its subpackages as classes which the application may load dynamically. Soot will read all classes in package as library classes, even if they are not referenced by any of the argument classes.
excludes List 0.1 Exclude classes in pkg from application classes. Excludes any classes in packages whose names begin with pkg from the set of application classes which are analyzed and output, treating them as library classes instead. This option allows you to selectively exclude classes which would normally be treated as application classes. You can use the exclude option multiple times, to designate the classes of multiple packages as library classes. If you specify both include and exclude options, first the classes from all excluded packages are marked as library classes, then the classes from all included packages are marked as application classes.
fullResolver boolean 0.1 Normally, Soot resolves only that application classes and any classes that they refer to, along with any classes it needs for the Jimple typing, but it does not transitively resolve references in these additional classes that were resolved only because they were referenced. This switch forces full transitive resolution of all references found in all classes that are resolved, regardless of why they were resolved. In whole-program mode, class resolution is always fully transitive. Therefore, in whole-program mode, this switch has no effect, and class resolution is always performed as if it were turned on.
Default value is: false.
gzip boolean 0.1 GZip IR output files. This option causes Soot to compress output files of intermediate representations with GZip. It does not apply to class files output by Soot.
Default value is: false.
help boolean 0.1 Display the textual help message and exit immediately without further processing.
Default value is: false.
includeAll boolean 0.1 Set default excluded packages to empty list. Soot uses a default list of packages (such as java.) which are deemed to contain library classes. This switch removes the default packages from the list of packages containing library classes. Individual packages can then be added using the exclude option.
Default value is: TODO.
includes List 0.1 Include classes in pkg as application classes. Designate classes in packages whose names begin with pkg (e.g.java.util.) as application classes which should be analyzed and output. This option allows you to selectively analyze classes in some packages that Soot normally treats as library classes. You can use the include option multiple times, to designate the classes of multiple packages as application classes. If you specify both include and exclude options, first the classes from all excluded packages are marked as library classes, then the classes from all included packages are marked as application classes.
interactiveMode boolean 0.1 Runs interactively, with Soot providing detailed information as it iterates through intra-procedural analyses.
Default value is: false.
j2me boolean 0.1 Use J2ME mode. J2ME does not have class Cloneable nor Serializable, so we have to change type assignment to not refer to those classes.
Default value is: false.
keepBytecodeOffset boolean 0.1 Maintain bytecode offset tables for class files throughout the transformations.
Default value is: false.
keepLineNumber boolean 0.1 Keep line number tables. Preserve line number tables for class files throughout the // transformations.
Default value is: true.
mainClass String 0.1 By default, the first class encountered with a main method is treated as the main class (entry point) in whole- program analysis. This option overrides this default.
noBodiesForExcluded boolean 0.1 Prevents Soot from loading method bodies for all excluded classes (see exclude option), even when running in whole-program mode. This is useful for computing a shallow points-to analysis that does not, for instance, take into account the JDK. Of course, such analyses may be unsound. You get what you are asking for.
Default value is: false.
noOutputInnerClassesAttribute boolean 0.1 Don't output inner classes attribute in class files. Don't output inner classes attribute in class files.
Default value is: false.
noOutputSourceFileAttribute boolean 0.1 Don't output Source File Attribute when producing class files.
Default value is: false.
omitExceptingUnitEdges boolean 0.1 Omit CFG edges to handlers from excepting units which lack side effects. When constructing an ExceptionalUnitGraph or ExceptionalBlockGraph, include edges to an exception handler only from the predecessors of an instruction which may throw an exception to the handler, and not from the excepting instruction itself, unless the excepting instruction has potential side effects. Omitting edges from excepting units allows more accurate flow analyses (since if an instruction without side effects throws an exception, it has not changed the state of the computation). This accuracy, though, could lead optimizations to generate unverifiable code, since the dataflow analyses performed by bytecode verifiers might include paths to exception handlers from all protected instructions, regardless of whether the instructions have side effects. (In practice, the pedantic throw analysis suffices to pass verification in all VMs tested with Soot to date, but the JVM specification does allow for less discriminating verifiers which would reject some code that might be generated using the pedantic throw analysis without also adding edges from all excepting units.)
Default value is: false.
outputDirectory String 0.1 Store output files in directory. directory may be relative to the working directory.
User property is: project.build.outputDirectory.
outputFormat SootMojo$OutputFormat 0.1 Specify the format of output files Soot should produce, if any. Note that while the abbreviated formats (jimp, shimp,b, andgrimp) are easier to read than their unabbreviated counterparts (jimple, shimple,baf, and grimple), they may contain ambiguities. Method signatures in the abbreviated formats, for instance, are not uniquely determined.
Default value is: CLASS.
outputJar boolean 0.1 Make output dir a Jar file instead of dir. The output Jar file name should be specified using the outputDirectory option. Note that if the output Jar file exists before Soot runs, any files inside it will first be removed.
Default value is: false.
phaseHelp List 0.1 Print a help message about the phase or sub-phase named phase, then exit. To see the help message of more than one phase, specify multiple phase-help options.
phaseList boolean 0.1 Print a list of the available phases and sub-phases, then exit.
Default value is: false.
polyglot boolean 0.1 Use Java 1.4 Polyglot frontend instead of JastAdd, which supports Java 5 syntax.
Default value is: false.
prependClasspath boolean 0.1 Instead of replacing the default soot classpath with the classpath given on the command line, prepent it with that classpath. The default classpath holds whatever is set in the CLASSPATH environment variable, followed by rt.jar (resolved through the JAVA-UNDERSCORE-HOME environment variable). If whole-program mode is enabled, jce.jar is also appended in the end.
Default value is: true.
printTags boolean 0.1 Print in output files (either in Jimple or Dave) a variety of tags which Soot has attached to its internal representations of the application classes. The tags will be printed on the line succeeding the stmt that they are attached to.
Default value is: false.
processDirectory List 0.1 Add all classes found in directory to the set of argument classes which is analyzed and transformed by Soot. You can specify the option more than once, to add argument classes from multiple directories. You can also state JAR files. If subdirectories of directory contain .class or .jimple files, Soot assumes that the subdirectory names correspond to components of the classes' package names. If directory containssubA/subB/MyClass.class, for instance, then Soot assumes MyClass is in package subA.subB.
User property is: project.build.outputDirectory.
showExceptionDests boolean 0.1 Include exception destination edges as well as CFG edges in dumped CFGs. Indicate whether to show exception destination edges as well as control flow edges in dumps of exceptional control flow graphs.
Default value is: true.
sootClasspath String 0.1 Use path as the list of directories in which Soot should search for classes. path should be a series of directories, separated by the path separator character for your system. If no classpath is set on the command line, but the system property soot.class.path has been set, Soot uses its value as the classpath. If neither the command line nor the system properties specify a Soot classpath, Soot falls back on a default classpath consisting of the value of the system property java.class.path followed by java.home/lib/rt.jar, where java.home stands for the contents of the system property java.home and / stands for the system file separator.
User property is: project.build.outputDirectory.
sourcePrecedence SootMojo$SourcePrecedence 0.1 Sets format as Soot's preference for the type of source files to read when it looks for a class.
Default value is: CLASS.
subtractGC boolean 0.1 Attempt to subtract time spent in garbage collection from the reports of times required for transformations.
Default value is: false.
throwAnalysis SootMojo$ThrowAnalysis 0.1 This option specifies how to estimate the exceptions which each statement may throw when constructing exceptional CFGs.
Default value is: UNIT.
time boolean 0.1 Report the time required to perform some of Soot's transformations.
Default value is: false.
unfriendlyMode boolean 0.1 With this option, Soot does not stop even if it received no command-line options. Useful when setting Soot options programmatically and then calling soot.Main.main() with an empty list.
Default value is: true.
validate boolean 0.1 Causes internal checks to be done on bodies in the various Soot IRs,to make sure the transformations have not done something strange. This option may degrade Soot's performance.
Default value is: false.
verbose boolean 0.1 Provide detailed information about what Soot is doing as it runs.
Default value is: false.
version boolean 0.1 Display information about the version of Soot being run, then exit without further processing.
Default value is: false.
viaGrimp boolean 0.1 Convert Jimple to bytecode via the Grimp intermediate representation instead of via the Baf intermediate representation.
Default value is: false.
viaShimple boolean 0.1 Enable Shimple, Soot's SSA representation. This generates Shimple bodies for the application classes, optionally transforms them with analyses that run on SSA form, then turns them back into Jimple for processing by the rest of Soot. For more information, see the documentation for theshimp,stp, and sop phases.
Default value is: false.
wholeProgram boolean 0.1 Run in whole program mode, taking into consideration the whole program when performing analyses and transformations. Soot uses the Call Graph Constructor to build a call graph for the program, then applies enabled transformations in the Whole-Jimple Transformation, Whole-Jimple Optimization, and Whole-Jimple Annotation packs before applying enabled intraprocedural transformations. Note that the Whole-Jimple Optimization pack is normally disabled (and thus not applied by whole program mode), unless you also specify the Whole Program Optimize option.
Default value is: false.
wholeShimple boolean 0.1 Run in whole shimple mode, taking into consideration the whole program when performing Shimple analyses and transformations. Soot uses the Call Graph Constructor to build a call graph for the program, then applies enabled transformations in the Whole-Shimple Transformation and Whole-Shimple Optimization before applying enabled intraprocedural transformations. Note that the Whole-Shimple Optimization pack is normally disabled (and thus not applied by whole shimple mode), unless you also specify the Whole Program Optimize option.
Default value is: false.
xmlAttributes boolean 0.1 Save in XML format a variety of tags which Soot has attached to its internal representations of the application classes. The XML file can then be read by the Soot plug-in for the Eclipse IDE, which can display the annotations together with the program source, to aid program understanding.
Default value is: false.

Parameter Details

allowPhantomRefs:

Allow Soot to process a class even if it cannot find all classes referenced by that class. This may cause Soot to produce incorrect results.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

applicationMode:

Run in application mode, processing all classes referenced by argument classes.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

astMetrics:

If this flag is set and soot converts java to jimple then AST metrics will be computed.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: TODO

debug:

Print various debugging information as Soot runs, particularly from the Baf Body Phase and the Jimple Annotation Pack Phase.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

debugResolver:

Print debugging information about class resolving.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

dumpBody:

Dump the internal representation of each method before and after given phase.
  • Type: java.util.List
  • Since: 0.1
  • Required: No

dumpCfg:

Dump the internal representation of each CFG constructed during given phase.
  • Type: java.util.List
  • Since: 0.1
  • Required: No

dynamicClasses:

Note that class may be loaded dynamically. Mark class as a class which the application may load dynamically. Soot will read it as a library class even if it is not referenced from the argument classes. This permits whole program optimizations on programs which load classes dynamically if the set of classes that can be loaded is known at compile time.
  • Type: java.util.List
  • Since: 0.1
  • Required: No

dynamicDirectories:

Mark all class files in directory as classes that may be loaded dynamically. Soot will read them as library classes even if they are not referenced from the argument classes. You can specify more than one directory of potentially dynamic classes by specifying multiple dynamic directory options.
  • Type: java.util.List
  • Since: 0.1
  • Required: No

dynamicPackages:

Marks all class files belonging to the package package or any of its subpackages as classes which the application may load dynamically. Soot will read all classes in package as library classes, even if they are not referenced by any of the argument classes.
  • Type: java.util.List
  • Since: 0.1
  • Required: No

excludes:

Exclude classes in pkg from application classes. Excludes any classes in packages whose names begin with pkg from the set of application classes which are analyzed and output, treating them as library classes instead. This option allows you to selectively exclude classes which would normally be treated as application classes. You can use the exclude option multiple times, to designate the classes of multiple packages as library classes. If you specify both include and exclude options, first the classes from all excluded packages are marked as library classes, then the classes from all included packages are marked as application classes.
  • Type: java.util.List
  • Since: 0.1
  • Required: No

fullResolver:

Normally, Soot resolves only that application classes and any classes that they refer to, along with any classes it needs for the Jimple typing, but it does not transitively resolve references in these additional classes that were resolved only because they were referenced. This switch forces full transitive resolution of all references found in all classes that are resolved, regardless of why they were resolved. In whole-program mode, class resolution is always fully transitive. Therefore, in whole-program mode, this switch has no effect, and class resolution is always performed as if it were turned on.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

gzip:

GZip IR output files. This option causes Soot to compress output files of intermediate representations with GZip. It does not apply to class files output by Soot.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

help:

Display the textual help message and exit immediately without further processing.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

includeAll:

Set default excluded packages to empty list. Soot uses a default list of packages (such as java.) which are deemed to contain library classes. This switch removes the default packages from the list of packages containing library classes. Individual packages can then be added using the exclude option.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: TODO

includes:

Include classes in pkg as application classes. Designate classes in packages whose names begin with pkg (e.g.java.util.) as application classes which should be analyzed and output. This option allows you to selectively analyze classes in some packages that Soot normally treats as library classes. You can use the include option multiple times, to designate the classes of multiple packages as application classes. If you specify both include and exclude options, first the classes from all excluded packages are marked as library classes, then the classes from all included packages are marked as application classes.
  • Type: java.util.List
  • Since: 0.1
  • Required: No

interactiveMode:

Runs interactively, with Soot providing detailed information as it iterates through intra-procedural analyses.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

j2me:

Use J2ME mode. J2ME does not have class Cloneable nor Serializable, so we have to change type assignment to not refer to those classes.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

keepBytecodeOffset:

Maintain bytecode offset tables for class files throughout the transformations.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

keepLineNumber:

Keep line number tables. Preserve line number tables for class files throughout the // transformations.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: true

mainClass:

By default, the first class encountered with a main method is treated as the main class (entry point) in whole- program analysis. This option overrides this default.
  • Type: java.lang.String
  • Since: 0.1
  • Required: No

noBodiesForExcluded:

Prevents Soot from loading method bodies for all excluded classes (see exclude option), even when running in whole-program mode. This is useful for computing a shallow points-to analysis that does not, for instance, take into account the JDK. Of course, such analyses may be unsound. You get what you are asking for.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

noOutputInnerClassesAttribute:

Don't output inner classes attribute in class files. Don't output inner classes attribute in class files.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

noOutputSourceFileAttribute:

Don't output Source File Attribute when producing class files.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

omitExceptingUnitEdges:

Omit CFG edges to handlers from excepting units which lack side effects. When constructing an ExceptionalUnitGraph or ExceptionalBlockGraph, include edges to an exception handler only from the predecessors of an instruction which may throw an exception to the handler, and not from the excepting instruction itself, unless the excepting instruction has potential side effects. Omitting edges from excepting units allows more accurate flow analyses (since if an instruction without side effects throws an exception, it has not changed the state of the computation). This accuracy, though, could lead optimizations to generate unverifiable code, since the dataflow analyses performed by bytecode verifiers might include paths to exception handlers from all protected instructions, regardless of whether the instructions have side effects. (In practice, the pedantic throw analysis suffices to pass verification in all VMs tested with Soot to date, but the JVM specification does allow for less discriminating verifiers which would reject some code that might be generated using the pedantic throw analysis without also adding edges from all excepting units.)
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

outputDirectory:

Store output files in directory. directory may be relative to the working directory.
  • Type: java.lang.String
  • Since: 0.1
  • Required: No
  • User Property: project.build.outputDirectory

outputFormat:

Specify the format of output files Soot should produce, if any. Note that while the abbreviated formats (jimp, shimp,b, andgrimp) are easier to read than their unabbreviated counterparts (jimple, shimple,baf, and grimple), they may contain ambiguities. Method signatures in the abbreviated formats, for instance, are not uniquely determined.
  • Type: net.nicoulaj.maven.plugins.soot.SootMojo$OutputFormat
  • Since: 0.1
  • Required: No
  • Default: CLASS

outputJar:

Make output dir a Jar file instead of dir. The output Jar file name should be specified using the outputDirectory option. Note that if the output Jar file exists before Soot runs, any files inside it will first be removed.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

phaseHelp:

Print a help message about the phase or sub-phase named phase, then exit. To see the help message of more than one phase, specify multiple phase-help options.
  • Type: java.util.List
  • Since: 0.1
  • Required: No

phaseList:

Print a list of the available phases and sub-phases, then exit.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

polyglot:

Use Java 1.4 Polyglot frontend instead of JastAdd, which supports Java 5 syntax.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

prependClasspath:

Instead of replacing the default soot classpath with the classpath given on the command line, prepent it with that classpath. The default classpath holds whatever is set in the CLASSPATH environment variable, followed by rt.jar (resolved through the JAVA-UNDERSCORE-HOME environment variable). If whole-program mode is enabled, jce.jar is also appended in the end.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: true

printTags:

Print in output files (either in Jimple or Dave) a variety of tags which Soot has attached to its internal representations of the application classes. The tags will be printed on the line succeeding the stmt that they are attached to.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

processDirectory:

Add all classes found in directory to the set of argument classes which is analyzed and transformed by Soot. You can specify the option more than once, to add argument classes from multiple directories. You can also state JAR files. If subdirectories of directory contain .class or .jimple files, Soot assumes that the subdirectory names correspond to components of the classes' package names. If directory containssubA/subB/MyClass.class, for instance, then Soot assumes MyClass is in package subA.subB.
  • Type: java.util.List
  • Since: 0.1
  • Required: No
  • User Property: project.build.outputDirectory

showExceptionDests:

Include exception destination edges as well as CFG edges in dumped CFGs. Indicate whether to show exception destination edges as well as control flow edges in dumps of exceptional control flow graphs.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: true

sootClasspath:

Use path as the list of directories in which Soot should search for classes. path should be a series of directories, separated by the path separator character for your system. If no classpath is set on the command line, but the system property soot.class.path has been set, Soot uses its value as the classpath. If neither the command line nor the system properties specify a Soot classpath, Soot falls back on a default classpath consisting of the value of the system property java.class.path followed by java.home/lib/rt.jar, where java.home stands for the contents of the system property java.home and / stands for the system file separator.
  • Type: java.lang.String
  • Since: 0.1
  • Required: No
  • User Property: project.build.outputDirectory

sourcePrecedence:

Sets format as Soot's preference for the type of source files to read when it looks for a class.
  • Type: net.nicoulaj.maven.plugins.soot.SootMojo$SourcePrecedence
  • Since: 0.1
  • Required: No
  • Default: CLASS

subtractGC:

Attempt to subtract time spent in garbage collection from the reports of times required for transformations.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

throwAnalysis:

This option specifies how to estimate the exceptions which each statement may throw when constructing exceptional CFGs.
  • Type: net.nicoulaj.maven.plugins.soot.SootMojo$ThrowAnalysis
  • Since: 0.1
  • Required: No
  • Default: UNIT

time:

Report the time required to perform some of Soot's transformations.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

unfriendlyMode:

With this option, Soot does not stop even if it received no command-line options. Useful when setting Soot options programmatically and then calling soot.Main.main() with an empty list.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: true

validate:

Causes internal checks to be done on bodies in the various Soot IRs,to make sure the transformations have not done something strange. This option may degrade Soot's performance.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

verbose:

Provide detailed information about what Soot is doing as it runs.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

version:

Display information about the version of Soot being run, then exit without further processing.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

viaGrimp:

Convert Jimple to bytecode via the Grimp intermediate representation instead of via the Baf intermediate representation.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

viaShimple:

Enable Shimple, Soot's SSA representation. This generates Shimple bodies for the application classes, optionally transforms them with analyses that run on SSA form, then turns them back into Jimple for processing by the rest of Soot. For more information, see the documentation for theshimp,stp, and sop phases.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

wholeProgram:

Run in whole program mode, taking into consideration the whole program when performing analyses and transformations. Soot uses the Call Graph Constructor to build a call graph for the program, then applies enabled transformations in the Whole-Jimple Transformation, Whole-Jimple Optimization, and Whole-Jimple Annotation packs before applying enabled intraprocedural transformations. Note that the Whole-Jimple Optimization pack is normally disabled (and thus not applied by whole program mode), unless you also specify the Whole Program Optimize option.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

wholeShimple:

Run in whole shimple mode, taking into consideration the whole program when performing Shimple analyses and transformations. Soot uses the Call Graph Constructor to build a call graph for the program, then applies enabled transformations in the Whole-Shimple Transformation and Whole-Shimple Optimization before applying enabled intraprocedural transformations. Note that the Whole-Shimple Optimization pack is normally disabled (and thus not applied by whole shimple mode), unless you also specify the Whole Program Optimize option.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false

xmlAttributes:

Save in XML format a variety of tags which Soot has attached to its internal representations of the application classes. The XML file can then be read by the Soot plug-in for the Eclipse IDE, which can display the annotations together with the program source, to aid program understanding.
  • Type: boolean
  • Since: 0.1
  • Required: No
  • Default: false