Message-passing concurrency is a popular computation model that underlies several programming languages like, e.g., Erlang, Akka, and (to some extent) Go and Rust. In particular, we consider a message-passing concurrent language with dynamic process spawning and selective receives, i.e., where messages can only be consumed by the target process when they match a specific constraint (e.g., the case of Erlang). In this work, we introduce a notion of trace that can be seen as an abstraction of a class of causally equivalent executions (i.e., which produce the same outcome). We then show that execution traces can be used to identify message races. We provide constructive definitions to compute message races as well as to produce so-called race variants, which can then be used to drive new executions which are not causally equivalent to the previous ones. This is an essential ingredient of state-space exploration techniques for program verification.
翻译:信息传递通俗是一种流行的计算模式,它以诸如Errang、Akka、以及(在某种程度上)Go和Rust等几种编程语言为基础。特别是,我们考虑一种信息传递同时使用的语言,其动态过程产生并有选择地接收,即信息只有在与特定限制相匹配时才能被目标过程消耗(例如Erlang的情况),在这项工作中,我们引入了一种追踪概念,可以被视为一种因果等同的处决(即产生相同结果的处决)的抽象化。然后,我们展示了处决痕迹可用于识别信息竞赛。我们提供了建设性的定义,用以计算信息竞赛并产生所谓的种族变体,然后可用来驱动与先前的不因果等同的新处决。这是用于方案核查的州空间探索技术的一个基本组成部分。