SlideShare a Scribd company logo
Advanced Differencing of Legacy
Code and Migration Logs
Céline Deknop, Johan Fabry,
Kim Mens and Vadim Zaytsev
13th Seminar Series on Advanced Techniques & Tools for Software Evolution
Online, 01/02 July 2020 1
Code differencing today
Original algorithm by Hunt and McIlroy in
1976
J. W. Hunt and M. D. McIlroy. An Algorithm for Differential File Comparison. CSTR #41, Bell Telephone
Laboratories, 197
2
Code differencing today
Original algorithm by Hunt and McIlroy in
1976
Hasn’t changed much since
J. W. Hunt and M. D. McIlroy. An Algorithm for Differential File Comparison. CSTR #41, Bell Telephone
Laboratories, 197
3
Code differencing today
Original algorithm by Hunt and McIlroy in
1976
Hasn’t changed much since
Isn’t always easy to interpret
➔ Can get very long
➔ Structured by file
➔ No use of the semantics
J. W. Hunt and M. D. McIlroy. An Algorithm for Differential File Comparison. CSTR #41, Bell Telephone
Laboratories, 197
4
Code differencing today
Original algorithm by Hunt and McIlroy in
1976
Hasn’t changed much since
Isn’t always easy to interpret
➔ Can get very long
➔ Structured by file
➔ No use of the semantics
This makes the process of analysing diffs very
tedious.
J. W. Hunt and M. D. McIlroy. An Algorithm for Differential File Comparison. CSTR #41, Bell Telephone
Laboratories, 197
5
Case study
Raincode Labs works in modernisation of legacy software.
Many projects of that sort, the one we are interested in being PACBASE
migration.
6
Case study
Raincode Labs works in modernisation of legacy software.
Many projects of that sort, the one we are interested in being PACBASE
migration.
Refactors generated COBOL it to make it more maintainable.
7
Case study: step 1
Decide of the rules to apply
8
Case study: step 2
Run the migration on a few programs
9
Case study: step 2
Run the migration on a few programs
Test the output
10
Case study (concretely)
11
Case study: manual processes
Identify where manual work is being done in migration projects
12
Case study: manual processes
Identify where manual work is being done in migration projects
➔ In the redelivery process
13
Case study: redelivery process
14
Case study: redelivery process
15
Case study: redelivery process
16
Case study: redelivery process
17
Case study: redelivery process
18
Case study: manual processes
The client now has question on the new version : it hasn’t been tested !
19
Case study: manual processes
The client now has question on the new version : it hasn’t been tested !
➔ Is it safe for production ?
20
Case study: manual processes
The client now has question on the new version : it hasn’t been tested !
➔ Is it safe for production ?
➔ What changed ?
21
Case study: manual processes
The client now has question on the new version : it hasn’t been tested !
➔ Is it safe for production ?
➔ What changed ?
➔ Why did it change ?
22
Case study: manual processes
The client now has question on the new version : it hasn’t been tested !
➔ Is it safe for production ?
➔ What changed ?
➔ Why did it change ?
Raincode perform a manual analysis to try to answer.
23
Case study: manual processes
The client now has question on the new version : it hasn’t been tested !
➔ Is it safe for production ?
➔ What changed ?
➔ Why did it change ?
Raincode perform a manual analysis to try to answer.
➔ Using diffs and logs of the migration process
24
Needs to be time-efficient!
25
Communication problem
Leads engineers to do it “quick and dirty”.
Analysis is done based on instinct and previous experience.
26
Communication problem
Leads engineers to do it “quick and dirty”.
Analysis is done based on instinct and previous experience.
➔ Clients do not receive full, detailed explanation
➔ Sometimes leads to more time loss
27
Our goal
Create tools to help Raincode explain to their clients
➔ Where the code has or hasn’t changed
➔ How it has changed
➔ Why it has changed
28
Our goal
Create tools to help Raincode explain to their clients
➔ Where the code has or hasn’t changed
➔ How it has changed
➔ Why it has changed
In an easy to understand format
29
Give a more global vue using reduced-flow graphs.
We plan to use the two migrated versions.
How and where the code has changed
30
How and where the code has changed
Give a more global vue using reduced-flow graphs.
We plan to use the two migrated versions.
J. W. Laski and W. Szermer. Identification of Program Modifications and Its Applications in Software Maintenance. InICSM, pages 282–290. IEEE, 1992
31
Points precisely at where things changed
How and where the code has changed
J. W. Laski and W. Szermer. Identification of Program Modifications and Its Applications in Software Maintenance. InICSM, pages 282–290. IEEE, 1992
32
We plan to use the two migration logs.
Why it changed
33
Intermediate version
Loop initialisation
Removing labels
Removing NOP instructions
Recognizing loop-like patterns
Dead code removal
Write only var
Removed If inside loop
Intermediate version
Remove Thru in Performs
Perform to perform
Ruptures Simplification
IF factorisation
IF conjunction
consecutive IFs into IF THEN ELSIF
PERFORM VARYING
We plan to use the two migration logs.
Why it changed
34
Intermediate version
Loop initialisation
Removing labels
Removing NOP instructions
Recognizing loop-like patterns
Dead code removal
Write only var
Removed If inside loop
Intermediate version
Remove Thru in Performs
Perform to perform
Ruptures Simplification
IF factorisation
IF conjunction
consecutive IFs into IF THEN ELSIF
PERFORM VARYING
We plan to use the two migration logs.
Why it changed
35
Intermediate version
Loop initialisation
Removing labels
Removing NOP instructions
Recognizing loop-like patterns
Dead code removal
Write only var
Removed If inside loop
Intermediate version
Remove Thru in Performs
Perform to perform
Ruptures Simplification
IF factorisation
IF conjunction
consecutive IFs into IF THEN ELSIF
PERFORM VARYING
We plan to use the two migration logs.
Construct FSA representing the steps of the
process.
Why it changed
M. Goldstein, D. Raz, and I. Segall. Experience Report:Log-Based Behavioral Differencing. InISSRE, pages 282–293, 2017
36
We plan to use the two migration logs.
Construct FSA representing the steps of the
process.
Diff the FSAs to represent changes
Why it changed
M. Goldstein, D. Raz, and I. Segall. Experience Report:Log-Based Behavioral Differencing. InISSRE, pages 282–293, 201
37
Initial version of file (shortened)
Early results of log differencing
38
Intermediate version
consecutive IFs into IF THEN ELSIF
Loop initialisation
Removing labels
...
Second version of file (shortened)
Early results of log differencing
39
Intermediate version
consecutive IFs into IF THEN ELSIF
Intermediate version
consecutive IFs into IF THEN ELSIF
Intermediate version
consecutive IFs into IF THEN ELSIF
Loop initialisation
...
Diff of both graphs
➔ Change is simply expressed by change in probability
and a new path possible
Early results of log differencing
40
Two ideas to explore for advanced code differencing:
➔ Use control-flow graphs to perform coarser diffs
➔ Use logs and FSAs to understand why things changed (started)
Conclusion
41
Two ideas to explore for advanced code differencing:
➔ Use control-flow graphs to perform coarser diffs
➔ Use logs and FSAs to understand why things changed (started)
Thank you for your attention !
Conclusion
42

