Flow Java: Declarative Concurrency for Java

Frej Drejhammar, Christian Schulte, Seif Haridi, Per Brand.

[pdf | bibtex]

Logic variables pioneered by (concurrent) logic and concurrent constraint programming are powerful mechanisms for automatically synchronizing concurrent computations. They support a declarative model of concurrency that avoids explicitly suspending and resuming computations. This paper presents Flow Java which conservatively extends Java with single assignment variables and futures as variants of logic variables. The extension is conservative with respect to object-orientation, types, parameter passing, and concurrency in Java. Futures support secure concurrent abstractions and are essential for seamless integration of single assignment variables into Java. We show how Flow Java supports the construction of simple and concise concurrent programming abstractions. We present how to moderately extend compilation and the runtime architecture of an existing Java implementation for Flow Java. Evaluation using standard Java benchmarks shows that in most cases the overhead is between 10% and 40%. For some pathological cases the runtime increases by up to 75%.

In: Catuscia Palamidessi, editor, Proceedings of the Nineteenth International Conference on Logic Programming, Mumbai, India, volume 2916 of Lecture Notes in Computer Science, pages 346-360. Springer-Verlag, December, 2003.

Received the best application paper award.

Copyright Springer-Verlag, the original publication is available at www.springerlink.com