SlideShare a Scribd company logo
1 of 29
SCCH is an initiative of SCCH is located in
Integration of Static and Dynamic Analysis for
Understanding Legacy Source Code
Michael Moser
+43 7236 3343 814
michael.moser@scch.at
www.scch.at
ICSME’16, Industry Track, 06.10.2016
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
An Industry Collaboration
2© Software Competence Center Hagenberg GmbH
Michael Moser
michael.moser@scch.at
Pichler Josef
josef.pichler@scch.at
Wilhelm Kirchmayr
wilhelm.kirchmayr@voestalpine.com
Ludwig Nocke
ludwig.nocke@voestalpine.com
Rudolf Tober
wilhelm.kirchmayr@voestalpine.com
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
3© Software Competence Center Hagenberg GmbH
Background: Mr. Kaufmann’s Process Models
Mr. Kaufmann
(Process Engineer)
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
4© Software Competence Center Hagenberg GmbH
Background: Mr. Kaufmann’s Process Models
Mr. Kaufmann
(Process Engineer)
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
5© Software Competence Center Hagenberg GmbH
Background: Mr. Kaufmann’s Process Models
Mr. Kaufmann
(Process Engineer)
controlled by
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
6© Software Competence Center Hagenberg GmbH
Background: Mr. Kaufmann’s Process Models
Mr. Kaufmann
(Process Engineer)
controlled by feedback from
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
7© Software Competence Center Hagenberg GmbH
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
C++, 5600 LoC
Core Model created by 3rd
party company
20 model outputs from 22 inputs
Evolved in a multi-shell model
Background: Mr. Kaufmann’s Process Models
DeMo - Process model for desulphurization
Influence of input values not documented
Mr. Kaufmann
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
8© Software Competence Center Hagenberg GmbH
Mr. Kaufmann
(retired)
Background: Mr. Kaufmann’s Process Models
Mr. Bauer / Mr. Huber
(Process Engineers)
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
9© Software Competence Center Hagenberg GmbH
Background: Mr. Kaufmann’s Process Models
Questions ???
What is the formula for a model result?
Which input values affect which result?
What are all results of a process model?
Mr. Kaufmann
(retired)
Mr. Bauer / Mr. Huber
(Process Engineers)
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Starting Point: Requirements and Goals
10© Software Competence Center Hagenberg GmbH
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Documentation requested!
Simplify maintenance and optimization
Grant quick overview of the system
Capture dependencies between inputs and outputs
Flexible clipping of model source code
Reflect the hierarchical structure
Offline documentation
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
use of dynamic analysis
Examine program execution
Do not fully capture behavior
Needed: Model Interpretation
Include values from model execution
Merge with results from static analysis
Starting Point: Overall Approach
11
use of static analysis
Analyze entire program sources
Extract abstract representations
Application of RbG* to extract
Mathematical formulae
Decision tables / path conditions
Essential program structures
Needed: Stepwise Computation
from a model input to its outputs
Out1
Var1
In1
Var2
In2
Out1
Var1
In1
Var2
In2
input
values
*M. Moser and J. Pichler: RbG: A Documentation Generator
for Scientific and Engineering Software, (SANER 2015)
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Example: A process model
12© Software Competence Center Hagenberg GmbH
Calling Context
typedef struct {
double snow_density;
} output;
typedef struct {
double snow_height;
double gamma_rho_S;
bool useFudgeFactor;
} input;
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Example: A process model
13© Software Competence Center Hagenberg GmbH
Pre processing of input in outer shell
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Example: A process model
14© Software Competence Center Hagenberg GmbH
Execution of core computational model
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Example: A process model
15© Software Competence Center Hagenberg GmbH
Post processing of result data
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Results for Example: Stepwise Computation
Symbol Formula Path Condition Input
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Results for Example: Stepwise Computation
Symbol Formula Path Condition Input
One table for each result
One row for each computation that may influence result
Variables used within definitions are repeatedly resolved
Variable names may be replaced with symbol info
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
18© Software Competence Center Hagenberg GmbH
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Results for Example: Model Execution
Symbol Formula Value Path Condition Input
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
19© Software Competence Center Hagenberg GmbH
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Results for Example: Model Execution
Symbol Formula Value Path Condition Input
Results from model execution merged with static tables
Model execution with concrete input values
Unexecuted rows are hidden
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
20© Software Competence Center Hagenberg GmbH
Results for Example: Model Execution
Symbol Formula Value Path Condition Input
Results from model execution merged with static tables
Model execution with concrete input values
Unexecuted rows can be displayed
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Results for Example: Big Picture
21© Software Competence Center Hagenberg GmbH
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Results for Example: Big Picture
22© Software Competence Center Hagenberg GmbH
Fits on a sheet of paper
C++ methods and functions
Ordered call relations
Sub model clustering
Database access
Side-by-side with code
Packaged with documentation
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
dynamic analysis
model execution
program interpretation
flow-sensitive analysis
inter-procedural control-flow-graph
Specification of concrete values
Merge with stepwise computation
Analysis: A little more details
23© Software Competence Center Hagenberg GmbH
static analysis
stepwise computation
Construction of use-definition chains
Inter-procedural control-flow-graph
Forward propagation of definitions
Use-Definition chains per model output
“Entry-Point” Aware
big picture
Call-graph analysis
Pattern-matching
Out1
Var1
In1
Var2
In2
Out1
Var1
In1
Var2
In2
input
values
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Results: Tool Support for Documentation Generation
24© Software Competence Center Hagenberg GmbH
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Results: Lessons Learned from DeMo Process Model
25© Software Competence Center Hagenberg GmbH
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Results: Lessons Learned from DeMo Process Model
26© Software Competence Center Hagenberg GmbH
domain experts provided
model outputs and model inputs
2 entry point definitions (F1, F2)
3 sets of input values
core entry point (F2)
21 outputs, 22 inputs
significant drop of rows
reduction 78% - 98%
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Limitations: For the General Case
27© Software Competence Center Hagenberg GmbH
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Implementation limited in several ways
Bindings are only statically resolved
No 100% language coverage for C++
Pointer arithmetic not supported
Missing input values yield incomplete results
Interpreted model execution vs. real program execution
Extraction of formulae is limited (partly on purpose)
Scalability of big picture representation
Limited
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
28© Software Competence Center Hagenberg GmbH
Take Aways / Summary Characterization of
computational models in
process control software
Integration of static and
dynamic program analysis
Documentation generation for a
real world process model
Dynamic analysis creates more
compact and understandable
documentation
Integration of Static and Dynamic Analysis for Understanding Legacy Source Code
Thanks and Discussion
Michael Moser
Software Analytics and Evolution
Software Competence Center Hagenberg, Austria
michael.moser@scch.at
29© Software Competence Center Hagenberg GmbH

