On the connection between functional programming languages and real-time Java scoped memory

Java has recently joined C and C++ as a relatively high-level language suitable for developing real-time applications. Java's garbage collection, while generally a useful feature, can be problematic for real-time applications if collection occurs with unpredictable frequency and latency. The Real-Time Specification for Java#8482; (RTSJ) incorporates a scoped-memory model, akin to regions, that is not subject to garbage collection. However, applications are subject to strict rules concerning how objects can reference each other in scoped memory. Unfortunately, almost all extant Java code, including Java's vast and useful runtime libraries, will not execute properly in scoped-memory areas without significant modification. In this paper, we show that programs written in a pure functional programming language can be executed in a provably safe manner using scoped memory in RTSJ. This new connection allows extant implementations of important abstract data types to migrate safely to RTSJ. We also explore the effect of RTSJ's referencing rules on the asymptotic, real-time behavior of some abstract data types.

[1]  Lars Birkedal,et al.  A region inference algorithm , 1998, TOPL.

[2]  Chris Okasaki,et al.  Functional Data Structures , 1996, Handbook of Data Structures and Applications.

[3]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[4]  Jan Vitek,et al.  Real-time Java scoped memory: design patterns and semantics , 2004, Seventh IEEE International Symposium onObject-Oriented Real-Time Distributed Computing, 2004. Proceedings..

[5]  John W. Backus,et al.  Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs , 1978, CACM.

[6]  Chris Okasaki,et al.  Purely functional data structures , 1998 .

[7]  Mark Allen Weiss,et al.  Data structures and algorithm analysis , 1991 .

[8]  V. T. Rajan,et al.  The Metronome: A Simpler Approach to Garbage Collection in Real-Time Systems , 2003, OTM Workshops.

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

[10]  Ron Cytron,et al.  Automated discovery of scoped memory regions for real-time Java , 2002, MSP/ISMM.

[11]  Ron Cytron,et al.  Contaminated garbage collection , 2000, PLDI '00.

[12]  Kelvin Nilsen A type system to assure scope safety within safety-critical Java modules , 2006, JTRES '06.

[13]  Mark Allen Weiss,et al.  Data structures and algorithm analysis in C , 1991 .

[14]  David F. Bacon,et al.  Controlling fragmentation and space consumption in the metronome, a real-time garbage collector for Java , 2003 .

[15]  Martin C. Rinard,et al.  Ownership types for safe region-based memory management in real-time Java , 2003, PLDI '03.

[16]  Sigmund Cherem,et al.  Region analysis and transformation for Java programs , 2004, ISMM '04.

[17]  Ron K. Cytron,et al.  Static determination of allocation rates to support real-time garbage collection , 2005, LCTES '05.

[18]  James Gosling,et al.  The Real-Time Specification for Java , 2000, Computer.