SlideShare a Scribd company logo
Coeffects:A calculus of context-dependent computation 
Tomas Petricek, Dominic Orchard and Alan Mycroft 
University of Cambridge 
{name.surname}@cl.cam.ac.uk|@tomaspetricek| @dorchard
Γ⊢푒:휏
Properties of computations 
Effect systems 
Effects on environment 
Modeled using monads 
Coeffect systems 
Requirements on environment 
Modeled using comonads 
Γ⊢푒:휏&흈 
Γ@풓⊢푒:휏
View from the extreme left 
Variable related 
Liveness 
Bounded linear logic 
Data-flow programming 
Provenance 
Environment related 
Implicit parameters 
Type classes 
Distributed computing 
Platform versioning
Variable related
Coeffect calculus for bounded reuse 
Coeffect annotations 
track number of variable uses 
vectorof variable annotations + function annotation 
richer structure than effect systems 
푦:int@1⊢휆푥→푦+푥+푥∶푖푛푡→ퟐ 푖푛푡
Coeffect calculus for bounded reuse 
structural rules = contraction + weakening + exchange 푥:휏@1⊢푥:휏 (푣푎푟) Γ,푥:휏1,푦:휏1@푅×푟,푠⊢푒∶휏2Γ,푧:휏1@푅×푟+푠⊢푒푥←푧,푦←푧:휏2(푐표푛푡푟) Γ,푥:휏1@푅×푠⊢푒:휏2Γ@푅⊢휆푥.푒∶휏1→푠 휏2(푎푏푠)
Coeffect calculus with historical values 
Γ,푥:휏1,푦:휏1@푅×푟,푠⊢푒∶휏2Γ,푧:휏1@푅×max(푟,푠)⊢푒푥←푧,푦←푧:휏2(푐표푛푡푟) 
푦:int@1⊢휆푥→푥+prev푥+푦∶푖푛푡→1 푖푛푡
Environment related
Coeffect calculus for implicit parameters 
Tracking implicit parameters 
Non-determinism can be fixed by annotation 
@{?zone}⊢휆()→?time+?zone∶푢푛푖푡 {?zone} 푡푖푚푒 
time} @{?time,?zone}⊢휆()→?time+?zone∶푢푛푖푡→∅ 푡푖푚푒
Coeffect calculus for implicit parameters 
Tracking implicit parameters 
Annotation does not mirror context structure 
Not the same as reader monadΓ,푥:휏1@푟∪푠⊢푒:휏2Γ@푟⊢휆푥.푒∶휏1→푠 휏2
What is in the paper?
Unified system 
Coeffect scalar structure (⊗,⊕,use,ign,≤) 
Generalized semiringstructure 
Individual variable or function annotations 
Shape-indexed coeffect(⨲,,⊥) 
Context splittingand merging 
Per-variable or whole-context 
⨲
Semantics using indexed comonads 
Monadic semanticsComonadic semantics 
It is not as simple 
휆-calculus is asymmetric (many to one) 
per-variable orwhole-context? Γ@푹⊢푒:휏:푪푹Γ→휏Γ⊢푒:휏&흈:Γ→푴흈휏
Why coeffects matter? 
generalize interesting systems 
liveness, data-flow, implicit parameters, type classes 
comonadsare cool 
model both per-variable and whole-context 
indexed 
{tomas.petricek, dominic.orchard, alan.mycroft}@cl.cam.ac.uk @tomaspetricek|@dorchard| #coeffects
EOF
Coeffect type system 푥:휏@use⊢푥:휏 (푣푎푟) Γ1@푅⊢푒1∶휏1→푡 휏2Γ2@푆⊢푒2∶휏1Γ1,Γ2@푅⨲푡⊗푆⊢푒1푒2:휏2(푎푝푝) Γ,푥:휏1@푅푠⊢푒:휏2Γ@푅⊢휆푥.푒∶휏1→푠 휏2(푎푏푠) 
⨲ Γ,푥:휏1,푦:휏1@푅푟,푠⊢푒∶휏2Γ,푧:휏1@푅⨲푟⊕푠⊢푒푥←푧,푦←푧:휏2(푐표푛푡푟) 
⨲
Effectsystems vs. coeffect systems 
More powerful lambda abstraction 
Richer structure 
Sequential ⊗vs. point-wise ⊕composition 
Vectors over variable context Γ,푥:휏1@푟∪푠⊢푒:휏2Γ@푟⊢휆푥.푒∶휏1→푠 휏2Γ,푥:휏1⊢푒:휏2&휎 Γ⊢휆푥.푒∶휏1→휎 휏2&∅
EOF
Why coeffects matter? 
generalize interesting systems 
liveness, data-flow, implicit parameters, type classes 
comonadsare cool 
model both per-variable and whole-context 
indexed 
{tomas.petricek, dominic.orchard, alan.mycroft}@cl.cam.ac.uk @tomaspetricek|@dorchard| #coeffects

