Re: [Jastadd] [Q] Def-Use analysis in JastAddJ

From: Na, Hyunik <hina_at_kaist.ac.kr>
Date: Tue, 10 Jan 2012 08:54:38 +0900

By ‘def’ in def-use analysis, I (and most compiler books as far as I know)
mean ‘assignment’.

 

In the following example,

 

-=-=-=

int i = 0;

 

if ( … )

           i = 1;

else if ( … )

           i = 2;

else if ( … )

           i = 3

 

System.out.println( “ i = “ + i ); // use of i

-=-=-=

 

def-sites corresponding to the i’s use-site are the 4 assignments.

VarAccess.decls() returns only the first assignment (the declaration of i),
doesn’t it?

 

Now, I’m reading DefiniteAssignment.jrag.

Considering what the definite assignment check does, I expect that it
contains

some hints which is helpful in implementing the analysis.

 

- Hyunik

 

 

 

From: jastadd-bounces_at_cs.lth.se [mailto:jastadd-bounces_at_cs.lth.se] On Behalf
Of Jesper Oqvist
Sent: Monday, January 09, 2012 7:13 PM
To: jastadd_at_cs.lth.se
Subject: Re: [Jastadd] [Q] Def-Use analysis in JastAddJ

 

What about VarAccess.decls() ? Declared in LookupVariable.jrag at line 232.

/Jesper

On 01/09/2012 10:44 AM, Na, Hyunik wrote:

Hello JastAddJ developers,

 

I need def-use analysis for java programs.

More specifically, I need some attribute like

 

syn/inh SimpleSet VarAccess.defSites() = …

 

I couldn’t find one when I quickly scanned the VarAccess.java source code.

Isn’t there such an attribute in JastAddJ?

 

If not, I have to implement the def-use analysis.

Any advice will be appreciated for the implementation in JastAddJ.

 

- Hyunik

 
 
_______________________________________________
JastAdd mailing list
JastAdd_at_cs.lth.se
https://mail1.cs.lth.se/cgi-bin/mailman/listinfo/jastadd
  

 
Received on Tue Jan 10 2012 - 00:55:03 CET

This archive was generated by hypermail 2.3.0 : Wed Apr 16 2014 - 17:19:06 CEST