Higher-order functions - the ones which manipulate other functions - have a fundamental role in Computer Science, specially in areas such as functional programming and theory of computation. Graph transformation - the rule-based modification of graphs - is also an important approach used in many contexts, as for instance, the definition of syntax and semantics of visual languages and the modelling and analysis of concurrent and non-deterministic systems. Although the algebraic double-pushout (DPO) approach to graph transformation has a vast theory, it does not present a notion of higher-order transformation, i.e., transformation of graph rewriting rules themselves. Higher-order would be required, for instance, to ease the modelling of dynamic systems through graph transformation systems, and to describe model transformations that modify graph rewriting rules. The main contribution of this work is a notion of double-pushout transformation for graph rewriting rules, where the result of the rewriting is a valid graph rule. We use DPO diagrams in the category of graph spans to describe rule transformations, and negative application conditions (NACs) in the second-order rules to enforce preservation of the rule structure. We define a model named second-order graph grammars, capable of first- and second-order derivations. Finally, we discuss alternative ways of defining second-order transformations.
Machado, R., Ribeiro, L., & Heckel, R. (2015). Rule-based transformation of graph rewriting rules: Towards higher-order graph grammars. Theoretical Computer Science, 594, 1–23. https://doi.org/10.1016/j.tcs.2015.01.034