WP Semantics and Behavioral Subtyping

For the object oriented (OO) world, developing formal semantics for theoretical study and practical use is still an important topic despite of a decade's efforts. In this paper, for a sufficiently large subset of sequential Java with a pure reference semantics model, we define a Weakest Precondition (WP) semantics, and prove its soundness and completeness. Based on thisWP semantics, we study specifications of methods and the refinement relationship between specifications, and we propose new definitions for object invariants and behavioral subtyping notation for general OO programs.

[1]  Frank S. de Boer,et al.  A WP-calculus for OO , 1999, FoSSaCS.

[2]  Frank Piessens,et al.  Implicit Dynamic Frames: Combining Dynamic Frames and Separation Logic , 2009, ECOOP.

[3]  Jean-Louis Lanet,et al.  Java Applet Correctness: A Developer-Oriented Approach , 2003, FME.

[4]  Jim Woodcock,et al.  A Weakest Precondition Semantics for Z , 1998, Comput. J..

[5]  Stefania Gnesi,et al.  FME 2003: Formal Methods: International Symposium of Formal Methods Europe, Pisa, Italy, September 8-14, 2003. Proceedings , 2003, Lecture Notes in Computer Science.

[6]  Jifeng He,et al.  rCOS: A refinement calculus of object systems , 2006, Theor. Comput. Sci..

[7]  K. Rustan M. Leino,et al.  The Spec# Programming System: An Overview , 2004, CASSIS.

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

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

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

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

[12]  K. Rustan M. Leino,et al.  Weakest-precondition of unstructured programs , 2005, PASTE '05.

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

[14]  Wim H. Hesselink,et al.  Predicate-transformer semantics of general recursion , 1989, Acta Informatica.

[15]  Sophia Drossopoulou ECOOP 2009 - Object-Oriented Programming, 23rd European Conference, Genoa, Italy, July 6-10, 2009. Proceedings , 2009, ECOOP.

[16]  Ohad Kammar,et al.  Algebraic foundations for effect-dependent optimisations , 2012, POPL '12.

[17]  Mark Lillibridge,et al.  Extended static checking for Java , 2002, PLDI '02.

[18]  B. Liskov Keynote address - data abstraction and hierarchy , 1988, OOPSLA '87.

[19]  Gavin M. Bierman,et al.  Separation logic, abstraction and inheritance , 2008, POPL '08.

[20]  Bart Jacobs,et al.  Weakest pre-condition reasoning for Java programs with JML annotations , 2004, J. Log. Algebraic Methods Program..

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

[22]  Martin Odersky,et al.  A Statically Safe Alternative to Virtual Types , 1998, ECOOP.

[23]  Frank S. de Boer,et al.  A proof outline logic for object-oriented programming , 2005, Theor. Comput. Sci..

[24]  Albert L. Baker,et al.  Preliminary design of JML: a behavioral interface specification language for java , 2006, SOEN.

[25]  Liu Yijing,et al.  A separation logic for OO programs , 2010, FACS 2010.

[26]  Ana Cavalcanti,et al.  A Weakest Precondition Semantics for Refinement of Object-Oriented Programs , 2000, IEEE Trans. Software Eng..

[27]  Matthew J. Parkinson,et al.  The Relationship between Separation Logic and Implicit Dynamic Frames , 2011, ESOP.

[28]  C. A. R. Hoare,et al.  Proof of correctness of data representations , 1972, Acta Informatica.

[29]  Jan Vitek,et al.  Flexible Alias Protection , 1998, ECOOP.

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

[31]  Gary T. Leavens,et al.  Behavioral Subtyping is Equivalent to Modular Reasoning for Object-oriented Programs , 2006 .

[32]  Stephen Gilmore,et al.  Mobile Resource Guarantees for Smart Devices , 2004, CASSIS.

[33]  Robin Milner,et al.  Theories for the Global Ubiquitous Computer , 2004, FoSSaCS.