Narrowing Data-Structures with Pointers
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.
KeywordsOperational Semantic Variable Node General Substitution Ground Instance Graph Reduction
Unable to display preview. Download preview PDF.
- 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
- 3.Bakewell, A., Plump, D., Runciman, C.: Checking the shape safety of pointer manipulations. In: RelMiCS, pp. 48–61 (2003)Google Scholar
- 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.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.Echahed, R., Janodet, J.-C.: Admissible graph rewriting and narrowing. In: IJCSLP, pp. 325–342 (1998)Google Scholar
- 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
- 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.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