Hi Peter, Just like described in the last mail, i was working for two point:
1. In the packages/bundles visualize figure, we can not see the detail packages info in each bundle. Now we can see the package name in packages visualize figure (just check the attach file Tomcat_Package.png), and we can see all the packages name in the bundles visualize figure(just check the attach file Tomcat_Bundles.png). And also, i improved the GUI functions, if we want to split an Java application to bundles, just right click the project, and click the menu item "Start Analyse Project OSGi Bundles", OSGiMaker will start the analyse and split progress. After this, if you want to see the visualize relationship picture between bundles, just right click the project, and click the menu item "Create Packages and Bundles Visualize class", it will create a class file( It is built based on JUNG) in the project's source file folder, we can just run it to check the relation between bundles, or we can change the class file as we like to improve it. (Just check the attach file How_To_Split_and_Show_relation.png to check the menu items) 2. According to the visualize result figure, i keep improving the split algorithm, now it has 8 rounds, and i think we get a *not bad* algorithm to do the split things. Basic prepare job: Treat each package cycle as a single bundle, treat each of the other packages as a single bundle. 1 round merge job: If one bundle's usesInternal are all in another bundle's classes, merge these two bundles. 2 round merge job: If two bundles are both only used by other bundles, and they are in one of the following condition: boolean condition4 = 4 * sameUB >= one.usedByList.size() + two.usedByList.size(); boolean condition5 = 3 * sameUE >= one.usedExternalList.size() + two.usedExternalList.size(); We can merge them 3 round merge job: If all the one bundle's usedBy attributes are in another bundle, just merge them 4 round merge job: If two bundles only use other bundles, but never used by other bundles, and they are in one of the following condition: boolean condition41 = 4 * sameUI >= one.usesInternalList.size() + two.usesInternalList.size() && (sameUI >= one.usesInternalList.size() || sameUI >= two.usesInternalList.size()); boolean condition42 = 3 * sameUI >= one.usesInternalList.size() + two.usesInternalList.size(); boolean condition5 = 3 * sameUE >= one.usedExternalList.size() + two.usedExternalList.size(); We can merge them 5 round merge job: For any two bundles, if they are in one of the following conditions: boolean condition1 = 2 * uiNumber >= one.usesInternalList.size() + two.usesInternalList.size(); boolean condition2 = 2 * ubNumber >= one.usedByList.size() + two.usedByList.size() && oneUseTwo && twoUseOne; boolean condition3 = 3 * sameUI >= one.usesInternalList.size() + two.usesInternalList.size(); boolean condition4 = 3 * sameUB >= one.usedByList.size() + two.usedByList.size(); boolean condition5 = 3 * sameUE >= one.usedExternalList.size() + two.usedExternalList.size(); We can merge them 6 round merge job: According to analyse and split result, there will be some bundles which was used by only one bundle and use only one bundle too, usually, this bundle should be merged with the bundle which was used by it. 7 round merge job: If two bundles have same son bundle list or have same father bundle list, we should merge them. 8 round merge job: If one bundle has only a few packages (less than 2 percents of all the packages number of the whole project) and it has no son/father bundles, we can merge it with its father/son bundle. If you are interested, you can check the source code to get the detail of the whole split alogirthm. 2011/8/19 Peter Kriens <[email protected]>: > But what's happening? Not heard a lot of you lately? > > Kind regards, > > Peter Kriens > > On 19 aug 2011, at 05:28, Tiger Gui wrote: > >> Hi Peter, >> >> As GSoC's deadline is coming in a few days, in the past week, i am >> working for two points: >> >> 1. improve project split algorithm round and round according to >> visualize split result, now we got a relatively stable version. Now >> the whole progress has 8 round merge job. >> 2. improve the visualize job, add classes info for each bundle node. >> >> I will supply a document about the current status of our project for >> the final review in the coming 2 - 3 days. Thank you >> >> >> 2011/7/13 Tiger Gui <[email protected]>: >>> As you described in previous email, my current job is realize the >>> following algorithm: >>> >>> 1. Group packages that are strongly connected >>> 2. Start with the largest group and try to merge groups into it that >>> do not cause additional dependencies >>> 3. repeat for all groups >>> >>> and meanwhile refer to the three principle, once it is done. i will >>> report you the result and discuss the next step >>> -- Best Regards ---------------------------------------------------- Tiger Gui [[email protected]] -- Best Regards ---------------------------------------------------- Tiger Gui [[email protected]]