More Related Content

What's hot

prie.ppt
prie.pptprie.ppt
prie.pptbutest
 
Gray-Box Models for Performance Assessment of Spark Applications
Gray-Box Models for Performance Assessment of Spark ApplicationsGray-Box Models for Performance Assessment of Spark Applications
Gray-Box Models for Performance Assessment of Spark Applications
ATMOSPHERE .
 
ReapAbstractbyDenzelakosa
ReapAbstractbyDenzelakosaReapAbstractbyDenzelakosa
ReapAbstractbyDenzelakosaDenzel Akosa
 
Starting work with R
Starting work with RStarting work with R
Starting work with R
Vladimir Bakhrushin
 
Diversity Filtering
Diversity FilteringDiversity Filtering
Diversity Filtering
Christos Kannas
 
2013 Limacon Memo
2013 Limacon Memo2013 Limacon Memo
2013 Limacon Memo
A Jorge Garcia
 

What's hot (7)

prie.ppt
prie.pptprie.ppt
prie.ppt
 
Gray-Box Models for Performance Assessment of Spark Applications
Gray-Box Models for Performance Assessment of Spark ApplicationsGray-Box Models for Performance Assessment of Spark Applications
Gray-Box Models for Performance Assessment of Spark Applications
 
ReapAbstractbyDenzelakosa
ReapAbstractbyDenzelakosaReapAbstractbyDenzelakosa
ReapAbstractbyDenzelakosa
 
Starting work with R
Starting work with RStarting work with R
Starting work with R
 
Diversity Filtering
Diversity FilteringDiversity Filtering
Diversity Filtering
 
Potters wheel
Potters wheelPotters wheel
Potters wheel
 
2013 Limacon Memo
2013 Limacon Memo2013 Limacon Memo
2013 Limacon Memo
 

Similar to Coeffects: A Calculus of Context-Dependent Computation

THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
ieijjournal1
 
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
ieijjournal
 
Advanced Functional Programming in Scala
Advanced Functional Programming in ScalaAdvanced Functional Programming in Scala
Advanced Functional Programming in Scala
Patrick Nicolas
 
PyData Miami 2019, Quantum Generalized Linear Models
PyData Miami 2019, Quantum Generalized Linear ModelsPyData Miami 2019, Quantum Generalized Linear Models
PyData Miami 2019, Quantum Generalized Linear Models
Colleen Farrelly
 
Investigation of auto-oscilational regimes of the system by dynamic nonlinear...
Investigation of auto-oscilational regimes of the system by dynamic nonlinear...Investigation of auto-oscilational regimes of the system by dynamic nonlinear...
Investigation of auto-oscilational regimes of the system by dynamic nonlinear...
IJECEIAES
 
Query trees
Query treesQuery trees
Query trees
Shefa Idrees
 
Arnav Major project for graph theory. ppt.pptx
Arnav Major project for graph theory. ppt.pptxArnav Major project for graph theory. ppt.pptx
Arnav Major project for graph theory. ppt.pptx
ssuser7e6271
 
Informatics systems
Informatics systemsInformatics systems
Informatics systems
Animesh Chaturvedi
 
Design Patterns for Efficient Graph Algorithms in MapReduce__HadoopSummit2010
Design Patterns for Efficient Graph Algorithms in MapReduce__HadoopSummit2010Design Patterns for Efficient Graph Algorithms in MapReduce__HadoopSummit2010
Design Patterns for Efficient Graph Algorithms in MapReduce__HadoopSummit2010
Yahoo Developer Network
 
Approaches to online quantile estimation
Approaches to online quantile estimationApproaches to online quantile estimation
Approaches to online quantile estimation
Data Con LA
 
High-Dimensional Network Estimation using ECL
High-Dimensional Network Estimation using ECLHigh-Dimensional Network Estimation using ECL
High-Dimensional Network Estimation using ECL
HPCC Systems
 
Toward a Recommendation System for focusing Testing
Toward a Recommendation System for focusing TestingToward a Recommendation System for focusing Testing
Toward a Recommendation System for focusing Testing
rsse2008
 
Jgrass-NewAge: Kriging component
Jgrass-NewAge: Kriging componentJgrass-NewAge: Kriging component
Jgrass-NewAge: Kriging component
Niccolò Tubini
 
15.sp.dictionary_draft.pdf
15.sp.dictionary_draft.pdf15.sp.dictionary_draft.pdf
15.sp.dictionary_draft.pdf
AllanKelvinSales
 
Economia01
Economia01Economia01
Economia01
Crist Oviedo
 
Economia01
Economia01Economia01
Economia01
Crist Oviedo
 
RelationalAlgebra-RelationalCalculus-SQL.pdf
RelationalAlgebra-RelationalCalculus-SQL.pdfRelationalAlgebra-RelationalCalculus-SQL.pdf
RelationalAlgebra-RelationalCalculus-SQL.pdf
10GUPTASOUMYARAMPRAK
 
Structural Dynamic Reanalysis of Beam Elements Using Regression Method
Structural Dynamic Reanalysis of Beam Elements Using Regression MethodStructural Dynamic Reanalysis of Beam Elements Using Regression Method
Structural Dynamic Reanalysis of Beam Elements Using Regression Method
IOSR Journals
 

Similar to Coeffects: A Calculus of Context-Dependent Computation (20)

THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
 
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...
 
Advanced Functional Programming in Scala
Advanced Functional Programming in ScalaAdvanced Functional Programming in Scala
Advanced Functional Programming in Scala
 
PyData Miami 2019, Quantum Generalized Linear Models
PyData Miami 2019, Quantum Generalized Linear ModelsPyData Miami 2019, Quantum Generalized Linear Models
PyData Miami 2019, Quantum Generalized Linear Models
 
Investigation of auto-oscilational regimes of the system by dynamic nonlinear...
Investigation of auto-oscilational regimes of the system by dynamic nonlinear...Investigation of auto-oscilational regimes of the system by dynamic nonlinear...
Investigation of auto-oscilational regimes of the system by dynamic nonlinear...
 
Query trees
Query treesQuery trees
Query trees
 
Arnav Major project for graph theory. ppt.pptx
Arnav Major project for graph theory. ppt.pptxArnav Major project for graph theory. ppt.pptx
Arnav Major project for graph theory. ppt.pptx
 
Informatics systems
Informatics systemsInformatics systems
Informatics systems
 
Design Patterns for Efficient Graph Algorithms in MapReduce__HadoopSummit2010
Design Patterns for Efficient Graph Algorithms in MapReduce__HadoopSummit2010Design Patterns for Efficient Graph Algorithms in MapReduce__HadoopSummit2010
Design Patterns for Efficient Graph Algorithms in MapReduce__HadoopSummit2010
 
Approaches to online quantile estimation
Approaches to online quantile estimationApproaches to online quantile estimation
Approaches to online quantile estimation
 
