Upload
hamed-moghimi
View
224
Download
1
Tags:
Embed Size (px)
DESCRIPTION
A summery presentation for "Mining API mapping for language migration" scientific paper
Citation preview
PowerPoint Presentation
Mining API Mapping for Language MigrationSeyed Hamed MoghimiSharif University of TechnologyData Mining - Fall 2014
Based on Zhong, Hao, et al. "Mining API mapping for language migration."Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering-Volume 1. ACM, 2010.
22ContentsIntroduction and Definitions
Proposed Approach
Evaluation and Conclusion
1
22
1
IntroductionMany well-known projects provide multiple versions in different languages.To address business requirements and survive in competing marketing For example: Lucene and WordNetManual migration is tedious and error-prone.For example: Java to C# and vice versaSome approaches and tools exist.For example: Java2CSharpBut tools are limited to a subset of language APIBecause of large number of APIs2
22
2
Problem and SolutionThe problem is to implement a tool for automatic migration from a language to another.The solution is based on mining client codes which have two versions in source and destination languageWhy client codes instead of API codes?API source codes dont always exist.API implementations have one point of analysis whereas API usage may have multiple points for miningMapping relations are often complex.
3
22Definitions4
22ContentsIntroduction and Definitions
Proposed Approach
Evaluation and Conclusion
5
22
5
Lets Look at an example6
22Proposed ApproachMAM (Mining API Mapping) steps:Align Client CodeMapping API ClassesMapping API Methods
7
221. Aligning Client CodeProcess two code versions and find class and method pairs which have similar functionality. Using name similarities.Between classes and methods defined in client code.Using Levenstein measure by SimMetrics.
8
22Aligning Client Codes (Example)9
222. Mapping API Classes10
22Mapping API Classes (Example)11
223. Mapping API MethodsThis step includes three major works:Introducing ATG for modeling dependenciesBuilding an ATG for each client codeComparing ATGs and find mapping relations12
22API Transformation Graph13
22Building sub graphs of an ATG14
22Building complete ATGs15
22Comparing ATGsAt last we need to compare two built ATGs to mine mapping relations.The mapping relations should satisfy these criteria:The mapped API methods implement the same functionality.The mapping relation describes the relation between parameters and receivers of mapped API methods.The mapping relation describes the relation between returns of mapped API methods16
2217
Returns set of all similar variablesReturns next methodof variable
Merges current method withNext method to create anIntermediate merged method
22Comparing ATGs Example18
Mapped?
NO!
Mapped?YES!
22ContentsIntroduction and Definitions
Proposed Approach
Evaluation and Conclusion
19
22
19
EvaluationsSubjects are 15 open source project in both Java and C# languages.
20
22Evaluations (cont.)Results of comparison between MAM and manually written relations
21
22ConclusionA novel approach to Mine mapping relations of APIsFrom existing projects with multiple versionsEvaluated on projects written in Java and C#Better results than existing tool Java2CSharp
But Only evaluated on Java and C#Which are very similar in syntax and API22
22Thanks For YourAttentionIf there are any questions?
22