Session Types Without Sophistry: System Description

Oleg Kiselyov, Keigo Imai

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Whereas ordinary types approximate the results, session types approximate communication among computations. As a form of typestate, they describe not only what is communicated now but also what is to be communicated next. Writing session-typed programs in an ordinary programming language such an OCaml requires inordinary cleverness to simulate type-level computations and linear typing – meaning the implementation and the error messages are very hard to understand. One is constantly reminded of template metaprogramming in C++. We present a system exploring a very different approach to session typing: lowering type-level sophistry to ordinary programming, while maintaining the static assurances. Error messages are detailed and customizable, and one can use an ordinary debugger to investigate session-type problems. Our system is a binary-session–typed DSL for service-oriented programming in OCaml, supporting multiple communication channels, internal and external choices, recursion, and also channel delegation. The key idea is staging: ordinary run-time checks in the generator play the role of “type-checks” from the point of view of the generated program. What is a fancy type to the latter is ordinary data to the generator.

Original languageEnglish
Title of host publicationFunctional and Logic Programming - 15th International Symposium, FLOPS 2020, Proceedings
EditorsKeisuke Nakano, Konstantinos Sagonas
PublisherSpringer Science and Business Media Deutschland GmbH
Pages66-87
Number of pages22
ISBN (Print)9783030590246
DOIs
Publication statusPublished - 2020
Event15th International Symposium on Functional and Logic Programming, FLOPS 2020 - Akita, Japan
Duration: 2020 Sep 142020 Sep 16

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume12073 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference15th International Symposium on Functional and Logic Programming, FLOPS 2020
CountryJapan
CityAkita
Period20/9/1420/9/16

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)

Fingerprint Dive into the research topics of 'Session Types Without Sophistry: System Description'. Together they form a unique fingerprint.

Cite this