Safe mutation with algebraic effects
File(s) 3471874.3472988.pdf (231.13 KB)
Published version
Author(s)
Punchihewa, Hashan
Wu, Nicolas
Type
Conference Paper
Abstract
It can be difficult to write safe concurrent programs which
use shared mutable state. Subtle mistakes can lead to data
races that manifest as unexpected program behaviour. The
prevailing approaches to solving this dilemma are to either eschew mutable state altogether, or design bespoke
languages that prevent data races by design. This article introduces a third approach by showing how safe mutation can
be integrated into a mainstream functional programming
language with algebraic effects. This article produces a framework that tracks the use of mutable state and guarantees
data race freedom at compile time
use shared mutable state. Subtle mistakes can lead to data
races that manifest as unexpected program behaviour. The
prevailing approaches to solving this dilemma are to either eschew mutable state altogether, or design bespoke
languages that prevent data races by design. This article introduces a third approach by showing how safe mutation can
be integrated into a mainstream functional programming
language with algebraic effects. This article produces a framework that tracks the use of mutable state and guarantees
data race freedom at compile time
Date Issued
2021-08-18
Date Acceptance
2021-06-23
Citation
Proceedings of the 14th ACM SIGPLAN International Symposium on Haskell, 2021, pp.122-135
ISBN
9781450386159
Publisher
ACM
Start Page
122
End Page
135
Journal / Book Title
Proceedings of the 14th ACM SIGPLAN International Symposium on Haskell
Copyright Statement
© 2021 Copyright held by the owner/author(s). This work is licenced under a Creative Commons Attribution 4.0 International Licence (https://creativecommons.org/licenses/by/4.0/)
License URL
Sponsor
Engineering & Physical Science Research Council (EPSRC)
Grant Number
EP/S028129/1
Source
ACM SIGPLAN Haskell Symposium 2021
Subjects
Science & Technology
Technology
Computer Science, Software Engineering
Computer Science
parameterised algebraic effects
type-checker plugin
concurrency
data race
Publication Status
Published
Start Date
2021-08-26
Finish Date
2021-08-27
Coverage Spatial
Virtual
Date Publish Online
2021-08-18
