In the graph grammar theory, there is a natural generalization of the context-free grammar approach to graphs called hyperedge replacement grammar (HRG). The latter is based on the hyperedge replacement procedure, and it preserves the main principles and properties of context-free grammars (e.g. the pumping lemma). In the string case, there is an alternative approach to describing formal languages, which was introduced by J. Lambek; it is based on a substructural logic called the Lambek calculus. In this paper, we generalize this calculus and this grammar approach to hypergraphs, which results in defining the hypergraph Lambek calculus (HL) and hypergraph Lambek grammars (HL-grammars). We show how to embed the Lambek calculus in HL justifying that the presented generalization is appropriate. After that, we study several structural properties of HL and turn to the question of expressive power of its grammars. It appears that HL-grammars are more powerful than HRGs while having the same algorithmic complexity with them; in particular, we show that intersection of a language generated by an HRG and of a language generated by an HL-grammar can be generated by some HL-grammar as well. Consequently, HL-grammars might be considered as enhancement of HRGs.
Read full abstract