Thank you for this information.
This is definitely what I need (a data-flow analysis).
The source code in the zip file builds successfully with two simple
modifications.
. flow-20110613/build.xml:
beaver.jar ā beaver-ant.jar
. Java1.4Frontend/CatchClause.jrag:
abstract CatchClause ::= Block; ā abstract
CatchClause ::= Parameter:ParameterDeclaration Block;
The version of my local JastAddJ is the most current one. (9196).
Thank you again.
- Hyunik.
From: Görel Hedin [mailto:gorel_at_cs.lth.se]
Sent: Tuesday, January 10, 2012 5:27 PM
To: Na, Hyunik
Cc: jastadd_at_cs.lth.se
Subject: Re: [Jastadd] [Q] Def-Use analysis in JastAddJ
Hi Hyunik,
You should take a look at the Flow Analysis extension. See
http://jastadd.org/web/jastaddj/extensions.php
It covers Java 5, i.e., it doesn't cover the Java 7 extensions yet.
Cheers,
Görel
10 jan 2012 kl. 00.54 skrev Na, Hyunik:
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
_______________________________________________
JastAdd mailing list
JastAdd_at_cs.lth.se
https://mail1.cs.lth.se/cgi-bin/mailman/listinfo/jastadd
Received on Tue Jan 10 2012 - 10:47:33 CET