A Graph-Based Operational Semantics of OO Programs

We present a mathematical model of class graphs, object graphs and state graphs which naturally capture the essential oo features. A small-step operational semantics of oo programs is defined in the style of classical structural operational semantics, in which an execution step of a command is defined as a transition from one state graph to another obtained by simple operations on graphs. To validate this semantics, we give it an implementation in Java. This implementation can also be used for simulation and validation of oo programs, with the visualization of state graph transitions during the execution. A distinct feature of this semantics is location or address independent. Properties of objects and oo programs can be described as properties of graphs in terms of relations of navigation paths (or attribute strings).

[1]  Francesco Parisi-Presicce,et al.  Spatial and Temporal Refinement of Typed Graph Transformation Systems , 1998, MFCS.

[2]  Pierre Cointe ECOOP ’96 — Object-Oriented Programming , 1996, Lecture Notes in Computer Science.

[3]  Augusto Sampaio,et al.  A Refinement Algebra for Object-Oriented Programming , 2003, ECOOP.

[4]  Francesca Rossi,et al.  Graph Processes , 1996, Fundam. Informaticae.

[5]  Reiko Heckel,et al.  Confluence of Typed Attributed Graph Transformation Systems , 2002, ICGT.

[6]  Peter W. O'Hearn,et al.  Separation Logic Semantics for Communicating Processes , 2008, FICS.

[7]  S. Anderson,et al.  Secure Synthesis of Code: A Process Improvement Experiment , 1999, World Congress on Formal Methods.

[8]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

[9]  Satoru Kawai,et al.  An Algorithm for Drawing General Undirected Graphs , 1989, Inf. Process. Lett..

[10]  Anne Elisabeth Haxthausen,et al.  Theoretical Aspects of Computing - ICTAC 2008, 5th International Colloquium, Istanbul, Turkey, September 1-3, 2008. Proceedings , 2008, ICTAC.

[11]  Marko C. J. D. van Eekelen,et al.  Graph Rewriting Semantics for Functional Programming Languages , 1996, CSL.

[12]  David A. Naumann,et al.  Predicate transformer semantics of a higher-order imperative language with record subtyping , 2001, Sci. Comput. Program..

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

[14]  Naftaly H. Minsky Towards Alias-Free Pointers , 1996, ECOOP.

[15]  Fernando Luís Dotti,et al.  Translating Java Code to Graph Transformation Systems , 2004, ICGT.

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

[17]  Augusto Sampaio,et al.  Algebraic reasoning for object-oriented programming , 2004, Sci. Comput. Program..

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

[19]  C. A. R. Hoare,et al.  A Trace Model for Pointers and Objects , 1999, ECOOP.

[20]  Stephen D. Brookes,et al.  A Semantics for Concurrent Separation Logic , 2004, CONCUR.

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

[22]  Tobias Nipkow,et al.  A machine-checked model for a Java-like language, virtual machine, and compiler , 2006, TOPL.

[23]  Liang Zhao,et al.  Graph Transformations for Object-Oriented Refinement , 2007 .

[24]  Jozef Gruska,et al.  Mathematical Foundations of Computer Science 1998 , 1998, Lecture Notes in Computer Science.

[25]  Luca Cardelli,et al.  ECOOP 2003 – Object-Oriented Programming , 2003, Lecture Notes in Computer Science.

[26]  Leila Ribeiro,et al.  Formal Verification of Object-Oriented Graph Grammars Specifications , 2007, GT-VC@CONCUR.

[27]  Rachid Guerraoui,et al.  ECOOP’ 99 — Object-Oriented Programming , 1999, Lecture Notes in Computer Science.

[28]  Arend Rensink,et al.  Defining Object-Oriented Execution Semantics Using Graph Transformations , 2006, FMOODS.

[29]  Yassine Lakhnech,et al.  On Logics of Aliasing , 2004, SAS.

[30]  Hartmut Ehrig,et al.  Fundamental Theory for Typed Attributed Graphs and Graph Transformation based on Adhesive HLR Categories , 2006, Fundam. Informaticae.

[31]  Luciano Baresi,et al.  Style-based refinement of dynamic software architectures , 2004, Proceedings. Fourth Working IEEE/IFIP Conference on Software Architecture (WICSA 2004).

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

[33]  Grzegorz Rozenberg,et al.  Handbook of Graph Grammars and Computing by Graph Transformations, Volume 1: Foundations , 1997 .

[34]  M.C.J.D. van Eekelen,et al.  Mixed Lazy/Strict Graph Semantics , 2004 .

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

[36]  Volker Stolz,et al.  rCOS: Theory and Tool for Component-Based Model Driven Development , 2009, FSEN.

[37]  Gavin M. Bierman,et al.  Separation logic and abstraction , 2005, POPL '05.

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

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

[40]  Michel Wermelinger,et al.  A graph transformation approach to software architecture reconfiguration , 2002, Sci. Comput. Program..

[41]  Yifeng Chen,et al.  Compositional Reasoning for Pointer Structures , 2006, MPC.

[42]  Arnd Poetzsch-Heffter,et al.  A Programming Logic for Sequential Java , 1999, ESOP.

[43]  Ana Cavalcanti,et al.  A Weakest Precondition Semantics for an Object-Oriented Language of Refinement , 1999, World Congress on Formal Methods.

[44]  Jim Woodcock,et al.  A Theory of Pointers for the UTP , 2008, ICTAC.