1 / 15

Smooth Interpretation

This article explores the application of smoothing techniques in program analysis, specifically focusing on the parameter synthesis problem. It discusses the use of numerical methods and gradient descent for minimization, as well as the benefits of using smoothing to approximate program semantics. The article also highlights the challenges and considerations in executing a program on a distribution of inputs.

debbied
Download Presentation

Smooth Interpretation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Smooth Interpretation Swarat Chaudhuri and Armando Solar-Lezama

  2. The Parameter Synthesis Problem Warming: tOff := ??; tOn := ??; h := ?? repeat(Át) { temp := readTemp(); if (isOn() && temp > tOff) switchHeaterOff(); elseif( !isOn() && temp < tOn) switchHeaterOn(h); } Cooling:

  3. The Parameter Synthesis Problem temp time 75· Can we find values of (tOff, tOn, h) to minimize Err?

  4. Minimization by numerical search What about gradient descent?

  5. Smoothing to the Rescue

  6. Smoothing in Signal Processing • Gaussian Smoothing • Given a function • produces a smooth function What if we could do this for programs?

  7. Smoothed semantics of programs • Smoothed program: • Probabilistic semantics: • Make input a random variable with Normal distribution • Execute the program on this random variable • Return the expected value of the program output P(x) = if x > 2 then 1 else 0; Tuning knob: Standard deviationb.

  8. Smooth Interpretation How do we execute a program on a distribution of inputs? • Not by sampling • we would miss essential features of the search landscape. • Symbolic execution: • propagate symbolic representations of distributions. Input x Program Approximation of expected output

  9. Smooth Interpretation: Branch if( x > 0 ) true false

  10. Smooth Interpretation: Join if( x > 0 ) true false

  11. Smooth Interpretation: Join if( x > 0 ) true false

  12. Does this work?

  13. Back to the thermostat original 𝛽=1 𝛽=13 𝛽=1 0

  14. Parallel Parking Result of Search With Smoothing Result of Search Without Smoothing

  15. Conclusions • Numerical methods can benefit program analysis • They can not be applied blindly • numerical methods work better in continuous spaces • continuous approximations essential for good results • insights about program semantics are crucial

More Related