More Related Content

What's hot

Managing large (and small) R based solutions with R Suite
Managing large (and small) R based solutions with R SuiteManaging large (and small) R based solutions with R Suite
Managing large (and small) R based solutions with R SuiteWit Jakuczun
 
Analytic hierarchy process for pif thomas fehlmann
Analytic hierarchy process for pif   thomas fehlmannAnalytic hierarchy process for pif   thomas fehlmann
Analytic hierarchy process for pif thomas fehlmannIWSM Mensura
 
Case Studies in advanced analytics with R
Case Studies in advanced analytics with RCase Studies in advanced analytics with R
Case Studies in advanced analytics with RWit Jakuczun
 
Adoption of a Graph Database in the Insurance Sector - Jan-Frederik Wilhelm &...
Adoption of a Graph Database in the Insurance Sector - Jan-Frederik Wilhelm &...Adoption of a Graph Database in the Insurance Sector - Jan-Frederik Wilhelm &...
Adoption of a Graph Database in the Insurance Sector - Jan-Frederik Wilhelm &...Neo4j
 
Impact Analysis using Graph DB
Impact Analysis using Graph DBImpact Analysis using Graph DB
Impact Analysis using Graph DBIgnaz Wanders
 
3D PDF Implementor Forum - Validation with CADIQ
3D PDF Implementor Forum - Validation with CADIQ3D PDF Implementor Forum - Validation with CADIQ
3D PDF Implementor Forum - Validation with CADIQ3dpdfconsortium
 
