Narrowing Data-Structures with Pointers

  • Rachid Echahed
  • Nicolas Peltier
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4178)


We investigate the narrowing relation in a wide class of (cyclic) term-graph rewrite systems. We propose a new sound and complete narrowing-based algorithm able to solve goals in presence of data structures with pointers (e.g., circular lists, doubly linked lists etc.). We first define the class of rewrite systems we consider. Our rules provide features such as pointer (edge) redirections, relabeling of existing nodes, in addition to the creation of new nodes. Moreover, we split the set of nodes of term-graphs in two (possibly empty) subsets: (i) variables and (ii) names. Variable nodes can be mapped against any other node whereas names act as constants and thus they are supposed to match themselves. This distinction between nodes allows us to synthesize, through the narrowing process, data-structures with circular shapes. In a second step, we define the rewriting and narrowing relations. We then show the soundness and completeness of narrowing.


Operational Semantic Variable Node General Substitution Ground Instance Graph Reduction 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Antoy, S., Brown, D.W., Chiang, S.-H.: Lazy context cloning for non-deterministic graph rewriting. In: Third International Workshop on Term Graph Rewriting, TERMGRAPH, pp. 61–70 (2006)Google Scholar
  2. 2.
    Antoy, S., Echahed, R., Hanus, M.: A needed narrowing strategy. Journal of the ACM 47(4), 776–822 (2000)CrossRefMathSciNetGoogle Scholar
  3. 3.
    Bakewell, A., Plump, D., Runciman, C.: Checking the shape safety of pointer manipulations. In: RelMiCS, pp. 48–61 (2003)Google Scholar
  4. 4.
    Bakewell, A., Plump, D., Runciman, C.: Specifying pointer structures by graph reduction. In: Pfaltz, J.L., Nagl, M., Böhlen, B. (eds.) AGTIVE 2003. LNCS, vol. 3062, pp. 30–44. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  5. 5.
    Barendregt, H., van Eekelen, M., Glauert, J., Kenneway, R., Plasmeijer, M.J., Sleep, M.: Term Graph Rewriting. In: de Bakker, J.W., Nijman, A.J., Treleaven, P.C. (eds.) PARLE 1987. LNCS, vol. 259, pp. 141–158. Springer, Heidelberg (1987)Google Scholar
  6. 6.
    Caferra, R., Echahed, R., Peltier, N.: Rewriting term-graphs with priority. In: Proceedings of PPDP (Principle and Practice of Declarative Programming). ACM, New York (2006)Google Scholar
  7. 7.
    Echahed, R., Janodet, J.-C.: Admissible graph rewriting and narrowing. In: IJCSLP, pp. 325–342 (1998)Google Scholar
  8. 8.
    Echahed, R., Janodet, J.C.: Completeness of admissible graph collapsing narrowing. In: Proc. of Joint APPLIGRAPH/GETGRATS Workshop on Graph Transformation Systems (GRATRA 2000) (March 2000)Google Scholar
  9. 9.
    Habel, A., Plump, D.: Term graph narrowing. Mathematical Structures in Computer Science 6, 649–676 (1996)MATHMathSciNetGoogle Scholar
  10. 10.
    Hanus, M.: The integration of functions into logic programming : from theory to practice. Journal of Logic Programming 19&20, 583–628 (1994)CrossRefMathSciNetGoogle Scholar
  11. 11.
    Rao, M.K.: Completeness results for basic narrowing in non-copying implementations. In: Proc. of Joint Int. Conference and Symposium on Logic Programming, pp. 393–407. MIT Press, Cambridge (1996)Google Scholar
  12. 12.
    Yamanaka, H.: Graph narrowing and its simulation by graph reduction. Research report IIAS-RR-93-10E, Institute for Social Information Science, Fujitsu Laboratories LDT (June 1993)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Rachid Echahed
    • 1
  • Nicolas Peltier
    • 1
  1. 1.LEIBNIZ-IMAG, CNRSGrenobleFrance

Personalised recommendations