SlideShare a Scribd company logo
1 of 39
Download to read offline
OORPT Object-Oriented Reengineering Patterns and Techniques 12.  Analyzing Dynamic Behavior Orla Greevy & Adrian Lienhard
What is Dynamic Analysis? ,[object Object],[object Object]
Has anyone used Dynamic Analysis?
Roadmap ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What does this program do? ,[object Object],Thomas Ball, The Concept of Dynamic Analysis, FSE ’ 99
Why Dynamic Analysis? ,[object Object],Trying to understand one [structure] from the other is like trying to understand the dynamism of living ecosystems from the static taxonomy of plants and animals, and vice-versa. --  Erich Gamma et al.,  D esign Patterns
Reengineering Patterns based on Dynamic Analysis ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Runtime Information Sources ,[object Object],execute program and watch it from outside Internal view External view instrument program and watch it from inside
External View ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Internal View  Log statements in code Stack trace Debugger Many different tools are based on tracing: execution profilers,  test coverage analyzers, tools for  reverse engineering… Execution trace
Execution Tracing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tracing Techniques ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Technical Challenges ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Roadmap ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Debuggers Breakpoint Debuggers jdb, gdb,… (run, step, inspect) Omniscent Debuggers ( http://www.lambdacs.com/debugger/debugger.html ) Memory Debuggers jmp - java memory profiler purify (IBM Rational) - a tool for detecting memory leaks in C,C++ code
Loggers - low tech debugging “… debugging statements stay with the program;  debugging sessions are transient. “   Kerningham and Pike public class Main { public static void main(String[] args) { Clingon aAlien = new Clingon(); System.out.println(“in main “);   aAlien.spendLife(); } } Very messy!
- defacto standard for Java ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],export TOMCAT_OPTS="-Dlog4j.debug  -Dlog4j.configuration=foobar.xml
Short Demo of log4j usage ,[object Object],import org.apache.log4j.Logger; … public class Main { static Logger logger = Logger.getLogger(MyApp.class); public static void main(String[] args) { Clingon aAlien = new Clingon(); logger.info(“Entering Application“);   aAlien.spendLife(); } } 1 [main]  (Main.java)  - Entering Application.
Profilers are used to track performance for optimization ,[object Object],[object Object],[object Object],[object Object]
JProfiler Example Views
JWireTap: An Interactive Profiler for Eclipse  (Demo)
Roadmap ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Reverse Engineering Reverse Engineering static view + execution traces dynamic view + Dynamic Analysis
Dynamic Analysis for Program Comprehension ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Visualization of Runtime Behavior Problem  of  Large  traces [JinSight, De Pauw 1993 ]
Feature-Centric Reverse Engineering Users   Software developer   F 2 F 1 F n F 1 F n F 2 Software System
Bug reports often expressed in terms of Features. I can’t add new  contacts!!! The  “ add contacts“   feature
Dividing a trace into features Feature 1 Feature 2 Feature n
Feature Identification is a technique to map features to source code. “ A feature is an observable unit of behavior of a system triggered by the user” [Eisenbarth etal. 2003] Software Reconnaissance  [Wilde and Scully ] Run a  (1)   feature exhibiting scenario  and a  (2) non-exhibiting scenario  and compare the traces.  Then browse the source code.
Feature-Centric Analysis: 3 Complementary Perspectives F1 F3 F2 F4 F5 Features  Perspective Features Relationships Perspective Classes  Perspective
Dynamix  - A Model for Dynamic Analysis
DynaMoose - An Environment for Feature Analysis
Demo of Feature Analysis - Feature Views of Classes Feature Views of PhoneSim Classes PhoneButtonEventBackSpace PhoneStateContact PhoneStateContactForm EditableText CustomTextArea
Feature Views of ‘Phonesim’ Methods Feature Views of PhoneSim Methods
Feature Relationships based on shared usage of classes or methods. browseContacts, addContacts
Object Flow Analysis ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dynamic vs. Static Analysis ,[object Object],[object Object],[object Object],[object Object]
Conclusions: Pros and Cons ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
License ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Testing Autonomous Cars for Feature Interaction Failures using Many-Objective...
Testing Autonomous Cars for Feature Interaction Failures using Many-Objective...Testing Autonomous Cars for Feature Interaction Failures using Many-Objective...
Testing Autonomous Cars for Feature Interaction Failures using Many-Objective...Lionel Briand
 
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryAssessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryDharmalingam Ganesan
 
