Automated Software Transplantation Earl T. Mark Yue Alexandru - - PowerPoint PPT Presentation

automated software transplantation
SMART_READER_LITE
LIVE PREVIEW

Automated Software Transplantation Earl T. Mark Yue Alexandru - - PowerPoint PPT Presentation

Automated Software Transplantation Earl T. Mark Yue Alexandru Justyna Barr Harman Jia Marginean Petke CREST, University College London Alexandru Marginean Automated Software Transplantation Humies 2016 Why Autotransplantation?


slide-1
SLIDE 1

Automated Software Transplantation

Alexandru Marginean — Automated Software Transplantation — Humies 2016

CREST, University College London Earl T. Barr Mark Harman Yue Jia Justyna Petke Alexandru Marginean

slide-2
SLIDE 2

VLC

Why Autotransplantation?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-3
SLIDE 3

VLC

Why Autotransplantation?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-4
SLIDE 4

VLC

Why Autotransplantation?

Why not handle H.264?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-5
SLIDE 5

VLC

Why Autotransplantation?

Why not handle H.264?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-6
SLIDE 6

VLC

Why Autotransplantation?

Why not handle H.264?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-7
SLIDE 7

VLC Start from scratch

Why Autotransplantation?

Why not handle H.264?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-8
SLIDE 8

VLC Start from scratch

Why Autotransplantation?

Why not handle H.264?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-9
SLIDE 9

VLC Start from scratch

Why Autotransplantation?

Check open source repositories Why not handle H.264?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-10
SLIDE 10

VLC Start from scratch

Why Autotransplantation?

Check open source repositories Why not handle H.264?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-11
SLIDE 11

VLC Start from scratch

Why Autotransplantation?

Check open source repositories Why not handle H.264?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-12
SLIDE 12

VLC Start from scratch

Why Autotransplantation?

Check open source repositories Why not handle H.264?

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-13
SLIDE 13

VLC Start from scratch

Why Autotransplantation?

Check open source repositories Why not handle H.264? ~100 players

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-14
SLIDE 14

(G) The result solves a problem of indisputable difficulty in its field.

slide-15
SLIDE 15

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile();

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-16
SLIDE 16

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile();

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-17
SLIDE 17

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile();

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-18
SLIDE 18

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile();

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-19
SLIDE 19

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile(); Stream *ds = decodeFile(iF); encodeStream(ds, oF);

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-20
SLIDE 20

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile(); Stream *ds = decodeFile(iF); encodeStream(ds, oF);

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-21
SLIDE 21

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile(); Stream *ds = decodeFile(iF); encodeStream(ds, oF);

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-22
SLIDE 22

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile(); Stream *ds = decodeFile(iF); encodeStream(ds, oF);

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-23
SLIDE 23

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile(); iF = getFile(); initCodec(iF); Stream *ds = decodeFile(iF); encodeStream(ds, oF);

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-24
SLIDE 24

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile(); iF = getFile(); initCodec(iF); Stream *ds = decodeFile(iF); encodeStream(ds, oF);

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-25
SLIDE 25

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile(); iF = getFile(); initCodec(iF); Stream *ds = decodeFile(iF); encodeStream(ds, oF);

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-26
SLIDE 26

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile(); iF = getFile(); initCodec(iF); Stream *ds = decodeFile(iF); encodeStream(ds, oF);

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-27
SLIDE 27

Human Competition

char *vF; vF = getFile(); initCodec(vF); Stream *ds = decodeFile(vF); encodeStream(ds, out); char * iF = getInputFile(); char * oF = getOutputFile(); iF = getFile(); initCodec(iF); Stream *ds = decodeFile(iF); encodeStream(ds, oF);

x264 VLC

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-28
SLIDE 28

Our Approach

μ SCALPEL

slide-29
SLIDE 29

Our Approach

μ SCALPEL

slide-30
SLIDE 30

Our Approach

μ SCALPEL

slide-31
SLIDE 31

Result: x264 & VLC

C
  • n
s i s t e n t * C
  • m
p l e t e * W e l l D
  • c
u m e n t e d * E a s y t
  • R
e u s e *

*

E v a l u a t e d

* I S S T A *

A r t i f a c t

* A E C

Alexandru Marginean — Automated Software Transplantation — Humies 2016

Donor Host

slide-32
SLIDE 32

Result: x264 & VLC

C
  • n
s i s t e n t * C
  • m
p l e t e * W e l l D
  • c
u m e n t e d * E a s y t
  • R
e u s e *

*

E v a l u a t e d

* I S S T A *

A r t i f a c t

* A E C

Alexandru Marginean — Automated Software Transplantation — Humies 2016

Donor Host

Award winning tool for H.264 encoding [2,3,4]

slide-33
SLIDE 33

Result: x264 & VLC

C
  • n
s i s t e n t * C
  • m
p l e t e * W e l l D
  • c
u m e n t e d * E a s y t
  • R
e u s e *

*

E v a l u a t e d

* I S S T A *

A r t i f a c t

* A E C

Alexandru Marginean — Automated Software Transplantation — Humies 2016