High-Dimensional Network Estimation using ECL
High-Dimensional Network Estimation using ECLHigh-Dimensional Network Estimation using ECL
High-Dimensional Network Estimation using ECL
 
Unit 3
Unit 3Unit 3
Unit 3
 
Toward a Recommendation System for focusing Testing
Toward a Recommendation System for focusing TestingToward a Recommendation System for focusing Testing
Toward a Recommendation System for focusing Testing
 
Jgrass-NewAge: Kriging component
Jgrass-NewAge: Kriging componentJgrass-NewAge: Kriging component
Jgrass-NewAge: Kriging component
 
15.sp.dictionary_draft.pdf
15.sp.dictionary_draft.pdf15.sp.dictionary_draft.pdf
15.sp.dictionary_draft.pdf
 
Economia01
Economia01Economia01
Economia01
 
Economia01
Economia01Economia01
Economia01
 
RelationalAlgebra-RelationalCalculus-SQL.pdf
RelationalAlgebra-RelationalCalculus-SQL.pdfRelationalAlgebra-RelationalCalculus-SQL.pdf
RelationalAlgebra-RelationalCalculus-SQL.pdf
 
Unit1 pg math model
Unit1 pg math modelUnit1 pg math model
Unit1 pg math model
 
Structural Dynamic Reanalysis of Beam Elements Using Regression Method
Structural Dynamic Reanalysis of Beam Elements Using Regression MethodStructural Dynamic Reanalysis of Beam Elements Using Regression Method
Structural Dynamic Reanalysis of Beam Elements Using Regression Method
 

More from Tomas Petricek

Domain Specific Languages: The Functional Way
Domain Specific Languages: The Functional WayDomain Specific Languages: The Functional Way
Domain Specific Languages: The Functional Way
Tomas Petricek
 
F# Data: Making structured data first class citizens
F# Data: Making structured data first class citizensF# Data: Making structured data first class citizens
F# Data: Making structured data first class citizens
Tomas Petricek
 
Doing data science with F# (BuildStuff)
Doing data science with F# (BuildStuff)Doing data science with F# (BuildStuff)
Doing data science with F# (BuildStuff)
Tomas Petricek
 
Doing data science with F#
Doing data science with F#Doing data science with F#
Doing data science with F#
Tomas Petricek
 
F# and Financial Data Making Data Analysis Simple
F# and Financial Data Making Data Analysis SimpleF# and Financial Data Making Data Analysis Simple
F# and Financial Data Making Data Analysis Simple
Tomas Petricek
 
Creating Domain Specific Languages in F#
Creating Domain Specific Languages in F#Creating Domain Specific Languages in F#
Creating Domain Specific Languages in F#
Tomas Petricek
 
How F# Learned to Stop Worrying and Love the Data
How F# Learned to Stop Worrying and Love the DataHow F# Learned to Stop Worrying and Love the Data
How F# Learned to Stop Worrying and Love the Data
Tomas Petricek
 
Information-rich programming in F# (ML Workshop 2012)
Information-rich programming in F# (ML Workshop 2012)Information-rich programming in F# (ML Workshop 2012)
Information-rich programming in F# (ML Workshop 2012)
Tomas Petricek
 
F# Type Providers in Depth
F# Type Providers in DepthF# Type Providers in Depth
F# Type Providers in Depth
Tomas Petricek
 
Asynchronous programming in F# (QCon 2012)
Asynchronous programming in F# (QCon 2012)Asynchronous programming in F# (QCon 2012)
Asynchronous programming in F# (QCon 2012)
Tomas Petricek
 
Queries in general purpose languages
Queries in general purpose languagesQueries in general purpose languages
Queries in general purpose languagesTomas Petricek
 
Docase notation for Haskell
Docase notation for HaskellDocase notation for Haskell
Docase notation for Haskell
Tomas Petricek
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#
Tomas Petricek
 
F# on the Server-Side
F# on the Server-SideF# on the Server-Side
F# on the Server-Side
Tomas Petricek
 