Ac2017 6. output based contracting
Ac2017   6. output based contractingAc2017   6. output based contracting
Ac2017 6. output based contractingNesma
 
Ac2017 8. metrics forprivacysafety-slides
Ac2017   8. metrics forprivacysafety-slidesAc2017   8. metrics forprivacysafety-slides
Ac2017 8. metrics forprivacysafety-slidesNesma
 
Do-It-Yourself ENOVIA PLM MIgration
Do-It-Yourself ENOVIA PLM MIgrationDo-It-Yourself ENOVIA PLM MIgration
Do-It-Yourself ENOVIA PLM MIgrationJoseph Lopez, M.ISM
 
Complex cloudification: Porting bare metal apps to telco cloud vnf
Complex cloudification: Porting bare metal apps to telco cloud vnfComplex cloudification: Porting bare metal apps to telco cloud vnf
Complex cloudification: Porting bare metal apps to telco cloud vnfComputaris
 
Introduction to Adaptive and 3DEXPERIENCE Cloud
Introduction to Adaptive and 3DEXPERIENCE CloudIntroduction to Adaptive and 3DEXPERIENCE Cloud
Introduction to Adaptive and 3DEXPERIENCE CloudAdaptive Corporation
 
Project design considerations for integration of oem skid equipment with plan...
Project design considerations for integration of oem skid equipment with plan...Project design considerations for integration of oem skid equipment with plan...
Project design considerations for integration of oem skid equipment with plan...IntelligentManufacturingInstitute
 

What's hot (17)

Managing large (and small) R based solutions with R Suite
Managing large (and small) R based solutions with R SuiteManaging large (and small) R based solutions with R Suite
Managing large (and small) R based solutions with R Suite
 
Analytic hierarchy process for pif thomas fehlmann
Analytic hierarchy process for pif   thomas fehlmannAnalytic hierarchy process for pif   thomas fehlmann
Analytic hierarchy process for pif thomas fehlmann
 
Case Studies in advanced analytics with R
Case Studies in advanced analytics with RCase Studies in advanced analytics with R
Case Studies in advanced analytics with R
 
Adoption of a Graph Database in the Insurance Sector - Jan-Frederik Wilhelm &...
Adoption of a Graph Database in the Insurance Sector - Jan-Frederik Wilhelm &...Adoption of a Graph Database in the Insurance Sector - Jan-Frederik Wilhelm &...
Adoption of a Graph Database in the Insurance Sector - Jan-Frederik Wilhelm &...
 
Showcase slide
Showcase slideShowcase slide
Showcase slide
 
Power Meter Presentation
Power Meter PresentationPower Meter Presentation
Power Meter Presentation
 
Impact Analysis using Graph DB
Impact Analysis using Graph DBImpact Analysis using Graph DB
Impact Analysis using Graph DB
 
3D PDF Implementor Forum - Validation with CADIQ
3D PDF Implementor Forum - Validation with CADIQ3D PDF Implementor Forum - Validation with CADIQ
3D PDF Implementor Forum - Validation with CADIQ
 
Ac2017 6. output based contracting
Ac2017   6. output based contractingAc2017   6. output based contracting
Ac2017 6. output based contracting
 
Ac2017 8. metrics forprivacysafety-slides
Ac2017   8. metrics forprivacysafety-slidesAc2017   8. metrics forprivacysafety-slides
Ac2017 8. metrics forprivacysafety-slides
 
Do-It-Yourself ENOVIA PLM MIgration
Do-It-Yourself ENOVIA PLM MIgrationDo-It-Yourself ENOVIA PLM MIgration
Do-It-Yourself ENOVIA PLM MIgration
 
