Home > Archive > Compilers > December 2005 > Parsing Java
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| DEAR ALL,
I am newbie! pls guide me,
1- I want to parsing a java code [java package] and extract [call
dependency graph] between methods then for each method construct a
TASK GRAPH .
if there is any tools or some way to do that please guide me.
2- any body knows about COMPOSET compiler generator?
--
BEST REGARDS ""
SADEGH
| |
| Scott Nicol 2005-12-15, 3:58 am |
| s h wrote:
> 1- I want to parsing a java code [java package] and extract [call
> dependency graph] between methods then for each method construct a
> TASK GRAPH .
See
<http://java.sun.com/docs/books/vmsp...pecTOC.doc.html>
for the Java VM spec. Depending on your needs, you could just use javap
-c and massage the output with perl/awk/etc.
--
Scott Nicol
snicol@apk.net
| |
| Florian Liekweg 2005-12-15, 3:58 am |
| s h wrote:
> DEAR ALL,
> I am newbie! pls guide me,
> 1- I want to parsing a java code [java package] and extract [call
> dependency graph] between methods then for each method construct a
> TASK GRAPH .
>
> if there is any tools or some way to do that please guide me.
Hello, Sadegh,
there's a couple of tools out there that can parse java code. One
of them is RECODER (http://recoder.sf.net), which will make it
easy to read in java code and build the call graph based on the
information it computes automatically.
I don't know what you mean by "task graph", but if such "tasks"
can be extracted from the source code, then RECODER will be able
to help you there, too.
cheers,
Florian Liekweg
--
| |
| Oliver Wong 2005-12-15, 3:58 am |
| "s h" <mshoosh@gmail.com> wrote in message news:05-12-028@comp.compilers...
> DEAR ALL,
> I am newbie! pls guide me,
> 1- I want to parsing a java code [java package] and extract [call
> dependency graph] between methods then for each method construct a
> TASK GRAPH .
>
> if there is any tools or some way to do that please guide me.
You didn't specify what language you're planning on writing your parser
in. Presumably since you're analyzing Java code, you know Java well enough
to program in it. You might want to look into JavaCC, which is a parser
generator which generates a parser in the Java language. There are a few
grammars online, including one for Java 1.4. AFAIK, there isn't a JavaCC
grammar for Java 1.5 yet.
Parser Generator:
https://javacc.dev.java.net/
Grammars:
http://www.cobase.cs.ucla.edu/pub/javacc/
- Oliver
| |
|
| On 15 Dec 2005 02:20:13 -0500, Florian Liekweg <liekweg@gmx.de> wrote:
> there's a couple of tools out there that can parse java code. One
> of them is RECODER (http://recoder.sf.net), which will make it
> easy to read in java code and build the call graph based on the
> information it computes automatically.
>
>I don't know what you mean by "task graph", but if such "tasks"
>can be extracted from the source code, then RECODER will be able
>to help you there, too.
> cheers,
TASK GRAPH is used in [distribution of code] ,when the parser is going
to generate intermediate code for for optimizing this code it can do
some algorithms for CSE common sub expersion elimination , constant
folding and ... if the parser have ability for generate distribution
code for parallel execution it must extract 2 things ( for example for
one java package)
first: lex and parse the code and extract call graphs and data
dependency graphs and control flow graphs
secound: then from this graphs ,it must find all instructins that
have same CFG and DDG and can put them in single TASK then from call
graph the compiler and findout that if this task can execute parallel
or not (from MAX execution time and MIN start time)
NOW I want to biuld a compiler that can lex and parse a simple java
package (with a simple grammer, not all of java) and generate
intermediate code then extract call graphs , DFG and DDG then make
task and task graph
--
BEST REGARDS ""
SADEGH
|
|
|
|
|