F# Tutorial @ QCon
F# Tutorial @ QConF# Tutorial @ QCon
F# Tutorial @ QCon
Tomas Petricek
 
Teaching F#
Teaching F#Teaching F#
Teaching F#
Tomas Petricek
 
F# in MonoDevelop
F# in MonoDevelopF# in MonoDevelop
F# in MonoDevelop
Tomas Petricek
 
Concurrent programming with Agents
Concurrent programming with AgentsConcurrent programming with Agents
Concurrent programming with Agents
Tomas Petricek
 

More from Tomas Petricek (19)

Domain Specific Languages: The Functional Way
Domain Specific Languages: The Functional WayDomain Specific Languages: The Functional Way
Domain Specific Languages: The Functional Way
 
F# Data: Making structured data first class citizens
F# Data: Making structured data first class citizensF# Data: Making structured data first class citizens
F# Data: Making structured data first class citizens
 
Doing data science with F# (BuildStuff)
Doing data science with F# (BuildStuff)Doing data science with F# (BuildStuff)
Doing data science with F# (BuildStuff)
 
Doing data science with F#
Doing data science with F#Doing data science with F#
Doing data science with F#
 
F# and Financial Data Making Data Analysis Simple
F# and Financial Data Making Data Analysis SimpleF# and Financial Data Making Data Analysis Simple
F# and Financial Data Making Data Analysis Simple
 
Creating Domain Specific Languages in F#
Creating Domain Specific Languages in F#Creating Domain Specific Languages in F#
Creating Domain Specific Languages in F#
 
How F# Learned to Stop Worrying and Love the Data
How F# Learned to Stop Worrying and Love the DataHow F# Learned to Stop Worrying and Love the Data
How F# Learned to Stop Worrying and Love the Data
 
Information-rich programming in F# (ML Workshop 2012)
Information-rich programming in F# (ML Workshop 2012)Information-rich programming in F# (ML Workshop 2012)
Information-rich programming in F# (ML Workshop 2012)
 
F# Type Providers in Depth
F# Type Providers in DepthF# Type Providers in Depth
F# Type Providers in Depth
 
Asynchronous programming in F# (QCon 2012)
Asynchronous programming in F# (QCon 2012)Asynchronous programming in F# (QCon 2012)
Asynchronous programming in F# (QCon 2012)
 
Queries in general purpose languages
Queries in general purpose languagesQueries in general purpose languages
Queries in general purpose languages
 
Docase notation for Haskell
Docase notation for HaskellDocase notation for Haskell
Docase notation for Haskell
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#
 
F# on the Server-Side
F# on the Server-SideF# on the Server-Side
F# on the Server-Side
 
F# Tutorial @ QCon
F# Tutorial @ QConF# Tutorial @ QCon
F# Tutorial @ QCon
 
Teaching F#
Teaching F#Teaching F#
Teaching F#
 
F# in MonoDevelop
F# in MonoDevelopF# in MonoDevelop
F# in MonoDevelop
 
Academia
AcademiaAcademia
Academia
 
Concurrent programming with Agents
Concurrent programming with AgentsConcurrent programming with Agents
Concurrent programming with Agents
 

Recently uploaded

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 

Recently uploaded (20)

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 

