Exploring the Limits of Domain Model Recovery Paul - - PowerPoint PPT Presentation

exploring the limits of domain model recovery
SMART_READER_LITE
LIVE PREVIEW

Exploring the Limits of Domain Model Recovery Paul - - PowerPoint PPT Presentation

Exploring the Limits of Domain Model Recovery Paul Klint, Davy Landman , Jurgen Vinju 1 Re-engineering Re-design of an exis9ng system


slide-1
SLIDE 1

Exploring ¡the ¡Limits ¡of ¡ ¡ Domain ¡Model ¡Recovery ¡ ¡

Paul ¡Klint, ¡Davy ¡Landman, ¡Jurgen ¡Vinju ¡ ¡

1 ¡

slide-2
SLIDE 2

Re-­‑engineering ¡

  • Re-­‑design ¡of ¡an ¡exis9ng ¡system ¡
  • Designers ¡need ¡to ¡understand ¡the ¡Domain ¡
  • We ¡want ¡to ¡support ¡them! ¡

2 ¡

slide-3
SLIDE 3

Understanding ¡the ¡Domain ¡

  • Domain ¡Model: ¡ ¡

– En99es ¡ – Rela9ons ¡ ¡

  • Recovering ¡domain ¡models ¡from ¡the ¡source ¡

code ¡of ¡soHware ¡systems ¡in ¡the ¡domain ¡

3 ¡

slide-4
SLIDE 4

Motivation ¡

  • Skep9cal ¡about ¡this ¡recovery ¡
  • Difficult ¡for ¡legacy ¡systems ¡
  • Possible ¡for ¡new ¡systems ¡wriNen ¡in ¡new ¡languages? ¡

4 ¡

slide-5
SLIDE 5

Research ¡question ¡

How ¡much ¡of ¡the ¡domain ¡model ¡is ¡ recoverable ¡from ¡the ¡source ¡code? ¡

5 ¡

slide-6
SLIDE 6

Research ¡question ¡

How ¡much ¡of ¡the ¡domain ¡model ¡is ¡ recoverable ¡from ¡the ¡source ¡code? ¡

  • 1. Which ¡parts ¡of ¡the ¡domain ¡are ¡

implemented ¡by ¡the ¡applica9on? ¡

¡

  • 2. Can ¡we ¡manually ¡recover ¡a ¡domain ¡model ¡

from ¡source ¡code? ¡

Q ¡ Q ¡

6 ¡

slide-7
SLIDE 7

Why ¡manual? ¡

  • Interested ¡in ¡the ¡maximum ¡possible ¡
  • 100% ¡accuracy ¡=> ¡NO ¡tools ¡
  • Fact ¡finding ¡mission ¡

7 ¡

slide-8
SLIDE 8

Reference ¡ Model ¡ Source ¡ Model ¡ User ¡ Model ¡

Q1 ¡ Q2 ¡

8 ¡

Coverage ¡of ¡the ¡ domain ¡ Informa9on ¡from ¡ source ¡code ¡

slide-9
SLIDE 9

Research ¡method ¡

  • Pick ¡a ¡domain: ¡project ¡planning ¡
  • Obtain ¡a ¡reference ¡model: ¡Extract ¡from ¡PMBOK ¡
  • Manually ¡extract ¡models: ¡from ¡2 ¡applica:ons ¡
  • Map ¡& ¡Compare: ¡recall ¡& ¡precision ¡

9 ¡

slide-10
SLIDE 10

Traceability ¡

  • Full ¡accountability ¡ ¡
  • All ¡steps ¡are ¡fully ¡traced ¡
  • Internal ¡consistency ¡checks ¡/ ¡metrics ¡

10 ¡

slide-11
SLIDE 11

Project ¡Planning ¡

  • Project ¡Management ¡Ins9tute ¡
  • Project ¡Management ¡Body ¡of ¡

Knowledge ¡(476 ¡pages) ¡

  • Project ¡planning ¡is ¡a ¡subset! ¡

11 ¡

slide-12
SLIDE 12

Reference ¡Model ¡

12 ¡

p ¡136 ¡

slide-13
SLIDE 13

