Genetic Improvement for Adaptive Software...

135
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

Transcript of Genetic Improvement for Adaptive Software...

Page 1: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 2: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 3: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

COWs

CREST Open Workshop

Roughly one per month

!

Discussion based

Recorded and archived

Page 4: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

COWs

CREST Open Workshop

Roughly one per month

!

Discussion based

Recorded and archived

Page 5: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

COWs

CREST Open Workshop

Roughly one per month

!

Discussion based

Recorded and archived

Page 6: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

COWs

Page 7: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

What is SBSE

Page 8: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 9: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

What is SBSE

Search Based Optimization

Software Engineering

S B S E

Page 10: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 11: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 12: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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?

Page 13: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 14: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 15: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 16: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 17: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 18: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 19: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 20: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 21: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Growth Trends

Page 22: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Polynomial rise in publications

Page 23: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

2013

Page 24: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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.

Page 25: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Software Engineering topics attacked

Page 26: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Software Engineering topics attacked

Page 27: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 28: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

EPSRC Grant

Page 29: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

EPSRC Grant

Stirling

Birmingham

York

UCL

Page 30: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

EPSRC Grant

Stirling

York

UCL

Birmingham

Page 31: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

EPSRC Grant

Page 32: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

EPSRC Grant

Page 33: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

EPSRC Grant

Stirling

Birmingham

York

UCL

2012-2018 PhD and post docs offered

[email protected]

Page 34: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

SBSE Tutorial and Survey

Page 35: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 36: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 37: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 38: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 39: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 40: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

SBSE

Testing

Management

Design

Requirements

Verification

Maintenance

Debugging

...

GA GP ES SA HC ACO ...

Page 41: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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 ...

Page 42: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 43: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 44: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 45: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

SBSE

Testing

Management

Design

Requirements

Verification

Maintenance

Debugging

...

GA GP ES SA HC ACO ...

Page 46: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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 ...

Page 47: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 48: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 49: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

SBSE

Testing

Management

Design

Requirements

Verification

Maintenance

Debugging

...

GA GP ES SA HC ACO ...

Page 50: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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 ...

Page 51: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 52: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 53: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

SBSE

Testing

Management

Design

Requirements

Verification

Maintenance

Debugging

...

GA GP ES SA HC ACO ...

Page 54: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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 ...

Page 55: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 56: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 57: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

SBSE

Testing

Management

Design

Requirements

Verification

Maintenance

Debugging

...

GA GP ES SA HC ACO ...

Page 58: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 59: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

SBSE

Testing

Management

Design

Requirements

Verification

Maintenance

Debugging

...

GA GP ES SA HC ACO ...

Page 60: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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 ...

Page 61: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 62: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 63: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 64: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

SBSE

Testing

Management

Design

Requirements

Verification

Maintenance

Debugging

...

GA GP ES SA HC ACO ...

Page 65: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 66: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

SBSE

Testing

Management

Design

Requirements

Verification

Maintenance

Debugging

...

GA GP ES SA HC ACO ...

Page 67: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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 ...

Page 68: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 69: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 70: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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 ...

Page 71: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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 ...

Page 72: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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?

Page 73: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

There is a paper to accompany this keynote

Page 74: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Page 75: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

programming is changing

Page 76: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

RequirementsRequirements

Functional Requirements

Non-Functional Requirements

Page 77: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 78: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Software Design Process

Page 79: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Software Design Process

Page 80: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Software Design Process

Page 81: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Software Design Process

Page 82: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Software Design Process

Page 83: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Software Design Process

Page 84: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Multiplicity

Multiple Devices

Conflicting Objectives

Multiple Platforms

Page 85: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Why is the programmer human?

Page 86: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 87: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 88: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Pareto Front

Page 89: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Pareto Front

each circle is a program found by a machine

Page 90: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Pareto Front

different non functional

properties have different pareto program fronts

Page 91: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Failed Test Cases

Page 92: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Why can’t functional properties be optimisation objectives ?

Page 93: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Page 94: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Optimisation

Page 95: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Optimisation

2.5 times faster but failed 1 test case?

Page 96: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Page 97: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Optimisation

double the battery life but failed 2 test cases?

Page 98: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Genetic Programming for Software Transplantation

Page 99: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 100: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

GP for Transplants

Page 101: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

GP for Transplants

LocaliseAbstractTargetInterfaceInsertValidateRepeat

Page 102: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

GP for TransplantsLocalise

Abstract

Target

Interface

Insert

Validate

Repeat

----------------------------------------------------------------------

Doner

----------------------------------------------------------------------

Host

Feature

Page 103: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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);

Page 104: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 105: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

GP for TransplantsLocalise

Abstract

Target

Interface

Insert

Validate

Repeat

----------------------------------------------------------------------

Doner

----------------------------------------------------------------------

HostSBSE

Page 106: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

GP for TransplantsLocalise

Abstract

Target

Interface

Insert

Validate

Repeat

----------------------------------------------------------------------

Doner

----------------------------------------------------------------------

Host

Target

Interface

Page 107: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 108: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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);

Page 109: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 110: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

GP for TransplantsLocalise

Abstract

Target

Interface

Insert

Validate

Repeat

----------------------------------------------------------------------

Doner

----------------------------------------------------------------------

Host

++++++++

Page 111: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Offline Genetic Improvement

Page 112: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Offline Genetic Improvement

… what have we managed to achieve so far …

Page 113: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 114: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 115: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 116: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 117: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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á

Page 118: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Online Genetic Improvement

Page 119: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Online Genetic Improvement

This is described in the SEAMS 2014 keynote paper

Page 120: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Online phase Offline phase

User specify operation characteristics

Page 121: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 122: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 123: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 124: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 125: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 126: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 127: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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

Page 128: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Example: Wikipedia Mobile

Page 129: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Example: Wikipedia Mobile

Overnight Charging

Mode

Daily Operating

Mode

Page 130: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Example: Wikipedia Mobile

Daily Operating

Mode

Page 131: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Example: Wikipedia Mobile

Daily Operating

Mode

Page 132: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Example: Wikipedia Mobile

Daily Operating

Mode

Page 133: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Example: Wikipedia Mobile

Overnight Charging

Mode

Page 134: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

Genetic Improvement for Adaptive Software Engineering Mark Harman, UCL CRESTSEAMS2014

Example: Wikipedia Mobile

Overnight Charging

Mode

GP to search for caching strategies

Page 135: Genetic Improvement for Adaptive Software Engineeringweb4.cs.ucl.ac.uk/staff/W.Langdon/gismo/Harman_2014_seams_slides.pdfSEAMS2014 Genetic Improvement for Adaptive Software Engineering!

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