proving programs robust l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Proving Programs Robust PowerPoint Presentation
Download Presentation
Proving Programs Robust

Loading in 2 Seconds...

play fullscreen
1 / 37

Proving Programs Robust - PowerPoint PPT Presentation


  • 218 Views
  • Uploaded on

Proving Programs Robust. Swarat Chaudhuri 1,3 Sumit Gulwani 2 Roberto Lublinerman 1 Sara Navidpour 1. 1 Pennsylvania State University 2 Microsoft Research 3 Rice University. Uncertainty. Uncertainty: stale satellite data, erroneous sensor measurements, …

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Proving Programs Robust' - raquel


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
proving programs robust
Proving Programs Robust

SwaratChaudhuri1,3Sumit Gulwani2Roberto Lublinerman1Sara Navidpour1

1Pennsylvania State University

2Microsoft Research

3Rice University

uncertainty
Uncertainty
  • Uncertainty: stale satellite data, erroneous sensor measurements, …
  • Does your program handle uncertainty robustly?

Proving programs robust

robustness
Robustness

Correctness in settings without uncertainty does not imply correctness in uncertain environments.

Proving programs robust

before we measure robustness
Before we “measure” robustness

3.14159

Proving programs robust

how would we measure robustness
How would we “measure” robustness?

No “jumps” due to loops and branches

Analytical continuity

P

f(x) = ex

Chaudhuri, Gulwani, Lublinerman. Continuity Analysis of Programs. POPL 2010.

quantitative robustness properties
Quantitative robustness properties

k-robustness:

Change in output is bounded by K times the change in inputs.

P

Proving programs robust

distance on arrays
Distance on arrays

-

=

max

= 3

Proving programs robust

distance on graphs
Distance on graphs

2

1

-

1

2

2

4

1

1

3

5

=

max

= 2

Proving programs robust

robustness of shortest path
Robustness of shortest path

You are here

Proving programs robust

robustness of shortest path10
Robustness of shortest path

2.00

3.00



4.10

2.00

1.00

4.00

1.00

3.00

1.00

1.00

2.00

You are here

Proving programs robust

robustness of shortest path11
Robustness of shortest path

2.00

3.00



4.10

2.00

1.00

4.00

1.00

3.00

1.00

1.00

2.00

1

2

You are here

Proving programs robust

robustness of shortest path12
Robustness of shortest path

2.00

3.00



2

4.10

2.00

1.00

4.00

2

1.00

3.00

1.00

1.00

2.00

1

2

You are here

Proving programs robust

robustness of shortest path13
Robustness of shortest path

2.00

3.00

6.10



2

4.10

2.00

1.00

4.00

2

1.00

3.00

1.00

1.00

2.00

1

2

You are here

Proving programs robust

robustness of shortest path14
Robustness of shortest path

2.00

3.00

6



2

4.10

2.00

1.00

4.00

2

1.00

3.00

5

1.00

1.00

2.00

1

2

You are here

Proving programs robust

robustness of shortest path15
Robustness of shortest path

2.00

3.00

6

7



2

4.10

2.00

1.00

4.00

2

1.00

3.00

5

1.00

1.00

2.00

1

2

You are here

Proving programs robust

robustness of shortest path16
Robustness of shortest path

2.00

3.00

6

7

9

2

4.10

2.00

1.00

4.00

2

1.00

3.00

5

1.00

1.00

2.00

1

2

You are here

Proving programs robust

robustness of shortest path17
Robustness of shortest path

2.00

3.00

6

7

9

2

4.10

2.00

1.00

4.00

2

1.00

3.00

5

0.95

1.00

1.00

2.00

2.10

1

2

You are here

Proving programs robust

robustness of shortest path18
Robustness of shortest path

2.00

3.00

6.05

7.10

9.05

1.95

4.10

2.00

1.00

4.00

1.95

1.00

3.00

5.10

0.95

1.00

2.10

0.95

2.10

You are here

Proving programs robust

r obustness matrices
Robustness matrices

R[y,x] = k

-variation in initial value of x

produces at most a k-variation in final value of y

Proving programs robust

how do we prove k robustness
How do we prove k-robustness

Proving programs robust

how do we prove k robustness22
How do we prove k-robustness

Proving programs robust

proving k robustness
Proving k-robustness

P

if B

T

