Supporting Tool Reuse with Model Transformation Zekai Demirezen, Yu Sun, Jeff Gray Department of Computer Science Univ. of Alabama at Birmingham Birmingham, AL, 35205, USA { zekzek, yusun, gray } @ cis.uab.edu Frédéric Jouault AtlanMod (INRIA & EMN) Nantes, France frederic.jouault@inria.fr Abstract Software components provide a wide range of functionality that can be used across several domains. In some cases, reuse at a very coarse level of granularity (e.g., reusing functionality provided within an existing tool) is desirable, but challenging to realize due to the interface boundaries of the tool and the unanticipated level of reuse. This paper describes our results in applying domain-specific modeling and model transformation to the tool reuse problem. Specifically, we describe our results in reusing the graphical layout functionality provided by one tool (called GraphViz) that does not exist natively in another tool, such as the Eclipse Graphical Modeling Framework. Keywords: Domain-Specific Modeling, Tool Interoperability, Model Transformation 1. INTRODUCTION Tools provide a wide range of functionality in the context of their domain. However, in some situations a tool may lack a specific desirable operation needed by a user. Other tools in the same domain may include these missing operations, or may provide an improved implementation of the specific desired functionality in a different context. This paper describes our results in reusing the functionality of an open source tool called GraphViz 1 to embed the layout functionality that we needed in Eclipse’s Graphical Modeling Framework (GMF) 2 [1] . We implemented an Eclipse plug-in that enables the execution of the GraphViz Layout algorithm during modeling operations in the GMF editors. The main challenge we encountered was how data could be exchanged between the tools. Because both GraphViz and GMF operate on their own unique data structures, we designed an exchange mechanism to adapt their diverse formats. The specific solution to these challenges involved the application of domain-specific modeling (DSM) and model transformation to specify each tool format and to convert between the representations. 1 http://www.graphviz.org/ 2 http://www.eclipse.org/modeling/gmf/ In tool interoperability, data exchange is accomplished over well-defined data structures and exchange formats [2]. However, different standards and formats make software interoperability a challenge. There are several existing approaches that can be adopted to realize tool interoperability. For example, a general approach that is based on traditional parsing and interpreting activities can be implemented with general-purpose programming languages (e.g., Java, C#). In addition, XML-based interoperability has emerged as a popular choice for a generic exchange format among software tools. However, although this works relatively well when all considered tools use some form of XML, it is not a convenient solution when being applied in other contexts (e.g., when context-free parsing is necessary to read from a proprietary file format). A new approach to interoperability, which is advocated in this paper, is based on domain-specific modeling and model transformation techniques, where the different formats are captured as: 1) abstract definitions of data structures (i.e., metamodels) and 2) concrete syntax definitions (e.g., context-free, XML), and finally 3) transformation rules mapping from one representation to another. The majority of tool interoperability research has focused on the data exchange aspect of integration [3], [4], [5]. In fact, we recently investigated this type of tool interoperability by applying domain-specific modeling to enable sharing of information between a set of code clone tools [6]. The sharing of information among similar tools enables intellectual assets to form a homogenized collection of information. Although this issue of tool interoperability is important, there are other cases of interoperability that can yield additional benefit. In particular, the concept of sharing functionality (as an alternative to sharing just date) between tools can enable a tool chain whereby features not available in one tool can be realized through collaboration with other tools. The challenge of such sharing of functionality is generally twofold: 1) transforming the representation of a source tool into that expected by the target tool providing the desired functionality; 2) transforming the result back to the first tool (or possibly to a third one). This is challenging because reuse at such a coarse level of granularity transcends the boundaries of the tools in a way that was likely not anticipated when each tool was designed.