Pópulo: A Tool for Debugging UML Models
∗
Lidia Fuentes
Dpto. Lenguajes y Ciencias de la Computación Universidad de Málaga (Spain)
[email protected]
Jorge Manrique
Dpto. Lenguajes y Ciencias de la Computación Universidad de Málaga (Spain)
[email protected]
ABSTRACT
[email protected]
precise behaviour of a system. Tools such as Rhapsody or visualState are currently able to execute UML models. Nevertheless, no currently available tool is able to directly interpret the UML action language, which creates tool-interoperability and extensibility problems. Models of new development paradigms, such as aspect-oriented models, require the extension of the UML action language [3] and, consequently, they also need to extend the tools that interpret the UML models in order to ensure they are able to execute the new (extended) actions correctly. This is not currently possible, since the UML tools available are often proprietary and their extension mechanisms, when available, are generally not enough (cf. [3]). In order to overcome this limitation, this paper presents P´ opulo, a UML model debugger, whose main characteristics are:
Model-Driven Development (MDD) has made models firstclass citizens of the software development process. Thus, a key factor for the successful adoption of MDD techniques is the ability to verify models, which can be achieved by model simulation and testing. This is already a reality for UML models, due mainly to the UML action language. However, at the current time, there are currently no tools available which are fully compliant with the UML action language. This leads to tool-interoperability and extensibility problems. In order to overcome this limitation, this paper presents P´ opulo, a UML model debugger that interprets the UML action language. It is fully compliant with the UML 2.0 standard, and can be customised for executing models that need to extend (i.e. profile) the UML action language.
Categories and Subject Descriptors
• P´ opulo is fully compliant with the UML action language, unlike to existing tools, such as Rhapsody.
D2.2 [Design Tools and Techniques]
• P´ opulo offers the typical functionalities of a debugger, such as step by step execution or specification of breakpoints.
General Terms Design, Languages
1.
Pablo Sánchez
Dpto. Lenguajes y Ciencias de la Computación Universidad de Málaga (Spain)
• P´ opulo is largely extensible, it being possible to add new user-defined actions for executing profiled UML models.
INTRODUCTION
Model-Driven Development (MDD) is a new technology for software development where models are now first-class citizens of this process. Consequently, model verification and testability, which can be achieved by means of model execution and simulation [1], has been identified as a key factor for the successful adoption of MDD techniques [6]. UML is probably the most widely known and used modelling language. The execution and simulation of UML models is already a reality with the standardisation of an action language, which enables the complete specification of the
The following sections describe the P´ opulo tool and outline some conclusions and future work.
2.
PÓPULO
P´ opulo is a tool for executing and debugging UML 2.0 models, whose precise behaviour is specified by means of the UML action language (i.e. activity diagrams containing actions). Using P´ opulo, the design phase of a software development process would be as follows:
∗ This work has been supported by MCYT Project TIN200509405-C02-01 and EC Grants IST-2-004349-NOE AOSDEurope and AMPLE IST-033710.
1. Software designers construct executable UML models with a complete specification of their behaviour by means of the action language. 2. These UML models are loaded into P´ opulo. Then, designers can execute and debug their models, discovering and fixing bugs, if any exists, at design time. The detection and resolution of errors before implementation helps to save time and money, as reported by industrial experiments [5].
Copyright is held by the author/owner(s). ICSE’08 May 10–18, 2008, Leipzig, Germany ACM 978-1-60558-079-1/08/05.
955
which he/she is mainly interested. The blocked tab shows all the actions that are waiting for some control or object flow.
2 4
5
Call stack (Figure 1, label 5). It visualises the current call stack. 0
2.2
1
3
Figure 1: P´ opulo graphical user interface P´ opulo accepts UML models in the form of XMI files as input. In spite of being a standard, the XMI representation of the same model can differ depending on the tool used. P´ opulo uses the XMI version produced by the Eclipse UML2 tools, since it is becoming the de-facto standard for XMI, being adopted for the most popular UML tools (e.g. Rational or MagicDraw). The use of the UML action language by P´ opulo helps to ensure compatibility with third-party UML editors (e.g. MagicDraw ) and facilitates the creation od extensions to P´ opulo for the execution of profiled UML models. P´ opulo supports extra actions, not contained in the UML standard and provided as reusable model libraries and Profiles, for carrying out common operations on basic data types, such as integers or strings.
2.1
Pópulo extensibility
P´ opulo has been carefully designed to allow its easy customisation or extension to support the execution of profiled UML models, where new actions are incorporated into the UML action language by means of UML Profiles. P´ opulo is implemented following the causal connection property [2], where each action is implemented by a corresponding class instead of generating code. Hence, the addition of new actions can be made simply by inheriting from these already defined classes and overriding methods. The interested reader can refer to [4]. The extension capabilities of P´ opulo are currently being used in several projects related to the execution of aspect-oriented models [3].
3.
CONCLUSIONS AND FUTURE WORK
This paper has presented P´ opulo, a tool for debugging UML models. To the best of our knowledge, it is the first tool able to interpret UML actions as specified in the UML standard. Existing tools, such as Rhapsody or TAU G2, are based on in-house notations not compliant with the UML standard, thereby hindering tool interoperability. A recently released tool, the UML Model Debugger [1] offers similar debugging capabilities to P´ opulo but it does not interpret UML actions. P´ opulo does not provide any methodology for generating test cases and debugging models. Once a methodology has been selected, this tool provides the the infrastructure for executing the test cases created by such a methodology. As future work, we plan to support UML state machines, to investigate the possibility of debugging models that use legacy classes, and also the incorporation of some interesting features of the UML Model Debugger tool [1], such as the execution of incomplete models, and improvements on the usability of the user interface.
Pópulo features
P´ opulo is currently provided as an Eclipse plugin. It provides several views (see Figure 1), which are commented on below: Model (Figure 1, label 0). It displays the model being executed using the Eclipse UML2 plugin.
4.
REFERENCES
[1] D. Dotan and A. Kirshin. Debugging and testing behavioral uml models. In Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), 2007. [2] D. Riehle et al. The architecture of a uml virtual machine. In Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), 2001. [3] L. Fuentes and P. S´ anchez. Designing and weaving aspect-oriented executable uml models. Journal of Object Technology, 6(7), 2007. [4] L. Fuentes et al. Execution and simulation of (profiled) UML models using P´ opulo. In Modelling in Software Engineering (MISE), 2008. [5] P. Baker et al. Model-Driven Engineering in a Large Industrial Context-Motorola Case Study. In Model-Driven Engineering Languages and Systems (MODELS), 2005. [6] B. Selic. The pragmatics of model-driven development. IEEE Software, 20(5), 2003.
Execution Trace (Figure 1, label 1). It shows information about the execution trace of the model, such as actions executed. P´ opulo, like common debuggers, supports breakpoint-based execution and step-by-step execution. Breakpoints (Figure 1, label 0). It allows the definition of breakpoints for the model execution. Instances and links (Figure 1, label 2). It shows all the created objects, grouped by the class they belong to. Object properties (Figure 1, label 3). It displays the values of the attributes of an object or a variable. Ready and block (Figure 1, label 4). The ready tab shows the queue of actions that have currently received all their object and control flows, and are therefore ready to be executed. The user can modify the ordering of this queue, giving priority to the execution paths in
956