arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1904.01288cs.PL
收藏

依赖类型语言中依赖值的会话设计

Value-Dependent Session Design in a Dependently Typed Language

Jan de Muijnck-Hughes, Edwin Brady, Wim Vanderbauwhede

摘要:

会话类型提供了一种类型规则,允许在类型检查期间使用协议规范,确保实现遵循给定的规范。在依赖类型语言中实现全局会话类型时,必须注意描述中引入的值由知道该值的角色使用。我们目前的会话,一个资源依赖的EDSL用于描述全球会话描述的依赖类型的语言Idris。当我们构造会话描述时,参数化EDSL类型的值会跟踪它们遇到的角色和消息。我们可以使用这些知识来确保消息值仅由知道该值的人使用。会话支持可计算、可组合、高阶和值相关的协议描述。我们展示了会话的表现力,通过描述的TCP握手,多模态服务器提供回声和基本的算术运算,和一个高阶协议,支持身份验证交互步骤。

英文摘要:

Session Types offer a typing discipline that allows protocol specifications to be used during type-checking, ensuring that implementations adhere to a given specification. When looking to realise global session types in a dependently typed language care must be taken that values introduced in the description are used by roles that know about the value. We present Sessions, a Resource Dependent EDSL for describing global session descriptions in the dependently typed language Idris. As we construct session descriptions the values parameterising the EDSLs' type keeps track of roles and messages they have encountered. We can use this knowledge to ensure that message values are only used by those who know the value. Sessions supports protocol descriptions that are computable, composable, higher-order, and value-dependent. We demonstrate Sessions expressiveness by describing the TCP Handshake, a multi-modal server providing echo and basic arithmetic operations, and a Higher-Order protocol that supports an authentication interaction step.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