Graph transformations and software engineering: Success stories and lost chances

https://doi.org/10.1016/j.jvlc.2012.10.003Get rights and content

Abstract

Textual as well as visual and diagrammatic notations are essential in software engineering, and are used in many different contexts. Chomsky grammars are the key tool to handle textual notations, and find many applications for textual languages. Visual and diagrammatic languages add spatial dimensions that reduce the applicability of textual grammars and call for new tools.

Graph transformation systems have been studied for over 40 years and are a powerful tool to deal with syntax, semantics and transformation of diagrammatic notations. The enormous importance of visual and diagrammatic languages and the strong support that graph transformation provide to the manipulation of diagrammatic notations would suggest a big success of graph transformation in software engineering.

Graph transformation systems find their application both as language generating devices and specification means for system evolution, and thus can have many applications in software engineering. In this paper we discuss the main features of graph transformation and how they can help software engineers. We look back to the many attempts to use graph transformations in software engineering in the last 15 years, identify some success stories, and discuss to what extent graph transformation succeeded, when they have not succeeded yet, what are the main causes of failures, and how they can help software engineering in the next 15 years.

Highlights

► Visual and diagrammatic languages are fundamental in software engineering. ► Graph transformation systems deal with their syntax, semantics and transformation. ► However, graph transformations are still not common practice in industry. ► We look back at graph transformations in software engineering in the last 15 years. ► We discuss to what extent they succeeded and what are the main causes of failures.

Introduction

Informatics is about information and its representation. Both scientists and practitioners use many textual and diagrammatic notations to represent any kind of concept, from data to models, all the way to programs and computation. Understanding and defining notations is essential to use them properly, and formal languages are the best means to avoid ambiguities and misinterpretations, and enable automatic information processing. Formal string grammars that Chomsky studied since the fifties are the most common way to specify the infinite set of all valid statements (the syntax) of textual (sequential) languages. As such, to name but one important application, they play a fundamental role in compilers.

Diagrammatic notations introduce new dimensions beyond the sequential successor relation that characterizes textual notations, and classic Chomsky grammars cannot capture these new dimensions. In the context of diagrammatic representations, the simplest and most natural abstraction is a graph, and graph grammars, or more generally graph transformation, are the most suitable specification for diagrammatic languages (graphs). As stated by Heckel: “Graph transformation has originally evolved in reaction to shortcomings in the expressiveness of classical approaches to rewriting, like Chomsky grammars and term rewriting, to deal with non-linear structures” [1].

Graphs are particularly suited for modeling and representing many structured and dynamic contexts, for instance software architectures, distributed communications, call graphs and many more. Graph transformation systems are not only an intuitive way to represent the syntax of graphs, but also to formalize how graphs evolve. As stated by Ehrig et al.: “Graph transformation allows one to model the dynamics in all these descriptions, since it can describe the evolution of graphical structures” [2].

Research on graph transformation started over 40 years ago, and right from its inception identified the main application directions. In 1969, Pfaltz and Rosenfeld gave the first examples of classes of graph grammars, called Web grammars, setting the path to using graph grammars as formal specifications of diagrammatic languages [3]. In 1971, Pratt addressed string to graph language mappings with pair grammars, paving the way to the coming generalization of pair grammars into triple grammars [4] and their application to model transformation [5]. Finally, in 1973, Ehrig et al. introduced the algebraic approach to graph transformation, which has proven a fundamental instrument in studying and demonstrating several properties of graph transformation systems [6].

Further application areas and methodologies were identified early on, both applying graph transformation in a generative and in an analytic approach. For example in the 1980s, Dolado and Torrealda used a generative approach to generate Forrester diagrams [7], while Göttler proposed a generative approach to automatically derive diagram editors from graph transformation [8], becoming a cornerstone for many more approaches to develop domain-specific languages together with their editors and CASE tools. On the other end, Bunke proposed an analytic application of graph transformation to “read” diagrammatic notations (interpreting diagrams and flowcharts) [9].

The 1990s saw the interest in graph transformations spreading to other communities that applied graph transformation in different fields, such as software architectures [10], [11] and reconfiguration for fault tolerance [12] to name a few.

