Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Data flow analysis in JDT compiler(Searching for information or documents about Dataflow analysis used in the JDT compiler)
Data flow analysis in JDT compiler [message #1015282] Thu, 28 February 2013 03:15 Go to next message
Gabriel Knight is currently offline Gabriel KnightFriend
Messages: 1
Registered: February 2013
Junior Member
Hi everyone!

I'm looking for information about data flow analysis used by the JDT compiler.
Especially which different data flow analysis are used in the compiler and how they are working.
I know that most data flow stuff (e.g. optimizations) is done by the JVM and not by the sourcecode -> bytecode compiler but the Eclipse compiler is also able to give information about dead code for example.

Is there any documentation about what data flow techniques are used in JDT and how they are working?

Haven't found something about that.

Thanks and Greetings,

Re: Data flow analysis in JDT compiler [message #1015377 is a reply to message #1015282] Thu, 28 February 2013 12:22 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1602
Registered: July 2009
Senior Member
What analysis is performed, can best be seen from this list of warning options:
Some of these operate at the level of type resolution but some do involve flow analysis. Some flow analysis is mandatory as per the JLS, other is specific to ECJ. Aside from the mandatory definite-assignment analysis the most sophisticated flow analysis is for detecting null dereferences, but, e.g., also the detection of (potential) resource leaks involves flow analysis.

Only few of these analyses are geared towards optimization (e.g., elimination of unused local variables), most relate in fact to the detection of potential programming problems.

If you want to learn how this analysis works, the point of reference is the source code.
The central infra structure for this can be found in

The details are implemented in analyseCode methods throughout all classes of the AST.

Previous Topic:jardesc root folder
Next Topic:Getting commit data for eclipse.jdt.core for bug analysis
Goto Forum:

Current Time: Wed Jun 20 17:34:57 GMT 2018

Powered by FUDForum. Page generated in 0.01874 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top