Friends Need a Bit More: Maintaining Invariants Over Shared State

In the context of a formal programming methodology and verification system for ownership-based invariants in object-oriented programs, a friendship system is defined. Friendship is a flexible protocol that allows invariants expressed over shared state. Such invariants are more expressive than those allowed in exisiting ownership type systems because they link objects that are not in the same ownership domain. Friendship permits the modular verification of cooperating classes. This paper defines friendship, sketches a soundness proof, and provides several realistic examples.

[1]  James Noble,et al.  Simple Ownership Types for Object Containment , 2001, ECOOP.

[2]  Robert DeLine,et al.  Enforcing high-level protocols in low-level software , 2001, PLDI '01.

[3]  Peter Müller,et al.  Modular Specification and Verification of Object-Oriented Programs , 2002, Lecture Notes in Computer Science.

[4]  Gary T. Leavens Modular specification and verification of object-oriented programs , 1991, IEEE Software.

[5]  Martin Odersky ECOOP 2004 – Object-Oriented Programming , 2004, Lecture Notes in Computer Science.

[6]  Wolfram Schulte,et al.  Runtime verification of .NET contracts , 2003, J. Syst. Softw..

[7]  Richard Banach,et al.  Book Review: "Concurrency Verification: Introduction to Compositional and Non-compositional Methods" by Willem-Paul de Roever, Frank de Boer, Ulrich Hanneman, Jozef Hooman, Yassine Lakhnech, Mannes Poel and Job Zwiers (eds.) , 2003, J. Log. Comput..

[8]  Eric Gunnerson A Programmer’s Introduction to C# , 2001, Apress.

[9]  Yoonsik Cheon,et al.  A Runtime Assertion Checker for the Java Modeling Language (JML) , 2003, ICSE 2003.

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

[11]  Frank S. de Boer,et al.  A Syntax-Directed Hoare Logic for Object-Oriented Programming Concepts , 2003, FMOODS.

[12]  Jozef Hooman,et al.  Concurrency Verification: Introduction to Compositional and Noncompositional Methods , 2001, Cambridge Tracts in Theoretical Computer Science.

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

[14]  Anindya Banerjee,et al.  Ownership confinement ensures representation independence for object-oriented programs , 2002, JACM.

[15]  Jeannette M. Wing,et al.  A behavioral notion of subtyping , 1994, TOPL.

[16]  Anish Arora,et al.  Book Review: Verification of Sequential and Concurrent Programs by Krzysztof R. Apt and Ernst-Riidiger Olderog (Springer-Verlag New York, 1997) , 1998, SIGA.

[17]  K. Rustan M. Leino,et al.  Data abstraction and information hiding , 2002, TOPL.

[18]  K. Rustan M. Leino,et al.  Object Invariants in Dynamic Contexts , 2004, ECOOP.

[19]  Cliff B. Jones,et al.  Tentative steps toward a development method for interfering programs , 1983, TOPL.

[20]  Jørgen Lindskov Knudsen ECOOP 2001 — Object-Oriented Programming , 2001, Lecture Notes in Computer Science.

[21]  K. Rustan M. Leino,et al.  Verification of Object-Oriented Programs with Invariants , 2003, J. Object Technol..

[22]  Bertrand Meyer,et al.  Object-Oriented Software Construction, 2nd Edition , 1997 .

[23]  Mike Barnett,et al.  Towards imperative modules: reasoning about invariants and sharing of mutable state , 2004, LICS 2004.

[24]  Robert DeLine,et al.  The fugue protocol checker: is your software baroque? technical report msr-tr-2004-07 , 2004 .

[25]  Anindya Banerjee,et al.  Representation independence, confinement and access control [extended abstract] , 2002, POPL '02.

[26]  Greg Nelson,et al.  Extended static checking for Java , 2002, PLDI '02.

[27]  Peter W. O'Hearn,et al.  Separation and information hiding , 2004, POPL.

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

[29]  Towards imperative modules: reasoning about invariants and sharing of mutable state , 2004, Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004..

[30]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[31]  Gary T. Leavens,et al.  Formal Techniques for Java-Like Programs , 2006, ECOOP Workshops.

[32]  V. Stavridou,et al.  Abstraction and specification in program development , 1988 .

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

[34]  K. Rustan M. Leino,et al.  Extended static checking , 1998, PROCOMET.