Behavioral interface description of an object-oriented language with futures and promises

https://doi.org/10.1016/j.jlap.2009.01.001Get rights and content
Under an Elsevier user license
open archive

Abstract

This paper formalizes the observable interface behavior of a concurrent, object-oriented language with futures and promises. The calculus captures the core of Creol, a language, featuring in particular asynchronous method calls and, since recently, first-class futures.

The focus of the paper are open systems and we formally characterize their behavior in terms of interactions at the interface between the program and its environment. The behavior is given by transitions between typing judgments, where the absent environment is represented abstractly by an assumption context. A particular challenge is the safe treatment of promises: The erroneous situation that a promise is fulfilled twice, i.e., bound to code twice, is prevented by a resource aware type system, enforcing linear use of the write-permission to a promise. We show subject reduction and the soundness of the abstract interface description.

Keywords

Concurrent object-oriented languages
Creol
Formal semantics
Concurrency
Futures and promises
Open systems
Observable behavior

Cited by (0)

Part of this work has supported by the NWO/DFG Project Mobi-J (RO 1122/9-4) and by the EU-project IST-33826 Credo: Modeling and analysis of evolutionary structures for distributed services. For more information, see http://credo.cwi.nl.