A Pragmatic Type System for Deductive Verification

In the context of deductive verication, it is customary today to handle programs with pointers using either separation logic, dynamic frames, or explicit memory models. Yet we can observe that in numerous programs, a large amount of code ts within the scope of Hoare logic, provided we can statically control aliasing. When this is the case, the code correctness can be reduced to simpler verication conditions which do not require any explicit memory model. This makes verication conditions more amenable both to automated theorem proving and to manual inspection and debugging. In this paper, we devise a method of such static aliasing control for a programming language featuring nested data structures with mutable components. Our solution is based on a type system with singleton regions and eects, which we prove to be sound.

[1]  David Walker,et al.  Alias Types , 2000, ESOP.

[2]  Arthur Charguéraud,et al.  Functional translation of a calculus of capabilities , 2008, ICFP 2008.

[3]  François Bobot,et al.  Why3: Shepherd Your Herd of Provers , 2011 .

[4]  Henry G. Baker,et al.  Unify and conquer , 1990, LISP and Functional Programming.

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

[6]  R. M. Burstall,et al.  Some Techniques for Proving Correctness of Programs which Alter Data Structures , 2013 .

[7]  Peter Müller,et al.  Ownership transfer in universe types , 2007, OOPSLA.

[8]  Reinhard Wilhelm,et al.  Parametric shape analysis via 3-valued logic , 2002, TOPL.

[9]  Ioannis T. Kassios Dynamic Frames: Support for Framing, Dependencies and Sharing Without Restrictions , 2006, FM.

[10]  Philip Wadler,et al.  Linear Types can Change the World! , 1990, Programming Concepts and Methods.

[11]  John Hogg Islands: aliasing protection in object-oriented languages , 1991, OOPSLA 1991.

[12]  David Walker,et al.  Typed memory management in a calculus of capabilities , 1999, POPL '99.

[13]  Henry G. Baker,et al.  “Use-once” variables and linear objects: storage management, reflection and multi-threading , 1995, SIGP.

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

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

[16]  Radu Rugina,et al.  Region-based shape analysis with tracked locations , 2005, POPL '05.

[17]  Paulo Sérgio Almeida Balloon Types: Controlling Sharing of State in Data Types , 1997, ECOOP.

[18]  C. A. R. Hoare,et al.  An axiomatic basis for computer programming , 1969, CACM.

[19]  Jean-Christophe Filliâtre,et al.  Why3 - Where Programs Meet Provers , 2013, ESOP.

[20]  James Noble,et al.  Aliasing in Object-Oriented Programming. Types, Analysis and Verification , 2013, Lecture Notes in Computer Science.

[21]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[22]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[23]  Jean-Christophe Filliâtre,et al.  The spirit of ghost code , 2014, Formal Methods Syst. Des..

[24]  Peter W. O'Hearn,et al.  Strong Update, Disposal, and Encapsulation in Bunched Typing , 2006, MFPS.