Donor Host

Award winning tool for H.264 encoding [2,3,4] “Most popular desktop video player” [1]

slide-34
SLIDE 34

Result: x264 & VLC

C
  • n
s i s t e n t * C
  • m
p l e t e * W e l l D
  • c
u m e n t e d * E a s y t
  • R
e u s e *

*

E v a l u a t e d

* I S S T A *

A r t i f a c t

* A E C

Alexandru Marginean — Automated Software Transplantation — Humies 2016

Donor Host

Award winning tool for H.264 encoding [2,3,4] “Most popular desktop video player” [1]

Organ: H264

slide-35
SLIDE 35

Result: x264 & VLC

C
  • n
s i s t e n t * C
  • m
p l e t e * W e l l D
  • c
u m e n t e d * E a s y t
  • R
e u s e *

*

E v a l u a t e d

* I S S T A *

A r t i f a c t

* A E C

Alexandru Marginean — Automated Software Transplantation — Humies 2016

Donor Host

Award winning tool for H.264 encoding [2,3,4] “Most popular desktop video player” [1]

Organ: H264

slide-36
SLIDE 36

Result: x264 & VLC

C
  • n
s i s t e n t * C
  • m
p l e t e * W e l l D
  • c
u m e n t e d * E a s y t
  • R
e u s e *

*

E v a l u a t e d

* I S S T A *

A r t i f a c t

* A E C

Alexandru Marginean — Automated Software Transplantation — Humies 2016

Donor Host Postoperative

Award winning tool for H.264 encoding [2,3,4] “Most popular desktop video player” [1]

Organ: H264

slide-37
SLIDE 37

Result: x264 & VLC

Automatic Transplantation of H264 Encoder

Time (hours) Regression Tests Manual Tests Acceptance Tests μSCALPEL 26 100% 100% 100%

C
  • n
s i s t e n t * C
  • m
p l e t e * W e l l D
  • c
u m e n t e d * E a s y t
  • R
e u s e *

*

E v a l u a t e d

* I S S T A *

A r t i f a c t

* A E C

Alexandru Marginean — Automated Software Transplantation — Humies 2016

Donor Host Postoperative

Organ: H264

slide-38
SLIDE 38

Autotransplantation vs Human Transplantation

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-39
SLIDE 39

Autotransplantation vs Human Transplantation

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-40
SLIDE 40

Autotransplantation vs Human Transplantation

Alexandru Marginean — Automated Software Transplantation — Humies 2016

μ SCALPEL

slide-41
SLIDE 41

Autotransplantation vs Human Transplantation

26 hours of cheap machine time Upgrade of x264 within VLC: average of 20 days of elapsed time

Alexandru Marginean — Automated Software Transplantation — Humies 2016

μ SCALPEL

slide-42
SLIDE 42

Autotransplantation vs Human Transplantation

26 hours of cheap machine time Upgrade of x264 within VLC: average of 20 days of elapsed time

Alexandru Marginean — Automated Software Transplantation — Humies 2016

μ SCALPEL

slide-43
SLIDE 43

(H) The result holds its own or wins a regulated competition involving human contestants (in the form of either live human players or human-written computer programs). (C) The result is equal to or better than a result that was placed into a database or archive of results maintained by an internationally recognised panel of scientific experts

slide-44
SLIDE 44

Regulated Competition

Alexandru Marginean — Automated Software Transplantation — Humies 2016

The printing press predated font design competitions.

slide-45
SLIDE 45

Regulated Competition

Alexandru Marginean — Automated Software Transplantation — Humies 2016

μSCALPEL predates transplantation competitions.

The printing press predated font design competitions.

slide-46
SLIDE 46

Regulated Competition

Alexandru Marginean — Automated Software Transplantation — Humies 2016

μSCALPEL predates transplantation competitions.

The printing press predated font design competitions. We hope so

slide-47
SLIDE 47

Regulated Competition

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-48
SLIDE 48

Regulated Competition

MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-49
SLIDE 49

Regulated Competition

MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-50
SLIDE 50

Regulated Competition

MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4] x264 won with ~24% better encoding than second place

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-51
SLIDE 51

Regulated Competition

MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-52
SLIDE 52

Regulated Competition

MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-53
SLIDE 53

Regulated Competition

2.4% faster

MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-54
SLIDE 54

Regulated Competition

2.4% faster

We automatically transplanted new functionality! MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-55
SLIDE 55

Regulated Competition

2.4% faster

MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-56
SLIDE 56

(E) The result is equal to or better than the most recent human-created solution to a long- standing problem for which there has been a succession of increasingly better human- created solutions.

(F) The result is equal to or better than a result that was considered an achievement in its field at the time it was first discovered.

slide-57
SLIDE 57

Long Standing Problem

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-58
SLIDE 58

Long Standing Problem

1993 1996 1999 2002 2005 2008 2011 2014 1990

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-59
SLIDE 59

Long Standing Problem

1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-60
SLIDE 60

Long Standing Problem

1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO

H.261 MPEG1

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-61
SLIDE 61

Long Standing Problem

