[erlang-questions] Uniqueness Typing for Resource Management in Message-Passing Concurrency

Fred Hebert mononcqc@REDACTED
Thu Jul 3 14:47:39 CEST 2014

On 07/03, Ivan Uemlianin wrote:
> Dear All
> Saw this and thought of you.
> Uniqueness Typing for Resource Management in Message-Passing Concurrency
> http://arxiv.org/abs/1003.5513
> (submitted 2010)
> Mentions erlang in passing.  Here is the abstract:
> We view channels as the main form of resources in a message-passing
> programming paradigm. These channels need to be carefully managed in
> settings where resources are scarce. To study this problem, we extend the
> pi-calculus with primitives for channel allocation and deallocation and
> allow channels to be reused to communicate values of different types.
> Inevitably, the added expressiveness increases the possibilities for runtime
> errors. We define a substructural type system which combines uniqueness
> typing and affine typing to reject these ill-behaved programs.

This sounds like it would be nicer for a language with actual channels.
There are a few differences with Pi-Calculus and Erlang:

- Pi-Calculus assumes synchronous message delivery, Erlang doesn't
- Pi-Calculus assumes the usage of channels that are nameable and
  passable as if they were variables, Erlang has a per-process mailbox
  (you can pass pids as if they were channels and treat specific
  processes as channels, I guess)
- Channels can be created at any time by anyone
- More.

Interestingly enough, there were still attempts to model a subset Erlang
as pi-calculus for verification purposes (they did need to make an async
pi-calc I believe):


More information about the erlang-questions mailing list