benchmarking,reverse,engineering,tools, and,...

19
Benchmarking Reverse Engineering Tools and Using Tool Output for Further Analysis David Cu@ng and Joost Noppen University of East Anglia david.cu@ng@uea.ac.uk, [email protected] David Cu@ng; University of East Anglia, Norfolk, UK 1

Upload: others

Post on 30-Sep-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Benchmarking  Reverse  Engineering  Tools  and  

Using  Tool  Output  for  Further  Analysis  

David  Cu@ng  and  Joost  Noppen  University  of  East  Anglia    

david.cu@[email protected],  [email protected]  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   1  

Page 2: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

PresentaKon  Outline  

•  IntroducKon  to  Traceability  Forensics  Project    •  Benchmarking  of  Reverse  Engineering    •  Working  Further  with  Reverse  Engineering  Output  for  Analysis  and  Comparison  

•  Next  Steps  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   2  

Page 3: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Traceability  Forensics  Project  

•  We  aim  to  recover  traceability  links  

•  Using  par1al  or  missing  documenta1on  

•  Along  with  other  informaKon  sources:  – Source  Code  – SemanKc  Analysis  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   3  

Page 4: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Reverse  Engineering  

•  One  of  the  main  sources  of  informaKon  about  soUware  is  the  soUware  itself  

•  Reverse  engineering  offers  a  powerful  tool  for  program  comprehension  

•  There  are  a  lot  of  reverse  engineering  tools  but…  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   4  

Page 5: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Reverse  Engineering  Tools  

•  Although  there  are  many  tools  they  – Vary  in  output  (which  is  right,  which  is  wrong?)  – Have  no  standard  means  of  comparison  

•  This  is  org.jhotdraw.io  from  RaKonal  Rhapsody:  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   5  

Page 6: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Reverse  Engineering  Tools  

•  org.jhotdraw.io  from  Astah  Professional:  

•  org.jhotdraw.io  from  ArgoUML:  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   6  

Page 7: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

The  Benchmark  

•  To  compare  and  rank  different  tools  we  created  a  benchmark  (the  Reverse  Engineering  to  Design  Benchmark:  RED-­‐BM)  

•  16  target  arKfacts  – Varying  from  100  to  40,000  lines  of  code  – From  7  to  450  classes  – Range  of  architecture  styles  and  complexity  – “Gold  standard”  for  each  in  terms  of  contained  classes  and  sampled  relaKonships  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   7  

Page 8: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

The  Benchmark  

•  ExisKng  designs  where  available  •  Reverse  engineering  output  from  other  tools  for  comparison  

•  IniKal  measures  for  class  detecKon,  packages,  and  relaKonships:  

 For  arKfact  x:  C(x)  is  the  raKo  of  correct  classes,  S(x)  raKo  of  correct  packages  and  Rel(x)  raKo  of  correct  relaKonships  in  system  s  for  result  r  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   8  

Cl(s, r) = C(r)C(s)

,Sub(s, r) = S(r)S(s)

,Re l(s, r) = R(r)R(s)

Page 9: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

The  Benchmark  •  Individual  measures  fed  into  weighted  Compound  Measure  (CM)  as  funcKon  P:  

   

•  Extensibility  –  exisKng  and  new  measures  can  be  combined  into  new  or  redefined  (refocused)  compound  measure  C:  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   9  

P(s, r) = wClCl(s, r)+wSubSub(s, r)+wRe l Re l(s, r)wCl +wSub +wRe l

C(s, r) =wiMi (s, r)

i=1

n

wii=1

n

Page 10: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Benchmark  Analysis  

•  We  ran  a  12  industry  reverse  engineering  tools  against  the  16  target  arKfacts  

•  We  then  compared  output  against  our  “Gold  Standard”  – Rather  than  doing  this  manually  we  used  the  XMI  output  from  tools  (more  on  this  later)  

•  What  we  found  was  quite  surprising…  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   10  

Page 11: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Benchmark  Results  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   11  

Page 12: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Key  Findings  

•  Wide  variance  in  performance  between  tools  (8.8%  to  100%)  

 •  RED-­‐BM  is  effecKve  at  differenKaKng  tool  performance  

 •  You  don’t  always  get  what  you  pay  for!  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   12  

Page 13: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Working  Further  With  Reverse  Engineering  Output  

•  Benchmarking  shows  clear  differences  but  we  want  to  be  able  to  use  output  from  reverse  engineering  for  further  use  – AggregaKon  of  output  (bringing  together  mulKple  imperfect  outputs)  

– CombinaKon  with  other  sources  of  informaKon  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   13  

Page 14: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

XML  Metadata  Interchange  (XMI)  

•  XMI  is  an  Object  Management  Group  (OMG)  Meta-­‐Object  Facility  (MOF)  for  exchange  of  Unified  Modeling  Language  (UML)  – So  XMI  =  OMG  MOF  UML  (OMG  is  right!)  

•  This  is  a  standard  but  one  offering  extensibility  on  many  levels  

•  So  effecKve  interchange  between  tools  is  presy  much  non-­‐existent    

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   14  

Page 15: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Working  with  XMI  

•  To  create  the  benchmark  we  wanted  to  be  able  to  analyse  XMI  rather  than  counKng  classes  by  hand  

•  This  entailed  the  creaKon  of  a  generic  XMI  class  finder  

•  In  turn  this  work  led  to  a  generic  XMI  parser  to  load  XMI  models  into  a  standard  format  in  memory  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   15  

Page 16: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Working  with  XMI  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   16  

Page 17: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

ReconstrucKon  from  XMI  

•  Using  UMLet  within  Eclipse  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   17  

Page 18: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Next  Steps  

•  Further  refine  XMI  parser/analyser  •  ConKnue  on  UMLet  Eclipse  integraKon  •  More  sources  of  informaKon:  – Source  Code  Repository  mining  – DocumentaKon  analysis  – Feeding  into  a  Reasoning  Component  

•  Base  case  soUware  library  for  example  including  architectural  styles  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   18  

Page 19: Benchmarking,Reverse,Engineering,Tools, and, …informatique.umons.ac.be/genlog/benevol2013/presentations... · 2013. 12. 16. · Benchmarking,Reverse,Engineering,Tools, and, Using,Tool,Outputfor,Further,Analysis,

Thank  You  

 Any  quesKons?  

   

Feel  free  to  email:  david.cu@[email protected]  

David  Cu@ng;  University  of  East  Anglia,  Norfolk,  UK   19