More Related Content

Similar to Sattose 2020 presentation

Continuous Delivery Overview
Continuous Delivery OverviewContinuous Delivery Overview
Continuous Delivery Overview
Luca Minudel
 
Process Mining and Predictive Process Monitoring
Process Mining and Predictive Process MonitoringProcess Mining and Predictive Process Monitoring
Process Mining and Predictive Process Monitoring
Marlon Dumas
 
Dipping Your Toes Into Cloud Native Application Development
Dipping Your Toes Into Cloud Native Application DevelopmentDipping Your Toes Into Cloud Native Application Development
Dipping Your Toes Into Cloud Native Application Development
Matthew Farina
 
Relational Database CI/CD
Relational Database CI/CDRelational Database CI/CD
Relational Database CI/CD
Jasmin Fluri
 
Of Changes and Their History
Of Changes and Their HistoryOf Changes and Their History
Of Changes and Their History
University of Zurich
 
The Impact of Task Granularity on Co-evolution Analyses
The Impact of Task Granularity on Co-evolution AnalysesThe Impact of Task Granularity on Co-evolution Analyses
The Impact of Task Granularity on Co-evolution Analyses
SAIL_QU
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More Defects
TechWell
 
Fifteen Years of DevOps -- LISA 2012 keynote
Fifteen Years of DevOps -- LISA 2012 keynoteFifteen Years of DevOps -- LISA 2012 keynote
Fifteen Years of DevOps -- LISA 2012 keynote
Geoff Halprin
 
