Skip to content

Streamlined Getting Started Guide

Manu Sridharan edited this page Jul 20, 2016 · 2 revisions

This is a streamlined guide to getting started with WALA, based on use of Gradle and the WALA jars in Maven Central. With this approach, you never need to clone the WALA GitHub repository, and you can more easily use tools other than Eclipse for development. This guide is a work in progress; feedback / edits welcome.

Prerequisites

  • Git
  • Java version 7 or higher
  • Gradle, tested on version 2.14.1. Later versions should work, earlier versions might work.

On Mac OS, if you have Homebrew installed, you can get the above dependencies by running:

brew cask install java && brew install gradle

TODO add instructions for Ubuntu

Getting the code

We are going to use the WALA-start repository, which contains some sample analyses and an appropriate Gradle build file to automatically pull in the relevant WALA jars. First, clone the repository:

git clone https://github.com/msridhar/WALA-start

Then, compile the Java code:

cd WALA-start
gradle compileJava

The first time you run this command, gradle will download the WALA jars and their dependencies, which will take some time.

That's basically it! You can use the sample analyses under src/main/java to get started with your own analysis. E.g., check out ScopeFileCallGraph to see how to build a call graph given a scope file.

Using Eclipse

If you'd like to use Eclipse for development, first run the following command in the WALA-start directory:

gradle eclipse

This generates the appropriate Eclipse metadata. Once you've done that, you should be able to import WALA-start as an Eclipse project.