Over 40 years of theoretical and applied research have shown the efficacy and the limits of graph transformation systems. Graph transformation systems are an essential tool to formally define diagrammatic languages, find many applications in informatics, and are widely accepted in the academic community. However, notwithstanding a constant effort from the graph transformation community to promote industrial acceptance with dedicated workshops and symposia, for example the series Graph-Grammars and Their Application to Computer Science, widespread application of graph transformation in common practice is still lacking.

In this paper we discuss the impact of graph transformation on software engineering. We do not aim to survey all the relevant applications of graph transformation to software engineering, but we focus on identifying the way graph transformation can be used in software engineering looking at a set of key application areas. We illustrate the different way of using graph transformation by discussing some sample work and analysing the key elements of success and the reasons behind the lack of wide adoption so far.

The next section introduces graph transformation to make the paper self contained. Section 3 discusses the role that graph transformation has played in software engineering. Section 4 illustrates the suitability of graph transformation in software engineering by presenting few sample cases. Section 5 discusses the impact of graph transformation in academia and in industry. Section 6 concludes and discusses the future of graph transformation in software engineering.

Section snippets

Graph transformation in a nutshell

Graph transformations have been defined in many ways with different notations to represent concepts such as rules, matching and gluing models, application conditions and more. In this section we summarize the main elements of graph transformation referring to the intuitive presentation of Heckel [1] using the PacMan video game as an example. The interested readers can find a clear introduction and classification of graph transformation systems in the paper by Blostein et al. [13] and a complete

Graph transformation in software engineering

Graphs are a natural visual representation of structured information, With nodes modeling entities and (hyper) edges (n-ary) relationships among entities, they provide a simple visual abstraction of the reality. In particular, they provide a powerful means to represent nodes and edges with types, attributes, and composition constraints.

In software engineering, modeling is a basic tool used at all abstraction levels and during the whole software development process. Models and in particular

Application examples

The many applications of graph transformation in software engineering exploit the ability of modeling both static and dynamic aspects of diagrammatic representation, the possibility of reasoning about model evolution and the ability of supporting visual languages and their semantics.

In this section we present some examples of applications that exploit the different features of graph transformation. The examples represent applications in different fields and aim to indicate how graph

Academic and industrial impact

In the former chapter we sampled several applications of graph transformation that have been proposed in the last 15 years. The wide range of application fields and studies indicate that the scientific community believes in the possibility of overcoming the problems highlighted by Blostein et al. 15 years ago. Most of the work surveyed in the former chapter is still part of research projects, but there are some albeit few industrial success stories that indicate how graph transformation could

Conclusions

In this paper, we have analyzed the impact of graph transformation in industry and have indicated in the lack of a killer application the reasons for the still limited industrial success of graph transformation.

In a thorough paper of 15 years ago, Blostein et al. indicated education and technical problems as factors that hinder the industrial success of graph transformation. Although some of the key technical problems identified by Blostein et al., and in particular lack of modularization and

References (38)

  • J. Dolado et al.

    Formal manipulation of Forrester diagrams by graph grammars

    IEEE Transactions on Man and Cybernetics

    (1988)
  • H. Göttler, Graph grammars and diagram editing, in: Graph-Grammars and Their Application to Computer Science, Springer,...
  • H. Bunke

    Attributed programmed graph grammars and their application to schematic diagram interpretation

    IEEE Transactions on Pattern Analysis and Machine Intelligence

    (1982)
  • T. Dean et al.

    A syntactic theory of software architecture

    IEEE Transactions on Software Engineering

    (1995)
  • D.L. Métayer

    Describing software architecture styles using graph grammars

    IEEE Transactions on Software Engineering

    (1998)
  • M. Derk et al.

    Reconfiguration for fault tolerance using graph grammars

    ACM Transactions on Computer Systems

    (1998)
  • D. Blostein, H. Fahmy, A. Grbavec, Issues in the practical use of graph rewriting, in: Graph Grammars and Their...
  • G. Rozenberg et al.
    (1997)
  • A. Corradini et al.

    The category of typed graph grammars and its adjunctions with categories

  • Cited by (8)

    View all citing articles on Scopus

    This paper has been recommended for acceptance by Shi Kho Chang.

    View full text