Complex cloudification: Porting bare metal apps to telco cloud vnf
Complex cloudification: Porting bare metal apps to telco cloud vnfComplex cloudification: Porting bare metal apps to telco cloud vnf
Complex cloudification: Porting bare metal apps to telco cloud vnf
 
Introduction to Adaptive and 3DEXPERIENCE Cloud
Introduction to Adaptive and 3DEXPERIENCE CloudIntroduction to Adaptive and 3DEXPERIENCE Cloud
Introduction to Adaptive and 3DEXPERIENCE Cloud
 
RuaumokoSuite
RuaumokoSuiteRuaumokoSuite
RuaumokoSuite
 
Project design considerations for integration of oem skid equipment with plan...
Project design considerations for integration of oem skid equipment with plan...Project design considerations for integration of oem skid equipment with plan...
Project design considerations for integration of oem skid equipment with plan...
 
PCB Virtual Prototyping with PSpice
PCB Virtual Prototyping with PSpicePCB Virtual Prototyping with PSpice
PCB Virtual Prototyping with PSpice
 
Q-ImPrESS
Q-ImPrESSQ-ImPrESS
Q-ImPrESS
 

Similar to Integration of static and dynamic analysis for understanding legacy source code

PLM System Integration with SAP S4HANA.pdf
PLM System Integration with SAP S4HANA.pdfPLM System Integration with SAP S4HANA.pdf
PLM System Integration with SAP S4HANA.pdfDeepikaBv4
 
Fault Detection using Python
Fault Detection using PythonFault Detection using Python
Fault Detection using PythonRishabh Garg
 
Automated Low Level Requirements Testing for DO-178C
Automated Low Level Requirements Testing for DO-178CAutomated Low Level Requirements Testing for DO-178C
Automated Low Level Requirements Testing for DO-178CQA Systems
 
The Evolution of Integration
The Evolution of IntegrationThe Evolution of Integration
The Evolution of IntegrationSoftware AG
 
Tech Days 2015: Model Based Development with QGen
Tech Days 2015: Model Based Development with QGenTech Days 2015: Model Based Development with QGen
Tech Days 2015: Model Based Development with QGenAdaCore
 
STAF/ICGT 2018 Introduction to graph-oriented programming
STAF/ICGT 2018 Introduction to graph-oriented programmingSTAF/ICGT 2018 Introduction to graph-oriented programming
STAF/ICGT 2018 Introduction to graph-oriented programmingOlivier REY
 
Model-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical SoftwareModel-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical Softwaregjuljo
 
Data Science Meets DevOps: GitOps with OpenShift (1).pdf
Data Science Meets DevOps: GitOps with OpenShift (1).pdfData Science Meets DevOps: GitOps with OpenShift (1).pdf
Data Science Meets DevOps: GitOps with OpenShift (1).pdfHemaVeeradhi1
 
Discover DoDAF problems early in the lifecycle with model execution
Discover DoDAF problems early in the lifecycle with model executionDiscover DoDAF problems early in the lifecycle with model execution
Discover DoDAF problems early in the lifecycle with model executionGraham Bleakley
 
Automated requirements based testing for ISO 26262
Automated requirements based testing for ISO 26262 Automated requirements based testing for ISO 26262
Automated requirements based testing for ISO 26262 QA Systems
 
Automated DevOps Dynamic Testing for CI and CD
Automated DevOps Dynamic Testing for CI and CDAutomated DevOps Dynamic Testing for CI and CD
Automated DevOps Dynamic Testing for CI and CDBethan Holmes
 
Webinar VB6 apps to html5
Webinar VB6 apps to html5Webinar VB6 apps to html5
Webinar VB6 apps to html5Gizmox
 
Rhapsody Software
Rhapsody SoftwareRhapsody Software
Rhapsody SoftwareBill Duncan
 
