two approximate programmability birds one statistical
play

Two Approximate- Programmability Birds, One Statistical- Inference - PowerPoint PPT Presentation

Two Approximate- Programmability Birds, One Statistical- Inference Stone Adrian Sampson University of Washington sa pa APPROX 2014 Assisted approximate programming Statistical inference Cheap check generation 1 Assisted approximate


  1. Two Approximate- Programmability Birds, One Statistical- Inference Stone Adrian Sampson University of Washington sa pa APPROX 2014

  2. Assisted approximate programming Statistical inference Cheap check generation

  3. 1 Assisted approximate programming 3 Statistical inference 2 Cheap check generation 4 Next steps

  4. Expressing quality original program relaxed version input Pr[ d ( f ( x ) , f 0 ( x )) ≤ b ] ≥ p distance metric bounding parameters

  5. Assisted approximate programming f 0 f

  6. Manual Assisted approximate programming f 0 f int p = 5; � int p = 5; � int a = 7; � @Approx int a = 7; � for (int x = 0..) { � for (int x = 0..) { � a += func(2); � a += func(2); � int z; � @Approx int z; � z = p * 2; � z = p * 2; � p += 4; � p += 4; � } � } � a /= 9; � a /= 9; � func2(p); � func2(p); � a += func(2); � a += func(2); � int y; � @Approx int y; � z = p * 22 + z; � z = p * 22 + z; � p += 10; p += 10;

  7. Assisted approximate programming f 0 f + Pr[ d ( f ( x ) , f 0 ( x )) ≤ b ] ≥ p ExpAX [Esmaeilzadeh+] Syndy [Misailovic and Rinard, WACAS] Optimization in Rely [Misailovic+] ⋮

  8. Assisted approximate programming Statistical inference Cheap check generation

  9. Quality: the fantasy average probability Correctness Probability Inputs

  10. Quality: the reality average Correctness Probability probability Inputs

  11. Cheap checks to fall back to precise execution average Correctness Probability probability Inputs

  12. Cheap checks f 0 f Pr[ d ( f ( x ) , f 0 ( x )) ≤ b ] ≥ p x s.t. Pr[ d ( f ( x ) , f 0 ( x )) ≤ b ] ≥ p

  13. Assisted approximate programming Statistical inference Cheap check generation

  14. Approximate program def dist(x1, y1, x2, y2): � return sqrt((x1 − x2) ∗∗ 2 + (y1 − y2) ∗∗ 2) approximate operations

  15. Approximate program → probabilistic program def dist(x1, y1, x2, y2): � return sqrt((x1 − x2 + error() ) ∗∗ 2 � + (y1 − y2 + error() ) ∗∗ 2) � + error()

  16. Assisted approximate programming as statistical inference def dist(x1, y1, x2, y2): � return sqrt((x1 − x2 + error(?) ) ∗∗ 2 � + (y1 − y2 + error(?) ) ∗∗ 2) � + error(?) s.t. Pr[ d ( f ( x ) , f 0 ( x )) ≤ b ] ≥ p

  17. Cheap check generation as statistical inference x1 = dist(?) � y1 = dist(?) � x2 = dist(?) � y2 = dist(?) def dist(x1, y1, x2, y2): � return sqrt((x1 − x2 + error()) ∗∗ 2 � + (y1 − y2 + error()) ∗∗ 2) � + error() s.t. Pr[ d ( f ( x ) , f 0 ( x )) ≤ b ] ≥ p

  18. First steps

  19. First steps: translate to a probability distribution int p = 5; � int a = 7; � ? ? ? for (int x = 0..) { � a += func(2); � int z; � z = p * 2; � p += 4; � } � a /= 9; � func2(p); � a += func(2); � int y; � z = p * 22 + z; � p += 10;

  20. First steps: statistical inference with constraints? ? ? ? Pr[ d ( f ( x ) , f 0 ( x )) ≤ b ] ≥ p

  21. First steps: statistical inference with constraints and objectives? minimize ? ? ? Pr[ d ( f ( x ) , f 0 ( x )) ≤ b ] ≥ p

  22. First steps: statistical inference with constraints and objectives scalably? minimize ? ? ? Pr[ d ( f ( x ) , f 0 ( x )) ≤ b ] ≥ p

  23. Assisted approximate programming Statistical inference Cheap check generation

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend