Common approaches to concurrent programming begin with languages whose semantics are naturally sequential and add new constructs that provide limited access to concurrency, as exemplified by futures. This approach has been quite successful, but often does not provide a satisfactory theoretical backing for the concurrency constructs, and it can be difficult to give a good semantics that allows a programmer to use more than one of these constructs at a time. We take a different approach, starting with a concurrent language based on a Curry-Howard interpretation of adjoint logic, to which we add three atomic primitives that allow us to encode sequential composition and various forms of synchronization. The resulting language is highly expressive, allowing us to encode futures, fork/join parallelism, and monadic concurrency in the same framework. Notably, since our language is based on adjoint logic, we are able to give a formal account of linear futures, which have been used in complexity analysis by Blelloch and Reid-Miller. The uniformity of this approach means that we can similarly work with many of the other concurrency primitives in a linear fashion, and that we can mix several of these forms of concurrency in the same program to serve different purposes.
翻译:同步编程的共同方法始于语言,语言的语义自然是顺序的,并增加了新的构件,如未来所示,这些构件提供了有限的调制语言。这种方法非常成功,但往往不能为调制货币结构提供令人满意的理论支持,而且可能很难给一个好的语义,使程序员能够同时使用其中不止一种构件。我们采取不同的方法,从基于对交配逻辑的“Curry-Howard”解释的“Curry-Howard”解释的并行语言开始,我们增加三个原始原子,使我们能够对顺序组成和各种形式的同步进行编码。由此产生的语言非常清晰,使我们能够对未来、福克/join平行主义和同一框架中的元体调法进行编码。值得注意的是,由于我们的语言是以联动逻辑为基础,我们能够对线性未来进行正式的描述,而Bleloch和Reid-Miller在复杂分析中使用了线性未来。这一方法的一致性意味着我们可以同样地与许多其他的“conforminic ” 进行线性化工作。