Flow Java: Declarative Concurrency for Java

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%.

[1]  Tom Conlon,et al.  Programming in PARLOG (International Series in Logic Programming) , 1989 .

[2]  K. Mani Chandy,et al.  CC++: A Declarative Concurrent Object Oriented Programming Notation , 1993 .

[3]  Per Brand,et al.  A Generic Middleware for Intra-Language Transparent Distribution , 2003 .

[4]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[5]  Gert Smolka The Oz Programming Model , 1996 .

[6]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[7]  Seif Haridi,et al.  The Design and Evaluation of a Middleware Library for Distribution of Language Entities , 2003, ASIAN.

[8]  Gert Smolka,et al.  Futures and By-need Synchronization for Oz , 1998 .

[9]  Narain H. Gehani,et al.  The concurrent C programming language , 1989 .

[10]  James Gosling,et al.  The Java Programming Language" The Java Series , 1996 .

[11]  John Thornley Declarative Ada: parallel dataflow programming in a familiar context , 1995, CSC '95.

[12]  Doug Lea Concurrent Programming in Java. Second Edition: Design Principles and Patterns , 1999 .

[13]  Radha Jagadeesan,et al.  jcc: Integrating Timed Default Concurrent Constraint Programming into Java , 2003, EPIA.

[14]  Keshav Pingali,et al.  I-structures: Data structures for parallel computing , 1986, Graph Reduction.

[15]  Luca Cardelli,et al.  Modern concurrency abstractions for C# , 2002, TOPL.

[16]  Christian Schulte,et al.  Implementation strategies for single assignment variables , 2004 .

[17]  John Thornley Integrating parallel dataflow programming with the Ada tasking model , 1994, TRI-Ada '94.

[18]  Boris Magnusson,et al.  ECOOP 2002 — Object-Oriented Programming , 2002, Lecture Notes in Computer Science.

[19]  Vijay A. Saraswat,et al.  Concurrent constraint programming , 1989, POPL '90.

[20]  Andrew Taylor,et al.  High Performance Prolog Implementation , 1991 .

[21]  Gul Agha,et al.  Research directions in concurrent object-oriented programming , 1993 .

[22]  Ehud Shapiro,et al.  The family of concurrent logic programming languages , 1989, CSUR.

[23]  Michael Mehl,et al.  The Oz virtual machine: records, transients and deep guards , 1999 .

[24]  Evan Tick,et al.  Parallel logic programming , 1991, Logic programming.

[25]  Jan van Leeuwen,et al.  Computer Science Today , 1995, Lecture Notes in Computer Science.

[26]  Doug Lea,et al.  Concurrent Programming In Java , 1996 .

[27]  Andrew Taylor,et al.  Parma - Bridging the Performance GAP Between Imperative and Logic Programming , 1996, J. Log. Program..

[28]  Doug Lea,et al.  Concurrent programming in Java - design principles and patterns , 1996, Java series.

[29]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[30]  Steve Gregory,et al.  Parallel logic programming in parlo9 , 1987 .

[31]  C. Jinshong Hwang,et al.  Proceedings of the 1995 ACM 23rd Annual Conference on Computer Science, CSC '95, Nashville, TN, USA, February 28 - March 2, 1995 , 1995, ACM Conference on Computer Science.

[32]  Peter Van Roy,et al.  Concepts, Techniques, and Models of Computer Programming , 2004 .

[33]  G. H. Hilderink,et al.  A distributed real-time Java system based on CSP , 1999, Proceedings Third IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (ISORC 2000) (Cat. No. PR00607).

[34]  James F. Power,et al.  Platform independent dynamic Java virtual machine analysis: the Java Grande Forum benchmark suite , 2001, JGI '01.

[35]  Mats Carlsson,et al.  Variable Shunting for the WAM , 1991 .

[36]  Peter Van Roy,et al.  Efficient logic variables for distributed computing , 1999, TOPL.

[37]  Hassan Aït-Kaci,et al.  Warren's Abstract Machine: A Tutorial Reconstruction , 1991 .