The Kleene algebra of nested pointer structures: theory and applications

Software controlled systems more and more become established in our daily life. Thus, the probability to be confronted with system crashes, breakdowns or erroneous behaviour due to slovenly programmed code is increased considerably. While this may only be annoying for electronic entertainment products it could be dangerous to life in traffic and nuclear power plant control systems or medical tools. Applications from all these areas require a formal software development process to assure correctness. Although there are several methods to achieve this goal in general, verification and development of correct pointer algorithms, which are most susceptible to errors, have to a large extent defied a general formal treatment. In this thesis this insufficiency is dealt with in two ways. First, an abstract calculus for the treatment of labeled graphs and pointer structures is presented. The framework is based on Kleene algebra, which despite its simple structure has been successfully applied to a variety of different problems. Simplicity and succinctness is inherited directly by the pointer Kleene algebra defined here. It enables a compact representation without preventing access to the internal structure. We introduce higher-level operators to describe reachability constraints, allocation, selection and projection. Localization properties that allow restricting the effects of modifications to particular parts of the memory are proved. A second part presents applications of pointer Kleene algebra to the software development process. The algebra is used as formal basis for a transformation system to derive correct pointer algorithms from functional specifications. To cover the whole scope from specification to implementation this method is extended by a general transformation scheme to create efficient imperative algorithms. As a further application it is shown that pointer Kleene algebra can also serve as an algebraic model behind a Hoare-style verification system for algorithms on linked data structures.

[1]  R. Bird Introduction to functional programming using Haskell, Second Edition , 1998 .

[2]  Dexter Kozen,et al.  A Representation Theorem for Models of *-Free PDL , 1980, ICALP.

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

[4]  Roland Carl Backhouse,et al.  Galois Connections and Fixed Point Calculus , 2000, Algebraic and Coalgebraic Methods in the Mathematics of Program Construction.

[5]  Rutger M. Dijkstra,et al.  Computation calculus bridging a formalization gap , 1998, Sci. Comput. Program..

[6]  David N. Yetter,et al.  Quantales and (noncommutative) linear logic , 1990, Journal of Symbolic Logic.

[7]  Vaughan R. Pratt,et al.  Dynamic algebras: Examples, constructions, applications , 1991, Stud Logica.

[8]  Marco Hollenberg,et al.  Equational Axioms of Test Algebra , 1996, CSL.

[9]  J. Pin Tropical Semirings , 2005 .

[10]  David Gries,et al.  Specification and Transformation of Programs: A Formal Approach to Software Development , 1990 .

[11]  Vaughan R. Pratt,et al.  Action Logic and Pure Induction , 1990, JELIA.

[12]  Martin Russling Deriving General Schemes for Classes of Graph Algorithms , 1996 .

[13]  Thorsten Ehm Transformational Construction of Correct Pointer Algorithms , 2001, Ershov Memorial Conference.

[14]  A. Bijlsma Calculating with Pointers , 1989, Sci. Comput. Program..

[15]  Alfred Tarski,et al.  Relational selves as self-affirmational resources , 2008 .

[16]  Fred Kröger,et al.  Temporal Logic of Programs , 1987, EATCS Monographs on Theoretical Computer Science.

[17]  Vaughan R. Pratt,et al.  Dynamic algebras as a well-behaved fragment of relation algebras , 1988, Algebraic Logic and Universal Algebra in Computer Science.

[18]  Richard Bornat,et al.  Proving Pointer Programs in Hoare Logic , 2000, MPC.

[19]  Zoltán Ésik,et al.  Equational axioms for regular sets , 1993, Mathematical Structures in Computer Science.

[20]  C. A. R. Hoare,et al.  The Weakest Prespecification , 1987, Information Processing Letters.

[21]  Joakim von Wright,et al.  From Kleene Algebra to Refinement Algebra , 2002, MPC.

[22]  Yasuo Kawahara,et al.  Crispness in Dedekind Categories , 2001, RelMiCS.

