Soot (software)
In-game article clicks load inline without leaving the challenge.
In static program analysis, Soot is a bytecode manipulation and optimization framework consisting of intermediate languages for Java. It has been developed by the Sable Research Group at McGill University. Soot is currently maintained by the Secure Software Engineering Group at Paderborn University. Soot provides four intermediate representations for use through its API for other analysis programs to access and build upon:
- Baf: a near bytecode representation.
- Jimple: a simplified version of Java source code that has a maximum of three components per statement.
- Shimple: an SSA variation of Jimple (similar to GIMPLE).
- Grimp: an aggregated version of Jimple suitable for decompilation and code inspection.
The current Soot software release also contains detailed program analyses that can be used out-of-the-box, such as context-sensitive flow-insensitive points-to analysis, call graph analysis and domination analysis (answering the question "must event a follow event b?"). It also has a decompiler called dava.
Soot is free software available under the GNU Lesser General Public License (LGPL). In 2010, two research papers on Soot (Vallée-Rai et al. 1999 and Pominville et al. 2000) were selected as IBM CASCON First Decade High Impact Papers among 12 other papers from the 425 entries.
Jimple
Jimple is an intermediate representation of a Java program designed to be easier to optimize than Java bytecode. It is typed, has a concrete syntax and is based on three-address code.
Jimple includes only 15 different operations, thus simplifying flow analysis. By contrast, java bytecode includes over 200 different operations.
Unlike java bytecode, in Jimple local and stack variables are typed and Jimple is inherently type safe.
Converting to Jimple, or "Jimplifying" (after "simplifying"), is conversion of bytecode to three-address code. The idea behind the conversion, first investigated by Clark Verbrugge, is to associate a variable to each position in the stack. Hence stack operations become assignments involving the stack variables.
Example
Consider the following bytecode, which is from the
The above translates to the following three-address code:
In general the resulting code does not have static single assignment form.
SootUp
Soot is now succeeded by the SootUp framework developed by the Secure Software Engineering Group at Paderborn University. SootUp is a complete reimplementation of Soot with a novel design, that focuses more on static program analysis, rather than bytecode optimization.
Sources
- Pominville, Patrice; Qian, Feng; Vallée-Rai, Raja; Hendren, Laurie; Verbrugge, Clark (2000). A framework for optimizing Java using attributes. Republished in . CASCON '10. pp. 225–241. doi:.
- Vallée-Rai, Raja; Co, Phong; Gagnon, Etienne; Hendren, Laurie; Lam, Patrick; Sundaresan, Vijay (1999). . Proceedings of the 1999 conference of the Centre for Advanced Studies on Collaborative research. CASCON '99. Republished in . CASCON '10. pp. 214–224. doi:.
Further reading
- Lam, Patrick; Bodden, Eric; Lhoták, Ondřej; Hendren, Laurie (2011). (PDF). Cetus Users and Compiler Infrastructure Workshop.
External links
- (on Google Scholar)