PageRenderTime 43ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

/compiler/src/main/java/soot/options/soot_options.xml

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