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

assessing single objective performance assessing single
SMART_READER_LITE
LIVE PREVIEW

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.


slide-1
SLIDE 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

slide-2
SLIDE 2

Terminology Terminology

slide-3
SLIDE 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)

slide-4
SLIDE 4

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

slide-5
SLIDE 5

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

slide-6
SLIDE 6

State-of-the-art State-of-the-art

slide-7
SLIDE 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

slide-8
SLIDE 8

A A classical perspective classical perspective of the Refactoring Detection Problem

  • f the Refactoring Detection Problem
slide-9
SLIDE 9

A A proposed perspective proposed perspective of the Refactoring Detection Problem

  • f the Refactoring Detection Problem
slide-10
SLIDE 10

Proposed Technique Proposed Technique

slide-11
SLIDE 11

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

slide-12
SLIDE 12

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

slide-13
SLIDE 13

[Theoretical Refactoring] Software Formalization [Theoretical Refactoring] Software Formalization

slide-14
SLIDE 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

slide-15
SLIDE 15

A single class is a Cartesian product represented by A single class is a Cartesian product represented by

c = str × str × str

α ∗ ∗

slide-16
SLIDE 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)

slide-17
SLIDE 17

M = str = (str)

⋃n=0

n

A = str = (str)

⋃n=0

n

M ⊆ N A ⊆ N

What about What about Methods Methods and and Fields Fields?

slide-18
SLIDE 18

R : Ω ⟶ (CodeModification)

δ

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

δ : Specific Refactoring Operation

Specific Refactoring Operation

slide-19
SLIDE 19

R : Ω ⟶ (CodeModification)

δ

How to create the parameters? How to create the parameters?

slide-20
SLIDE 20

R : Ω ⟶ (CodeModification)

δ

From From Source Source to to Target Target Classes Classes

R : c × A × M × c ⟶ (CodeModification)

δ s s s t

slide-21
SLIDE 21

η : c ⟶ R

j α

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

slide-22
SLIDE 22
slide-23
SLIDE 23

η : c ⟶ R

j α

We can compute any specific metric (e.g., LOC, CYCLO, LCOM2) We can compute any specific metric (e.g., LOC, CYCLO, LCOM2)

H ∈ R

α j

H = {η (c ), η (c ), ..., η (c )}

α 1 α 2 α j α

slide-24
SLIDE 24

[Theoretical Refactoring] Software Formalization [Theoretical Refactoring] Software Formalization

slide-25
SLIDE 25

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)

Prediction (c ) = (c )

δ,j α

η ~δ,j

α

slide-26
SLIDE 26

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

slide-27
SLIDE 27

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

j α

: c ⟶ R ηδ,j ~

α

Actual Actual Metrics Metrics Forecasted Forecasted Metrics Metrics

slide-28
SLIDE 28

[Theoretical Refactoring] Combinatorial Optimization [Theoretical Refactoring] Combinatorial Optimization

slide-29
SLIDE 29

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)

slide-30
SLIDE 30

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

  • f 10,000 whether the sequence is composed of one refactoring
  • f 10,000 whether the sequence is composed of one refactoring

(C ∗ A ∗ M)

2 r

ARGen search space ARGen search space

slide-31
SLIDE 31

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

slide-32
SLIDE 32

Set of refactoring operations Set of refactoring operations

Obj(Φ) = + ρ(Φ) w

j=1

J

(

j max(Υ (η )) − min(Υ (η )) H j H j

Υ (η ) − min(Υ (η ))

H j H j

) w

j=1

J

(

j max(Υ (Φ )) − min(Υ (Φ )) H ~ j H ~ j

Υ (Φ ) − min(Υ (Φ ))

H ~ j H ~ j

)

slide-33
SLIDE 33

Min-max normalization Min-max normalization

Obj(Φ) = + ρ(Φ) w

j=1

J

(

j max(Υ (η )) − min(Υ (η )) H j H j

Υ (η ) − min(Υ (η ))

H j H j

) w

j=1

J

(

j max(Υ (Φ )) − min(Υ (Φ )) H ~ j H ~ j

Υ (Φ ) − min(Υ (Φ ))

H ~ j H ~ j

)

slide-34
SLIDE 34

Developers' information Developers' information

Obj(Φ) = + ρ(Φ) w

j=1

J

(

j max(Υ (η )) − min(Υ (η )) H j H j

Υ (η ) − min(Υ (η ))

H j H j

) w

