Preparations:

1. IDE : eclipse (my version is luna)

2. maven (my version is 3.5.0)

3. git

4. JAVA 1.7

Main Steps:

a. git clone WALA from GitHub : 

b. collect dependency (.class)

c. run the example

Follows are the steps to generate System Dependency Graph by WALA :

a. git clone WALA from GitHub : 

1. create a folder named “WALA_Test”, for me, its path is /Users/xubowen/Downloads/WALA_Test

2. open terminal, cd to the direction and execute git clone https://github.com/wala/WALA.git

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

3.import project to eclipse, you will see some errors. It’s ok, just skip it. We will fix it later.

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

Then, based on the https://github.com/wala/WALA/wiki/Getting-Started, we need to do some configurations for WALA:

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

From http://wala.sourceforge.net/wiki/index.php/UserGuide:Getting_Started, we can know how to configure the path of Wala.properties:

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

And configure the proper path of pdfview_exe and dot_ext, since sometimes the default settings are not correct.

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

b. collect dependency

You will notice that the project without bin folder, such as com.ibm.wala.core

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

1.check the stable version of WALA :

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

final, you will see :

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

After it, you will see a bin folder in the project :

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

c. run the example 

1.check launcher : PDFSDG.launch

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

check out the output sdg.pdf:

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

check it out : http://files.cnblogs.com/files/XBWer/sdg.pdf

check out the output dot file:

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

【IBM-WALA】Step by Step : use WALA to generate System Dependency Graph PDF and Dot File (Mac)-LMLPHP

That’s all.

You can also run some other launchers to generate what you want.

05-04 03:25