Software Architecture in Process Automation: UML & the "Smart Factory"
Software Architecture in Process Automation: UML & the "Smart Factory"Software Architecture in Process Automation: UML & the "Smart Factory"
Software Architecture in Process Automation: UML & the "Smart Factory"Heiko Koziolek
 
Advanced monitoring-in-wso2
Advanced monitoring-in-wso2Advanced monitoring-in-wso2
Advanced monitoring-in-wso2WSO2
 
LIFT: A Legacy InFormation retrieval Tool
LIFT: A Legacy InFormation retrieval ToolLIFT: A Legacy InFormation retrieval Tool
LIFT: A Legacy InFormation retrieval ToolKellyton Brito
 
Design Optimization of Safety Critical Component for Fatigue and Strength Usi...
Design Optimization of Safety Critical Component for Fatigue and Strength Usi...Design Optimization of Safety Critical Component for Fatigue and Strength Usi...
Design Optimization of Safety Critical Component for Fatigue and Strength Usi...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Saving resources with simulation webinar 092011
Saving resources with simulation webinar 092011Saving resources with simulation webinar 092011
Saving resources with simulation webinar 092011Scott Althouse
 
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsxABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsxAlessandro Lavazzi
 
Realizing Traceability for Safety and Certainty
Realizing Traceability for Safety and CertaintyRealizing Traceability for Safety and Certainty
Realizing Traceability for Safety and CertaintySteven Vettermann
 

Similar to Integration of static and dynamic analysis for understanding legacy source code (20)

PLM System Integration with SAP S4HANA.pdf
PLM System Integration with SAP S4HANA.pdfPLM System Integration with SAP S4HANA.pdf
PLM System Integration with SAP S4HANA.pdf
 
Fault Detection using Python
Fault Detection using PythonFault Detection using Python
Fault Detection using Python
 
Automated Low Level Requirements Testing for DO-178C
Automated Low Level Requirements Testing for DO-178CAutomated Low Level Requirements Testing for DO-178C
Automated Low Level Requirements Testing for DO-178C
 
The Evolution of Integration
The Evolution of IntegrationThe Evolution of Integration
The Evolution of Integration
 
Tech Days 2015: Model Based Development with QGen
Tech Days 2015: Model Based Development with QGenTech Days 2015: Model Based Development with QGen
Tech Days 2015: Model Based Development with QGen
 
STAF/ICGT 2018 Introduction to graph-oriented programming
STAF/ICGT 2018 Introduction to graph-oriented programmingSTAF/ICGT 2018 Introduction to graph-oriented programming
STAF/ICGT 2018 Introduction to graph-oriented programming
 
Model-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical SoftwareModel-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical Software
 
Data Science Meets DevOps: GitOps with OpenShift (1).pdf
Data Science Meets DevOps: GitOps with OpenShift (1).pdfData Science Meets DevOps: GitOps with OpenShift (1).pdf
Data Science Meets DevOps: GitOps with OpenShift (1).pdf
 
Discover DoDAF problems early in the lifecycle with model execution
Discover DoDAF problems early in the lifecycle with model executionDiscover DoDAF problems early in the lifecycle with model execution
Discover DoDAF problems early in the lifecycle with model execution
 
Automated requirements based testing for ISO 26262
Automated requirements based testing for ISO 26262 Automated requirements based testing for ISO 26262
Automated requirements based testing for ISO 26262
 
Automated DevOps Dynamic Testing for CI and CD
Automated DevOps Dynamic Testing for CI and CDAutomated DevOps Dynamic Testing for CI and CD
Automated DevOps Dynamic Testing for CI and CD
 
Webinar VB6 apps to html5
Webinar VB6 apps to html5Webinar VB6 apps to html5
Webinar VB6 apps to html5
 
Rhapsody Software
Rhapsody SoftwareRhapsody Software
Rhapsody Software
 
Software Architecture in Process Automation: UML & the "Smart Factory"
Software Architecture in Process Automation: UML & the "Smart Factory"Software Architecture in Process Automation: UML & the "Smart Factory"
Software Architecture in Process Automation: UML & the "Smart Factory"
 
