UML is still inconsistent!

Similar documents
Electronic Communications of the EASST Volume 36 (2010) Proceedings of the Workshop on OCL and Textual Modelling (OCL 2010)

OCLLib, OCLUnit, OCLDoc: Pragmatic Extensions for the Object Constraint Language by Examples

Tool Supported OCL Refactoring Catalogue

Static analysis and testing of executable DSL specification

24. Framework Documentation

Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support

On the Use of an Internal DSL for Enriching EMF Models

A Pratical Application of the Object Constraint Language OCL

First Steps Towards Conceptual Schema Testing

Towards Transformation of Integrity Constraints and Database States

WAY OF WORKING TRANSFORMATION TO INTEGRATED MODEL DRIVEN DEVELOPMENT (MDD) AND MODEL- BASED TESTING (MBT)

Report on the Aachen OCL Meeting

Ontology-based Model Transformation

Unified Modeling Language 2

Automation of Semantic Web based Digital Library using Unified Modeling Language Minal Bhise 1 1

A Traceability-Driven Approach to Model Transformation Testing

Metamodeling with Metamodels. Using. UML/MOF including OCL

OCL. Heinrich Hussmann, Birgit Demuth, and Frank Finger. Dresden University of Technology, Department of Computer Science

A UML 2 Profile for Variability Models and their Dependency to Business Processes

SysML Past, Present, and Future. J.D. Baker Sparx Systems Ambassador Sparx Systems Pty Ltd

Design and Prototypical Implementation of a Pivot Model as Exchange Format for Models and Metamodels in a QVT/OCL Development Environment

Research Paper on Implementation of OCL Constraints in JAVA

UML Aspect Specification Using Role Models

Computation Independent Model (CIM): Platform Independent Model (PIM): Platform Specific Model (PSM): Implementation Specific Model (ISM):

UML 2.5: Specification Simplification

(An Example for) Metamodeling Syntax and Semantics of Two Languages, their Transformation, and a Correctness Criterion

CONSTRAINT SPECIFICATIONS USING PATTERNS IN OCL

Modular architecture for a toolset supporting OCL

Chapter 7. Modular Refactoring. 7.1 Introduction to Modular Refactoring

MERGING BUSINESS VOCABULARIES AND RULES

Improving the Definition of UML

2 nd UML 2 Semantics Symposium: Formal Semantics for UML

Modelling in Enterprise Architecture. MSc Business Information Systems

Experimenting with Multi-Level Models in a Two-Level Modeling Tool

The Implications of Optimality Results for Incremental Model Synchronization for TGGs Holger Giese, Stephan Hildebrandt

Static Safety Analysis of UML Action Semantics for Critical Systems Development

OCL Implementing the Standard for Multiple Metamodels

Supporting Modeling in the Large in Fujaba

Runtime Variability Management for Energy-Efficient Software by Contract Negotiation

Two Basic Correctness Properties for ATL Transformations: Executability and Coverage

Analyzing Robustness of UML State Machines

Outline. A little history. Outline. The Unified Modeling Language Opportunities and Challenges for Formal Methods

Static program checking and verification

OCL Support in MOF Repositories

SOFTWARE QUALITY. MADE IN GERMANY.

A Metamodel-Based OCL-Compiler for UML and MOF

VARIABILITY MODELING FOR CUSTOMIZABLE SAAS APPLICATIONS

Dresden OCL2 in MOFLON

Testing-Based Conceptual Schema Validation in a Model- Driven Environment

Plan. Language engineering and Domain Specific Languages. Language designer defines syntax. How to define language

The UML Extension Mechanisms

Metamodeling directed relationships in UML

Capturing and Formalizing SAF Availability Management Framework Configuration Requirements

The TTC 2011 Reengineering Challenge Using MOLA and Higher-Order Transformations

Checking UML and OCL Model Behavior with Filmstripping and Classifying Terms

Object-Oriented Theories for Model Driven Architecture

On Using UML Profiles in ATL Transformations

Sequence Diagram Generation with Model Transformation Technology

challenges in domain-specific modeling raphaël mannadiar august 27, 2009

Sketch-based Metamodel Construction. Research Internship II Lucas Heer

A feedback technique for unsatisfiable UML/OCL class diagrams

Formal Specification of Software Systems

Leveraging DTrace for runtime verification

LOOSE SEMANTICS FOR UML/OCL Heinrich Hussmann Fakultät für Informatik, Technische Universität Dresden, Germany

Process DSL Transformation by Mappings Using Virtual Functional Views

Knowledge Centric Systems Engineering

Models versus Ontologies - What's the Difference and where does it Matter?

Software Testing and Maintenance 1. Introduction Product & Version Space Interplay of Product and Version Space Intensional Versioning Conclusion

A Generic Framework for Realizing Semantic Model Differencing Operators

