A precise approach to validating UML models and OCL constraints

The Unified Modeling Language (UML) is a widely accepted standard for modeling software systems. The UML supports object-oriented approaches to software development with a rich set of modeling concepts. The graphical notation of UML includes diagrams such as use case diagrams, class diagrams, state diagrams and sequence diagrams. These are used for describing static as well as dynamic aspects of a system. An important part of UML is the Object Constraint Language (OCL) – a textual language that allows to specify additional constraints on models in a more precise and concise way than it is possible to do with diagrams only. While UML offers a rich set of concepts and diagrams, it is still an unsolved problem what the precise meaning of a model and associated constraints is. A number of problems related to under-specified constructs, ambiguities and contradictions have already been identified in the past. In our view, it is important to have a precise semantics of UML models and OCL constraints. Precise foundations are needed for analysis, validation, verification, and transformation (such as refinement and code generation) of models. They are also a prerequisite for providing tools with a well-defined and predictable behavior. We present a precise approach that allows an analysis and validation of UML models and OCL constraints. We focus on models and constraints specified in the analysis and early design stage of a software development process. For this purpose, a suitable subset of UML corresponding to information that is usually represented in class diagrams is identified and formally defined. This basic modeling language provides a context for all OCL constraints. We define a formal syntax and semantics of OCL types, operations, expressions, invariants, and pre-/postconditions. We also give solutions for problems with the current OCL definition and discuss possible extensions. A metamodel for OCL is introduced that defines the abstract syntax of OCL expressions and the structure of types and values. The metamodel approach allows a seamless integration with the UML metamodeling architecture and makes the benefits of a precise OCL definition easier accessible. The OCL metamodel also allows to define context-sensitive conditions for well-formed OCL expressions more precisely. These conditions can now be specified with OCL whereas they previously were specified only informally. In order to demonstrate the practical applicability of our work, we have realized substantial parts of it in a tool supporting the validation of models and constraints. Design specifications can be “executed” and animated thus providing early feedback in an iterative development process. Our approach offers novel ways for checking user data against specifications, for automating test procedures, and for checking CASE tools for standards conformance. Therefore, this work contributes to the goal of improving the overall quality of software systems by combining theoretical and practical techniques.

[1]  Catriel Beeri,et al.  A Formal Approach to Object-Oriented Databases , 1990, Data Knowl. Eng..

[2]  Gerti Kappel,et al.  UML at Work - von der Analyse zur Realisierung (2. Aufl.) , 1999 .

[3]  Bernhard Rumpe,et al.  UML Semantics FAQ , 1999, ECOOP Workshops.

[4]  Jean Bézivin,et al.  The unified modeling language : 《UML》 '98 : beyond the notation : First International Workshop, Mulhouse, France, June 3-4, 1998 : selected papers , 1999 .

[5]  Daniel Jackson,et al.  Alcoa: the Alloy constraint analyzer , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[6]  Reiko Heckel,et al.  Dynamic Meta Modeling: A Graphical Approach to the Operational Semantics of Behavioral Diagrams in UML , 2000, UML.

[7]  Jan Øyvind Aagedal,et al.  Towards an ODP-Compliant Object Definition Language with QoS-Support , 1998, IDMS.

[8]  Sophie Dupuy,et al.  A Multi-formalism Approach for the Validation of UML Models , 2000 .

[9]  Martin Gogolla,et al.  A Web-based Animator for Object Specifications in a Persistent Environment , 1997, TAPSOFT.

[10]  Amílcar Sernadas,et al.  Object-Oriented Design of Information Systems: Theoretical Foundations , 1993, CISM - Advances in Database Systems.