Advanced monitoring-in-wso2
Advanced monitoring-in-wso2Advanced monitoring-in-wso2
Advanced monitoring-in-wso2
 
LIFT: A Legacy InFormation retrieval Tool
LIFT: A Legacy InFormation retrieval ToolLIFT: A Legacy InFormation retrieval Tool
LIFT: A Legacy InFormation retrieval Tool
 
Design Optimization of Safety Critical Component for Fatigue and Strength Usi...
Design Optimization of Safety Critical Component for Fatigue and Strength Usi...Design Optimization of Safety Critical Component for Fatigue and Strength Usi...
Design Optimization of Safety Critical Component for Fatigue and Strength Usi...
 
Saving resources with simulation webinar 092011
Saving resources with simulation webinar 092011Saving resources with simulation webinar 092011
Saving resources with simulation webinar 092011
 
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsxABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
 
Realizing Traceability for Safety and Certainty
Realizing Traceability for Safety and CertaintyRealizing Traceability for Safety and Certainty
Realizing Traceability for Safety and Certainty
 

Recently uploaded

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 

Recently uploaded (20)

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 

Integration of static and dynamic analysis for understanding legacy source code

  • 1. SCCH is an initiative of SCCH is located in Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Michael Moser +43 7236 3343 814 michael.moser@scch.at www.scch.at ICSME’16, Industry Track, 06.10.2016
  • 2. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code An Industry Collaboration 2© Software Competence Center Hagenberg GmbH Michael Moser michael.moser@scch.at Pichler Josef josef.pichler@scch.at Wilhelm Kirchmayr wilhelm.kirchmayr@voestalpine.com Ludwig Nocke ludwig.nocke@voestalpine.com Rudolf Tober wilhelm.kirchmayr@voestalpine.com
  • 3. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 3© Software Competence Center Hagenberg GmbH Background: Mr. Kaufmann’s Process Models Mr. Kaufmann (Process Engineer)
  • 4. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 4© Software Competence Center Hagenberg GmbH Background: Mr. Kaufmann’s Process Models Mr. Kaufmann (Process Engineer)
  • 5. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 5© Software Competence Center Hagenberg GmbH Background: Mr. Kaufmann’s Process Models Mr. Kaufmann (Process Engineer) controlled by
  • 6. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 6© Software Competence Center Hagenberg GmbH Background: Mr. Kaufmann’s Process Models Mr. Kaufmann (Process Engineer) controlled by feedback from
  • 7. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 7© Software Competence Center Hagenberg GmbH Integration of Static and Dynamic Analysis for Understanding Legacy Source Code C++, 5600 LoC Core Model created by 3rd party company 20 model outputs from 22 inputs Evolved in a multi-shell model Background: Mr. Kaufmann’s Process Models DeMo - Process model for desulphurization Influence of input values not documented Mr. Kaufmann
  • 8. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 8© Software Competence Center Hagenberg GmbH Mr. Kaufmann (retired) Background: Mr. Kaufmann’s Process Models Mr. Bauer / Mr. Huber (Process Engineers)
  • 9. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 9© Software Competence Center Hagenberg GmbH Background: Mr. Kaufmann’s Process Models Questions ??? What is the formula for a model result? Which input values affect which result? What are all results of a process model? Mr. Kaufmann (retired) Mr. Bauer / Mr. Huber (Process Engineers)
  • 10. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Starting Point: Requirements and Goals 10© Software Competence Center Hagenberg GmbH Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Documentation requested! Simplify maintenance and optimization Grant quick overview of the system Capture dependencies between inputs and outputs Flexible clipping of model source code Reflect the hierarchical structure Offline documentation
  • 11. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code use of dynamic analysis Examine program execution Do not fully capture behavior Needed: Model Interpretation Include values from model execution Merge with results from static analysis Starting Point: Overall Approach 11 use of static analysis Analyze entire program sources Extract abstract representations Application of RbG* to extract Mathematical formulae Decision tables / path conditions Essential program structures Needed: Stepwise Computation from a model input to its outputs Out1 Var1 In1 Var2 In2 Out1 Var1 In1 Var2 In2 input values *M. Moser and J. Pichler: RbG: A Documentation Generator for Scientific and Engineering Software, (SANER 2015)
  • 12. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Example: A process model 12© Software Competence Center Hagenberg GmbH Calling Context typedef struct { double snow_density; } output; typedef struct { double snow_height; double gamma_rho_S; bool useFudgeFactor; } input;
  • 13. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Example: A process model 13© Software Competence Center Hagenberg GmbH Pre processing of input in outer shell
  • 14. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Example: A process model 14© Software Competence Center Hagenberg GmbH Execution of core computational model
  • 15. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Example: A process model 15© Software Competence Center Hagenberg GmbH Post processing of result data
  • 16. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Results for Example: Stepwise Computation Symbol Formula Path Condition Input
  • 17. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Results for Example: Stepwise Computation Symbol Formula Path Condition Input One table for each result One row for each computation that may influence result Variables used within definitions are repeatedly resolved Variable names may be replaced with symbol info
  • 18. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 18© Software Competence Center Hagenberg GmbH Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Results for Example: Model Execution Symbol Formula Value Path Condition Input
  • 19. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 19© Software Competence Center Hagenberg GmbH Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Results for Example: Model Execution Symbol Formula Value Path Condition Input Results from model execution merged with static tables Model execution with concrete input values Unexecuted rows are hidden
  • 20. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 20© Software Competence Center Hagenberg GmbH Results for Example: Model Execution Symbol Formula Value Path Condition Input Results from model execution merged with static tables Model execution with concrete input values Unexecuted rows can be displayed
  • 21. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Results for Example: Big Picture 21© Software Competence Center Hagenberg GmbH
  • 22. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Results for Example: Big Picture 22© Software Competence Center Hagenberg GmbH Fits on a sheet of paper C++ methods and functions Ordered call relations Sub model clustering Database access Side-by-side with code Packaged with documentation
  • 23. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code dynamic analysis model execution program interpretation flow-sensitive analysis inter-procedural control-flow-graph Specification of concrete values Merge with stepwise computation Analysis: A little more details 23© Software Competence Center Hagenberg GmbH static analysis stepwise computation Construction of use-definition chains Inter-procedural control-flow-graph Forward propagation of definitions Use-Definition chains per model output “Entry-Point” Aware big picture Call-graph analysis Pattern-matching Out1 Var1 In1 Var2 In2 Out1 Var1 In1 Var2 In2 input values
  • 24. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Results: Tool Support for Documentation Generation 24© Software Competence Center Hagenberg GmbH
  • 25. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Results: Lessons Learned from DeMo Process Model 25© Software Competence Center Hagenberg GmbH
  • 26. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Results: Lessons Learned from DeMo Process Model 26© Software Competence Center Hagenberg GmbH domain experts provided model outputs and model inputs 2 entry point definitions (F1, F2) 3 sets of input values core entry point (F2) 21 outputs, 22 inputs significant drop of rows reduction 78% - 98%
  • 27. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Limitations: For the General Case 27© Software Competence Center Hagenberg GmbH Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Implementation limited in several ways Bindings are only statically resolved No 100% language coverage for C++ Pointer arithmetic not supported Missing input values yield incomplete results Interpreted model execution vs. real program execution Extraction of formulae is limited (partly on purpose) Scalability of big picture representation Limited
  • 28. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code 28© Software Competence Center Hagenberg GmbH Take Aways / Summary Characterization of computational models in process control software Integration of static and dynamic program analysis Documentation generation for a real world process model Dynamic analysis creates more compact and understandable documentation
  • 29. Integration of Static and Dynamic Analysis for Understanding Legacy Source Code Thanks and Discussion Michael Moser Software Analytics and Evolution Software Competence Center Hagenberg, Austria michael.moser@scch.at 29© Software Competence Center Hagenberg GmbH