Smooth Interpretation Swarat Chaudhuri and Armando Solar-Lezama.

Slides:



Advertisements
Similar presentations
1 Automating the Generation of Mutation Tests Mike Papadakis and Nicos Malevris Department of Informatics Athens University of Economics and Business.
Advertisements

SADC Course in Statistics Confidence intervals using CAST (Session 07)
Slides from: Doug Gray, David Poole
Kinematic Synthesis of Robotic Manipulators from Task Descriptions June 2003 By: Tarek Sobh, Daniel Toundykov.
Some Properties of SSA Mooly Sagiv. Outline Why is it called Static Single Assignment form What does it buy us? How much does it cost us? Open questions.
Add and Use a Sensor & Autonomous For FIRST Robotics
Swarat Chaudhuri Rice University Biplab Deka Rakesh Kumar UIUC Principled Approximations in Probabilistic Programming.
Sampling Distributions (§ )
Reading for Next Week Textbook, Section 9, pp A User’s Guide to Support Vector Machines (linked from course website)
Simple Gear with Idler Idler Drive Driven.
Chain Drive Drive Driven Crank Chain.
Bevel Gear. 1. What is the position of the input shaft compared to the output shaft? Bevel Gear Perpendicular.
Uncertainty Representation. Gaussian Distribution variance Standard deviation.
Discovering Affine Equalities Using Random Interpretation Sumit Gulwani George Necula EECS Department University of California, Berkeley.
1 HOIST: A System for Automatically Deriving Static Analyzers for Embedded Systems John Regehr Alastair Reid School of Computing, University of Utah.
T T Population Sampling Distribution Purpose Allows the analyst to determine the mean and standard deviation of a sampling distribution.
Fall 2006 – Fundamentals of Business Statistics 1 Chapter 6 Introduction to Sampling Distributions.
1/55 EF 507 QUANTITATIVE METHODS FOR ECONOMICS AND FINANCE FALL 2008 Chapter 10 Hypothesis Testing.
Sampling Distributions
Lesson #17 Sampling Distributions. The mean of a sampling distribution is called the expected value of the statistic. The standard deviation of a sampling.
Statistics for the Social Sciences Psychology 340 Fall 2006 Review For Exam 1.
1 Integration of Background Modeling and Object Tracking Yu-Ting Chen, Chu-Song Chen, Yi-Ping Hung IEEE ICME, 2006.
Chapter 7: Variation in repeated samples – Sampling distributions
T T07-01 Sample Size Effect – Normal Distribution Purpose Allows the analyst to analyze the effect that sample size has on a sampling distribution.
Standard error of estimate & Confidence interval.
כמה מהתעשייה? מבנה הקורס השתנה Computer vision.
1 Assessment of Imprecise Reliability Using Efficient Probabilistic Reanalysis Farizal Efstratios Nikolaidis SAE 2007 World Congress.
Hypothesis Testing with Two Samples
Statistical Experimental Design
Chapter 10 Hypothesis Testing
L7.1b Continuous Random Variables CONTINUOUS RANDOM VARIABLES NORMAL DISTRIBUTIONS AD PROBABILITY DISTRIBUTIONS.
Probabilistic Mechanism Analysis. Outline Uncertainty in mechanisms Why consider uncertainty Basics of uncertainty Probabilistic mechanism analysis Examples.
Time Series Data Analysis - I Yaji Sripada. Dept. of Computing Science, University of Aberdeen2 In this lecture you learn What are Time Series? How to.
ECE 8443 – Pattern Recognition Objectives: Error Bounds Complexity Theory PAC Learning PAC Bound Margin Classifiers Resources: D.M.: Simplified PAC-Bayes.
M11-Normal Distribution 1 1  Department of ISM, University of Alabama, Lesson Objective  Understand what the “Normal Distribution” tells you.
Prognosis of Gear Health Using Gaussian Process Model Department of Adaptive systems, Institute of Information Theory and Automation, May 2011, Prague.
Direct Message Passing for Hybrid Bayesian Networks Wei Sun, PhD Assistant Research Professor SFL, C4I Center, SEOR Dept. George Mason University, 2009.
6.2 Homework Questions.
Driven Drive Simple Gear B. 2. What is the position of the input shaft compared to the output shaft? Simple Gear B Parallel.
Slide Slide 1 Section 6-5 The Central Limit Theorem.
8 Sampling Distribution of the Mean Chapter8 p Sampling Distributions Population mean and standard deviation,  and   unknown Maximal Likelihood.
Storyboard Programming Rishabh Singh and Armando Solar-Lezama.
§ 5.3 Normal Distributions: Finding Values. Probability and Normal Distributions If a random variable, x, is normally distributed, you can find the probability.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
"Classical" Inference. Two simple inference scenarios Question 1: Are we in world A or world B?
Review: Neural Network Control of Robot Manipulators; Frank L. Lewis; 1996.
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Insight: Steal from Existing Supervised Learning Methods! Training = {X,Y} Error = target output – actual output.
Neural Networks Vladimir Pleskonjić 3188/ /20 Vladimir Pleskonjić General Feedforward neural networks Inputs are numeric features Outputs are in.
Data Mining and Decision Support
Custom Computing Machines for the Set Covering Problem Paper Written By: Christian Plessl and Marco Platzner Swiss Federal Institute of Technology, 2002.
1 Probability and Statistics Confidence Intervals.
CS 551/651 Search and “Through the Lens” Lecture 13 Search and “Through the Lens” Lecture 13.
10.1 – Estimating with Confidence. Recall: The Law of Large Numbers says the sample mean from a large SRS will be close to the unknown population mean.
Anders Nielsen Technical University of Denmark, DTU-Aqua Mark Maunder Inter-American Tropical Tuna Commission An Introduction.
Ali Ghadirzadeh, Atsuto Maki, Mårten Björkman Sept 28- Oct Hamburg Germany Presented by Jen-Fang Chang 1.
Ch 1. Introduction Pattern Recognition and Machine Learning, C. M. Bishop, Updated by J.-H. Eom (2 nd round revision) Summarized by K.-I.
Normal Probabilities Find the probability P(x ≤ x0), where x is a normally distributed random variable Click Insert Function (fx) Select Statistical as.
STAT 312 Chapter 7 - Statistical Intervals Based on a Single Sample
12 Examination 1. Which of the below commands can be used to make decision in program based on a condition? a. If…else b. Set c. Switch d. Assignment e. Wait.
Continuous Probability Distributions
Statistical Experimental Design
Synthesis via Numerical optimization
Warm-up A radar unit is used to measure speeds of cars on a motorway. The speeds are normally distributed with a mean of 90 km/hr and a standard deviation.
CHAPTER 6 Statistical Inference & Hypothesis Testing
Sampling Distributions
Neural Networks ICS 273A UC Irvine Instructor: Max Welling
Statistical Thinking and Applications
Survey Networks Theory, Design and Testing
Probabilistic Surrogate Models
Presentation transcript:

