Concurrent distributed systems are notoriously difficult to construct and reason about. Choreographic programming is a recent paradigm that describes a distributed system in a single global program called a choreography. Choreographies simplify reasoning about distributed systems and can ensure deadlock freedom by static analysis. In previous choreographic programming languages, each value is located at a single party, and the programmer is expected to insert special untyped "select" operations to ensure that all parties follow the same communication pattern. We present He-Lambda-Small, a new choreographic programming language with Multiply Located Values. He-Lambda-Small allows multicasting to a set of parties, and the resulting value will be located at all of them. This approach enables a simple and elegant alternative to "select": He-Lambda-Small requires that the guard for a conditional be located at all of the relevant parties. In He-Lambda-Small, checking that a choreography is well-typed suffices to show that it is deadlock-free. We present several case studies that demonstrate the use of multiply-located values to concisely encode tricky communication patterns described in previous work without the use of "select" or redundant communication.
翻译:并发分布式系统因构建和推理困难而闻名。编舞编程是一种新兴范式,它通过称为编舞的单一全局程序描述分布式系统。编舞简化了分布式系统的推理,并能通过静态分析确保无死锁性。在以往的编舞编程语言中,每个值仅位于单一参与者处,且程序员需插入特殊无类型“选择”操作以确保所有参与者遵循相同的通信模式。我们提出He-Lambda-Small,一种具有多位置值的新编舞编程语言。He-Lambda-Small允许向一组参与者进行多播,且结果值将位于所有这些参与者处。该方法为“选择”操作提供了简洁优雅的替代方案:He-Lambda-Small要求条件语句的守卫位于所有相关参与者处。在He-Lambda-Small中,验证编舞的类型良好性足以证明其无死锁性。我们通过多个案例研究展示了多位置值如何简洁地编码先前工作中描述的复杂通信模式,而无需使用“选择”操作或冗余通信。