A session type provider: compile-time API generation of distributed protocols with refinements in F#

R. Neykova, Raymond Hu, N. Yoshida, Fahd Abdeljallal
{"title":"A session type provider: compile-time API generation of distributed protocols with refinements in F#","authors":"R. Neykova, Raymond Hu, N. Yoshida, Fahd Abdeljallal","doi":"10.1145/3178372.3179495","DOIUrl":null,"url":null,"abstract":"We present a library for the specification and implementation of distributed protocols in native F# (and other .NET languages) based on multiparty session types (MPST). There are two main contributions. Our library is the first practical development of MPST to support what we refer to as interaction refinements: a collection of features related to the refinement of protocols, such as message-type refinements (value constraints) and message value dependent control flow. A well-typed endpoint program using our library is guaranteed to perform only compliant session I/O actions w.r.t. to the refined protocol, up to premature termination. Second, our library is developed as a session type provider, that performs on-demand compile-time protocol validation and generation of protocol-specific .NET types for users writing the distributed endpoint programs. It is implemented by extending and integrating Scribble (a toolchain for MPST) with an SMT solver into the type providers framework. The safety guarantees are achieved by a combination of static type checking of the generated types for messages and I/O operations, correctness by construction from code generation, and automated inlining of assertions.","PeriodicalId":117615,"journal":{"name":"Proceedings of the 27th International Conference on Compiler Construction","volume":"89 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-02-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"46","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 27th International Conference on Compiler Construction","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3178372.3179495","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 46

Abstract

We present a library for the specification and implementation of distributed protocols in native F# (and other .NET languages) based on multiparty session types (MPST). There are two main contributions. Our library is the first practical development of MPST to support what we refer to as interaction refinements: a collection of features related to the refinement of protocols, such as message-type refinements (value constraints) and message value dependent control flow. A well-typed endpoint program using our library is guaranteed to perform only compliant session I/O actions w.r.t. to the refined protocol, up to premature termination. Second, our library is developed as a session type provider, that performs on-demand compile-time protocol validation and generation of protocol-specific .NET types for users writing the distributed endpoint programs. It is implemented by extending and integrating Scribble (a toolchain for MPST) with an SMT solver into the type providers framework. The safety guarantees are achieved by a combination of static type checking of the generated types for messages and I/O operations, correctness by construction from code generation, and automated inlining of assertions.
会话类型提供者:在f#中进行改进的分布式协议的编译时API生成
我们提出了一个基于多方会话类型(MPST)的库,用于在原生f#(和其他。net语言)中规范和实现分布式协议。有两个主要贡献。我们的库是MPST的第一个实际开发,它支持我们所说的交互细化:与协议细化相关的特性集合,例如消息类型细化(值约束)和消息值相关的控制流。使用我们的库的类型良好的端点程序可以保证只执行与改进的协议完全一致的会话I/O操作,直至过早终止。其次,我们的库是作为会话类型提供者开发的,它执行按需编译时协议验证,并为编写分布式端点程序的用户生成特定于协议的。net类型。它是通过扩展Scribble(用于MPST的工具链)并将SMT求解器集成到类型提供程序框架中来实现的。安全保证是通过对为消息和I/O操作生成的类型进行静态类型检查、通过代码生成构造的正确性以及断言的自动内联来实现的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信