# Value-Dependent Session Design in a Dependently Typed Language

**Authors:** Jan de Muijnck-Hughes (University of Glasgow), Edwin Brady (University, of St Andrews), Wim Vanderbauwhede (University of Glasgow)

arXiv: 1904.01288 · 2019-04-03

## TL;DR

This paper introduces Sessions, a dependently typed language embedded domain-specific language (EDSL) in Idris, for designing value-dependent session types that ensure protocol correctness and value usage safety.

## Contribution

It presents a novel resource-dependent EDSL for dependently typed languages that enforces value-aware protocol adherence in session descriptions.

## Key findings

- Successfully describes TCP Handshake protocol.
- Supports multi-modal server interactions.
- Enables higher-order, value-dependent protocol descriptions.

## Abstract

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.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1904.01288/full.md

## Figures

22 figures with captions in the complete paper: https://tomesphere.com/paper/1904.01288/full.md

## References

40 references — full list in the complete paper: https://tomesphere.com/paper/1904.01288/full.md

---
Source: https://tomesphere.com/paper/1904.01288