一句话:提出 Linear SAM:面向对应 CLL 的会话类型程序的确定性顺序抽象机,并证明其与 CLL 证明归约相互对应。
会话类型程序天然对应线性逻辑 CLL 的并发证明,但缺乏确定性的机械执行模型。本文提出 Linear SAM:通过对证明转换与聚焦(focalisation)的细粒度分析,从并发的证明归约语义中导出一个完全确定性的顺序求值策略,并借助协程化与带缓冲的会话通信加以实现。所支持的语言在 CLL 上加入二阶量词(多态)与归纳/余归纳类型(递归与余递归),可表达高阶多态的函数式/会话式计算。作者引入带缓冲 cut 的中间逻辑语言 CLLB 桥接逻辑层与机器层,并证明适配性:SAM 执行总对应 CLL 证明归约,且任何 CLL 证明归约都被 SAM 模拟。原型实现显示出原生线性执行带并发的高阶会话函数式语言的可能性。
We introduce the Linear SAM, an abstract machine for mechanically executing session-typed programs that precisely correspond to Linear Logic CLL via the propositions-as-types correspondence. In this basic computation model, programs are naturally interpreted as concurrent systems. However, inspired by a fine-grained analysis of proof conversion and focalisation, we derive in this work a fully deterministic sequential evaluation strategy, which may be implemented via co-routining and session buffered communication. Our development targets a language extending CLL with second-order quantifiers (polymorphism) and inductive types (recursion and co-recursion), which supports general higher-order polymorphic functional/session-based computation. A remarkable feature of the SAM's design is its ability to seamlessly coordinate sequential session behaviour with concurrent session behaviour within the same program. We provide an intuitive discussion of the SAM structure and its underlying design, and state and prove its adequacy, showing that SAM executions always correspond to CLL proof reductions, and that any CLL proof reduction is simulated by the SAM execution. To that end, we technically factor our development via an intermediate logical language CLLB, which extends CLL with a ’buffered’ cut construct, and bridges between the logical/algebraic level and the lower-level machine architecture. We also discuss a proof-of-concept implementation of the SAM that suggests its potential to support the native linear execution of general session-functional linear programming languages with concurrency.