Systems, Views and Models of UML∗
Total Page:16
File Type:pdf, Size:1020Kb
Systems, Views and Models of UML∗ Ruth Breu, Radu Grosu, Franz Huber, Bernhard Rumpe, Wolfgang Schwerin email: {breur,grosu,huberf,rumpe,schwerin} @informatik.tu-muenchen.de Technische Universit¨atM¨unchen Arcisstr. 21 D-80290 M¨unchen, Germany Abstract In this paper we show by using the example of UML, how a soft- ware engineering method can benefit from an integrative mathemat- ical foundation. The mathematical foundation is given by a mathe- matical system model. This model provides the basis both for inte- grating the various description techniques of UML and for implement- ing methodical support. After describing the basic concepts of the system model, we give a short overview of the UML description tech- niques. Then we show how they fit into the system model framework and sketch an approach to structure the UML development process such that it provides methodological guidance for developers. 1 Introduction – Why Formalization? “The nice thing about graphical description techniques is that everyone un- derstands them, the bad thing, however, is that everyone understands them in a different way.” This often heard quote captures a main property of mod- eling techniques using semi-formal, mostly graphical notations, beginning with the early structured modeling techniques and prevalent until today’s object-oriented methods. The diagrammatic notations used here seem easily comprehensible for everyone dealing with software development. Experience ∗ This paper originates from the SysLab project, which is supported by the DFG under the Leibnizprogramme and by Siemens-Nixdorf. [BGH+98b] R. Breu, R. Grosu, F. Huber, B. Rumpe, W. Schwerin. Systems, Views and Models of UML. In: The Unified Modeling Language, Technical Aspects and Applications. Martin Schader, Axel Korthaus (eds.) Physica Verlag, Heidelberg. 1998. www.se-rwth.de/publications shows, however, that, except from obvious properties, these notations do in fact bear a great number of possible divergent interpretations. To gain a deeper and more exact understanding of the notations used, the need for providing a stringent formal foundation for them has long been recognized and has lead to considerable advances in the recent past. Many of these efforts aim at providing a formal semantics for single notations. Considering the different aspects of a system, described by different notations, captured in a system development process, providing isolated semantics, possibly even using diffent models as a basis, does not seem to be adequate. The complete description of such a system is given only by the assembly of all different views. It is therefore desirable to have a common semantic basis for all no- tations used in a development method. This allows both to provide an exact interpretation for diagrams in a single notation and to inter-relate diagrams in different notations on a common basis. The SysLab method (Breu et al. (1997)b) builds upon such an integrated semantic framework, which we call the System Model. The foundations and the basic mathematical concepts of this system model will be intro- duced in Section 2. The SysLab method, just like the Unified Method, is a view-oriented, integrated, and object-oriented development method. Its description techniques are deliberately similar to those used in the UML. Thus it seems worthwile to apply SysLab’s system model to the UML in order to embed its description techniques into the system model’s mathe- matical framework. What can be gained by this effort is, quite obviously, a deeper understanding of the single notations and, as outlined above, the possibility to more tightly intergrate the UML description techniques on a sound mathematical basis. The benefits hereof can be enormous, especially for tool developers, resp. tool vendors, and methodologists. Tool developers are enabled to provide a much larger set of precise consistency conditions than currently possible by using just the UML Meta Model which basically represents only the abstract syntax of UML’s description techniques. Us- ing the semantic properties of diagrams produced in different stages of a development project and their inter-relationships, transformation tools can be provided, which tranform, either automatically or with a human devel- oper’s assistance, documents from one notation into another. On this ba- sis, methodological guidelines for software developers can be elaborated and eventually implemented in CASE tools. The rest of the paper is organized as follows. In Section 2 we present the basic concepts of the SysLab system model and in Section 3 we give a brief overview of the UML description techniques. We then outline methodolog- ical aspects in Section 4, where we define general properties of a software development method and show how a development process using UML de- scription techniques can be structured and supported by a tool. Finally, an outlook on further steps in formalization and tool support is given in Section 5. 2 Models of Systems In general, a system is a technical or sociological structure consisting of a group of elements combined to form a whole and to work, function or move interdependently and harmoniously. A system model represents certain aspects of systems in a certain way, using certain concepts, e.g. OO-concepts, such as classification, encapsulation etc. One way to formulate system models is to use mathematical techniques (e.g. sets, functions, relations, predicates). This leads to the notion of mathematical system models. In the following we first motivate the use of a system model and then describe the one on which the SysLab method is based and which is also appropriate for UML. 2.1 Motivation of the System Model In the introduction we have motivated, why a formalization of UML descrip- tion techniques is useful. We argued that a precise semantics is important not only for the developer, but also for tool vendors, methodologists (people that create the method) and method experts (people that use the method and know it in detail). We get the following requirements for a formalization: 1. A formalization must be complete, but as abstract and understandable as possible. 2. The formalization of a heterogeneous set of description techniques has to be integrated to allow the definition of relations between them. This does not mean that every syntactical statement must have a formal meaning. Annotations or descriptions in prose are always necessary for documentation, although they do not have a formal translation. They may however eventually be translated into formal descriptions or even into code in the course of a software development process. As soon as one uses description techniques with a fixed syntax and semantics, one no longer describes systems in general but models of systems. Using UML, for example, one models systems in terms of objects, classes etc. To manage the complexity of formalization, we introduce a layer between the syntactic description techniques and pure mathematics as shown in Figure ??. This intermediate layer is the mathematical system model. On this layer, various aspects of systems such as structure, behavior and interaction are formulated by mathematical techniques. We call the representation of a system, formulated solely in terms of the system model, a model of a sys- tem. Furtheron, the set of all models that can be described in terms of a certain system model is called the universe of this system model. Figure ?? illustrates the ideas that are explained below. Sequence diagrams Class descriptions class Account ; owner :: string; amount :: Int; open(o::string, a::Int); credit(a::Int, rec::Account); debit(a::Int, d::Account); endclass State diagrams Class diagrams System Mo del Mathematics Formal F oundation La yered formalization of description tec hniques FigureFigure 1: Layered formalization of description techniques tec hniques oer syn tactical elemen ts that allo w the sp ecication DescriptionDescription techniques offer syntactical elements that allow the specification certain views ie certain asp ects of systems One way to dene a se ofof certain views, i.e., certain aspects, of systems. One way to define a se- tics is to express the meaning of syn tax in terms of a system mo del manmantics is to express the meaning of syntax in terms of a system model. a unique system mo del for a set of description tec hniques results in an UsingUsing a unique system model for a set of description techniques results in an tegrativ e seman tics for the dieren t tec hniques An in tegrativ e seman tics inintegrative semantics for the different techniques. An integrative semantics ws reasoning ab out in terrelations b et ween dieren t views expressed by alloallows reasoning about interrelations between different views expressed by t tec hniques Notions like renement consistency and completeness dierendifferent techniques. Notions like refinement, consistency and completeness b e precisely dened cancan be precisely defined. mathematic al system mo del pro vides terms with a formal seman tics eg AA mathematical system model provides terms with a formal semantics, e.g. and can therefore serv e as a basis for a formal seman tics for a set functionsfunctions, and can therefore serve as a basis for a formal semantics for a set description tec hniques ofof description techniques. the ab o ve denitions one can dene the seman tics of a do cument WithWith the above definitions, one can define the semantics of a document h is a kind of a mo dule on the syn tactical lev el of a giv en description whic(which is a kind of a module on the syntactical level) of a given description hnique as the set of all those mo dels that ha ve the prop erties that are tectechnique as the set of all those models, that have the properties that are in the do cumen t expressedexpressed in the document. a set of mo dels and not a single one as the basis of the prop osed UsingUsing a set of models and not a single one as the basis of the proposed tics has sev eral adv an tages For example renemen t of do cumen ts semansemantics has several advantages.