lecture1-static-dynamic

lecture1-static-dynamic - Staticanddynamicanalysis:...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Michael Ernst, page 1 Static and dynamic analysis: synergy and duality Michael Ernst CSE 503, Winter 2010 Lecture 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Michael Ernst, page 2 Goals Theme: Static and dynamic analyses are more similar than many people believe One person’s view of their relationship Goals: Encourage blending of the techniques and communities Start productive discussions
Background image of page 2
Michael Ernst, page 3 Outline Review of static and dynamic analysis Synergy: combining static and dynamic analysis Aggregation Analogies Hybrids Duality: subsets of behavior Conclusion
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Michael Ernst, page 4 Static analysis Examples: compiler optimizations, program verifiers Examine program text (no execution) Build a model of program state An abstraction of the run-time state Reason over possible behaviors E.g., “run” the program over the abstract state
Background image of page 4
Michael Ernst, page 5 Abstract interpretation Typically implemented via dataflow analysis Each program statement’s transfer function indicates how it transforms state Example: What is the transfer function for y = x++; ?
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Michael Ernst, page 6 Selecting an abstract domain x = { 3, 5, 7 }; y = { 9, 11, 13 } y = x++; x = { 4, 6, 8 }; y = { 3, 5, 7 } x is prime; y is prime y = x++; x is anything; y is prime x is odd; y is odd y = x++; x is even; y is odd x n = f(a n-1 ,…,z n-1 ); y n = f(a n-1 ,…,z n-1 ) y = x++; x n+1 = x n +1; y n+1 = x n x=3, y=11 , x=5, y=9 , x=7, y=13 y = x++; x=4, y=3 , x=6, y=5 , x=8, y=7
Background image of page 6
Michael Ernst, page 7 Research challenge: Choose good abstractions The abstraction determines the expense (in time and space) The abstraction determines the accuracy (what information is lost) Less accurate results are poor for applications that require precision Cannot conclude all true properties in the grammar
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Michael Ernst, page 8 Static analysis recap Slow to analyze large models of state, so use abstraction Conservative: account for abstracted-away state Sound: (weak) properties are guaranteed to be true *Some static analyses are not sound
Background image of page 8
Michael Ernst, page 9 Dynamic analysis Examples: profiling, testing Execute program (over some inputs) The compiler provides the semantics Observe executions Requires instrumentation infrastructure Must choose what to measure, and what test runs
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Michael Ernst, page 10 Research challenge: What to measure? Coverage or frequency
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 35

lecture1-static-dynamic - Staticanddynamicanalysis:...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online