...
首页> 外文期刊>Science of Computer Programming >Session-ocaml: A session-based library with polarities and lenses
【24h】

Session-ocaml: A session-based library with polarities and lenses

机译:Session-ocaml:基于会话的极性和镜头库

获取原文
获取原文并翻译 | 示例
           

摘要

We propose session-ocaml, a novel library for session-typed concurrent/distributed programming in OCaml. Our technique solely relies on parametric polymorphism, which can encode core session type structures with strong static guarantees. Our key ideas are: (1) polarised session types, which give an alternative formulation of duality enabling OCaml to automatically infer an appropriate session type in a session with a reasonable notational overhead; and (2) a parameterised monad with a data structure called 'slots' manipulated with lenses, which can statically enforce session linearity including delegations. We introduce a notational extension to enhance the session linearity for integrating the session types into the functional programming style. We show applications of session-ocaml to a travel agency use case and an SMTP protocol implementation. Furthermore, we evaluate the performance of session-ocaml on a number of benchmarks. (C) 2018 The Authors. Published by Elsevier B.V.
机译:我们提出了session-ocaml,这是一种用于OCaml中会话类型的并发/分布式编程的新颖库。我们的技术仅依赖于参数多态性,它可以对具有强大静态保证的核心会话类型结构进行编码。我们的主要思想是:(1)极化会话类型,它给出了对偶性的另一种表示方式,使OCaml能够以合理的记法开销自动推断会话中的适当会话类型; (2)参数化的monad,其数据结构由称为“ slots”的透镜控制,可以静态地增强会话线性,包括委派。我们引入了一种符号扩展,以增强会话线性度,以将会话类型集成到功能编程样式中。我们展示了session-ocaml在旅行社用例和SMTP协议实现中的应用。此外,我们在许多基准上评估session-ocaml的性能。 (C)2018作者。由Elsevier B.V.发布

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号