当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Model-View-Update-Communicate: Session Types meet the Elm Architecture
arXiv - CS - Programming Languages Pub Date : 2019-10-24 , DOI: arxiv-1910.11108
Simon Fowler

Session types are a type discipline for communication channel endpoints which allow conformance to protocols to be checked statically. Safely implementing session types requires linearity, usually in the form of a linear type system. Unfortunately, linear typing is difficult to integrate with graphical user interfaces (GUIs), and to date most programs using session types are command line applications. In this paper, we propose the first principled integration of session typing and GUI development by building upon the Model-View-Update (MVU) architecture, pioneered by the Elm programming language. We introduce $\lambda_{\textsf{MVU}}$, the first formal model of the MVU architecture, and prove it sound. By extending $\lambda_{\textsf{MVU}}$ with \emph{commands} as found in Elm, along with \emph{linearity} and \emph{model transitions}, we show the first formal integration of session typing and GUI programming. We implement our approach in the Links web programming language, and show examples including a two-factor authentication workflow and multi-room chat server.

中文翻译:

Model-View-Update-Communicate:会话类型符合 Elm 架构

会话类型是通信通道端点的类型规范,允许静态检查协议的一致性。安全地实现会话类型需要线性,通常采用线性类型系统的形式。不幸的是,线性类型很难与图形用户界面 (GUI) 集成,并且迄今为止使用会话类型的大多数程序都是命令行应用程序。在本文中,我们通过构建模型-视图-更新 (MVU) 架构(由 Elm 编程语言首创),提出了会话输入和 GUI 开发的第一个原则性集成。我们介绍 $\lambda_{\textsf{MVU}}$,MVU 架构的第一个正式模型,并证明它是合理的。通过使用 Elm 中发现的 \emph{commands} 扩展 $\lambda_{\textsf{MVU}}$,以及 \emph{linearity} 和 \emph{model transitions},我们展示了会话输入和 GUI 编程的第一个正式集成。我们在 Links Web 编程语言中实现了我们的方法,并展示了包括两因素身份验证工作流程和多房间聊天服务器在内的示例。
更新日期:2020-06-01
down
wechat
bug