PageRenderTime 47ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 1ms

/src/soot/options/soot_options.xml

https://github.com/Eeeeddddy/soot
XML | 6020 lines | 5836 code | 91 blank | 93 comment | 0 complexity | 9879a486b3a8764229590a7781599d2c MD5 | raw file
  1. <?xml-stylesheet type="text/xsl" href="soot_options.xsl" ?>
  2. <options>
  3. <intro>
  4. <p>
  5. The descriptions of Soot options talk about three categories of
  6. classes: argument classes, application classes, and library classes.</p>
  7. <p>
  8. <var>Argument classes</var> are those you specify explicitly to
  9. Soot. When you use Soot's command line interface, argument
  10. classes are those classes which are either listed explicitly on
  11. the command line or found in a directory specified with the
  12. <tt>-process-dir</tt> option. When you use the Soot's Eclipse
  13. plug-in, argument classes are those which you selected before
  14. starting Soot from the Navigator popup menu, or all classes in
  15. the current project if you started Soot from the Project
  16. menu.</p>
  17. <p>
  18. <var>Application classes</var> are classes that Soot analyzes,
  19. transforms, and turns into output files.</p>
  20. <p>
  21. <var>Library classes</var> are classes which are referred to,
  22. directly or indirectly, by the application classes, but which are
  23. not themselves application classes. Soot resolves these classes
  24. and reads <tt>.class</tt> or <tt>.jimple</tt> source files for
  25. them, but it does not perform transformations on library classes
  26. or write output files for them.</p>
  27. <p>
  28. All argument classes are necessarily application classes. When
  29. Soot <emph>is not</emph> in ``application mode'', argument
  30. classes are the only application classes; other classes
  31. referenced from the argument classes become library classes.</p>
  32. <p>
  33. When Soot <emph>is</emph> in application mode, every class
  34. referenced from the argument classes, directly or indirectly, is
  35. also an application class, unless its package name indicates that
  36. it is part of the standard Java runtime system.</p>
  37. <p>
  38. Users may fine-tune the designation of application and library
  39. classes using the Application Mode Options.
  40. </p>
  41. <p>
  42. Here is a simple example to clarify things. Suppose your program
  43. consists of three class files generated from the following
  44. source:
  45. <pre>
  46. // UI.java
  47. interface UI {
  48. public void display(String msg);
  49. }
  50. // HelloWorld.java
  51. class HelloWorld {
  52. public static void main(String[] arg) {
  53. UI ui = new TextUI();
  54. ui.display("Hello World");
  55. }
  56. }
  57. // TextUI.java
  58. import java.io.*;
  59. class TextUI implements UI {
  60. public void display(String msg) {
  61. System.out.println(msg);
  62. }
  63. }
  64. </pre></p>
  65. <p>
  66. If you run
  67. <pre>
  68. java soot.Main HelloWorld
  69. </pre>
  70. <tt>HelloWorld</tt> is the only argument class and the only
  71. application class. <tt>UI</tt> and <tt>TextUI</tt> are library
  72. classes, along with <tt>java.lang.System</tt>,
  73. <tt>java.lang.String</tt>, <tt>java.io.PrintStream</tt>, and a
  74. host of other classes from the Java runtime system that get
  75. dragged in indirectly by the references to <tt>String</tt> and
  76. <tt>System.out</tt>.</p>
  77. <p>
  78. If you run
  79. <pre>
  80. java soot.Main --app HelloWorld
  81. </pre>
  82. <tt>HelloWorld</tt> remains the
  83. only argument class, but the application classes include <tt>UI</tt>
  84. and <tt>TextUI</tt> as well as <tt>HelloWorld</tt>.
  85. <tt>java.lang.System</tt> et. al. remain library classes.
  86. </p>
  87. <p>
  88. If you run
  89. <pre>
  90. java soot.Main -i java. --app HelloWorld
  91. </pre>
  92. <tt>HelloWorld</tt> is still the only argument class, but the set
  93. of application classes includes the referenced Java runtime
  94. classes in packages whose names start with <tt>java.</tt> as well
  95. as <tt>HelloWorld</tt>, <tt>UI</tt>, and <tt>textUI</tt>. The set
  96. of library classes includes the referenced classes from other
  97. packages in the Java runtime.</p>
  98. </intro>
  99. <section>
  100. <name>General Options</name>
  101. <boolopt>
  102. <name>Help</name>
  103. <alias>h</alias>
  104. <alias>help</alias>
  105. <short_desc>Display help and exit</short_desc>
  106. <long_desc>
  107. Display the textual help message and exit immediately without
  108. further processing.
  109. </long_desc>
  110. </boolopt>
  111. <boolopt>
  112. <name>Phase List</name>
  113. <alias>pl</alias>
  114. <alias>phase-list</alias>
  115. <short_desc>Print list of available phases</short_desc>
  116. <long_desc>
  117. Print a list of the available phases and sub-phases, then exit.
  118. </long_desc>
  119. </boolopt>
  120. <listopt>
  121. <name>Phase Help</name>
  122. <alias>ph</alias>
  123. <alias>phase-help</alias>
  124. <set_arg_label>phase</set_arg_label>
  125. <short_desc>Print help for specified <use_arg_label/></short_desc>
  126. <long_desc>
  127. Print a help message about the phase or sub-phase named
  128. <use_arg_label/>, then exit. To see the help message of
  129. more than one phase, specify multiple phase-help options.
  130. </long_desc>
  131. </listopt>
  132. <boolopt>
  133. <name>Version</name>
  134. <alias>version</alias>
  135. <short_desc>Display version information and exit</short_desc>
  136. <long_desc>
  137. Display information about the version of Soot being run, then
  138. exit without further processing.
  139. </long_desc>
  140. </boolopt>
  141. <boolopt>
  142. <name>Verbose</name>
  143. <alias>v</alias>
  144. <alias>verbose</alias>
  145. <short_desc>Verbose mode</short_desc>
  146. <long_desc>
  147. Provide detailed information about what Soot is doing as it runs.
  148. </long_desc>
  149. </boolopt>
  150. <boolopt>
  151. <name>Interactive Mode</name>
  152. <alias>interactive-mode</alias>
  153. <short_desc>Run in interactive mode</short_desc>
  154. <long_desc>
  155. Runs interactively, with Soot providing detailed information as it iterates through intra-procedural analyses.
  156. </long_desc>
  157. </boolopt>
  158. <boolopt>
  159. <name>Unfriendly Mode</name>
  160. <alias>unfriendly-mode</alias>
  161. <short_desc>Allow Soot to run with no command-line options</short_desc>
  162. <long_desc>
  163. 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.
  164. </long_desc>
  165. </boolopt>
  166. <boolopt>
  167. <name>Application Mode</name>
  168. <alias>app</alias>
  169. <short_desc>Run in application mode</short_desc>
  170. <long_desc>
  171. <p>
  172. Run in application mode, processing all classes referenced by
  173. argument classes.</p>
  174. </long_desc>
  175. </boolopt>
  176. <boolopt>
  177. <name>Whole-Program Mode</name>
  178. <alias>w</alias>
  179. <alias>whole-program</alias>
  180. <short_desc>Run in whole-program mode</short_desc>
  181. <long_desc>
  182. <p>
  183. Run in whole program mode, taking into consideration the whole
  184. program when performing analyses and transformations. Soot
  185. uses the Call Graph Constructor to build a call graph for the
  186. program, then applies enabled transformations in the Whole-Jimple
  187. Transformation, Whole-Jimple Optimization, and Whole-Jimple
  188. Annotation packs before applying enabled intraprocedural
  189. transformations.</p>
  190. <p>
  191. Note that the Whole-Jimple Optimization pack is normally disabled
  192. (and thus not applied by whole program mode), unless you also
  193. specify the Whole Program Optimize option.</p>
  194. </long_desc>
  195. </boolopt>
  196. <boolopt>
  197. <name>Whole-Shimple Mode</name>
  198. <alias>ws</alias>
  199. <alias>whole-shimple</alias>
  200. <short_desc>Run in whole-shimple mode</short_desc>
  201. <long_desc>
  202. <p>
  203. Run in whole shimple mode, taking into consideration the whole program
  204. when performing Shimple analyses and transformations. Soot uses the
  205. Call Graph Constructor to build a call graph for the program, then
  206. applies enabled transformations in the Whole-Shimple Transformation
  207. and Whole-Shimple Optimization before applying enabled intraprocedural
  208. transformations.</p>
  209. <p>
  210. Note that the Whole-Shimple Optimization pack is normally disabled
  211. (and thus not applied by whole shimple mode), unless you also
  212. specify the Whole Program Optimize option.</p>
  213. </long_desc>
  214. </boolopt>
  215. <boolopt>
  216. <name>Validate</name>
  217. <alias>validate</alias>
  218. <short_desc>Run internal validation on bodies</short_desc>
  219. <long_desc>
  220. Causes internal checks to be done on bodies in the various Soot IRs,
  221. to make sure the transformations have not done something strange.
  222. This option may degrade Soot's performance.
  223. </long_desc>
  224. </boolopt>
  225. <boolopt>
  226. <name>Debug</name>
  227. <alias>debug</alias>
  228. <short_desc>Print various Soot debugging info</short_desc>
  229. <long_desc>
  230. Print various debugging information as Soot runs, particularly
  231. from the Baf Body Phase and the Jimple Annotation Pack Phase.
  232. </long_desc>
  233. </boolopt>
  234. <boolopt>
  235. <name>Debug Resolver</name>
  236. <alias>debug-resolver</alias>
  237. <short_desc>Print debugging info from SootResolver</short_desc>
  238. <long_desc>
  239. Print debugging information about class resolving.
  240. </long_desc>
  241. </boolopt>
  242. </section>
  243. <section>
  244. <name>Input Options</name>
  245. <stropt>
  246. <name>Soot Classpath</name>
  247. <alias>cp</alias>
  248. <alias>soot-class-path</alias>
  249. <alias>soot-classpath</alias>
  250. <set_arg_label>path</set_arg_label>
  251. <short_desc>Use <use_arg_label/> as the classpath for finding classes.</short_desc>
  252. <long_desc>
  253. <p>
  254. Use <use_arg_label/> as the list of directories in which Soot
  255. should search for classes. <use_arg_label/> should be a series of
  256. directories, separated by the path separator character for your
  257. system.</p>
  258. <p>
  259. If no classpath is set on the command line, but the system
  260. property <tt>soot.class.path</tt> has been set, Soot uses its
  261. value as the classpath.</p>
  262. <p>
  263. If neither the command line nor the system properties specify a
  264. Soot classpath, Soot falls back on a default classpath consisting
  265. of the value of the system property <tt>java.class.path</tt>
  266. followed <var>java.home</var><tt>/lib/rt.jar</tt>, where
  267. <var>java.home</var> stands for the contents of the system property
  268. <tt>java.home</tt> and <tt>/</tt> stands for the system file
  269. separator.</p>
  270. </long_desc>
  271. </stropt>
  272. <boolopt>
  273. <name>Prepend classpath</name>
  274. <alias>pp</alias>
  275. <alias>prepend-classpath</alias>
  276. <short_desc>Prepend the given soot classpath to the default classpath.</short_desc>
  277. <long_desc>
  278. <p>
  279. Instead of replacing the default soot classpath with the classpath given on the command line,
  280. prepent it with that classpath.
  281. The default classpath holds whatever is set in the CLASSPATH environment variable,
  282. followed by rt.jar (resolved through the JAVA-UNDERSCORE-HOME environment variable).
  283. If whole-program mode is enabled, jce.jar is also appended in the end.
  284. </p>
  285. </long_desc>
  286. </boolopt>
  287. <listopt>
  288. <name>Process Directories</name>
  289. <alias>process-path</alias>
  290. <alias>process-dir</alias>
  291. <set_arg_label>dir</set_arg_label>
  292. <short_desc>Process all classes found in <use_arg_label/></short_desc>
  293. <long_desc>
  294. <p>
  295. Add all classes found in <use_arg_label/> to the set of argument classes
  296. which is analyzed and transformed by Soot. You can specify the
  297. option more than once, to add argument classes from multiple directories.
  298. You can also state JAR files.
  299. </p>
  300. <p>
  301. If subdirectories of <use_arg_label/> contain <tt>.class</tt> or
  302. <tt>.jimple</tt> files, Soot assumes that the subdirectory names
  303. correspond to components of the classes' package names. If
  304. <use_arg_label/> contains <tt>subA/subB/MyClass.class</tt>, for
  305. instance, then Soot assumes <tt>MyClass</tt> is in package
  306. <tt>subA.subB</tt>.</p>
  307. </long_desc>
  308. </listopt>
  309. <boolopt>
  310. <name>One at a time</name>
  311. <alias>oaat</alias>
  312. <short_desc>From the process-dir, processes one class at a time.</short_desc>
  313. <long_desc>
  314. This option is meant to keep memory consumption low. If enabled, the
  315. -process-dir option must be used as well. From the process-dir, Soot
  316. will process one class at a time. Only body packs are run,
  317. no whole-program packs.
  318. </long_desc>
  319. </boolopt>
  320. <stropt>
  321. <name>Path to Android jar files</name>
  322. <alias>android-jars</alias>
  323. <set_arg_label>path</set_arg_label>
  324. <short_desc>Use <use_arg_label/> as the path for finding the android.jar file</short_desc>
  325. <long_desc>
  326. Use <use_arg_label/> as the directory in which Soot should search for the appropriate
  327. android.jar file to use.
  328. The directory must contain subdirectories named after the Android SDK version. Those
  329. subdirectories must each contain one android.jar file.
  330. For instance if the target directory is /home/user/androidSDK/platforms/ subdirectories
  331. containing android.jar for Android SDK 8 and 13 must be named android-8/ and android-13/
  332. respectively.
  333. Note, that this options requires that only one Android application is analyzed at a time.
  334. The Android application must contain the AndroidManifest.xml file.
  335. </long_desc>
  336. </stropt>
  337. <stropt>
  338. <name>Force specific Android jar file</name>
  339. <alias>force-android-jar</alias>
  340. <set_arg_label>path</set_arg_label>
  341. <short_desc>Force Soot to use <use_arg_label/> as the path for the android.jar file.</short_desc>
  342. <long_desc>
  343. Use <use_arg_label/> as the path to the android.jar file Soot should use.
  344. This option overrides the 'android-jars' option.
  345. </long_desc>
  346. </stropt>
  347. <boolopt>
  348. <name>Compute AST Metrics</name>
  349. <alias>ast-metrics</alias>
  350. <short_desc>Compute AST Metrics if performing java to jimple</short_desc>
  351. <long_desc>
  352. If this flag is set and soot converts java to jimple then AST metrics will be computed.
  353. </long_desc>
  354. </boolopt>
  355. <multiopt>
  356. <name>Input Source Precedence</name>
  357. <alias>src-prec</alias>
  358. <set_arg_label>format</set_arg_label>
  359. <short_desc>Sets source precedence to <use_arg_label/> files</short_desc>
  360. <long_desc>
  361. Sets <use_arg_label/> as Soot's preference for the type of source files to read when
  362. it looks for a class.
  363. </long_desc>
  364. <value>
  365. <name>Class File</name>
  366. <alias>c</alias>
  367. <alias>class</alias>
  368. <short_desc>Favour class files as Soot source</short_desc>
  369. <long_desc>
  370. Try to resolve classes first from <tt>.class</tt> files found in
  371. the Soot classpath. Fall back to <tt>.jimple</tt> files
  372. only when unable to find a <tt>.class</tt> file.
  373. </long_desc>
  374. <default/>
  375. </value>
  376. <value>
  377. <name>Only Class File</name>
  378. <alias>only-class</alias>
  379. <short_desc>Use only class files as Soot source</short_desc>
  380. <long_desc>
  381. Try to resolve classes first from <tt>.class</tt> files found in
  382. the Soot classpath. Do not try any other types of files even when
  383. unable to find a <tt>.class</tt> file.
  384. </long_desc>
  385. </value>
  386. <value>
  387. <name>Jimple File</name>
  388. <alias>J</alias>
  389. <alias>jimple</alias>
  390. <short_desc>Favour Jimple files as Soot source</short_desc>
  391. <long_desc>
  392. Try to resolve classes first from <tt>.jimple</tt> files found in
  393. the Soot classpath. Fall back to <tt>.class</tt> files only when
  394. unable to find a <tt>.jimple</tt> file.
  395. </long_desc>
  396. </value>
  397. <value>
  398. <name>Java File</name>
  399. <alias>java</alias>
  400. <short_desc>Favour Java files as Soot source</short_desc>
  401. <long_desc>
  402. Try to resolve classes first from <tt>.java</tt> files found in
  403. the Soot classpath. Fall back to <tt>.class</tt> files only when
  404. unable to find a <tt>.java</tt> file.
  405. </long_desc>
  406. </value>
  407. <value>
  408. <name>APK File</name>
  409. <alias>apk</alias>
  410. <short_desc>Favour APK files as Soot source</short_desc>
  411. <long_desc>
  412. Try to resolve classes first from <tt>.apk</tt> (Android Package) files found in
  413. the Soot classpath. Fall back to <tt>.class</tt>, <tt>.java</tt> or <tt>.jimple</tt>
  414. files only when unable to find a class in <tt>.apk</tt> files.
  415. </long_desc>
  416. </value>
  417. </multiopt>
  418. <boolopt>
  419. <name>Force complete resolver</name>
  420. <alias>full-resolver</alias>
  421. <short_desc>Force transitive resolving of referenced classes</short_desc>
  422. <long_desc>
  423. Normally, Soot resolves only that application classes and any classes that they
  424. refer to, along with any classes it needs for the Jimple typing, but it does not
  425. transitively resolve references in these additional classes that were resolved
  426. only because they were referenced. This switch forces full transitive resolution
  427. of all references found in all classes that are resolved, regardless of why they
  428. were resolved.
  429. In whole-program mode, class resolution is always fully transitive. Therefore,
  430. in whole-program mode, this switch has no effect, and class resolution is
  431. always performed as if it were turned on.
  432. </long_desc>
  433. </boolopt>
  434. <boolopt>
  435. <name>Allow Phantom References</name>
  436. <alias>allow-phantom-refs</alias>
  437. <short_desc>Allow unresolved classes; may cause errors</short_desc>
  438. <long_desc>
  439. Allow Soot to process a class even if it cannot find all classes
  440. referenced by that class. This may cause Soot to produce
  441. incorrect results.
  442. </long_desc>
  443. </boolopt>
  444. <boolopt>
  445. <name>Allow Phantom References</name>
  446. <alias>no-bodies-for-excluded</alias>
  447. <short_desc>Do not load bodies for excluded classes</short_desc>
  448. <long_desc>
  449. Prevents Soot from loading method bodies for all excluded classes (see exclude option), even
  450. when running in whole-program mode. This is useful for computing a shallow points-to analysis
  451. that does not, for instance, take into account the JDK. Of course, such analyses may be unsound.
  452. You get what you are asking for.
  453. </long_desc>
  454. </boolopt>
  455. <boolopt>
  456. <name>Use J2ME mode</name>
  457. <alias>j2me</alias>
  458. <default>false</default>
  459. <short_desc>Use J2ME mode; changes assignment of types</short_desc>
  460. <long_desc>
  461. Use J2ME mode. J2ME does not have class Cloneable nor Serializable, so we have
  462. to change type assignment to not refer to those classes.
  463. </long_desc>
  464. </boolopt>
  465. <stropt>
  466. <name>Main Class</name>
  467. <alias>main-class</alias>
  468. <set_arg_label>class</set_arg_label>
  469. <short_desc>Sets the main class for whole-program analysis.</short_desc>
  470. <long_desc>
  471. <p>
  472. By default, the first class encountered with a main method is treated
  473. as the main class (entry point) in whole-program analysis. This option
  474. overrides this default.
  475. </p>
  476. </long_desc>
  477. </stropt>
  478. <boolopt>
  479. <name>Use Polyglot frontend</name>
  480. <alias>polyglot</alias>
  481. <default>false</default>
  482. <short_desc>Use Java 1.4 Polyglot frontend instead of JastAdd</short_desc>
  483. <long_desc>
  484. Use Java 1.4 Polyglot frontend instead of JastAdd, which supports Java 5 syntax.
  485. </long_desc>
  486. </boolopt>
  487. </section>
  488. <section>
  489. <name>Output Options</name>
  490. <stropt>
  491. <name>Output Directory</name>
  492. <alias>d</alias>
  493. <alias>output-dir</alias>
  494. <default>./sootOutput</default>
  495. <set_arg_label>dir</set_arg_label>
  496. <short_desc>Store output files in <use_arg_label/></short_desc>
  497. <long_desc>
  498. Store output files in <use_arg_label/>. <use_arg_label/> may be
  499. relative to the working directory.
  500. </long_desc>
  501. </stropt>
  502. <multiopt>
  503. <name>Output Format</name>
  504. <alias>f</alias>
  505. <alias>output-format</alias>
  506. <set_arg_label>format</set_arg_label>
  507. <short_desc>Set output format for Soot</short_desc>
  508. <long_desc>
  509. <p>
  510. Specify the format of output files Soot should produce, if
  511. any.</p>
  512. <p>
  513. Note that while the abbreviated formats (<tt>jimp</tt>,
  514. <tt>shimp</tt>, <tt>b</tt>, and <tt>grimp</tt>) are easier to
  515. read than their unabbreviated counterparts (<tt>jimple</tt>,
  516. <tt>shimple</tt>, <tt>baf</tt>, and <tt>grimple</tt>), they may
  517. contain ambiguities. Method signatures in the abbreviated
  518. formats, for instance, are not uniquely determined.</p>
  519. </long_desc>
  520. <value>
  521. <name>Jimple File</name>
  522. <alias>J</alias>
  523. <alias>jimple</alias>
  524. <short_desc>Produce <tt>.jimple</tt> Files</short_desc>
  525. <long_desc>
  526. Produce <tt>.jimple</tt> files, which contain a textual
  527. form of Soot's Jimple internal representation.
  528. </long_desc>
  529. </value>
  530. <value>
  531. <name>Jimp File</name>
  532. <alias>j</alias>
  533. <alias>jimp</alias>
  534. <short_desc>Produce <tt>.jimp</tt> (abbreviated Jimple) files</short_desc>
  535. <long_desc>
  536. Produce <tt>.jimp</tt> files, which contain an abbreviated form
  537. of Jimple.
  538. </long_desc>
  539. </value>
  540. <value>
  541. <name>Shimple File</name>
  542. <alias>S</alias>
  543. <alias>shimple</alias>
  544. <short_desc>Produce <tt>.shimple</tt> files</short_desc>
  545. <long_desc>
  546. Produce <tt>.shimple files</tt>, containing a textual form of
  547. Soot's SSA Shimple internal representation. Shimple adds
  548. Phi nodes to Jimple.
  549. </long_desc>
  550. </value>
  551. <value>
  552. <name>Shimp File</name>
  553. <alias>s</alias>
  554. <alias>shimp</alias>
  555. <short_desc>Produce <tt>.shimp</tt> (abbreviated Shimple) files</short_desc>
  556. <long_desc>
  557. Produce .shimp files, which contain an abbreviated form of
  558. Shimple.
  559. </long_desc>
  560. </value>
  561. <value>
  562. <name>Baf File</name>
  563. <alias>B</alias>
  564. <alias>baf</alias>
  565. <short_desc>Produce <tt>.baf</tt> files</short_desc>
  566. <long_desc>
  567. Produce <tt>.baf</tt> files, which contain a textual form of
  568. Soot's Baf internal representation.
  569. </long_desc>
  570. </value>
  571. <value>
  572. <name>Abbreviated Baf File</name>
  573. <alias>b</alias>
  574. <short_desc>Produce <tt>.b</tt> (abbreviated Baf) files</short_desc>
  575. <long_desc>
  576. Produce <tt>.b</tt> files, which contain an abbreviated form of Baf.
  577. </long_desc>
  578. </value>
  579. <value>
  580. <name>Grimp File</name>
  581. <alias>G</alias>
  582. <alias>grimple</alias>
  583. <short_desc>Produce <tt>.grimple</tt> files</short_desc>
  584. <long_desc>
  585. Produce <tt>.grimple</tt> files, which contain a textual
  586. form of Soot's Grimp internal representation.
  587. </long_desc>
  588. </value>
  589. <value>
  590. <name>Abbreviated Grimp File</name>
  591. <alias>g</alias>
  592. <alias>grimp</alias>
  593. <short_desc>Produce <tt>.grimp</tt> (abbreviated Grimp) files</short_desc>
  594. <long_desc>
  595. Produce <tt>.grimp</tt> files, which contain an abbreviated form
  596. of Grimp.
  597. </long_desc>
  598. </value>
  599. <value>
  600. <name>Xml File</name>
  601. <alias>X</alias>
  602. <alias>xml</alias>
  603. <short_desc>Produce <tt>.xml</tt> Files</short_desc>
  604. <long_desc>
  605. Produce <tt>.xml</tt> files containing an annotated
  606. version of the Soot's Jimple internal representation.
  607. </long_desc>
  608. </value>
  609. <value>
  610. <name>Dalvik Executable File</name>
  611. <alias>dex</alias>
  612. <short_desc>Produce Dalvik Virtual Machine files</short_desc>
  613. <long_desc>Produce Dalvik Virtual Machine files. If input was an Android
  614. Package (APK), a new APK is generated with it's classes.dex replaced. If
  615. no input APK is found, only a classes.dex is generated.</long_desc>
  616. </value>
  617. <value>
  618. <name>No Output File</name>
  619. <alias>n</alias>
  620. <alias>none</alias>
  621. <short_desc>Produce no output</short_desc>
  622. <long_desc>
  623. Produce no output files.
  624. </long_desc>
  625. </value>
  626. <value>
  627. <name>Jasmin File</name>
  628. <alias>jasmin</alias>
  629. <short_desc>Produce <tt>.jasmin</tt> files</short_desc>
  630. <long_desc>
  631. Produce <tt>.jasmin</tt> files, suitable as input to the jasmin
  632. bytecode assembler.
  633. </long_desc>
  634. </value>
  635. <value>
  636. <name>Class File</name>
  637. <alias>c</alias>
  638. <alias>class</alias>
  639. <default/>
  640. <short_desc>Produce <tt>.class</tt> Files</short_desc>
  641. <long_desc>
  642. Produce Java <tt>.class</tt> files, executable by any Java
  643. Virtual Machine.
  644. </long_desc>
  645. </value>
  646. <value>
  647. <name>Dava Decompiled File</name>
  648. <alias>d</alias>
  649. <alias>dava</alias>
  650. <short_desc>Produce dava-decompiled <tt>.java</tt> files</short_desc>
  651. <long_desc>
  652. Produce <tt>.java</tt> files generated by the Dava decompiler.
  653. </long_desc>
  654. </value>
  655. <value>
  656. <name>Jimle Template File</name>
  657. <alias>t</alias>
  658. <alias>template</alias>
  659. <short_desc>Produce <tt>.java</tt> files with Jimple templates.</short_desc>
  660. <long_desc>
  661. Produce <tt>.java</tt> files with Jimple templates.
  662. </long_desc>
  663. </value>
  664. </multiopt>
  665. <boolopt>
  666. <name>Output Jar File</name>
  667. <alias>outjar</alias>
  668. <alias>output-jar</alias>
  669. <short_desc>Make output dir a Jar file instead of dir</short_desc>
  670. <long_desc>
  671. Saves output files into a Jar file instead of a directory. The output
  672. Jar file name should be specified using the Output Directory
  673. (<tt>output-dir</tt>) option. Note that if the output Jar file exists
  674. before Soot runs, any files inside it will first be removed.
  675. </long_desc>
  676. </boolopt>
  677. <boolopt>
  678. <name>Save Tags to XML</name>
  679. <alias>xml-attributes</alias>
  680. <short_desc>Save tags to XML attributes for Eclipse</short_desc>
  681. <long_desc>
  682. Save in XML format a variety of tags which Soot has attached to
  683. its internal representations of the application classes. The XML
  684. file can then be read by the Soot plug-in for the Eclipse IDE,
  685. which can display the annotations together with the program
  686. source, to aid program understanding.
  687. </long_desc>
  688. </boolopt>
  689. <boolopt>
  690. <name>Print Tags in Output</name>
  691. <alias>print-tags</alias>
  692. <alias>print-tags-in-output</alias>
  693. <short_desc>Print tags in output files after stmt</short_desc>
  694. <long_desc>
  695. Print in output files (either in Jimple or Dave) a variety of tags which
  696. Soot has attached to
  697. its internal representations of the application classes. The tags will
  698. be printed on the line succeeding the stmt that they are attached to.
  699. </long_desc>
  700. </boolopt>
  701. <boolopt>
  702. <name>Don't Output Source File Attribute</name>
  703. <alias>no-output-source-file-attribute</alias>
  704. <short_desc>Don't output Source File Attribute when producing class files</short_desc>
  705. <long_desc>
  706. Don't output Source File Attribute when producing class files.
  707. </long_desc>
  708. </boolopt>
  709. <boolopt>
  710. <name>Don't Output Inner Classes Attribute</name>
  711. <alias>no-output-inner-classes-attribute</alias>
  712. <short_desc>Don't output inner classes attribute in class files</short_desc>
  713. <long_desc>
  714. Don't output inner classes attribute in class files.
  715. </long_desc>
  716. </boolopt>
  717. <listopt>
  718. <name>Body Dumping Phases</name>
  719. <alias>dump-body</alias>
  720. <set_arg_label>phaseName</set_arg_label>
  721. <short_desc>Dump the internal representation of each method before and after phase <use_arg_label/></short_desc>
  722. <long_desc>
  723. <p>
  724. Specify that <use_arg_label/> is one of the phases to be dumped.
  725. For example <code>-dump-body jb -dump-body jb.a</code> would dump each
  726. method before and after the <code>jb</code> and <code>jb.a</code>
  727. phases. The pseudo phase name ``<code>ALL</code>''
  728. causes all phases to be dumped.</p>
  729. <p>
  730. Output files appear in subdirectories under the
  731. soot output directory, with names like
  732. <var>className</var><code>/</code><var>methodSignature</var><code>/</code><var>phasename</var><code>-</code><var>graphType</var><code>-</code><var>number</var><code>.in</code>
  733. and
  734. <var>className</var><code>/</code><var>methodSignature</var><code>/</code><var>phasename</var><code>-</code><var>graphType</var><code>-</code><var>number</var><code>.out</code>.
  735. The ``<code>in</code>'' and
  736. ``<code>out</code>'' suffixes distinguish the internal
  737. representations of the method before and after the phase
  738. executed.</p>
  739. </long_desc>
  740. </listopt>
  741. <listopt>
  742. <name>CFG Dumping Phases</name>
  743. <alias>dump-cfg</alias>
  744. <set_arg_label>phaseName</set_arg_label>
  745. <short_desc>Dump the internal representation of each CFG constructed during phase <use_arg_label/></short_desc>
  746. <long_desc>
  747. <p>
  748. Specify that any control flow graphs constructed during the
  749. <use_arg_label/> phases should be dumped.
  750. For example <code>-dump-cfg jb -dump-cfg bb.lso</code> would dump
  751. all
  752. CFGs constructed during the <code>jb</code> and <code>bb.lso</code>
  753. phases. The pseudo phase name ``<code>ALL</code>''
  754. causes CFGs constructed in all phases to be dumped.</p>
  755. <p>The control flow graphs are dumped in the form
  756. of a file containing input to <code>dot</code> graph visualization
  757. tool. Output <code>dot</code> files are stored beneath the soot
  758. output directory, in files with names like:
  759. <var>className</var><code>/</code><var>methodSignature</var><code>/</code><var>phasename</var><code>-</code><var>graphType</var><code>-</code><var>number</var><code>.dot</code>,
  760. where <var>number</var> serves to distinguish graphs in phases
  761. that produce more than one (for example, the Aggregator may
  762. produce multiple <code>ExceptionalUnitGraph</code>s).</p>
  763. </long_desc>
  764. </listopt>
  765. <boolopt>
  766. <name>Show Exception Destinations</name>
  767. <alias>show-exception-dests</alias>
  768. <default>true</default>
  769. <short_desc>Include exception destination edges as well as CFG edges in dumped CFGs</short_desc>
  770. <long_desc>
  771. Indicate whether to show exception destination edges as
  772. well as control flow edges in
  773. dumps of exceptional control flow graphs.
  774. </long_desc>
  775. </boolopt>
  776. <boolopt>
  777. <name>GZipped IR output</name>
  778. <alias>gzip</alias>
  779. <default>false</default>
  780. <short_desc>GZip IR output files</short_desc>
  781. <long_desc>
  782. This option causes Soot to compress output files of intermediate representations
  783. with GZip. It does not apply to class files output by Soot.
  784. </long_desc>
  785. </boolopt>
  786. </section>
  787. <section>
  788. <name>Processing Options</name>
  789. <phaseopt>
  790. <name>Phase Options</name>
  791. <alias>p</alias>
  792. <alias>phase-option</alias>
  793. <set_arg_label>phase opt:val</set_arg_label>
  794. <short_desc>Set <var>phase</var>&apos;s <var>opt</var> option to <var>value</var></short_desc>
  795. <long_desc>
  796. <p>
  797. Set <var>phase</var>'s run-time option named <var>opt</var> to
  798. <var>value</var>.</p>
  799. <p>
  800. This is a mechanism for specifying phase-specific options to
  801. different parts of Soot. See <var>Soot phase options</var> for
  802. details about the available phases and options.</p>
  803. </long_desc>
  804. <phase>
  805. <name>Jimple Body Creation</name>
  806. <alias>jb</alias>
  807. <class>JBOptions</class>
  808. <short_desc>Creates a <tt>JimpleBody</tt> for each method</short_desc>
  809. <long_desc>
  810. Jimple Body Creation creates a <tt>JimpleBody</tt> for each input
  811. method, using either coffi, to read <tt>.class</tt> files, or the
  812. jimple parser, to read <tt>.jimple</tt> files.
  813. </long_desc>
  814. <boolopt>
  815. <name>Enabled</name>
  816. <alias>enabled</alias>
  817. <default>true</default>
  818. <short_desc/>
  819. <long_desc/>
  820. </boolopt>
  821. <boolopt>
  822. <name>Use Original Names</name>
  823. <alias>use-original-names</alias>
  824. <default>false</default>
  825. <short_desc/>
  826. <long_desc>
  827. Retain the original names for local variables when the source
  828. includes those names. Otherwise, Soot gives variables generic
  829. names based on their types.
  830. </long_desc>
  831. </boolopt>
  832. <boolopt>
  833. <name>Preserve source-level annotations</name>
  834. <alias>preserve-source-annotations</alias>
  835. <default>false</default>
  836. <short_desc/>
  837. <long_desc>
  838. Preserves annotations of retention type SOURCE. (for
  839. everything but package and local variable annotations)
  840. </long_desc>
  841. </boolopt>
  842. <sub_phase>
  843. <name>Local Splitter</name>
  844. <alias>jb.ls</alias>
  845. <boolopt>
  846. <name>Enabled</name>
  847. <alias>enabled</alias>
  848. <default>true</default>
  849. </boolopt>
  850. <short_desc>Local splitter: one local per DU-UD web</short_desc>
  851. <long_desc>
  852. The Local Splitter identifies DU-UD webs for local variables and
  853. introduces new variables so that each disjoint web is associated
  854. with a single local.
  855. </long_desc>
  856. </sub_phase>
  857. <sub_phase>
  858. <name>Jimple Local Aggregator</name>
  859. <alias>jb.a</alias>
  860. <short_desc>Aggregator: removes some unnecessary copies</short_desc>
  861. <long_desc>
  862. <p>
  863. The Jimple Local Aggregator removes some unnecessary copies by
  864. combining local variables. Essentially, it finds definitions
  865. which have only a single use and, if it is safe to do so, removes
  866. the original definition after replacing the use with the
  867. definition's right-hand side.</p>
  868. <p>
  869. At this stage in <tt>JimpleBody</tt> construction, local
  870. aggregation serves largely to remove the copies to and from stack
  871. variables which simulate load and store instructions in the
  872. original bytecode.</p>
  873. </long_desc>
  874. <boolopt>
  875. <name>Enabled</name>
  876. <alias>enabled</alias>
  877. <default>true</default>
  878. </boolopt>
  879. <boolopt>
  880. <name>Only Stack Locals</name>
  881. <alias>only-stack-locals</alias>
  882. <long_desc>
  883. Only aggregate locals that represent stack locations in the
  884. original bytecode. (Stack locals can be distinguished in Jimple
  885. by the <dollar/> character with which their names begin.)
  886. </long_desc>
  887. <default>true</default>
  888. </boolopt>
  889. </sub_phase>
  890. <sub_phase>
  891. <name>Unused Local Eliminator</name>
  892. <alias>jb.ule</alias>
  893. <short_desc>Unused local eliminator</short_desc>
  894. <long_desc>
  895. The Unused Local Eliminator removes any unused locals from the
  896. method.
  897. </long_desc>
  898. <boolopt>
  899. <name>Enabled</name>
  900. <alias>enabled</alias>
  901. <default>true</default>
  902. </boolopt>
  903. </sub_phase>
  904. <sub_phase>
  905. <short_desc>Assigns types to locals</short_desc>
  906. <long_desc>
  907. The Type Assigner gives local variables types which will
  908. accommodate the values stored in them over the course of the
  909. method.
  910. </long_desc>
  911. <name>Type Assigner</name>
  912. <class>JBTROptions</class>
  913. <alias>jb.tr</alias>
  914. <boolopt>
  915. <name>Enabled</name>
  916. <alias>enabled</alias>
  917. <default>true</default>
  918. </boolopt>
  919. <boolopt>
  920. <name>Ignore wrong static-ness</name>
  921. <alias>ignore-wrong-staticness</alias>
  922. <default>false</default>
  923. <short_desc>Ignores errors due to wrong staticness</short_desc>
  924. <long_desc>
  925. Some projects have been shown to contain invalid bytecode that tries to access
  926. a static field or method in a non-static way or the other way around. The VM's bytecode
  927. verifier will reject such bytecode when loaded into the VM. This option, when enabled,
  928. causes to create Jimple bodies in such cases nontheless, ignoring the error.
  929. </long_desc>
  930. </boolopt>
  931. <boolopt>
  932. <name>Use older type assigner</name>
  933. <alias>use-older-type-assigner</alias>
  934. <default>false</default>
  935. <short_desc>Enables the older type assigner</short_desc>
  936. <long_desc>
  937. This enables the older type assigner that was in use until May 2008.
  938. The current type assigner is a reimplementation by Ben Bellamy
  939. that uses an entirely new and faster algorithm which always assigns
  940. the most narrow type possible. If compare-type-assigners is on,
  941. this option causes the older type assigner to execute first.
  942. (Otherwise the newer one is executed first.)
  943. </long_desc>
  944. </boolopt>
  945. <boolopt>
  946. <name>Compare type assigners</name>
  947. <alias>compare-type-assigners</alias>
  948. <default>false</default>
  949. <short_desc>Compares Ben Bellamy's and the older type assigner</short_desc>
  950. <long_desc>
  951. Enables comparison (both runtime and results) of Ben Bellamy's type assigner with the
  952. older type assigner that was in Soot.
  953. </long_desc>
  954. </boolopt>
  955. </sub_phase>
  956. <sub_phase>
  957. <name>Unsplit-originals Local Packer</name>
  958. <alias>jb.ulp</alias>
  959. <short_desc>Local packer: minimizes number of locals</short_desc>
  960. <long_desc>
  961. The Unsplit-originals Local Packer executes only when the
  962. `<tt>use-original-names</tt>&apos; option is chosen for the
  963. `<tt>jb</tt>&apos; phase. The Local Packer attempts to minimize
  964. the number of local variables required in a method by reusing the
  965. same variable for disjoint DU-UD webs. Conceptually, it is the
  966. inverse of the Local Splitter.
  967. </long_desc>
  968. <boolopt>
  969. <name>Enabled</name>
  970. <alias>enabled</alias>
  971. <default>true</default>
  972. <short_desc/>
  973. <long_desc/>
  974. </boolopt>
  975. <boolopt>
  976. <name>Unsplit Original Locals</name>
  977. <alias>unsplit-original-locals</alias>
  978. <default>true</default>
  979. <short_desc/>
  980. <long_desc>
  981. Use the variable names in the original source as a guide when
  982. determining how to share local variables among non-interfering
  983. variable usages. This recombines named locals which were split by
  984. the Local Splitter.
  985. </long_desc>
  986. </boolopt>
  987. </sub_phase>
  988. <sub_phase>
  989. <name>Local Name Standardizer</name>
  990. <alias>jb.lns</alias>
  991. <short_desc>Local name standardizer</short_desc>
  992. <long_desc>
  993. The Local Name Standardizer assigns generic names to local variables.
  994. </long_desc>
  995. <boolopt>
  996. <name>Enabled</name>
  997. <alias>enabled</alias>
  998. <default>true</default>
  999. <short_desc/>
  1000. <long_desc/>
  1001. </boolopt>
  1002. <boolopt>
  1003. <name>Only Stack Locals</name>
  1004. <alias>only-stack-locals</alias>
  1005. <default>false</default>
  1006. <short_desc/>
  1007. <long_desc>
  1008. Only standardizes the names of variables that represent stack
  1009. locations in the original bytecode. This becomes the default when
  1010. the `<tt>use-original-names</tt>&apos; option is specified for
  1011. the `<tt>jb</tt>&apos; phase.
  1012. </long_desc>
  1013. </boolopt>
  1014. </sub_phase>
  1015. <sub_phase>
  1016. <name>Copy Propagator</name>
  1017. <alias>jb.cp</alias>
  1018. <short_desc>Copy propagator</short_desc>
  1019. <long_desc>
  1020. This phase performs cascaded copy propagation.
  1021. If the propagator encounters situations of the form:
  1022. <pre>
  1023. A: a = ...;
  1024. ...
  1025. B: x = a;
  1026. ...
  1027. C: ... = ... x;
  1028. </pre>
  1029. where <tt>a</tt> and <tt>x</tt> are each defined only once (at
  1030. <tt>A</tt> and <tt>B</tt>, respectively), then it can propagate
  1031. immediately without checking between <tt>B</tt> and <tt>C</tt>
  1032. for redefinitions of <tt>a</tt>. In
  1033. this case the propagator is global.
  1034. Otherwise, if <tt>a</tt> has multiple definitions then the
  1035. propagator checks for redefinitions and propagates copies
  1036. only within extended basic blocks.
  1037. </long_desc>
  1038. <boolopt>
  1039. <name>Enabled</name>
  1040. <alias>enabled</alias>
  1041. <default>true</default>
  1042. <short_desc/>
  1043. <long_desc/>
  1044. </boolopt>
  1045. <boolopt>
  1046. <name>Only Regular Locals</name>
  1047. <alias>only-regular-locals</alias>
  1048. <default>false</default>
  1049. <short_desc/>
  1050. <long_desc>
  1051. Only propagate copies through ``regular&apos;&apos; locals, that is,
  1052. those declared in the source bytecode.
  1053. </long_desc>
  1054. </boolopt>
  1055. <boolopt>
  1056. <name>Only Stack Locals</name>
  1057. <alias>only-stack-locals</alias>
  1058. <default>true</default>
  1059. <short_desc/>
  1060. <long_desc>
  1061. Only propagate copies through locals that represent stack locations in
  1062. the original bytecode.
  1063. </long_desc>
  1064. </boolopt>
  1065. </sub_phase>
  1066. <sub_phase>
  1067. <name>Dead Assignment Eliminator</name>
  1068. <alias>jb.dae</alias>
  1069. <short_desc>Dead assignment eliminator</short_desc>
  1070. <long_desc>
  1071. The Dead Assignment Eliminator eliminates assignment statements
  1072. to locals whose values are not subsequently used, unless
  1073. evaluating the right-hand side of the assignment may cause
  1074. side-effects.
  1075. </long_desc>
  1076. <boolopt>
  1077. <name>Enabled</name>
  1078. <alias>enabled</alias>
  1079. <default>true</default>
  1080. <short_desc/>
  1081. <long_desc/>
  1082. </boolopt>
  1083. <boolopt>
  1084. <name>Only Stack Locals</name>
  1085. <alias>only-stack-locals</alias>
  1086. <default>true</default>
  1087. <short_desc/>
  1088. <long_desc>
  1089. Only eliminate dead assignments to locals that represent stack
  1090. locations in the original bytecode.
  1091. </long_desc>
  1092. </boolopt>
  1093. </sub_phase>
  1094. <sub_phase>
  1095. <name>Post-copy propagation Unused Local Eliminator</name>
  1096. <alias>jb.cp-ule</alias>
  1097. <short_desc>Post-copy propagation unused local eliminator</short_desc>
  1098. <long_desc>
  1099. This phase removes any locals that are unused after copy propagation.
  1100. </long_desc>
  1101. <boolopt>
  1102. <name>Enabled</name>
  1103. <alias>enabled</alias>
  1104. <default>true</default>
  1105. </boolopt>
  1106. </sub_phase>
  1107. <sub_phase>
  1108. <name>Local Packer</name>
  1109. <alias>jb.lp</alias>
  1110. <short_desc>Local packer: minimizes number of locals</short_desc>
  1111. <long_desc>
  1112. The Local Packer attempts to minimize the number of local
  1113. variables required in a method by reusing the same variable for
  1114. disjoint DU-UD webs. Conceptually, it is the inverse of the
  1115. Local Splitter.
  1116. </long_desc>
  1117. <boolopt>
  1118. <name>Enabled</name>
  1119. <alias>enabled</alias>
  1120. <default>false</default>
  1121. </boolopt>
  1122. <boolopt>
  1123. <name>Unsplit Original Locals</name>
  1124. <alias>unsplit-original-locals</alias>
  1125. <default>false</default>
  1126. <long_desc>
  1127. Use the variable names in the original source as a guide when
  1128. determining how to share local variables across non-interfering
  1129. variable usages. This recombines named locals which were split by
  1130. the Local Splitter.
  1131. </long_desc>
  1132. </boolopt>
  1133. </sub_phase>
  1134. <sub_phase>
  1135. <name>Nop Eliminator</name>
  1136. <alias>jb.ne</alias>
  1137. <short_desc>Nop eliminator</short_desc>
  1138. <long_desc>
  1139. The Nop Eliminator removes <tt>nop</tt> statements from the method.
  1140. </long_desc>
  1141. <boolopt>
  1142. <name>Enabled</name>
  1143. <alias>enabled</alias>
  1144. <default>true</default>
  1145. </boolopt>
  1146. </sub_phase>
  1147. <sub_phase>
  1148. <name>Unreachable Code Eliminator</name>
  1149. <alias>jb.uce</alias>
  1150. <short_desc>Unreachable code eliminator</short_desc>
  1151. <long_desc>
  1152. The Unreachable Code Eliminator removes unreachable code and
  1153. traps whose catch blocks are empty.
  1154. </long_desc>
  1155. <boolopt>
  1156. <name>Enabled</name>
  1157. <alias>enabled</alias>
  1158. <default>true</default>
  1159. </boolopt>
  1160. <boolopt>
  1161. <name>Remove unreachable traps</name>
  1162. <alias>remove-unreachable-traps</alias>
  1163. <default>false</default>
  1164. <long_desc>
  1165. Remove exception table entries when none of the protected instructions can
  1166. throw the exception being caught.
  1167. </long_desc>
  1168. </boolopt>
  1169. </sub_phase>
  1170. <sub_phase>
  1171. <name>Trap Tightener</name>
  1172. <alias>jb.tt</alias>
  1173. <short_desc>Trap Tightener</short_desc>
  1174. <long_desc>
  1175. The Trap Tightener changes the area protected by each exception handler,
  1176. so that it begins with the first instruction in the old protected
  1177. area which is actually capable of throwing an exception caught by the
  1178. handler, and ends just after the last instruction in the old
  1179. protected area which can throw an exception caught by the
  1180. handler. This reduces the chance of producing unverifiable code
  1181. as a byproduct of pruning exceptional control flow within CFGs.
  1182. </long_desc>
  1183. <boolopt>
  1184. <name>Enabled</name>
  1185. <alias>enabled</alias>
  1186. <default>false</default>
  1187. </boolopt>
  1188. </sub_phase>
  1189. </phase>
  1190. <phase>
  1191. <name>Java To Jimple Body Creation</name>
  1192. <alias>jj</alias>
  1193. <class>JJOptions</class>
  1194. <short_desc>Creates a <tt>JimpleBody</tt> for each method directly from source</short_desc>
  1195. <long_desc>
  1196. Jimple Body Creation creates a <tt>JimpleBody</tt> for each input
  1197. method, using polyglot, to read <tt>.java</tt> files.
  1198. </long_desc>
  1199. <boolopt>
  1200. <name>Enabled</name>
  1201. <alias>enabled</alias>
  1202. <default>true</default>
  1203. <short_desc/>
  1204. <long_desc/>
  1205. </boolopt>
  1206. <boolopt>
  1207. <name>Use Original Names</name>
  1208. <alias>use-original-names</alias>
  1209. <default>true</default>
  1210. <short_desc/>
  1211. <long_desc>
  1212. Retain the original names for local variables when the source
  1213. includes those names. Otherwise, Soot gives variables generic
  1214. names based on their types.
  1215. </long_desc>
  1216. </boolopt>
  1217. <sub_phase>
  1218. <name>Local Splitter</name>
  1219. <alias>jj.ls</alias>
  1220. <boolopt>
  1221. <name>Enabled</name>
  1222. <alias>enabled</alias>
  1223. <default>false</default>
  1224. </boolopt>
  1225. <short_desc>Local splitter: one local per DU-UD web</short_desc>
  1226. <long_desc>
  1227. The Local Splitter identifies DU-UD webs for local variables and
  1228. introduces new variables so that each disjoint web is associated
  1229. with a single local.
  1230. </long_desc>
  1231. </sub_phase>
  1232. <sub_phase>
  1233. <name>Jimple Local Aggregator</name>
  1234. <alias>jj.a</alias>
  1235. <short_desc>Aggregator: removes some unnecessary copies</short_desc>
  1236. <long_desc>
  1237. <p>
  1238. The Jimple Local Aggregator removes some unnecessary copies by
  1239. combining local variables. Essentially, it finds definitions
  1240. which have only a single use and, if it is safe to do so, removes
  1241. the original definition after replacing the use with the
  1242. definition's right-hand side.</p>
  1243. <p>
  1244. At this stage in <tt>JimpleBody</tt> construction, local
  1245. aggregation serves largely to remove the copies to and from stack
  1246. variables which simulate load and store instructions in the
  1247. original bytecode.</p>
  1248. </long_desc>
  1249. <boolopt>
  1250. <name>Enabled</name>
  1251. <alias>enabled</alias>
  1252. <default>true</default>
  1253. </boolopt>
  1254. <boolopt>
  1255. <name>Only Stack Locals</name>
  1256. <alias>only-stack-locals</alias>
  1257. <long_desc>
  1258. Only aggregate locals that represent stack locations in the
  1259. original bytecode. (Stack locals can be distinguished in Jimple
  1260. by the <dollar/> character with which their names begin.)
  1261. </long_desc>
  1262. <default>true</default>
  1263. </boolopt>
  1264. </sub_phase>
  1265. <sub_phase>
  1266. <name>Unused Local Eliminator</name>
  1267. <alias>jj.ule</alias>
  1268. <short_desc>Unused local eliminator</short_desc>
  1269. <long_desc>
  1270. The Unused Local Eliminator removes any unused locals from the
  1271. method.
  1272. </long_desc>
  1273. <boolopt>
  1274. <name>Enabled</name>
  1275. <alias>enabled</alias>
  1276. <default>true</default>
  1277. </boolopt>
  1278. </sub_phase>
  1279. <sub_phase>
  1280. <short_desc>Assigns types to locals</short_desc>
  1281. <long_desc>
  1282. The Type Assigner gives local variables types which will
  1283. accommodate the values stored in them over the course of the
  1284. method.
  1285. </long_desc>
  1286. <name>Type Assigner</name>
  1287. <alias>jj.tr</alias>
  1288. <boolopt>
  1289. <name>Enabled</name>
  1290. <alias>enabled</alias>
  1291. <default>false</default>
  1292. </boolopt>
  1293. </sub_phase>
  1294. <sub_phase>
  1295. <name>Unsplit-originals Local Packer</name>
  1296. <alias>jj.ulp</alias>
  1297. <short_desc>Local packer: minimizes number of locals</short_desc>
  1298. <long_desc>
  1299. The Unsplit-originals Local Packer executes only when the
  1300. `<tt>use-original-names</tt>&apos; option is chosen for the
  1301. `<tt>jb</tt>&apos; phase. The Local Packer attempts to minimize
  1302. the number of local variables required in a method by reusing the
  1303. same variable for disjoint DU-UD webs. Conceptually, it is the
  1304. inverse of the Local Splitter.
  1305. </long_desc>
  1306. <boolopt>
  1307. <name>Enabled</name>
  1308. <alias>enabled</alias>
  1309. <default>false</default>
  1310. <short_desc/>
  1311. <long_desc/>
  1312. </boolopt>
  1313. <boolopt>
  1314. <name>Unsplit Original Locals</name>
  1315. <alias>unsplit-original-locals</alias>
  1316. <default>false</default>
  1317. <short_desc/>
  1318. <long_desc>
  1319. Use the variable names in the original source as a guide when
  1320. determining how to share local variables among non-interfering
  1321. variable usages. This recombines named locals which were split by
  1322. the Local Splitter.
  1323. </long_desc>
  1324. </boolopt>
  1325. </sub_phase>
  1326. <sub_phase>
  1327. <name>Local Name Standardizer</name>
  1328. <alias>jj.lns</alias>
  1329. <short_desc>Local name standardizer</short_desc>
  1330. <long_desc>
  1331. The Local Name Standardizer assigns generic names to local variables.
  1332. </long_desc>
  1333. <boolopt>
  1334. <name>Enabled</name>
  1335. <alias>enabled</alias>
  1336. <default>true</default>
  1337. <short_desc/>
  1338. <long_desc/>
  1339. </boolopt>
  1340. <boolopt>
  1341. <name>Only Stack Locals</name>
  1342. <alias>only-stack-locals</alias>
  1343. <default>false</default>
  1344. <short_desc/>
  1345. <long_desc>
  1346. Only standardizes the names of variables that represent stack
  1347. locations in the original bytecode. This becomes the default when
  1348. the `<tt>use-original-names</tt>&apos; option is specified for
  1349. the `<tt>jb</tt>&apos; phase.
  1350. </long_desc>
  1351. </boolopt>
  1352. </sub_phase>
  1353. <sub_phase>
  1354. <name>Copy Propagator</name>
  1355. <alias>jj.cp</alias>
  1356. <short_desc>Copy propagator</short_desc>
  1357. <long_desc>
  1358. This phase performs cascaded copy propagation.
  1359. If the propagator encounters situations of the form:
  1360. <pre>
  1361. A: a = ...;
  1362. ...
  1363. B: x = a;
  1364. ...
  1365. C: ... = ... x;
  1366. </pre>
  1367. where <tt>a</tt> and <tt>x</tt> are each defined only once (at
  1368. <tt>A</tt> and <tt>B</tt>, respectively), then it can propagate
  1369. immediately without checking between <tt>B</tt> and <tt>C</tt>
  1370. for redefinitions of <tt>a</tt>. In
  1371. this case the propagator is global.
  1372. Otherwise, if <tt>a</tt> has multiple definitions then the
  1373. propagator checks for redefinitions and propagates copies
  1374. only within extended basic blocks.
  1375. </long_desc>
  1376. <boolopt>
  1377. <name>Enabled</name>
  1378. <alias>enabled</alias>
  1379. <default>true</default>
  1380. <short_desc/>
  1381. <long_desc/>
  1382. </boolopt>
  1383. <boolopt>
  1384. <name>Only Regular Locals</name>
  1385. <alias>only-regular-locals</alias>
  1386. <default>false</default>
  1387. <short_desc/>
  1388. <long_desc>
  1389. Only propagate copies through ``regular&apos;&apos; locals, that is,
  1390. those declared in the source bytecode.
  1391. </long_desc>
  1392. </boolopt>
  1393. <boolopt>
  1394. <name>Only Stack Locals</name>
  1395. <alias>only-stack-locals</alias>
  1396. <default>true</default>
  1397. <short_desc/>
  1398. <long_desc>
  1399. Only propagate copies through locals that represent stack locations in
  1400. the original bytecode.
  1401. </long_desc>
  1402. </boolopt>
  1403. </sub_phase>
  1404. <sub_phase>
  1405. <name>Dead Assignment Eliminator</name>
  1406. <alias>jj.dae</alias>
  1407. <short_desc>Dead assignment eliminator</short_desc>
  1408. <long_desc>
  1409. The Dead Assignment Eliminator eliminates assignment statements
  1410. to locals whose values are not subsequently used, unless
  1411. evaluating the right-hand side of the assignment may cause
  1412. side-effects.
  1413. </long_desc>
  1414. <boolopt>
  1415. <name>Enabled</name>
  1416. <alias>enabled</alias>
  1417. <default>true</default>
  1418. <short_desc/>
  1419. <long_desc/>
  1420. </boolopt>
  1421. <boolopt>
  1422. <name>Only Stack Locals</name>
  1423. <alias>only-stack-locals</alias>
  1424. <default>true</default>
  1425. <short_desc/>
  1426. <long_desc>
  1427. Only eliminate dead assignments to locals that represent stack
  1428. locations in the original bytecode.
  1429. </long_desc>
  1430. </boolopt>
  1431. </sub_phase>
  1432. <sub_phase>
  1433. <name>Post-copy propagation Unused Local Eliminator</name>
  1434. <alias>jj.cp-ule</alias>
  1435. <short_desc>Post-copy propagation unused local eliminator</short_desc>
  1436. <long_desc>
  1437. This phase removes any locals that are unused after copy propagation.
  1438. </long_desc>
  1439. <boolopt>
  1440. <name>Enabled</name>
  1441. <alias>enabled</alias>
  1442. <default>true</default>
  1443. </boolopt>
  1444. </sub_phase>
  1445. <sub_phase>
  1446. <name>Local Packer</name>
  1447. <alias>jj.lp</alias>
  1448. <short_desc>Local packer: minimizes number of locals</short_desc>
  1449. <long_desc>
  1450. The Local Packer attempts to minimize the number of local
  1451. variables required in a method by reusing the same variable for
  1452. disjoint DU-UD webs. Conceptually, it is the inverse of the
  1453. Local Splitter.
  1454. </long_desc>
  1455. <boolopt>
  1456. <name>Enabled</name>
  1457. <alias>enabled</alias>
  1458. <default>false</default>
  1459. </boolopt>
  1460. <boolopt>
  1461. <name>Unsplit Original Locals</name>
  1462. <alias>unsplit-original-locals</alias>
  1463. <default>false</default>
  1464. <long_desc>
  1465. Use the variable names in the original source as a guide when
  1466. determining how to share local variables across non-interfering
  1467. variable usages. This recombines named locals which were split by
  1468. the Local Splitter.
  1469. </long_desc>
  1470. </boolopt>
  1471. </sub_phase>
  1472. <sub_phase>
  1473. <name>Nop Eliminator</name>
  1474. <alias>jj.ne</alias>
  1475. <short_desc>Nop eliminator</short_desc>
  1476. <long_desc>
  1477. The Nop Eliminator removes <tt>nop</tt> statements from the method.
  1478. </long_desc>
  1479. <boolopt>
  1480. <name>Enabled</name>
  1481. <alias>enabled</alias>
  1482. <default>true</default>
  1483. </boolopt>
  1484. </sub_phase>
  1485. <sub_phase>
  1486. <name>Unreachable Code Eliminator</name>
  1487. <alias>jj.uce</alias>
  1488. <short_desc>Unreachable code eliminator</short_desc>
  1489. <long_desc>
  1490. The Unreachable Code Eliminator removes unreachable code and
  1491. traps whose catch blocks are empty.
  1492. </long_desc>
  1493. <boolopt>
  1494. <name>Enabled</name>
  1495. <alias>enabled</alias>
  1496. <default>true</default>
  1497. </boolopt>
  1498. </sub_phase>
  1499. </phase>
  1500. <phase>
  1501. <name>Whole Jimple Pre-processing Pack</name>
  1502. <alias>wjpp</alias>
  1503. <short_desc>Whole Jimple Pre-processing Pack</short_desc>
  1504. <long_desc>
  1505. <p>
  1506. This pack allows you to insert pre-processors that are run before
  1507. call-graph construction. Only enabled in whole-program mode.</p>
  1508. <p>
  1509. In an unmodified copy of Soot, this pack is empty.</p>
  1510. </long_desc>
  1511. <boolopt>
  1512. <name>Enabled</name>
  1513. <alias>enabled</alias>
  1514. <default>true</default>
  1515. </boolopt>
  1516. </phase>
  1517. <phase>
  1518. <name>Whole Shimple Pre-processing Pack</name>
  1519. <alias>wspp</alias>
  1520. <short_desc>Whole Shimple Pre-processing Pack</short_desc>
  1521. <long_desc>
  1522. <p>
  1523. This pack allows you to insert pre-processors that are run before
  1524. call-graph construction. Only enabled in whole-program Shimple mode.</p>
  1525. <p>
  1526. In an unmodified copy of Soot, this pack is empty.</p>
  1527. </long_desc>
  1528. <boolopt>
  1529. <name>Enabled</name>
  1530. <alias>enabled</alias>
  1531. <default>true</default>
  1532. </boolopt>
  1533. </phase>
  1534. <radio_phase>
  1535. <name>Call Graph Constructor</name>
  1536. <alias>cg</alias>
  1537. <class>CGOptions</class>
  1538. <short_desc>Call graph constructor</short_desc>
  1539. <long_desc>
  1540. The Call Graph Constructor computes a call graph for whole
  1541. program analysis. When this pack finishes, a call graph is
  1542. available in the Scene. The different phases in this pack are
  1543. different ways to construct the call graph. Exactly one phase in
  1544. this pack must be enabled; Soot will raise an error otherwise.
  1545. </long_desc>
  1546. <boolopt>
  1547. <name>Enabled</name>
  1548. <alias>enabled</alias>
  1549. <default>true</default>
  1550. </boolopt>
  1551. <boolopt>
  1552. <name>Safe forName</name>
  1553. <alias>safe-forname</alias>
  1554. <default>false</default>
  1555. <short_desc>Handle Class.forName() calls conservatively</short_desc>
  1556. <long_desc>When a program calls
  1557. Class.forName(), the named class is resolved, and its static initializer
  1558. executed. In many cases, it cannot be determined statically which
  1559. class will be loaded, and which static initializer executed. When this
  1560. option is set to true, Soot will conservatively assume that any static
  1561. initializer could be executed. This may make the call graph very large.
  1562. When this option is set to false, any calls to Class.forName() for which
  1563. the class cannot be determined statically are assumed to call no
  1564. static initializers.
  1565. </long_desc>
  1566. </boolopt>
  1567. <boolopt>
  1568. <name>Safe newInstance</name>
  1569. <alias>safe-newinstance</alias>
  1570. <default>false</default>
  1571. <short_desc>Handle Class.newInstance() calls conservatively</short_desc>
  1572. <long_desc>When a program calls
  1573. Class.newInstance(), a new object is created and its constructor
  1574. executed. Soot does not determine statically which
  1575. type of object will be created, and which constructor executed. When this
  1576. option is set to true, Soot will conservatively assume that any constructor
  1577. could be executed. This may make the call graph very large.
  1578. When this option is set to false, any calls to Class.newInstance()
  1579. are assumed not to call the constructor of the created object.
  1580. </long_desc>
  1581. </boolopt>
  1582. <boolopt>
  1583. <name>Verbose</name>
  1584. <alias>verbose</alias>
  1585. <default>false</default>
  1586. <short_desc>Print warnings about where the call graph may be incomplete</short_desc>
  1587. <long_desc>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.
  1588. </long_desc>
  1589. </boolopt>
  1590. <intopt>
  1591. <name>JDK version</name>
  1592. <alias>jdkver</alias>
  1593. <default>3</default>
  1594. <short_desc>JDK version for native methods</short_desc>
  1595. <long_desc>This option sets the JDK version of the standard library being analyzed so that Soot can simulate the native methods in the specific version of the library. The default, 3, refers to Java 1.3.x.</long_desc>
  1596. </intopt>
  1597. <boolopt>
  1598. <name>All Application Class Methods Reachable</name>
  1599. <alias>all-reachable</alias>
  1600. <default>false</default>
  1601. <short_desc>Assume all methods of application classes are reachable.</short_desc>
  1602. <long_desc>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.</long_desc>
  1603. </boolopt>
  1604. <boolopt>
  1605. <name>Implicit Entry Points</name>
  1606. <alias>implicit-entry</alias>
  1607. <default>true</default>
  1608. <short_desc>Include methods called implicitly by the VM as entry points</short_desc>
  1609. <long_desc>When this option is true, methods that are called implicitly by the VM are considered entry points of the call graph. When it is false, these methods are not considered entry points, leading to a possibly incomplete call graph.</long_desc>
  1610. </boolopt>
  1611. <boolopt>
  1612. <name>Trim Static Initializer Edges</name>
  1613. <alias>trim-clinit</alias>
  1614. <default>true</default>
  1615. <short_desc>Removes redundant static initializer calls</short_desc>
  1616. <long_desc>The call graph contains an edge
  1617. from each statement that could trigger execution of a static initializer to that
  1618. static initializer. However, each static initializer is triggered only once.
  1619. When this option is enabled, after the call graph is built, an intra-procedural
  1620. analysis is performed to detect static initializer edges leading to methods
  1621. that must have already been executed. Since these static initializers cannot be
  1622. executed again, the corresponding call graph edges are removed from the call graph.
  1623. </long_desc>
  1624. </boolopt>
  1625. <stropt>
  1626. <name>Reflection Log</name>
  1627. <alias>reflection-log</alias>
  1628. <short_desc>Uses a reflection log to resolve reflective calls.</short_desc>
  1629. <long_desc>Load a reflection log
  1630. from the given file and use this log to resolve reflective call sites. Note that
  1631. when a log is given, the following other options have no effect: safe-forname,
  1632. safe-newinstance.
  1633. </long_desc>
  1634. </stropt>
  1635. <stropt>
  1636. <name>Guarding strategy</name>
  1637. <alias>guards</alias>
  1638. <default>ignore</default>
  1639. <short_desc>Describes how to guard the program from unsound assumptions.</short_desc>
  1640. <long_desc>Using a reflection log is only sound for method executions that were logged.
  1641. Executing the program differently may be unsound. Soot can insert guards at program points for which the reflection log
  1642. contains no information. When these points are reached (because the program is executed differently) then the follwing will happen,
  1643. depending on the value of this flag. ignore: no guard is inserted, the program executes normally but under unsound assumptions.
  1644. print: the program prints a stack trace when reaching a porgram location that was not traced but continues to run. throw (default):
  1645. the program throws an Error instead.
  1646. </long_desc>
  1647. </stropt>
  1648. <sub_phase>
  1649. <name>Class Hierarchy Analysis</name>
  1650. <alias>cg.cha</alias>
  1651. <class>CHAOptions</class>
  1652. <short_desc>Builds call graph using Class Hierarchy Analysis</short_desc>
  1653. <long_desc>This phase uses Class Hierarchy Analysis to generate a call graph.</long_desc>
  1654. <boolopt>
  1655. <name>Enabled</name>
  1656. <alias>enabled</alias>
  1657. <default>true</default>
  1658. </boolopt>
  1659. <boolopt>
  1660. <name>Verbose</name>
  1661. <alias>verbose</alias>
  1662. <default>false</default>
  1663. <short_desc>Print statistics about the resulting call graph</short_desc>
  1664. <long_desc>Setting this option to true causes Soot to print out statistics about the call graph computed by this phase, such as the number of methods determined to be reachable.</long_desc>
  1665. </boolopt>
  1666. </sub_phase>
  1667. <sub_phase>
  1668. <name>Spark</name>
  1669. <class>SparkOptions</class>
  1670. <alias>cg.spark</alias>
  1671. <short_desc>Spark points-to analysis framework</short_desc>
  1672. <long_desc>Spark is a flexible points-to analysis framework. Aside from building a call graph, it also generates information about the targets of pointers. For details about Spark, please see <a href="http://www.sable.mcgill.ca/publications/thesis/#olhotakMastersThesis">Ondrej Lhotak's M.Sc. thesis</a>.</long_desc>
  1673. <boolopt>
  1674. <name>Enabled</name>
  1675. <alias>enabled</alias>
  1676. <default>false</default>
  1677. <short_desc/>
  1678. <long_desc/>
  1679. </boolopt>
  1680. <section>
  1681. <name>Spark General Options</name>
  1682. <boolopt>
  1683. <name>Verbose</name>
  1684. <alias>verbose</alias>
  1685. <default>false</default>
  1686. <short_desc>Print detailed information about the execution of Spark</short_desc>
  1687. <long_desc>
  1688. When this option is set to true, Spark prints detailed information about its execution.
  1689. </long_desc>
  1690. </boolopt>
  1691. <boolopt>
  1692. <name>Ignore Types Entirely</name>
  1693. <alias>ignore-types</alias>
  1694. <default>false</default>
  1695. <short_desc>Make Spark completely ignore declared types of variables</short_desc>
  1696. <long_desc>
  1697. When this option is set to true, all parts of Spark completely ignore
  1698. declared types of variables and casts.
  1699. </long_desc>
  1700. </boolopt>
  1701. <boolopt>
  1702. <name>Force Garbage Collections</name>
  1703. <alias>force-gc</alias>
  1704. <default>false</default>
  1705. <short_desc>Force garbage collection for measuring memory usage</short_desc>
  1706. <long_desc>
  1707. When this option is set to true, calls to System.gc() will be made at
  1708. various points to allow memory usage to be measured.
  1709. </long_desc>
  1710. </boolopt>
  1711. <boolopt>
  1712. <name>Pre Jimplify</name>
  1713. <alias>pre-jimplify</alias>
  1714. <default>false</default>
  1715. <short_desc>Jimplify all methods before starting Spark</short_desc>
  1716. <long_desc>
  1717. When this option is set to true, Spark converts all available methods to Jimple
  1718. before starting the points-to analysis. This allows the Jimplification
  1719. time to be separated from the points-to time. However, it increases the
  1720. total time and memory requirement, because all methods are Jimplified,
  1721. rather than only those deemed reachable by the points-to analysis.
  1722. </long_desc>
  1723. </boolopt>
  1724. </section>
  1725. <section>
  1726. <name>Spark Pointer Assignment Graph Building Options</name>
  1727. <boolopt>
  1728. <name>VTA</name>
  1729. <alias>vta</alias>
  1730. <default>false</default>
  1731. <short_desc>Emulate Variable Type Analysis</short_desc>
  1732. <long_desc>
  1733. Setting VTA to true has the effect of setting field-based,
  1734. types-for-sites, and simplify-sccs to true, and on-fly-cg to false,
  1735. to simulate Variable Type
  1736. Analysis, described in <a href="http://www.sable.mcgill.ca/publications/papers/#oopsla2000">our OOPSLA 2000 paper</a>. Note that the
  1737. algorithm differs from the original VTA in that it handles array
  1738. elements more precisely.
  1739. </long_desc>
  1740. </boolopt>
  1741. <boolopt>
  1742. <name>RTA</name>
  1743. <alias>rta</alias>
  1744. <default>false</default>
  1745. <short_desc>Emulate Rapid Type Analysis</short_desc>
  1746. <long_desc>
  1747. Setting RTA to true sets types-for-sites to true, and causes Spark to use
  1748. a single points-to set for all variables, giving <a href="http://doi.acm.org/10.1145/236337.236371">Rapid Type
  1749. Analysis</a>.
  1750. </long_desc>
  1751. </boolopt>
  1752. <boolopt>
  1753. <name>Field Based</name>
  1754. <alias>field-based</alias>
  1755. <default>false</default>
  1756. <short_desc>Use a field-based rather than field-sensitive representation</short_desc>
  1757. <long_desc>
  1758. When this option is set to true, fields are represented by variable
  1759. (Green) nodes, and the object that the field belongs to is ignored
  1760. (all objects are lumped together), giving a field-based analysis. Otherwise, fields are represented by
  1761. field reference (Red) nodes, and the objects that they belong to are
  1762. distinguished, giving a field-sensitive analysis.
  1763. </long_desc>
  1764. </boolopt>
  1765. <boolopt>
  1766. <name>Types For Sites</name>
  1767. <alias>types-for-sites</alias>
  1768. <default>false</default>
  1769. <short_desc>Represent objects by their actual type rather than allocation site</short_desc>
  1770. <long_desc>
  1771. When this option is set to true, types rather than allocation sites are
  1772. used as the elements of the points-to sets.
  1773. </long_desc>
  1774. </boolopt>
  1775. <boolopt>
  1776. <name>Merge String Buffer</name>
  1777. <alias>merge-stringbuffer</alias>
  1778. <default>true</default>
  1779. <short_desc>Represent all StringBuffers as one object</short_desc>
  1780. <long_desc>
  1781. When this option is set to true, all allocation sites creating
  1782. <tt>java.lang.StringBuffer</tt> objects are grouped together as a single
  1783. allocation site.
  1784. </long_desc>
  1785. </boolopt>
  1786. <boolopt>
  1787. <name>Propagate All String Constants</name>
  1788. <alias>string-constants</alias>
  1789. <default>false</default>
  1790. <short_desc>Propagate all string constants, not just class names</short_desc>
  1791. <long_desc>
  1792. When this option is set to false, Spark only distinguishes string constants that
  1793. may be the name of a class loaded dynamically using reflection, and all other
  1794. string constants are lumped together into a single string constant node.
  1795. Setting this option to true causes all string constants to be propagated
  1796. individually.
  1797. </long_desc>
  1798. </boolopt>
  1799. <boolopt>
  1800. <name>Simulate Natives</name>
  1801. <alias>simulate-natives</alias>
  1802. <default>true</default>
  1803. <short_desc>Simulate effects of native methods in standard class library</short_desc>
  1804. <long_desc>
  1805. When this option is set to true, the effects of native methods in the standard Java class library are simulated.
  1806. </long_desc>
  1807. </boolopt>
  1808. <boolopt>
  1809. <name>Treat EMPTY as Alloc</name>
  1810. <alias>empties-as-allocs</alias>
  1811. <default>false</default>
  1812. <short_desc>Treat singletons for empty sets etc. as allocation sites</short_desc>
  1813. <long_desc>
  1814. When this option is set to true, Spark treats references to <code>EMPTYSET</code>, <code>EMPTYMAP</code>, and
  1815. <code>EMPTYLIST</code> as allocation sites for <code>HashSet</code>, <code>HashMap</code> and <code>LinkedList</code> objects respectively, and references to <code>Hashtable.emptyIterator</code> as allocation sites for <code>Hashtable.EmptyIterator</code>. This enables subsequent analyses to differentiate different uses of Java's immutable empty collections.
  1816. </long_desc>
  1817. </boolopt>
  1818. <boolopt>
  1819. <name>Simple Edges Bidirectional</name>
  1820. <alias>simple-edges-bidirectional</alias>
  1821. <default>false</default>
  1822. <short_desc>Equality-based analysis between variable nodes</short_desc>
  1823. <long_desc>
  1824. When this option is set to true, all edges connecting variable (Green)
  1825. nodes are made bidirectional, as in <a href="http://doi.acm.org/10.1145/237721.237727">Steensgaard&apos;s analysis</a>.
  1826. </long_desc>
  1827. </boolopt>
  1828. <boolopt>
  1829. <name>On Fly Call Graph</name>
  1830. <alias>on-fly-cg</alias>
  1831. <default>true</default>
  1832. <short_desc>Build call graph as receiver types become known</short_desc>
  1833. <long_desc>
  1834. When this option is set to true, the call graph is computed on-the-fly
  1835. as points-to information is computed. Otherwise, an initial
  1836. CHA approximation to the call graph is used.
  1837. </long_desc>
  1838. </boolopt>
  1839. </section>
  1840. <section>
  1841. <name>Spark Pointer Assignment Graph Simplification Options</name>
  1842. <boolopt>
  1843. <name>Simplify Offline</name>
  1844. <alias>simplify-offline</alias>
  1845. <default>false</default>
  1846. <short_desc>Collapse single-entry subgraphs of the PAG</short_desc>
  1847. <long_desc>
  1848. When this option is set to true, variable (Green) nodes which form
  1849. single-entry subgraphs (so they must have the same points-to set) are
  1850. merged before propagation begins.
  1851. </long_desc>
  1852. </boolopt>
  1853. <boolopt>
  1854. <name>Simplify SCCs</name>
  1855. <alias>simplify-sccs</alias>
  1856. <default>false</default>
  1857. <short_desc>Collapse strongly-connected components of the PAG</short_desc>
  1858. <long_desc>
  1859. When this option is set to true, variable (Green) nodes which form
  1860. strongly-connected components (so they must have the same points-to set)
  1861. are merged before propagation begins.
  1862. </long_desc>
  1863. </boolopt>
  1864. <boolopt>
  1865. <name>Ignore Types For SCCs</name>
  1866. <alias>ignore-types-for-sccs</alias>
  1867. <default>false</default>
  1868. <short_desc>Ignore declared types when determining node equivalence for SCCs</short_desc>
  1869. <long_desc>
  1870. When this option is set to true, when collapsing strongly-connected
  1871. components, nodes forming SCCs are collapsed regardless of their declared type.
  1872. The collapsed SCC is given the most general type of all the nodes in the
  1873. component.
  1874. When this option is set to false, only edges connecting nodes of the
  1875. same type are considered when detecting SCCs.
  1876. This option has no effect unless <tt>simplify-sccs</tt> is true.
  1877. </long_desc>
  1878. </boolopt>
  1879. </section>
  1880. <section>
  1881. <name>Spark Points-To Set Flowing Options</name>
  1882. <multiopt>
  1883. <name>Propagator</name>
  1884. <alias>propagator</alias>
  1885. <value>
  1886. <name>Iter</name>
  1887. <alias>iter</alias>
  1888. <short_desc>Simple iterative algorithm</short_desc>
  1889. <long_desc>
  1890. Iter is a simple, iterative algorithm, which propagates everything until the
  1891. graph does not change.
  1892. </long_desc>
  1893. </value>
  1894. <value>
  1895. <name>Worklist</name>
  1896. <alias>worklist</alias>
  1897. <default/>
  1898. <short_desc>Fast, worklist-based algorithm</short_desc>
  1899. <long_desc>
  1900. Worklist is a worklist-based algorithm that tries
  1901. to do as little work as possible. This is currently the fastest algorithm.
  1902. </long_desc>
  1903. </value>
  1904. <value>
  1905. <name>Cycle</name>
  1906. <alias>cycle</alias>
  1907. <short_desc>Unfinished on-the-fly cycle detection algorithm</short_desc>
  1908. <long_desc>This algorithm finds cycles in the PAG on-the-fly. It is not yet finished.</long_desc>
  1909. </value>
  1910. <value>
  1911. <name>Merge</name>
  1912. <alias>merge</alias>
  1913. <short_desc>Unfinished field reference merging algorithms</short_desc>
  1914. <long_desc>
  1915. Merge is an algorithm that merges all concrete field (yellow) nodes with their corresponding
  1916. field reference (red) nodes. This algorithm is not yet finished.
  1917. </long_desc>
  1918. </value>
  1919. <value>
  1920. <name>Alias</name>
  1921. <alias>alias</alias>
  1922. <short_desc>Alias-edge based algorithm</short_desc>
  1923. <long_desc>
  1924. Alias is an alias-edge based algorithm. This algorithm tends to take
  1925. the least memory for very large problems, because it does not represent
  1926. explicitly points-to sets of fields of heap objects.
  1927. </long_desc>
  1928. </value>
  1929. <value>
  1930. <name>None</name>
  1931. <alias>none</alias>
  1932. <short_desc>Disable propagation</short_desc>
  1933. <long_desc>
  1934. None means that propagation is not done; the graph is only built and
  1935. simplified. This is useful if an external solver is being used to perform the
  1936. propagation.
  1937. </long_desc>
  1938. </value>
  1939. <short_desc>Select propagation algorithm</short_desc>
  1940. <long_desc>
  1941. This option tells Spark which propagation algorithm to use.
  1942. </long_desc>
  1943. </multiopt>
  1944. <multiopt>
  1945. <name>Set Implementation</name>
  1946. <alias>set-impl</alias>
  1947. <value>
  1948. <name>Hash set</name>
  1949. <alias>hash</alias>
  1950. <short_desc>Use Java HashSet</short_desc>
  1951. <long_desc>
  1952. Hash is an implementation based on Java&apos;s built-in hash-set.
  1953. </long_desc>
  1954. </value>
  1955. <value>
  1956. <name>Bit-vector</name>
  1957. <alias>bit</alias>
  1958. <short_desc>Bit vector</short_desc>
  1959. <long_desc>
  1960. Bit is an implementation using a bit vector.
  1961. </long_desc>
  1962. </value>
  1963. <value>
  1964. <name>Hybrid</name>
  1965. <alias>hybrid</alias>
  1966. <short_desc>Hybrid representation using bit vector for large sets</short_desc>
  1967. <long_desc>
  1968. Hybrid is an implementation that keeps an explicit list of up to
  1969. 16 elements, and switches to a bit-vector when the set gets
  1970. larger than this.
  1971. </long_desc>
  1972. </value>
  1973. <value>
  1974. <name>Sorted array</name>
  1975. <alias>array</alias>
  1976. <short_desc>Sorted array representation</short_desc>
  1977. <long_desc>
  1978. Array is an implementation that keeps the elements of the
  1979. points-to set in a sorted array. Set membership is tested using
  1980. binary search, and set union and intersection are computed using
  1981. an algorithm based on the merge step from merge sort.
  1982. </long_desc>
  1983. </value>
  1984. <value>
  1985. <name>Heintze</name>
  1986. <alias>heintze</alias>
  1987. <short_desc>Heintze's shared bit-vector and overflow list representation</short_desc>
  1988. <long_desc>Heintze's representation has elements represented by a bit-vector + a small
  1989. 'overflow' list of some maximum number of elements. The bit-vectors can be shared
  1990. by multiple points-to sets, while the overflow lists are not.
  1991. </long_desc>
  1992. </value>
  1993. <value>
  1994. <name>Shared List</name>
  1995. <alias>sharedlist</alias>
  1996. <short_desc>Shared list representation</short_desc>
  1997. <long_desc>Shared List stores its elements in a linked list, and might share
  1998. its tail with other similar points-to sets.
  1999. </long_desc>
  2000. </value>
  2001. <value>
  2002. <name>Double</name>
  2003. <alias>double</alias>
  2004. <default/>
  2005. <short_desc>Double set representation for incremental propagation</short_desc>
  2006. <long_desc>
  2007. Double is an implementation that itself uses a pair of sets for
  2008. each points-to set. The first set in the pair stores new pointed-to
  2009. objects that have not yet been propagated, while the second set stores
  2010. old pointed-to objects that have been propagated and need not be
  2011. reconsidered. This allows the propagation algorithms to be incremental,
  2012. often speeding them up significantly.
  2013. </long_desc>
  2014. </value>
  2015. <short_desc>Select points-to set implementation</short_desc>
  2016. <long_desc>
  2017. Select an implementation of points-to sets for Spark to use.
  2018. </long_desc>
  2019. </multiopt>
  2020. <multiopt>
  2021. <name>Double Set Old</name>
  2022. <alias>double-set-old</alias>
  2023. <value>
  2024. <name>Hash set</name>
  2025. <alias>hash</alias>
  2026. <short_desc>Use Java HashSet</short_desc>
  2027. <long_desc>
  2028. Hash is an implementation based on Java&apos;s built-in hash-set.
  2029. </long_desc>
  2030. </value>
  2031. <value>
  2032. <name>Bit-vector</name>
  2033. <alias>bit</alias>
  2034. <short_desc>Bit vector</short_desc>
  2035. <long_desc>
  2036. Bit is an implementation using a bit vector.
  2037. </long_desc>
  2038. </value>
  2039. <value>
  2040. <name>Hybrid</name>
  2041. <alias>hybrid</alias>
  2042. <default/>
  2043. <short_desc>Hybrid representation using bit vector for large sets</short_desc>
  2044. <long_desc>
  2045. Hybrid is an implementation that keeps an explicit list of up to
  2046. 16 elements, and switches to a bit-vector when the set gets
  2047. larger than this.
  2048. </long_desc>
  2049. </value>
  2050. <value>
  2051. <name>Sorted array</name>
  2052. <alias>array</alias>
  2053. <short_desc>Sorted array representation</short_desc>
  2054. <long_desc>
  2055. Array is an implementation that keeps the elements of the
  2056. points-to set in a sorted array. Set membership is tested using
  2057. binary search, and set union and intersection are computed using
  2058. an algorithm based on the merge step from merge sort.
  2059. </long_desc>
  2060. </value>
  2061. <value>
  2062. <name>Heintze</name>
  2063. <alias>heintze</alias>
  2064. <short_desc>Heintze's shared bit-vector and overflow list representation</short_desc>
  2065. <long_desc>Heintze's representation has elements represented by a bit-vector + a small
  2066. 'overflow' list of some maximum number of elements. The bit-vectors can be shared
  2067. by multiple points-to sets, while the overflow lists are not.
  2068. </long_desc>
  2069. </value>
  2070. <value>
  2071. <name>Shared List</name>
  2072. <alias>sharedlist</alias>
  2073. <short_desc>Shared list representation</short_desc>
  2074. <long_desc>Shared List stores its elements in a linked list, and might share
  2075. its tail with other similar points-to sets.
  2076. </long_desc>
  2077. </value>
  2078. <short_desc>Select implementation of points-to set for old part of double set</short_desc>
  2079. <long_desc>
  2080. Select an implementation for sets of old objects in the double
  2081. points-to set implementation.
  2082. This option has no effect unless Set Implementation is set to double.
  2083. </long_desc>
  2084. </multiopt>
  2085. <multiopt>
  2086. <name>Double Set New</name>
  2087. <alias>double-set-new</alias>
  2088. <value>
  2089. <name>Hash set</name>
  2090. <alias>hash</alias>
  2091. <short_desc>Use Java HashSet</short_desc>
  2092. <long_desc>
  2093. Hash is an implementation based on Java&apos;s built-in hash-set.
  2094. </long_desc>
  2095. </value>
  2096. <value>
  2097. <name>Bit-vector</name>
  2098. <alias>bit</alias>
  2099. <short_desc>Bit vector</short_desc>
  2100. <long_desc>
  2101. Bit is an implementation using a bit vector.
  2102. </long_desc>
  2103. </value>
  2104. <value>
  2105. <name>Hybrid</name>
  2106. <alias>hybrid</alias>
  2107. <default/>
  2108. <short_desc>Hybrid representation using bit vector for large sets</short_desc>
  2109. <long_desc>
  2110. Hybrid is an implementation that keeps an explicit list of up to
  2111. 16 elements, and switches to a bit-vector when the set gets
  2112. larger than this.
  2113. </long_desc>
  2114. </value>
  2115. <value>
  2116. <name>Sorted array</name>
  2117. <alias>array</alias>
  2118. <short_desc>Sorted array representation</short_desc>
  2119. <long_desc>
  2120. Array is an implementation that keeps the elements of the
  2121. points-to set in a sorted array. Set membership is tested using
  2122. binary search, and set union and intersection are computed using
  2123. an algorithm based on the merge step from merge sort.
  2124. </long_desc>
  2125. </value>
  2126. <value>
  2127. <name>Heintze</name>
  2128. <alias>heintze</alias>
  2129. <short_desc>Heintze's shared bit-vector and overflow list representation</short_desc>
  2130. <long_desc>Heintze's representation has elements represented by a bit-vector + a small
  2131. 'overflow' list of some maximum number of elements. The bit-vectors can be shared
  2132. by multiple points-to sets, while the overflow lists are not.
  2133. </long_desc>
  2134. </value>
  2135. <value>
  2136. <name>Shared List</name>
  2137. <alias>sharedlist</alias>
  2138. <short_desc>Shared list representation</short_desc>
  2139. <long_desc>Shared List stores its elements in a linked list, and might share
  2140. its tail with other similar points-to sets.
  2141. </long_desc>
  2142. </value>
  2143. <short_desc>Select implementation of points-to set for new part of double set</short_desc>
  2144. <long_desc>
  2145. Select an implementation for sets of new objects in the double
  2146. points-to set implementation.
  2147. This option has no effect unless Set Implementation is set to double.
  2148. </long_desc>
  2149. </multiopt>
  2150. </section>
  2151. <section>
  2152. <name>Spark Output Options</name>
  2153. <boolopt>
  2154. <name>Dump HTML</name>
  2155. <alias>dump-html</alias>
  2156. <default>false</default>
  2157. <short_desc>Dump pointer assignment graph to HTML for debugging</short_desc>
  2158. <long_desc>
  2159. When this option is set to true, a browseable HTML representation of the
  2160. pointer assignment graph is output to a file called <tt>pag.jar</tt> after the analysis completes. Note
  2161. that this representation is typically very large.
  2162. </long_desc>
  2163. </boolopt>
  2164. <boolopt>
  2165. <name>Dump PAG</name>
  2166. <alias>dump-pag</alias>
  2167. <default>false</default>
  2168. <short_desc>Dump pointer assignment graph for other solvers</short_desc>
  2169. <long_desc>
  2170. When this option is set to true, a representation of the pointer assignment graph
  2171. suitable for processing with other solvers (such as the BDD-based solver) is
  2172. output before the analysis begins.
  2173. </long_desc>
  2174. </boolopt>
  2175. <boolopt>
  2176. <name>Dump Solution</name>
  2177. <alias>dump-solution</alias>
  2178. <default>false</default>
  2179. <short_desc>Dump final solution for comparison with other solvers</short_desc>
  2180. <long_desc>
  2181. When this option is set to true, a representation of the resulting points-to
  2182. sets is dumped. The format is similar to that of the Dump PAG
  2183. option, and is therefore suitable for comparison with the results of other
  2184. solvers.
  2185. </long_desc>
  2186. </boolopt>
  2187. <boolopt>
  2188. <name>Topological Sort</name>
  2189. <alias>topo-sort</alias>
  2190. <default>false</default>
  2191. <short_desc>Sort variable nodes in dump</short_desc>
  2192. <long_desc>
  2193. When this option is set to true, the representation dumped by the
  2194. Dump PAG option
  2195. is dumped with the variable (green) nodes in (pseudo-)topological order.
  2196. This option has no effect unless Dump PAG is true.
  2197. </long_desc>
  2198. </boolopt>
  2199. <boolopt>
  2200. <name>Dump Types</name>
  2201. <alias>dump-types</alias>
  2202. <default>true</default>
  2203. <short_desc>Include declared types in dump</short_desc>
  2204. <long_desc>
  2205. When this option is set to true, the representation dumped by the
  2206. Dump PAG option
  2207. includes type information for all nodes.
  2208. This option has no effect unless Dump PAG is true.
  2209. </long_desc>
  2210. </boolopt>
  2211. <boolopt>
  2212. <name>Class Method Var</name>
  2213. <alias>class-method-var</alias>
  2214. <default>true</default>
  2215. <short_desc>In dump, label variables by class and method</short_desc>
  2216. <long_desc>
  2217. When this option is set to true, the representation dumped by the
  2218. Dump PAG option
  2219. represents nodes by numbering each class, method, and variable within
  2220. the method separately, rather than assigning a single integer to each
  2221. node.
  2222. This option has no effect unless Dump PAG is true. Setting Class
  2223. Method Var to true has the effect of setting Topological Sort to
  2224. false.
  2225. </long_desc>
  2226. </boolopt>
  2227. <boolopt>
  2228. <name>Dump Answer</name>
  2229. <alias>dump-answer</alias>
  2230. <default>false</default>
  2231. <short_desc>Dump computed reaching types for comparison with other solvers</short_desc>
  2232. <long_desc>
  2233. When this option is set to true, the computed reaching types for each variable are
  2234. dumped to a file, so that they can be compared with the results of
  2235. other analyses (such as the old VTA).
  2236. </long_desc>
  2237. </boolopt>
  2238. <boolopt>
  2239. <name>Add Tags</name>
  2240. <alias>add-tags</alias>
  2241. <default>false</default>
  2242. <short_desc>Output points-to results in tags for viewing with the Jimple</short_desc>
  2243. <long_desc>
  2244. When this option is set to true, the results of the analysis are encoded within
  2245. tags and printed with the resulting Jimple code.
  2246. </long_desc>
  2247. </boolopt>
  2248. <boolopt>
  2249. <name>Calculate Set Mass</name>
  2250. <alias>set-mass</alias>
  2251. <default>false</default>
  2252. <short_desc>Calculate statistics about points-to set sizes</short_desc>
  2253. <long_desc>
  2254. When this option is set to true, Spark computes and prints various
  2255. cryptic statistics about the size of the points-to sets computed.
  2256. </long_desc>
  2257. </boolopt>
  2258. </section>
  2259. <section>
  2260. <name>Context-sensitive refinement</name>
  2261. <boolopt>
  2262. <name>Demand-driven refinement-based context-sensitive points-to analysis</name>
  2263. <alias>cs-demand</alias>
  2264. <default>false</default>
  2265. <short_desc>After running Spark, refine points-to sets on demand with context information</short_desc>
  2266. <long_desc>
  2267. When this option is set to true, Manu Sridharan's demand-driven,
  2268. refinement-based points-to analysis (PLDI 06) is applied after Spark
  2269. was run.
  2270. </long_desc>
  2271. </boolopt>
  2272. <boolopt>
  2273. <name>Create lazy points-to sets</name>
  2274. <alias>lazy-pts</alias>
  2275. <default>true</default>
  2276. <short_desc>Create lazy points-to sets that create context information only when needed.</short_desc>
  2277. <long_desc>
  2278. When this option is disabled, context information is computed for every query to the reachingObjects method.
  2279. When it is enabled, a call to reachingObjects returns a lazy wrapper object that contains a context-insensitive
  2280. points-to set. This set is then automatically refined with context information when necessary, i.e.
  2281. when we try to determine the intersection with another points-to set and this intersection seems to be
  2282. non-empty.
  2283. </long_desc>
  2284. </boolopt>
  2285. <intopt>
  2286. <name>Maximal traversal</name>
  2287. <alias>traversal</alias>
  2288. <default>75000</default>
  2289. <short_desc>Make the analysis traverse at most this number of nodes per query.</short_desc>
  2290. <long_desc>
  2291. Make the analysis traverse at most this number of nodes per query.
  2292. This quota is evenly shared between multiple passes (see next option).
  2293. </long_desc>
  2294. </intopt>
  2295. <intopt>
  2296. <name>Maximal number of passes</name>
  2297. <alias>passes</alias>
  2298. <default>10</default>
  2299. <short_desc>Perform at most this number of refinement iterations.</short_desc>
  2300. <long_desc>
  2301. Perform at most this number of refinement iterations.
  2302. Each iteration traverses at most ( traverse / passes ) nodes.
  2303. </long_desc>
  2304. </intopt>
  2305. </section>
  2306. <section>
  2307. <name>Geometric context-sensitive analysis from ISSTA 2011</name>
  2308. <boolopt>
  2309. <name>Geometric, context-sensitive points-to analysis</name>
  2310. <alias>geom-pta</alias>
  2311. <default>false</default>
  2312. <short_desc>This switch enables/disables the geometric analysis.</short_desc>
  2313. <long_desc>
  2314. This switch enables/disables the geometric analysis.
  2315. </long_desc>
  2316. </boolopt>
  2317. <multiopt>
  2318. <name>Encoding methodology used</name>
  2319. <alias>geom-encoding</alias>
  2320. <default>Geom</default>
  2321. <short_desc>Encoding methodology</short_desc>
  2322. <long_desc>
  2323. This switch specifies the encoding methodology used in the analysis.
  2324. All possible options are: Geom, HeapIns, PtIns. The efficiency order
  2325. is (from slow to fast) Geom - HeapIns - PtIns, but the precision order is
  2326. the reverse.
  2327. </long_desc>
  2328. <value>
  2329. <name>Geometric</name>
  2330. <alias>Geom</alias>
  2331. <short_desc>Geometric Encoding</short_desc>
  2332. <long_desc>
  2333. Geometric Encoding.
  2334. </long_desc>
  2335. <default/>
  2336. </value>
  2337. <value>
  2338. <name>Heap Insensitive</name>
  2339. <alias>HeapIns</alias>
  2340. <short_desc>Heap Insensitive Encoding</short_desc>
  2341. <long_desc>
  2342. Heap Insensitive Encoding. Omit the heap context range term in the encoded representation, and in turn, we assume all the contexts for this heap object are used.
  2343. </long_desc>
  2344. </value>
  2345. <value>
  2346. <name>Pointer Insensitive</name>
  2347. <alias>PtIns</alias>
  2348. <short_desc>PtIns</short_desc>
  2349. <long_desc>
  2350. Pointer Insensitive Encoding. Similar to HeapIns, but we omit the pointer context range term.
  2351. </long_desc>
  2352. </value>
  2353. </multiopt>
  2354. <multiopt>
  2355. <name>Worklist type</name>
  2356. <alias>geom-worklist</alias>
  2357. <default>PQ</default>
  2358. <short_desc>Worklist type</short_desc>
  2359. <long_desc>
  2360. Specifies the worklist used for selecting the next propagation pointer. All possible options are: PQ, FIFO. They stand for the priority queue (sorted by the last fire time and topology order) and FIFO queue.
  2361. </long_desc>
  2362. <value>
  2363. <name>Priority Queue</name>
  2364. <alias>PQ</alias>
  2365. <short_desc>Priority Queue</short_desc>
  2366. <long_desc>
  2367. Priority Queue (sorted by the last fire time and topology order)
  2368. </long_desc>
  2369. <default/>
  2370. </value>
  2371. <value>
  2372. <name>FIFO Queue</name>
  2373. <alias>FIFO</alias>
  2374. <short_desc>FIFO Queue</short_desc>
  2375. <long_desc>
  2376. FIFO Queue
  2377. </long_desc>
  2378. </value>
  2379. </multiopt>
  2380. <stropt>
  2381. <name>Verbose dump file</name>
  2382. <alias>geom-dump-verbose</alias>
  2383. <default></default>
  2384. <set_arg_label>name</set_arg_label>
  2385. <short_desc>Filename for detailed execution log</short_desc>
  2386. <long_desc>
  2387. If you want to persist the detailed execution information for future analysis, please provide a file name.
  2388. </long_desc>
  2389. </stropt>
  2390. <stropt>
  2391. <name>Verification file</name>
  2392. <alias>geom-verify-name</alias>
  2393. <default></default>
  2394. <set_arg_label>path</set_arg_label>
  2395. <short_desc>Filename for verification file</short_desc>
  2396. <long_desc>
  2397. If you want to compare the precision of the points-to results with other solvers (e.g. Paddle), you can use the 'verify-file' to specify the list of methods (soot method signature format) that are reachable by that solver. Then, in the internal evaluations (see the switch geom-eval), we only consider the methods that are present to both solvers.
  2398. </long_desc>
  2399. </stropt>
  2400. <intopt>
  2401. <name>Precision evaluation methodologies</name>
  2402. <alias>geom-eval</alias>
  2403. <default>0</default>
  2404. <short_desc>Precision evaluation methodologies</short_desc>
  2405. <long_desc>
  2406. We internally provide some precision evaluation methodologies, and classify the evaluation strength into three levels. If level is 0, we do nothing. If level is 1, we report the basic information about the points-to result. If level is 2, we perform the virtual callsite resolution, static cast safety and all alias pairs evaluations.
  2407. </long_desc>
  2408. </intopt>
  2409. <boolopt>
  2410. <name>Transform to context-insensitive result</name>
  2411. <alias>geom-trans</alias>
  2412. <default>false</default>
  2413. <short_desc>Transform to context-insensitive result</short_desc>
  2414. <long_desc>
  2415. If your work only concern the context insensitive points-to information, you can use this option to transform the context sensitive result to insensitive result. Or, sometimes your code wants to directly access to the points-to vector other than using the standard querying interface, you can use this option to guarantee the correct behavior (because we clear the SPARK points-to result when running the geom solver). After the transformation, the context sensitive points-to result is cleared in order to save memory space for your other jobs.
  2416. </long_desc>
  2417. </boolopt>
  2418. <intopt>
  2419. <name>Fractional parameter</name>
  2420. <alias>geom-frac-base</alias>
  2421. <default>40</default>
  2422. <short_desc>Fractional parameter for precision/performance trade-off</short_desc>
  2423. <long_desc>
  2424. This option specifies the fractional parameter, which is used to manually tune the precision and performance trade-off. The smaller the value, the better the performance but the worse the precision.
  2425. </long_desc>
  2426. </intopt>
  2427. <boolopt>
  2428. <name>Blocking strategy for recursive calls</name>
  2429. <alias>geom-blocking</alias>
  2430. <default>true</default>
  2431. <short_desc>Enable blocking strategy for recursive calls</short_desc>
  2432. <long_desc>
  2433. When this option is on, we perform the blocking strategy to the recursive calls. This strategy significantly improves the precision. The details are presented in our paper.
  2434. </long_desc>
  2435. </boolopt>
  2436. <intopt>
  2437. <name>Iterations</name>
  2438. <alias>geom-runs</alias>
  2439. <default>1</default>
  2440. <short_desc>Iterations of analysis</short_desc>
  2441. <long_desc>
  2442. We can run multiple times of the geometric analysis to continuously improve the analysis precision.
  2443. </long_desc>
  2444. </intopt>
  2445. -->
  2446. </section>
  2447. </sub_phase>
  2448. <sub_phase>
  2449. <name>Paddle</name>
  2450. <class>PaddleOptions</class>
  2451. <alias>cg.paddle</alias>
  2452. <short_desc>Paddle points-to analysis framework</short_desc>
  2453. <long_desc>Paddle is a BDD-based interprocedural analysis framework. It includes points-to analysis, call graph construction, and various client analyses.</long_desc>
  2454. <boolopt>
  2455. <name>Enabled</name>
  2456. <alias>enabled</alias>
  2457. <default>false</default>
  2458. <short_desc/>
  2459. <long_desc/>
  2460. </boolopt>
  2461. <section>
  2462. <name>Paddle General Options</name>
  2463. <boolopt>
  2464. <name>Verbose</name>
  2465. <alias>verbose</alias>
  2466. <default>false</default>
  2467. <short_desc>Print detailed information about the execution of Paddle</short_desc>
  2468. <long_desc>
  2469. When this option is set to true, Paddle prints detailed information about its execution.
  2470. </long_desc>
  2471. </boolopt>
  2472. <multiopt>
  2473. <name>Configuration</name>
  2474. <alias>conf</alias>
  2475. <value>
  2476. <name>On-the fly call graph</name>
  2477. <alias>ofcg</alias>
  2478. <default/>
  2479. <short_desc>On-the fly call graph</short_desc>
  2480. <long_desc>
  2481. Performs points-to analysis and builds call graph together, on-the-fly.
  2482. </long_desc>
  2483. </value>
  2484. <value>
  2485. <name>CHA only</name>
  2486. <alias>cha</alias>
  2487. <short_desc>CHA only</short_desc>
  2488. <long_desc>
  2489. Builds only a call graph using Class Hieararchy Analysis, and performs no
  2490. points-to analysis.
  2491. </long_desc>
  2492. </value>
  2493. <value>
  2494. <name>CHA ahead-of-time call graph</name>
  2495. <alias>cha-aot</alias>
  2496. <short_desc>CHA ahead-of-time callgraph</short_desc>
  2497. <long_desc>
  2498. First builds a call graph using CHA, then uses the call graph in a fixed-call-graph points-to analysis.
  2499. </long_desc>
  2500. </value>
  2501. <value>
  2502. <name>OFCG-AOT</name>
  2503. <alias>ofcg-aot</alias>
  2504. <short_desc>OFCG-AOT callgraph</short_desc>
  2505. <long_desc>
  2506. First builds a call graph on-the-fly during a points-to analysis, then
  2507. uses the resulting call graph to perform a second points-to analysis
  2508. with a fixed call graph.
  2509. </long_desc>
  2510. </value>
  2511. <value>
  2512. <name>CHA-Context-AOT call graph</name>
  2513. <alias>cha-context-aot</alias>
  2514. <short_desc>CHA-Context-AOT callgraph</short_desc>
  2515. <long_desc>
  2516. First builds a call graph using CHA, then makes it context-sensitive using
  2517. the technique described by Calman and Zhu in PLDI 04,
  2518. then uses the call graph in a fixed-call-graph points-to analysis.
  2519. </long_desc>
  2520. </value>
  2521. <value>
  2522. <name>OFCG-Context-AOT</name>
  2523. <alias>ofcg-context-aot</alias>
  2524. <short_desc>OFCG-Context-AOT callgraph</short_desc>
  2525. <long_desc>
  2526. First builds a call graph on-the-fly during a points-to analysis, then
  2527. makes it context-sensitive using the technique described by Calman and
  2528. Zhu in PLDI 04, then uses the resulting call graph to perform a second
  2529. points-to analysis with a fixed call graph.
  2530. </long_desc>
  2531. </value>
  2532. <value>
  2533. <name>CHA-Context call graph</name>
  2534. <alias>cha-context</alias>
  2535. <short_desc>CHA-Context callgraph</short_desc>
  2536. <long_desc>
  2537. First builds a call graph using CHA, then makes it context-sensitive using
  2538. the technique described by Calman and Zhu in PLDI 04. Does not produce
  2539. points-to information.
  2540. </long_desc>
  2541. </value>
  2542. <value>
  2543. <name>OFCG-Context</name>
  2544. <alias>ofcg-context</alias>
  2545. <short_desc>OFCG-Context callgraph</short_desc>
  2546. <long_desc>
  2547. First builds a call graph on-the-fly during a points-to analysis, then
  2548. makes it context-sensitive using the technique described by Calman and
  2549. Zhu in PLDI 04. Does not perform a subsequent points-to analysis.
  2550. </long_desc>
  2551. </value>
  2552. <short_desc>Select Paddle configuration</short_desc>
  2553. <long_desc>
  2554. Selects the configuration of points-to analysis and call graph construction
  2555. to be used in Paddle.
  2556. </long_desc>
  2557. </multiopt>
  2558. <boolopt>
  2559. <name>Use BDDs</name>
  2560. <alias>bdd</alias>
  2561. <default>false</default>
  2562. <short_desc>Use BDD version of Paddle</short_desc>
  2563. <long_desc>
  2564. Causes Paddle to use BDD versions of its components
  2565. </long_desc>
  2566. </boolopt>
  2567. <intopt>
  2568. <name>Variable ordering</name>
  2569. <alias>order</alias>
  2570. <default>32</default>
  2571. <short_desc/>
  2572. <long_desc>
  2573. Selects one of the BDD variable orderings hard-coded in Paddle.
  2574. </long_desc>
  2575. </intopt>
  2576. <boolopt>
  2577. <name>Dynamic reordering</name>
  2578. <alias>dynamic-order</alias>
  2579. <short_desc/>
  2580. <long_desc>
  2581. Allows the BDD package to perform dynamic variable ordering.
  2582. </long_desc>
  2583. </boolopt>
  2584. <boolopt>
  2585. <name>Profile</name>
  2586. <alias>profile</alias>
  2587. <default>false</default>
  2588. <short_desc>Profile BDDs using JeddProfiler</short_desc>
  2589. <long_desc>
  2590. Turns on JeddProfiler for profiling BDD operations.
  2591. </long_desc>
  2592. </boolopt>
  2593. <boolopt>
  2594. <name>Verbose GC</name>
  2595. <alias>verbosegc</alias>
  2596. <default>false</default>
  2597. <short_desc>Print memory usage at each BDD garbage collection.</short_desc>
  2598. <long_desc>
  2599. Print memory usage at each BDD garbage collection.
  2600. </long_desc>
  2601. </boolopt>
  2602. <multiopt>
  2603. <name>Worklist Implementation</name>
  2604. <alias>q</alias>
  2605. <value>
  2606. <name>Select Automatically</name>
  2607. <alias>auto</alias>
  2608. <default/>
  2609. <short_desc>Select queue implementation based on bdd option</short_desc>
  2610. <long_desc>
  2611. When the bdd option is true, the BDD-based worklist implementation will be used.
  2612. When the bdd option is false, the Traditional worklist implementation will be used.
  2613. </long_desc>
  2614. </value>
  2615. <value>
  2616. <name>Traditional</name>
  2617. <alias>trad</alias>
  2618. <short_desc>Normal worklist queue implementation</short_desc>
  2619. <long_desc>
  2620. Normal worklist queue implementation
  2621. </long_desc>
  2622. </value>
  2623. <value>
  2624. <name>BDD</name>
  2625. <alias>bdd</alias>
  2626. <short_desc>BDD-based queue implementation</short_desc>
  2627. <long_desc>
  2628. BDD-based queue implementation
  2629. </long_desc>
  2630. </value>
  2631. <value>
  2632. <name>Debug</name>
  2633. <alias>debug</alias>
  2634. <short_desc>Debugging queue implementation</short_desc>
  2635. <long_desc>
  2636. An implementation of worklists that includes both traditional and BDD-based
  2637. implementations, and signals an error whenever their contents differ.
  2638. </long_desc>
  2639. </value>
  2640. <value>
  2641. <name>Trace</name>
  2642. <alias>trace</alias>
  2643. <short_desc>Tracing queue implementation</short_desc>
  2644. <long_desc>
  2645. A worklist implementation that prints out all tuples added to every worklist.
  2646. </long_desc>
  2647. </value>
  2648. <value>
  2649. <name>Number Trace</name>
  2650. <alias>numtrace</alias>
  2651. <short_desc>Number-tracing queue implementation</short_desc>
  2652. <long_desc>
  2653. A worklist implementation that prints out the number of tuples added to
  2654. each worklist after each operation.
  2655. </long_desc>
  2656. </value>
  2657. <short_desc>Select queue implementation</short_desc>
  2658. <long_desc>
  2659. Select the implementation of worklists to be used in Paddle.
  2660. </long_desc>
  2661. </multiopt>
  2662. <multiopt>
  2663. <name>Backend</name>
  2664. <alias>backend</alias>
  2665. <value>
  2666. <name>Select Automatically</name>
  2667. <alias>auto</alias>
  2668. <default/>
  2669. <short_desc>Select backend based on bdd option</short_desc>
  2670. <long_desc>
  2671. When the bdd option is true, the BuDDy backend will be used.
  2672. When the bdd option is false, the backend will be set to none, to avoid
  2673. loading any BDD backend.
  2674. </long_desc>
  2675. </value>
  2676. <value>
  2677. <name>BuDDy</name>
  2678. <alias>buddy</alias>
  2679. <short_desc>BuDDy backend</short_desc>
  2680. <long_desc>
  2681. Use BuDDy implementation of BDDs.
  2682. </long_desc>
  2683. </value>
  2684. <value>
  2685. <name>CUDD</name>
  2686. <alias>cudd</alias>
  2687. <short_desc>CUDD backend</short_desc>
  2688. <long_desc>
  2689. Use CUDD implementation of BDDs.
  2690. </long_desc>
  2691. </value>
  2692. <value>
  2693. <name>SableJBDD</name>
  2694. <alias>sable</alias>
  2695. <short_desc>SableJBDD backend</short_desc>
  2696. <long_desc>Use SableJBDD implementation of BDDs.</long_desc>
  2697. </value>
  2698. <value>
  2699. <name>JavaBDD</name>
  2700. <alias>javabdd</alias>
  2701. <short_desc>JavaBDD backend</short_desc>
  2702. <long_desc>
  2703. Use JavaBDD implementation of BDDs.
  2704. </long_desc>
  2705. </value>
  2706. <value>
  2707. <name>None</name>
  2708. <alias>none</alias>
  2709. <short_desc>No BDDs</short_desc>
  2710. <long_desc>
  2711. Don't use any BDD backend. Any attempted use of BDDs will cause Paddle to crash.
  2712. </long_desc>
  2713. </value>
  2714. <short_desc>Select BDD backend</short_desc>
  2715. <long_desc>
  2716. This option tells Paddle which implementation of BDDs to use.
  2717. </long_desc>
  2718. </multiopt>
  2719. <intopt>
  2720. <name>BDD Nodes</name>
  2721. <alias>bdd-nodes</alias>
  2722. <default>0</default>
  2723. <short_desc>Number of BDD nodes to allocate (0=unlimited)</short_desc>
  2724. <long_desc>
  2725. This option specifies the number of BDD nodes to be used by the BDD backend.
  2726. A value of 0 causes the backend to start with one million nodes, and allocate
  2727. more as required. A value other than zero causes the backend to start with
  2728. the specified size, and prevents it from ever allocating any more nodes.
  2729. </long_desc>
  2730. </intopt>
  2731. <boolopt>
  2732. <name>Ignore Types Entirely</name>
  2733. <alias>ignore-types</alias>
  2734. <default>false</default>
  2735. <short_desc>Make Paddle completely ignore declared types of variables</short_desc>
  2736. <long_desc>
  2737. When this option is set to true, all parts of Paddle completely ignore
  2738. declared types of variables and casts.
  2739. </long_desc>
  2740. </boolopt>
  2741. <boolopt>
  2742. <name>Pre Jimplify</name>
  2743. <alias>pre-jimplify</alias>
  2744. <default>false</default>
  2745. <short_desc>Jimplify all methods before starting Paddle</short_desc>
  2746. <long_desc>
  2747. When this option is set to true, Paddle converts all available methods to Jimple
  2748. before starting the points-to analysis. This allows the Jimplification
  2749. time to be separated from the points-to time. However, it increases the
  2750. total time and memory requirement, because all methods are Jimplified,
  2751. rather than only those deemed reachable by the points-to analysis.
  2752. </long_desc>
  2753. </boolopt>
  2754. </section>
  2755. <section>
  2756. <name>Paddle Context Sensitivity Options</name>
  2757. <multiopt>
  2758. <name>Context abstraction</name>
  2759. <alias>context</alias>
  2760. <value>
  2761. <name>Context-insensitive</name>
  2762. <alias>insens</alias>
  2763. <default/>
  2764. <short_desc>Builds a context-insensitive call graph</short_desc>
  2765. <long_desc>
  2766. Builds a context-insensitive call graph.
  2767. </long_desc>
  2768. </value>
  2769. <value>
  2770. <name>1-CFA</name>
  2771. <alias>1cfa</alias>
  2772. <short_desc>Builds a 1-CFA call graph</short_desc>
  2773. <long_desc>
  2774. Builds a 1-CFA call graph.
  2775. </long_desc>
  2776. </value>
  2777. <value>
  2778. <name>k-CFA</name>
  2779. <alias>kcfa</alias>
  2780. <short_desc>Builds a k-CFA call graph</short_desc>
  2781. <long_desc>
  2782. Builds a k-CFA call graph.
  2783. </long_desc>
  2784. </value>
  2785. <value>
  2786. <name>Object Sensitive</name>
  2787. <alias>objsens</alias>
  2788. <short_desc>Builds an object-sensitive call graph</short_desc>
  2789. <long_desc>
  2790. Builds an object-sensitive call graph.
  2791. </long_desc>
  2792. </value>
  2793. <value>
  2794. <name>k-Object Sensitive</name>
  2795. <alias>kobjsens</alias>
  2796. <short_desc>Builds a k-object-sensitive call graph</short_desc>
  2797. <long_desc>
  2798. Builds a context-sensitive call graph where the context is a string of up to
  2799. k receiver objects.
  2800. </long_desc>
  2801. </value>
  2802. <value>
  2803. <name>Unique k-Object Sensitive</name>
  2804. <alias>uniqkobjsens</alias>
  2805. <short_desc>Builds a unique-k-object-sensitive call graph</short_desc>
  2806. <long_desc>
  2807. Builds a context-sensitive call graph where the context is a string of up to
  2808. k unique receiver objects. If the receiver of a call already appears in the
  2809. context string, the context string is just reused as is.
  2810. </long_desc>
  2811. </value>
  2812. <value>
  2813. <name>Thread k-Object Sensitive</name>
  2814. <alias>threadkobjsens</alias>
  2815. <short_desc>Experimental option for thread-entry-point sensitivity</short_desc>
  2816. <long_desc>
  2817. Experimental option for thread-entry-point sensitivity.
  2818. </long_desc>
  2819. </value>
  2820. <short_desc>Select context-sensitivity level</short_desc>
  2821. <long_desc>
  2822. This option tells Paddle which level of context-sensitivity to use in constructing the call graph.
  2823. </long_desc>
  2824. </multiopt>
  2825. <intopt>
  2826. <name>Context length (k)</name>
  2827. <alias>k</alias>
  2828. <default>2</default>
  2829. <short_desc/>
  2830. <long_desc>
  2831. The maximum length of call string or receiver object string used as context.
  2832. </long_desc>
  2833. </intopt>
  2834. <boolopt>
  2835. <name>Context-sensitive Heap Locations</name>
  2836. <alias>context-heap</alias>
  2837. <default>false</default>
  2838. <short_desc>Treat allocation sites context-sensitively</short_desc>
  2839. <long_desc>
  2840. When this option is set to true, the context-sensitivity level that is set
  2841. for the context-sensitive call graph and for pointer variables is also used
  2842. to model heap locations context-sensitively. When this option is false,
  2843. heap locations are modelled context-insensitively regardless of the
  2844. context-sensitivity level.
  2845. </long_desc>
  2846. </boolopt>
  2847. </section>
  2848. <section>
  2849. <name>Paddle Pointer Assignment Graph Building Options</name>
  2850. <boolopt>
  2851. <name>RTA</name>
  2852. <alias>rta</alias>
  2853. <default>false</default>
  2854. <short_desc>Emulate Rapid Type Analysis</short_desc>
  2855. <long_desc>
  2856. Setting RTA to true sets types-for-sites to true, and causes Paddle to use
  2857. a single points-to set for all variables, giving <a href="http://doi.acm.org/10.1145/236337.236371">Rapid Type
  2858. Analysis</a>.
  2859. </long_desc>
  2860. </boolopt>
  2861. <boolopt>
  2862. <name>Field Based</name>
  2863. <alias>field-based</alias>
  2864. <default>false</default>
  2865. <short_desc>Use a field-based rather than field-sensitive representation</short_desc>
  2866. <long_desc>
  2867. When this option is set to true, fields are represented by variable
  2868. (Green) nodes, and the object that the field belongs to is ignored
  2869. (all objects are lumped together), giving a field-based analysis. Otherwise, fields are represented by
  2870. field reference (Red) nodes, and the objects that they belong to are
  2871. distinguished, giving a field-sensitive analysis.
  2872. </long_desc>
  2873. </boolopt>
  2874. <boolopt>
  2875. <name>Types For Sites</name>
  2876. <alias>types-for-sites</alias>
  2877. <default>false</default>
  2878. <short_desc>Represent objects by their actual type rather than allocation site</short_desc>
  2879. <long_desc>
  2880. When this option is set to true, types rather than allocation sites are
  2881. used as the elements of the points-to sets.
  2882. </long_desc>
  2883. </boolopt>
  2884. <boolopt>
  2885. <name>Merge String Buffer</name>
  2886. <alias>merge-stringbuffer</alias>
  2887. <default>true</default>
  2888. <short_desc>Represent all StringBuffers as one object</short_desc>
  2889. <long_desc>
  2890. When this option is set to true, all allocation sites creating
  2891. <tt>java.lang.StringBuffer</tt> objects are grouped together as a single
  2892. allocation site. Allocation sites creating a <tt>java.lang.StringBuilder</tt>
  2893. object are also grouped together as a single allocation site.
  2894. </long_desc>
  2895. </boolopt>
  2896. <boolopt>
  2897. <name>Propagate All String Constants</name>
  2898. <alias>string-constants</alias>
  2899. <default>false</default>
  2900. <short_desc>Propagate all string constants, not just class names</short_desc>
  2901. <long_desc>
  2902. When this option is set to false, Paddle only distinguishes string constants that
  2903. may be the name of a class loaded dynamically using reflection, and all other
  2904. string constants are lumped together into a single string constant node.
  2905. Setting this option to true causes all string constants to be propagated
  2906. individually.
  2907. </long_desc>
  2908. </boolopt>
  2909. <boolopt>
  2910. <name>Simulate Natives</name>
  2911. <alias>simulate-natives</alias>
  2912. <default>true</default>
  2913. <short_desc>Simulate effects of native methods in standard class library</short_desc>
  2914. <long_desc>
  2915. When this option is set to true, the effects of native methods in the standard Java class library are simulated.
  2916. </long_desc>
  2917. </boolopt>
  2918. <boolopt>
  2919. <name>Global Nodes in Simulated Natives</name>
  2920. <alias>global-nodes-in-natives</alias>
  2921. <default>false</default>
  2922. <short_desc>Use global node to model variables in simulations of native methods</short_desc>
  2923. <long_desc>
  2924. The simulations of native methods such as System.arraycopy() use
  2925. temporary local variable nodes. Setting this switch to true causes them
  2926. to use global variable nodes instead, reducing precision. The switch
  2927. exists only to make it possible to measure this effect on precision;
  2928. there is no other practical reason to set it to true.
  2929. </long_desc>
  2930. </boolopt>
  2931. <boolopt>
  2932. <name>Simple Edges Bidirectional</name>
  2933. <alias>simple-edges-bidirectional</alias>
  2934. <default>false</default>
  2935. <short_desc>Equality-based analysis between variable nodes</short_desc>
  2936. <long_desc>
  2937. When this option is set to true, all edges connecting variable (Green)
  2938. nodes are made bidirectional, as in <a href="http://doi.acm.org/10.1145/237721.237727">Steensgaard&apos;s analysis</a>.
  2939. </long_desc>
  2940. </boolopt>
  2941. <boolopt>
  2942. <name>this Pointer Assignment Edge</name>
  2943. <alias>this-edges</alias>
  2944. <default>false</default>
  2945. <short_desc>Use pointer assignment edges to model this parameters</short_desc>
  2946. <long_desc>
  2947. When constructing a call graph on-the-fly during points-to analysis, Paddle
  2948. normally propagates only those receivers that cause a method to be invoked
  2949. to the this pointer of the method. When this option is set to true, however,
  2950. Paddle instead models flow of receivers as an assignnment edge from the
  2951. receiver at the call site to the this pointer of the method, reducing
  2952. precision.
  2953. </long_desc>
  2954. </boolopt>
  2955. <boolopt>
  2956. <name>Precise newInstance</name>
  2957. <alias>precise-newinstance</alias>
  2958. <default>true</default>
  2959. <short_desc>Make newInstance only allocate objects of dynamic classes</short_desc>
  2960. <long_desc>
  2961. Normally, newInstance() calls are treated as if they may return an object
  2962. of any type. Setting this option to true causes them to be treated as if
  2963. they return only objects of the type of some dynamic class.
  2964. </long_desc>
  2965. </boolopt>
  2966. </section>
  2967. <section>
  2968. <name>Paddle Points-To Set Flowing Options</name>
  2969. <multiopt>
  2970. <name>Propagator</name>
  2971. <alias>propagator</alias>
  2972. <value>
  2973. <name>Select Automatically</name>
  2974. <alias>auto</alias>
  2975. <default/>
  2976. <short_desc>Select propagation algorithm based on bdd option</short_desc>
  2977. <long_desc>
  2978. When the bdd option is true, the Incremental BDD propagation algorithm will be used.
  2979. When the bdd option is false, the Worklist propagation algorithm will be used.
  2980. </long_desc>
  2981. </value>
  2982. <value>
  2983. <name>Iter</name>
  2984. <alias>iter</alias>
  2985. <short_desc>Simple iterative algorithm</short_desc>
  2986. <long_desc>
  2987. Iter is a simple, iterative algorithm, which propagates everything until the
  2988. graph does not change.
  2989. </long_desc>
  2990. </value>
  2991. <value>
  2992. <name>Worklist</name>
  2993. <alias>worklist</alias>
  2994. <short_desc>Fast, worklist-based algorithm</short_desc>
  2995. <long_desc>
  2996. Worklist is a worklist-based algorithm that tries
  2997. to do as little work as possible. This is currently the fastest algorithm.
  2998. </long_desc>
  2999. </value>
  3000. <value>
  3001. <name>Alias</name>
  3002. <alias>alias</alias>
  3003. <short_desc>Alias-edge based algorithm</short_desc>
  3004. <long_desc>
  3005. Alias is an alias-edge based algorithm. This algorithm tends to take
  3006. the least memory for very large problems, because it does not represent
  3007. explicitly points-to sets of fields of heap objects.
  3008. </long_desc>
  3009. </value>
  3010. <value>
  3011. <name>BDD</name>
  3012. <alias>bdd</alias>
  3013. <short_desc>BDD-based propagator</short_desc>
  3014. <long_desc>
  3015. BDD is a propagator that stores points-to sets in binary decision diagrams.
  3016. </long_desc>
  3017. </value>
  3018. <value>
  3019. <name>Incrementalized BDD</name>
  3020. <alias>incbdd</alias>
  3021. <short_desc>Incrementalized BDD-based propagator</short_desc>
  3022. <long_desc>
  3023. A propagator that stores points-to sets in binary decision diagrams, and propagates them incrementally.
  3024. </long_desc>
  3025. </value>
  3026. <short_desc>Select propagation algorithm</short_desc>
  3027. <long_desc>
  3028. This option tells Paddle which propagation algorithm to use.
  3029. </long_desc>
  3030. </multiopt>
  3031. <multiopt>
  3032. <name>Set Implementation</name>
  3033. <alias>set-impl</alias>
  3034. <value>
  3035. <name>Hash set</name>
  3036. <alias>hash</alias>
  3037. <short_desc>Use Java HashSet</short_desc>
  3038. <long_desc>
  3039. Hash is an implementation based on Java&apos;s built-in hash-set.
  3040. </long_desc>
  3041. </value>
  3042. <value>
  3043. <name>Bit-vector</name>
  3044. <alias>bit</alias>
  3045. <short_desc>Bit vector</short_desc>
  3046. <long_desc>
  3047. Bit is an implementation using a bit vector.
  3048. </long_desc>
  3049. </value>
  3050. <value>
  3051. <name>Hybrid</name>
  3052. <alias>hybrid</alias>
  3053. <short_desc>Hybrid representation using bit vector for large sets</short_desc>
  3054. <long_desc>
  3055. Hybrid is an implementation that keeps an explicit list of up to
  3056. 16 elements, and switches to a bit-vector when the set gets
  3057. larger than this.
  3058. </long_desc>
  3059. </value>
  3060. <value>
  3061. <name>Sorted array</name>
  3062. <alias>array</alias>
  3063. <short_desc>Sorted array representation</short_desc>
  3064. <long_desc>
  3065. Array is an implementation that keeps the elements of the
  3066. points-to set in a sorted array. Set membership is tested using
  3067. binary search, and set union and intersection are computed using
  3068. an algorithm based on the merge step from merge sort.
  3069. </long_desc>
  3070. </value>
  3071. <value>
  3072. <name>Heintze</name>
  3073. <alias>heintze</alias>
  3074. <short_desc>Heintze's shared bit-vector and overflow list representation</short_desc>
  3075. <long_desc>Heintze's representation has elements represented by a bit-vector + a small
  3076. 'overflow' list of some maximum number of elements. The bit-vectors can be shared
  3077. by multiple points-to sets, while the overflow lists are not.
  3078. </long_desc>
  3079. </value>
  3080. <value>
  3081. <name>Double</name>
  3082. <alias>double</alias>
  3083. <default/>
  3084. <short_desc>Double set representation for incremental propagation</short_desc>
  3085. <long_desc>
  3086. Double is an implementation that itself uses a pair of sets for
  3087. each points-to set. The first set in the pair stores new pointed-to
  3088. objects that have not yet been propagated, while the second set stores
  3089. old pointed-to objects that have been propagated and need not be
  3090. reconsidered. This allows the propagation algorithms to be incremental,
  3091. often speeding them up significantly.
  3092. </long_desc>
  3093. </value>
  3094. <short_desc>Select points-to set implementation</short_desc>
  3095. <long_desc>
  3096. Select an implementation of points-to sets for Paddle to use.
  3097. </long_desc>
  3098. </multiopt>
  3099. <multiopt>
  3100. <name>Double Set Old</name>
  3101. <alias>double-set-old</alias>
  3102. <value>
  3103. <name>Hash set</name>
  3104. <alias>hash</alias>
  3105. <short_desc>Use Java HashSet</short_desc>
  3106. <long_desc>
  3107. Hash is an implementation based on Java&apos;s built-in hash-set.
  3108. </long_desc>
  3109. </value>
  3110. <value>
  3111. <name>Bit-vector</name>
  3112. <alias>bit</alias>
  3113. <short_desc>Bit vector</short_desc>
  3114. <long_desc>
  3115. Bit is an implementation using a bit vector.
  3116. </long_desc>
  3117. </value>
  3118. <value>
  3119. <name>Hybrid</name>
  3120. <alias>hybrid</alias>
  3121. <default/>
  3122. <short_desc>Hybrid representation using bit vector for large sets</short_desc>
  3123. <long_desc>
  3124. Hybrid is an implementation that keeps an explicit list of up to
  3125. 16 elements, and switches to a bit-vector when the set gets
  3126. larger than this.
  3127. </long_desc>
  3128. </value>
  3129. <value>
  3130. <name>Sorted array</name>
  3131. <alias>array</alias>
  3132. <short_desc>Sorted array representation</short_desc>
  3133. <long_desc>
  3134. Array is an implementation that keeps the elements of the
  3135. points-to set in a sorted array. Set membership is tested using
  3136. binary search, and set union and intersection are computed using
  3137. an algorithm based on the merge step from merge sort.
  3138. </long_desc>
  3139. </value>
  3140. <value>
  3141. <name>Heintze</name>
  3142. <alias>heintze</alias>
  3143. <short_desc>Heintze's shared bit-vector and overflow list representation</short_desc>
  3144. <long_desc>Heintze's representation has elements represented by a bit-vector + a small
  3145. 'overflow' list of some maximum number of elements. The bit-vectors can be shared
  3146. by multiple points-to sets, while the overflow lists are not.
  3147. </long_desc>
  3148. </value>
  3149. <short_desc>Select implementation of points-to set for old part of double set</short_desc>
  3150. <long_desc>
  3151. Select an implementation for sets of old objects in the double
  3152. points-to set implementation.
  3153. This option has no effect unless Set Implementation is set to double.
  3154. </long_desc>
  3155. </multiopt>
  3156. <multiopt>
  3157. <name>Double Set New</name>
  3158. <alias>double-set-new</alias>
  3159. <value>
  3160. <name>Hash set</name>
  3161. <alias>hash</alias>
  3162. <short_desc>Use Java HashSet</short_desc>
  3163. <long_desc>
  3164. Hash is an implementation based on Java&apos;s built-in hash-set.
  3165. </long_desc>
  3166. </value>
  3167. <value>
  3168. <name>Bit-vector</name>
  3169. <alias>bit</alias>
  3170. <short_desc>Bit vector</short_desc>
  3171. <long_desc>
  3172. Bit is an implementation using a bit vector.
  3173. </long_desc>
  3174. </value>
  3175. <value>
  3176. <name>Hybrid</name>
  3177. <alias>hybrid</alias>
  3178. <default/>
  3179. <short_desc>Hybrid representation using bit vector for large sets</short_desc>
  3180. <long_desc>
  3181. Hybrid is an implementation that keeps an explicit list of up to
  3182. 16 elements, and switches to a bit-vector when the set gets
  3183. larger than this.
  3184. </long_desc>
  3185. </value>
  3186. <value>
  3187. <name>Sorted array</name>
  3188. <alias>array</alias>
  3189. <short_desc>Sorted array representation</short_desc>
  3190. <long_desc>
  3191. Array is an implementation that keeps the elements of the
  3192. points-to set in a sorted array. Set membership is tested using
  3193. binary search, and set union and intersection are computed using
  3194. an algorithm based on the merge step from merge sort.
  3195. </long_desc>
  3196. </value>
  3197. <value>
  3198. <name>Heintze</name>
  3199. <alias>heintze</alias>
  3200. <short_desc>Heintze's shared bit-vector and overflow list representation</short_desc>
  3201. <long_desc>Heintze's representation has elements represented by a bit-vector + a small
  3202. 'overflow' list of some maximum number of elements. The bit-vectors can be shared
  3203. by multiple points-to sets, while the overflow lists are not.
  3204. </long_desc>
  3205. </value>
  3206. <short_desc>Select implementation of points-to set for new part of double set</short_desc>
  3207. <long_desc>
  3208. Select an implementation for sets of new objects in the double
  3209. points-to set implementation.
  3210. This option has no effect unless Set Implementation is set to double.
  3211. </long_desc>
  3212. </multiopt>
  3213. </section>
  3214. <section>
  3215. <name>Paddle Output Options</name>
  3216. <boolopt>
  3217. <name>Print Context Counts</name>
  3218. <alias>context-counts</alias>
  3219. <default>false</default>
  3220. <short_desc>Print number of contexts for each method</short_desc>
  3221. <long_desc>
  3222. Causes Paddle to print the number of contexts for each method and
  3223. call edge, and the number of equivalence classes of contexts for
  3224. each variable node.
  3225. </long_desc>
  3226. </boolopt>
  3227. <boolopt>
  3228. <name>Print Context Counts (Totals only)</name>
  3229. <alias>total-context-counts</alias>
  3230. <default>false</default>
  3231. <short_desc>Print total number of contexts</short_desc>
  3232. <long_desc>
  3233. Causes Paddle to print the number of contexts and number of context
  3234. equivalence classes.
  3235. </long_desc>
  3236. </boolopt>
  3237. <boolopt>
  3238. <name>Method Context Counts (Totals only)</name>
  3239. <alias>method-context-counts</alias>
  3240. <default>false</default>
  3241. <short_desc>Print number of contexts for each method</short_desc>
  3242. <long_desc>
  3243. Causes Paddle to print the number of contexts and number of context
  3244. equivalence classes split out by method. Requires total-context-counts to also be turned on.
  3245. </long_desc>
  3246. </boolopt>
  3247. <boolopt>
  3248. <name>Calculate Set Mass</name>
  3249. <alias>set-mass</alias>
  3250. <default>false</default>
  3251. <short_desc>Calculate statistics about points-to set sizes</short_desc>
  3252. <long_desc>
  3253. When this option is set to true, Paddle computes and prints various
  3254. cryptic statistics about the size of the points-to sets computed.
  3255. </long_desc>
  3256. </boolopt>
  3257. <boolopt>
  3258. <name>Number nodes</name>
  3259. <alias>number-nodes</alias>
  3260. <default>true</default>
  3261. <short_desc>Print node numbers in dumps</short_desc>
  3262. <long_desc>
  3263. When printing debug information about nodes, this option causes the node number
  3264. of each node to be printed.
  3265. </long_desc>
  3266. </boolopt>
  3267. </section>
  3268. </sub_phase>
  3269. </radio_phase>
  3270. <phase>
  3271. <name>Whole Shimple Transformation Pack</name>
  3272. <alias>wstp</alias>
  3273. <short_desc>Whole-shimple transformation pack</short_desc>
  3274. <long_desc>
  3275. <p>
  3276. Soot can perform whole-program analyses. In whole-shimple mode, Soot
  3277. applies the contents of the Whole-Shimple Transformation Pack to the
  3278. scene as a whole after constructing a call graph for the program.</p>
  3279. <p>
  3280. In an unmodified copy of Soot the Whole-Shimple Transformation
  3281. Pack is empty.</p>
  3282. </long_desc>
  3283. <boolopt>
  3284. <name>Enabled</name>
  3285. <alias>enabled</alias>
  3286. <default>true</default>
  3287. </boolopt>
  3288. </phase>
  3289. <phase>
  3290. <name>Whole Shimple Optimization Pack</name>
  3291. <alias>wsop</alias>
  3292. <short_desc>Whole-shimple optimization pack</short_desc>
  3293. <long_desc>
  3294. <p>
  3295. If Soot is running in whole shimple mode and the Whole-Shimple
  3296. Optimization Pack is enabled, the pack's transformations are
  3297. applied to the scene as a whole after construction of the call
  3298. graph and application of any enabled Whole-Shimple
  3299. Transformations.</p>
  3300. <p>
  3301. In an unmodified copy of Soot the Whole-Shimple Optimization
  3302. Pack is empty.</p>
  3303. </long_desc>
  3304. <boolopt>
  3305. <name>Enabled</name>
  3306. <alias>enabled</alias>
  3307. <default>false</default>
  3308. </boolopt>
  3309. </phase>
  3310. <phase>
  3311. <name>Whole-Jimple Transformation Pack</name>
  3312. <alias>wjtp</alias>
  3313. <short_desc>Whole-jimple transformation pack</short_desc>
  3314. <long_desc>
  3315. <p>
  3316. Soot can perform whole-program analyses. In whole-program mode,
  3317. Soot applies the contents of the Whole-Jimple Transformation Pack
  3318. to the scene as a whole after constructing a call graph for the
  3319. program.</p>
  3320. </long_desc>
  3321. <boolopt>
  3322. <name>Enabled</name>
  3323. <alias>enabled</alias>
  3324. <default>true</default>
  3325. <short_desc/>
  3326. <long_desc/>
  3327. </boolopt>
  3328. <sub_phase>
  3329. <name>May Happen in Parallel Analyses</name>
  3330. <class>MhpTransformer</class>
  3331. <alias>wjtp.mhp</alias>
  3332. <short_desc>Determines what statements may be run concurrently</short_desc>
  3333. <long_desc>
  3334. May Happen in Parallel (MHP) Analyses determine what program statements may
  3335. be run by different threads concurrently. This phase does not perform any
  3336. transformation.
  3337. </long_desc>
  3338. <boolopt>
  3339. <name>Enabled</name>
  3340. <alias>enabled</alias>
  3341. <default>false</default>
  3342. <short_desc/>
  3343. <long_desc/>
  3344. </boolopt>
  3345. </sub_phase>
  3346. <sub_phase>
  3347. <name>Lock Allocator</name>
  3348. <class>LockAllocator</class>
  3349. <alias>wjtp.tn</alias>
  3350. <short_desc>Finds critical sections, allocates locks</short_desc>
  3351. <long_desc>
  3352. The Lock Allocator finds critical sections (synchronized regions)
  3353. in Java programs and assigns locks for execution on both
  3354. optimistic and pessimistic JVMs. It can also be used to analyze the existing
  3355. locks.
  3356. </long_desc>
  3357. <boolopt>
  3358. <name>Enabled</name>
  3359. <alias>enabled</alias>
  3360. <default>false</default>
  3361. <short_desc/>
  3362. <long_desc/>
  3363. </boolopt>
  3364. <multiopt>
  3365. <name>Locking Scheme</name>
  3366. <alias>locking-scheme</alias>
  3367. <set_arg_label>granularity</set_arg_label>
  3368. <short_desc>Selects the granularity of the generated lock allocation</short_desc>
  3369. <long_desc>Selects the granularity of the generated lock allocation</long_desc>
  3370. <!-- <value>
  3371. <name>Fine Grained</name>
  3372. <alias>fine-grained</alias>
  3373. <short_desc>Use multiple runtime objects for synchronization</short_desc>
  3374. <long_desc>
  3375. Try to identify transactional regions that can employ fine-grained locking to
  3376. increase parallelism. All side effects must be protected by a single object.
  3377. This locking scheme aims to achieve simple fine-grained locking.
  3378. </long_desc>
  3379. </value> -->
  3380. <value>
  3381. <name>Medium Grained</name>
  3382. <alias>medium-grained</alias>
  3383. <short_desc>Use a runtime object for synchronization where possible</short_desc>
  3384. <long_desc>
  3385. Try to identify transactional regions that can employ a dynamic lock to
  3386. increase parallelism. All side effects must be protected by a single object.
  3387. This locking scheme aims to approximate typical Java Monitor usage.
  3388. </long_desc>
  3389. <default/>
  3390. </value>
  3391. <value>
  3392. <name>Coarse Grained</name>
  3393. <alias>coarse-grained</alias>
  3394. <short_desc>Use static objects for synchronization</short_desc>
  3395. <long_desc>
  3396. Insert static objects into the program for synchronization. One object will be
  3397. used for each group of conflicting synchronized regions. This locking scheme
  3398. achieves code-level locking.
  3399. </long_desc>
  3400. </value>
  3401. <value>
  3402. <name>Single Static Lock</name>
  3403. <alias>single-static</alias>
  3404. <short_desc>Use just one static synchronization object for all transactional regions</short_desc>
  3405. <long_desc>
  3406. Insert one static object into the program for synchronization for all
  3407. transactional regions. This locking scheme is for research purposes.
  3408. </long_desc>
  3409. </value>
  3410. <value>
  3411. <name>Leave Original Locks</name>
  3412. <alias>leave-original</alias>
  3413. <short_desc>Analyse the existing lock structure without making changes</short_desc>
  3414. <long_desc>
  3415. Analyse the existing lock structure of the program, but do not change it. With
  3416. one of the print options, this can be useful for comparison between the original
  3417. program and one of the generated locking schemes.
  3418. </long_desc>
  3419. </value>
  3420. </multiopt>
  3421. <boolopt>
  3422. <name>Perform Deadlock Avoidance</name>
  3423. <alias>avoid-deadlock</alias>
  3424. <default>true</default>
  3425. <short_desc>Perform Deadlock Avoidance</short_desc>
  3426. <long_desc>
  3427. Perform Deadlock Avoidance by enforcing a lock ordering where necessary.
  3428. </long_desc>
  3429. </boolopt>
  3430. <boolopt>
  3431. <name>Use Open Nesting</name>
  3432. <alias>open-nesting</alias>
  3433. <default>true</default>
  3434. <short_desc>Use an open nesting model</short_desc>
  3435. <long_desc>
  3436. Use an open nesting model, where inner transactions are allowed to commit
  3437. independently of any outer transaction.
  3438. </long_desc>
  3439. </boolopt>
  3440. <boolopt>
  3441. <name>Perform May-Happen-in-Parallel Analysis</name>
  3442. <alias>do-mhp</alias>
  3443. <default>true</default>
  3444. <short_desc>Perform a May-Happen-in-Parallel analysis</short_desc>
  3445. <long_desc>
  3446. Perform a May-Happen-in-Parallel analysis to assist in allocating locks.
  3447. </long_desc>
  3448. </boolopt>
  3449. <boolopt>
  3450. <name>Perform Local Objects Analysis</name>
  3451. <alias>do-tlo</alias>
  3452. <default>true</default>
  3453. <short_desc>Perform a Local-Objects analysis</short_desc>
  3454. <long_desc>
  3455. Perform a Local-Objects analysis to assist in allocating locks.
  3456. </long_desc>
  3457. </boolopt>
  3458. <boolopt>
  3459. <name>Print Topological Graph</name>
  3460. <alias>print-graph</alias>
  3461. <default>false</default>
  3462. <short_desc>Print topological graph of transactions</short_desc>
  3463. <long_desc>
  3464. Print a topological graph of the program's transactions in the format used by the graphviz package.
  3465. </long_desc>
  3466. </boolopt>
  3467. <boolopt>
  3468. <name>Print Table</name>
  3469. <alias>print-table</alias>
  3470. <default>false</default>
  3471. <short_desc>Print table of transactions</short_desc>
  3472. <long_desc>
  3473. Print a table of information about the program's transactions.
  3474. </long_desc>
  3475. </boolopt>
  3476. <boolopt>
  3477. <name>Print Debugging Info</name>
  3478. <alias>print-debug</alias>
  3479. <default>false</default>
  3480. <short_desc>Print debugging info</short_desc>
  3481. <long_desc>
  3482. Print debugging info, including every statement visited.
  3483. </long_desc>
  3484. </boolopt>
  3485. </sub_phase>
  3486. </phase>
  3487. <phase>
  3488. <name>Whole-Jimple Optimization Pack</name>
  3489. <alias>wjop</alias>
  3490. <short_desc>Whole-jimple optimization pack</short_desc>
  3491. <long_desc>
  3492. <p>
  3493. If Soot is running in whole program mode and the Whole-Jimple
  3494. Optimization Pack is enabled, the pack's transformations are
  3495. applied to the scene as a whole after construction of the call
  3496. graph and application of any enabled Whole-Jimple
  3497. Transformations.</p>
  3498. </long_desc>
  3499. <boolopt>
  3500. <name>Enabled</name>
  3501. <alias>enabled</alias>
  3502. <default>false</default>
  3503. <short_desc/>
  3504. <long_desc/>
  3505. </boolopt>
  3506. <sub_phase>
  3507. <name>Static Method Binder</name>
  3508. <class>SMBOptions</class>
  3509. <alias>wjop.smb</alias>
  3510. <short_desc>Static method binder: Devirtualizes monomorphic calls</short_desc>
  3511. <long_desc>
  3512. The Static Method Binder statically binds monomorphic call
  3513. sites. That is, it searches the call graph for virtual method
  3514. invocations that can be determined statically to call only a single
  3515. implementation of the called method. Then it replaces such virtual
  3516. invocations with invocations of a static copy of the single called
  3517. implementation.
  3518. </long_desc>
  3519. <boolopt>
  3520. <name>Enabled</name>
  3521. <alias>enabled</alias>
  3522. <default>false</default>
  3523. <short_desc/>
  3524. <long_desc/>
  3525. </boolopt>
  3526. <boolopt>
  3527. <name>Insert Null Checks</name>
  3528. <alias>insert-null-checks</alias>
  3529. <default>true</default>
  3530. <short_desc/>
  3531. <long_desc>
  3532. Insert a check that, before invoking the static copy of the
  3533. target method, throws a <tt>NullPointerException</tt> if the
  3534. receiver object is null. This ensures that static method binding does
  3535. not eliminate exceptions which would have occurred in its absence.
  3536. </long_desc>
  3537. </boolopt>
  3538. <boolopt>
  3539. <name>Insert Redundant Casts</name>
  3540. <alias>insert-redundant-casts</alias>
  3541. <default>true</default>
  3542. <short_desc/>
  3543. <long_desc>
  3544. <p>
  3545. Insert extra casts for the Java bytecode verifier. If the target
  3546. method uses its <tt>this</tt> parameter, a reference to the
  3547. receiver object must be passed to the static copy of the target
  3548. method. The verifier may complain if the declared type of the
  3549. receiver parameter does not match the type implementing the
  3550. target method.</p>
  3551. <p>
  3552. Say, for example, that <tt>Singer</tt> is an interface declaring
  3553. the <tt>sing()</tt> method and that the call graph shows all
  3554. receiver objects at a particular call site,
  3555. <tt>singer.sing()</tt> (with <tt>singer</tt> declared as a
  3556. <tt>Singer</tt>) are in fact <tt>Bird</tt> objects (<tt>Bird</tt>
  3557. being a class that implements <tt>Singer</tt>). The virtual call
  3558. <tt>singer.sing()</tt> is effectively replaced with the static
  3559. call <tt>Bird.staticsing(singer)</tt>. <tt>Bird.staticsing()</tt>
  3560. may perform operations on its parameter which are only allowed on
  3561. <tt>Bird</tt>s, rather than <tt>Singer</tt>s. The Insert
  3562. Redundant Casts option inserts a cast of <tt>singer</tt> to the
  3563. <tt>Bird</tt> type, to prevent complaints from the verifier.</p>
  3564. </long_desc>
  3565. </boolopt>
  3566. <multiopt>
  3567. <name>Allowed Modifier Changes</name>
  3568. <alias>allowed-modifier-changes</alias>
  3569. <value>
  3570. <name>Unsafe</name>
  3571. <alias>unsafe</alias>
  3572. <short_desc/>
  3573. <long_desc>
  3574. Modify the visibility on code so that all inlining is permitted.
  3575. </long_desc>
  3576. <default/>
  3577. </value>
  3578. <value>
  3579. <name>Safe</name>
  3580. <alias>safe</alias>
  3581. <short_desc/>
  3582. <long_desc>
  3583. Preserve the exact meaning of the analyzed program.
  3584. </long_desc>
  3585. </value>
  3586. <value>
  3587. <name>None</name>
  3588. <alias>none</alias>
  3589. <short_desc/>
  3590. <long_desc>
  3591. Change no modifiers whatsoever.
  3592. </long_desc>
  3593. </value>
  3594. <short_desc/>
  3595. <long_desc>
  3596. Specify which changes in visibility modifiers
  3597. are allowed.
  3598. </long_desc>
  3599. </multiopt>
  3600. </sub_phase>
  3601. <sub_phase>
  3602. <name>Static Inliner</name>
  3603. <class>SIOptions</class>
  3604. <alias>wjop.si</alias>
  3605. <short_desc>Static inliner: inlines monomorphic calls</short_desc>
  3606. <long_desc>
  3607. The Static Inliner visits all call sites in the call graph in a
  3608. bottom-up fashion, replacing monomorphic calls with inlined
  3609. copies of the invoked methods.
  3610. </long_desc>
  3611. <boolopt>
  3612. <name>Enabled</name>
  3613. <alias>enabled</alias>
  3614. <default>true</default>
  3615. <short_desc/>
  3616. <long_desc/>
  3617. </boolopt>
  3618. <boolopt>
  3619. <name>Reconstruct Jimple body after inlining</name>
  3620. <alias>rerun-jb</alias>
  3621. <default>true</default>
  3622. <short_desc/>
  3623. <long_desc>
  3624. When a method with array parameters is inlined, its variables may need to
  3625. be assigned different types than they had in the original method to produce
  3626. compilable code. When this option is set, Soot re-runs the Jimple Body pack
  3627. on each method body which has had another method inlined into it so that
  3628. the typing algorithm can reassign the types.
  3629. </long_desc>
  3630. </boolopt>
  3631. <boolopt>
  3632. <name>Insert Null Checks</name>
  3633. <alias>insert-null-checks</alias>
  3634. <default>true</default>
  3635. <short_desc/>
  3636. <long_desc>
  3637. Insert, before the inlined body of the target method, a check
  3638. that throws a <tt>NullPointerException</tt> if the receiver
  3639. object is null. This ensures that inlining will not eliminate
  3640. exceptions which would have occurred in its absence.
  3641. </long_desc>
  3642. </boolopt>
  3643. <boolopt>
  3644. <name>Insert Redundant Casts</name>
  3645. <alias>insert-redundant-casts</alias>
  3646. <default>true</default>
  3647. <short_desc/>
  3648. <long_desc>
  3649. <p>
  3650. Insert extra casts for the Java bytecode verifier. The verifier
  3651. may complain if the inlined method uses <tt>this</tt> and the
  3652. declared type of the receiver of the call being inlined is
  3653. different from the type implementing the target method being
  3654. inlined.</p>
  3655. <p>
  3656. Say, for example, that <tt>Singer</tt> is an interface declaring
  3657. the <tt>sing()</tt> method and that the call graph shows that all
  3658. receiver objects at a particular call site,
  3659. <tt>singer.sing()</tt> (with <tt>singer</tt> declared as a
  3660. <tt>Singer</tt>) are in fact <tt>Bird</tt> objects (<tt>Bird</tt>
  3661. being a class that implements <tt>Singer</tt>). The
  3662. implementation of <tt>Bird.sing()</tt> may perform operations on
  3663. <tt>this</tt> which are only allowed on <tt>Bird</tt>s, rather
  3664. than <tt>Singer</tt>s. The Insert Redundant Casts option ensures that
  3665. this cannot lead to verification errors, by inserting a cast of
  3666. <tt>bird</tt> to the <tt>Bird</tt> type before inlining the body
  3667. of <tt>Bird.sing()</tt>.</p>
  3668. </long_desc>
  3669. </boolopt>
  3670. <multiopt>
  3671. <name>Allowed Modifier Changes</name>
  3672. <alias>allowed-modifier-changes</alias>
  3673. <value>
  3674. <name>Unsafe</name>
  3675. <alias>unsafe</alias>
  3676. <short_desc/>
  3677. <long_desc>
  3678. Modify the visibility on code so that all inlining is permitted.
  3679. </long_desc>
  3680. <default/>
  3681. </value>
  3682. <value>
  3683. <name>Safe</name>
  3684. <alias>safe</alias>
  3685. <short_desc/>
  3686. <long_desc>
  3687. Preserve the exact meaning of the analyzed program.
  3688. </long_desc>
  3689. </value>
  3690. <value>
  3691. <name>None</name>
  3692. <alias>none</alias>
  3693. <short_desc/>
  3694. <long_desc>
  3695. Change no modifiers whatsoever.
  3696. </long_desc>
  3697. </value>
  3698. <short_desc/>
  3699. <long_desc>
  3700. Specify which changes in visibility modifiers
  3701. are allowed.
  3702. </long_desc>
  3703. </multiopt>
  3704. <flopt>
  3705. <name>Expansion Factor</name>
  3706. <alias>expansion-factor</alias>
  3707. <default>3</default>
  3708. <short_desc/>
  3709. <long_desc>
  3710. Determines the maximum allowed expansion of a method. Inlining
  3711. will cause the method to grow by a factor of no more than
  3712. the Expansion Factor.
  3713. </long_desc>
  3714. </flopt>
  3715. <intopt>
  3716. <name>Max Container Size</name>
  3717. <alias>max-container-size</alias>
  3718. <default>5000</default>
  3719. <short_desc/>
  3720. <long_desc>
  3721. Determines the maximum number of Jimple statements for a container
  3722. method. If a method has more than this number of Jimple statements,
  3723. then no methods will be inlined into it.
  3724. </long_desc>
  3725. </intopt>
  3726. <intopt>
  3727. <name>Max Inlinee Size</name>
  3728. <alias>max-inlinee-size</alias>
  3729. <default>20</default>
  3730. <short_desc/>
  3731. <long_desc>
  3732. Determines the maximum number of Jimple statements for an inlinee
  3733. method. If a method has more than this number of Jimple statements,
  3734. then it will not be inlined into other methods.
  3735. </long_desc>
  3736. </intopt>
  3737. </sub_phase>
  3738. </phase>
  3739. <phase>
  3740. <name>Whole-Jimple Annotation Pack</name>
  3741. <short_desc>Whole-jimple annotation pack: adds interprocedural tags</short_desc>
  3742. <alias>wjap</alias>
  3743. <long_desc>
  3744. <p>
  3745. Some analyses do not transform Jimple body directly, but annotate
  3746. statements or values with tags. Whole-Jimple annotation pack provides
  3747. a place for annotation-oriented analyses in whole program mode.</p>
  3748. </long_desc>
  3749. <boolopt>
  3750. <name>Enabled</name>
  3751. <alias>enabled</alias>
  3752. <default>true</default>
  3753. </boolopt>
  3754. <sub_phase>
  3755. <name>Rectangular Array Finder</name>
  3756. <alias>wjap.ra</alias>
  3757. <short_desc>Rectangular array finder</short_desc>
  3758. <long_desc>
  3759. <p>
  3760. The Rectangular Array Finder traverses Jimple statements
  3761. based on the static call graph, and finds array variables which always
  3762. hold rectangular two-dimensional array objects.</p>
  3763. <p>
  3764. In Java, a multi-dimensional array is an array of arrays, which
  3765. means the shape of the array can be ragged. Nevertheless, many
  3766. applications use rectangular arrays. Knowing that an array is
  3767. rectangular can be very helpful in proving safe array bounds
  3768. checks.</p>
  3769. <p>
  3770. The Rectangular Array Finder does not change the
  3771. program being analyzed. Its results are used by the Array Bound
  3772. Checker.</p>
  3773. </long_desc>
  3774. <boolopt>
  3775. <name>Enabled</name>
  3776. <alias>enabled</alias>
  3777. <default>false</default>
  3778. </boolopt>
  3779. </sub_phase>
  3780. <sub_phase>
  3781. <name>Unreachable Method Tagger</name>
  3782. <alias>wjap.umt</alias>
  3783. <short_desc>Tags all unreachable methods</short_desc>
  3784. <long_desc><p>Uses the call graph to determine which methods are unreachable and adds color tags so they can be highlighted in a source browser.</p></long_desc>
  3785. <boolopt>
  3786. <name>Enabled</name>
  3787. <alias>enabled</alias>
  3788. <default>false</default>
  3789. </boolopt>
  3790. </sub_phase>
  3791. <sub_phase>
  3792. <name>Unreachable Fields Tagger</name>
  3793. <alias>wjap.uft</alias>
  3794. <short_desc>Tags all unreachable fields</short_desc>
  3795. <long_desc><p>Uses the call graph to determine which fields are unreachable and adds color tags so they can be highlighted in a source browser.</p></long_desc>
  3796. <boolopt>
  3797. <name>Enabled</name>
  3798. <alias>enabled</alias>
  3799. <default>false</default>
  3800. </boolopt>
  3801. </sub_phase>
  3802. <sub_phase>
  3803. <name>Tightest Qualifiers Tagger</name>
  3804. <alias>wjap.tqt</alias>
  3805. <short_desc>Tags all qualifiers that could be tighter</short_desc>
  3806. <long_desc><p>Determines which methods and fields have qualifiers that could be tightened. For example: if a field or method has the qualifier of public but is only used within the declaring class it could be private. This, this field or method is tagged with color tags so that the results can be highlighted in a source browser.</p></long_desc>
  3807. <boolopt>
  3808. <name>Enabled</name>
  3809. <alias>enabled</alias>
  3810. <default>false</default>
  3811. </boolopt>
  3812. </sub_phase>
  3813. <sub_phase>
  3814. <name>Call Graph Grapher</name>
  3815. <class>CGGOptions</class>
  3816. <alias>wjap.cgg</alias>
  3817. <short_desc>Creates graphical call graph.</short_desc>
  3818. <long_desc><p>Creates graphical call graph.</p></long_desc>
  3819. <boolopt>
  3820. <name>Enabled</name>
  3821. <alias>enabled</alias>
  3822. <default>false</default>
  3823. </boolopt>
  3824. <boolopt>
  3825. <name>Show Library Methods</name>
  3826. <alias>show-lib-meths</alias>
  3827. <default>false</default>
  3828. </boolopt>
  3829. </sub_phase>
  3830. <sub_phase>
  3831. <name>Purity Analysis [AM]</name>
  3832. <class>PurityOptions</class>
  3833. <alias>wjap.purity</alias>
  3834. <short_desc>Emit purity attributes</short_desc>
  3835. <long_desc>
  3836. Purity anaysis implemented by Antoine Mine and based on the paper
  3837. A Combined Pointer and Purity Analysis for Java Programs by
  3838. Alexandru Salcianu and Martin Rinard.
  3839. </long_desc>
  3840. <boolopt>
  3841. <name>Enabled</name>
  3842. <alias>enabled</alias>
  3843. <default>false</default>
  3844. </boolopt>
  3845. <boolopt>
  3846. <name>Dump one .dot files for each method summary</name>
  3847. <alias>dump-summaries</alias>
  3848. <default>true</default>
  3849. </boolopt>
  3850. <boolopt>
  3851. <name>Dump .dot call-graph annotated with method summaries (huge)</name>
  3852. <alias>dump-cg</alias>
  3853. <default>false</default>
  3854. </boolopt>
  3855. <boolopt>
  3856. <name>Dump one .dot for each intra-procedural method analysis (long)</name>
  3857. <alias>dump-intra</alias>
  3858. <default>false</default>
  3859. </boolopt>
  3860. <boolopt>
  3861. <name>Print analysis results</name>
  3862. <alias>print</alias>
  3863. <default>true</default>
  3864. </boolopt>
  3865. <boolopt>
  3866. <name>Annotate class files</name>
  3867. <short_desc>Marks pure methods with a purity bytecode attribute</short_desc>
  3868. <alias>annotate</alias>
  3869. <default>true</default>
  3870. </boolopt>
  3871. <boolopt>
  3872. <name>Be (quite) verbose</name>
  3873. <alias>verbose</alias>
  3874. <default>false</default>
  3875. </boolopt>
  3876. </sub_phase>
  3877. </phase>
  3878. <phase>
  3879. <name>Shimple Control</name>
  3880. <alias>shimple</alias>
  3881. <class>ShimpleOptions</class>
  3882. <short_desc>Sets parameters for Shimple SSA form</short_desc>
  3883. <long_desc>
  3884. <p>
  3885. Shimple Control sets parameters which apply throughout the
  3886. creation and manipulation of Shimple bodies. Shimple is Soot's
  3887. SSA representation.</p>
  3888. </long_desc>
  3889. <boolopt>
  3890. <name>Enabled</name>
  3891. <alias>enabled</alias>
  3892. <default>true</default>
  3893. </boolopt>
  3894. <boolopt>
  3895. <name>Shimple Node Elimination Optimizations</name>
  3896. <alias>node-elim-opt</alias>
  3897. <short_desc>Node elimination optimizations</short_desc>
  3898. <default>true</default>
  3899. <long_desc>
  3900. <p>
  3901. Perform some optimizations, such as dead code elimination
  3902. and local aggregation, before/after eliminating nodes.
  3903. </p>
  3904. </long_desc>
  3905. </boolopt>
  3906. <boolopt>
  3907. <name>Local Name Standardization</name>
  3908. <alias>standard-local-names</alias>
  3909. <default>false</default>
  3910. <short_desc>Uses naming scheme of the Local Name
  3911. Standardizer.</short_desc>
  3912. <long_desc>
  3913. If enabled, the Local Name Standardizer is applied whenever
  3914. Shimple creates new locals. Normally, Shimple will retain
  3915. the original local names as far as possible and use an
  3916. underscore notation to denote SSA subscripts. This
  3917. transformation does not otherwise affect Shimple
  3918. behaviour.
  3919. </long_desc>
  3920. </boolopt>
  3921. <boolopt>
  3922. <name>Extended SSA (SSI)</name>
  3923. <alias>extended</alias>
  3924. <default>false</default>
  3925. <short_desc>Compute extended SSA (SSI) form.</short_desc>
  3926. <long_desc>
  3927. If enabled, Shimple will created extended SSA (SSI) form.
  3928. </long_desc>
  3929. </boolopt>
  3930. <boolopt>
  3931. <name>Debugging Output</name>
  3932. <alias>debug</alias>
  3933. <default>false</default>
  3934. <short_desc>Enables debugging output, if any.</short_desc>
  3935. <long_desc>
  3936. If enabled, Soot may print out warnings and messages
  3937. useful for debugging the Shimple module. Automatically
  3938. enabled by the global debug switch.
  3939. </long_desc>
  3940. </boolopt>
  3941. </phase>
  3942. <phase>
  3943. <name>Shimple Transformation Pack</name>
  3944. <alias>stp</alias>
  3945. <short_desc>Shimple transformation pack</short_desc>
  3946. <long_desc>
  3947. <p>
  3948. When the Shimple representation is produced, Soot applies the
  3949. contents of the Shimple Transformation Pack to each method
  3950. under analysis. This pack contains no transformations in an
  3951. unmodified version of Soot.
  3952. </p>
  3953. </long_desc>
  3954. <boolopt>
  3955. <name>Enabled</name>
  3956. <alias>enabled</alias>
  3957. <default>true</default>
  3958. </boolopt>
  3959. </phase>
  3960. <phase>
  3961. <name>Shimple Optimization Pack</name>
  3962. <alias>sop</alias>
  3963. <short_desc>Shimple optimization pack</short_desc>
  3964. <long_desc>
  3965. <p>
  3966. The Shimple Optimization Pack contains transformations that
  3967. perform optimizations on Shimple, Soot's SSA
  3968. representation.
  3969. </p>
  3970. </long_desc>
  3971. <boolopt>
  3972. <name>Enabled</name>
  3973. <alias>enabled</alias>
  3974. <default>false</default>
  3975. </boolopt>
  3976. <sub_phase>
  3977. <name>Shimple Constant Propagator and Folder</name>
  3978. <short_desc>Shimple constant propagator and folder</short_desc>
  3979. <long_desc>
  3980. <p>
  3981. A powerful constant propagator and folder based on an
  3982. algorithm sketched by Cytron et al that takes
  3983. conditional control flow into account. This
  3984. optimization demonstrates some of the benefits of SSA
  3985. -- particularly the fact that Phi nodes represent
  3986. natural merge points in the control flow.
  3987. </p>
  3988. </long_desc>
  3989. <alias>sop.cpf</alias>
  3990. <boolopt>
  3991. <name>Enabled</name>
  3992. <alias>enabled</alias>
  3993. <default>true</default>
  3994. </boolopt>
  3995. <boolopt>
  3996. <name>Prune Control Flow Graph</name>
  3997. <alias>prune-cfg</alias>
  3998. <default>true</default>
  3999. <short_desc>Take advantage of CFG optimization
  4000. opportunities.</short_desc>
  4001. <long_desc>
  4002. <p>
  4003. Conditional branching statements that are found to
  4004. branch unconditionally (or fall through) are replaced
  4005. with unconditional branches (or removed). This
  4006. transformation exposes more opportunities for dead
  4007. code removal.
  4008. </p>
  4009. </long_desc>
  4010. </boolopt>
  4011. </sub_phase>
  4012. </phase>
  4013. <phase>
  4014. <name>Jimple Transformation Pack</name>
  4015. <alias>jtp</alias>
  4016. <short_desc>Jimple transformation pack: intraprocedural analyses added to Soot</short_desc>
  4017. <long_desc>
  4018. Soot applies the contents of the Jimple Transformation Pack to
  4019. each method under analysis. This pack contains no
  4020. transformations in an unmodified version of Soot.
  4021. </long_desc>
  4022. <boolopt>
  4023. <name>Enabled</name>
  4024. <alias>enabled</alias>
  4025. <default>true</default>
  4026. </boolopt>
  4027. </phase>
  4028. <phase>
  4029. <name>Jimple Optimization Pack</name>
  4030. <alias>jop</alias>
  4031. <short_desc>Jimple optimization pack (intraprocedural)</short_desc>
  4032. <long_desc>
  4033. When Soot's Optimize option is on, Soot applies the
  4034. Jimple Optimization Pack to every <tt>JimpleBody</tt> in
  4035. application classes. This section lists the default
  4036. transformations in the Jimple Optimization Pack.
  4037. </long_desc>
  4038. <boolopt>
  4039. <name>Enabled</name>
  4040. <alias>enabled</alias>
  4041. <default>false</default>
  4042. <short_desc>Eliminates common subexpressions</short_desc>
  4043. <long_desc/>
  4044. </boolopt>
  4045. <sub_phase>
  4046. <name>Common Subexpression Eliminator</name>
  4047. <alias>jop.cse</alias>
  4048. <short_desc>Common subexpression eliminator</short_desc>
  4049. <long_desc>
  4050. <p>
  4051. The Common Subexpression Eliminator runs an available expressions
  4052. analysis on the method body, then eliminates common
  4053. subexpressions.
  4054. </p>
  4055. <p>
  4056. This implementation is especially slow, as it runs on individual
  4057. statements rather than on basic blocks. A better implementation
  4058. (which would find most common subexpressions, but not all) would use
  4059. basic blocks instead.
  4060. </p>
  4061. <p>
  4062. This implementation is also slow because the flow universe is
  4063. explicitly created; it need not be. A better implementation
  4064. would implicitly compute the kill sets at every node.
  4065. </p>
  4066. <p>
  4067. Because of its current slowness, this transformation is not
  4068. enabled by default.
  4069. </p>
  4070. </long_desc>
  4071. <boolopt>
  4072. <name>Enabled</name>
  4073. <alias>enabled</alias>
  4074. <default>false</default>
  4075. <short_desc/>
  4076. <long_desc/>
  4077. </boolopt>
  4078. <boolopt>
  4079. <name>Naive Side Effect Tester</name>
  4080. <alias>naive-side-effect</alias>
  4081. <default>false</default>
  4082. <short_desc>Use naive side effect analysis even if interprocedural information is available</short_desc>
  4083. <long_desc>
  4084. <p>
  4085. If Naive Side Effect Tester is <tt>true</tt>, the Common
  4086. Subexpression Eliminator uses the conservative side effect
  4087. information provided by the <tt>NaiveSideEffectTester</tt> class,
  4088. even if interprocedural information about side effects is
  4089. available.</p>
  4090. <p>
  4091. The naive side effect analysis is based solely on the information
  4092. available locally about a statement. It assumes, for example,
  4093. that any method call has the potential to write and read all
  4094. instance and static fields in the program.</p>
  4095. <p>
  4096. If Naive Side Effect Tester is set to <tt>false</tt> and Soot is
  4097. in whole program mode, then the Common Subexpression
  4098. Eliminator uses the side effect information provided by the
  4099. <tt>PASideEffectTester</tt> class. <tt>PASideEffectTester</tt>
  4100. uses a points-to analysis to
  4101. determine which fields and statics may be written or read by a
  4102. given statement.</p>
  4103. <p>
  4104. If whole program analysis is not performed, naive side effect
  4105. information is used regardless of the setting of
  4106. Naive Side Effect Tester.
  4107. </p>
  4108. </long_desc>
  4109. </boolopt>
  4110. </sub_phase>
  4111. <sub_phase>
  4112. <name>Busy Code Motion</name>
  4113. <alias>jop.bcm</alias>
  4114. <class>BCMOptions</class>
  4115. <short_desc>Busy code motion: unaggressive partial redundancy elimination</short_desc>
  4116. <long_desc>
  4117. Busy Code Motion is a straightforward implementation of Partial
  4118. Redundancy Elimination. This implementation is not very
  4119. aggressive. Lazy Code Motion is an improved version which
  4120. should be used instead of Busy Code Motion.
  4121. </long_desc>
  4122. <boolopt>
  4123. <name>Enabled</name>
  4124. <alias>enabled</alias>
  4125. <default>false</default>
  4126. <short_desc/>
  4127. <long_desc/>
  4128. </boolopt>
  4129. <boolopt>
  4130. <name>Naive Side Effect Tester</name>
  4131. <alias>naive-side-effect</alias>
  4132. <default>false</default>
  4133. <short_desc>Use a naive side effect analysis even if interprocedural information is available</short_desc>
  4134. <long_desc>
  4135. <p>
  4136. If Naive Side Effect Tester is set to <tt>true</tt>, Busy Code
  4137. Motion uses the conservative side effect information provided by
  4138. the <tt>NaiveSideEffectTester</tt> class, even if interprocedural
  4139. information about side effects is available.</p>
  4140. <p>
  4141. The naive side effect analysis is based solely on the information
  4142. available locally about a statement. It assumes, for example,
  4143. that any method call has the potential to write and read all
  4144. instance and static fields in the program.</p>
  4145. <p>
  4146. If Naive Side Effect Tester is set to <tt>false</tt> and Soot is
  4147. in whole program mode, then Busy Code Motion uses the side effect
  4148. information provided by the <tt>PASideEffectTester</tt>
  4149. class. <tt>PASideEffectTester</tt> uses a points-to analysis to
  4150. determine which fields and statics may be written or read by a
  4151. given statement.</p>
  4152. <p>
  4153. If whole program analysis is not performed, naive side effect
  4154. information is used regardless of the setting of
  4155. Naive Side Effect Tester.
  4156. </p>
  4157. </long_desc>
  4158. </boolopt>
  4159. </sub_phase>
  4160. <sub_phase>
  4161. <name>Lazy Code Motion</name>
  4162. <class>LCMOptions</class>
  4163. <alias>jop.lcm</alias>
  4164. <short_desc>Lazy code motion: aggressive partial redundancy elimination</short_desc>
  4165. <long_desc>
  4166. Lazy Code Motion is an enhanced version of Busy Code Motion, a
  4167. Partial Redundancy Eliminator. Before doing Partial Redundancy Elimination,
  4168. this optimization performs loop inversion (turning <tt>while</tt> loops
  4169. into <tt>do while</tt> loops inside an <tt>if</tt> statement).
  4170. This allows the Partial Redundancy Eliminator
  4171. to optimize loop invariants of <tt>while</tt> loops.
  4172. </long_desc>
  4173. <boolopt>
  4174. <name>Enabled</name>
  4175. <alias>enabled</alias>
  4176. <default>false</default>
  4177. <short_desc/>
  4178. <long_desc/>
  4179. </boolopt>
  4180. <multiopt>
  4181. <name>Safety</name>
  4182. <alias>safety</alias>
  4183. <value>
  4184. <name>Safe</name>
  4185. <alias>safe</alias>
  4186. <short_desc/>
  4187. <long_desc>
  4188. Safe, but only considers moving additions,
  4189. subtractions and multiplications.
  4190. </long_desc>
  4191. <default/>
  4192. </value>
  4193. <value>
  4194. <name>Medium</name>
  4195. <alias>medium</alias>
  4196. <short_desc/>
  4197. <long_desc>
  4198. Unsafe in multi-threaded programs, as it may reuse the values
  4199. read from field accesses.
  4200. </long_desc>
  4201. </value>
  4202. <value>
  4203. <name>Unsafe</name>
  4204. <alias>unsafe</alias>
  4205. <short_desc/>
  4206. <long_desc>
  4207. May violate Java's exception semantics, as it may move or reorder
  4208. exception-throwing statements, potentially outside of
  4209. <tt>try-catch</tt> blocks.
  4210. </long_desc>
  4211. </value>
  4212. <short_desc/>
  4213. <long_desc>
  4214. This option controls which fields and statements are candidates
  4215. for code motion.
  4216. </long_desc>
  4217. </multiopt>
  4218. <boolopt>
  4219. <name>Unroll</name>
  4220. <alias>unroll</alias>
  4221. <short_desc/>
  4222. <long_desc>
  4223. If <tt>true</tt>, perform loop inversion before doing the
  4224. transformation.
  4225. </long_desc>
  4226. <default>true</default>
  4227. </boolopt>
  4228. <boolopt>
  4229. <name>Naive Side Effect Tester</name>
  4230. <alias>naive-side-effect</alias>
  4231. <default>false</default>
  4232. <short_desc>Use a naive side effect analysis even if interprocedural information is available</short_desc>
  4233. <long_desc>
  4234. <p>
  4235. If Naive Side Effect Tester is set to <tt>true</tt>, Lazy Code
  4236. Motion uses the conservative side effect information provided by
  4237. the <tt>NaiveSideEffectTester</tt> class, even if interprocedural
  4238. information about side effects is available.</p>
  4239. <p>
  4240. The naive side effect analysis is based solely on the information
  4241. available locally about a statement. It assumes, for example,
  4242. that any method call has the potential to write and read all
  4243. instance and static fields in the program.</p>
  4244. <p>
  4245. If Naive Side Effect Tester is set to <tt>false</tt> and Soot is
  4246. in whole program mode, then Lazy Code Motion uses the side effect
  4247. information provided by the <tt>PASideEffectTester</tt>
  4248. class. <tt>PASideEffectTester</tt> uses a points-to analysis to
  4249. determine which fields and statics may be written or read by a
  4250. given statement.</p>
  4251. <p>
  4252. If whole program analysis is not performed, naive side effect
  4253. information is used regardless of the setting of
  4254. Naive Side Effect Tester.
  4255. </p>
  4256. </long_desc>
  4257. </boolopt>
  4258. </sub_phase>
  4259. <sub_phase>
  4260. <name>Copy Propagator</name>
  4261. <class>CPOptions</class>
  4262. <alias>jop.cp</alias>
  4263. <short_desc>Copy propagator</short_desc>
  4264. <long_desc>
  4265. <p>
  4266. This phase performs cascaded copy propagation.</p>
  4267. </long_desc>
  4268. <boolopt>
  4269. <name>Enabled</name>
  4270. <alias>enabled</alias>
  4271. <default>true</default>
  4272. <short_desc/>
  4273. <long_desc/>
  4274. </boolopt>
  4275. <boolopt>
  4276. <name>Only Regular Locals</name>
  4277. <alias>only-regular-locals</alias>
  4278. <default>false</default>
  4279. <short_desc/>
  4280. <long_desc>
  4281. Only propagate copies through ``regular&apos;&apos; locals, that is,
  4282. those declared in the source bytecode.
  4283. </long_desc>
  4284. </boolopt>
  4285. <boolopt>
  4286. <name>Only Stack Locals</name>
  4287. <alias>only-stack-locals</alias>
  4288. <default>false</default>
  4289. <short_desc/>
  4290. <long_desc>
  4291. Only propagate copies through locals that represent stack locations in
  4292. the original bytecode.
  4293. </long_desc>
  4294. </boolopt>
  4295. </sub_phase>
  4296. <sub_phase>
  4297. <name>Jimple Constant Propagator and Folder</name>
  4298. <alias>jop.cpf</alias>
  4299. <short_desc>Constant propagator and folder</short_desc>
  4300. <long_desc>
  4301. The Jimple Constant Propagator and Folder evaluates any expressions
  4302. consisting entirely of compile-time constants, for example <tt>2
  4303. * 3</tt>, and replaces the expression with the constant result,
  4304. in this case <tt>6</tt>.
  4305. </long_desc>
  4306. <boolopt>
  4307. <name>Enabled</name>
  4308. <alias>enabled</alias>
  4309. <default>true</default>
  4310. </boolopt>
  4311. </sub_phase>
  4312. <sub_phase>
  4313. <name>Conditional Branch Folder</name>
  4314. <alias>jop.cbf</alias>
  4315. <short_desc>Conditional branch folder</short_desc>
  4316. <long_desc>
  4317. The Conditional Branch Folder statically evaluates the
  4318. conditional expression of Jimple <tt>if</tt> statements. If the
  4319. condition is identically <tt>true</tt> or
  4320. <tt>false</tt>, the Folder replaces the conditional branch
  4321. statement with an unconditional <tt>goto</tt> statement.
  4322. </long_desc>
  4323. <boolopt>
  4324. <name>Enabled</name>
  4325. <alias>enabled</alias>
  4326. <default>true</default>
  4327. <short_desc/>
  4328. <long_desc/>
  4329. </boolopt>
  4330. </sub_phase>
  4331. <sub_phase>
  4332. <name>Dead Assignment Eliminator</name>
  4333. <alias>jop.dae</alias>
  4334. <short_desc>Dead assignment eliminator</short_desc>
  4335. <long_desc>
  4336. The Dead Assignment Eliminator eliminates assignment statements
  4337. to locals whose values are not subsequently used, unless
  4338. evaluating the right-hand side of the assignment may cause
  4339. side-effects.
  4340. </long_desc>
  4341. <boolopt>
  4342. <name>Enabled</name>
  4343. <alias>enabled</alias>
  4344. <default>true</default>
  4345. <short_desc/>
  4346. <long_desc/>
  4347. </boolopt>
  4348. <boolopt>
  4349. <name>Only Tag Dead Code</name>
  4350. <alias>only-tag</alias>
  4351. <default>false</default>
  4352. <short_desc/>
  4353. <long_desc>
  4354. Only tag dead assignment statements instead of eliminaing them.
  4355. </long_desc>
  4356. </boolopt>
  4357. <boolopt>
  4358. <name>Only Stack Locals</name>
  4359. <alias>only-stack-locals</alias>
  4360. <default>false</default>
  4361. <short_desc/>
  4362. <long_desc>
  4363. Only eliminate dead assignments to locals that represent stack
  4364. locations in the original bytecode.
  4365. </long_desc>
  4366. </boolopt>
  4367. </sub_phase>
  4368. <sub_phase>
  4369. <name>Null Check Eliminator</name>
  4370. <alias>jop.nce</alias>
  4371. <short_desc>Null Check Eliminator</short_desc>
  4372. <long_desc>
  4373. Replaces statements 'if(x!=null) goto y' with 'goto y' if x is
  4374. known to be non-null or with 'nop' if it is known to be null,
  4375. etc. Generates dead code and is hence followed by unreachable
  4376. code elimination. Disabled by default because it can be
  4377. expensive on methods with many locals.
  4378. </long_desc>
  4379. <boolopt>
  4380. <name>Enabled</name>
  4381. <alias>enabled</alias>
  4382. <default>false</default>
  4383. <short_desc/>
  4384. <long_desc/>
  4385. </boolopt>
  4386. </sub_phase>
  4387. <sub_phase>
  4388. <name>Unreachable Code Eliminator 1</name>
  4389. <alias>jop.uce1</alias>
  4390. <short_desc>Unreachable code eliminator, pass 1</short_desc>
  4391. <long_desc>
  4392. The Unreachable Code Eliminator removes unreachable code and
  4393. traps whose catch blocks are empty.
  4394. </long_desc>
  4395. <boolopt>
  4396. <name>Enabled</name>
  4397. <alias>enabled</alias>
  4398. <default>true</default>
  4399. <short_desc/>
  4400. <long_desc/>
  4401. </boolopt>
  4402. <boolopt>
  4403. <name>Remove unreachable traps</name>
  4404. <alias>remove-unreachable-traps</alias>
  4405. <default>false</default>
  4406. <long_desc>
  4407. Remove exception table entries when none of the protected instructions can
  4408. throw the exception being caught.
  4409. </long_desc>
  4410. </boolopt>
  4411. </sub_phase>
  4412. <sub_phase>
  4413. <name>Unconditional Branch Folder 1</name>
  4414. <alias>jop.ubf1</alias>
  4415. <short_desc>Unconditional branch folder, pass 1</short_desc>
  4416. <long_desc>
  4417. <p>
  4418. The Unconditional Branch Folder removes unnecessary `<tt>goto</tt>&apos;
  4419. statements from a <tt>JimpleBody</tt>.</p>
  4420. <p>
  4421. If a <tt>goto</tt> statement's target is the next instruction,
  4422. then the statement is removed. If a <tt>goto</tt>'s target is
  4423. another <tt>goto</tt>, with target <tt>y</tt>, then the first
  4424. statement's target is changed to <tt>y</tt>.</p>
  4425. <p>
  4426. If some <tt>if</tt> statement's target is a <tt>goto</tt>
  4427. statement, then the <tt>if</tt>'s target can be replaced with the
  4428. <tt>goto</tt>'s target.</p>
  4429. <p>
  4430. (These situations can result from other optimizations, and branch
  4431. folding may itself generate more unreachable code.)</p>
  4432. </long_desc>
  4433. <boolopt>
  4434. <name>Enabled</name>
  4435. <alias>enabled</alias>
  4436. <default>true</default>
  4437. <short_desc/>
  4438. <long_desc/>
  4439. </boolopt>
  4440. </sub_phase>
  4441. <sub_phase>
  4442. <name>Unreachable Code Eliminator 2</name>
  4443. <alias>jop.uce2</alias>
  4444. <short_desc>Unreachable code eliminator, pass 2</short_desc>
  4445. <long_desc>
  4446. Another iteration of the Unreachable Code Eliminator.
  4447. </long_desc>
  4448. <boolopt>
  4449. <name>Enabled</name>
  4450. <alias>enabled</alias>
  4451. <default>true</default>
  4452. <short_desc/>
  4453. <long_desc/>
  4454. </boolopt>
  4455. <boolopt>
  4456. <name>Remove unreachable traps</name>
  4457. <alias>remove-unreachable-traps</alias>
  4458. <default>false</default>
  4459. <long_desc>
  4460. Remove exception table entries when none of the protected instructions can
  4461. throw the exception being caught.
  4462. </long_desc>
  4463. </boolopt>
  4464. </sub_phase>
  4465. <sub_phase>
  4466. <name>Unconditional Branch Folder 2</name>
  4467. <alias>jop.ubf2</alias>
  4468. <short_desc>Unconditional branch folder, pass 2</short_desc>
  4469. <long_desc>
  4470. Another iteration of the Unconditional Branch Folder.
  4471. </long_desc>
  4472. <boolopt>
  4473. <name>Enabled</name>
  4474. <alias>enabled</alias>
  4475. <default>true</default>
  4476. <short_desc/>
  4477. <long_desc/>
  4478. </boolopt>
  4479. </sub_phase>
  4480. <sub_phase>
  4481. <name>Unused Local Eliminator</name>
  4482. <alias>jop.ule</alias>
  4483. <short_desc>Unused local eliminator</short_desc>
  4484. <long_desc>
  4485. The Unused Local Eliminator phase removes any unused locals from
  4486. the method.
  4487. </long_desc>
  4488. <boolopt>
  4489. <name>Enabled</name>
  4490. <alias>enabled</alias>
  4491. <default>true</default>
  4492. <short_desc/>
  4493. <long_desc/>
  4494. </boolopt>
  4495. </sub_phase>
  4496. </phase>
  4497. <phase>
  4498. <name>Jimple Annotation Pack</name>
  4499. <alias>jap</alias>
  4500. <short_desc>Jimple annotation pack: adds intraprocedural tags</short_desc>
  4501. <long_desc>
  4502. The Jimple Annotation Pack contains phases which add annotations
  4503. to Jimple bodies individually (as opposed to the Whole-Jimple
  4504. Annotation Pack, which adds annotations based on the analysis of
  4505. the whole program).
  4506. </long_desc>
  4507. <boolopt>
  4508. <name>Enabled</name>
  4509. <alias>enabled</alias>
  4510. <default>true</default>
  4511. </boolopt>
  4512. <sub_phase>
  4513. <name>Null Pointer Checker</name>
  4514. <class>NPCOptions</class>
  4515. <alias>jap.npc</alias>
  4516. <short_desc>Null pointer checker</short_desc>
  4517. <long_desc>
  4518. The Null Pointer Checker finds instruction which have the potential
  4519. to throw <tt>NullPointerException</tt>s and adds annotations
  4520. indicating whether or not the pointer being dereferenced can be
  4521. determined statically not to be null.
  4522. </long_desc>
  4523. <boolopt>
  4524. <name>Enabled</name>
  4525. <alias>enabled</alias>
  4526. <default>false</default>
  4527. <short_desc/>
  4528. <long_desc/>
  4529. </boolopt>
  4530. <boolopt>
  4531. <name>Only Array Ref</name>
  4532. <alias>only-array-ref</alias>
  4533. <default>false</default>
  4534. <short_desc>Annotate only array references</short_desc>
  4535. <long_desc>
  4536. Annotate only array-referencing instructions, instead of all
  4537. instructions that need null pointer checks.
  4538. </long_desc>
  4539. </boolopt>
  4540. <boolopt>
  4541. <name>Profiling</name>
  4542. <alias>profiling</alias>
  4543. <default>false</default>
  4544. <short_desc>Insert instructions to count safe pointer accesses</short_desc>
  4545. <long_desc>
  4546. <p>
  4547. Insert profiling instructions that at runtime count the number of
  4548. eliminated safe null pointer checks. The inserted profiling code
  4549. assumes the existence of a <tt>MultiCounter</tt> class
  4550. implementing the methods invoked. For details, see the
  4551. <tt>NullPointerChecker</tt> source code.</p>
  4552. </long_desc>
  4553. </boolopt>
  4554. </sub_phase>
  4555. <sub_phase>
  4556. <name>Null Pointer Colourer</name>
  4557. <alias>jap.npcolorer</alias>
  4558. <default>true</default>
  4559. <short_desc>Null pointer colourer: tags references for eclipse</short_desc>
  4560. <long_desc>
  4561. Produce colour tags that the Soot plug-in for Eclipse can use to
  4562. highlight null and non-null references.
  4563. </long_desc>
  4564. <boolopt>
  4565. <name>Enabled</name>
  4566. <alias>enabled</alias>
  4567. <default>false</default>
  4568. <long_desc></long_desc>
  4569. </boolopt>
  4570. </sub_phase>
  4571. <sub_phase>
  4572. <name>Array Bound Checker</name>
  4573. <class>ABCOptions</class>
  4574. <alias>jap.abc</alias>
  4575. <short_desc>Array bound checker</short_desc>
  4576. <long_desc>
  4577. <p>
  4578. The Array Bound Checker performs a static analysis to determine
  4579. which array bounds checks may safely be eliminated and then annotates
  4580. statements with the results of the analysis.</p>
  4581. <p>
  4582. If Soot is in whole-program mode, the Array Bound Checker can
  4583. use the results provided by the Rectangular Array Finder.</p>
  4584. </long_desc>
  4585. <boolopt>
  4586. <name>Enabled</name>
  4587. <alias>enabled</alias>
  4588. <default>false</default>
  4589. <short_desc/>
  4590. <long_desc/>
  4591. </boolopt>
  4592. <boolopt>
  4593. <name>With All</name>
  4594. <alias>with-all</alias>
  4595. <default>false</default>
  4596. <short_desc/>
  4597. <long_desc>
  4598. <p>
  4599. Setting the With All option to true is equivalent to setting each
  4600. of With CSE, With Array Ref, With Field Ref,
  4601. With Class Field, and With Rectangular Array to true.</p>
  4602. </long_desc>
  4603. </boolopt>
  4604. <boolopt>
  4605. <name>With Common Sub-expressions</name>
  4606. <alias>with-cse</alias>
  4607. <default>false</default>
  4608. <short_desc/>
  4609. <long_desc>
  4610. <p>
  4611. The analysis will consider common subexpressions. For example,
  4612. consider the situation where <tt>r1</tt> is assigned
  4613. <tt>a*b</tt>; later, <tt>r2</tt> is assigned <tt>a*b</tt>, where
  4614. neither <tt>a</tt> nor <tt>b</tt> have changed between the two
  4615. statements. The analysis can conclude that <tt>r2</tt> has the
  4616. same value as <tt>r1</tt>. Experiments show that this option can
  4617. improve the result slightly.</p>
  4618. </long_desc>
  4619. </boolopt>
  4620. <boolopt>
  4621. <name>With Array References</name>
  4622. <alias>with-arrayref</alias>
  4623. <default>false</default>
  4624. <short_desc/>
  4625. <long_desc>
  4626. <p>
  4627. With this option enabled, array references can be considered as
  4628. common subexpressions; however, we are more conservative when
  4629. writing into an array, because array objects may be aliased. We
  4630. also assume that the application is single-threaded or that the
  4631. array references occur in a synchronized block. That is, we
  4632. assume that an array element may not be changed by other threads
  4633. between two array references.</p>
  4634. </long_desc>
  4635. </boolopt>
  4636. <boolopt>
  4637. <name>With Field References</name>
  4638. <alias>with-fieldref</alias>
  4639. <default>false</default>
  4640. <short_desc/>
  4641. <long_desc>
  4642. <p>
  4643. The analysis treats field references (static and instance) as
  4644. common subexpressions; however, we are more conservative when
  4645. writing to a field, because the base of the field reference may
  4646. be aliased. We also assume that the application is
  4647. single-threaded or that the field references occur in a
  4648. synchronized block. That is, we assume that a field may
  4649. not be changed by other threads between two field references.</p>
  4650. </long_desc>
  4651. </boolopt>
  4652. <boolopt>
  4653. <name>With Class Field</name>
  4654. <alias>with-classfield</alias>
  4655. <default>false</default>
  4656. <short_desc/>
  4657. <long_desc>
  4658. <p>
  4659. This option makes the analysis work on the class level. The
  4660. algorithm analyzes <tt>final</tt> or <tt>private</tt> class
  4661. fields first. It can recognize the fields that hold array objects
  4662. of constant length. In an application using lots of array
  4663. fields, this option can improve the analysis results
  4664. dramatically.</p>
  4665. </long_desc>
  4666. </boolopt>
  4667. <boolopt>
  4668. <name>With Rectangular Array</name>
  4669. <alias>with-rectarray</alias>
  4670. <default>false</default>
  4671. <short_desc/>
  4672. <long_desc>
  4673. This option is used together with <tt>wjap.ra</tt> to make Soot run the whole-program
  4674. analysis for rectangular array objects. This analysis is based on the
  4675. call graph, and it usually takes a long time. If the application uses
  4676. rectangular arrays, these options can improve the analysis
  4677. result.
  4678. </long_desc>
  4679. </boolopt>
  4680. <boolopt>
  4681. <name>Profiling</name>
  4682. <alias>profiling</alias>
  4683. <default>false</default>
  4684. <short_desc>Profile the results of array bounds check analysis.</short_desc>
  4685. <long_desc>
  4686. <p>
  4687. Profile the results of array bounds check analysis. The inserted
  4688. profiling code assumes the existence of a <tt>MultiCounter</tt>
  4689. class implementing the methods invoked. For details, see the
  4690. <tt>ArrayBoundsChecker</tt> source code.</p>
  4691. </long_desc>
  4692. </boolopt>
  4693. <boolopt>
  4694. <name>Add Color Tags</name>
  4695. <alias>add-color-tags</alias>
  4696. <default>false</default>
  4697. <short_desc>Add color tags to results of array bound check analysis.</short_desc>
  4698. <long_desc>Add color tags to the results of the array bounds check analysis.</long_desc>
  4699. </boolopt>
  4700. </sub_phase>
  4701. <sub_phase>
  4702. <name>Profiling Generator</name>
  4703. <alias>jap.profiling</alias>
  4704. <class>ProfilingOptions</class>
  4705. <short_desc>Instruments null pointer and array checks</short_desc>
  4706. <long_desc>
  4707. <p>
  4708. The Profiling Generator inserts the method invocations required
  4709. to initialize and to report the results of any profiling
  4710. performed by the Null Pointer Checker and Array Bound
  4711. Checker. Users of the Profiling Generator must provide a
  4712. <tt>MultiCounter</tt> class implementing the methods invoked. For
  4713. details, see the <tt>ProfilingGenerator</tt> source code.
  4714. </p>
  4715. </long_desc>
  4716. <boolopt>
  4717. <name>Enabled</name>
  4718. <alias>enabled</alias>
  4719. <default>false</default>
  4720. <short_desc/>
  4721. <long_desc/>
  4722. </boolopt>
  4723. <boolopt>
  4724. <name>Not Main Entry</name>
  4725. <alias>notmainentry</alias>
  4726. <default>false</default>
  4727. <short_desc>Instrument <tt>runBenchmark()</tt> instead of <tt>main()</tt></short_desc>
  4728. <long_desc>
  4729. <p>
  4730. Insert the calls to the <tt>MultiCounter</tt> at the
  4731. beginning and end of methods with the signature
  4732. <tt>long runBenchmark(java.lang.String[])</tt>
  4733. instead of the signature
  4734. <tt>void main(java.lang.String[])</tt>.</p>
  4735. </long_desc>
  4736. </boolopt>
  4737. </sub_phase>
  4738. <sub_phase>
  4739. <name>Side Effect tagger</name>
  4740. <alias>jap.sea</alias>
  4741. <class>SETOptions</class>
  4742. <short_desc>Side effect tagger</short_desc>
  4743. <long_desc>
  4744. <p>
  4745. The Side Effect Tagger
  4746. uses the active invoke graph to produce side-effect attributes, as
  4747. described in the <a
  4748. href="http://www.sable.mcgill.ca/publications/thesis/#olhotakMastersThesis">Spark
  4749. thesis</a>, chapter 6.</p>
  4750. </long_desc>
  4751. <boolopt>
  4752. <name>Enabled</name>
  4753. <alias>enabled</alias>
  4754. <default>false</default>
  4755. <short_desc/>
  4756. <long_desc/>
  4757. </boolopt>
  4758. <boolopt>
  4759. <name>Build naive dependence graph</name>
  4760. <alias>naive</alias>
  4761. <default>false</default>
  4762. <short_desc/>
  4763. <long_desc>
  4764. <p>
  4765. When set to true, the dependence graph is built with a node for
  4766. each statement, without merging the nodes for equivalent
  4767. statements. This makes it possible to measure the effect of
  4768. merging nodes for equivalent statements on the size of the
  4769. dependence graph.</p>
  4770. </long_desc>
  4771. </boolopt>
  4772. </sub_phase>
  4773. <sub_phase>
  4774. <name>Field Read/Write Tagger</name>
  4775. <class>FRWOptions</class>
  4776. <alias>jap.fieldrw</alias>
  4777. <short_desc>Field read/write tagger</short_desc>
  4778. <long_desc>
  4779. <p>
  4780. The Field Read/Write Tagger uses the active invoke graph to
  4781. produce tags indicating which fields may be read or written by
  4782. each statement, including invoke statements.</p>
  4783. </long_desc>
  4784. <boolopt>
  4785. <name>Enabled</name>
  4786. <alias>enabled</alias>
  4787. <default>false</default>
  4788. <short_desc/>
  4789. <long_desc/>
  4790. </boolopt>
  4791. <intopt>
  4792. <name>Maximum number of fields</name>
  4793. <alias>threshold</alias>
  4794. <default>100</default>
  4795. <short_desc/>
  4796. <long_desc>
  4797. If a statement reads/writes more than this number of fields, no tag will be
  4798. produced for it, in order to keep the size of the tags reasonable.
  4799. </long_desc>
  4800. </intopt>
  4801. </sub_phase>
  4802. <sub_phase>
  4803. <name>Call Graph Tagger</name>
  4804. <alias>jap.cgtagger</alias>
  4805. <short_desc>Call graph tagger</short_desc>
  4806. <long_desc>
  4807. The Call Graph Tagger produces LinkTags based on the call
  4808. graph. The Eclipse plugin uses these tags to produce
  4809. linked popup lists which indicate the source and target methods
  4810. of the statement. Selecting a link from the list moves the
  4811. cursor to the indicated method.
  4812. </long_desc>
  4813. <boolopt>
  4814. <name>Enabled</name>
  4815. <alias>enabled</alias>
  4816. <default>false</default>
  4817. </boolopt>
  4818. </sub_phase>
  4819. <sub_phase>
  4820. <name>Parity Tagger</name>
  4821. <alias>jap.parity</alias>
  4822. <short_desc>Parity tagger</short_desc>
  4823. <long_desc>
  4824. The Parity Tagger produces StringTags and ColorTags indicating
  4825. the parity of a variable (even, odd, top, or bottom). The eclipse
  4826. plugin can use tooltips and variable colouring to display the
  4827. information in these tags. For example, even variables (such as
  4828. <tt>x</tt> in <tt>x = 2</tt>) are coloured yellow.
  4829. </long_desc>
  4830. <boolopt>
  4831. <name>Enabled</name>
  4832. <alias>enabled</alias>
  4833. <default>false</default>
  4834. </boolopt>
  4835. </sub_phase>
  4836. <sub_phase>
  4837. <name>Parameter Alias Tagger</name>
  4838. <alias>jap.pat</alias>
  4839. <short_desc>Colour-codes method parameters that may be aliased</short_desc>
  4840. <long_desc>For each method with parameters of reference type, this tagger indicates the aliasing relationships between the parameters using colour tags. Parameters that may be aliased are the same colour. Parameters that may not be aliased are in different colours.</long_desc>
  4841. <boolopt>
  4842. <name>Enabled</name>
  4843. <alias>enabled</alias>
  4844. <default>false</default>
  4845. </boolopt>
  4846. </sub_phase>
  4847. <sub_phase>
  4848. <name>Live Variables Tagger</name>
  4849. <alias>jap.lvtagger</alias>
  4850. <short_desc>Creates color tags for live variables</short_desc>
  4851. <long_desc>Colors live variables.</long_desc>
  4852. <boolopt>
  4853. <name>Enabled</name>
  4854. <alias>enabled</alias>
  4855. <default>false</default>
  4856. </boolopt>
  4857. </sub_phase>
  4858. <sub_phase>
  4859. <name>Reaching Defs Tagger</name>
  4860. <alias>jap.rdtagger</alias>
  4861. <short_desc>Creates link tags for reaching defs</short_desc>
  4862. <long_desc>For each use of a local in a stmt creates a link to the reaching def.</long_desc>
  4863. <boolopt>
  4864. <name>Enabled</name>
  4865. <alias>enabled</alias>
  4866. <default>false</default>
  4867. </boolopt>
  4868. </sub_phase>
  4869. <sub_phase>
  4870. <name>Cast Elimination Check Tagger</name>
  4871. <alias>jap.che</alias>
  4872. <short_desc>Indicates whether cast checks can be eliminated</short_desc>
  4873. <long_desc>Indicates whether cast checks can be eliminated.</long_desc>
  4874. <boolopt>
  4875. <name>Enabled</name>
  4876. <alias>enabled</alias>
  4877. <default>false</default>
  4878. </boolopt>
  4879. </sub_phase>
  4880. <sub_phase>
  4881. <name>Unreachable Method Transformer</name>
  4882. <alias>jap.umt</alias>
  4883. <short_desc>Inserts assertions into unreachable methods</short_desc>
  4884. <long_desc>When the whole-program analysis determines a method to be unreachable, this transformer inserts an assertion into the method to check that it is indeed unreachable.</long_desc>
  4885. <boolopt>
  4886. <name>Enabled</name>
  4887. <alias>enabled</alias>
  4888. <default>false</default>
  4889. </boolopt>
  4890. </sub_phase>
  4891. <sub_phase>
  4892. <name>Loop Invariant Tagger</name>
  4893. <alias>jap.lit</alias>
  4894. <short_desc>Tags loop invariants</short_desc>
  4895. <long_desc>An expression whose operands are constant or have reaching definitions from outside the loop body are tagged as loop invariant.</long_desc>
  4896. <boolopt>
  4897. <name>Enabled</name>
  4898. <alias>enabled</alias>
  4899. <default>false</default>
  4900. </boolopt>
  4901. </sub_phase>
  4902. <sub_phase>
  4903. <name>Available Expressions Tagger</name>
  4904. <class>AETOptions</class>
  4905. <alias>jap.aet</alias>
  4906. <short_desc>Tags statements with sets of available expressions</short_desc>
  4907. <long_desc>A each statement a set of available expressions is after the statement is added as a tag.</long_desc>
  4908. <boolopt>
  4909. <name>Enabled</name>
  4910. <alias>enabled</alias>
  4911. <default>false</default>
  4912. </boolopt>
  4913. <multiopt>
  4914. <name>Kind</name>
  4915. <alias>kind</alias>
  4916. <value>
  4917. <name>Optimistic</name>
  4918. <alias>optimistic</alias>
  4919. <default/>
  4920. </value>
  4921. <value>
  4922. <name>Pessimistic</name>
  4923. <alias>pessimistic</alias>
  4924. </value>
  4925. </multiopt>
  4926. </sub_phase>
  4927. <sub_phase>
  4928. <name>Dominators Tagger</name>
  4929. <alias>jap.dmt</alias>
  4930. <short_desc>Tags dominators of statement</short_desc>
  4931. <long_desc>Provides link tags at a statement to all of the satements dominators.</long_desc>
  4932. <boolopt>
  4933. <name>Enabled</name>
  4934. <alias>enabled</alias>
  4935. <default>false</default>
  4936. </boolopt>
  4937. </sub_phase>
  4938. </phase>
  4939. <!--<phase>
  4940. <name>CFG Viewer</name>
  4941. <alias>cfg</alias>
  4942. <short_desc>Produces CFGs for viewing purposes</short_desc>
  4943. <long_desc>Produces CFGs in the form of dot files when run from the command line runs or graphs when run from within Eclipse.</long_desc>
  4944. <boolopt>
  4945. <name>Enabled</name>
  4946. <alias>enabled</alias>
  4947. <default>false</default>
  4948. <short_desc/>
  4949. <long_desc/>
  4950. </boolopt>
  4951. <sub_phase>
  4952. <name>CFG Output Options</name>
  4953. <class>CFGOutputOptions</class>
  4954. <alias>cfg.output</alias>
  4955. <short_desc>Determines the type of graphs to output</short_desc>
  4956. <long_desc>Determines the type of graphs to output</long_desc>
  4957. <boolopt>
  4958. <name>Enabled</name>
  4959. <alias>enabled</alias>
  4960. <default>false</default>
  4961. <short_desc/>
  4962. <long_desc/>
  4963. </boolopt>
  4964. <multiopt>
  4965. <name>Graph Type</name>
  4966. <alias>graph-type</alias>
  4967. <short_desc>Determines which type of graph to output</short_desc>
  4968. <long_desc>Determines which type of graph to output based on whether nodes are units or blocks and whether control flow associated with Exceptions is taken into consideration or not.</long_desc>
  4969. <value>
  4970. <name>Complete Unit Graph</name>
  4971. <alias>complete-unit-graph</alias>
  4972. <short_desc>Output a complete Unit Graph</short_desc>
  4973. <long_desc>Output a complete Unit Graph, where nodes are units and control flow associated with Exceptions is taken into account.</long_desc>
  4974. <default/>
  4975. </value>
  4976. <value>
  4977. <name>Unit Graph</name>
  4978. <alias>unit-graph</alias>
  4979. <short_desc>Output a Unit Graph</short_desc>
  4980. <long_desc>Output a Unit Graph, where nodes are units and control flow associated with Exceptions is not taken into account.</long_desc>
  4981. </value>
  4982. <value>
  4983. <name>Complete Block Graph</name>
  4984. <alias>complete-block-graph</alias>
  4985. <short_desc>Output a complete Block Graph</short_desc>
  4986. <long_desc>Output a complete Block Graph, where nodes are blocks and control flow associated with Exceptions is taken into account.</long_desc>
  4987. </value>
  4988. <value>
  4989. <name>Brief Block Graph</name>
  4990. <alias>brief-block-graph</alias>
  4991. <short_desc>Output a brief Block Graph</short_desc>
  4992. <long_desc>Output a brief Block Graph, where nodes are blocks and control flow associated with Exceptions is ignored.</long_desc>
  4993. </value>
  4994. <value>
  4995. <name>Array Block Graph</name>
  4996. <alias>array-block-graph</alias>
  4997. <short_desc>Output an array Block Graph</short_desc>
  4998. <long_desc>Output an array Block Graph</long_desc>
  4999. </value>
  5000. </multiopt>
  5001. <multiopt>
  5002. <name>Output Type</name>
  5003. <alias>output-type</alias>
  5004. <short_desc>Determines which type of files to generate</short_desc>
  5005. <long_desc>Determines which type of files to generate</long_desc>
  5006. <value>
  5007. <name>Dot Files</name>
  5008. <alias>dot-files</alias>
  5009. <short_desc>Generate graphs as dot files</short_desc>
  5010. <long_desc>Generate graphs as dot files that can be then be converted to post-script for viewing.</long_desc>
  5011. </value>
  5012. <value>
  5013. <name>Eclipse Graphs</name>
  5014. <alias>eclipse-graphs</alias>
  5015. <short_desc>Generate graphs that can be manipulated within Eclipse</short_desc>
  5016. <long_desc>Generate graphs that can be manipulated within Eclipse.</long_desc>
  5017. </value>
  5018. </multiopt>
  5019. </sub_phase>
  5020. </phase>-->
  5021. <phase>
  5022. <name>Grimp Body Creation</name>
  5023. <alias>gb</alias>
  5024. <short_desc>Creates a GrimpBody for each method</short_desc>
  5025. <long_desc>
  5026. The Grimp Body Creation phase creates a <tt>GrimpBody</tt> for
  5027. each source method. It is run only if the output format is
  5028. <tt>grimp</tt> or <tt>grimple</tt>, or if class files are being
  5029. output and the Via Grimp option has been specified.
  5030. </long_desc>
  5031. <boolopt>
  5032. <name>Enabled</name>
  5033. <alias>enabled</alias>
  5034. <default>true</default>
  5035. <short_desc/>
  5036. <long_desc/>
  5037. </boolopt>
  5038. <sub_phase>
  5039. <name>Grimp Pre-folding Aggregator</name>
  5040. <alias>gb.a1</alias>
  5041. <short_desc>Aggregator: removes some copies, pre-folding</short_desc>
  5042. <long_desc>
  5043. The Grimp Pre-folding Aggregator combines some local variables,
  5044. finding definitions with only a single use and removing the
  5045. definition after replacing the use with the definition's
  5046. right-hand side, if it is safe to do so. While the mechanism is
  5047. the same as that employed by the Jimple Local Aggregator, there
  5048. is more scope for aggregation because of Grimp's more complicated
  5049. expressions.
  5050. </long_desc>
  5051. <boolopt>
  5052. <name>Enabled</name>
  5053. <alias>enabled</alias>
  5054. <default>true</default>
  5055. <short_desc/>
  5056. <long_desc/>
  5057. </boolopt>
  5058. <boolopt>
  5059. <name>Only Stack Locals</name>
  5060. <alias>only-stack-locals</alias>
  5061. <default>true</default>
  5062. <short_desc/>
  5063. <long_desc>
  5064. Aggregate only values stored in stack locals.
  5065. </long_desc>
  5066. </boolopt>
  5067. </sub_phase>
  5068. <sub_phase>
  5069. <name>Grimp Constructor Folder</name>
  5070. <alias>gb.cf</alias>
  5071. <short_desc>Constructor folder</short_desc>
  5072. <long_desc>
  5073. The Grimp Constructor Folder combines <tt>new</tt> statements
  5074. with the <tt>specialinvoke</tt> statement that calls the new
  5075. object's constructor. For example, it turns
  5076. <pre>
  5077. r2 = new java.util.ArrayList;
  5078. r2.<lt/>init<gt/>();
  5079. </pre>
  5080. into
  5081. <pre>
  5082. r2 = new java.util.ArrayList();
  5083. </pre>
  5084. </long_desc>
  5085. <boolopt>
  5086. <name>Enabled</name>
  5087. <alias>enabled</alias>
  5088. <default>true</default>
  5089. </boolopt>
  5090. </sub_phase>
  5091. <sub_phase>
  5092. <name>Grimp Post-folding Aggregator</name>
  5093. <alias>gb.a2</alias>
  5094. <short_desc>Aggregator: removes some copies, post-folding</short_desc>
  5095. <long_desc>
  5096. The Grimp Post-folding Aggregator combines local variables after
  5097. constructors have been folded. Constructor folding typically
  5098. introduces new opportunities for aggregation, since when a
  5099. sequence of instructions like
  5100. <pre>
  5101. r2 = new java.util.ArrayList;
  5102. r2.<lt/>init<gt/>();
  5103. r3 = r2
  5104. </pre>is replaced by
  5105. <pre>
  5106. r2 = new java.util.ArrayList();
  5107. r3 = r2
  5108. </pre>the invocation of <tt><lt/>init<gt/></tt> no longer represents a potential side-effect
  5109. separating the two definitions, so they can be combined into
  5110. <pre>
  5111. r3 = new java.util.ArrayList();
  5112. </pre>(assuming there are no subsequent uses of <tt>r2</tt>).
  5113. </long_desc>
  5114. <boolopt>
  5115. <name>Enabled</name>
  5116. <alias>enabled</alias>
  5117. <default>true</default>
  5118. <short_desc/>
  5119. <long_desc/>
  5120. </boolopt>
  5121. <boolopt>
  5122. <name>Only Stack Locals</name>
  5123. <alias>only-stack-locals</alias>
  5124. <default>true</default>
  5125. <short_desc/>
  5126. <long_desc>
  5127. Aggregate only values stored in stack locals.
  5128. </long_desc>
  5129. </boolopt>
  5130. </sub_phase>
  5131. <sub_phase>
  5132. <name>Grimp Unused Local Eliminator</name>
  5133. <alias>gb.ule</alias>
  5134. <short_desc>Unused local eliminator</short_desc>
  5135. <long_desc>
  5136. This phase removes any locals that are unused after constructor
  5137. folding and aggregation.
  5138. </long_desc>
  5139. <boolopt>
  5140. <name>Enabled</name>
  5141. <alias>enabled</alias>
  5142. <default>true</default>
  5143. </boolopt>
  5144. </sub_phase>
  5145. </phase>
  5146. <phase>
  5147. <name>Grimp Optimization</name>
  5148. <alias>gop</alias>
  5149. <short_desc>Grimp optimization pack</short_desc>
  5150. <long_desc>
  5151. The Grimp Optimization pack performs optimizations on
  5152. <tt>GrimpBody</tt>s (currently there are no optimizations
  5153. performed specifically on <tt>GrimpBody</tt>s, and the pack is
  5154. empty). It is run only if the output format is <tt>grimp</tt> or
  5155. <tt>grimple</tt>, or if class files are being output and the Via
  5156. Grimp option has been specified.
  5157. </long_desc>
  5158. <boolopt>
  5159. <name>Enabled</name>
  5160. <alias>enabled</alias>
  5161. <default>false</default>
  5162. </boolopt>
  5163. </phase>
  5164. <phase>
  5165. <name>Baf Body Creation</name>
  5166. <alias>bb</alias>
  5167. <short_desc>Creates Baf bodies</short_desc>
  5168. <long_desc>
  5169. The Baf Body Creation phase creates a
  5170. <tt>BafBody</tt> from each source method. It is
  5171. run if the output format is <tt>baf</tt> or <tt>b</tt>, or
  5172. if class files are being output and the Via Grimp option
  5173. has not been specified.
  5174. </long_desc>
  5175. <boolopt>
  5176. <name>Enabled</name>
  5177. <alias>enabled</alias>
  5178. <default>true</default>
  5179. </boolopt>
  5180. <sub_phase>
  5181. <name>Load Store Optimizer</name>
  5182. <alias>bb.lso</alias>
  5183. <short_desc>Load store optimizer</short_desc>
  5184. <long_desc>
  5185. The Load Store Optimizer replaces some combinations of loads to and stores from local variables with stack instructions. A simple example would be the replacement of
  5186. <pre>
  5187. store.r $r2;
  5188. load.r $r2;
  5189. </pre>
  5190. with
  5191. <pre>
  5192. dup1.r
  5193. </pre>
  5194. in cases where the value of <tt><dollar/>r2</tt> is not used subsequently.
  5195. </long_desc>
  5196. <boolopt>
  5197. <name>Enabled</name>
  5198. <alias>enabled</alias>
  5199. <default>true</default>
  5200. </boolopt>
  5201. <boolopt>
  5202. <name>Debug</name>
  5203. <alias>debug</alias>
  5204. <default>false</default>
  5205. <long_desc>
  5206. Produces voluminous debugging output describing the progress of
  5207. the load store optimizer.
  5208. </long_desc>
  5209. </boolopt>
  5210. <boolopt>
  5211. <name>Inter</name>
  5212. <alias>inter</alias>
  5213. <default>false</default>
  5214. <long_desc>
  5215. Enables two simple inter-block optimizations which attempt to
  5216. keep some variables on the stack between blocks. Both are
  5217. intended to catch <tt>if</tt>-like constructions where control
  5218. flow branches temporarily into two paths that converge at a later
  5219. point.
  5220. </long_desc>
  5221. </boolopt>
  5222. <boolopt>
  5223. <name>sl</name>
  5224. <alias>sl</alias>
  5225. <default>true</default>
  5226. <long_desc>
  5227. Enables an optimization which attempts to eliminate
  5228. <tt>store</tt>/<tt>load</tt> pairs.
  5229. </long_desc>
  5230. </boolopt>
  5231. <boolopt>
  5232. <name>sl2</name>
  5233. <alias>sl2</alias>
  5234. <default>false</default>
  5235. <long_desc>
  5236. Enables an a second pass of the optimization which attempts to
  5237. eliminate <tt>store</tt>/<tt>load</tt> pairs.
  5238. </long_desc>
  5239. </boolopt>
  5240. <boolopt>
  5241. <name>sll</name>
  5242. <alias>sll</alias>
  5243. <default>true</default>
  5244. <long_desc>
  5245. Enables an optimization which attempts to eliminate
  5246. <tt>store</tt>/<tt>load</tt>/<tt>load</tt>
  5247. trios with some variant of <tt>dup</tt>.
  5248. </long_desc>
  5249. </boolopt>
  5250. <boolopt>
  5251. <name>sll2</name>
  5252. <alias>sll2</alias>
  5253. <default>false</default>
  5254. <long_desc>
  5255. Enables an a second pass of the optimization which attempts to
  5256. eliminate <tt>store</tt>/<tt>load</tt>/<tt>load</tt> trios with
  5257. some variant of <tt>dup</tt>.
  5258. </long_desc>
  5259. </boolopt>
  5260. </sub_phase>
  5261. <sub_phase>
  5262. <name>Peephole Optimizer</name>
  5263. <alias>bb.pho</alias>
  5264. <short_desc>Peephole optimizer</short_desc>
  5265. <long_desc>
  5266. Applies peephole optimizations to the Baf intermediate
  5267. representation. Individual optimizations must be implemented by
  5268. classes implementing the <tt>Peephole</tt> interface. The
  5269. Peephole Optimizer reads the names of the <tt>Peephole</tt>
  5270. classes at runtime from the file <tt>peephole.dat</tt> and loads
  5271. them dynamically. Then it continues to apply the
  5272. <tt>Peephole</tt>s repeatedly until none of them are able to
  5273. perform any further optimizations.
  5274. <p>
  5275. Soot provides only one <tt>Peephole</tt>, named
  5276. <tt>ExamplePeephole</tt>, which is not enabled by the delivered
  5277. <tt>peephole.dat</tt> file.
  5278. <tt>ExamplePeephole</tt> removes all <tt>checkcast</tt>
  5279. instructions.</p>
  5280. </long_desc>
  5281. <boolopt>
  5282. <name>Enabled</name>
  5283. <alias>enabled</alias>
  5284. <default>true</default>
  5285. </boolopt>
  5286. </sub_phase>
  5287. <sub_phase>
  5288. <name>Unused Local Eliminator</name>
  5289. <alias>bb.ule</alias>
  5290. <short_desc>Unused local eliminator</short_desc>
  5291. <long_desc>
  5292. This phase removes any locals that are unused after load store optimization
  5293. and peephole optimization.
  5294. </long_desc>
  5295. <boolopt>
  5296. <name>Enabled</name>
  5297. <alias>enabled</alias>
  5298. <default>true</default>
  5299. </boolopt>
  5300. </sub_phase>
  5301. <sub_phase>
  5302. <name>Local Packer</name>
  5303. <alias>bb.lp</alias>
  5304. <short_desc>Local packer: minimizes number of locals</short_desc>
  5305. <long_desc>
  5306. The Local Packer attempts to minimize the number of local
  5307. variables required in a method by reusing the same variable for
  5308. disjoint DU-UD webs. Conceptually, it is the inverse of the
  5309. Local Splitter.
  5310. </long_desc>
  5311. <boolopt>
  5312. <name>Enabled</name>
  5313. <alias>enabled</alias>
  5314. <default>true</default>
  5315. </boolopt>
  5316. <boolopt>
  5317. <name>Unsplit Original Locals</name>
  5318. <alias>unsplit-original-locals</alias>
  5319. <default>false</default>
  5320. <long_desc>
  5321. Use the variable names in the original source as a guide when
  5322. determining how to share local variables across non-interfering
  5323. variable usages. This recombines named locals which were split by
  5324. the Local Splitter.
  5325. </long_desc>
  5326. </boolopt>
  5327. </sub_phase>
  5328. </phase>
  5329. <phase>
  5330. <name>Baf Optimization</name>
  5331. <alias>bop</alias>
  5332. <short_desc>Baf optimization pack</short_desc>
  5333. <long_desc>
  5334. The Baf Optimization pack performs optimizations on
  5335. <tt>BafBody</tt>s (currently there are no optimizations performed
  5336. specifically on <tt>BafBody</tt>s, and the pack is empty). It is
  5337. run only if the output format is <tt>baf</tt> or <tt>b</tt>, or
  5338. if class files are being output and the Via Grimp option
  5339. has not been specified.
  5340. </long_desc>
  5341. <boolopt>
  5342. <name>Enabled</name>
  5343. <alias>enabled</alias>
  5344. <default>false</default>
  5345. </boolopt>
  5346. </phase>
  5347. <phase>
  5348. <name>Tag Aggregator</name>
  5349. <alias>tag</alias>
  5350. <short_desc>Tag aggregator: turns tags into attributes</short_desc>
  5351. <long_desc>
  5352. <p>
  5353. The Tag Aggregator pack aggregates tags attached to individual units
  5354. into a code attribute for each method, so that these attributes can be
  5355. encoded in Java class files.</p>
  5356. </long_desc>
  5357. <boolopt>
  5358. <name>Enabled</name>
  5359. <alias>enabled</alias>
  5360. <default>true</default>
  5361. </boolopt>
  5362. <sub_phase>
  5363. <name>Line Number Tag Aggregator</name>
  5364. <alias>tag.ln</alias>
  5365. <short_desc>Line number aggregator</short_desc>
  5366. <long_desc>
  5367. <p>
  5368. The Line Number Tag Aggregator aggregates line number
  5369. tags.</p>
  5370. </long_desc>
  5371. <boolopt>
  5372. <name>Enabled</name>
  5373. <alias>enabled</alias>
  5374. <default>true</default>
  5375. <short_desc/>
  5376. <long_desc/>
  5377. </boolopt>
  5378. </sub_phase>
  5379. <sub_phase>
  5380. <name>Array Bounds and Null Pointer Check Tag Aggregator</name>
  5381. <alias>tag.an</alias>
  5382. <short_desc>Array bounds and null pointer check aggregator</short_desc>
  5383. <long_desc>
  5384. <p>
  5385. The Array Bounds and Null Pointer Tag Aggregator aggregates
  5386. tags produced by the Array Bound Checker and Null Pointer Checker.</p>
  5387. </long_desc>
  5388. <boolopt>
  5389. <name>Enabled</name>
  5390. <alias>enabled</alias>
  5391. <default>false</default>
  5392. <short_desc/>
  5393. <long_desc/>
  5394. </boolopt>
  5395. </sub_phase>
  5396. <sub_phase>
  5397. <name>Dependence Tag Aggregator</name>
  5398. <alias>tag.dep</alias>
  5399. <short_desc>Dependence aggregator</short_desc>
  5400. <long_desc>
  5401. <p>
  5402. The Dependence Tag Aggregator aggregates
  5403. tags produced by the Side Effect Tagger.</p>
  5404. </long_desc>
  5405. <boolopt>
  5406. <name>Enabled</name>
  5407. <alias>enabled</alias>
  5408. <default>false</default>
  5409. <short_desc/>
  5410. <long_desc/>
  5411. </boolopt>
  5412. </sub_phase>
  5413. <sub_phase>
  5414. <name>Field Read/Write Tag Aggregator</name>
  5415. <alias>tag.fieldrw</alias>
  5416. <short_desc>Field read/write aggregator</short_desc>
  5417. <long_desc>
  5418. The Field Read/Write Tag Aggregator aggregates field read/write
  5419. tags produced by the Field Read/Write Tagger, phase
  5420. <tt>jap.fieldrw</tt>.
  5421. </long_desc>
  5422. <boolopt>
  5423. <name>Enabled</name>
  5424. <alias>enabled</alias>
  5425. <default>false</default>
  5426. <short_desc/>
  5427. <long_desc/>
  5428. </boolopt>
  5429. </sub_phase>
  5430. </phase>
  5431. <phase>
  5432. <name>Dava Body Creation</name>
  5433. <alias>db</alias>
  5434. <short_desc>Dummy phase to store options for Dava</short_desc>
  5435. <long_desc>
  5436. The decompile (Dava) option is set using the -f dava options in Soot.
  5437. Options provided by Dava are added to this dummy phase so as not to clutter the soot general arguments.
  5438. -p db (option name):(value) will be used to set all required values for Dava.
  5439. </long_desc>
  5440. <boolopt>
  5441. <name>Enabled</name>
  5442. <alias>enabled</alias>
  5443. <default>true</default>
  5444. <short_desc/>
  5445. <long_desc/>
  5446. </boolopt>
  5447. <boolopt>
  5448. <name>Source</name>
  5449. <alias>source-is-javac</alias>
  5450. <default>true</default>
  5451. <short_desc/>
  5452. <long_desc>
  5453. check out soot.dava.toolkits.base.misc.ThrowFinder
  5454. In short we want to ensure that if there are throw exception info in the class file dava uses this info.
  5455. </long_desc>
  5456. </boolopt>
  5457. <sub_phase>
  5458. <name>Transformations</name>
  5459. <alias>db.transformations</alias>
  5460. <short_desc>The Dava back-end with all its transformations</short_desc>
  5461. <long_desc>
  5462. The transformations implemented using AST Traversal and structural flow analses on Dava's AST
  5463. </long_desc>
  5464. <boolopt>
  5465. <name>Enabled</name>
  5466. <alias>enabled</alias>
  5467. <default>true</default>
  5468. </boolopt>
  5469. </sub_phase>
  5470. <sub_phase>
  5471. <name>Renamer</name>
  5472. <alias>db.renamer</alias>
  5473. <short_desc>Apply heuristics based naming of local variables</short_desc>
  5474. <long_desc>If set, the renaming analyses implemented in Dava are applied to each method body being decompiled. The analyses use heuristics to choose potentially better names for local variables. (As of February 14th 2006, work is still under progress on these analyses (dava.toolkits.base.renamer).
  5475. </long_desc>
  5476. <boolopt>
  5477. <name>Enabled</name>
  5478. <alias>enabled</alias>
  5479. <default>false</default>
  5480. </boolopt>
  5481. </sub_phase>
  5482. <sub_phase>
  5483. <name>De-obfuscate</name>
  5484. <alias>db.deobfuscate</alias>
  5485. <short_desc> Apply de-obfuscation analyses</short_desc>
  5486. <long_desc>Certain analyses make sense only when the bytecode is obfuscated code.
  5487. There are plans to implement such analyses and apply them on methods only if this flag is set.
  5488. Dead Code elimination which includes removing code guarded by some condition which is always false or always true is one such
  5489. analysis. Another suggested analysis is giving default names to classes and fields. Onfuscators love to use weird names
  5490. for fields and classes and even a simple re-naming of these could be a good help to the user.
  5491. Another more advanced analysis would be to check for redundant constant fields added by obfuscators and then remove uses
  5492. of these constant fields from the code.</long_desc>
  5493. <boolopt>
  5494. <name>Enabled</name>
  5495. <alias>enabled</alias>
  5496. <default>true</default>
  5497. </boolopt>
  5498. </sub_phase>
  5499. <sub_phase>
  5500. <name>Force Recompilability</name>
  5501. <alias>db.force-recompile</alias>
  5502. <short_desc> Try to get recompilable code.</short_desc>
  5503. <long_desc>While decompiling we have to be clear what our aim is: do we want to convert bytecode
  5504. to Java syntax and stay as close to the actual execution of bytecode or do we want recompilably Java source representing
  5505. the bytecode. This distinction is important because some restrictions present in Java source are absent from the bytecode.
  5506. Examples of this include that fact that in Java a call to a constructor or super needs to be the first statement in
  5507. a constructors body. This restriction is absent from the bytecode. Similarly final fields HAVE to be initialized
  5508. once and only once in either the static initializer (static fields) or all the constructors (non-static fields). Additionally
  5509. the fields should be initialized on all possible execution paths. These restrictions are again absent from the bytecode.
  5510. In doing a one-one conversion of bytecode to Java source then no attempt should be made to fix any of these and similar problems
  5511. in the Java source. However, if the aim is to get recompilable code then these and similar issues need to be fixed.
  5512. Setting the force-recompilability flag will ensure that the decompiler tries its best to produce recompilable Java source.</long_desc>
  5513. <boolopt>
  5514. <name>Enabled</name>
  5515. <alias>enabled</alias>
  5516. <default>true</default>
  5517. </boolopt>
  5518. </sub_phase>
  5519. </phase>
  5520. </phaseopt>
  5521. <macroopt>
  5522. <name>Optimize</name>
  5523. <alias>O</alias>
  5524. <alias>optimize</alias>
  5525. <expansion>-p</expansion>
  5526. <expansion>gb.a1</expansion>
  5527. <expansion>only-stack-locals:false</expansion>
  5528. <expansion>-p</expansion>
  5529. <expansion>gb.a2</expansion>
  5530. <expansion>only-stack-locals:false</expansion>
  5531. <expansion>-p</expansion>
  5532. <expansion>bop</expansion>
  5533. <expansion>enabled:true</expansion>
  5534. <expansion>-p</expansion>
  5535. <expansion>gop</expansion>
  5536. <expansion>enabled:true</expansion>
  5537. <expansion>-p</expansion>
  5538. <expansion>jop</expansion>
  5539. <expansion>enabled:true</expansion>
  5540. <expansion>-p</expansion>
  5541. <expansion>sop</expansion>
  5542. <expansion>enabled:true</expansion>
  5543. <short_desc>Perform intraprocedural optimizations</short_desc>
  5544. <long_desc>
  5545. Perform intraprocedural optimizations on the application classes.
  5546. </long_desc>
  5547. </macroopt>
  5548. <macroopt>
  5549. <name>Whole Program Optimize</name>
  5550. <alias>W</alias>
  5551. <alias>whole-optimize</alias>
  5552. <expansion>-p</expansion>
  5553. <expansion>wjop</expansion>
  5554. <expansion>enabled:true</expansion>
  5555. <expansion>-p</expansion>
  5556. <expansion>wsop</expansion>
  5557. <expansion>enabled:true</expansion>
  5558. <expansion>-w</expansion>
  5559. <expansion>-O</expansion>
  5560. <short_desc>Perform whole program optimizations</short_desc>
  5561. <long_desc>
  5562. Perform whole program optimizations on the application
  5563. classes. This enables the Whole-Jimple Optimization pack as well
  5564. as whole program mode and intraprocedural optimizations.
  5565. </long_desc>
  5566. </macroopt>
  5567. <boolopt>
  5568. <name>Via Grimp</name>
  5569. <alias>via-grimp</alias>
  5570. <short_desc>Convert to bytecode via Grimp instead of via Baf</short_desc>
  5571. <long_desc>
  5572. Convert Jimple to bytecode via the Grimp intermediate
  5573. representation instead of via the Baf intermediate
  5574. representation.
  5575. </long_desc>
  5576. </boolopt>
  5577. <boolopt>
  5578. <name>Via Shimple</name>
  5579. <alias>via-shimple</alias>
  5580. <short_desc>Enable Shimple SSA representation</short_desc>
  5581. <long_desc>
  5582. Enable Shimple, Soot's SSA representation. This generates Shimple
  5583. bodies for the application classes, optionally transforms them
  5584. with analyses that run on SSA form, then turns them back into
  5585. Jimple for processing by the rest of Soot. For more information,
  5586. see the documentation for the <tt>shimp</tt>, <tt>stp</tt>, and
  5587. <tt>sop</tt> phases.
  5588. </long_desc>
  5589. </boolopt>
  5590. <multiopt>
  5591. <name>Default ThrowAnalysis</name>
  5592. <alias>throw-analysis</alias>
  5593. <long_desc>
  5594. This option specifies how to estimate the exceptions which each statement
  5595. may throw when constructing exceptional CFGs.
  5596. </long_desc>
  5597. <value>
  5598. <name>Pedantic</name>
  5599. <alias>pedantic</alias>
  5600. <short_desc>Pedantically conservative throw analysis</short_desc>
  5601. <long_desc>
  5602. Says that any instruction may throw any
  5603. <code>Throwable</code> whatsoever. Strictly speaking this is
  5604. correct, since the Java libraries include the
  5605. <code>Thread.stop(Throwable)</code>
  5606. method, which allows other threads to cause arbitrary exceptions
  5607. to occur at arbitrary points in the execution of a victim thread.
  5608. </long_desc>
  5609. </value>
  5610. <value>
  5611. <name>Unit</name>
  5612. <alias>unit</alias>
  5613. <short_desc>Unit Throw Analysis</short_desc>
  5614. <default/>
  5615. <long_desc>
  5616. Says that each statement in the intermediate representation
  5617. may throw those exception types associated with the corresponding
  5618. Java bytecode instructions in the JVM Specification. The
  5619. analysis deals with each statement in isolation, without regard
  5620. to the surrounding program.
  5621. </long_desc>
  5622. </value>
  5623. </multiopt>
  5624. <boolopt>
  5625. <name>Omit Excepting Unit Edges</name>
  5626. <alias>omit-excepting-unit-edges</alias>
  5627. <short_desc>Omit CFG edges to handlers from excepting units which lack side effects</short_desc>
  5628. <long_desc>
  5629. <p>
  5630. When constructing an <code>ExceptionalUnitGraph</code> or
  5631. <code>ExceptionalBlockGraph</code>, include edges to an exception
  5632. handler only from the predecessors of an instruction which may
  5633. throw an exception to the handler, and not from the excepting
  5634. instruction itself, unless the excepting instruction has
  5635. potential side effects.
  5636. </p>
  5637. <p>
  5638. Omitting edges from excepting units allows more accurate flow
  5639. analyses (since if an instruction without side effects throws an
  5640. exception, it has not changed the state of the computation). This
  5641. accuracy, though, could lead optimizations to generate
  5642. unverifiable code, since the dataflow analyses performed by
  5643. bytecode verifiers might include paths to exception handlers from
  5644. all protected instructions, regardless of whether the
  5645. instructions have side effects. (In practice, the pedantic throw
  5646. analysis suffices to pass verification in all VMs tested with
  5647. Soot to date, but the JVM specification does allow for less
  5648. discriminating verifiers which would reject some code that might
  5649. be generated using the pedantic throw analysis without also
  5650. adding edges from all excepting units.)</p>
  5651. </long_desc>
  5652. </boolopt>
  5653. <macroopt>
  5654. <name>Trim CFGs</name>
  5655. <alias>trim-cfgs</alias>
  5656. <expansion>-throw-analysis</expansion>
  5657. <expansion>unit</expansion>
  5658. <expansion>-omit-excepting-unit-edges</expansion>
  5659. <expansion>-p</expansion>
  5660. <expansion>jb.tt</expansion>
  5661. <expansion>enabled:true</expansion>
  5662. <short_desc>Trim unrealizable exceptional edges from CFGs</short_desc>
  5663. <long_desc>
  5664. <p>
  5665. When constructing CFGs which include exceptional edges, minimize
  5666. the number of edges leading to exception handlers by analyzing
  5667. which instructions might actually be executed before an exception
  5668. is thrown, instead of assuming that every instruction protected
  5669. by a handler has the potential to throw an exception the handler
  5670. catches.
  5671. </p>
  5672. <p>
  5673. <code>-trim-cfgs</code> is shorthand for <code>-throw-analysis
  5674. unit -omit-excepting-unit-edges -p jb.tt enabled:true</code>.</p>
  5675. </long_desc>
  5676. </macroopt>
  5677. <boolopt>
  5678. <name>Ignore reolution errors</name>
  5679. <alias>ire</alias>
  5680. <alias>ignore-resolution-errors</alias>
  5681. <default>false</default>
  5682. <short_desc>Does not throw an exception when a program references an undeclared field or method.</short_desc>
  5683. <long_desc>
  5684. <p>
  5685. Some programs may contain dead code that references fields or methods that do not exist.
  5686. By default, Soot exists with an exception when this happens. If this option is enabled,
  5687. Soot only prints a warning but does not exit.
  5688. </p>
  5689. </long_desc>
  5690. </boolopt>
  5691. </section>
  5692. <section>
  5693. <name>Application Mode Options</name>
  5694. <listopt>
  5695. <name>Include Package</name>
  5696. <alias>i</alias>
  5697. <alias>include</alias>
  5698. <set_arg_label>pkg</set_arg_label>
  5699. <short_desc>Include classes in <use_arg_label/> as application classes</short_desc>
  5700. <long_desc>
  5701. <p>
  5702. Designate classes in packages whose names begin with
  5703. <use_arg_label/> (e.g. <tt>java.util.</tt>) as application
  5704. classes which should be analyzed and output. This option allows
  5705. you to selectively analyze classes in some packages that Soot
  5706. normally treats as library classes.</p>
  5707. <p>
  5708. You can use the include option multiple times, to designate
  5709. the classes of multiple packages as application classes.</p>
  5710. <p>
  5711. If you specify both include and exclude options, first the
  5712. classes from all excluded packages are marked as library classes,
  5713. then the classes from all included packages are marked as
  5714. application classes.</p>
  5715. </long_desc>
  5716. </listopt>
  5717. <listopt>
  5718. <name>Exclude Package</name>
  5719. <alias>x</alias>
  5720. <alias>exclude</alias>
  5721. <set_arg_label>pkg</set_arg_label>
  5722. <short_desc>Exclude classes in <use_arg_label/> from application classes</short_desc>
  5723. <long_desc>
  5724. <p>
  5725. Excludes any classes in packages whose names begin with
  5726. <use_arg_label/> from the set of application classes which are
  5727. analyzed and output, treating them as library classes instead.
  5728. This option allows you to selectively exclude classes
  5729. which would normally be treated as application classes
  5730. </p>
  5731. <p>
  5732. You can use the exclude option multiple times, to designate
  5733. the classes of multiple packages as library classes.</p>
  5734. <p>
  5735. If you specify both include and exclude options, first the
  5736. classes from all excluded packages are marked as library classes,
  5737. then the classes from all included packages are marked as
  5738. application classes.</p>
  5739. </long_desc>
  5740. </listopt>
  5741. <boolopt>
  5742. <name>Include All Packages</name>
  5743. <alias>include-all</alias>
  5744. <short_desc>Set default excluded packages to empty list</short_desc>
  5745. <long_desc>
  5746. Soot uses a default list of packages (such as java.) which are deemed
  5747. to contain library classes. This switch removes the default packages from the
  5748. list of packages containing library classes.
  5749. Individual packages can then be added using the exclude option.
  5750. </long_desc>
  5751. </boolopt>
  5752. <listopt>
  5753. <name>Dynamic Classes</name>
  5754. <alias>dynamic-class</alias>
  5755. <set_arg_label>class</set_arg_label>
  5756. <short_desc>Note that <use_arg_label/> may be loaded dynamically</short_desc>
  5757. <long_desc>
  5758. <p>
  5759. Mark <use_arg_label/> as a class which the application may load
  5760. dynamically. Soot will read it as a library class even if it is
  5761. not referenced from the argument classes. This permits whole
  5762. program optimizations on programs which load classes dynamically
  5763. if the set of classes that can be loaded is known at compile
  5764. time.</p>
  5765. <p>
  5766. You can use the dynamic class option multiple
  5767. times to specify more than one dynamic class.</p>
  5768. </long_desc>
  5769. </listopt>
  5770. <listopt>
  5771. <name>Dynamic Directories</name>
  5772. <alias>dynamic-dir</alias>
  5773. <set_arg_label>dir</set_arg_label>
  5774. <short_desc>Mark all classes in <use_arg_label/> as potentially dynamic</short_desc>
  5775. <long_desc>
  5776. <p>Mark all class files in <use_arg_label/> as classes that may
  5777. be loaded dynamically. Soot will read them as library classes
  5778. even if they are not referenced from the argument classes.</p>
  5779. <p>
  5780. You can specify more than one directory of potentially dynamic
  5781. classes by specifying multiple dynamic directory options.</p>
  5782. </long_desc>
  5783. </listopt>
  5784. <listopt>
  5785. <name>Dynamic Package</name>
  5786. <alias>dynamic-package</alias>
  5787. <set_arg_label>pkg</set_arg_label>
  5788. <short_desc>Marks classes in <use_arg_label/> as potentially dynamic</short_desc>
  5789. <long_desc>
  5790. <p>
  5791. Marks all class files belonging to the package <use_arg_label/>
  5792. or any of its subpackages as classes which the application may
  5793. load dynamically. Soot will read all classes in <use_arg_label/> as
  5794. library classes, even if they are not referenced by any of the
  5795. argument classes.</p>
  5796. <p>To specify more than one dynamic package, use the dynamic
  5797. package option multiple times.</p>
  5798. </long_desc>
  5799. </listopt>
  5800. </section>
  5801. <section>
  5802. <name>Input Attribute Options</name>
  5803. <boolopt>
  5804. <name>Keep Line Number</name>
  5805. <alias>keep-line-number</alias>
  5806. <default>true</default>
  5807. <short_desc>Keep line number tables</short_desc>
  5808. <long_desc>
  5809. Preserve line number tables for class files throughout the
  5810. transformations.
  5811. </long_desc>
  5812. </boolopt>
  5813. <boolopt>
  5814. <name>Keep Bytecode Offset</name>
  5815. <alias>keep-bytecode-offset</alias>
  5816. <alias>keep-offset</alias>
  5817. <short_desc>Attach bytecode offset to IR</short_desc>
  5818. <long_desc>Maintain bytecode offset tables for class files throughout the transformations.</long_desc>
  5819. </boolopt>
  5820. </section>cg.spark
  5821. <section>
  5822. <name>Annotation Options</name>
  5823. <macroopt>
  5824. <name>Purity Annotation [AM]</name>
  5825. <alias>annot-purity</alias>
  5826. <expansion>-w</expansion>
  5827. <expansion>-p</expansion>
  5828. <expansion>cg.spark</expansion>
  5829. <expansion>enabled:true</expansion>
  5830. <expansion>-p</expansion>
  5831. <expansion>wjap.purity</expansion>
  5832. <expansion>enabled:true</expansion>
  5833. <short_desc>Emit purity attributes</short_desc>
  5834. <long_desc>
  5835. Purity anaysis implemented by Antoine Mine and based on the paper
  5836. A Combined Pointer and Purity Analysis Java Programs
  5837. by Alexandru Salcianu and Martin Rinard.
  5838. </long_desc>
  5839. </macroopt>
  5840. <macroopt>
  5841. <name>Null Pointer Annotation</name>
  5842. <alias>annot-nullpointer</alias>
  5843. <expansion>-p</expansion>
  5844. <expansion>jap.npc</expansion>
  5845. <expansion>enabled:true</expansion>
  5846. <expansion>-p</expansion>
  5847. <expansion>tag.an</expansion>
  5848. <expansion>enabled:true</expansion>
  5849. <short_desc>Emit null pointer attributes</short_desc>
  5850. <long_desc>
  5851. Perform a static analysis of which dereferenced pointers may have
  5852. null values, and annotate class files with attributes
  5853. encoding the results of the analysis. For details, see the
  5854. documentation for Null Pointer Annotation and for the
  5855. Array Bounds and Null Pointer Check Tag Aggregator.
  5856. </long_desc>
  5857. </macroopt>
  5858. <macroopt>
  5859. <name>Array Bounds Annotation</name>
  5860. <alias>annot-arraybounds</alias>
  5861. <expansion>-p</expansion>
  5862. <expansion>wjap.ra</expansion>
  5863. <expansion>enabled:true</expansion>
  5864. <expansion>-p</expansion>
  5865. <expansion>jap.abc</expansion>
  5866. <expansion>enabled:true</expansion>
  5867. <expansion>-p</expansion>
  5868. <expansion>tag.an</expansion>
  5869. <expansion>enabled:true</expansion>
  5870. <short_desc>Emit array bounds check attributes</short_desc>
  5871. <long_desc>
  5872. Perform a static analysis of which array bounds checks may safely
  5873. be eliminated and annotate output class files with attributes
  5874. encoding the results of the analysis. For details, see the
  5875. documentation for Array Bounds Annotation and for the Array
  5876. Bounds and Null Pointer Check Tag Aggregator.
  5877. </long_desc>
  5878. </macroopt>
  5879. <macroopt>
  5880. <name>Side effect annotation</name>
  5881. <alias>annot-side-effect</alias>
  5882. <expansion>-w</expansion>
  5883. <expansion>-p</expansion>
  5884. <expansion>jap.sea</expansion>
  5885. <expansion>enabled:true</expansion>
  5886. <expansion>-p</expansion>
  5887. <expansion>tag.dep</expansion>
  5888. <expansion>enabled:true</expansion>
  5889. <short_desc>Emit side-effect attributes</short_desc>
  5890. <long_desc>
  5891. Enable the generation of side-effect attributes.
  5892. </long_desc>
  5893. </macroopt>
  5894. <macroopt>
  5895. <name>Field read/write annotation</name>
  5896. <alias>annot-fieldrw</alias>
  5897. <expansion>-w</expansion>
  5898. <expansion>-p</expansion>
  5899. <expansion>jap.fieldrw</expansion>
  5900. <expansion>enabled:true</expansion>
  5901. <expansion>-p</expansion>
  5902. <expansion>tag.fieldrw</expansion>
  5903. <expansion>enabled:true</expansion>
  5904. <short_desc>Emit field read/write attributes</short_desc>
  5905. <long_desc>Enable the generation of field read/write attributes.</long_desc>
  5906. </macroopt>
  5907. </section>
  5908. <section>
  5909. <name>Miscellaneous Options</name>
  5910. <boolopt>
  5911. <name>Time</name>
  5912. <alias>time</alias>
  5913. <short_desc>Report time required for transformations</short_desc>
  5914. <long_desc>
  5915. Report the time required to perform some of Soot's transformations.
  5916. </long_desc>
  5917. </boolopt>
  5918. <boolopt>
  5919. <name>Subtract Garbage Collection Time</name>
  5920. <alias>subtract-gc</alias>
  5921. <short_desc>Subtract gc from time</short_desc>
  5922. <long_desc>
  5923. Attempt to subtract time spent in garbage collection from
  5924. the reports of times required for transformations.
  5925. </long_desc>
  5926. </boolopt>
  5927. </section>
  5928. </options>