Software Testing Methodologies
Software Testing MethodologiesSoftware Testing Methodologies
Software Testing MethodologiesABHISHEK KUMAR
 
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVCUpgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVCFPGA Central
 
Session 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfacesSession 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfacesNirav Desai
 
Navigate, Understand, Communicate: How Developers Locate Performance Bugs
Navigate, Understand, Communicate: How Developers Locate Performance BugsNavigate, Understand, Communicate: How Developers Locate Performance Bugs
Navigate, Understand, Communicate: How Developers Locate Performance BugsSebastian Baltes
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog Ramdas Mozhikunnath
 
formal verification
formal verificationformal verification
formal verificationToseef Aslam
 
Ivv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systemsIvv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systemsDharmalingam Ganesan
 
Interface-Implementation Contract Checking
Interface-Implementation Contract CheckingInterface-Implementation Contract Checking
Interface-Implementation Contract CheckingDharmalingam Ganesan
 
Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Dharmalingam Ganesan
 
Massimo Rossello Zen And The Art Of Testing
Massimo Rossello   Zen And The Art Of TestingMassimo Rossello   Zen And The Art Of Testing
Massimo Rossello Zen And The Art Of Testingtarvos
 
Verification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICsVerification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICsDr. Shivananda Koteshwar
 
#1 formal methods – introduction for software engineering
#1 formal methods – introduction for software engineering#1 formal methods – introduction for software engineering
#1 formal methods – introduction for software engineeringSharif Omar Salem
 
Search-driven String Constraint Solving for Vulnerability Detection
Search-driven String Constraint Solving for Vulnerability DetectionSearch-driven String Constraint Solving for Vulnerability Detection
Search-driven String Constraint Solving for Vulnerability DetectionLionel Briand
 
CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V pkaviya
 
Uvm cookbook-systemverilog-guidelines-verification-academy
Uvm cookbook-systemverilog-guidelines-verification-academyUvm cookbook-systemverilog-guidelines-verification-academy
Uvm cookbook-systemverilog-guidelines-verification-academyRaghavendra Kamath
 

What's hot (20)

Testing Autonomous Cars for Feature Interaction Failures using Many-Objective...
Testing Autonomous Cars for Feature Interaction Failures using Many-Objective...Testing Autonomous Cars for Feature Interaction Failures using Many-Objective...
Testing Autonomous Cars for Feature Interaction Failures using Many-Objective...
 
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryAssessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
 
Software Testing Methodologies
Software Testing MethodologiesSoftware Testing Methodologies
Software Testing Methodologies
 
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVCUpgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
 
Session 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfacesSession 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfaces
 
Navigate, Understand, Communicate: How Developers Locate Performance Bugs
Navigate, Understand, Communicate: How Developers Locate Performance BugsNavigate, Understand, Communicate: How Developers Locate Performance Bugs
Navigate, Understand, Communicate: How Developers Locate Performance Bugs
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog
 
formal verification
formal verificationformal verification
formal verification
 
Ivv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systemsIvv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systems
 
system verilog
system verilogsystem verilog
system verilog
 
STAMP
STAMPSTAMP
STAMP
 
Interface-Implementation Contract Checking
Interface-Implementation Contract CheckingInterface-Implementation Contract Checking
Interface-Implementation Contract Checking
 
Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2
 
SECh1920
SECh1920SECh1920
SECh1920
 
Massimo Rossello Zen And The Art Of Testing
Massimo Rossello   Zen And The Art Of TestingMassimo Rossello   Zen And The Art Of Testing
Massimo Rossello Zen And The Art Of Testing
 
Verification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICsVerification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICs
 
#1 formal methods – introduction for software engineering
#1 formal methods – introduction for software engineering#1 formal methods – introduction for software engineering
#1 formal methods – introduction for software engineering
 
Search-driven String Constraint Solving for Vulnerability Detection
Search-driven String Constraint Solving for Vulnerability DetectionSearch-driven String Constraint Solving for Vulnerability Detection
Search-driven String Constraint Solving for Vulnerability Detection
 
CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V
 
Uvm cookbook-systemverilog-guidelines-verification-academy
Uvm cookbook-systemverilog-guidelines-verification-academyUvm cookbook-systemverilog-guidelines-verification-academy
Uvm cookbook-systemverilog-guidelines-verification-academy
 

Viewers also liked