Reference ¡Model ¡

13 ¡

slide-14
SLIDE 14

Reference ¡Model ¡

14 ¡

slide-15
SLIDE 15

Applications ¡

  • 2 ¡open ¡source ¡applica9ons ¡(out ¡of ¡10) ¡
  • “Op9mal” ¡condi9ons ¡

System ¡ Language ¡ SLOC ¡ Endeavour ¡ Java ¡ 18.358 ¡ OpenPM ¡ Java ¡ 17.756 ¡

15 ¡

slide-16
SLIDE 16

User ¡Model ¡

16 ¡

slide-17
SLIDE 17

Source ¡Model ¡

model/org/endeavour/mgmt/model/Project.java ¡

43: ¡private ¡List<Iteration> ¡iterations ¡= ¡null; ¡

17 ¡

slide-18
SLIDE 18

Models, ¡Models, ¡Models! ¡

18 ¡

slide-19
SLIDE 19

Models, ¡Models, ¡Models! ¡

19 ¡

Model ¡ Effort ¡ Reference ¡Model ¡ 80 ¡Days ¡ 2 ¡User ¡Models ¡ 4 ¡Days ¡ 2 ¡Source ¡Models ¡ 30 ¡Days ¡

slide-20
SLIDE 20

Reference ¡ Model ¡ Source ¡ Model ¡ User ¡ Model ¡

20 ¡

PMI ¡Vocabulary ¡ Programmer ¡ Vocabulary ¡ End ¡User ¡ Vocabulary ¡

slide-21
SLIDE 21

Reference ¡ Model ¡ Source ¡ Model ¡ User ¡ Model ¡

21 ¡

PMI ¡Vocabulary ¡ Programmer ¡ Vocabulary ¡ End ¡User ¡ Vocabulary ¡ Mapping ¡ Mapping ¡

slide-22
SLIDE 22

Mapping ¡

From: ¡Itera9on ¡ To: ¡Milestone ¡ Kind: ¡Specializa9on ¡ Reason: ¡Itera9ons ¡split ¡the ¡project ¡into ¡ chunks ¡of ¡work, ¡Milestones ¡do ¡the ¡same ¡ but ¡are ¡not ¡necessarily ¡itera9ve. ¡ ¡

22 ¡

User ¡Model ¡onto ¡Reference ¡Model ¡

slide-23
SLIDE 23

Q1: ¡Which ¡parts ¡of ¡the ¡domain ¡are ¡ implemented ¡by ¡the ¡applica9on? ¡

Endeavour ¡ OpenPM ¡ Combined ¡ Recall ¡ 19% ¡ 7% ¡ 22% ¡ Precision ¡ 91% ¡ 36% ¡ 40% ¡

Only ¡a ¡small ¡part ¡

(precision ¡varies) ¡

23 ¡

Answer: ¡

User ¡ Model ¡ Reference ¡ Model ¡

slide-24
SLIDE 24

Q2: ¡Can ¡we ¡manually ¡recover ¡a ¡domain ¡ model ¡from ¡source ¡code? ¡

Yes, ¡100% ¡ ¡

(with ¡high ¡precision) ¡

Endeavour ¡ OpenPM ¡ Recall ¡ 100% ¡ 100% ¡ Precision ¡ 92% ¡ 79% ¡

24 ¡

Answer: ¡

Source ¡ Model ¡ User ¡ Model ¡

slide-25
SLIDE 25

Summary ¡

  • Project ¡Planning ¡Reference ¡Model1 ¡
  • Created ¡10 ¡models ¡
  • Small ¡coverage ¡of ¡the ¡Domain ¡
  • However, ¡not ¡a ¡lot ¡of ¡“junk” ¡in ¡source ¡code ¡
  • Everything ¡available ¡online1 ¡

1 ¡http://homepage.cwi.nl/~landman/icsm2013/ ¡

25 ¡

slide-26
SLIDE 26

Conclusion ¡

  • Modern ¡soHware ¡systems ¡contain ¡recoverable ¡

domain ¡knowledge ¡

  • Good ¡news ¡for ¡Automated ¡Reverse ¡Engineering ¡

26 ¡