A concurrent lambda calculus with futures

  • Authors:
  • J. Niehren;J. Schwinghammer;G. Smolka

  • Affiliations:
  • Mostrare Project, INRIA Futurs, Lille, France;Programming Systems Lab, Saarland University, Saarbrücken, Germany;Programming Systems Lab, Saarland University, Saarbrücken, Germany

  • Venue:
  • Theoretical Computer Science - Applied semantics
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

We introduce a new lambda calculus with futures, λ(fut), that models the operational semantics of concurrent statically typed functional programming languages with mixed eager and lazy threads such as Alice ML, a concurrent extension of Standard ML. λ(fut) is a minimalist extension of the call-by-value λ-calculus that is sufficiently expressive to define and combine a variety of standard concurrency abstractions, such as channels, semaphores, and ports. Despite its minimality, the basic machinery of λ(fut) is sufficiently powerful to support explicit recursion and call-by-need evaluation.We present a static type system for λ(fut) and distinguish a fragment of λ(fut) that we prove to be uniformly confluent. This result confirms our intuition that reference cells are the sole source of indeterminism. This fragment assumes the absence of so called handle errors that violate the single assignment assumption of λ(fut)'s handled future-construct.Finally, we present a linear type system for λ(fut) by which to prove the absence of handle errors. Our system is rich enough to type definitions of the above mentioned concurrency abstractions. Consequently, these cannot be corrupted in any (not necessarily linearly) well-typed context.