Irem presentation final
Irem presentation   finalIrem presentation   final
Irem presentation finalKepler
 
Twitter en Facebook voor journalisten
Twitter en Facebook voor journalistenTwitter en Facebook voor journalisten
Twitter en Facebook voor journalistenBart Van Belle
 
Accomplishment, Aspirations & Challenges: Boston
Accomplishment, Aspirations & Challenges: BostonAccomplishment, Aspirations & Challenges: Boston
Accomplishment, Aspirations & Challenges: BostonThe Hub Milan
 
Angeiologie 4 2013 - 1-2014 livre des resumes
Angeiologie 4 2013 - 1-2014 livre des resumesAngeiologie 4 2013 - 1-2014 livre des resumes
Angeiologie 4 2013 - 1-2014 livre des resumessfa_angeiologie
 
RCMSL Phenomenal July 16, 2009
RCMSL Phenomenal July 16, 2009RCMSL Phenomenal July 16, 2009
RCMSL Phenomenal July 16, 2009etalcomendras
 
Financial planning introduction fall 2010
Financial planning introduction fall 2010Financial planning introduction fall 2010
Financial planning introduction fall 2010dphil002
 
LiveOffice Email Archiving & Compliance 101
LiveOffice Email Archiving & Compliance 101LiveOffice Email Archiving & Compliance 101
LiveOffice Email Archiving & Compliance 101Veritas Technologies LLC
 
Sociale media en journalistiek
Sociale media en journalistiekSociale media en journalistiek
Sociale media en journalistiekBart Van Belle
 
Syndrome metabolique et maladies vasculaires s novo
Syndrome metabolique et maladies vasculaires s novoSyndrome metabolique et maladies vasculaires s novo
Syndrome metabolique et maladies vasculaires s novosfa_angeiologie
 
Postcards From Pure Michigan
Postcards From Pure MichiganPostcards From Pure Michigan
Postcards From Pure MichiganPMCHUGH
 

Viewers also liked (20)

Irem presentation final
Irem presentation   finalIrem presentation   final
Irem presentation final
 
201506 CSE340 Lecture 15
201506 CSE340 Lecture 15201506 CSE340 Lecture 15
201506 CSE340 Lecture 15
 
Twitter en Facebook voor journalisten
Twitter en Facebook voor journalistenTwitter en Facebook voor journalisten
Twitter en Facebook voor journalisten
 
Cup A Soup MiNi
Cup A Soup MiNiCup A Soup MiNi
Cup A Soup MiNi
 
Sexto AñO Basico
Sexto AñO BasicoSexto AñO Basico
Sexto AñO Basico
 
Accomplishment, Aspirations & Challenges: Boston
Accomplishment, Aspirations & Challenges: BostonAccomplishment, Aspirations & Challenges: Boston
Accomplishment, Aspirations & Challenges: Boston
 
Angeiologie 4 2013 - 1-2014 livre des resumes
Angeiologie 4 2013 - 1-2014 livre des resumesAngeiologie 4 2013 - 1-2014 livre des resumes
Angeiologie 4 2013 - 1-2014 livre des resumes
 
RCMSL Phenomenal July 16, 2009
RCMSL Phenomenal July 16, 2009RCMSL Phenomenal July 16, 2009
RCMSL Phenomenal July 16, 2009
 
201106 WICSA
201106 WICSA201106 WICSA
201106 WICSA
 
Financial planning introduction fall 2010
Financial planning introduction fall 2010Financial planning introduction fall 2010
Financial planning introduction fall 2010
 
201204 AME High Five
201204 AME High Five201204 AME High Five
201204 AME High Five
 
201506 CSE340 Lecture 16
201506 CSE340 Lecture 16201506 CSE340 Lecture 16
201506 CSE340 Lecture 16
 
Eeuwigblijvenleren2
Eeuwigblijvenleren2Eeuwigblijvenleren2
Eeuwigblijvenleren2
 
201506 CSE340 Lecture 09
201506 CSE340 Lecture 09201506 CSE340 Lecture 09
201506 CSE340 Lecture 09
 
Eurochap2010
Eurochap2010Eurochap2010
Eurochap2010
 
LiveOffice Email Archiving & Compliance 101
LiveOffice Email Archiving & Compliance 101LiveOffice Email Archiving & Compliance 101
LiveOffice Email Archiving & Compliance 101
 
Sociale media en journalistiek
Sociale media en journalistiekSociale media en journalistiek
Sociale media en journalistiek
 
