ICA |Sheet 2- Excercise 1

Moderator: Implementing code analyses for large software systems

Beiträge: 2
Registriert: 22. Okt 2014 19:12

ICA |Sheet 2- Excercise 1

Beitrag von rahul_dss14 »

Hi All,
In Sheet 2, exercise 1, we need to write Junit test cases to implement taint analysis. But i am little confused about the test criteria of Junit test cases. Do we need to check for the leak in Junit test cases and report it ? or we need to implement all the rules in TargetClass1.java and test those rules in TargetClass1Test.java using Junit test cases. It might be possible that my understanding is wrong in the given question. But a little clarification will be good for me to implement.

Rahul Dutta

Beiträge: 30
Registriert: 12. Okt 2011 16:36

Re: ICA |Sheet 2- Excercise 1

Beitrag von Lukas.Sommer »


the rules are implemented in the IntraproceduralAnalysis-class. TargetClass1.java is the target-class, on which Soot will be running. In this class you need to implement short pieces of java-code producing leaks (or not) as meaningfull examples for the rules implemented. TargetClass1Test just runs Soot on the target class and as a test-criteria you should compare the number of leaks found by your analysis.
Best way to understand the tests is the example already given in TargetClass1 and TargetClass1Test, where Soot is run on the method in TargetClass1 and the number of leaks is checked.

I hope that helps you,



Zurück zu „Implementing code analyses for large software systems (ICA)“