Dala: A Simple Capability-Based Dynamic Language Design For Data Race-Freedom

09/15/2021
by   Kiko Fernandez-Reyes, et al.
0

Dynamic languages like Erlang, Clojure, JavaScript, and E adopted data-race freedom by design. To enforce data-race freedom, these languages either deep copy objects during actor (thread) communication or proxy back to their owning thread. We present Dala, a simple programming model that ensures data-race freedom while supporting efficient inter-thread communication. Dala is a dynamic, concurrent, capability-based language that relies on three core capabilities: immutable values can be shared freely; isolated mutable objects can be transferred between threads but not aliased; local objects can be aliased within their owning thread but not dereferenced by other threads. Objects with capabilities can co-exist with unsafe objects, that are unchecked and may suffer data races, without compromising the safety of safe objects. We present a formal model of Dala, prove data race-freedom and state and prove a dynamic gradual guarantee. These theorems guarantee data race-freedom when using safe capabilities and show that the addition of capabilities is semantics preserving modulo permission and cast errors.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/14/2023

Degrees of Separation: A Flexible Type System for Data Race Prevention

Data races are a notorious problem in parallel programming. There has be...
research
12/12/2021

A simple proof of three properties on Simpson's 4-slot Algorithm

In this paper we present an invariance proof of three properties on Simp...
research
10/26/2020

Taming x86-TSO Persistency (Extended Version)

We study the formal semantics of non-volatile memory in the x86-TSO arch...
research
10/28/2019

Ready, set, Go! Data-race detection and the Go language

Data races are often discussed in the context of lock acquisition and re...
research
07/12/2018

Gradual Parametricity, Revisited (with Appendix)

Bringing the benefits of gradual typing to a language with parametric po...
research
08/26/2019

Automated Verification of CountDownLatch

The CountDownLatch (CDL) is a versatile concurrency mechanism that was f...
research
04/02/2022

A Study of Real-World Data Races in Golang

The concurrent programming literature is rich with tools and techniques ...

Please sign up or login with your details

Forgot password? Click here to reset