genetic improvement for adaptive software...
TRANSCRIPT
Genetic Improvement for Adaptive Software Engineering
Mark Harman
University College London
SEAMS2014
joint work with Yue Jia, Bill Langdon, Iman Moghadam, Justyna Petke, Shin Yoo & Fan Wu
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
20 mins walk
National Gallery
Nelson’s Column
ErosRoyalCourts
of Justice
St. Paul’s
Tate ModernGlobe
Theatre
Covent Garden Market
Westminster Abbey
House of Parliament
London Eye
British Museum
Madame Tussaud’sSherlock Holmes
Museum
Marble Arch
National History Museum
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
COWs
CREST Open Workshop
Roughly one per month
!
Discussion based
Recorded and archived
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
COWs
CREST Open Workshop
Roughly one per month
!
Discussion based
Recorded and archived
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
COWs
CREST Open Workshop
Roughly one per month
!
Discussion based
Recorded and archived
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
COWs
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
What is SBSE
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
What is SBSEIn SBSE we apply search techniques to search large search spaces, guided by a fitness function that captures properties of the acceptable software artefacts we seek.
like google search? like code search? like breadth first search?
potentially exhaustive
pick one at random
sweet spot
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
What is SBSE
Search Based Optimization
Software Engineering
S B S E
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
What is SBSEIn SBSE we apply search techniques to search large search spaces, guided by a fitness function that captures properties of the acceptable software artefacts we seek.
Genetic AlgorithmsHill Climbing
Simulated Annealing Random
Tabu Search
Estimation of Distribution Algorithms
Particle Swarm OptimizationAnt Colonies
LP
Genetic Programming
Greedy
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
What is SBSEIn SBSE we apply search techniques to search large search spaces, guided by a fitness function that captures properties of the acceptable software artefacts we seek.
Genetic AlgorithmsHill Climbing
Simulated Annealing Random
Tabu Search
Estimation of Distribution Algorithms
Particle Swarm OptimizationAnt Colonies
LP
Genetic Programming
Greedy
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
What is SBSE
let’s listen to software engineers ... !
... what sort of things do they say?
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Engineers Say
Requirements: We need to satisfy business and technical concerns
Management: We need to reduce risk while maintaining completion time
Design: We need increased cohesion and decreased coupling
Testing: We need fewer tests that find more nasty bugs
Refactoring: We need to optimise for all metrics M1,..., Mn
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Engineers Say
Requirements: We need to satisfy business and technical concerns
Management: We need to reduce risk while maintaining completion time
Design: We need increased cohesion and decreased coupling
Testing: We need fewer tests that find more nasty bugs
Refactoring: We need to optimise for all metrics M1,..., Mn
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Engineers Say
Requirements: We need to satisfy business and technical concerns
Management: We need to reduce risk while maintaining completion time
Design: We need increased cohesion and decreased coupling
Testing: We need fewer tests that find more nasty bugs
Refactoring: We need to optimise for all metrics M1,..., Mn
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Engineers Say
Requirements: We need to satisfy business and technical concerns
Management: We need to reduce risk while maintaining completion time
Design: We need increased cohesion and decreased coupling
Testing: We need fewer tests that find more nasty bugs
Refactoring: We need to optimise for all metrics M1,..., Mn
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Engineers Say
Requirements: We need to satisfy business and technical concerns
Management: We need to reduce risk while maintaining completion time
Design: We need increased cohesion and decreased coupling
Testing: We need fewer tests that find more nasty bugs
Refactoring: We need to optimise for all metrics M1,..., Mn
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Engineers Say
Requirements: We need to satisfy business and technical concerns
Management: We need to reduce risk while maintaining completion time
Design: We need increased cohesion and decreased coupling
Testing: We need fewer tests that find more nasty bugs
Refactoring: We need to optimise for all metrics M1,..., Mn
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Engineers Say
Requirements: We need to satisfy business and technical concerns
Management: We need to reduce risk while maintaining completion time
Design: We need increased cohesion and decreased coupling
Testing: We need fewer tests that find more nasty bugs
Refactoring: We need to optimise for all metrics M1,..., Mn
Requirements: We need to satisfy business and technical concerns
Management: We need to reduce risk while maintaining completion time
Design: We need increased cohesion and decreased coupling
Testing: We need fewer tests that find more nasty bugs
Refactoring: We need to optimise for all metrics M1,..., Mn
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Engineers Say
Requirements: We need to satisfy business and technical concerns
Management: We need to reduce risk while maintaining completion time
Design: We need increased cohesion and decreased coupling
Testing: We need fewer tests that find more nasty bugs
Refactoring: We need to optimise for all metrics M1,..., Mn
All have been addressed in the SBSE literature
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Growth Trends
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Polynomial rise in publications
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
2013
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Author statistics
more than 1250 authors
more than 1150 papers
more than 390 institutions
more than 50 countries
!
source: SBSE repository, July 2013.
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Engineering topics attacked
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Engineering topics attacked
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS201427
Just some of the many SBSE applications
Agent Oriented Aspect Oriented Assertion Generation Bug Fixing Component Oriented Design Effort Estimation Heap Optimisation Model Checking Predictive Modelling Probe distribution Program Analysis Program Comprehension Program Transformation Project Management Protocol Optimisation QoS Refactoring Regression Testing Requirements Reverse Engineering SOA Software Maintenance and Evolution Test Generation UIO generation
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
EPSRC Grant
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
EPSRC Grant
Stirling
Birmingham
York
UCL
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
EPSRC Grant
Stirling
York
UCL
Birmingham
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
EPSRC Grant
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
EPSRC Grant
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
EPSRC Grant
Stirling
Birmingham
York
UCL
2012-2018 PhD and post docs offered
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE Tutorial and Survey
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Mark Harman, Phil McMinn, Jerffeson Teixeira de Souza and Shin Yoo. Search Based Software Engineering: Techniques, Taxonomy, Tutorial. Springer, 2012. !google: SBSE tutorial !!!Mark Harman, Afshin Mansouri and Yuanyuan Zhang. Search Based Software Engineering: Trends, Techniques and Applications ACM Computing Surveys. 45(1): Article 11, 2012. !google: SBSE survey
SBSE Tutorial and Survey
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Mark Harman, Phil McMinn, Jerffeson Teixeira de Souza and Shin Yoo. Search Based Software Engineering: Techniques, Taxonomy, Tutorial. Springer, 2012. !google: SBSE tutorial !!!Mark Harman, Afshin Mansouri and Yuanyuan Zhang. Search Based Software Engineering: Trends, Techniques and Applications ACM Computing Surveys. 45(1): Article 11, 2012. !google: SBSE survey
SBSE Tutorial and Survey
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Mark Harman, Phil McMinn, Jerffeson Teixeira de Souza and Shin Yoo. Search Based Software Engineering: Techniques, Taxonomy, Tutorial. Springer, 2012. !google: SBSE tutorial !!!Mark Harman, Afshin Mansouri and Yuanyuan Zhang. Search Based Software Engineering: Trends, Techniques and Applications ACM Computing Surveys. 45(1): Article 11, 2012. !google: SBSE survey
SBSE Tutorial and Survey
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Mark Harman, Phil McMinn, Jerffeson Teixeira de Souza and Shin Yoo. Search Based Software Engineering: Techniques, Taxonomy, Tutorial. Springer, 2012. !google: SBSE tutorial !!!Mark Harman, Afshin Mansouri and Yuanyuan Zhang. Search Based Software Engineering: Trends, Techniques and Applications ACM Computing Surveys. 45(1): Article 11, 2012. !google: SBSE survey
SBSE Tutorial and Survey
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Mark Harman, Phil McMinn, Jerffeson Teixeira de Souza and Shin Yoo. Search Based Software Engineering: Techniques, Taxonomy, Tutorial. Springer, 2012. !google: SBSE tutorial !!!Mark Harman, Afshin Mansouri and Yuanyuan Zhang. Search Based Software Engineering: Trends, Techniques and Applications ACM Computing Surveys. 45(1): Article 11, 2012. !google: SBSE survey
SBSE Tutorial and Survey
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
Modularisation
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Search based modularisation
Mancoridis and Mitchell: IWPC 1998 and TSE 2006 Praditwong, Harman and Yao: TSE 2011 Barros: GECCO 2012
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
m
Search based modularisation
Mancoridis and Mitchell: IWPC 1998 and TSE 2006 Praditwong, Harman and Yao: TSE 2011 Barros: GECCO 2012
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Search based modularisation
Mancoridis and Mitchell: IWPC 1998 and TSE 2006 Praditwong, Harman and Yao: TSE 2011 Barros: GECCO 2012
Take home: multi objective search helps even single objective problems
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
Next Release Problem
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Search based requirements
Bagnall, Rayward-Smith and Whittley: IST 2001 Zhang, Harman and Mansouri: GECCO 2007 Saliu and Ruhe: FSE 2007
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Search based requirements
Bagnall, Rayward-Smith and Whittley: IST 2001 Zhang, Harman and Mansouri: GECCO 2007 Saliu and Ruhe: FSE 2007
Take home: SBSE is well suited to cost value trade offs
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
Search Based Management
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Dolado: IST 2001 Chicano and Alba: MIC 2005 Ferrucci, Harman, Ren and Sarro: ICSE 2013
Search based management
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Dolado: IST 2001 Chicano and Alba: MIC 2005 Ferrucci, Harman, Ren and Sarro: ICSE 2013
Search based management
Take home: SBSE can help analyse risk - reward
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
Program Repair
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Search based repair
Arcuri and Yao: CEC 2008 Weimer, Nguyen, Le Goues and Forrest: ICSE 2009 Kim, Nam, Song and Kim: ICSE 2013
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Search based repair
GPGP
Arcuri and Yao: CEC 2008 Weimer, Nguyen, Le Goues and Forrest: ICSE 2009 Kim, Nam, Song and Kim: ICSE 2013
Take home: some (~50%) real bugs are easy to fix
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
Test case generation
GA GP ES SA HC ACO ...
Take home: SBSE loves testing problem: adequacy = fitness
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
Test suite optimisation
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Test suite optimisation
Yoo and Harman: ISSTA 2007 Li, Harman and Hierons: TSE 2007 Mirarab, Akhlaghi and Tahvildari: TSE 2012
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Test suite selection
Yoo and Harman: ISSTA 2007 Li, Harman and Hierons: TSE 2007 Mirarab, Akhlaghi and Tahvildari: TSE 2012
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Test suite selection
Yoo, Nilsson and Harman, FSE 2011
Speedup
Spee
dup
(x ti
mes
)
01
23
45
6
NSGA2/JOMP1NSGA2/JOMP2NSGA2/JOMP4NSGA2/GPUSPEA2/JOMP1SPEA2/JOMP2SPEA2/JOMP4SPEA2/GPUTAEA/JOMP1TAEA/JOMP2TAEA/JOMP4TAEA/GPU
prin
ttoke
ns−1
prin
ttoke
ns−2
prin
ttoke
ns−3
prin
ttoke
ns−4
sche
dule−1
sche
dule−2
sche
dule−3
sche
dule−4
prin
ttoke
ns
sche
dule
prin
ttoke
ns2
sche
dule
2
Spee
dup
(x ti
mes
)
05
1015
2025
30
NSGA2/JOMP1NSGA2/JOMP2NSGA2/JOMP4NSGA2/GPUSPEA2/JOMP1SPEA2/JOMP2SPEA2/JOMP4SPEA2/GPUTAEA/JOMP1TAEA/JOMP2TAEA/JOMP4TAEA/GPU
tcas
totin
fo
flex
gzip
sed
spac
e−1
spac
e−2
spac
e−3
spac
e−4
repl
ace
bash
haifa
Yoo, Harman and Ur, EMSE 2013
Find faults faster Optimise faster using GPGPU
Yoo and Harman: ISSTA 2007 Li, Harman and Hierons: TSE 2007 Mirarab, Akhlaghi and Tahvildari: TSE 2012
Take home: regression testing is all about optimisation
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
optimising model checking
GA GP ES SA HC ACO ...
Take home: Model checkers search large spaces
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
... Search based Refactoring
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
O'Keeffe and Ó Cinnéide: CSMR 2003 Harman and Tratt: GECCO 2007 Jensen and Cheng: GECCO 2010
Search based refectoring
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
O'Keeffe and Ó Cinnéide: CSMR 2003 Harman and Tratt: GECCO 2007 Jensen and Cheng: GECCO 2010
Search based refectoring
Take home: refactoring is a multi objective optimisation problem
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
Program Repair
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
Program Improvement
GA GP ES SA HC ACO ...
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GISMOE
tPareto program surface is automatically constructed to support dialog with the
software designer concerning trade offs in the solution space of programs
what is a pareto program surface?
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
There is a paper to accompany this keynote
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
programming is changing
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
RequirementsRequirements
Functional Requirements
Non-Functional Requirements
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Functional Requirements
Non-Functional Requirements
Memory
Execution Time
Battery
Size
Bandwidth functionality of the Program
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Design Process
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Design Process
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Design Process
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Design Process
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Design Process
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Software Design Process
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Multiplicity
Multiple Devices
Conflicting Objectives
Multiple Platforms
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Why is the programmer human?
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Functional Requirements
Non-Functional Requirements
Which requirements must be human coded ?
humans have to define these
a machine can optimise these
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Functional Requirements
Non-Functional Requirements
Which requirements are essential to human ?
humans have to define these
a machine can optimise these
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Pareto Front
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Pareto Front
each circle is a program found by a machine
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Pareto Front
different non functional
properties have different pareto program fronts
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Failed Test Cases
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Why can’t functional properties be optimisation objectives ?
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Optimisation
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Optimisation
2.5 times faster but failed 1 test case?
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Optimisation
double the battery life but failed 2 test cases?
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Genetic Programming for Software Transplantation
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Genetic Programming for Software Transplantation
covered in more detail in the WCRE 2013
keynote paper
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for Transplants
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for Transplants
LocaliseAbstractTargetInterfaceInsertValidateRepeat
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for TransplantsLocalise
Abstract
Target
Interface
Insert
Validate
Repeat
----------------------------------------------------------------------
Doner
----------------------------------------------------------------------
Host
Feature
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for TransplantsLocalise
Abstract
Target
Interface
Insert
Validate
Repeat
----------------------------------------------------------------------
Doner
----------------------------------------------------------------------
Hostif(ptr!=NULL) foo(*ptr);
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for TransplantsLocalise
Abstract
Target
Interface
Insert
Validate
Repeat
----------------------------------------------------------------------
Doner
----------------------------------------------------------------------
Hostif(ptr!=NULL) foo(*ptr);
if( !=NULL) ( );
1
2 1
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for TransplantsLocalise
Abstract
Target
Interface
Insert
Validate
Repeat
----------------------------------------------------------------------
Doner
----------------------------------------------------------------------
HostSBSE
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for TransplantsLocalise
Abstract
Target
Interface
Insert
Validate
Repeat
----------------------------------------------------------------------
Doner
----------------------------------------------------------------------
Host
Target
Interface
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for TransplantsLocalise
Abstract
Target
Interface
Insert
Validate
Repeat
----------------------------------------------------------------------
Doner
----------------------------------------------------------------------
Host
Target
Interface
if( !=NULL) ( );
1
2 1
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for TransplantsLocalise
Abstract
Target
Interface
Insert
Validate
Repeat
----------------------------------------------------------------------
Doner
----------------------------------------------------------------------
Host
Target
Interface
if( host_ptr!=NULL) host_action(*host_ptr);
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for TransplantsLocalise
Abstract
Target
Interface
Insert
Validate
Repeat
----------------------------------------------------------------------
Doner
----------------------------------------------------------------------
Host
++++++++
1 new feature tests2 regression tests3 quality tests
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP for TransplantsLocalise
Abstract
Target
Interface
Insert
Validate
Repeat
----------------------------------------------------------------------
Doner
----------------------------------------------------------------------
Host
++++++++
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Offline Genetic Improvement
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Offline Genetic Improvement
… what have we managed to achieve so far …
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Bowtie2 GP ProgramsProgramsProgramsBowtie2 Improved
Non-functional property Test
harness
Fitness
Test data
Sensitivity Analysis
Genetic Improvement of Programs
W. B. Langdon and M. Harman Optimising Existing Software with Genetic Programming. TEC 2014 (TR available)
70 times faster 30+ interventions
HC clean up: 7 slight semantic improvement
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
GP ProgramsProgramsProgramsMiniSat Improved
Non-functional property Test
harness
Fitness
Test data
Sensitivity Analysis
Genetic Improvement of Programs
Justyna Petke, Mark Harman, William B. Langdon and Westley Weimer Using Genetic Improvement & Code Transplants to Specialise a C++ program to a Problem Class (EuroGP’14)
Multi-doner transplant Specialized for CIT
17% faster
MiniSat
MiniSat
MiniSat
v1
v2
vn
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
GA GP EA SA HC ACO ...
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
Program Improvement
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
SBSE
GA GP EA SA HC ACO ...
Testing
Management
Design
Requirements
Verification
Maintenance
Debugging
...
Program Improvement
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Genetic ImprovementBabel Pidgin: Grow new functionality
Mark Harman, Yue Jia and William B Langdon Babel Pidgin: SBSE can grow and graft entirely new functionality into a real world system (SSBSE’14 Challenge)
Growing Grafting
GPBi-language translation
Fitness
Test data
hello
………안녕하세요Olá
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online Genetic Improvement
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online Genetic Improvement
This is described in the SEAMS 2014 keynote paper
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online phase Offline phase
User specify operation characteristics
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online phase Offline phase
User specify operation characteristics
Environmental and usage profile
Learning
Data Collection
Phase 1
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online phase Offline phase
User specify operation characteristics
Environmental and usage profile
Learning
Data Collection
Phase 1
Program
Tuneable Parameters
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online phase Offline phase
User specify operation characteristics
Environmental and usage profile
Learning
Data Collection
Phase 1
Program
Tuneable Parameters
Exposing Implicit Parameters
Tuneable Implicit Parameters
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online phase Offline phase
User specify operation characteristics
Environmental and usage profile
Learning
Data Collection
Phase 1
Program
Optimisation Tuning
SBSE
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online phase Offline phase
User specify operation characteristics
Environmental and usage profile
Learning
Data Collection
Phase 1
Program
Optimisation Tuning
SBSE
Patch generation
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online phase Offline phase
User specify operation characteristics
Environmental and usage profile
Learning
Data Collection
Phase 1
Program
Optimisation Tuning
SBSE
Patch generation
Phase 1- n
Data CollectionDeploy patches
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online phase Offline phase
User specify operation characteristics
Environmental and usage profile
Learning
Data Collection
Phase 1
Program
Optimisation Tuning
SBSE
Patch generation
Phase 1- n
Data CollectionDeploy patches
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Example: Wikipedia Mobile
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Example: Wikipedia Mobile
Overnight Charging
Mode
Daily Operating
Mode
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Example: Wikipedia Mobile
Daily Operating
Mode
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Example: Wikipedia Mobile
Daily Operating
Mode
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Example: Wikipedia Mobile
Daily Operating
Mode
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Example: Wikipedia Mobile
Overnight Charging
Mode
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Example: Wikipedia Mobile
Overnight Charging
Mode
GP to search for caching strategies
Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014
Online Genetic Improvement
… could provide an SBSE for Self Adaptive Systems !
Genetic Improvement +
Grow and Graft Patches +
Expose parameters and Autotune +
Learning and deployment: Catch, Dream, Optimise
More details in keynote papers: ASE12, WCRE13 & SEAMS14