An Executable UML with OCL-Based Action Semantics Language

An Executable UML with OCL-Based Action Semantics Language

14th Asia-Pacific Software Engineering Conference An Executable UML with OCL-based Action Semantics Language Ke Jiang Lei Zhang Shigeru Miyake Hitachi (China) Research & Development Corporation, 301, Tower C Raycom infotech Park, 2 Kexueyuan Nanlu, Hai Dian District, Beijing 100080, China [email protected] [email protected] [email protected] Abstract system. The executable models can be compiled or trans- Executable UML allows precisely describing the soft- lated to less abstract programming languages, which can ware system at a higher level of abstraction. It bridges be deployed on various platforms for specific implement- the semantics gap between the UML design models and ation. Executable UML also allows the direct execution the implementation. The executable models can be trans- of UML models. It is regarded as the foundation of lated to a less abstract programming language comple- Model-Driven Architecture (MDA). With executable tely or executed in a virtual machine directly. Existing UML, we can clearly grasp what the system is doing executable UMLs lack a formal and standardized Action early, enable testing of the system as the system is built, Semantics Language (ASL). Object Constraint Language and find the flaws in the design which can be (OCL), as a formal specification language, is a standard immediately corrected, rather than later when it is too published by Object Management Group (OMG) along costly to correct them. with UML. It is used to describe constraints for UML There are many types of executable UML provided by models. In this paper, we propose an executable UML different research group or tool vendors. But the existing with OCL-based ASL (OxUML) by extending OCL to executable UMLs lack a formal and standardized ASL. In support actions with side effects. We present its support this paper, we define Object Constraint Language (OCL) environment—UML Virtual Machine (UVM) and sugg- [3] for Execution (OCL4X) [4] as an Action Semantics est a Model-Driven Development (MDD) process with Language (ASL) by extending OCL to support actions OxUML. We also introduce an example to demonstrate with side effects. Based on it, we pro-pose an executable how to build and process OxUML models. UML with OCL-based ASL (OxUML), present its sup- Keywords: UML, Executable UML, Model-Driven port environment—UML Virtual Machine (UVM) and suggest a Model-Driven Development (MDD) process with OxUML. We also introduce an ATM example to demonstrate how to build OxUML models and process 1. Introduction them in UVM. UML [1], defined by Object Management Group 2. Executable UML (OMG), was originally designed to sketch the structure of object-oriented software systems. As UML is not pre-cise Executable UML is at the higher layer of abstraction enough for model execution, there is a lack of formal toward the problem space. It provides an evolutionary relationship between the design model and the implemen- model-driven solution to express and implement tation. Most UML related tools just allow users to model software. Rather than elaborate an analysis product into a a software system and then generate program codes design product and then write code, application deve- partly, which must be combined with additional hand- lopers of executable UML will use tools to translate written codes. It may cause inconsistency between design abstract application constructs into executable entities. and implementation. With executable UML, what the developers do is just Executable UML [2] bridges the gap between the modeling. The automatic transformation from the models UML-based design models and the implementation. Exe- to the implementation is supported by the executable cutable UML allows user to precisely describe software UML tools. The code generated from an executable UML 1530-1362/07 $25.00 © 2007 IEEE 302 DOI 10.1109/ASPEC.2007.21 model will be as uninteresting and typically unexamined lares a xUML [7] and provides Intelligent UML (iUML) as the assembler pass of a third generation language [8]. The xUML formalism provides the necessarily comp- compile is today. The Developers only care about the lete syntactic and semantic language to fully specify models, so the gap between the design and the implemen- models in a complete and executable manner and aligns tation is eliminated. with the MDA view of a model. The foundation of Executable UML is based on UML, from which most xUML is the Action Specification Language, which was a of its elements, syntax and semantics are inherited. So an key driver for the UML Action Semantics standard. This executable UML should firstly define a compact subset of language allows platform-independent specification of UML that comprises a computationally complete langu- state actions, operations, correspondence relationships age for executable models (that is as small a subset of and test methods. It is also the language used to specify UML concepts as is practicable to achieve computational the mapping rules that are used to generate the Platform- completeness). Usually, class diagram is used for static Specific Models (PSM) from the PIMs. XIS-xModels [9] structure while state machine diagram, activity diagram, is an executable UML tool which using existing program- sequence diagram, collaboration diagram and other dyna- ming language as its ASL. It is a VBA application which mic diagram are used to describe and define the computa- acts as a native feature of Visio and uses their capabilities tion and behavior of the real or hypothetical world. For of data storing together with code compilation and exe- semantics aspect, an executable UML should have suffi- cution. All actions, procedures and scripts (boot sequence ciently precise, unambiguous, well-grounded execution or restrictions) in XIS-xModels are implemented in VBA semantics. The executable models can be executed given code with some restrictions of full capabilities of VBA. a runtime environment, which also means that they can be Rhapsody [10] provided by Telelogic can tie the activities validated early in the development lifecycle, as well as be of systems and software engineers into one environment, translated to target code achieving near 100% code gene- which allows the execution and the deployment of the ration. Action semantics is defined by OMG in UML model unto the target system. It provides an action specification 2.0 or later versions. The action semantics language using simply C, C++, or Ada code. define many actions and what an action should do. ASL is the surface language of UML action semantics, which is used for precisely describing the behavior. It is 3. OxUML concerned with the algorithm and deals with “how to do”. And it should compliant with the action semantics. We propose a new executable UML called OxUML. It Secondly, an executable UML should explicitly state consists of a redefined subset of UML and OCL4X as where it refines the semantics for the constructs in the ASL. Based on OxUML, we developed a prototype of the foundational subset as defined in the UML. Besides, support environment UVM. We also suggest a MDD some new constructs may be defined by using a profile of process with OxUML UML or extending the UML meta-model, together with From the thirteen diagrams of UML, we choose class their syntax and semantics. Moreover, an executable diagram, state machine diagram and activity diagram as UML should have a standard model library, which con- the essential diagrams of OxUML. Class diagram is used tains basic data type and basic computational functions to describe the static structure of the target software sys- such as basic arithmetic, comparison functions, logical tem. It is concerned with the data. State machine diagram functions, and I/O functions. Finally, it should be inde- and activity diagram are from behavior view. As in pendent of software organization and be translatable to previous work, the model execution is based on the state multiple implementations and a broad range of languages. machine diagram. We specify each class none or one state Many research groups or companies proposed some machine diagram to express the life cycle of its instance forms of executable UML and developed support tool. objects in terms of state, transition and event. The state BridgePoint Development Suite from MentorGraphics machine diagrams focus on the control as well as inter- suggests an executable and translatable UML (xtUML) action. Beside state machine diagram, activity diagram is [6]. The translation and execution of a Platform Indepen- adopted in OxUML as a dynamical diagram to express dent Model (PIM) relies on a well-defined, computa- the behavior, which is different from the previous works. tionally complete formalism for describing PIMs. Object In OxUML, we specify each operation none or one Action Language (OAL) in xtUML is an action activity diagram. The activity diagram, in which action is semantics-compliant language. BridgePoint integrates used to depict what to do in detail by using ASL, deals class diagrams and state-chart diagrams with the OAL to with the algorithm of the behavior. It can also express the provide an environment in which to develop, execute and program flow within the body of operation. It replaces the test application PIMs and to automatically translate these writing programming codes of the body of operation. In PIMs to 100% complete target code. Kennedy Carter dec- other words, activity diagram enables UML model execu- 303 table with its precise action description and control flow. fully new syntax may somewhat reduce its usability from In state machine diagram, there are some activity connec- the user view. The second kind makes use of existing tion points, such as effect activity of transition, entry programming language. It may be popular with those who activity, do activity, exit activity of state. An activity are familiar with a concrete programming language. But connection point is an attribute of an UML element, it may lead to the problem of platform dependence, which which associates the element with an activity.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us