Safety Guarantees from Explicit Resource Management

We present a language and a program analysis that certifies the safe use of flexible resource management idioms, in particular advance reservation or "block booking" of costly resources. This builds on previous work with resource managers that carry out runtime safety checks, by showing how to assist these with compile-time checks. We give a small ANF-style language with explicit resource managers, and introduce a type and effect system that captures their runtime behaviour. In this setting, we identify a notion of dynamic safety for running code, and show that dynamically safe code may be executed without runtime checks. We show a similar static safety property for type-safe code, and prove that static safety implies dynamic safety. The consequence is that typechecked code can be executed without runtime instrumentation, and is guaranteed to make only appropriate use of resources.

[1]  Martin Hofmann,et al.  MOBIUS: Mobility, Ubiquity, Security , 2006, TGC.

[2]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[3]  Thomas P. Jensen,et al.  A Formal Model of Access Control for Mobile Interactive Devices , 2006, ESORICS.

[4]  Martin Hofmann,et al.  Automatic Certification of Heap Consumption , 2004, LPAR.

[5]  Amr Sabry,et al.  The essence of compiling with continuations , 1993, PLDI '93.

[6]  Lars Birkedal,et al.  Abstract Predicates and Mutable ADTs in Hoare Type Theory , 2007, ESOP.

[7]  Aaron Stump,et al.  Design and results of the 2nd annual satisfiability modulo theories competition (SMT-COMP 2006) , 2007, Formal Methods Syst. Des..

[8]  Andrew W. Appel,et al.  SSA is functional programming , 1998, SIGP.

[9]  Dieter Gollmann,et al.  Computer Security - ESORICS 2006, 11th European Symposium on Research in Computer Security, Hamburg, Germany, September 18-20, 2006, Proceedings , 2006, ESORICS.

[10]  Patrick Maier,et al.  Monitoring External Resources in Java MIDP , 2008, Electron. Notes Theor. Comput. Sci..

[11]  Martin Hofmann,et al.  A program logic for resources , 2007, Theor. Comput. Sci..

[12]  Frank Wolter,et al.  Monodic fragments of first-order temporal logics: 2000-2001 A.D , 2001, LPAR.

[13]  Walter Binder,et al.  Portable resource control in Java , 2001, OOPSLA '01.

[14]  Thorsten von Eicken,et al.  JRes: a resource accounting interface for Java , 1998, OOPSLA '98.

[15]  Albert Oliveras,et al.  Design and Results of the 3rd Annual Satisfiability Modulo Theories Competition (SMT-Comp 2007) , 2008, Int. J. Artif. Intell. Tools.