Programming exercise 2

Moderator: Applied Static Analysis

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

Programming exercise 2

Beitrag von Mario Trageser » 2. Mai 2016 14:27

Hi,

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,
Mario

Zurück zu „Applied Static Analysis“