SlideShare une entreprise Scribd logo
1  sur  17
(Relative) Safety Properties for
Relaxed Approximate Programs
Michael Carbin and Martin Rinard
MIT EECS and CSAIL
Approximate Computing
Media Processing, Machine Learning, Search
Fuzzy = Tradeoff of Accuracy and Cost
Accuracy
Time/Resources/Cost
0%
100%
Highly Accurate,
Expensive
Less accurate,
Inexpensive
Standard Program Model
Accuracy
Time/Resources/Cost
0%
100%
One point in tradeoff space
Relaxed Program Model
Accuracy
Time/Resources/Cost
0%
100%
Admits executions at multiple
points in tradeoff space
Relaxed programs can dynamically and automatically adapt
Producing Relaxed Programs
Task Skipping/Loop Perforation - Rinard ICS ‘06, Misailovic ICSE ‘10
Dynamic Knobs - Hoffmann ASPLOS ‘11
Approximate Memories - Lui ASPLOS ‘11, Sampson PLDI ‘11
Approximate Memoization - Chaudhuri FSE ‘11
Unsynchronized Parallelization - Misailovic MIT-TR ‘10, Rinard RACES ‘12
Unsynchronized Parallelization
When is this acceptable?
Defining Acceptable
IntegrityAccuracy
Key: any implementation that satisfies the
stated acceptability properties is acceptable
Acceptability Properties
Defining Acceptable
IntegrityAccuracy
Key: any implementation that satisfies the
stated acceptability properties is acceptable
Acceptability Properties
Safety
How do we verify the safety
of 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
}{}{ QsP
Standard Hoare Logic
doesn’t capture what we want
General Model for Relaxed Programs
A 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 Relaxed
Approximate Programs. Carbin, Kim, Misailovic, Rinard. PLDI ‘12
Modified Variables
Relaxation Predicate
Loop 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 is
modified
Prove 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 but
y the same
Only prove R
If S(y<o>) is true
and y<r> == y<o>
then S(y<r>) is true
Relational reasoning is the bridge
If original program satisfies all assertions,
then the relaxed program satisfies all assertions
Relative Safety
More in our RACES paper:
• Small formalization of unsynchronized parallelization
• Formal statement of relative safety
• Simple example from the Jade Benchmarks suite
Established through any means:
verification, testing, code review
Takeaway
Relax Semantics. Preserve Safety. Reuse Proofs

Contenu connexe

Similaire à (Relative) Safety Properties for Relaxed Approximate Programs

Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...
Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...
Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...Universidad Rey Juan Carlos
 
Fuzzy Control meets Software Engineering
Fuzzy Control meets Software EngineeringFuzzy Control meets Software Engineering
Fuzzy Control meets Software EngineeringPooyan Jamshidi
 
rit seminars-privacy assured outsourcing of image reconstruction services in ...
rit seminars-privacy assured outsourcing of image reconstruction services in ...rit seminars-privacy assured outsourcing of image reconstruction services in ...
rit seminars-privacy assured outsourcing of image reconstruction services in ...thahirakabeer
 
Model-based GUI testing using UPPAAL
Model-based GUI testing using UPPAALModel-based GUI testing using UPPAAL
Model-based GUI testing using UPPAALUlrik Hørlyk Hjort
 
Generalized Property-Directed Reachability for Hybrid Systems (presented in V...
Generalized Property-Directed Reachability for Hybrid Systems (presented in V...Generalized Property-Directed Reachability for Hybrid Systems (presented in V...
Generalized Property-Directed Reachability for Hybrid Systems (presented in V...Kohei Suenaga
 
Benchmarking and PHPBench
Benchmarking and PHPBenchBenchmarking and PHPBench
Benchmarking and PHPBenchdantleech
 
Get Reactive: Microservices, Programming, and Systems
Get Reactive: Microservices, Programming, and SystemsGet Reactive: Microservices, Programming, and Systems
Get Reactive: Microservices, Programming, and SystemsJeremy Davis
 
SERENE 2014 School: Resilience in Cyber-Physical Systems: Challenges and Oppo...
SERENE 2014 School: Resilience in Cyber-Physical Systems: Challenges and Oppo...SERENE 2014 School: Resilience in Cyber-Physical Systems: Challenges and Oppo...
SERENE 2014 School: Resilience in Cyber-Physical Systems: Challenges and Oppo...SERENEWorkshop
 
SERENE 2014 School: Gabor karsai serene2014_school
SERENE 2014 School: Gabor karsai serene2014_schoolSERENE 2014 School: Gabor karsai serene2014_school
SERENE 2014 School: Gabor karsai serene2014_schoolHenry Muccini
 
Implementation of the fully adaptive radar framework: Practical limitations
Implementation of the fully adaptive radar framework: Practical limitationsImplementation of the fully adaptive radar framework: Practical limitations
Implementation of the fully adaptive radar framework: Practical limitationsLuis Úbeda Medina
 
Mini-lab 1: Stochastic Gradient Descent classifier, Optimizing Logistic Regre...
Mini-lab 1: Stochastic Gradient Descent classifier, Optimizing Logistic Regre...Mini-lab 1: Stochastic Gradient Descent classifier, Optimizing Logistic Regre...
Mini-lab 1: Stochastic Gradient Descent classifier, Optimizing Logistic Regre...Yao Yao
 
System Verilog 2009 & 2012 enhancements
System Verilog 2009 & 2012 enhancementsSystem Verilog 2009 & 2012 enhancements
System Verilog 2009 & 2012 enhancementsSubash John
 
What's new in Apache SystemML - Declarative Machine Learning
What's new in Apache SystemML  - Declarative Machine LearningWhat's new in Apache SystemML  - Declarative Machine Learning
What's new in Apache SystemML - Declarative Machine LearningLuciano Resende
 
CMU Lecture on Hadoop Performance
CMU Lecture on Hadoop PerformanceCMU Lecture on Hadoop Performance
CMU Lecture on Hadoop PerformanceMapR Technologies
 
Automated Program Repair Keynote talk
Automated Program Repair Keynote talkAutomated Program Repair Keynote talk
Automated Program Repair Keynote talkAbhik Roychoudhury
 
Sw metrics for regression testing
Sw metrics for regression testingSw metrics for regression testing
Sw metrics for regression testingJyotsna Sharma
 
Auto sre with keptn
Auto sre with keptnAuto sre with keptn
Auto sre with keptnLibbySchulze
 
2007 03-16 modeling and static analysis of complex biological systems dsr
2007 03-16 modeling and static analysis of complex biological systems dsr2007 03-16 modeling and static analysis of complex biological systems dsr
2007 03-16 modeling and static analysis of complex biological systems dsrDebora Da Rosa
 
Time v Frequency Domain Analysis For Large Automotive Systems
Time v Frequency Domain Analysis For Large Automotive SystemsTime v Frequency Domain Analysis For Large Automotive Systems
Time v Frequency Domain Analysis For Large Automotive SystemsAltair
 

Similaire à (Relative) Safety Properties for Relaxed Approximate Programs (20)

Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...
Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...
Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...
 
Fuzzy Control meets Software Engineering
Fuzzy Control meets Software EngineeringFuzzy Control meets Software Engineering
Fuzzy Control meets Software Engineering
 
rit seminars-privacy assured outsourcing of image reconstruction services in ...
rit seminars-privacy assured outsourcing of image reconstruction services in ...rit seminars-privacy assured outsourcing of image reconstruction services in ...
rit seminars-privacy assured outsourcing of image reconstruction services in ...
 
Model-based GUI testing using UPPAAL
Model-based GUI testing using UPPAALModel-based GUI testing using UPPAAL
Model-based GUI testing using UPPAAL
 
Generalized Property-Directed Reachability for Hybrid Systems (presented in V...
Generalized Property-Directed Reachability for Hybrid Systems (presented in V...Generalized Property-Directed Reachability for Hybrid Systems (presented in V...
Generalized Property-Directed Reachability for Hybrid Systems (presented in V...
 
Benchmarking and PHPBench
Benchmarking and PHPBenchBenchmarking and PHPBench
Benchmarking and PHPBench
 
Get Reactive: Microservices, Programming, and Systems
Get Reactive: Microservices, Programming, and SystemsGet Reactive: Microservices, Programming, and Systems
Get Reactive: Microservices, Programming, and Systems
 
SERENE 2014 School: Resilience in Cyber-Physical Systems: Challenges and Oppo...
SERENE 2014 School: Resilience in Cyber-Physical Systems: Challenges and Oppo...SERENE 2014 School: Resilience in Cyber-Physical Systems: Challenges and Oppo...
SERENE 2014 School: Resilience in Cyber-Physical Systems: Challenges and Oppo...
 
SERENE 2014 School: Gabor karsai serene2014_school
SERENE 2014 School: Gabor karsai serene2014_schoolSERENE 2014 School: Gabor karsai serene2014_school
SERENE 2014 School: Gabor karsai serene2014_school
 
Implementation of the fully adaptive radar framework: Practical limitations
Implementation of the fully adaptive radar framework: Practical limitationsImplementation of the fully adaptive radar framework: Practical limitations
Implementation of the fully adaptive radar framework: Practical limitations
 
Mini-lab 1: Stochastic Gradient Descent classifier, Optimizing Logistic Regre...
Mini-lab 1: Stochastic Gradient Descent classifier, Optimizing Logistic Regre...Mini-lab 1: Stochastic Gradient Descent classifier, Optimizing Logistic Regre...
Mini-lab 1: Stochastic Gradient Descent classifier, Optimizing Logistic Regre...
 
System Verilog 2009 & 2012 enhancements
System Verilog 2009 & 2012 enhancementsSystem Verilog 2009 & 2012 enhancements
System Verilog 2009 & 2012 enhancements
 
What's new in Apache SystemML - Declarative Machine Learning
What's new in Apache SystemML  - Declarative Machine LearningWhat's new in Apache SystemML  - Declarative Machine Learning
What's new in Apache SystemML - Declarative Machine Learning
 
CMU Lecture on Hadoop Performance
CMU Lecture on Hadoop PerformanceCMU Lecture on Hadoop Performance
CMU Lecture on Hadoop Performance
 
Lightspeed SIGGRAPH talk
Lightspeed SIGGRAPH talkLightspeed SIGGRAPH talk
Lightspeed SIGGRAPH talk
 
Automated Program Repair Keynote talk
Automated Program Repair Keynote talkAutomated Program Repair Keynote talk
Automated Program Repair Keynote talk
 
Sw metrics for regression testing
Sw metrics for regression testingSw metrics for regression testing
Sw metrics for regression testing
 
Auto sre with keptn
Auto sre with keptnAuto sre with keptn
Auto sre with keptn
 
2007 03-16 modeling and static analysis of complex biological systems dsr
2007 03-16 modeling and static analysis of complex biological systems dsr2007 03-16 modeling and static analysis of complex biological systems dsr
2007 03-16 modeling and static analysis of complex biological systems dsr
 
Time v Frequency Domain Analysis For Large Automotive Systems
Time v Frequency Domain Analysis For Large Automotive SystemsTime v Frequency Domain Analysis For Large Automotive Systems
Time v Frequency Domain Analysis For Large Automotive Systems
 

Dernier

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Dernier (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

(Relative) Safety Properties for Relaxed Approximate Programs

  • 1. (Relative) Safety Properties for Relaxed Approximate Programs Michael Carbin and Martin Rinard MIT EECS and CSAIL
  • 2. Approximate Computing Media Processing, Machine Learning, Search
  • 3. Fuzzy = Tradeoff of Accuracy and Cost Accuracy Time/Resources/Cost 0% 100% Highly Accurate, Expensive Less accurate, Inexpensive
  • 5. Relaxed Program Model Accuracy Time/Resources/Cost 0% 100% Admits executions at multiple points in tradeoff space Relaxed programs can dynamically and automatically adapt
  • 6. Producing Relaxed Programs Task Skipping/Loop Perforation - Rinard ICS ‘06, Misailovic ICSE ‘10 Dynamic Knobs - Hoffmann ASPLOS ‘11 Approximate Memories - Lui ASPLOS ‘11, Sampson PLDI ‘11 Approximate Memoization - Chaudhuri FSE ‘11 Unsynchronized Parallelization - Misailovic MIT-TR ‘10, Rinard RACES ‘12
  • 8. Defining Acceptable IntegrityAccuracy Key: any implementation that satisfies the stated acceptability properties is acceptable Acceptability Properties
  • 9. Defining Acceptable IntegrityAccuracy Key: any implementation that satisfies the stated acceptability properties is acceptable Acceptability Properties Safety
  • 10. How do we verify the safety of relaxed programs?
  • 11. 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 }{}{ QsP Standard Hoare Logic doesn’t capture what we want
  • 12. General Model for Relaxed Programs A 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 Relaxed Approximate Programs. Carbin, Kim, Misailovic, Rinard. PLDI ‘12 Modified Variables Relaxation Predicate Loop Perforation!
  • 13. 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 is modified Prove both R and S
  • 14. Relational Program Logic {x<r> == x<o> && y<r> == y<o>} relax (x) st (true); {y<r> == y<o>} relrel QsP
  • 15. 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 but y the same Only prove R If S(y<o>) is true and y<r> == y<o> then S(y<r>) is true Relational reasoning is the bridge
  • 16. If original program satisfies all assertions, then the relaxed program satisfies all assertions Relative Safety More in our RACES paper: • Small formalization of unsynchronized parallelization • Formal statement of relative safety • Simple example from the Jade Benchmarks suite Established through any means: verification, testing, code review
  • 17. Takeaway Relax Semantics. Preserve Safety. Reuse Proofs

Notes de l'éditeur

  1. We are being exposed to a a lot more applications that are being built for approximate computing
  2. 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.
  3. 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.
  4. How do we verify properties like these for relaxed programs in general?
  5. 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
  6. Keep track of relations between original and relaxed program.
  7. 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.
  8. This addresses the key problem. Address how we can hope to verify large programs, because we can using whatever means necessary to verfy