Resource-Aware Session Types for Digital Contracts

02/16/2019
by   Ankush Das, et al.
0

Programming digital contracts comes with unique challenges, which include describing and enforcing protocols of interaction, controlling resource usage, and tracking linear assets. This article presents the type-theoretic foundation of Nomos, a programming language for digital contracts whose strong static guarantees match the domain-specific requirements and facilitate contract development. To describe and enforce protocols, Nomos is based on shared binary session types rooted in linear logic. To control resource usage, Nomos uses resource-aware session types and automatic amortized resource analysis, a type based technique for inferring resource bounds. To track linear assets, Nomos employs a linear type system that prevents assets from being duplicated or discarded. The technical contribution is the design and soundness proof of Nomos' type system, which integrates shared session types and resource-aware session types with a functional type system that supports automatic amortized resource analysis. To demonstrate the practicability of Nomos' session-type--based design, we implemented three digital contracts in an existing prototype language. Experiments indicate that the performance of the contracts is adequate for scaling to thousands of users and interactions.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/22/2017

Work Analysis with Resource-Aware Session Types

While there exist several successful techniques for supporting programme...
research
11/18/2020

Probabilistic Resource-Aware Session Types

Session types guarantee that message-passing processes adhere to predefi...
research
09/28/2020

Ferrite: A Judgmental Embedding of Session Types in Rust

This article introduces Ferrite, a shallow embedding of session types in...
research
04/02/2019

FreeST: Context-free Session Types in a Functional Language

FreeST is an experimental concurrent programming language. Based on a co...
research
03/24/2022

Replicate, Reuse, Repeat: Capturing Non-Linear Communication via Session Types and Graded Modal Types

Session types provide guarantees about concurrent behaviour and can be u...
research
12/24/2020

Rast: A Language for Resource-Aware Session Types

Traditional session types prescribe bidirectional communication protocol...
research
11/30/2017

Session Types for Orchestrated Interactions

In the setting of the pi-calculus with binary sessions, we aim at relaxi...

Please sign up or login with your details

Forgot password? Click here to reset