1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO

H.261 MPEG1 MPEG2

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-62
SLIDE 62

Long Standing Problem

1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO

H.261 H.263

H.263+

H.263++

MPEG1 MPEG2 MPEG4

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-63
SLIDE 63

Long Standing Problem

1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO

H.261 H.263

H.263+

H.263++

H.264 MPEG1 MPEG2 MPEG4

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-64
SLIDE 64

Long Standing Problem

1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO

H.261 H.263

H.263+

H.263++

H.264 MPEG1 H.265 MPEG2 MPEG4

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-65
SLIDE 65

Long Standing Problem

1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO

H.261 H.263

H.263+

H.263++

H.264

MPEG1 H.265 MPEG2 MPEG4

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-66
SLIDE 66

Are We Really Human- Competitive? “Am I Obsolete?”

slide-67
SLIDE 67

Are We Really Human- Competitive? “Am I Obsolete?”

UK Contractor Forum

slide-68
SLIDE 68

Are We Really Human- Competitive? “Am I Obsolete?”

UK Contractor Forum

slide-69
SLIDE 69

Why is Autotransplantation the Best?

x264 VLC

Organ: H264

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-70
SLIDE 70

Why is Autotransplantation the Best?

x264 VLC

Organ: H264

Code reuse is a seminal problem in computer science. Automatic moving code is a difficult problem. First transplant of useful, non-trivial functionality between two unrelated systems. First application of GP to transplant functionality between two unrelated systems.

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-71
SLIDE 71

Why is Autotransplantation the Best?

63K LOCs 422K LOCs 23k LOCs

x264 VLC

Organ: H264

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-72
SLIDE 72

Why is Autotransplantation the Best?

Popular, substantial, real world systems. Media encoding is an increasingly important problem. Media encoders compared in various competitions [2,3,4]. As a side effect of GP we are 2.4% faster than the best H.264 encoder.

63K LOCs 422K LOCs 23k LOCs

x264 VLC

Organ: H264

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-73
SLIDE 73

Why is Autotransplantation the Best?

slide-74
SLIDE 74

Why is Autotransplantation the Best?

article, with more than 2000 shares

slide-75
SLIDE 75

Why is Autotransplantation the Best?

article, with more than 2000 shares

slide-76
SLIDE 76

Why is Autotransplantation the Best?

article, with more than 2000 shares

“the BBC’s biggest global brand with sales of the TV show, DVDs, books, live shows and other merchandise worth more than £50m a year” [5]

slide-77
SLIDE 77

Why is Autotransplantation the Best?

article, with more than 2000 shares

slide-78
SLIDE 78

Why is Autotransplantation the Best?

article, with more than 2000 shares

slide-79
SLIDE 79

Why is Autotransplantation the Best?

article, with more than 2000 shares More shares for Autotransplantation!

slide-80
SLIDE 80

Why is Autotransplantation the Best?

slide-81
SLIDE 81

Why is Autotransplantation the Best?

ACM Distinguished Paper Award at ISSTA ‘15

slide-82
SLIDE 82

Why is Autotransplantation the Best?

ACM Distinguished Paper Award at ISSTA ‘15

Featured on:

slide-83
SLIDE 83

Contributions

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-84
SLIDE 84

We automatically transplanted H.264 encoder from x264 into VLC.

Contributions

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-85
SLIDE 85

We automatically transplanted H.264 encoder from x264 into VLC. As a side-effect of GP, our transplant is faster than the winner of many encoder competitions.

Contributions

Alexandru Marginean — Automated Software Transplantation — Humies 2016

slide-86
SLIDE 86

Why is Autotransplantation the Best?

article, with more than 2000 shares More shares for Autotransplantation!

“the BBC’s biggest global brand with sales of the TV show, DVDs, books, live shows and other merchandise worth more than £50m a year” [5]

Are We Really Human- Competitive? “Am I Obsolete?”

UK Contractor Forum

Autotransplantation vs Human Transplantation

26 hours of cheap machine time Upgrade of x264 within VLC: average of 20 days of elapsed time

Alexandru Marginean — Automated Software Transplantation — Humies 2016

μSCALPEL

As a side-effect of GP, our transplant is faster than the winner of many encoder competitions.

We automatically transplanted H. 264 encoder from x264 into VLC.

VLC Start from scratch

Why Autotransplantation?

Check open source repositories Why not handle H.264? ~100 players

Alexandru Marginean — Automated Software Transplantation — Humies 2016

Autotransplantation

slide-87
SLIDE 87

References

  • [1] http://lifehacker.com/five-best-desktop-video-

players-1503859883/1506086048

  • [2] http://www.compression.ru/video/codec_comparison/

h264_2012/

  • [3] http://www.streamingmedia.com/articles/editorial/featured-

articles/first-look-h.264-and-vp8-compared-67266.aspx

  • [4] http://www.compression.ru/video/codec_comparison/

h264_2010/

  • [5] http://www.theguardian.com/media/2015/mar/11/top-gear-

bbc-jeremy-clarkson

Alexandru Marginean — Automated Software Transplantation — Humies 2016