基于范畴论的消息传递语言(CaMPL)用于程序员
Categorical Message Passing Language (CaMPL) for programmers
AI总结:
CaMPL是一种基于范畴论的并发编程语言,通过类型通信通道实现消息传递,支持受控非确定性、高阶过程和自定义通道类型,确保程序不会死锁或活锁。
摘要:
Categorical Message Passing Language (CaMPL) 是一种函数式风格的并发编程语言,其语义基于范畴论,特别是线性范畴。其核心编程特性是通过类型通信通道在并发过程中进行消息传递。CaMPL还支持通过‘races’实现受控非确定性,允许进程在运行时动态适应,支持高阶过程(将其他进程作为消息传递),以及自定义通道类型称为协议和共协议,允许定义无限通道类型或实现会话类型。CaMPL的类型系统源自一种类似Curry-Howard-Lambek的对应关系,由Cockett和Pastro在其论文《消息传递的逻辑》中建立。该类型系统确保了一个正式的CaMPL程序(即不允许一般递归的程序)永远不会死锁或活锁。本文在简要介绍其数学基础后,通过代码示例探讨了CaMPL的类型系统、自定义通道类型和受控非确定性。
英文摘要:
Categorical Message Passing Language (CaMPL) is a functional-style concurrent programming language whose semantics is in category theory, more specifically, linear actegories. Its core programming feature is message passing along typed communication channels between concurrent processes. CaMPL also supports controlled non-determinism via 'races' which allow processes to adapt dynamically while they are running, higher-order processes which pass other processes as messages, and custom channel datatypes called protocols and coprotocols which allow one to define infinite channel types or implement session types. The type system of CaMPL arises from a Curry-Howard-Lambek-like correspondence for concurrent programming, established by Cockett and Pastro in their paper titled "The logic of message passing". This type system ensures that a formal CaMPL program, i.e., one which does not allow general recursion, will never become deadlocked or livelocked. In this article, we explore the type system of CaMPL, custom channel types, and controlled non-determinism using code examples after briefly introducing its mathematical underpinnings.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。