/IRConverter

An IRConverter from WALA IR to Soot IR (Jimple)

Primary LanguageJavaEclipse Public License 2.0EPL-2.0

All Contributors

IRConverter Build Status

This IRConverter converts WALA intermediate representation (IR) to Soot IR. This IRConverter enables you to analyze Java source code with Soot.

Why is this IRConverter needed?

Soot comprises a solid Java bytecode front end. However, the bytecode only has the line numbers. This is not sufficient to support features such as hover, fix and codeLens in a code editor. For those features, position information about variable, expressions, calls and parameters are required, which are lost in bytecode.

How does this IRConverter work?

This IRConverter takes WALA’s Java source-code front end to generate WALA IR (non-SSA) and convert it to Soot IR. Soot has multiple IRs, the most commonly used IR is called Jimple --- the IR considered by this IRConverter.

The following figure shows the IR statements considered by this IRConverter.

This IRConverter was developed for our paper: MagpieBridge: A General Approach to Integrating Static Analyses into IDEs and Editors (ECOOP 2019). The parent project MagpieBridge can be found here.

Limitations

Since this IRConverter uses WALA Java source code frond end, the limitations of WALA are inherited. See discussions here.

Cite the research paper

For scientific usage, please cite the paper [BibTex].

How to use IRConverter?

You can either

  1. IRConverter is published on the GitHub Package Registry. You can use the release by adding the following lines to your pom.xml (see all github package). You can follow these instructions.
<dependencies>
  <dependency>
    <groupId>magpiebridge</groupId>
    <artifactId>irconverter</artifactId>
    <version>0.1.6</version>
  </dependency>
</dependencies>

<repositories>
  <repository>
    <id>github</id>
    <name>GitHub MagpieBridge IRConverter Apache Maven Packages</name>
    <url>https://maven.pkg.github.com/MagpieBridge/IRConverter</url>
  </repository>
</repositories>
  1. or build IRConverter by yourself
    • check out the master branch with git clone https://github.com/MagpieBridge/IRConverter.git
    • run mvn install in the project root directory to build the tool and run all tests. To skip tests, run mvn install -DskipTests.

Get Involved

  • Pull requests are welcome!
  • Submit github issues for any feature enhancements, bugs or documentation problems
  • Please format the code with mvn com.coveo:fmt-maven-plugin:format before git push

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Linghui Luo

💻 🎨 📖

João Pereira

💻 🤔

Markus Schmidt

⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

Contact

✉ linghui[at]outlook.de