Scoped types for real-time Java

A memory model based on scoped areas is one of the distinctive features of the Real-Time Specification for Java (RTSJ). Scoped types ensure timely reclamation of memory and predictable performance. The price to pay for these benefits is an unfamiliar programming model that, at the same time, is complex, requires checking all memory accesses, and rewards design-time errors with run-time crashes. We investigate an alternative approach, referred to as scoped types, that simplifies the task of managing memory in real-time codes. The key feature of our proposal is that the run-time partition of memory imposed by scoped areas is straightforwardly mirrored in the program text. Thus cursory inspection of a program reveals which objects inhabit the different scopes, significantly simplifying the task of understanding real-time Java programs. Moreover, we introduce a type system which ensures that no run-time errors due to memory access checks occur. Thus a RTSJ-compliant virtual machine does not require memory access checks. The contributions of this paper are the concept of scoped types, and a proof soundness of the type system. Experimental results are described in future work.

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

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

[3]  Keith H. Randall,et al.  Cilk: efficient multithreaded computing , 1998 .

[4]  Craig Chambers,et al.  Alias annotations for program understanding , 2002, OOPSLA '02.

[5]  Mads Tofte,et al.  Region-based Memory Management , 1997, Inf. Comput..

[6]  Fridtjof Siebert,et al.  Hard real-time garbage collection in the Jamaica virtual machine , 1999, Proceedings Sixth International Conference on Real-Time Computing Systems and Applications. RTCSA'99 (Cat. No.PR00306).

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

[8]  David Gerard Clarke,et al.  Object ownership and containment , 2003 .

[9]  Andy J. Wellings,et al.  Ravenscar‐Java: a high‐integrity profile for real‐time Java , 2005, Concurr. Pract. Exp..

[10]  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..

[11]  John Ruskin,et al.  The golden gate , 1881 .

[12]  Frans Arickx,et al.  A profiler and compiler for the Wonka Virtual Machine , 2002 .

[13]  Jens Palsberg,et al.  Encapsulating objects with confined types , 2001, OOPSLA 2001.

[14]  Jens Palsberg,et al.  Lightweight confinement for featherweight java , 2003, OOPSLA 2003.

[15]  Douglas C. Schmidt,et al.  Enhancing real-time CORBA via real-time Java features , 2004, 24th International Conference on Distributed Computing Systems, 2004. Proceedings..

[16]  James Cheney,et al.  Region-based memory management in cyclone , 2002, PLDI '02.

[17]  Liuba Shrira,et al.  Ownership types for object encapsulation , 2003, POPL '03.

[18]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 1999, OOPSLA '99.

[19]  Ron K. Cytron,et al.  Efficient memory-reference checks for real-time java , 2003 .

[20]  Kelvin D. Nilsen,et al.  Adding real-time capabilities to Java , 1998, CACM.

[21]  Martin C. Rinard,et al.  An Implementation of Scoped Memory for Real-Time Java , 2001, EMSOFT.

[22]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[23]  James Noble,et al.  Towards a Model of Encapsulation , 2003 .

[24]  Dan Grossman,et al.  Type-safe multithreading in cyclone , 2003, TLDI '03.

[25]  David C. Sharp,et al.  Real-time distributed object computing: ready for mission-critical embedded system applications , 2001, Proceedings 3rd International Symposium on Distributed Objects and Applications.

[26]  John Tang Boyland,et al.  Alias burying: Unique variables without destructive reads , 2001, Softw. Pract. Exp..

[27]  Daniel G. Bobrow,et al.  A model and stack implementation of multiple environments , 1973, CACM.

[28]  J. Tryggvesson,et al.  JBED : JAVA FOR REAL-TIME SYSTEMS , 1999 .

[29]  Alan Burns The Ravenscar Profile , 1999, ALET.

[30]  James Noble,et al.  Saving the world from bad beans: deployment-time confinement checking , 2003, OOPSLA 2003.

[31]  Douglas C. Schmidt,et al.  The Design and Performance of the jRate Real-Time Java Implementation , 2002, OTM.

[32]  Urs Gleim,et al.  JaRTS: A Portable Implementation of Real-Time Core Extensions for Java , 2002, Java Virtual Machine Research and Technology Symposium.

[33]  Jan Vitek,et al.  Java Subtype Tests in Real-Time , 2003, ECOOP.

[34]  Jan Vitek,et al.  Confined types in Java , 2001, Softw. Pract. Exp..

[35]  Sophia Drossopoulou,et al.  Ownership, encapsulation and the disjointness of type and effect , 2002, OOPSLA '02.

[36]  Martin Elsman,et al.  Combining region inference and garbage collection , 2002, PLDI '02.

[37]  James Noble,et al.  Featherweight generic confinement , 2006, Journal of Functional Programming.