GSOC 2012/Student Application charindu100/Java API/ABI changes checker

=Replace with your actual long proposal name=

Proposal Description
Please describe your proposal in detail. Include:

An overview of your proposal
When packaging and when upgrading packages the dependency between libraries are really important. Since the Fedora projects’ main intension is towards rpm packaging such kind of customized tool is important.In my summer project I am looking forward to implement a tool and it will be developed using Java, but this is not a development from the scratch. More details on implementation can be found at the later topic.

The tool takes .class. .jar and rpm packages as the input. Then the tool investigates dependencies with in those files. The result is stored. Later same process will be repeated to get the dependencies with the new library. Then compare two dependency report will indicate whether there is any mismatching or alternation. The packager may or may not be the one who created the rpm with the early library therefore this tool read the existing rpm package and determine the connection between class on the package.Removal and modification of methods would cause problems when upgrading therefore if the two libraries are available, using the tool it is possible to check the difference between versions of the libraries. It outputs the differences specially when methods are removed and modified.

The result can be stored (planning to us MySql) for future references.Stored result can be accessed via an web interface. Further this tool can be used in command line interface and GUI as well. The usage of this tool is though the command line and the GUI.

The need you believe it fulfills
Members of Java SIG team in Fedora project will get the advantage of using this tool to check the dependencies related with the packages they package specially when they want to upgrade the package with a new library and package it.

Any relevant experience you have
I hacked FindBug (http://findbugs.sourceforge.net/) for my university project last year therefore I have a good understanding on Java basics such as OO principals. I have learnt about compilers as a subject of my degree, such as lexical analysis(lexer), syntax analysis(parser) etc. Further I am using Java as my main development language since 2008, my first year at the university.

How do you intend to implement your proposal
Java will be the main language for the development for this tool. The advantage is with no support of other languages, (other than Java) packagers can use this tool.As noted the solution will not be developed from the scratch.There are main three sections in the project.

1. Read .class, .jar and rpm packages and retrieve the dependencies - .jar contains set of .class files which are in compiled form therefore to read .class files depfind library[1] will be used. To read and retrieve information related with rpm packages Redline-rpm library[2] will be used.

2. Analyze retrieved dependencies and prioritize them. – Dependencies with the earlier library will be compared with the newer libraries dependencies. If there is any missing or altered dependency on the newer library then the error will be generated. The most critical error would be the missing methods.

Then changes of methods are evaluated (such as change of argument list, data types).If only two libraries are provided to analyze then the dependency information will be used to list all the removed, changed and added dependencies. This will be useful when the packager has the source code of the original program so that he can adjust things.

3. Store, display the information about critical situations where dependencies are broken.Once the analysis is finished the result will be displayed and stored in xml format for future references.

[1] http://depfind.sourceforge.net/

[2] http://code.google.com/p/redline-rpm/

Final deliverable of the proposal at the end of the period
A rpm package of the tool developed.

A rough timeline for your progress
April 7- April 23: Fine tune the solution and study how depFind library works.

April 23 – May 21: Complete the first section, integrate depFind and develop the tool.

Deliverable : Tool that can read and retrieve the dependencies in set of .class files.

May 21 – July 2 : Complete the second section, tool should be able to analyze the retrieved information at the first step.

Deliverable : Tool that can be analyzed two libraries and list dependencies (remove, changed, add of methods). If things goes well I ll try to finish the section 2, which is analyze the dependencies fully.

Mid-Term Evaluation: Above mentioned deliverable should be available.

July 13- July 20 : Develop the third part where the displaying and storing of the analysis and retrieved dependency information in xml format.

July 20 - August 13 : Add rpm package reading support and make sure the system respond to .class, .jar and rpm packages. Create a simple GUI and web-interface which can be used to access the stored dependency informations.

August 13- August 20 : Package the tool and submit the tool.

Any other details you feel we should consider
After the GSoC program I am planning to use Redline-rpm library and develop a wizard that helps the packager to package the application when the rpm package for the earlier library is available. I dont add this to the time line as I am not sure whether the given time is adequate, if things go well I ll start developing this section before the pencil down date. But it is a bonus and should not consider for evaluation.

Have you communicated with a potential mentor? If so, who?
The mentor of this project, Stanislav Ochotnický