Syndrome metabolique et maladies vasculaires s novo
Syndrome metabolique et maladies vasculaires s novoSyndrome metabolique et maladies vasculaires s novo
Syndrome metabolique et maladies vasculaires s novo
 
Postcards From Pure Michigan
Postcards From Pure MichiganPostcards From Pure Michigan
Postcards From Pure Michigan
 
201506 CSE340 Lecture 22
201506 CSE340 Lecture 22201506 CSE340 Lecture 22
201506 CSE340 Lecture 22
 

Similar to OORPT Dynamic Analysis

Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16
Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16
Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16AppDynamics
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicDavid Solivan
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis Engineering Software Lab
 
Java Performance & Profiling
Java Performance & ProfilingJava Performance & Profiling
Java Performance & ProfilingIsuru Perera
 
Welcome Webinar Slides
Welcome Webinar SlidesWelcome Webinar Slides
Welcome Webinar SlidesSumo Logic
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthroughmitesh_sharma
 
Software development effort reduction with Co-op
Software development effort reduction with Co-opSoftware development effort reduction with Co-op
Software development effort reduction with Co-oplbergmans
 
The differing ways to monitor and instrument
The differing ways to monitor and instrumentThe differing ways to monitor and instrument
The differing ways to monitor and instrumentJonah Kowall
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3REHAN IJAZ
 
Sanjeevi's SDLC Guest Lecture in Anna University campus at AU-PERS Centre (Ye...
Sanjeevi's SDLC Guest Lecture in Anna University campus at AU-PERS Centre (Ye...Sanjeevi's SDLC Guest Lecture in Anna University campus at AU-PERS Centre (Ye...
Sanjeevi's SDLC Guest Lecture in Anna University campus at AU-PERS Centre (Ye...Sanjeevi Prasad
 
Slides 6 design of sw arch using add
Slides 6 design of sw arch using addSlides 6 design of sw arch using add
Slides 6 design of sw arch using addJavid iqbal hashmi
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101Itiel Shwartz
 

Similar to OORPT Dynamic Analysis (20)

Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16
Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16
Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
Ensuring code quality
Ensuring code qualityEnsuring code quality
Ensuring code quality
 
SANJAY_SINGH
SANJAY_SINGHSANJAY_SINGH
SANJAY_SINGH
 
Sdlc
SdlcSdlc
Sdlc
 
Sdlc
SdlcSdlc
Sdlc
 
Unit 1
Unit  1Unit  1
Unit 1
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
 
Java Performance & Profiling
Java Performance & ProfilingJava Performance & Profiling
Java Performance & Profiling
 
Welcome Webinar Slides
Welcome Webinar SlidesWelcome Webinar Slides
Welcome Webinar Slides
 
Computers in management
Computers in managementComputers in management
Computers in management
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthrough
 
Software development effort reduction with Co-op
Software development effort reduction with Co-opSoftware development effort reduction with Co-op
Software development effort reduction with Co-op
 
The differing ways to monitor and instrument
The differing ways to monitor and instrumentThe differing ways to monitor and instrument
The differing ways to monitor and instrument
 
Resume
ResumeResume
Resume
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3
 
Sanjeevi's SDLC Guest Lecture in Anna University campus at AU-PERS Centre (Ye...
Sanjeevi's SDLC Guest Lecture in Anna University campus at AU-PERS Centre (Ye...Sanjeevi's SDLC Guest Lecture in Anna University campus at AU-PERS Centre (Ye...
Sanjeevi's SDLC Guest Lecture in Anna University campus at AU-PERS Centre (Ye...
 
Slides 6 design of sw arch using add
Slides 6 design of sw arch using addSlides 6 design of sw arch using add
Slides 6 design of sw arch using add
 
Distributed Tracing
Distributed TracingDistributed Tracing
Distributed Tracing
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101
 

More from lienhard

Prototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptPrototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptlienhard
 
Virtual Machines Lecture
Virtual Machines LectureVirtual Machines Lecture
Virtual Machines Lecturelienhard
 
Flow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time DebuggingFlow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time Debugginglienhard
 
Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)lienhard
 
Rapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using MondrianRapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using Mondrianlienhard
 
Tracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature DependenciesTracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature Dependencieslienhard
 
Practical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time DebuggingPractical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time Debugginglienhard
 
Test Blueprints
Test BlueprintsTest Blueprints
Test Blueprintslienhard
 
Object Flow Analysis
Object Flow AnalysisObject Flow Analysis
Object Flow Analysislienhard
 
Identifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept AnalysisIdentifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept Analysislienhard
 

More from lienhard (11)

Chicken
ChickenChicken
Chicken
 
Prototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptPrototype-based Programming with JavaScript
Prototype-based Programming with JavaScript
 
Virtual Machines Lecture
Virtual Machines LectureVirtual Machines Lecture
Virtual Machines Lecture
 
Flow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time DebuggingFlow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time Debugging
 
Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)
 
Rapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using MondrianRapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using Mondrian
 
Tracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature DependenciesTracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature Dependencies
 
Practical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time DebuggingPractical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time Debugging
 
Test Blueprints
Test BlueprintsTest Blueprints
Test Blueprints
 
Object Flow Analysis
Object Flow AnalysisObject Flow Analysis
Object Flow Analysis
 
Identifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept AnalysisIdentifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept Analysis
 

Recently uploaded

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

OORPT Dynamic Analysis

  • 1. OORPT Object-Oriented Reengineering Patterns and Techniques 12. Analyzing Dynamic Behavior Orla Greevy & Adrian Lienhard
  • 2.
  • 3. Has anyone used Dynamic Analysis?
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Internal View Log statements in code Stack trace Debugger Many different tools are based on tracing: execution profilers, test coverage analyzers, tools for reverse engineering… Execution trace
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Debuggers Breakpoint Debuggers jdb, gdb,… (run, step, inspect) Omniscent Debuggers ( http://www.lambdacs.com/debugger/debugger.html ) Memory Debuggers jmp - java memory profiler purify (IBM Rational) - a tool for detecting memory leaks in C,C++ code
  • 16. Loggers - low tech debugging “… debugging statements stay with the program; debugging sessions are transient. “ Kerningham and Pike public class Main { public static void main(String[] args) { Clingon aAlien = new Clingon(); System.out.println(“in main “); aAlien.spendLife(); } } Very messy!
  • 17.
  • 18.
  • 19.
  • 21. JWireTap: An Interactive Profiler for Eclipse (Demo)
  • 22.
  • 23. Reverse Engineering Reverse Engineering static view + execution traces dynamic view + Dynamic Analysis
  • 24.
  • 25. Visualization of Runtime Behavior Problem of Large traces [JinSight, De Pauw 1993 ]
  • 26. Feature-Centric Reverse Engineering Users Software developer F 2 F 1 F n F 1 F n F 2 Software System
  • 27. Bug reports often expressed in terms of Features. I can’t add new contacts!!! The “ add contacts“ feature
  • 28. Dividing a trace into features Feature 1 Feature 2 Feature n
  • 29. Feature Identification is a technique to map features to source code. “ A feature is an observable unit of behavior of a system triggered by the user” [Eisenbarth etal. 2003] Software Reconnaissance [Wilde and Scully ] Run a (1) feature exhibiting scenario and a (2) non-exhibiting scenario and compare the traces. Then browse the source code.
  • 30. Feature-Centric Analysis: 3 Complementary Perspectives F1 F3 F2 F4 F5 Features Perspective Features Relationships Perspective Classes Perspective
  • 31. Dynamix - A Model for Dynamic Analysis
  • 32. DynaMoose - An Environment for Feature Analysis
  • 33. Demo of Feature Analysis - Feature Views of Classes Feature Views of PhoneSim Classes PhoneButtonEventBackSpace PhoneStateContact PhoneStateContactForm EditableText CustomTextArea
  • 34. Feature Views of ‘Phonesim’ Methods Feature Views of PhoneSim Methods
  • 35. Feature Relationships based on shared usage of classes or methods. browseContacts, addContacts
  • 36.
  • 37.
  • 38.
  • 39.

Editor's Notes

  1. Source code can be hard to read and understand. This is a legal C program, an extreme case of course. This is intentionally obfuscated code. Obfuscation is a set of transformations that preserve the behavior of the program but make the internals hard to reverse-engineer. - Programming contests - Prevent reverse engineering
  2. Programs can be hard to understand from their source code alone. The static code does not explicitly reflect the dynamic behavior. The code structure consists of classes in fixed inheritance relationships. Difficulties: OO source code exposes a class hierarchy, not the run-time object collaborations Collaborations are spread throughout the code Polymorphism may hide which classes are instantiated A program’s run-time structure consists of rapidly changing networks of communicating objects.
  3. - The Interview during demo pattern is based on the running program. Different kind of people can give you insights from their point of view by presenting the application. - How do you uncover the run-time architecture of a program? Execute scenarios of known use cases and step through the code with a debugger. - Tests are especially valuable during reengineering because they reduce the risk of reengineering changes. If tests are missing Write Tests to Understand. See chapter in the book devoted to this subject.
  4. - Logs: Single points in the execution. - Stack trace: snapshot of the current stack - Debugger: interactive, allows one to step into future method executions. Not persistent. - Tracing: full history of all method executions
  5. For now we consider this approach Sequence and nesting: construct tree structure Additional: receiver and arguments Return values Object creation Current feature Distinguish process (analyze concurrency properties) Object referencing relationships not captured. Object graph at particular point in time cannot be reconstructed, now, how it evolves
  6. Simulate execution: slow, but very precise control possible Sampling: mainly used for profiling Dynamic recompilation: - control optimizations: compile hot blocks/paths/procedures to machine code - data optimizations: garbage collection: move objects for locality
  7. Inserting log statements into your code is a low-tech method for debugging it. It may also be the only way because debuggers are not always available or applicable. This is often the case for distributed applications.
  8. One of the advantages of the log4j API is its manageability. Once the log statements have been inserted into the code, they can be controlled with configuration files. They can be selectively enabled or disabled, and sent to different and multiple output targets in user-chosen formats. The log4j package is designed so that log statements can remain in shipped code without incurring a heavy performance cost.
  9. Features: Selective instrumentation On and off profiling Produce graphs of performance hotspots Querying of dynamic metrics - eg number of hotspots, maxdepth of the call tree, average time spent in a method Dynamic update of information View performance statistics Configurable and easy to use.
  10. More views available at: http://www.ej-technologies.com/products/jprofiler/screenshots.html
  11. In this course you have been introduced to the concepts of reverse engineering. Reverse engineering Reverse engineering abstracts high level abstractions that support system understanding [Chikofsky and Cross, 1990]. “ Object-oriented language characteristics such as inheritance, dynamic binding and polymorphism mean that the behavior of a system can only be determined at runtime.” [Jerding 1996, Demeyer2003a] A static perspective of the system over looks semantic knowledge of the problem domain of a system. The semanic knowledge Should not be ignored. We need a way to enrich the static views with information about their intent. Which features do they Participate in at runtime? Are they specific to one part of the system, one feature, or is it general functionality that implements sone infrastructural functionality? So lets extend our analysis by incorporating dynamic data captured while executing the features.
  12. .They define an execution scenario to maximize coverage of the system and ‘preciseness’. To execute all the features. Frequency analysis - small number of methods are responsible for a large amount of the trace. They focus on call relationships between methods to learn something about a system. Coupling metrics: Runtime metrics - how many methods of a class were invoked during the execution of a system. which classes create objects Which classes communicate with each other
  13. Traces of execution behavior lead to huge execution traces of tens of thousands of events. This makes them difficult to interpret or to Extract high level views. We need techniques to reduce the volume of information without loss of details needed to answer a specific research question. For example: “Which classes and methods implement the save contact feature?” Wim dePauw [JinSight, De Pauw 1993 ]. Other compression approaches Use graph algorithms to detect patterns and reduce the volume of data. Use patterns to learn something about the system behavior.
  14. The software engineer needs to maintain a mental map between features and the parts of the code that implement them. Features are not implemented in one class. Their implementation spreads out over lots of classes. The behavior consist of objects that collaborate at runtime. “ Change requests and bug reports are usually expressed in a language that reflects the features of a system” [Mehta and Heinemann 2002]
  15. Other researchers had devised variations of software reconnaissance - Antoniol, Eisenberg etc.
  16. How are classes related to features? How are features related to classes? How are features related to each other? We define a Feature-Affinity metric to distinguish between various levels of characterization of classes.
  17. Here we see the feature views (of classes) Our question was “Which classes participate in the addContacts feature?”
  18. Which methods participate in the feature ‘addContacts()’? 22 single feature methods
  19. How similar are the features? We represent static feature relationships in a matrix visualization to make the pairwise similarity relationships between two features explicit. We shows an example of a feature relationship matrix of the features of the phone simulator application. We use grayscale to represent the degree of similarity of two features. The addContacts and browseContacts give a similarity value of tight.