assessing single objective performance assessing single
play

Assessing Single-Objective Performance Assessing Single-Objective - PowerPoint PPT Presentation

Assessing Single-Objective Performance Assessing Single-Objective Performance Convergence and Time Complexity for Convergence and Time Complexity for Refactoring Detection Refactoring Detection by D. Nader-Palacio, D. Rodriguez -Cardenas , J.


  1. Assessing Single-Objective Performance Assessing Single-Objective Performance Convergence and Time Complexity for Convergence and Time Complexity for Refactoring Detection Refactoring Detection by D. Nader-Palacio, D. Rodriguez -Cardenas , J. Gomez Universidad Nacional de Colombia & Universidad del Rosario Research Group on Artificial Life (Alife) GECCO 2018 Kyoto

  2. Terminology Terminology

  3. [Software Refactoring] consists of re-constructing the code design of a [Software Refactoring] consists of re-constructing the code design of a software system without affecting the software system without affecting the behavior functionality behavior functionality (Fowler & (Fowler & Beck, 1999) Beck, 1999)

  4. [Refactoring & Reconstruction] Refactoring is a subset of [Refactoring & Reconstruction] Refactoring is a subset of Reconstructions Reconstructions (Mens & Tourwe, 2004) (Mens & Tourwe, 2004)

  5. The refactoring process is still an issue (ACM October 2017) The refactoring process is still an issue (ACM October 2017)

  6. State-of-the-art State-of-the-art

  7. The authors propose informal optimization models for the Refactoring The authors propose informal optimization models for the Refactoring Detection Problem ( Detection Problem (RDP RDP), making the approaches difficult to compare and ), making the approaches difficult to compare and reproduce reproduce

  8. A A classical perspective classical perspective of the Refactoring Detection Problem of the Refactoring Detection Problem

  9. A A proposed perspective proposed perspective of the Refactoring Detection Problem of the Refactoring Detection Problem

  10. Proposed Technique Proposed Technique

  11. The Artificial Refactoring Generation (ARGen) is... The Artificial Refactoring Generation (ARGen) is...

  12. Everything starts with a very precise statement of metrics Everything starts with a very precise statement of metrics

  13. [Theoretical Refactoring] Software Formalization [Theoretical Refactoring] Software Formalization

  14. System Under Analysis (SUA) is an information system or program System Under Analysis (SUA) is an information system or program composed of classes, methods and attributes composed of classes, methods and attributes

  15. A single class is a Cartesian product represented by A single class is a Cartesian product represented by ∗ ∗ c = str × str × str α

  16. A single A single Class Class is a Cartesian product represented by is a Cartesian product represented by ∗ ∗ c = str × str × str α identifier fld(s) mtd(s)

  17. What about What about Methods Methods and and Fields Fields? M ⊆ N ∗ M = str = ( str ) ⋃ n =0 n A ⊆ N ∗ A = str = ( str ) ⋃ n =0 n

  18. A A Refactoring Refactoring is a math function that maps from a Cartesian set to a is a math function that maps from a Cartesian set to a Code Code Modification Modification R : Ω ⟶ ( CodeModification ) δ δ : Specific Refactoring Operation Specific Refactoring Operation

  19. How to create the parameters? How to create the parameters? R : Ω ⟶ ( CodeModification ) δ

  20. From From Source Source to to Target Target Classes Classes R : Ω ⟶ ( CodeModification ) δ R : c × A × M × c ⟶ ( CodeModification ) δ s s s t

  21. A Quality Metric is a Function that receives a class and return a real value A Quality Metric is a Function that receives a class and return a real value η : c ⟶ R j α

  22. We can compute any specific metric (e.g., LOC, CYCLO, LCOM2) We can compute any specific metric (e.g., LOC, CYCLO, LCOM2) η : c ⟶ R j α H = { η ( c ), η ( c ), ..., η ( c )} 1 2 α α α j α H ∈ R j α

  23. [Theoretical Refactoring] Software Formalization [Theoretical Refactoring] Software Formalization

  24. The Refactoring Impact Prediction is a technique to estimate the value of a The Refactoring Impact Prediction is a technique to estimate the value of a software metric after performing a refactoring operation (Chaparro, 2014) software metric after performing a refactoring operation (Chaparro, 2014) ~ δ , j ( c ) = ( c ) Prediction η δ , j α α

  25. Lines of Code metric impacted by Move Method Refactoring Operation Lines of Code metric impacted by Move Method Refactoring Operation LOC ( c ) = LOC ( c ) − LOC ( m ) p s b s k LOC ( c ) = LOC ( c ) + LOC ( m ) p t b t k

  26. We use the concept of a typical metric, which is represent the actual value, We use the concept of a typical metric, which is represent the actual value, and the impacted metric, which is an estimation, after accounting the and the impacted metric, which is an estimation, after accounting the refactoring operation refactoring operation ~ η : c ⟶ R : c ⟶ R η δ , j j α α Actual Actual Forecasted Forecasted Metrics Metrics Metrics Metrics

  27. [Theoretical Refactoring] Combinatorial Optimization [Theoretical Refactoring] Combinatorial Optimization

  28. The search space has actionable (can perform the refactoring operation) and The search space has actionable (can perform the refactoring operation) and feasible regions (fulfill the metric's constraints) feasible regions (fulfill the metric's constraints)

  29. ARGen search space ARGen search space e.g. a system with 10 classes, 10 attributes and 10 methods would have a size e.g. a system with 10 classes, 10 attributes and 10 methods would have a size of 10,000 whether the sequence is composed of one refactoring of 10,000 whether the sequence is composed of one refactoring 2 ( C ∗ A ∗ M ) r

  30. The objective function is a rate that compares a Predicted from Actual System The objective function is a rate that compares a Predicted from Actual System in terms of software metrics in terms of software metrics

  31. Set of refactoring operations Set of refactoring operations J Υ (Φ ) − min (Υ (Φ )) ( ~ ~ ) ∑ j j H H w j max (Υ (Φ )) − min (Υ (Φ )) ~ ~ j j H H j =1 Obj (Φ) = + ρ (Φ) J Υ ( η ) − min (Υ ( η )) ( ) ∑ H j H j w j max (Υ ( η )) − min (Υ ( η )) H j H j j =1

  32. Min-max normalization Min-max normalization J Υ (Φ ) − min (Υ (Φ )) ( ) ~ ~ ∑ j j H H w j max (Υ (Φ )) − min (Υ (Φ )) ~ ~ j j H H j =1 Obj (Φ) = + ρ (Φ) J Υ ( η ) − min (Υ ( η )) ( ) ∑ H j H j w j max (Υ ( η )) − min (Υ ( η )) H j H j j =1

  33. Developers' information Developers' information J Υ (Φ ) − min (Υ (Φ )) ( ) ~ ~ ∑ j j H H w j max (Υ (Φ )) − min (Υ (Φ )) ~ ~ j j H H j =1 Obj (Φ) = + ρ (Φ) J Υ ( η ) − min (Υ ( η )) ( ) ∑ H j H j w j max (Υ ( η )) − min (Υ ( η )) H j H j j =1

  34. Actual Metrics Actual Metrics J Υ (Φ ) − min (Υ (Φ )) ( ) ~ ~ ∑ j j H H w j max (Υ (Φ )) − min (Υ (Φ )) ~ ~ j j H H j =1 Obj (Φ) = + ρ (Φ) J Υ ( η ) − min (Υ ( η )) ( ) ∑ H j H j w j max (Υ ( η )) − min (Υ ( η )) H j H j j =1

  35. Estimated Metrics Estimated Metrics J Υ (Φ ) − min (Υ (Φ )) ( ) ~ ~ ∑ j j H H w j max (Υ (Φ )) − min (Υ (Φ )) ~ ~ j j H H j =1 Obj (Φ) = + ρ (Φ) J Υ ( η ) − min (Υ ( η )) ( ) ∑ H j H j w j max (Υ ( η )) − min (Υ ( η )) H j H j j =1

  36. Penalization Penalization J Υ (Φ ) − min (Υ (Φ )) ( ) ~ ~ ∑ j j H H w j max (Υ (Φ )) − min (Υ (Φ )) ~ ~ j j H H j =1 Obj (Φ) = + ρ (Φ) J Υ ( η ) − min (Υ ( η )) ( ) ∑ H j H j w j max (Υ ( η )) − min (Υ ( η )) H j H j j =1

  37. The refactoring repair functions account a catalog of 10 constraints based on The refactoring repair functions account a catalog of 10 constraints based on object-oriented guidelines to perform repairs on the individuals object-oriented guidelines to perform repairs on the individuals

  38. We design 6 genetic operators for the Hybrid Optimization employed We design 6 genetic operators for the Hybrid Optimization employed

  39. [Empirical Refactoring] Computational Technique Design [Empirical Refactoring] Computational Technique Design

  40. Building a metaphor of the system

  41. Compute "Actual Metrics"

  42. Configure Individuals given Fowler's Catalog

  43. Use unalcol

  44. Use Estimation (RIPE) and Compute Fitness

  45. Report in a Json File

  46. Technique Validation Technique Validation

  47. Preliminary Experiment: Do-ability using a Shapiro-Wilk Test (non-normal Preliminary Experiment: Do-ability using a Shapiro-Wilk Test (non-normal distribution) distribution) Algorithm CCODEC[2000] ACRA[60000] Hill 0.0049 0.0015 Climbing Simulated A. 0.0222 0.0157 HaEa 0.0144 0.0340

  48. Large Evaluations ACRA[60000] Large Evaluations ACRA[60000] Hill Climbing

  49. Large Evaluations ACRA[60000] Large Evaluations ACRA[60000] Simulated Annealing

  50. Large Evaluations ACRA[60000] Large Evaluations ACRA[60000]

  51. Large Evaluations ACRA[60000] for HaEa Large Evaluations ACRA[60000] for HaEa

  52. Large Evaluations ACRA[60000] for HaEa Large Evaluations ACRA[60000] for HaEa

  53. Discussion Discussion

Recommend


More recommend