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
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?
Alexandru Marginean — Automated Software Transplantation — Humies 2016
CREST, University College London Earl T. Barr Mark Harman Yue Jia Justyna Petke Alexandru Marginean
VLC
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC
Why not handle H.264?
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC
Why not handle H.264?
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC
Why not handle H.264?
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC Start from scratch
Why not handle H.264?
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC Start from scratch
Why not handle H.264?
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC Start from scratch
Check open source repositories Why not handle H.264?
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC Start from scratch
Check open source repositories Why not handle H.264?
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC Start from scratch
Check open source repositories Why not handle H.264?
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC Start from scratch
Check open source repositories Why not handle H.264?
Alexandru Marginean — Automated Software Transplantation — Humies 2016
VLC Start from scratch
Check open source repositories Why not handle H.264? ~100 players
Alexandru Marginean — Automated Software Transplantation — Humies 2016
(G) The result solves a problem of indisputable difficulty in its field.
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
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
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
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
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
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
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
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
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
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
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
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
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
μ SCALPEL
μ SCALPEL
μ SCALPEL
*
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
*
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]
*
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]
*
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
*
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
*
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
Automatic Transplantation of H264 Encoder
Time (hours) Regression Tests Manual Tests Acceptance Tests μSCALPEL 26 100% 100% 100%
C*
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
Alexandru Marginean — Automated Software Transplantation — Humies 2016
Alexandru Marginean — Automated Software Transplantation — Humies 2016
Alexandru Marginean — Automated Software Transplantation — Humies 2016
μ SCALPEL
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
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
(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
Alexandru Marginean — Automated Software Transplantation — Humies 2016
The printing press predated font design competitions.
Alexandru Marginean — Automated Software Transplantation — Humies 2016
μSCALPEL predates transplantation competitions.
The printing press predated font design competitions.
Alexandru Marginean — Automated Software Transplantation — Humies 2016
μSCALPEL predates transplantation competitions.
The printing press predated font design competitions. We hope so
Alexandru Marginean — Automated Software Transplantation — Humies 2016
MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]
Alexandru Marginean — Automated Software Transplantation — Humies 2016
MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]
Alexandru Marginean — Automated Software Transplantation — Humies 2016
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
MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]
Alexandru Marginean — Automated Software Transplantation — Humies 2016
MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]
Alexandru Marginean — Automated Software Transplantation — Humies 2016
2.4% faster
MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]
Alexandru Marginean — Automated Software Transplantation — Humies 2016
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
2.4% faster
MSU Sixth MPEG-4 AVC/H.264 Video Codecs Comparison [4]
Alexandru Marginean — Automated Software Transplantation — Humies 2016
(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.
Alexandru Marginean — Automated Software Transplantation — Humies 2016
1993 1996 1999 2002 2005 2008 2011 2014 1990
Alexandru Marginean — Automated Software Transplantation — Humies 2016
1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO
Alexandru Marginean — Automated Software Transplantation — Humies 2016
1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO
H.261 MPEG1
Alexandru Marginean — Automated Software Transplantation — Humies 2016
1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO
H.261 MPEG1 MPEG2
Alexandru Marginean — Automated Software Transplantation — Humies 2016
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
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
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
1993 1996 1999 2002 2005 2008 2011 2014 1990 ITU-T ISO
H.261 H.263
H.263+
H.263++
MPEG1 H.265 MPEG2 MPEG4
Alexandru Marginean — Automated Software Transplantation — Humies 2016
UK Contractor Forum
UK Contractor Forum
x264 VLC
Organ: H264
Alexandru Marginean — Automated Software Transplantation — Humies 2016
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
63K LOCs 422K LOCs 23k LOCs
x264 VLC
Organ: H264
Alexandru Marginean — Automated Software Transplantation — Humies 2016
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
article, with more than 2000 shares
article, with more than 2000 shares
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]
article, with more than 2000 shares
article, with more than 2000 shares
article, with more than 2000 shares More shares for Autotransplantation!
Featured on:
Alexandru Marginean — Automated Software Transplantation — Humies 2016
We automatically transplanted H.264 encoder from x264 into VLC.
Alexandru Marginean — Automated Software Transplantation — Humies 2016
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.
Alexandru Marginean — Automated Software Transplantation — Humies 2016
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 2016players-1503859883/1506086048
h264_2012/
articles/first-look-h.264-and-vp8-compared-67266.aspx
h264_2010/
bbc-jeremy-clarkson
Alexandru Marginean — Automated Software Transplantation — Humies 2016