### Abstract

Structural recursion, in the form of, for example, folds on lists and catamorphisms on algebraic data structures including trees, plays an important role in functional programming, by providing a systematic way for constructing and manipulating functional pro- grams. It is, however, a challenge to define structural recursions for graph data structures, the most ubiquitous sort of data in comput- ing. This is because unlike lists and trees, graphs are essentially not inductive and cannot be formalized as an initial algebra in general. In this paper, we borrow from the database community the idea of structural recursion on how to restrict recursions on infinite un- ordered regular trees so that they preserve the finiteness property and become terminating, which are desirable properties for query languages.We propose a new graph transformation language called-FG for transforming and querying ordered graphs, based on the well-defined bisimulation relation on ordered graphs with special -edges. The language FG is a higher order graph transformation language that extends the simply typed lambda calculus with graph constructors and more powerful structural recursions, which is ex- tended for transformations on the sibling dimension. It not only gives a general framework for manipulating graphs and reasoning about them, but also provides a solution to the open problem of how to define a structural recursion on ordered graphs, with the help of the bisimilarity for ordered graphs with -edges.

Original language | English |
---|---|

Pages (from-to) | 305-318 |

Number of pages | 14 |

Journal | ACM SIGPLAN Notices |

Volume | 48 |

Issue number | 9 |

Publication status | Published - 2013 Sep 1 |

Externally published | Yes |

### Keywords

- Bisimulation
- Graph Query Language
- Optimization
- Ordered Graphs
- Structural Recursion

### ASJC Scopus subject areas

- Computer Science(all)

## Fingerprint Dive into the research topics of 'Structural recursion for querying ordered graphs'. Together they form a unique fingerprint.

## Cite this

*ACM SIGPLAN Notices*,

*48*(9), 305-318.