Abstract
Graph reduction specifications (GRSs) are a powerful new method for specifying classes of pointer data structures (shapes). They cover important shapes, like various forms of balanced trees, that cannot be handled by existing methods.
This paper formally defines GRSs as graph reduction systems with a signature restriction and an accepting graph. We are mainly interested in PGRSs — polynomially-terminating GRSs whose graph languages are closed under reduction and have a polynomial membership test.
We investigate the power of the PGRS framework by presenting example specifications and by considering its language closure properties: PGRS languages are closed under intersection; not closed under union (unless we drop the closedness restriction and exclude languages with the empty graph); and not closed under complement.
Our practical investigation presents example PGRSs including cyclic lists, trees, balanced trees and red-black trees. In each case we try to make the PGRS as simple as possible where simpler means fewer rules, simpler termination and closure proofs and fewer non-terminals. We show how to prove the correctness of a PGRS and give methods for demonstrating that a given shape cannot be specified by a PGRS with certain simplicity properties.
Work partly funded by EPSRC project Safe Pointers by Graph Transformation[1].
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Safe Pointers by Graph Transformation, project webpage, http://www-users.cs.york.ac.uk/~ajb/spgt/
Bakewell, A., Plump, D., Runciman, C.: Specifying pointer structures by graph reduction. Technical Report YCS-2003-367, Department of Computer Science, University of York (2003), Available from [1]
Bakewell, A., Plump, D., Runciman, C.: Checking the shape safety of pointer manipulations. In: Berghammer, R., Möller, B., Struth, G. (eds.) RelMiCS 2003. LNCS, vol. 3051, Springer, Heidelberg (2004)
Bardohl, R., Minas, M., Schürr, A., Taentzer, G.: Application of Graph Transformation to Visual Languages. In: Handbook of Graph Grammars and Computing by Graph Transformation, vol. 2, pp. 105–180. World Scientific, Singapore (1999)
Benedikt, M., Reps, T., Sagiv, M.: A decidable logic for describing linked data structures. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, pp. 2–19. Springer, Heidelberg (1999)
Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to algorithms. MIT Press, Cambridge (1990)
Drewes, F., Hoffmann, B., Minas, M.: Context-exploiting shapes for diagram transformation. Machine Graphics and Vision 12(1), 117–132 (2003)
Fradet, P., Le Métayer, D.: Shape types. In: Proc. Principles of Programming Languages (POPL 1997), pp. 27–39. ACM Press, New York (1997)
Fradet, P., Le Métayer, D.: Structured Gamma. Science of Computer Programming 31(2-3), 263–289 (1998)
Habel, A., Müller, J., Plump, D.: Double-pushout graph transformation revisited. Math. Struct. Comp. Science 11, 637–688 (2001)
Habel, A., Plump, D.: Relabelling in graph transformation. In: Corradini, A., Ehrig, H., Kreowski, H.-J., Rozenberg, G. (eds.) ICGT 2002. LNCS, vol. 2505, pp. 135–147. Springer, Heidelberg (2002)
Hendren, L.J., Hummel, J., Nicolau, A.: Abstractions for recursive pointer data structures: Improving the analysis and transformation of imperative programs. In: Proc. ACM SIGPLAN 1992 Conference on Programming Langauge Design and Implementation (PLDI 1992), pp. 249–260. ACM Press, New York (1992)
Hinze, R.: Functional Pearl: Perfect trees and bit-reversal permutations. Journal of Functional Programming 10(3), 305–317 (2000)
Klarlund, N., Schwartzbach, M.I.: Graph types. In: Proc. Principles of Programming Languages (POPL 1993), pp. 196–205. ACM Press, New York (1993)
Kuncak, V., Lam, P., Rinard, M.: Role analysis. In: Proc. Principles of Programming Languages (POPL 2002), pp. 17–32. ACM Press, New York (2002)
Møller, A., Schwartzbach, M.I.: The pointer assertion logic engine. In: Proc. ACM SIGPLAN 2001 Conference on Programming Langauge Design and Implementation (PLDI 2001), ACM Press, New York (2001)
Plump, D.: Hypergraph rewriting: Critical pairs and undecidability of confluence. In: Sleep, M.R., Plasmeijer, M.J., van Eekelen, M.C. (eds.) Term Graph Rewriting: Theory and Practice, ch. 15, pp. 201–213. John Wiley & Sons Ltd., Chichester (1993)
Uesu, T.: A system of graph grammars which generates all recursively enumerable sets of labelled graphs. Tsukuba J. Math. 2, 11–26 (1978)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bakewell, A., Plump, D., Runciman, C. (2004). Specifying Pointer Structures by Graph Reduction. In: Pfaltz, J.L., Nagl, M., Böhlen, B. (eds) Applications of Graph Transformations with Industrial Relevance. AGTIVE 2003. Lecture Notes in Computer Science, vol 3062. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-25959-6_3
Download citation
DOI: https://doi.org/10.1007/978-3-540-25959-6_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-22120-3
Online ISBN: 978-3-540-25959-6
eBook Packages: Springer Book Archive