Session types provide a flexible programming style for structuring interaction, and are used to guarantee a safe and consistent composition of distributed processes. Traditional session types include only one-directional input (external) and output (internal) guarded choices. This prevents the session-processes to explore the full expressive power of the pi-calculus where the mixed choices are proved more expressive than the (non-mixed) guarded choices. To account this issue, recently Casal, Mordido, and Vasconcelos proposed the binary session types with mixed choices (CMV+). This paper carries a surprising, unfortunate result on CMV+: in spite of an inclusion of unrestricted channels with mixed choice, CMV+'s mixed choice is rather separate and not mixed. We prove this negative result using two methodologies (using either the leader election problem or a synchronisation pattern as distinguishing feature), showing that there exists no good encoding from the pi-calculus into CMV+, preserving distribution. We then close their open problem on the encoding from CMV+ into CMV (without mixed choice), proving its soundness and thereby that the encoding is good up to coupled similarity.
翻译:会话类型为构建互动提供了灵活的编程风格,并用来保证分布式进程的安全、一致的构成。传统会话类型只包括单向输入(外部)和输出(内部)的保密选择。这阻碍了会话进程探索混杂选择比(非混合)稳妥的选择更能表达的双向计算器的充分表达力。为了说明这一问题,最近Casal、Mordiddo和Vasconcelos提出了双向会议类型,并提出了混合选择(CMV+)。本文带有关于监听+的令人惊讶和不幸的结果:尽管有不受限制的渠道,且有混合选择,但CMV+的混合选择是相当分开的,而不是混合的。我们用两种方法证明这一负面结果(使用领导人选举问题或同步模式作为区别特征),表明没有从pi-calulus到CMV+的良好编码,从而保持分布。我们随后结束了关于从监听监听+编码的公开问题(无混合选择),证明了其稳妥性,因此编码是良好的。