Dimensions of Knowledge in API Migration Thiago Bartolomei, Mahdi - - PowerPoint PPT Presentation

dimensions of knowledge in
SMART_READER_LITE
LIVE PREVIEW

Dimensions of Knowledge in API Migration Thiago Bartolomei, Mahdi - - PowerPoint PPT Presentation

Combining Multiple Dimensions of Knowledge in API Migration Thiago Bartolomei, Mahdi Derakhshanmanesh, Andreas Fuhr, Peter Koch, Mathias Konrath, Ralf Lmmel, Heiko Winnebeck Contribution of this presentation Present a framework combining


slide-1
SLIDE 1

Combining Multiple Dimensions of Knowledge in API Migration

Thiago Bartolomei, Mahdi Derakhshanmanesh, Andreas Fuhr, Peter Koch, Mathias Konrath, Ralf Lämmel, Heiko Winnebeck

slide-2
SLIDE 2

Contribution of this presentation

Present a framework combining multiple dimensions of knowledge to support API migration.

2

slide-3
SLIDE 3

API Migration

  • Special case of software migration
  • Adapt software system to

– replace old API (source API) by – new API (target API) – of the same domain (e.g., GUI development)

3

slide-4
SLIDE 4

Why API Migration?

  • Legacy APIs may be

– outdated, not supported anymore

  • New APIs may provide

– new features – better performance, reliability, usability, … – support for new system environments

4

slide-5
SLIDE 5

Why API Migration: Example

5

SwingWT

  • Style

Swing SWT

slide-6
SLIDE 6

Why API Migration: Example

6

Swing SWT

SWTSwing

  • Compability
slide-7
SLIDE 7

API Migration Approaches

7

?

slide-8
SLIDE 8

API Migration: Reeimplentation

8

slide-9
SLIDE 9

API Migration: Transformation

9

slide-10
SLIDE 10

API Migration: Wrapping

10

slide-11
SLIDE 11

Roadmap

  • Integrated Repository

– Multiple dimensions of knowledge

  • Wrapper Assessment

– How to rate wrappers on their suitability?

  • Guidance for Migration

– How to extend/write own wrappers/transformations?

11

slide-12
SLIDE 12

INTEGRATED REPOSITORY

12

slide-13
SLIDE 13

Metamodel

  • Simplified Java

sources

  • API Usage properties
  • f 1476 SourceForge

projects

  • Ontology on API

concepts

13

slide-14
SLIDE 14

Repository Technology: TGraphs

14

slide-15
SLIDE 15

Repository Technology: Graph Querying with GReQL

from clsApi: V{Class} with clsApi.qualifiedName =~ “javax\.swing\..*" and count(clsApi-->{CorrespondsTo}) > 0 reportSet clsApi end

slide-16
SLIDE 16

WRAPPER ASSESSMENT

16

slide-17
SLIDE 17

Wrapper Assessment: Goals

  • Compare different wrappers for same

wrapping task

  • Track development of own wrappers

17

slide-18
SLIDE 18

Wrapper Assessment: Source API Coverage

SwingWT

25 533 4533 7 2331 12506 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Packages Classes Methods Implemented Unimplemented

SWTSwing

16 372 3426 15 281 4618 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Packages Classes Methods Implemented Unimplemented

18

slide-19
SLIDE 19

Wrapper Assessment: Wrapper Compliance

  • Simple coverage statistics do not cover

more complex dependencies

– Declarations in supertypes – Empty implementations

  • Simple covarage does not reflect usage of

APIs in real projects

19

slide-20
SLIDE 20

Compliance: Declarations on supertypes

SwingWT

74% 22% 4%

Missing methods

Class missing Class present

  • Impl. in supertype

SWTSwing

20

78% 19% 3%

Missing methods

Class missing Class present

  • Impl. in supertype
slide-21
SLIDE 21

Compliance: Empty methods

SwingWT SWTSwing

21

78% 22%

Implemented Methods

  • Impl. methods

Empty methods 93% 7%

Implemented Methods

  • Impl. methods

Empty methods

slide-22
SLIDE 22

Wrapper Assessment: Relevance in Terms of Usage

SwingWT

26,6% 97,1% 73,4% 2,9% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Absolute Usage Implemented Unimplemented

SWTSwing

22

42,6% 97,7% 57,4% 2,4% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Absolute Usage Implemented Unimplemented

slide-23
SLIDE 23

GUIDANCE FOR MIGRATION

23

slide-24
SLIDE 24

Guidance for Migration: Goals

  • Extend existing wrappers
  • Write own wrappers / reimplementations /

transformations  Identify target API code suited to implement source API methods

24

slide-25
SLIDE 25

Guidance for Migration: Concept-based Method Candidates

25

slide-26
SLIDE 26

Guidance for Migration: Assessment of the Ontology

SwingWT

10,8% 28,1% 89,2% 71,9% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

  • Unimpl. meth.
  • Impl. meth.

With link Without link

SWTSwing

26

0,3% 25,0% 99,7% 75,0% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

  • Unimpl. meth.
  • Impl. meth.

With link Without link

slide-27
SLIDE 27

Guidance for Migration: Ontology Correctness

SwingWT

43% 57%

Methods with Links

Correct link Wrong link

SWTSwing

27

37% 63%

Methods with Links

Correct link Wrong link

slide-28
SLIDE 28

THANK YOU FOR LISTENING!

Integrated Repository

QUESTIONS?