from qualitative to quantitative theories of software
play

From Qualitative to Quantitative Theories of Software Tom Henzinger - PowerPoint PPT Presentation

From Qualitative to Quantitative Theories of Software Tom Henzinger IST Austria Qualitative Software Theories Property Program Analysis Yes/No Qualitative Software Theories Kripke Program Property ( R ) } G) Structure Analysis


  1. From Qualitative to Quantitative Theories of Software Tom Henzinger IST Austria

  2. Qualitative Software Theories Property Program Analysis Yes/No

  3. Qualitative Software Theories Kripke Program Property  ( R ) } G) Structure Analysis Yes/No

  4. Qualitative Software Theories Quantitative Quantitative Timed  ( R ) } · 5 G) Program Property Automaton Analysis Yes/No

  5. Qualitative Software Theories Quantitative Quantitative Markov 8  (R ) Pr(} Program Property Process G) ¸ 0.5) Analysis Yes/No

  6. Quantitative Software Theories Quantitative Quantitative Program Property Analysis R -measure of “ fit ” between program and property -could involve cost, quality, performance, etc.

  7. Quantitative Software Theories Quantitative Quantitative  (R ) } G) Program Property Analysis The less time between R R and G, the better. -measure of “ fit ” between program and property -could involve cost, quality, performance, etc.

  8. Quantitative Software Theories Quantitative Quantitative  (R ) } G) Program Property Analysis The fewer R “ unnecessary ” grants G, -measure of “ fit ” between program and property the better. -could involve cost, quality, performance, etc.

  9. Qualitative Software Theories P 3 P 2 P 1 S 1 S ’ 1 S 2 S ’’ 2 S ’ 2

  10. Qualitative Software Theories P 3 P 2 P 1 S 1 S ’ 1 S 2 S ’’ 2 S ’ 2

  11. Quantitative Software Theories P 3 P 2 P 1 0.5 0.9 0.8 0.7 S 1 S ’ 1 S 2 S ’’ 2 S ’ 2

  12. Quantitative Software Theories P 3 P 2 P 1 0.5 0.9 0.8 0.7 S 1 S ’ 1 S 2 S ’’ 2 S ’ 2 0.2

  13. Quantitative Software Models Q1 Assign values to program behaviors Boolean case: correct vs. incorrect behaviors Q2 Assign values to programs/properties Boolean case: sets of behaviors (nondeterminism) Q3 Assign values to pairs of programs/properties Boolean case: preorders (refinement)

  14. Q1 Assign Values To Program Behaviors a. Probabilities

  15. Q1 Assign Values To Program Behaviors a. Probabilities b. Resource use worst case (sup) vs. average case (limavg) vs. accumulative (sum) (e.g., response time, power consumption)

  16. Q1 Assign Values To Program Behaviors a. Probabilities b. Resource use worst case (sup) vs. average case (limavg) vs. accumulative (sum) (e.g., response time, power consumption) c. Quality measures discounting vs. long-run averaging

  17. Q1 Example: Reliability Values a: ok b: fail Discounted value (0 < d < 1):  a aaaaaaaaaa... 1 aaaaaaaab... 1 - d 8 aaab... 1 - d 3 b... 0

  18. Q1 Example: Reliability Values a: ok b: fail Discounted value (0 < d < 1):  a aaaaaaaaaa... 1 aaaaaaaab... 1 - d 8 aaab... 1 - d 3 b... 0 Long-run average value: limavg a aaaaaaaaaa... 1 abaabaaab... 1 aaabaaabaaab... 3/4 babbabbba... 0 aaaaaabbb... 0

  19. Q2 Assign Values To Programs sup or limavg sup or exp relative to input distribution

  20. Q3 Assign Distances To Programs a b b a a

  21. Q3 Example: Correctness Distance a b b a a 0 a

  22. Q3 Example: Correctness Distance a b b a a 0 1 a b

  23. Q3 Example: Correctness Distance a b b a a 1/3 b

  24. Q3 Example: Correctness Distance a b b a a 1/3 1/4 b b b b a

  25. Q3 Example: Robustness Distance a b b a a 2/3 a

  26. Q3 Example: Robustness Distance a b b a a 2/3 1/3 a a b a

  27. References 1 Simulation and bisimulation distances [CONCUR 2010 Cerny et al.] 2 Quantitative languages [CSL 2008, LICS 2009, CSL 2011 Boker et al.] 3 Quantitative synthesis [CAV 2009, CAV 2010, CAV 2011 Cerny et al.]

  28. Qualitative Software Theories Program Property Analysis Yes/No

  29. Qualitative Software Theories Property Synthesis Correct Program

  30. Qualitative Software Theories ω - Regular Automaton Graph Game with ω - Regular Objective Correct Program = Winning Strategy

  31. Quantitative Synthesis Quantitative Property Synthesis Optimal Program

  32. Quantitative Synthesis Weighted Automaton Graph Game with worst case Quantitative Objective Optimal Program = Optimal Strategy

  33. Quantitative Synthesis Weighted Automaton Stochastic Graph Game avg case with Quantitative Objective Optimal Program = Optimal Strategy

  34. Games for Quantitative Synthesis 1 Optimizing Resource Use / Performance -costs refer to resource use (e.g., power consumption, context switch) -optimize peak or accumulative or average resource use -formalized using sup or sum or limavg objectives -synthesize schedules, routes, lock placement

  35. Fine grained vs. coarse grained locks: -fine grained locks allow more interleavings, and therefore cause less waiting of threads -coarse grained locks cause fewer context switches, which are expensive Process 1: Process 2: loop loop access x; access x; access y access y end. end.

  36. Fine grained vs. coarse grained locks: -fine grained locks allow more interleavings, and therefore cause less waiting of threads -coarse grained locks cause fewer context switches, which are expensive Process 1: Process 2: loop loop access x; access x; access y access y end. end.

  37. Fine grained vs. coarse grained locks: -fine grained locks allow more interleavings, and therefore cause less waiting of threads -coarse grained locks cause fewer context switches, which are expensive Process 1: Process 2: loop loop access x; access x; access y access y end. end.

  38. Games for Quantitative Synthesis 1 Optimizing Resource Use / Performance 2 Preference between Different Programs -qualitative property, but some programs preferred over others -can be formalized using lexicographic objectives h f, g 1 , ... g n i qualitative specification quantitative objectives

  39. Request-Grant Buchi Automaton RG rg Rg rG rg Rg RG rG Every request is followed by a grant.

  40. Request-Grant limavg Automaton 1 RG: 0 rg: 0 Rg: 1 rG: 0 rg: 1 Rg: 1 RG: 0 rG: 0 Following a request, all steps until the next grant are penalized.

  41. Request-Grant limavg Automaton 2 RG: 0 rg: 0 Rg: 0 rG: 1 rg: 0 Rg: 0 RG: 0 rG: 0 All unnecessary grants are penalized.

  42. Conclusions - We need to move from boolean program correctness criteria to quantitative program preference metrics.

  43. Conclusions - We need to move from boolean program correctness criteria to quantitative program preference metrics. - “ Quantitative ” is more than “ timed ” and “ probabilistic. ”

  44. Conclusions - We need to move from boolean program correctness criteria to quantitative program preference metrics. - “ Quantitative ” is more than “ timed ” and “ probabilistic. ” - Weighted automata over infinite words offer a quantitative specification language: Limit average Sum/ energy Discounting

  45. Conclusions - We need to move from boolean program correctness criteria to quantitative program preference metrics. - “ Quantitative ” is more than “ timed ” and “ probabilistic. ” - Weighted automata over infinite words offer a quantitative specification language: Limit average Sum/ energy Discounting - Games with quantitative objectives offer algorithmic solutions: Quantitative synthesis Simulation distances

Recommend


More recommend