automated software transplantation
play

Automated Software Transplantation QRS 2016 Talk by Mark Harman - PowerPoint PPT Presentation

Automated Software Transplantation QRS 2016 Talk by Mark Harman PhD work by Alexandru Marginean Collaborators Earl Barr, Yue Jia, Justyna Petke CREST, University College London Automated Software Transplantation QRS 2016 Talk by Mark


  1. Automated Software Transplantation QRS 2016 Talk by Mark Harman PhD work by Alexandru Marginean Collaborators Earl Barr, Yue Jia, Justyna Petke CREST, University College London

  2. Automated Software Transplantation QRS 2016 Talk by Mark Harman PhD work by Alexandru Marginean Collaborators Earl Barr, Yue Jia, Justyna Petke CREST, University College London

  3. Why Autotransplantation? ~100 players Check open source repositories Why not handle Video Player H.264? Start from scratch

  4. Why Autotransplantation? Check open source repositories C Call Graph? Kate C Indentation? Start from scratch

  5. Recognition for � Our Tool μ Scalpel BBC World Service Interview � WIRED article � Many shares on Social Media � ACM Distinguished Paper Award at ISSTA ‘15

  6. Related Work Manual Code Transplants In-Situ Code Reusal Dependence Clone Detection Code Migration Analysis Feature Feature Location Code Salvaging Extraction Automatic Error Fixing Autotransplantation Synchronising Automatic In-Situ Code Manual Replay Copy- Reuse Transplants Paste

  7. Related Work Miles et al.: In situ reuse of logically extracted functional components In-Situ Code Reusal Manual Code Transplants Debugger Binary Automatic Error Fixing Autotransplantation Organ Running Program

  8. Related Work Sidiroglou-Douskos et al.: Automatic Error Elimination by Multi-Application Code Transfer Automatic Error Fixing Manual Code Transplants In-Situ Code Reusal Host Donors Autotransplantation

  9. Related Work Autotransplantation Manual Code Transplants In-Situ Code Reusal Automatic Error Fixing

  10. Human Organ Transplantation

  11. Automated Software Transplantation Donor � ENTRY � Manual Work: � V � Organ Entry Organ Organ � � Organ Test Organ’s Test Suite Suite � Host � � Implantation Implantation Point Point

  12. μ Trans Host Implantation Point Stage 2: Stage 3: Stage 1: Genetic Organ Static Analysis Programming Implantation Donor Organ Entry Organ Test Host Suite Beneficiary

  13. Stage 1 — Static Analysis Donor Organ Vein ENTRY OE Host Implantation Matching Dependency Point Table Graph Donor: int X -> Host: int A, B, C Stm: x = 10; -> Decl: int x;

  14. Stage 2 — GP Individual S 1 S 2 S 3 S 4 S 5 … S n Matching V 1H M 1 : V 1D Var M 2 : V 4H V 2D Stateme Genetic nts S 1 S 7 S 73 … Programming Matching Table � Donor Host Variable Week � Strong � Variable ID ID (set) Proxies Proxies V 1H V 2H V 1D Fitness Function: V 3H V 4H V 5H V 2D Compilation …

  15. Stage 2 - Gp Operators Individual Matching Matching Table V 1H M 1 : V 1D Var � Donor Host Variable Replace M 2 : V 4H V 2D Variable ID ID (set) Mapping V 1H V 2H V 2H Stateme V 1D nts S 1 S 7 S 73 …

  16. Stage 2 - Gp Operators Individual Matching V 1H M 1 : V 1D Var Replace M 2 : V 4H V 2D S 1 S 2 S 3 S 4 S 5 … S n S 3 Statement Stateme nts S 7 S 1 S 7 S 73 …

  17. Stage 2 - Gp Operators Individual Matching V 1H M 1 : V 1D Var Remove M 2 : V 4H V 2D S 1 S 2 S 3 S 4 S 5 … S n Statement Stateme nts S 1 S 7 S 73 …

  18. Stage 2 - Gp Operators Individual Matching V 1H M 1 : V 1D Var Add M 2 : V 4H V 2D S 1 S 2 S 3 S 4 S 5 … S n S 3 Statement Stateme nts S 1 S 7 S 73 …

  19. Stage 2 - Gp Operators Offspring 1 Individual 1 M 1 M 2 M 2 M 1 M 2 S 1 S 1 S 7 S 7 S 1 S 7 Offspring 2 Crossover Operator Individual 2 M 3 M 4 M 3 M 3 M 4 Offspring 3 S 3 S 3 S 9 S 9 S 3 S 9 Random Mapping Selection

  20. Research Questions Acceptance Tests Regression Tests Donor Host Organ RQ1: Do we break the initial RQ2: Have we really added RQ4: Is autotransplantation RQ3: How about the computational effort? new functionality? functionality? useful?

  21. Research Questions RQ1: Do we break the initial RQ2: Have we really added functionality? new functionality? Empirical Study Case Studies: � � 15 Transplantations H.264 Encoding 300 Runs Transplantation; 5 Donors Kate - call graph generation 3 Hosts & C indentation; RQ3: How about the RQ4: Is autotransplantation computational effort? useful?

  22. Validation Donor Regression Acceptance Tests Tests Augmented Acceptance Regression Tests Tests RQ1.1 RQ1.2 RQ2 Host Manual Beneficiary Validation

  23. � � � � � � � � � � � � � � � � � � � � � � Subjects � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � Size Reg. Organ Subjects Type KLOC Tests Tests Idct Donor 2.3 - 3-5 Mytar Donor 0.4 - 4 Minimal size: 0.4k Cflow Donor 25 - 6-20 Webserver Donor 1.7 - 3 TuxCrypt Donor 2.7 - 4-5 Max size: 422k Pidgin Host 363 88 - Cflow Host 25 21 - Average Donor:16k SoX Host 43 157 - Case Study VLC Host 422 27 - Average Host: 213k Kate Host 50 238 - x264 Donor 63 - 5 Cflow Donor 22 - 13 Indent Donor 26 - 7

  24. Experimental Methodology Count LOC — Count LOC and Setup CLOC CLOC Host Donor � � Organ Test Implantation OE Suite Point Validation Test x 20 Suites � GNU Time Coverage Information: Gcov 64 bit Ubuntu 14.10 Host μ S CALPEL Beneficiary 16 GB RAM Implantation Point 8 threads Organ

  25. Empirical Study � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � RQ1,2 � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � All Passed Regression++ Acceptance Donor Host All Passed Regression Regression Regression++ Acceptance Idct Pidgin 16 20 17 16 Mytar Pidgin 16 20 18 20 Web Pidgin 0 20 0 18 Cflow Pidgin 15 20 15 16 Tux Pidgin 15 20 17 16 Idct Cflow 16 17 16 16 Mytar Cflow 17 17 17 20 Web Cflow 0 0 0 17 Cflow Cflow 20 20 20 20 Tux Cflow 14 15 14 16 Idct SoX 15 18 17 16 Mytar SoX 17 17 17 20 Web SoX 0 0 0 17 Cflow SoX 14 16 15 14 Tux SoX 13 13 13 14 TOTAL 188/300 188/300 233/300 233/300 196/300 196/300 256/300 256/300 Alexandru Marginean — Automated Software Transplantation RQ1.1 RQ1.1 RQ1.2 RQ2 RQ2 RQ1.2

  26. � � � � � � Empirical Study � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � RQ3 � � � � � Execution Time (minutes) Average Total Donor Host Std. Dev. Idct Pidgin 5 7 97 Mytar Pidgin 3 1 65 Web Pidgin 8 5 160 Cflow Pidgin 58 16 1151 Tux Pidgin 29 10 574 Idct Cflow 3 5 59 Mytar Cflow 3 1 53 Web Cflow 5 2 102 Cflow Cflow 44 9 872 Tux Cflow 31 11 623 Idct SoX 12 17 233 Mytar SoX 3 1 60 Web SoX 7 3 132 Cflow SoX 89 53 74 Tux SoX 34 13 94 334 (min) 10 (Average) Total 72 (hours) Alexandru Marginean — Automated Software Transplantation

  27. � � � Case Study � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � VLC � � � � � � � � � � � � � � � � � � � � � � � � � � Transplant Time & Test Suites Time (hours) Regression Regression++ Acceptance H.264 26 1 1 1 VLC H264

  28. Case Study - Kate Organ Test Organ Test All Passed Regression Regression++ Acceptance Donor Host All Passed Regression Regression++ Acceptance Suite Suite Cflow Kate 16 18 20 17 18 Indent Kate 18 19 20 18 19 TOTAL 34/40 34/40 37/40 37/40 40/40 40/40 35/40 37/40 35/40 37/40 All Passed RQ1.1 RQ1.2 RQ2 All Passed — — RQ1.1 RQ1.2 RQ2 Execution Time (minutes) Donor Host Average (min) Std. Dev. (min) Total (hours) Average (min) Std. Dev. (min) Total (hours) Cflow Kate 101 31 33 Indent Kate 31 6 11 Total 132 132 18.5 18.5 44 44

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend