Programming exercise 2

Moderator: Applied Static Analysis

Mario Trageser
Beiträge: 40
Registriert: 20. Jul 2013 14:28

Programming exercise 2

Beitrag von Mario Trageser »


I think the DefaultDomainWIthCFGAndDefUse will be needed to solve the second exercise.
However, I have no idea where I can find the def use information in the analysis result.

To make it clear, I have the following code:

Code: Alles auswählen

for {
      classFile ← project.allClassFiles.par
      method ← classFile.methods 
      if method.body.isDefined
      analysisResult = 
        BaseAI(classFile, method, new DefaultDomainWithCFGAndDefUse(project, classFile, method))
      pc <- method.body.get.programCounters
    } yield {
      //Does this PC define something?
      //If yes, where is it used?
      (classFile, method, pc)
So, what can I do to extract the information weather a program counter defines something, and if yes, where it is used?

Kind regards,

Zurück zu „Applied Static Analysis“