F

  • 1. P1 has robustness matrix R1
  • P2has robustness matrix R2
  • P is continuous *1
  • P has robustness matrix
  • max(R1, R2)

P1

P2

*1Chaudhuri, Gulwani, Lublinerman. Continuity Analysis of Programs. POPL 2010.

Proving programs robust

proving k robustness24
Proving k-robustness

P

  • 1. P1 has robustness matrix R1
  • P2has robustness matrix R2
  • P has robustness matrix R2R1

P1

P2

Analogous to the “chain rule”

Proving programs robust

proving piecewise k robustness
Proving piecewise k-robustness

P

while B

  • 1. Q has robustness matrix R
  • N is the bound on loop iterations
  • P is continuous *1
  • P has robustness matrix RN

Q

*1Chaudhuri, Gulwani, Lublinerman. Continuity Analysis of Programs. POPL 2010.

Proving programs robust

example dijsktra s shortest path algorithm
Example: Dijsktra’s shortest path algorithm
  • procedure Dijkstra(G: graph, src: node):
  • for each node vinG:d[v] = 
  • d[src]= 0; W := edges of G
    • whileWis not empty
    • remove G[w,v] from Ws.t.d[w] is minimal
    • z = d[w] + G[w,v]
    • if z < d[v]
    • d[v] = z; prev[v] = w

Proving programs robust

example dijsktra s shortest path algorithm27
Example: Dijsktra’s shortest path algorithm
  • procedure Dijkstra(G: graph, src: node):
  • for each node vinG:d[v] = 
  • d[src]= 0; W := edges of G
    • whileWis not empty
    • remove G[w,v] from Ws.t.d[w] is minimal
    • z = d[w] + G[w,v]
    • if z < d[v]
    • d[v] = z; prev[v] = w

d[0] =

d[src] = 0

Proving programs robust

example dijsktra s shortest path algorithm28
Example: Dijsktra’s shortest path algorithm
  • procedure Dijkstra(G: graph, src: node):
  • for each node vinG:d[v] = 
  • d[src]= 0; W := edges of G
    • whileWis not empty
    • remove G[w,v] from Ws.t.d[w] is minimal
    • z = d[w] + G[w,v]
    • if z < d[v]
    • d[v] = z; prev[v] = w

if d[v] > d[w] + G[w,v]

F

T

d[v]=d[w] + G[w,v]

Proving programs robust

example dijsktra s shortest path algorithm29
Example: Dijsktra’s shortest path algorithm
  • procedure Dijkstra(G: graph, src: node):
  • for each node vinG:d[v] = 
  • d[src]= 0; W := edges of G
    • whileWis not empty
    • remove G[w,v] from Ws.t.d[w] is minimal
    • z = d[w] + G[w,v]
    • if z < d[v]
    • d[v] = z; prev[v] = w

while W not empty

Q

d is N-robust in G

Proving programs robust

approximate computation trade accuracy for reduced cost
Approximate Computation: Trade accuracy for reduced cost

for i:= ….

P’

Proving programs robust

applications approximate computation
Applications: Approximate Computation
  • Approximate loop rewriting:
  • Our static analysis can guide this sort of approximation

Accuracy vs. Performance trade-off of loop perforation [Sidiroglou, Misailovic, Hoffman, Rinard FSE11]

  • for i := 1 to n by 1
    • z = f(x[i])
    • sum = sum + z
    • sum = sum + z

2

Proving programs robust

applications privacy in statistical databases
Applications: Privacy in Statistical Databases

Differential privacy [Dwork]

Proving programs robust

results
Results
  • Implemented the analysis in a tool.
    • use Z3 to discharge continuity judgments.
  • Proved robustness for many classical algorithms

Proving programs robust

related work
Related Work
  • Work on interval polyhedra [Chen et al 2009] [Chen et al 2010]
  • Continuity analysis of programs [Chaudhuri et al 2010]
  • Testing for robustness [Majmudar et al 2010]
  • Calculus for differential privacy [Reed and Pierce 2010]

Proving programs robust

conclusion
Conclusion
  • Robustness is an important correctness property for programs operating under uncertainty.
  • We provide a automated program analysis for robustness.
  • k-robustness can be proved mechanically for many interesting programs.
  • Applications in different domains.

Proving programs robust

s orting 1 robust
Sorting 1-robust?

Proving programs robust