Project Plan for DemJava Class Graph Reverse Engineering
Toby Elliott
Inception Phase
Complete a set of visitors that traverse a set of Java classes (using the class dictionary previously built by Binoy Samuel) and produce a class dictionary overview of these Java classes.
Elaboration Phase - Risk Assessment
Requirements Risks
-
Requirements are minimal. Class graphs contain a standard syntax which is clearly delineated and accepted. Expected final output is expected to be consistent with this syntax.
Technological Risks
-
The .cd file is already implemented. It has not been extensively tested by me and may not work across all cases. Additionally, the way that parts of it are structured may make the intended traversals difficult.
Skills Risks
-
My limited exposure to both Demeter and Java may pose problems in exploiting lesser-known coding tricks to get the program completed, as well as generally slowing the development process.
Political Risks
-
This project should be free of political risks, save from those who might not wish to see their class graphs clearly laid out...
Use Case Analysis
Only one use case is intended under project inception; others may be added at a later date.
Reverse engineering of a class graph can be broken up into 3 sections (and one subsection). All sections are essential in order for the process to be of any use:
- Reverse Engineering of Construction Nodes
These nodes contain 0..N objects. The system will read them in and print them out in the appropriate notation.
Subsection: Some objects contained within a node may be optional. A stage of the process will be to recognize optional nodes.
- Reverse Engineering of Alternation Nodes
These nodes are abstract classes, made up of a choice of several subclasses. The system will read them in and print them out in the appropriate notation.
- Reverse Engineering of Repetition Nodes
These nodes represent a list of 0..N of the same node. The system will read them in and print them out in the appropriate notation.
Planning
This product will be done in four stages:
Construction
Construction Visitors: -> UnmodifiedClassDeclaration
-> CBD_FieldDeclaration
-> VariableDeclarators
Alternation Visitors: -> UnmodifiedClassDeclaration
-> Ident
Repetition Visitors: -> UnmodifiedClassDeclaration
-> FieldDeclaration
-> Type
-> VariableDeclarators
Construction Nodes may be reverse-engineered by examining the class fields. Alternation Nodes may be reverse engineered by examining the names of classes that extend the Alternation Node. Repetition Visitors may be reverse engineered by looking for instances of lists (Vectors) in the class parameters.
Optional parameters can be determined by comparing the list of fields in a class with constructors for that class. It is not clear at this time how reliable this method may be.