[23]  Roland C. Backhouse,et al.  Calculating Path Algorithms , 1994, Sci. Comput. Program..

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

[25]  Michael J. Butler,et al.  Calculational Derivation of Pointer Algorithms from Tree Operations , 1999, Sci. Comput. Program..

[26]  Kan Ching Ng,et al.  Relation algebras with transitive closure , 1984 .

[27]  Rudolf Berghammer,et al.  Development of Several Reachability Algorithms for Directed Graphs , 1987, WG.

[28]  Joseph M. Morris A General Axiom of Assignment , 1982 .

[29]  C. j. Aarts,et al.  Galois Connections Presented Calculationally , 1992 .

[30]  Dexter Kozen,et al.  On Induction vs. *-Continuity , 1981, Logic of Programs.

[31]  Martin Erwig,et al.  Inductive graphs and functional graph algorithms , 2001, J. Funct. Program..

[32]  Tomasz Kowaltowski Data Structures and Correctness of Programs , 1979, JACM.

[33]  Richard S. Bird,et al.  Introduction to functional programming , 1988, Prentice Hall International series in computer science.

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

[35]  Gunther Schmidt,et al.  Relations and Graphs: Discrete Mathematics for Computer Scientists , 1993 .

[36]  J. Conway Regular algebra and finite machines , 1971 .

[37]  S C Kleene,et al.  Representation of Events in Nerve Nets and Finite Automata , 1951 .

[38]  A. Tarski,et al.  Boolean Algebras with Operators. Part I , 1951 .

[39]  E. Casari Logic and the Foundations of Mathematics , 1981 .

[40]  Kurt Stenzel,et al.  Structured Specifications and Interactive Proofs with KIV , 1998 .

[41]  Dieter Jungnickel,et al.  Graphs, Networks and Algorithms (Algorithms and Computation in Mathematics) , 2004 .

[42]  Ivar Jacobson,et al.  Unified Modeling Language , 2020, Definitions.

[43]  Ernie Cohen,et al.  Separation and Reduction , 2000, MPC.

[44]  Thorsten Ehm Case studies for the derivation of pointer algorithms , 2003 .

[45]  Hitoshi Furusawa,et al.  Algebraic Formalisations of Fuzzy Relations and Their Representation Theorems , 1997 .

[46]  Arto Salomaa,et al.  Two Complete Axiom Systems for the Algebra of Regular Events , 1966, JACM.

[47]  Dany Serrato,et al.  Squares and rectangles in relation categories. Three cases: semilattice, distributive lattice and Boolean non-unitary , 1995 .

[48]  M. Plus Linear systems in (inax,+) algebra , 1990 .

[49]  Peter Thiemann Grundlagen der funktionalen Programmierung , 1994, Leitfäden der Informatik.

[50]  Peter W. O'Hearn,et al.  Local Reasoning about Programs that Alter Data Structures , 2001, CSL.

[51]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[52]  Richard E. Ladner,et al.  Propositional Dynamic Logic of Regular Programs , 1979, J. Comput. Syst. Sci..

[53]  Jules Desharnais,et al.  Characterizing determinacy in Kleene algebras , 2001, Inf. Sci..

[54]  Edward F. Moore,et al.  Gedanken-Experiments on Sequential Machines , 1956 .

[55]  Joseph M. Morris A Proof of the Schorr-Waite Algorithm , 1982 .

[56]  K. Clenaghan Calculational graph algorithmics: reconciling two approaches with dynamic algebra , 1995 .

[57]  Friedrich L. Bauer,et al.  The Munich Project CIP, Volume II: The Program Transformation System CIP-S , 1987 .

[58]  Carl Hewitt,et al.  Comparative Schematology , 1970 .

[59]  Michael Winter,et al.  Relational Constructions in Goguen Categories , 2001, RelMiCS.

[60]  Z. Ésik,et al.  Iteration Theories: The Equational Logic of Iterative Processes , 1993 .

[61]  Greg Nelson,et al.  Verifying reachability invariants of linked structures , 1983, POPL '83.