dynamic analysis (evo 2008)
DESCRIPTION
I used this set of slides for a lecture I gave at the University of Bern.TRANSCRIPT
![Page 2: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/2.jpg)
![Page 3: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/3.jpg)
![Page 4: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/4.jpg)
![Page 5: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/5.jpg)
Ball 1999
Dynamic analysis is the analysis of the properties of a running program
![Page 6: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/6.jpg)
Ball 1999
Dynamic analysis is the analysis of the properties of a running program
What properties?
![Page 7: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/7.jpg)
main()
![Page 8: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/8.jpg)
method()
![Page 9: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/9.jpg)
method2(param)
![Page 10: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/10.jpg)
![Page 11: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/11.jpg)
![Page 12: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/12.jpg)
![Page 13: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/13.jpg)
![Page 14: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/14.jpg)
Dynamic analysis offers precise information
![Page 15: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/15.jpg)
How to instrument
What to capture and why
How to model
What to execute
![Page 16: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/16.jpg)
How to instrument
![Page 17: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/17.jpg)
…public class BankAccount { private Money balance;
public void deposit(Money amount) { System.out.println(“deposit“); this.balance += money; }}
![Page 18: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/18.jpg)
import org.apache.log4j.Logger;…public class BankAccount { private Money balance;
public void deposit(Money amount) { logger.info(“deposit“); this.balance += money; }}
![Page 19: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/19.jpg)
![Page 20: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/20.jpg)
Method Wrappers and Aspects intervene before and after each interesting method
![Page 21: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/21.jpg)
Profilers probe the system
![Page 22: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/22.jpg)
3 + 4
pushConstant: 3 pushConstant: 4 popIntoTemp: 0 “put argument in temp 0”popIntoTemp: 1 “put receiver in temp 1” send: + “perform addition”returnTop
![Page 23: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/23.jpg)
Denker 2008
pushConstant: 3 pushConstant: 4 popIntoTemp: 0 "put argument in temp 0" popIntoTemp: 1 "put receiver in temp 1" pushLit: ##Transcript "start of inserted code"pushTemp: 1 "push receiver for
printing" send: asStringsend: show: pop "end of inserted code" pushTemp: 1 "rebuild the stack" pushTemp: 0send: +returnTop
3 + 4… insertBefore: 'Transcript show: <meta: #receiver>'
![Page 24: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/24.jpg)
Denker etal 2007
Message (+)
Receiver (3)
Arguments (4)
3 + 4
![Page 25: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/25.jpg)
Denker etal 2007
Message (+)
Receiver (3)
Arguments (4)
Message (+)
Receiver (3)
Arguments (4)
Transcript show: <meta: #receiver>before
3 + 4… insertBefore: 'Transcript show: <meta: #receiver>'
![Page 26: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/26.jpg)
How to instrument
![Page 27: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/27.jpg)
How to instrumentWhat to capture and why
![Page 28: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/28.jpg)
![Page 29: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/29.jpg)
Collecting Garbage is a Dynamic Analysis
![Page 30: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/30.jpg)
The Control Flow is the most common focus
![Page 31: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/31.jpg)
De Pauw etal 1998
![Page 32: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/32.jpg)
De Pauw etal 1998
![Page 33: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/33.jpg)
De Pauw etal 1998
![Page 34: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/34.jpg)
Kuhn, Greevy 2006
Trace Signals reveal similar execution traces
![Page 35: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/35.jpg)
De Pauw etal 1993
Inter Class Call Matrix shows how classescollaborate at runtime
![Page 36: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/36.jpg)
Ducasse etal 2004
Communication Interaction shows how classes collaborate at runtime
![Page 37: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/37.jpg)
How to instrumentWhat to capture and why
![Page 38: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/38.jpg)
How to instrumentWhat to capture and whyHow to model
![Page 39: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/39.jpg)
![Page 40: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/40.jpg)
0..1 *
sender
Activation
![Page 41: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/41.jpg)
0..1 *
sender
Method* 1
Class
*
1
Activation
![Page 42: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/42.jpg)
Eisenbarth etal 2003
A feature is an observable unit of behavior of a system triggered by the user
![Page 43: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/43.jpg)
![Page 44: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/44.jpg)
Feature 1 Feature 2 Feature n...
![Page 45: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/45.jpg)
0..1 *
sender
Method* 1
Class
*
1
Activation
![Page 46: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/46.jpg)
0..1 *
sender
Method* 1
Class
*
1
Activation
Feature
*
![Page 47: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/47.jpg)
Wilde, Scully 1995
![Page 48: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/48.jpg)
Wilde, Scully 1995
![Page 49: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/49.jpg)
Wilde, Scully 1995
![Page 50: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/50.jpg)
Wilde, Scully 1995
Software Reconnaissance identifieswhere features are implemented
![Page 51: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/51.jpg)
Zaidman, Demeyer 2004
![Page 52: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/52.jpg)
Greevy etal 2006
Feature Views show how features cover classes
addFolder addPage
![Page 53: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/53.jpg)
addFolder addPage
![Page 54: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/54.jpg)
Greevy etal 2007
Team Collaboration shows howauthors develop features
![Page 55: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/55.jpg)
How to instrumentWhat to capture and whyHow to model
![Page 56: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/56.jpg)
How to instrumentWhat to capture and whyHow to model
The runtime is more than method activations
![Page 57: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/57.jpg)
![Page 58: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/58.jpg)
![Page 59: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/59.jpg)
return
![Page 60: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/60.jpg)
field-read
return
![Page 61: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/61.jpg)
field-write
field-read
return
![Page 62: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/62.jpg)
field-write
field-read
return
return
![Page 63: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/63.jpg)
allocation
field-write field-read
parameterfield-read
return
return
![Page 64: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/64.jpg)
Lienhard 2009
Object Flow captures object aliases
![Page 65: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/65.jpg)
Lienhard 2009
Object Flow captures object aliases
![Page 66: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/66.jpg)
0..1 *
sender
Method* 1
Class
*
1
Activation
Feature
*
![Page 67: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/67.jpg)
Instance
0..1 *
sender
Method* 1
Class1*
*
1
Activation
Feature
*
![Page 68: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/68.jpg)
Alias
Instance
*0..1
0..1 *
sender
Method* 1
Class1*
*
1
Activationparent receiver
subject
creator
Feature
*
![Page 69: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/69.jpg)
Alias
Instance
*0..1
0..1 *
sender
Method* 1
Class1*
*
1
Attribute
1
Activationparent receiver
subject
ArgumentAlias TempAlias FieldAlias
creator
ReturnAlias
*
Feature
*
![Page 70: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/70.jpg)
Lienhard etal 2007
Object Flow shows how objects move
![Page 71: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/71.jpg)
Lienhard etal 2007
Object Dependencies reveal features dependencies
OpenConnect
Join ChannelSend Message
![Page 72: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/72.jpg)
![Page 73: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/73.jpg)
Liblit etal 2005
In 50% of the cases the execution stack contains
essentially no information about the bug’s cause
![Page 74: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/74.jpg)
Fierz 2008
Back in time debuggers remembermore than the current stack
![Page 75: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/75.jpg)
How to instrumentWhat to capture and whyHow to model
The runtime is more than method activations
![Page 76: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/76.jpg)
How to instrumentWhat to capture and whyHow to modelWhat to execute
The runtime is more than method activations
![Page 77: Dynamic Analysis (EVO 2008)](https://reader034.vdocuments.us/reader034/viewer/2022042514/558bcc68d8b42aa60b8b457e/html5/thumbnails/77.jpg)
Tudor Gîrbawww.tudorgirba.com
creativecommons.org/licenses/by/3.0/