SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Semelhante a (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
 

Semelhante a (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
 

Último

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

(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

Notas do Editor

  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