Smooth Interpretation Swarat Chaudhuri and Armando Solar-Lezama

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

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

Minimization by numerical search What about gradient descent?

Minimization by numerical Search Discontinuities affect even the best methods

Smoothing to the Rescue

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

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

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. Program Approximation of expected output Input x

Smooth Interpretation: Assignment x = x - y;

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

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

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

Does this work?

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

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

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

Break On Break Off PID Controller with Break Wheel Motor Break Break On Break Off No Smoothing Wheel Position Break Goal Wheel Position Smoothing

MAKING THE WORLD A BETTER PLACE OF PROGRAMS FOR NUMERICAL METHODS void park(){ driveBack( ?? /*distance*/); driveTurningIn( ?? /*dist*/, ?? /*turn rate */); driveTurningOut(??/*dist*/, ??/*turn rate*/); }

Parameter synthesis: architecture Control program + Model of physical environment Gradient descent solver Program Error Smooth interpreter Built on top of GNU Scientific Library Suitable parameter values Extent of smoothing tuned dynamically Reference trajectory (specification)

Successful parameter synthesis in several control applications: –Automated gearbox (challenging!) –PID controller (even more challenging!) Numerical methods fail miserably without smoothing. Approximations needed to achieve scalability. Hypothesis: Numerical methods are of use in program analysis, but preprocessing (e.g., smoothing) is needed. Results

Approximation 1: Assignment x = x - y; x = -y;

Approximation 2: Branch if( x > 0 ) false true

Approximation 2: Branch if( x > 0 ) false true

Approximation 3: Join

Gearbox repeat( Á t){ v = carModel(v, gear, t); if(v > ?? && gear == 1){ gear = 0; tgear = 2; timer=0.8; }else if(v > ?? && gear == 2){ gear = 0; tgear = 3; timer=0.8; }else if(v > ?? && gear == 3){ gear = 0; tgear = 4; timer=0.8; }else if(v > ?? && gear == 4){ gear = 0; tgear = 5; timer=0.8; }else if(timer < 0 && gear == 0){ gear = tgear; } t += dt; timer -= dt; } Efficiency Curves g1 g2 g3 g4 g5 speed efficiency

Gradient Descent

Error Function for Gearbox

Wheel PID controller with Breaks Motor Break torque = ??*ang + ??*vel + ??*integral if( ?? * vel > ?? && ?? * ang > ??) break(); Goal := Angle(t x ) == target

Result without Smoothing

Result with Smoothing Goal

Error Functions for Controller