SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Ähnlich wie (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
 

Ähnlich wie (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
 

Kürzlich hochgeladen

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Kürzlich hochgeladen (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

(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

Hinweis der Redaktion

  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