CODE GENERATION OF CONTRACTS USING OCL TOOLS

PisaTel Meeting Roma, 29 novembre 2007

Tokens, Expressions and Control Structures

Runtime Models as Interfaces for Adapting Software Systems

Developing Web-Based Applications Using Model Driven Architecture and Domain Specific Languages

Part II Black-Box Composition Systems 10. Business Components in a Component-Based Development Process

Synthesizing Communication Middleware from Explicit Connectors in Component Based Distributed Architectures

Lesson 5 Web Service Interface Definition (Part II)

Guiding System Modelers in Multi View Environments: A Domain Engineering Approach

Module 2 - Part 2 DATA TYPES AND EXPRESSIONS 1/15/19 CSE 1321 MODULE 2 1

Electronic Communications of the EASST Volume 44 (2011) Proceedings of the Workshop on OCL and Textual Modelling (OCL 2011)

A Flexible Approach for Validating ı Models

COP 3014: Fall Final Study Guide. December 5, You will have an opportunity to earn 15 extra credit points.

Language engineering and Domain Specific Languages

MODEL VERSIONING IN CONTEXT OF LIVING MODELS

OCL for the Specification of Model Transformation Contracts

Auto-Generating Test Sequences for Web Applications *

The Specifications Exchange Service of an RM-ODP Framework

UML big picture. Perdita Stevens. School of Informatics University of Edinburgh

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

Formal Foundations of Software Engineering

Handling Integer Arithmetic in the Verification of Java Programs

Teaching Model Views with UML and OCL

Local search-based pattern matching features in EMF-IncQuery

Heavyweight extensions to the UML metamodel to describe the C3 architectural style Abstract Keywords 2. Strategies to extend UML 1.

Electronic Communications of the EASST Volume 5 (2006)

Unit Testing of Model to Text Transformations

A UML 2 Profile for Variability Models and their Dependency to Business Processes

Requirements and Design Overview

Transformational Design with

The Road to UML Virtual Machines

Transcription:

Department of Computer Science Institute for Software and Multimedia Engineering, Software Technology Group UML is still inconsistent! How to improve OCL Constraints in the UML 2.3 Superstructure Claas Wilke and Birgit Demuth OCL 2011 Zurich, June 29 th 2011

Motivation OCL usage within the UML specification Definition of constraints Definition of addititonal operations When UML was originally specified, no OCL tooling existed OCL rules where specified manually ( by hand ) No checks of syntax and static semantics Investigations on UML/OCL inconsistency UML 2.0: 361 errors in 246 OCL rules [BGG04] UML 1.5: 450 errors [FQL+03] UML 1.3: 39 errors in 71 OCL rules [RG00] This work Today s situation (UML 2.3)? How can similar problems avoided for future specifications? Zurich, June 29th 2011 UML is still inconsistent! Slide 2

Methodology (1/2) copy / paste errors / warnings UML 2.3 Superstructure import Dresden OCL Parser/Editor manual investigation / modification / classification MDT UML 2.3 Metamodel Project online at http://www.dresden-ocl.org/index.php/dresdenocl:wfrsinuml Zurich, June 29th 2011 UML is still inconsistent! Slide 3

Methodology (2/2) Only OCL expressions from constraints sections investigated Additional operations (body expressions) ignored Context declarations were added manually Textual constraints were counted Neither transformed into OCL Nor checked if that is possible at all Erroneous constraints were fixed where possible Same error occuring multiple times in one constraint Counted as one error Zurich, June 29th 2011 UML is still inconsistent! Slide 4

Results General Statistics 46.8% of all constraints have no OCL semantics! 48.5% of all OCL rules are erroneous! Zurich, June 29th 2011 UML is still inconsistent! Slide 5

Results Different Types of Errors Total: 320 errors Classified into 14 types of five categories Zurich, June 29th 2011 UML is still inconsistent! Slide 6

Results Syntactical Errors 1. Typing Errors 15 (6.4 %) 2. Brackets 27 (11.5 %) 3. Wrong Ifs 8 (3.4 %) 4. Missing Escape 14 (6.0 %) 5. Wrong use of # 6 (2.6 %) 6. Wrong use of ->/. 9 (3.8 %) Zurich, June 29th 2011 UML is still inconsistent! Slide 7

Results Minor Inconsistencies 1. Wrong NamedElement Referred 62 (26.4 %) 2. Operation vs. Property Call 9 (3.8 %) Zurich, June 29th 2011 UML is still inconsistent! Slide 8

Results Type Checking Errors 1. Result Type 20 (8.5 %) 3. Missing asset() 15 (6.4 %) 2. Wrong Iterator 4 (1.7 %) 4. Missing asorderedset() 9 (3.8 %) Zurich, June 29th 2011 UML is still inconsistent! Slide 9

