Professional Documents
Culture Documents
William A. Fritz Department of Software Engineering University of Wisconsin Platteville Platteville, WI 53818 fritzw@uwplatt.edu
Abstract
As the software systems being used in embedded systems become more complex, it becomes more difficult to represent the system in any method other than as a model. While many CASE tools exist for creating these models, and for generating code from them, they are often lacking in making any decent code or even cause the code to no longer match the model. Model-Driven Development (or MDD) tools are the attempt to fix this shortcoming. This paper will cover how MDD attempts this, and in the specific how Rhapsody works.
Fritz
SE411
Introduction
While CASE tools have gained more support over time, many of them are lacking when it comes to generating code from the model, or editing the model to match the code. Model-Driven Development tools use UML and SysML to make a better overall tool. The program this paper will center on, Telelogics Rhapsody, supports using UML 2.0, SysML, and DoDAF for creating its models. It is a fully integral program that can contain the entire system from requirements all the way through to final code and testing.
Advantages of Model Driven Development Model Driven Developments main advantages lie in the ability to work with a system at the model level. By using models, software engineers and other stakeholders are able to argue conceptually about a problem without worrying about syntax or other platform Fritz 2 SE411
specific issues.[4] This is an advantage because it takes out one of the things that can often confuse stakeholders. While they know what they want, they often do not have the technical knowledge of coding to understand what the difference between platforms can mean. When looking at a model, it is at a high enough level to be easily understood to someone who has an idea of what the system should do. This ease of communication can lead to quicker overall design times, as it makes it easier to get what the stakeholders requirements are out of them, and since the entire system can be generated directly off of the diagrams, it can be simply displayed to them. Another of the major advantages to Model Driven Development is that it is system independent. When designing the overall model very little needs to be known about the final platform. MDD emphasizes developing system independent models, and then using model transformations to fit those system independent models to the final target system. By using this type of structure it makes a system easily portable to different hardwares.
MDD tools vs. CASE tools The major difference between MDD tools and CASE tools is scale. Most CASE tools are used as a supplement to the development process, allowing models to be created and linked together easily. MDD tools on the other hand are meant to use models as the primary means of development.
Fritz
SE411
to allow for deployment to a number of commercial and proprietary RTOSs, as well as systems with no RTOS at all.
Rhapsody Features
Moving Current Projects to Rhapsody
Rhapsody has built in support for importing projects from other tools such as Rational Rose into itself. As long as Rose is installed on the machine that the import is to take place on it is a simple wizard design that allows for importing of many of the views Rose can create, as seen in figure 1.
Fritz
SE411
Figure 1: Rose Import Options Rhapsody also supports use of design blocks from the Simulink MATLAB extension. For these a black-box approach is used, Rhapsody can use the Simulink components but is not able to edit them in itself. However the user can update the component in Simulink and then simply synchronize the model within Rhapsody. The last major importing technology in Rhapsody is its XML Metadata Interchange (XMI) interface. The XML Metadata Interchange (XMI) is an OMG standard for exchanging metadata information via Extensible Markup Language (XML).[5] XMI is primarily used for exchange of UML models. Rhapsody can not only import XMI models into its own projects but also has exporting capabilities.
Debugging Tools
Rhapsody has many built in tools for tracing and debugging your project. Animator
Fritz
SE411
One of the extremely useful tools it has is its animator. It allows you to view an animated version of many diagrams in real time as the program is running. These diagrams include the sequence diagrams, state charts, activity diagrams, browser, event queue window, Call stack window, and output window. This allows you to watch the flow and state changes of the project as it is working in a graphical manner. When using the animator within a state diagram, the currently chosen state is highlighted in brown. In Figure 2 the Sample Home Alarm System has been set off using the Door event, and the state diagram shows that the system is currently in the intrusion state.
Figure 2: Intrusion alarm state After entering the correct code the alarm is turned off, moving the system into the silence state, as seen in Figure 3. If the off button had been pressed after the code was entered the armed state would have been exited and the full system would have moved to the off state.
Fritz
SE411
Figure 3: Silenced alarm state The Animator can also be useful when showing progress to the stakeholders in a project. It allows you to work with the diagrams that have already been shown to them in the design phase and show in real time how it now works. Tornado IDE Integration Rhapsody also has the ability to work side by side with the Tornado IDE to allow for code level debugging on the target hardware through Tornado synchronized with design level debugging in Rhapsody. Rhapsody is able to receive breakpoint information from Tornado, as well as sending breakpoints that Tornado understands. This allows you to not only have the program running on the target hardware, but also to still be viewing the animated state diagrams to see what the system is doing.
Fritz
SE411
References
[1] Hofstader, Joseph; Building Distributed Applications Model-Driven Development, http://msdn2.microsoft.com/en-us/library/aa964145(d=printer).aspx [2] Mellor, S., Scott, K., Uhl, A. and Weise, D. MDA Distelled; Principles of ModelDriven Architecture, Addison Wesley, 2004. [3] Rutherford, Matthew J. and Wolf, Alexander L.; A Case for Test-Code Generation in Model-Driven Systems, Springer-Verlag Berlin Heidelberg, 2003 [4] Bull, R. Ian; Integrating Dynamic Views Using Model Driven Development, 2006 [5] Wikipedia; XML Metadata Interchange, http://en.wikipedia.org/wiki/XMI
Fritz
SE411