{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture1-static-dynamic

lecture1-static-dynamic - synergyandduality Michael Ernst...

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

Michael Ernst, page 1 Static and dynamic analysis: synergy and duality Michael Ernst CSE 503, Winter 2010 Lecture 1

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

View Full Document
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
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

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

View Full Document
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
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++; ?

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

View Full Document
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
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

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

View Full Document
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
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

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

View Full Document
Michael Ernst, page 10 Research challenge: What to measure? Coverage or frequency
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 35

lecture1-static-dynamic - synergyandduality Michael Ernst...

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

View Full Document
Ask a homework question - tutors are online