What is the difference between wala and soot?

981 views Asked by At

I need to chose a framework for following tasks in Java:

  • extract control flow graph
  • interprocedural and intraprocedural analysis
  • dataflow analysis
  • PDG
  • different souce code analysis tasks (like method body extraction, test code extraction)

Which framework would be a good fit for my tasks?

I came across so many different tools apart from wala, soot as well like JavaParser, Spoon, to name a few.

Which framework should I chose? Ideally I would like to adopt a tool that is easier to use. Additionally, my expectation was given the popularity of Java tools should already exist for all these tasks. Or my understanding is wrong?

I will appreciate it if anyone please point me to different resources etc.

2

There are 2 answers

3
Ekin On

I used Soot many times, for different things. I am 100% sure that Soot extracts control-flow graphs, and performs intraprocedural and dataflow analysis. They really do have a good community and good people who are willing to help you out. However, I am not quite sure if you can extract PDG or SDG with Soot. I read papers that claim they did it with Soot, but there are no source codes or examples that I was able to find (maybe you have to do some modification, I don't know). But I also do know that you can perform an interprocedural analysis with Soot as well.

Here are some tutorials for Soot. If you have any questions I recommend you to join their mail group and ask questions if you have any.

For WALA, I was also in a need of a PDG since that in its wiki it says you can extract a PDGs. Even though when you import the WALA project there are some example codes in it that you might want to look at. However, I was never able to get it running, because there wasn't enough documentation. Most of its documentation is pretty old.

Here are some tutorials for WALA. Here is also a dataflow analysis test case code that they have. Maybe it can give you some insight. I strongly recommend you to look into their test cases, it might help.

Briefly, I believe you can all of the things you asked with Soot and WALA. However, personally, I was mostly able to do them with Soot. I guess it is more of a matter of how familiar get with them and how much you like one of them.

1
Andrew On

Spoon would be a good fit for many tasks on your list, and it is quite easy to use. It is primarily used for source code transformation and analysis with the official documentation at http://spoon.gforge.inria.fr/. For control and data flow analysis there is the spoon-control-flow package which is based on Spoon.