(Relative) Safety Properties for Relaxed Approximate Programs
Upcoming SlideShare
Loading in...5
×
 

(Relative) Safety Properties for Relaxed Approximate Programs

on

  • 306 views

Presentation by Michael Carbin.

Presentation by Michael Carbin.
Paper and more information: http://soft.vub.ac.be/races/paper/relative-safety-properties-for-relaxed-approximate-programs/

Statistics

Views

Total Views
306
Views on SlideShare
138
Embed Views
168

Actions

Likes
0
Downloads
1
Comments
0

1 Embed 168

http://soft.vub.ac.be 168

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • We are being exposed to a a lot more applications that are being built for approximate computing
  • What I mean by approximation is there is larger space of potential solutions to a problem, each with differing accuracy versus cost, where cost is in terms of time, or power, or storage. A developer’s task is often to identify some set of solutions that gives the majority of the accuracy for some given or reasonable amount of time.
  • What I mean by approximation is there is larger space of potential solutions to a problem, each with differing accuracy versus cost, where cost is in terms of time, or power, or storage. A developer’s task is often to identify some set of solutions that gives the majority of the accuracy for some given or reasonable amount of time.
  • How do we verify properties like these for relaxed programs in general?
  • As we can see, it’s entirely possible to verify the program outright. Let P, Q, and R be properties in first order logic describing states of the program. The relax statement has the semantics of a non-deterministic assignment
  • Keep track of relations between original and relaxed program.
  • FOCUS: Don’t need to restablish S(y).This is great. Relational reasoning allows us to transfer properties we’ve proved of the original program to the relaxed program in cases where we do not interfere.
  • This addresses the key problem. Address how we can hope to verify large programs, because we can using whatever means necessary to verfy

(Relative) Safety Properties for Relaxed Approximate Programs (Relative) Safety Properties for Relaxed Approximate Programs Presentation Transcript

  • (Relative) Safety Properties forRelaxed Approximate ProgramsMichael Carbin and Martin RinardMIT EECS and CSAIL
  • Approximate ComputingMedia Processing, Machine Learning, Search
  • Fuzzy = Tradeoff of Accuracy and CostAccuracyTime/Resources/Cost0%100%Highly Accurate,ExpensiveLess accurate,Inexpensive
  • Standard Program ModelAccuracyTime/Resources/Cost0%100%One point in tradeoff space
  • Relaxed Program ModelAccuracyTime/Resources/Cost0%100%Admits executions at multiplepoints in tradeoff spaceRelaxed programs can dynamically and automatically adapt
  • Producing Relaxed ProgramsTask Skipping/Loop Perforation - Rinard ICS ‘06, Misailovic ICSE ‘10Dynamic Knobs - Hoffmann ASPLOS ‘11Approximate Memories - Lui ASPLOS ‘11, Sampson PLDI ‘11Approximate Memoization - Chaudhuri FSE ‘11Unsynchronized Parallelization - Misailovic MIT-TR ‘10, Rinard RACES ‘12
  • Unsynchronized ParallelizationWhen is this acceptable?
  • Defining AcceptableIntegrityAccuracyKey: any implementation that satisfies thestated acceptability properties is acceptableAcceptability Properties
  • Defining AcceptableIntegrityAccuracyKey: any implementation that satisfies thestated acceptability properties is acceptableAcceptability PropertiesSafety
  • How do we verify the safetyof relaxed programs?
  • Program Logic (Hoare Logic){x = 1} x = x + 1 {x = 2}If we know P is true of the program,then after execution of s, Q is also true}{}{ QsPStandard Hoare Logicdoesn’t capture what we want
  • General Model for Relaxed ProgramsA general primitive for relaxed sequential programs [1]:relax (n) st (n <= old(n));for (uint i = 0; i < n; ++i) {...}[1] Proving Acceptability Properties of Nondeterministic RelaxedApproximate Programs. Carbin, Kim, Misailovic, Rinard. PLDI ‘12Modified VariablesRelaxation PredicateLoop Perforation!
  • Applying Standard Hoare Logic• Note: relaxation doesn’t modify y• If S(y) holds in the original program,then it also holds in relaxed program<...>{ P(x, y) && Q(y) }relax (x) st (true);{ Q(y) }<...>{ R(x, y) && S(y)}assert R(x, y) && S(y);Lose P because x ismodifiedProve both R and S
  • Relational Program Logic{x<r> == x<o> && y<r> == y<o>}relax (x) st (true);{y<r> == y<o>}relrel QsP
  • Applying Relational Program Logic<...>{x<r> == x<o> && y<r> == y<o>}relax (x) st (true);{ y<r> == y<o> }<...>{R(x<r>, y<r>) && y<r> == y<o> }assert R(x, y) && S(y) ;x different buty the sameOnly prove RIf S(y<o>) is trueand y<r> == y<o>then S(y<r>) is trueRelational reasoning is the bridge
  • If original program satisfies all assertions,then the relaxed program satisfies all assertionsRelative SafetyMore in our RACES paper:• Small formalization of unsynchronized parallelization• Formal statement of relative safety• Simple example from the Jade Benchmarks suiteEstablished through any means:verification, testing, code review
  • TakeawayRelax Semantics. Preserve Safety. Reuse Proofs