A Lightweight Platform for Experimenting with

0 downloads 0 Views 466KB Size Report
A Lightweight Platform for Experimenting with. Model Driven Development. Harald Störrle. FJA GmbH, München, GERMANY [email protected]. Abstract: This ...
A Lightweight Platform for Experimenting with Model Driven Development Harald St¨orrle FJA GmbH, M¨unchen, GERMANY [email protected]

Abstract: This paper presents an approach for experimenting with symbolic representations of and computations on UML models and similar artifacts occurring in the software life cycle. This way, reference implementations of model semantics may be provided, just as well as model transformations, interactive queries, code generation, translations from UML models into their formal semantics, and many more, thus increasing the understanding of Model Driven Development (MDD, see [OMG03b]). A Prolog-framework called Model Manipulation Toolkit (MoMaT) is implemented to support this approach. In this paper, its main ideas and some examples of its usage are described.

1

Motivation

The vision of software design automation has been with us for many years, under different labels, including Computer Aided Software Engineering (CASE), or more recently Borland’s software Delivery Optimization (SDO), or the OMG’s Model Driven Architecture (MDA, see [OMG03b]). The vision, however, remained unchanged. In other areas such as hardware design, similar approaches are standard by now (SPICE, VHDL). Recent efforts like Query-View-Transformation (QVT, see [QVT03]), and UML 2.0 (see [OMG03a]) have rekindled the hope that we are finally making some progress along the road to this vision for software as well (see [Sel03]). Currently, however, there are few tools for UML models1 that offer much functionality beyond editing. Some tools offer a little syntax and consistency checking, some provide a little bit of (static) code generation, and limited interactive visualisation of dynamic models. There are even some academic prototypes that offer some advanced functions based on model semantics, such as model checking the consistency between state machines and interactions, or code generation from state machines. However, all of these cover only a very limited amount of what is possible, individually and collectively. Many other interesting operations on models (cf. Figure 2) are not supported at all, poorly supported or not integrated with each other. For instance, genuine model-to-model trans1 Since UML is “the lingua franca of software engineering” (cf. [FR99, p. iv]), we equate “software model” and UML in the remainder, even if this is a stark simplification.

formations, model (fragment) generation, semantics-based model comparisons, measuring and querying of models and so on. Guided by practical and scientific experience, I firmly believe that the absence of tools with advanced semantics-based functionality does not indicate that such functionality is unwanted or not needed, but because there are many fundamental scientific and engineering questions that still need to be answered. For instance: • Which set of operations is really needed for practical purposes? Is the range defined by Figure 2 really complete? Are there operations we might not even know yet? • How should the semantics of these operations be defined? Do they interact? Would this change the definitions? • Should there be different sets of tools or variants of the same operations for different application contexts? If so, which? • What theoretical foundations are required? Is a formal semantics for (UML) models really necessary, if so which, for which parts, and how should it be defined? What degree of formalisation is the best, on what factors does it depend? Which semantic domains are the most suitable, for individual tasks or for integration of different models? • How can these operations on models be effectively automated? What tool architecture is the most appropriate? Can there be an exchange of modules implementing individual operations, and how can such an architecture be standardized? This list could be prolonged almost indefinitely, and it can be summed up in the slogan: we don’t know what to do with models.

2

Related work

There are plenty approaches that implement one or the other aspect of UML semantics, e.g., software design model modelcheckers like HUGO [KM02], vUML [LP99], or more recently TABU [EBBSCF04]. All of these focus on a single kind of operation, and do not support the integration of several operations, or queries, or transformations of models. Most of the approaches to model transformations, on the other hand are very much restricted to specifying transformations of class models into program code using graphical notations. Incidentally, some query facilities are included, but only as a prerequisite to extracting information for transformations. For instance, MOLA [KBC04], employs concepts from structured programming, while [SHU04] uses OCL-like expressions. [Old04] presents an XML/XSLT-based transformation approach, but remains in the same domain. The System Modeling Workbench [Por02] is an interactive framework for general operations on models. It provides a Python-based OCL-like language for operating on XMImodels. However, the user has to deal with the full complexity of XMI, which makes it

very difficult to modify and manipulate models, thus effectively hamstringing on-the-fly modifications as are needed for creative experimentation. In contrast to these approaches, MoMaT aims at providing a toolkit for experimentation with all kinds of operations. The idea is to support the exploration of the operations space rather than implement a single kind of operation. MoMaT may be seen as an implementation of QVT. In fact, it seems to be one of the first QVT-implementations, but has a significantly different focus than QVT.

3

Approach

This paper presents a platform for attacking this (kind of) question in an stepwise and experience-guided way by providing the Model Manipulation Toolkit (MoMaT) as a platform for experimenting with representations of and operations on models. Ideally, such experiments will help researchers to explore the whole range of operations, find interesting new operations, compare implementations of operations, and demonstrate the feasibility of the proposed solutions on real-world case studies. ARCD System

UML 2.0 Diagram

UML 2.0 Editor

XMI-Export