计算机科学 > 程序设计语言
[提交于 2021年9月15日]
标题:Dala: A Simple Capability-Based Dynamic Language Design For Data Race-Freedom
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:Kiko Fernandez-Reyes[v1] 2021年9月15日 星期三 19:13:02 UTC