Subverting the monolith!
Subverting the monolith!Subverting the monolith!
Subverting the monolith!
Sophia Russell
 
Keeping Your DevOps Transformation From Crushing Your Ops Capacity
Keeping Your DevOps Transformation From Crushing Your Ops Capacity Keeping Your DevOps Transformation From Crushing Your Ops Capacity
Keeping Your DevOps Transformation From Crushing Your Ops Capacity
Rundeck
 
Cross-Project Build Co-change Prediction
Cross-Project Build Co-change PredictionCross-Project Build Co-change Prediction
Cross-Project Build Co-change Prediction
Shane McIntosh
 
Making Observability Actionable At Scale - DBS DevConnect 2019
Making Observability Actionable At Scale - DBS DevConnect 2019Making Observability Actionable At Scale - DBS DevConnect 2019
Making Observability Actionable At Scale - DBS DevConnect 2019
Squadcast Inc
 
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Just In Time Scalability  Agile Methods To Support Massive Growth PresentationJust In Time Scalability  Agile Methods To Support Massive Growth Presentation
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Timothy Fitz
 
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Just In Time Scalability  Agile Methods To Support Massive Growth PresentationJust In Time Scalability  Agile Methods To Support Massive Growth Presentation
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Eric Ries
 
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Marcin Grzejszczak
 
Speeding up your team with GitOps
Speeding up your team with GitOpsSpeeding up your team with GitOps
Speeding up your team with GitOps
Brice Fernandes
 
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Jorge Hidalgo
 
Prepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/GreenPrepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/Green
Sonatype
 
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
All Day DevOps 2016 Fabian - Defending Thyself with Blue GreenAll Day DevOps 2016 Fabian - Defending Thyself with Blue Green
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
Fab L
 
Let's not rewrite it all
Let's not rewrite it allLet's not rewrite it all
Let's not rewrite it all
Michelle Brush
 

Similar to Sattose 2020 presentation (20)

Continuous Delivery Overview
Continuous Delivery OverviewContinuous Delivery Overview
Continuous Delivery Overview
 
Process Mining and Predictive Process Monitoring
Process Mining and Predictive Process MonitoringProcess Mining and Predictive Process Monitoring
Process Mining and Predictive Process Monitoring
 
Dipping Your Toes Into Cloud Native Application Development
Dipping Your Toes Into Cloud Native Application DevelopmentDipping Your Toes Into Cloud Native Application Development
Dipping Your Toes Into Cloud Native Application Development
 
Relational Database CI/CD
Relational Database CI/CDRelational Database CI/CD
Relational Database CI/CD
 
Of Changes and Their History
Of Changes and Their HistoryOf Changes and Their History
Of Changes and Their History
 
The Impact of Task Granularity on Co-evolution Analyses
The Impact of Task Granularity on Co-evolution AnalysesThe Impact of Task Granularity on Co-evolution Analyses
The Impact of Task Granularity on Co-evolution Analyses
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More Defects
 
Fifteen Years of DevOps -- LISA 2012 keynote
Fifteen Years of DevOps -- LISA 2012 keynoteFifteen Years of DevOps -- LISA 2012 keynote
Fifteen Years of DevOps -- LISA 2012 keynote
 
Subverting the monolith!
Subverting the monolith!Subverting the monolith!
Subverting the monolith!
 
Keeping Your DevOps Transformation From Crushing Your Ops Capacity
Keeping Your DevOps Transformation From Crushing Your Ops Capacity Keeping Your DevOps Transformation From Crushing Your Ops Capacity
Keeping Your DevOps Transformation From Crushing Your Ops Capacity
 
Cross-Project Build Co-change Prediction
Cross-Project Build Co-change PredictionCross-Project Build Co-change Prediction
Cross-Project Build Co-change Prediction
 
