
Executing and debugging UML models: an fUML extension Yoann Laurent, Reda Bendraou, Marie-Pierre Gervais To cite this version: Yoann Laurent, Reda Bendraou, Marie-Pierre Gervais. Executing and debugging UML models: an fUML extension. SAC’13 - The 28th Annual ACM Symposium on Applied Computing, Mar 2013, Coimbra, Portugal. pp.1095-1102, 10.1145/2480362.2480569. hal-01088175 HAL Id: hal-01088175 https://hal.archives-ouvertes.fr/hal-01088175 Submitted on 27 Nov 2014 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Executing and Debugging UML Models: an fUML extension Yoann Laurent Reda Bendraou Marie-Pierre Gervais LIP6 LIP6 LIP6 UPMC Paris Universitas UPMC Paris Universitas University of Paris Ouest France France Nanterre [email protected] [email protected] France marie- [email protected] ABSTRACT achieve such goal, modelers require not only precise and un- With the widespread of the Model-Driven Development (MDD) ambiguous languages for modeling both the structural and and surfing on the success of the Unified Modeling Language behavioral properties of the system but also the tooling sup- (UML), software development is shifting from being code- port for executing, testing and debugging these models. In centric to model-centric. Models become the key artefacts the current state of the art of modeling languages used in in the software development process. The success of the the industry, UML appears to be the de facto standard. project relies on the quality of these models. Early detection However in the actual UML specification, the operational of errors by debugging and testing these models is manda- semantics remains unclear, imprecise and ambiguous. The tory in order to reduce development cost, ensuring quality semantics is explained in natural language and dispersed and preventing rework at later stages. The fUML standard through the specification. Due to this fact, research and defines the precise semantics for executing a subset of UML commercial tools aiming to execute models have to do some models by defining a virtual machine. The models are then assumptions on the precise operational semantics. As a re- directly executed without transformation. However, the vir- sult, the same models may be executed differently from one tual machine is defined to execute the model as an atomic tool into another. action and does not fulfil the requirements for debugging it. To overcome this lack, the OMG released fUML 1.0 (Se- We highlight in this paper the limit of the current specifica- mantics of a Foundational Subset for Executable UML Mod- tion of fUML (v1.0) and propose an approach for extending els) [21], a new standard that precisely defines the execution the virtual machine with the key functionality that enables semantics for a subset of UML 2.3 in a form of an Execution debugging of fUML models. A working UML debugger pro- Model implemented in a virtual machine. However, in order totype has been implemented and the use and evaluation of to ensure the success of the development [14], models need to the approach are made on a case study. be verified at early stages of the development lifecycle. One way to do this is to simulate models by testing and debug- ging them. Although the simulation does not provide any Categories and Subject Descriptors formal proofs, it can significantly increase the confidence in D.2.5 [Software Engineering]: Testing and Debugging| the model, provide system understanding and give an early Debugging aids, Monitors direct experience with the system being designed [25]. More- over, Baker et al. [5] show in their case study a reduction Keywords of 30%-70% in the time needed to correctly fix bugs using model simulation. fUML, UML, Debugging, Testing, Execution Debugging is a methodical process of finding and reducing the number of bugs or defects in a program thus making it 1. INTRODUCTION behave as expected [26]. State of the art for software de- One major advantage of executable models is that once bugging, testing, and verification in the case of code-centric defined, they can be simulated, debugged and validated in development is well known in the community [12]. In the short incremental and iterative cycles. Thus, models will not case of model-centric development and without the addi- be considered anymore as a rough and abstract representa- tional step of transforming the model to code, only few works tion of the expected system's structure and behavior, but as address it [23, 17, 8, 7, 10]. However, they do not use the the system itself. This makes them a powerful asset in the fUML standard for the execution semantics. Nowadays pro- development of complex and critical systems. In order to gramming without debugging support seems to be inconceiv- able. Thus, since fUML is the standard for the execution of UML models, the idea of providing the fUML virtual ma- chine with a debugger comes quite naturally. However, the Permission to make digital or hard copies of all or part of this work for implementation of the fUML virtual machine is defined to personal or classroom use is granted without fee provided that copies are execute the model as an atomic action and does not allow not made or distributed for profit or commercial advantage and that copies any interaction with it. The only goal of the virtual ma- bear this notice and the full citation on the first page. To copy otherwise, to chine is to execute models in an automatic way, i.e. given a republish, to post on servers or to redistribute to lists, requires prior specific value for the inputs parameters of a behavior, the execution permission and/or a fee. SAC’13 March 18-22, 2013, Coimbra, Portugal. returns values for their outputs. The execution is neither Copyright 2013 ACM 978-1-4503-1656-9/13/03 ...$10.00. controllable nor observable in the current specification of fUML [19, 9]. By controllable, we mean that it is not pos- sible to pause and resume the execution. By observable, we mean that it is not possible to know what happens inside the execution (e.g., be aware when a sub-activity starts or when a variable is modified); monitoring of the execution is not available. Thus, it is not possible to build a debug- ger using the fUML virtual machine straightforwardly. In order to obtain a wider adoption of model execution in the industry, a tool based on a standard which provides correct debugging support is strongly needed. In this paper we present a critical analysis on the newly defined fUML standard and we address its lacks in terms of Figure 1: Regular call between semantic elements controllability and observability, key issues for model execu- tion and debug. An approach is proposed in order to extend the standard with the set of concepts and facilities required and consuming object or control tokens between the differ- to debug models. The paper is organised as follows. Section ent activity's constituents (i.e., Activity Nodes and Activity 2 presents the fUML standard and a critical analysis of the Edges). current specification. In Section 3, we propose an extension To illustrate this, Figure 1 shows a simple activity dia- of the fUML Execution Model enabling controllability and gram represented with one InitialNode, two Action nodes observability of the execution, and we detail the modifica- and an ActivityFinalNode. Each of these nodes are con- tions needed in order to incorporate the extension in the nected with a ControlFlow edge which represents that a Execution Model. Section 4 presents our implemented pro- node starts after the previous one is finished. The sequence totype allowing to test and debug models. The evaluation diagram shows the corresponding calls between the nodes in of the extension and the prototype is presented in Section 5. the Execution Model. The diagram is a simplified version Finally, related work is addressed in Section 6 and Section of what really happens during the execution and focuses on 7 concludes by sketching some future perspectives of this the interaction between elements. ActionActivation and work. ActivityEdgeInstance are the instantiation of the corre- sponding abstract syntax (see below for the explanation of 2. FUML the instantiation in the Execution Model using the visitor fUML is an OMG standard that precisely defines the ex- pattern). When the fUML virtual machine invokes this ac- ecution semantics of a subset of UML 2.3. The standard tivity, it starts by inserting a token in each InitialNode defines a basic virtual machine (in the form of pseudo Java- and other nodes with no inputs ControlFlow. Then, the code) enabling compliant fUML models (i.e., UML models nodes with a token (i.e., the InitialNode in our example) using only elements comprised in the fUML subset) to be fire (i.e., execute their own behavior) and sendOffer on each executed. It can be decomposed in three principle parts (i) of their outputs ControlFlow. The ControlFlow is then able the abstract syntax represented by a subset of UML, mainly to call on its target node A to receiveOffer. When the node composed by the Class Diagram and most of the Activity A receives an offer, if first checks if the prerequisites for its Diagram; (ii) the Execution Model which defines the exe- execution have been satisfied as determined by isReady, if cution semantics of the abstract syntax and (iii) the model yes, takes the offered tokens from inputs control flow and library which defines primitive types and behaviors.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages9 Page
-
File Size-