HasChor: Functional Choreographic Programming for All (Functional Pearl)

03/02/2023
by   Gan Shen, et al.
0

Choreographic programming is an emerging paradigm for programming distributed systems. In choreographic programming, the programmer describes the behavior of the entire system as a single, unified program – a choreography – which is then compiled to individual programs that run on each node, via a compilation step called endpoint projection. We present a new model for functional choreographic programming where choreographies are expressed as computations in a monad. Our model supports cutting-edge choreographic programming features that enable modularity and code reuse: in particular, it supports higher-order choreographies, in which a choreography may be passed as an argument to another choreography, and location-polymorphic choreographies, in which a choreography can abstract over nodes. Our model is implemented in a Haskell library, HasChor, which lets programmers write choreographic programs while using the rich Haskell ecosystem at no cost, bringing choreographic programming within reach of everyday Haskellers. Moreover, thanks to Haskell's abstractions, the implementation of the HasChor library itself is concise and understandable, boiling down endpoint projection to its short and simple essence.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/05/2021

Pirouette: Higher-Order Typed Functional Choreographies

We present Pirouette, a language for typed higher-order functional chore...
research
03/08/2023

Alice or Bob?: Process Polymorphism in Choreographies

We present PolyChorλ, a language for higher-order functional choreograph...
research
07/16/2018

In Praise of Impredicativity: A Contribution to the Formalisation of Meta-Programming

Processing programs as data is one of the successes of functional and lo...
research
05/16/2019

Effects Without Monads: Non-determinism – Back to the Meta Language

We reflect on programming with complicated effects, recalling an undeser...
research
05/22/2017

Imperative Functional Programs that Explain their Work

Program slicing provides explanations that illustrate how program output...
research
05/24/2022

ACL2s Systems Programming

ACL2 provides a systems programming capability that allows one to write ...
research
06/05/2020

Genome as a functional program

We discuss a model of genome as a program with functional architecture a...

Please sign up or login with your details

Forgot password? Click here to reset