Graph rewriting

Graph rewriting

In graph theory, graph rewriting is a system of rewriting for graphs, i.e. a set of graph rewrite rules of the form p: L ightarrow R, with L being called pattern graph (or left-hand side) and R being called replacement graph (or right-hand side of the rule).A graph rewrite rule is applied to the host graph by searching for an occurrence of the pattern graph (thus solving the subgraph isomorphism problem) and by replacing the found occurrence by an instance of the replacement graph.

Sometimes graph grammar is used as a synonym for graph rewriting system, especially in the context of formal languages; the different wording is used to emphasize the goal of enumerating all graphs from some starting graph, i.e. describing a graph language - instead of transforming a given state (host graph) into a new state.

Graph rewriting approaches

There are several approaches to graph rewriting, one of them is the algebraic approach, which is based upon category theory. Actually the algebraic approach is divided into some sub approaches, the double-pushout approach (DPO) and the single-pushout approach (SPO) being the most important ones; further on there are the "sesqui-pushout" and the "pullback" approach".

From the perspective of the DPO approach a graph rewriting rule is a pair of morphisms in the category of graphs with "total" graph morphisms as arrows: r = (L leftarrow K ightarrow R) (or L supseteq K subseteq R) where K ightarrow L is injective. The graph K is called "invariant" or sometimes the "gluing graph". A rewriting step or "application" of a rule r to a "host graph" G is defined by two pushout diagrams both originating in the same morphism kcolon K ightarrow G (this is where the name "double"-pushout comes from). Another graph morphism mcolon L ightarrow G models an occurrence of L in G and is called a "match". Practical understanding of this is that L is a subgraph that is matched from G (see subgraph isomorphism problem), and after a match is found, L is replaced with R in host graph G where K serves as some kind of interface.

In contrast a graph rewriting rule of the SPO approach is a single morphism in the category labeled multigraphs with "partial" graph morphisms as arrows: rcolon L ightarrow R. Thus a rewriting step is defined by a single pushout diagram. Practical understanding of this is similar to the DPO approach. The difference is, that there is no interface between the host graph G and the graph G' being the result of the rewriting step.

There is also a more algebraic-like approach to graph rewriting, based mainly on Boolean algebra, called matrix graph grammars. This topic is expanded at [http://www.mat2gra.info/ mat2gra.info] .

Yet another approach to graph rewriting, known as "determinate" graph rewriting, came out of logic and database theory. In this approach, graphs are treated as database instances, and rewriting operations as a mechanism for defining queries and views; therefore, all rewriting is required to yield unique results (up to isomorphism), and this is achieved by applying any rewriting rule concurrently throughout the graph, wherever it applies, in such a way that the result is indeed uniquely defined.

Implementations and applications

Graphs are an expressive, visual and mathematical precise formalism for modelling of objects (entities) linked by relations; objects are represented by nodes and relations between them by edges. Nodes and edges are commonly typed and attributed. Computations are described in this model by changes in the relations between the entities or by attribute changes of the graph elements. They are encoded in graph rewrite/graph transformation rules and executed by graph rewrite systems/graph transformation tools.

* Tools that are application domain neutral:
** GrGen.NET, the graph rewrite generator, a graph transformation tool emitting C#-code or .NET-assemblies
** [http://tfs.cs.tu-berlin.de/agg/ AGG] , the attributed graph grammar system (Java)
* Tools that solve software engineering tasks (mainly MDA) with graph rewriting:
** GReAT
** VIATRA
** [http://www.fujaba.de/ Fujaba] uses Story driven modelling, a graph rewrite language based on PROGRES

References

*"Handbook of Graph Grammars and Computing by Graph Transformations". Volume 1-3. World Scientific Publishing

ee also

*Graph theory
*Category theory
*Graph transformation


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Graph transformation — Graph transformation, or Graph rewriting, concerns the technique to create a new graph out of an original graph using some automatic machine. It has numerous applications, ranging from software verification to layout algorithms.Graph… …   Wikipedia

  • Graph reduction — In computer science, graph reduction implements an efficient version of non strict evaluation, an evaluation strategy where the arguments to a function are not immediately evaluated. This form of non strict evaluation is also known as lazy… …   Wikipedia

  • Rewriting — In mathematics, computer science and logic, rewriting covers a wide range of potentially non deterministic methods of replacing subterms of a formula with other terms. What is considered are rewrite systems (also rewriting systems, or term… …   Wikipedia

  • Graph theory — In mathematics and computer science, graph theory is the study of graphs : mathematical structures used to model pairwise relations between objects from a certain collection. A graph in this context refers to a collection of vertices or nodes and …   Wikipedia

  • Graph homomorphism — Not to be confused with graph homeomorphism. In the mathematical field of graph theory a graph homomorphism is a mapping between two graphs that respects their structure. More concretely it maps adjacent vertices to adjacent vertices. Contents 1… …   Wikipedia

  • Confluence (abstract rewriting) — In computer science, confluence is a property of rewriting systems, describing that terms in this system can be rewritten in more than one way, to yield the same result. This article describes the properties in the most abstract setting of an… …   Wikipedia

  • Power graph analysis — In computational biology, power graph analysis is a method for the analysis andrepresentation of complex networks. Power graph analysis is the computation, analysis and visual representation of a power graph from a graphs (networks).Power graph… …   Wikipedia

  • And-inverter graph — An and inverter graph (AIG) is a directed, acyclic graph that represents a structural implementation of the logical functionality of a circuit or network. An AIG consists of two input nodes representing logical conjunction, terminal nodes labeled …   Wikipedia

  • GReAT — Graph Rewriting and Transformation (GReAT) is a Model Transformation Language (MTL) for Model Integrated Computing available in the GME environment. GReAT has a rich pattern specification sublanguage, a graph transformation sublanguage and a high …   Wikipedia

  • GrGen — GrGen.NET (Graph Rewrite GENerator, .NET version) is a graph transformation tool which generates efficient C# code (or .NET assemblies) out of declarative graph rewrite rule specifications. Graphs and graph rewrite rules are specified by… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”