on the use of genetic programming
play

ON THE USE OF GENETIC PROGRAMMING Adam C. Jensen and Betty H.C. - PDF document

2/27/2014 ON THE USE OF GENETIC PROGRAMMING Adam C. Jensen and Betty H.C. Cheng. 2010. In Proceedings of FOR AUTOMATED REFACTORING AND THE the 12th annual conference on Genetic and evolutionary INTRODUCTION OF DESIGN PATTERNS computation


  1. 2/27/2014 ON THE USE OF GENETIC PROGRAMMING Adam C. Jensen and Betty H.C. Cheng. 2010. In Proceedings of FOR AUTOMATED REFACTORING AND THE the 12th annual conference on Genetic and evolutionary INTRODUCTION OF DESIGN PATTERNS computation (GECCO '10 Motivation • Metrics enable a software engineer to evaluate various characteristics of design quality • Design patterns provide contextual-driven solution template for solving design problems that occur frequently in large software projects • Reduce the cognitive labor for software engineers by suggesting design changes that are tailored to the software design in question Presented by Rodrigo Morales 1

  2. 2/27/2014 Objective • Automates the use of software engineering metrics to generate refactoring strategies that introduce design patterns • Using a an evolutionary computation-based approach REMODEL Presented by Rodrigo Morales Components • Solution representation � Refactored software design • Mechanism for making changes to that solution • Means of measuring the solution’s quality Presented by Rodrigo Morales 2

  3. 2/27/2014 Solution Representation • Refactored software design • A design graph that represents the software design that is being refactored • The set of steps to transform the original design into the refactored design • A transformation tree whose nodes represents minitransformations 1 Presented by Rodrigo Morales Metrics • QMOOD[2] metric suite • 11 individual metrics • Evaluates distinct characteristics of OO design quality Presented by Rodrigo Morales 3

  4. 2/27/2014 What is REMODEL? • Genetic programming environment • Guided by Software metrics • To determine the optimal set of refactoring's to apply to a software design Presented by Rodrigo Morales It looks for • Improve the quality of the design as measured by the QMOOD • Introduce design patterns when appropriate Presented by Rodrigo Morales 4

  5. 2/27/2014 How individuals are represented? • The individuals are represented as a pair that includes • A design graph • Transformation tree Presented by Rodrigo Morales Design graph • Represents the software design that is being refactored Presented by Rodrigo Morales 5

  6. 2/27/2014 Transformation tree • Set of changes to the individual’s design graph • Executing the tree involves visiting each of its nodes and executing that node’s children recursively from left to right • Each node is • Transformation node (implementation of minitransformations) • Information node • Root node that Presented by Rodrigo Morales Presented by Rodrigo Morales 6

  7. 2/27/2014 REMODEL Benefits • The use of graph to represent target software design enables efficient computation of metrics • The order of the nodes describe a step-by-step series of refactoring Presented by Rodrigo Morales Design change mechanisms • Abstraction • Abstract Access • Delegation • Encapsulate construction • Partial abstraction • Wrapper Presented by Rodrigo Morales 7

  8. 2/27/2014 Mutation Operations • To explore the space of refactoring strategies: • After being selected 90% of individuals undergo • Subtree CrossOver • Point mutation Presented by Rodrigo Morales Presented by Rodrigo Morales 8

  9. 2/27/2014 Design Evaluation • Prolog-based design pattern detector • Abstract Factory • Concrete Factory Abstract • Abstract produt Factory • Conret Product • Client Presented by Rodrigo Morales Optimizations 1. Encourages individuals to evolve transformation trees with fewer transformation nodes 2. Rewards individuals that incorporate sequences of transformations nodes produce design pattern fragments Presented by Rodrigo Morales 9

  10. 2/27/2014 Fitness Function Where: Q is quality PR: amount of fitness bonus of at least one design pattern NCP fitness penalty proportionate to the number of transformation nodes in Transformation tree MSR: fitness bonus given for the presence of specific sequences of transformation nodes C: coefficient that determines the relative weight of that term Presented by Rodrigo Morales Validation • 4 empirical experiments (58 published software designs 5-15 classes each) • Case study ReMoDD Web-based software system • Each experiment comprises 100 generations • Tournament selection with a tournament size of 7 • REMODEL was applied 5 times Presented by Rodrigo Morales 10

  11. 2/27/2014 Case Study: ReMoDD • Repository for Model-Driven development containing model-driving engineering artifacts (test cases, documentation, model and code) • Comprises 23 classes Presented by Rodrigo Morales Discussion Presented by Rodrigo Morales 11

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

Recommend


More recommend