Generating Instance Graphs from Class Diagrams with Adaptive Star Grammars

Authors

  • Berthold Hoffmann Universität Bremen & DFKI Bremen
  • Mark Minas Universität der Bundeswehr München

DOI:

https://doi.org/10.14279/tuj.eceasst.39.650

Abstract

In model-driven software engineering, class diagrams are used to define the structure of object-oriented software and valid object configurations, i.e., what objects may occur in a program and how they are related. Object configurations are essentially graphs, so that class diagrams define graph languages. Class diagrams are declarative, i.e., it is quite easy to check whether a graph is an instance of a class diagram. Graph grammars, on the other hand, define a graph language by derivation and are thus well suited for constructing instance graphs. This paper describes how a class diagram can be translated into a graph grammar that defines the same graph language as the original class diagram. Such a graph grammar may then be used for, e.g., automatically generating valid object configurations as test cases. In contrast to earlier attempts, the presented approach allows to translate class diagrams with arbitrary multiplicities, unique and non-unique associations, composition associations, class generalization, association subsetting and redefinition. This is made possible by using adaptive star grammars, a special kind of graph grammars.

Downloads

Published

2011-09-20

How to Cite

[1]
B. Hoffmann and M. Minas, “Generating Instance Graphs from Class Diagrams with Adaptive Star Grammars”, eceasst, vol. 39, Sep. 2011.