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

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

NewImage

NewImage

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

NewImage

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

NewImage

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

NewImage

NewImage

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

 NewImage

b. collect dependency

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

NewImage

1.check the stable version of WALA : 

NewImage

final, you will see :

NewImage

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

NewImage

NewImage

c. run the example 

1.check launcher : PDFSDG.launch

 NewImage

NewImage

 NewImage

check out the output sdg.pdf:

NewImage

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

check out the output dot file:

NewImage

NewImage

That’s all.

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

原文地址:https://www.cnblogs.com/XBWer/p/7210318.html