j=1

J

(

j max(Υ (Φ )) − min(Υ (Φ )) H ~ j H ~ j

Υ (Φ ) − min(Υ (Φ ))

H ~ j H ~ j

)

slide-35
SLIDE 35

Actual Metrics Actual Metrics

Obj(Φ) = + ρ(Φ) w

j=1

J

(

j max(Υ (η )) − min(Υ (η )) H j H j

Υ (η ) − min(Υ (η ))

H j H j

) w

j=1

J

(

j max(Υ (Φ )) − min(Υ (Φ )) H ~ j H ~ j

Υ (Φ ) − min(Υ (Φ ))

H ~ j H ~ j

)

slide-36
SLIDE 36

Estimated Metrics Estimated Metrics

Obj(Φ) = + ρ(Φ) w

j=1

J

(

j max(Υ (η )) − min(Υ (η )) H j H j

Υ (η ) − min(Υ (η ))

H j H j

) w

j=1

J

(

j max(Υ (Φ )) − min(Υ (Φ )) H ~ j H ~ j

Υ (Φ ) − min(Υ (Φ ))

H ~ j H ~ j

)

slide-37
SLIDE 37

Penalization Penalization

Obj(Φ) = + ρ(Φ) w

j=1

J

(

j max(Υ (η )) − min(Υ (η )) H j H j

Υ (η ) − min(Υ (η ))

H j H j

) w

j=1

J

(

j max(Υ (Φ )) − min(Υ (Φ )) H ~ j H ~ j

Υ (Φ ) − min(Υ (Φ ))

H ~ j H ~ j

)

slide-38
SLIDE 38

The refactoring repair functions account a catalog of 10 constraints based on The refactoring repair functions account a catalog of 10 constraints based on

  • bject-oriented guidelines to perform repairs on the individuals
  • bject-oriented guidelines to perform repairs on the individuals
slide-39
SLIDE 39

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

slide-40
SLIDE 40

[Empirical Refactoring] Computational Technique Design [Empirical Refactoring] Computational Technique Design

slide-41
SLIDE 41

Building a metaphor of the system

slide-42
SLIDE 42

Compute "Actual Metrics"

slide-43
SLIDE 43

Configure Individuals given Fowler's Catalog

slide-44
SLIDE 44

Use unalcol

slide-45
SLIDE 45

Use Estimation (RIPE) and Compute Fitness

slide-46
SLIDE 46

Report in a Json File

slide-47
SLIDE 47

Technique Validation Technique Validation

slide-48
SLIDE 48

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 Climbing 0.0049 0.0015 Simulated A. 0.0222 0.0157 HaEa 0.0144 0.0340

slide-49
SLIDE 49

Large Evaluations ACRA[60000] Large Evaluations ACRA[60000]

Hill Climbing

slide-50
SLIDE 50

Large Evaluations ACRA[60000] Large Evaluations ACRA[60000]

Simulated Annealing

slide-51
SLIDE 51

Large Evaluations ACRA[60000] Large Evaluations ACRA[60000]

slide-52
SLIDE 52

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

slide-53
SLIDE 53

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

slide-54
SLIDE 54

Discussion Discussion

slide-55
SLIDE 55

Key Findings Key Findings

Hybrid Evolutionary Approach has lower values results in large iterations (0.95 +/- 0.003 [60000]) Evolutionary Algorithms seems to work better than baseline (p-value <= 0.0002) The main inconvenient during execution was latency, we had to redeploy and test with new parameters

slide-56
SLIDE 56

Strengths Strengths

Unified Mathematical Approximation A definition, a development, and an evaluation of ARGen Performance and complexity validation

slide-57
SLIDE 57

Limitations Limitations

slide-58
SLIDE 58

Future Work Future Work

slide-59
SLIDE 59

The refactoring consistency metric is based on Archipelago (Zarras, et al. The refactoring consistency metric is based on Archipelago (Zarras, et al. 2015) 2015)

RCM = Π+ +Θ

Λ λ

π

slide-60
SLIDE 60

Involving self-organization and artificial minds Involving self-organization and artificial minds

slide-61
SLIDE 61

Conclusion Conclusion

slide-62
SLIDE 62
slide-63
SLIDE 63
slide-64
SLIDE 64
slide-65
SLIDE 65
slide-66
SLIDE 66

Thank you! :) Thank you! :)