Type-preserving translations are effective rigorous tools in the study of core programming calculi. In this paper, we develop a new typed translation that connects sequential and concurrent calculi; it is governed by expressive type systems that control resource consumption. Our main contribution is the source language, a new resource \lambda-calculus with non-determinism and failures, dubbed \ulamf. In \ulamf, resources are sharply separated into linear and unrestricted; failures are explicit and arise following this separation. We equip \ulamf with a type system based on non-idempotent intersection types, which controls resources and fail-prone computation. The target language is an existing session-typed \pi-calculus, \spi, which results from a Curry-Howard correspondence between linear logic and session types for concurrency. Our typed translation of \ulamf into \spi subsumes our prior work; interestingly, it elegantly treats unrestricted resources in \lamrfailunres as client-server session behaviors in \spi.
翻译:类型保存翻译是研究核心编程计算法的有效严格工具。 在本文中, 我们开发了一种新的打印翻译, 将相继和同时的计算法连接起来; 由控制资源消耗的表达型系统管理。 我们的主要贡献是源语言, 一种非确定性和失败的新资源\ lambda- 计算法, 称为 ulamf 。 在 ulamf 中, 资源被急剧地分离成线性和非线性; 失败是明显的, 在这次分离后会发生。 我们用非主力交叉型态来装备 ulamf 。 我们用非主力交叉型态系统来控制资源和易失灵计算。 目标语言是现有的会话型 \ pi- callulus,\ spi, 其结果是线性逻辑类型和会话类型之间的快速- Howard通信。 我们的将 ulamf 转换成\ spi 子摘要; 有趣的是, 它优雅地将\ lamrfailunres 中不受限制的资源作为客户- 服务器会话。