Results Evolution Errors 1. Enumeration Literals 54 (23.0 %) 2. Set{} vs. null 16 (6.8 %) Zurich, June 29th 2011 UML is still inconsistent! Slide 10

Results Implicit Conversions 1. Implicit asset 94 2. Implicit collect 18 Zurich, June 29th 2011 UML is still inconsistent! Slide 11

Lessons Learnt The OCL rule quality has not been improved since [BBG04]! The current specification approach is insufficient 1. No syntactical checks 2. No static semantics checks 3. No dynamic semantic checks 4. No Support for UML/OCL coevolution Proposed specification improvements 1. Model-Based Specification process 2. Elucidative Specification 3. Use of OCL unit testing 4. Use of UML/OCL coevolution tools Proposed OCL improvements 1. Removal of -> operator 2. Avoidance of implicit conversions 3. Introduction of selectbykind() Zurich, June 29th 2011 UML is still inconsistent! Slide 12

Possible Improvements Elucidative Specification [WBS+11] Zurich, June 29th 2011 UML is still inconsistent! Slide 13

Possible Improvements Removal of the -> operator The -> operator for collection operations is irritating Even authors of UML do not know how to use it Using wrong operators is dangerous Different semantics Unnecessary conversions Use. for collection operations as well Zurich, June 29th 2011 UML is still inconsistent! Slide 14

Possible Improvements Avoid implicit asset and implicit collect Implicit conversions often occur unforeseen Dangerous and unnecessary combinations possible They should be avoided, if not forbidden Zurich, June 29th 2011 UML is still inconsistent! Slide 15

Summary Investigation of OCL rules defined in UML 53.2 constraints do not define any OCL rules 48.5% of all OCL rules contain errors Many errors could be avoided Improved specification process Modifications of the OCL Future Work Do other specifications have the same problems? Are proposed improvements applicable How did existing UML implementations solved the OCL errors? Zurich, June 29th 2011 UML is still inconsistent! Slide 16

Literature (1/2) [BGG04] H. Bauerdick, M. Gogolla, F. Gutsche. Detecting OCL Traps in the UML 2.0 Superstructure: An Experience Report. In: UML 2004 - The Unified Modeling Language. LNCS 3273, pp. 188-196. Springer Berlin / Heidelberg, 2004. [FQL+03] J. Fuentes, V. Quintana, J. Llorens, G. Genova, R. Prieto-Daz. Errors in the UML metamodel? ACM SIGSOFT Software Engineering Notes 28(6), 2003. [RG00] M. Richters, M. Gogolla. Validating UML Models and OCL Constraints. In: Proceedings of the 3rd international conference on The unified modeling language: advancing the standard, pp. 265-277. Springer Berlin / Heidelberg, 2000. [CO09] J. Chimiak-Opoka. OCLLib, OCLUnit, OCLDoc: Pragmatic Extensions for the Object Constraint Language. In: Model Driven Engineering Languages and Systems. LNCS 5795, pp. 665 669. Springer Berlin / Heidelberg, 2009. Zurich, June 29th 2011 UML is still inconsistent! Slide 17

Literature (2/2) [HG10] L. Hamann, M. Gogolla. Improving Model Quality by Validating Constraints with Model Unit Tests. In: Proceedings of the Models Workshop on Model-Driven Enginering, Verification and Validation (MoDeVVa2010). 2010. [WBS+11] C. Wilke, A. Bartho, J. Schroeter, S. Karol, U. Aßmann. Elucidative Specification of the Unified Modeling Language. Submitted for the ACM/IEEE 14th International Conference on Model Driven Engineering Languages and Systems (MODELS 2011), Wellington, New Zealand, October 16-21, 2011. Zurich, June 29th 2011 UML is still inconsistent! Slide 18

Thank you! Dresden OCL http://www.dresden-ocl.org/ Software Technology Group http://st.inf.tu-dresden.de/ QualiTune http://www. qualitune.org/ claas.wilke@tu-dresden.de Zurich, June 29th 2011 UML is still inconsistent! Slide 19

Backup Zurich, June 29th 2011 UML is still inconsistent! Slide 20

Results OCL Rule Complexity (structure) Most OCL rules are rather simple Zurich, June 29th 2011 UML is still inconsistent! Slide 21

Possible Improvements OCL Unit Testing Testing OCL constraints is sensible Do they constrain what they shall constrain? Checks for runtime errors (invalid values) E.g., division by zero OCL testing facilities exist [CO09], [HG10] Unit tests could be deployed together with the specification Regression/acceptance tests for UML case tools Zurich, June 29th 2011 UML is still inconsistent! Slide 22

Possible Improvements Introduction of selectbykind iterator A select is often followed by a cast Filter Cast Requires two iterations overhead Introduction of a selectbykind iterator Only one iteration remaining And even more readable Zurich, June 29th 2011 UML is still inconsistent! Slide 23