Making Observability Actionable At Scale - DBS DevConnect 2019
Making Observability Actionable At Scale - DBS DevConnect 2019Making Observability Actionable At Scale - DBS DevConnect 2019
Making Observability Actionable At Scale - DBS DevConnect 2019
 
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Just In Time Scalability  Agile Methods To Support Massive Growth PresentationJust In Time Scalability  Agile Methods To Support Massive Growth Presentation
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
 
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Just In Time Scalability  Agile Methods To Support Massive Growth PresentationJust In Time Scalability  Agile Methods To Support Massive Growth Presentation
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
 
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
 
Speeding up your team with GitOps
Speeding up your team with GitOpsSpeeding up your team with GitOps
Speeding up your team with GitOps
 
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
 
Prepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/GreenPrepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/Green
 
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
All Day DevOps 2016 Fabian - Defending Thyself with Blue GreenAll Day DevOps 2016 Fabian - Defending Thyself with Blue Green
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
 
Let's not rewrite it all
Let's not rewrite it allLet's not rewrite it all
Let's not rewrite it all
 

Recently uploaded

ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
HODECEDSIET
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 

Recently uploaded (20)

ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 

Sattose 2020 presentation

  • 1. Advanced Differencing of Legacy Code and Migration Logs Céline Deknop, Johan Fabry, Kim Mens and Vadim Zaytsev 13th Seminar Series on Advanced Techniques & Tools for Software Evolution Online, 01/02 July 2020 1
  • 2. Code differencing today Original algorithm by Hunt and McIlroy in 1976 J. W. Hunt and M. D. McIlroy. An Algorithm for Differential File Comparison. CSTR #41, Bell Telephone Laboratories, 197 2
  • 3. Code differencing today Original algorithm by Hunt and McIlroy in 1976 Hasn’t changed much since J. W. Hunt and M. D. McIlroy. An Algorithm for Differential File Comparison. CSTR #41, Bell Telephone Laboratories, 197 3
  • 4. Code differencing today Original algorithm by Hunt and McIlroy in 1976 Hasn’t changed much since Isn’t always easy to interpret ➔ Can get very long ➔ Structured by file ➔ No use of the semantics J. W. Hunt and M. D. McIlroy. An Algorithm for Differential File Comparison. CSTR #41, Bell Telephone Laboratories, 197 4
  • 5. Code differencing today Original algorithm by Hunt and McIlroy in 1976 Hasn’t changed much since Isn’t always easy to interpret ➔ Can get very long ➔ Structured by file ➔ No use of the semantics This makes the process of analysing diffs very tedious. J. W. Hunt and M. D. McIlroy. An Algorithm for Differential File Comparison. CSTR #41, Bell Telephone Laboratories, 197 5
  • 6. Case study Raincode Labs works in modernisation of legacy software. Many projects of that sort, the one we are interested in being PACBASE migration. 6
  • 7. Case study Raincode Labs works in modernisation of legacy software. Many projects of that sort, the one we are interested in being PACBASE migration. Refactors generated COBOL it to make it more maintainable. 7
  • 8. Case study: step 1 Decide of the rules to apply 8
  • 9. Case study: step 2 Run the migration on a few programs 9
  • 10. Case study: step 2 Run the migration on a few programs Test the output 10
  • 12. Case study: manual processes Identify where manual work is being done in migration projects 12
  • 13. Case study: manual processes Identify where manual work is being done in migration projects ➔ In the redelivery process 13
  • 19. Case study: manual processes The client now has question on the new version : it hasn’t been tested ! 19
  • 20. Case study: manual processes The client now has question on the new version : it hasn’t been tested ! ➔ Is it safe for production ? 20
  • 21. Case study: manual processes The client now has question on the new version : it hasn’t been tested ! ➔ Is it safe for production ? ➔ What changed ? 21
  • 22. Case study: manual processes The client now has question on the new version : it hasn’t been tested ! ➔ Is it safe for production ? ➔ What changed ? ➔ Why did it change ? 22
  • 23. Case study: manual processes The client now has question on the new version : it hasn’t been tested ! ➔ Is it safe for production ? ➔ What changed ? ➔ Why did it change ? Raincode perform a manual analysis to try to answer. 23
  • 24. Case study: manual processes The client now has question on the new version : it hasn’t been tested ! ➔ Is it safe for production ? ➔ What changed ? ➔ Why did it change ? Raincode perform a manual analysis to try to answer. ➔ Using diffs and logs of the migration process 24
  • 25. Needs to be time-efficient! 25
  • 26. Communication problem Leads engineers to do it “quick and dirty”. Analysis is done based on instinct and previous experience. 26
  • 27. Communication problem Leads engineers to do it “quick and dirty”. Analysis is done based on instinct and previous experience. ➔ Clients do not receive full, detailed explanation ➔ Sometimes leads to more time loss 27
  • 28. Our goal Create tools to help Raincode explain to their clients ➔ Where the code has or hasn’t changed ➔ How it has changed ➔ Why it has changed 28
  • 29. Our goal Create tools to help Raincode explain to their clients ➔ Where the code has or hasn’t changed ➔ How it has changed ➔ Why it has changed In an easy to understand format 29
  • 30. Give a more global vue using reduced-flow graphs. We plan to use the two migrated versions. How and where the code has changed 30
  • 31. How and where the code has changed Give a more global vue using reduced-flow graphs. We plan to use the two migrated versions. J. W. Laski and W. Szermer. Identification of Program Modifications and Its Applications in Software Maintenance. InICSM, pages 282–290. IEEE, 1992 31
  • 32. Points precisely at where things changed How and where the code has changed J. W. Laski and W. Szermer. Identification of Program Modifications and Its Applications in Software Maintenance. InICSM, pages 282–290. IEEE, 1992 32
  • 33. We plan to use the two migration logs. Why it changed 33 Intermediate version Loop initialisation Removing labels Removing NOP instructions Recognizing loop-like patterns Dead code removal Write only var Removed If inside loop Intermediate version Remove Thru in Performs Perform to perform Ruptures Simplification IF factorisation IF conjunction consecutive IFs into IF THEN ELSIF PERFORM VARYING
  • 34. We plan to use the two migration logs. Why it changed 34 Intermediate version Loop initialisation Removing labels Removing NOP instructions Recognizing loop-like patterns Dead code removal Write only var Removed If inside loop Intermediate version Remove Thru in Performs Perform to perform Ruptures Simplification IF factorisation IF conjunction consecutive IFs into IF THEN ELSIF PERFORM VARYING
  • 35. We plan to use the two migration logs. Why it changed 35 Intermediate version Loop initialisation Removing labels Removing NOP instructions Recognizing loop-like patterns Dead code removal Write only var Removed If inside loop Intermediate version Remove Thru in Performs Perform to perform Ruptures Simplification IF factorisation IF conjunction consecutive IFs into IF THEN ELSIF PERFORM VARYING
  • 36. We plan to use the two migration logs. Construct FSA representing the steps of the process. Why it changed M. Goldstein, D. Raz, and I. Segall. Experience Report:Log-Based Behavioral Differencing. InISSRE, pages 282–293, 2017 36
  • 37. We plan to use the two migration logs. Construct FSA representing the steps of the process. Diff the FSAs to represent changes Why it changed M. Goldstein, D. Raz, and I. Segall. Experience Report:Log-Based Behavioral Differencing. InISSRE, pages 282–293, 201 37
  • 38. Initial version of file (shortened) Early results of log differencing 38 Intermediate version consecutive IFs into IF THEN ELSIF Loop initialisation Removing labels ...
  • 39. Second version of file (shortened) Early results of log differencing 39 Intermediate version consecutive IFs into IF THEN ELSIF Intermediate version consecutive IFs into IF THEN ELSIF Intermediate version consecutive IFs into IF THEN ELSIF Loop initialisation ...
  • 40. Diff of both graphs ➔ Change is simply expressed by change in probability and a new path possible Early results of log differencing 40
  • 41. Two ideas to explore for advanced code differencing: ➔ Use control-flow graphs to perform coarser diffs ➔ Use logs and FSAs to understand why things changed (started) Conclusion 41
  • 42. Two ideas to explore for advanced code differencing: ➔ Use control-flow graphs to perform coarser diffs ➔ Use logs and FSAs to understand why things changed (started) Thank you for your attention ! Conclusion 42