Coeffects: A Calculus of Context-Dependent Computation

  • 1. Coeffects:A calculus of context-dependent computation Tomas Petricek, Dominic Orchard and Alan Mycroft University of Cambridge {name.surname}@cl.cam.ac.uk|@tomaspetricek| @dorchard
  • 3. Properties of computations Effect systems Effects on environment Modeled using monads Coeffect systems Requirements on environment Modeled using comonads Γ⊢푒:휏&흈 Γ@풓⊢푒:휏
  • 4. View from the extreme left Variable related Liveness Bounded linear logic Data-flow programming Provenance Environment related Implicit parameters Type classes Distributed computing Platform versioning
  • 6. Coeffect calculus for bounded reuse Coeffect annotations track number of variable uses vectorof variable annotations + function annotation richer structure than effect systems 푦:int@1⊢휆푥→푦+푥+푥∶푖푛푡→ퟐ 푖푛푡
  • 7. Coeffect calculus for bounded reuse structural rules = contraction + weakening + exchange 푥:휏@1⊢푥:휏 (푣푎푟) Γ,푥:휏1,푦:휏1@푅×푟,푠⊢푒∶휏2Γ,푧:휏1@푅×푟+푠⊢푒푥←푧,푦←푧:휏2(푐표푛푡푟) Γ,푥:휏1@푅×푠⊢푒:휏2Γ@푅⊢휆푥.푒∶휏1→푠 휏2(푎푏푠)
  • 8. Coeffect calculus with historical values Γ,푥:휏1,푦:휏1@푅×푟,푠⊢푒∶휏2Γ,푧:휏1@푅×max(푟,푠)⊢푒푥←푧,푦←푧:휏2(푐표푛푡푟) 푦:int@1⊢휆푥→푥+prev푥+푦∶푖푛푡→1 푖푛푡
  • 10. Coeffect calculus for implicit parameters Tracking implicit parameters Non-determinism can be fixed by annotation @{?zone}⊢휆()→?time+?zone∶푢푛푖푡 {?zone} 푡푖푚푒 time} @{?time,?zone}⊢휆()→?time+?zone∶푢푛푖푡→∅ 푡푖푚푒
  • 11. Coeffect calculus for implicit parameters Tracking implicit parameters Annotation does not mirror context structure Not the same as reader monadΓ,푥:휏1@푟∪푠⊢푒:휏2Γ@푟⊢휆푥.푒∶휏1→푠 휏2
  • 12. What is in the paper?
  • 13. Unified system Coeffect scalar structure (⊗,⊕,use,ign,≤) Generalized semiringstructure Individual variable or function annotations Shape-indexed coeffect(⨲,,⊥) Context splittingand merging Per-variable or whole-context ⨲
  • 14. Semantics using indexed comonads Monadic semanticsComonadic semantics It is not as simple 휆-calculus is asymmetric (many to one) per-variable orwhole-context? Γ@푹⊢푒:휏:푪푹Γ→휏Γ⊢푒:휏&흈:Γ→푴흈휏
  • 15. Why coeffects matter? generalize interesting systems liveness, data-flow, implicit parameters, type classes comonadsare cool model both per-variable and whole-context indexed {tomas.petricek, dominic.orchard, alan.mycroft}@cl.cam.ac.uk @tomaspetricek|@dorchard| #coeffects
  • 16. EOF
  • 17. Coeffect type system 푥:휏@use⊢푥:휏 (푣푎푟) Γ1@푅⊢푒1∶휏1→푡 휏2Γ2@푆⊢푒2∶휏1Γ1,Γ2@푅⨲푡⊗푆⊢푒1푒2:휏2(푎푝푝) Γ,푥:휏1@푅푠⊢푒:휏2Γ@푅⊢휆푥.푒∶휏1→푠 휏2(푎푏푠) ⨲ Γ,푥:휏1,푦:휏1@푅푟,푠⊢푒∶휏2Γ,푧:휏1@푅⨲푟⊕푠⊢푒푥←푧,푦←푧:휏2(푐표푛푡푟) ⨲
  • 18. Effectsystems vs. coeffect systems More powerful lambda abstraction Richer structure Sequential ⊗vs. point-wise ⊕composition Vectors over variable context Γ,푥:휏1@푟∪푠⊢푒:휏2Γ@푟⊢휆푥.푒∶휏1→푠 휏2Γ,푥:휏1⊢푒:휏2&휎 Γ⊢휆푥.푒∶휏1→휎 휏2&∅
  • 19. EOF
  • 20. Why coeffects matter? generalize interesting systems liveness, data-flow, implicit parameters, type classes comonadsare cool model both per-variable and whole-context indexed {tomas.petricek, dominic.orchard, alan.mycroft}@cl.cam.ac.uk @tomaspetricek|@dorchard| #coeffects