[11]  Ali Hamie Enhancing the Object Constraint Language for more expressive specifications , 1999, Proceedings Sixth Asia Pacific Software Engineering Conference (ASPEC'99) (Cat. No.PR00509).

[12]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[13]  Martin Gogolla,et al.  Validating UML Models and OCL Constraints , 2000, UML.

[14]  Martin Gogolla,et al.  An Object Specification Language Implementation with Web User Interface based on Tycoon , 1996 .

[15]  Martin Gogolla,et al.  Towards a semantic view of an extended entity-relationship model , 1991, TODS.

[16]  Bernhard Rumpe,et al.  «UML»’99 — The Unified Modeling Language , 2003, Lecture Notes in Computer Science.

[17]  Gabriele Taentzer,et al.  Consistency Checking and Visualization of OCL Constraints , 2000, UML.

[18]  Martin Wirsing,et al.  Correct Realization of Interface Constraints with OCL , 1999, UML.

[19]  Bernhard Rumpe,et al.  Defining UML family members using prefaces , 1999, Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 32.

[20]  Martin Gogolla,et al.  A UML Semantics FAQ: The View from Bremen , 1999 .

[21]  Martin Gogolla,et al.  On Formalizing the UML Object Constraint Language OCL , 1998, ER.

[22]  William E. Lorensen,et al.  Object-Oriented Modeling and Design , 1991, TOOLS.

[23]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[24]  李幼升,et al.  Ph , 1989 .

[25]  Martin Gogolla,et al.  A Metamodel for OCL , 1999, UML.

[26]  Shane Sendall,et al.  From Use Cases to System Operation Specifications , 2000, UML.

[27]  Bran Selic,et al.  Experience with Formal Specification of CMM and UML , 1997, ECOOP Workshops.

[28]  Stuart Kent,et al.  Interpreting the object constraint language , 1998, Proceedings 1998 Asia Pacific Software Engineering Conference (Cat. No.98EX240).

[29]  Martin Schader,et al.  The Unified Modeling Language: Technical Aspects and Applications , 1999 .

[30]  Uwe Schöning Algorithmen - kurz gefasst , 1997, Hochschultaschenbuch.

[31]  Daniel Jackson,et al.  Some Shortcomings of OCL, the Object Constraint Language of UML , 2000, TOOLS.

[32]  Luis Mandel,et al.  On the Expressive Power of OCL , 1999, World Congress on Formal Methods.

[33]  Gunnar Övergaard,et al.  A Formal Approach to Use Cases and Their Relationships , 1998, UML.

[34]  Martin Gogolla,et al.  On better understanding UML diagrams through interactive three-dimensional visualization and animation , 2000, AVI '00.

[35]  Grzegorz Rozenberg,et al.  Handbook of Graph Grammars and Computing by Graph Transformations, Volume 1: Foundations , 1997 .

[36]  Martin Gogolla,et al.  Towards Reliable Information Systems: The KorSo Approach , 1993, CAiSE.

[37]  Bernhard Rumpe,et al.  Towards a Formalization of the Unified Modeling Language , 1997, ECOOP.

[38]  Grady Booch,et al.  Object-Oriented Analysis and Design with Applications , 1990 .

[39]  David A. Wolfram,et al.  On Types and FOOPS , 1990, DS-4.

[40]  Michael R. Blaha,et al.  Object-Oriented Modeling and Design for Database Applications , 1997 .

[41]  Jean Bézivin,et al.  The Unified Modeling Language. «UML»’98: Beyond the Notation , 1998, Lecture Notes in Computer Science.

[42]  Jacob Stein,et al.  The GemStone object database management system , 1991, CACM.

[43]  Richard Mitchell,et al.  Defining the Context of OCL Expressions , 1999, UML.

[44]  Andy Evans,et al.  The Metamodelling Language Calculus: Foundation Semantics for UML , 2001, FASE.

[45]  Bernhard Rumpe,et al.  Modeling Languages: Syntax, Semantics and All That Stuff, Part I: The Basic Stuff , 2000 .

[46]  Hartmut Ehrig,et al.  Consistency analysis of UML class and se-quence diagrams using attributed graph grammars , 2000 .

[47]  Simone Pribbenow What's a Part? On Formalizing Part-Whole Relations , 1997, Foundations of Computer Science: Potential - Theory - Cognition.

[48]  Peter H. Schmitt,et al.  Entwurfsmustergesteuerte Erzeugung von OCL-Constraints , 2000, GI Jahrestagung.

[49]  Amílcar Sernadas,et al.  Constructing Systems as Object Communities , 1993, TAPSOFT.

[50]  Tony Clark Type Checking UML Static Diagrams , 1999, UML.

[51]  O. Deux,et al.  The O2 system , 1991 .

[52]  David Harel,et al.  Statecharts: A Visual Formalism for Complex Systems , 1987, Sci. Comput. Program..

[53]  Ivar Jacobson,et al.  The Unified Modeling Language User Guide , 1998, J. Database Manag..

[54]  Stefan Conrad,et al.  Temporal OCL Meeting Specification Demands for Business Components , 2001, Unified Modeling Language: Systems Analysis, Design and Development Issues.

[55]  Martin Gogolla,et al.  On Constraints and Queries in UML , 1997, UML Workshop.

[56]  Stephen Morris,et al.  UML: an evaluation of the visual syntax of the language , 2001, Proceedings of the 34th Annual Hawaii International Conference on System Sciences.

[57]  Martin Gogolla,et al.  Towards Three-Dimensional Animation of UML Diagrams , 1999, UML.

[58]  Stuart Kent,et al.  Three dimensional software modelling , 1998, Proceedings of the 20th International Conference on Software Engineering.

[59]  Ramez Elmasri,et al.  The Category Concept: An Extension to the Entity-Relationship Model , 1985, Data Knowl. Eng..

[60]  Steve Cook The UML family: Profiles, Prefaces and Packages , 2000, UML.

[61]  Nicola Guarino,et al.  Dwq : Esprit Long Term Research Project, No 22469 Part-whole Relations in Object-centered Systems: an Overview Part-whole Relations in Object-centered Systems: an Overview , 2022 .

[62]  Martin Gogolla,et al.  The Whole-Part Relationship in the Unified Modeling Language: A New Approach , 2001, Unified Modeling Language: Systems Analysis, Design and Development Issues.

[63]  Bernhard Rumpe,et al.  The Amsterdam Manifesto on OCL , 2014, Object Modeling with the OCL.

[64]  Renate Motschnig-Pitrik Analyzing the notions of attribute, aggregate, part and member in data/knowledge modeling , 1996 .

[65]  Brian Henderson-Sellers,et al.  Black and White Diamonds , 1999, UML.

[66]  R. G. G. Cattell,et al.  Recent books , 2000, IEEE Spectrum.

[67]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[68]  Toby J. Teorey,et al.  The ORAC Model: A Unified View of Data Abstraction , 1991, ER.

[69]  Simon Thompson,et al.  Haskell: The Craft of Functional Programming , 1996 .

[70]  Laura M. Haas,et al.  PESTO : An Integrated Query/Browser for Object Databases , 1996, VLDB.

[71]  Stefano Spaccapietra,et al.  Complex Objects Modeling: An Entity-Relationship-Approach , 1987, NF².

[72]  Ivar Jacobson,et al.  The Unified Software Development Process , 1999 .

[73]  Martin Gogolla Graph Transformations on the UML Metamodel , 2000, ICALP Satellite Workshops.

[74]  Erich J. Neuhold,et al.  A Data Type Approach to the Entity-Relationship Approach , 1979, ER.

[75]  Bran Selic,et al.  UML 2000 - The Unified Modeling Language. Advancing the Standard: Third International Conference York, UK, October 2-6, 2000 Proceedings , 2000 .

[76]  Martin Gogolla,et al.  Equivalence Rules for UML Class Diagrams , 1998 .

[77]  Jack A. Orenstein,et al.  The ObjectStore database system , 1991, CACM.

[78]  C. J. Date An introduction to database systems: vol. I (4th ed.) , 1986 .

[79]  Maria M. Larrondo-Petrie,et al.  Exploring the semantics of UML type structures with Z , 1997 .

[80]  Philippe Collet,et al.  Towards efficient support for executing the Object Constraint Language , 1999, Proceedings of Technology of Object-Oriented Languages and Systems - TOOLS 30 (Cat. No.PR00278).

[81]  Heinrich Hußmann,et al.  Modular architecture for a toolset supporting OCL , 2000, Sci. Comput. Program..

[82]  Marc Bodenmuller The OCL Metamodel and the UML_OCL package , 2000 .

[83]  John Daniels,et al.  Designing Object Systems , 1994 .

[84]  Anneke Kleppe,et al.  Informal Formality? The Object Constraint Language and Its Application in the UML Metamodel , 1998, UML.

[85]  Anneke Kleppe,et al.  Extending OCL to include Actions , 2000, UML.

[86]  Anneke Kleppe,et al.  The object constraint language: precise modeling with UML , 1998 .

[87]  Maurizio Lenzerini,et al.  INCOD: A System for Conceptual Design of Data and Transactions in the Entity-Relationship Model , 1981, ER.

[88]  Brian Henderson-Sellers,et al.  Object-oriented metrics: measures of complexity , 1995 .

[89]  Martin Gogolla,et al.  A Web-based animator for validating object specifications , 1997, Proceedings of the 1997 International Database Engineering and Applications Symposium (Cat. No.97TB100166).

[90]  Stuart Kent,et al.  Navigation Expresion in Object-Oriented Modelling , 1998, FASE.

[91]  Bernhard Rumpe,et al.  Towards a Precise Semantics for Object-Oriented Modeling Techniques , 1997, ECOOP Workshops.

[92]  Martin Gogolla,et al.  On combining semiformal and formal object specification techniques , 1997, WADT.

[93]  J. D. Uiiman,et al.  Principles of Database Systems , 2004, PODS 2004.

[94]  Thomas Baar,et al.  An Integrated Metamodel for OCL Types , 2000 .

[95]  Stuart Kent,et al.  Reflections on the Object Constraint Language , 1998, UML.

[96]  Rudolf Herzig Zur Spezifikation von Objektgesellschaften mit TROLL light , 1995 .

[97]  Ivar Jacobson,et al.  Object-oriented software engineering - a use case driven approach , 1993, TOOLS.

[98]  Garry D. Coleman,et al.  Advancing the Standard , 1999 .

[99]  Kendall Scott,et al.  UML distilled - applying the standard object modeling language , 1997 .

[100]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[101]  Darmalingum Muthiayen,et al.  Real-time reactive system development: a formal approach based on uml and pvs , 2000 .

[102]  K Lano,et al.  Making Uml Precise , 1998 .

[103]  Ramez Elmasri,et al.  Fundamentals of Database Systems , 1989 .

[104]  Gunnar Övergaard,et al.  Formal specification of object-oriented modelling concepts , 2000 .

[105]  Martin Gogolla,et al.  A Semantics for OCL Pre- and Postconditions , 2000 .

[106]  Martin Gogolla,et al.  UML for the Impatient , 1998 .

[107]  O. Deux,et al.  The O2 system , 1991 .

[108]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[109]  Robin W. Whitty Object-oriented metrics: an annotated bibliography , 1996, SIGP.

[110]  Hartmut Ehrig,et al.  Generic Description, Behavior and Animation of Visual Modeling Languages , 2001 .

[111]  Martin Gogolla,et al.  Transformation Rules for UML Class Diagrams , 1998, UML.

[112]  Ian Oliver 'Executing' the OCL , 1999, ECOOP Workshop for PhD Students in OO Systems.

[113]  Antero Taivalsaari,et al.  On the notion of inheritance , 1996, CSUR.

[114]  Ivar Jacobson,et al.  The unified modeling language reference manual , 2010 .

[115]  Brian Henderson-Sellers,et al.  Object metamodelling of the Whole-Part relationship , 1999, Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 32.

[116]  S. Kent,et al.  Validation of object oriented models using animation , 1999, Proceedings 25th EUROMICRO Conference. Informatics: Theory and Practice for the New Millennium.

[117]  Desmond D'Souza,et al.  Objects, Components, and Frameworks with UML: The Catalysis Approach , 1998 .

[118]  Andy Schürr,et al.  Formal Definition of UML's Package Concept , 1997, UML Workshop.

[119]  Joost-Pieter Katoen,et al.  On a Temporal Logic for Object-Based Systems , 2000, FMOODS.

[120]  Martin Gogolla,et al.  An Extended Entity-Relationship Model: Fundamentals and Pragmatics , 1994 .

[121]  Kevin Lano,et al.  Formalising the UML in Structured Temporal Theories , 1999, Behavioral Specifications of Businesses and Systems.