UML Action Language

UML Action Language (UAL) with well defined semantics is now an OMG standard for Executable Models.

Rational Software Architect (RSA) and its Real Time Edition (RSA-RTE) have UML transformations that can transform behaviorally complete UML models into executable code. UML was rich enough to express structure of the system, but it could express only limited kinds of behavior, and graphically defining even those limited behaviors was cumbersome. So, in practice, engineers modeled their system using UML, but encoded behaviors (such as actions to be taken while entering or exiting a state, or while taking a transition to another state) in various programming languages such as C/C++, and embedded them in the respective model element (State, Transition etc.) as UML Opaque Behavior element. These opaque elements are copied verbatim to the generated code by UML transformations.

With opaque behavior code embedded in UML models, though an engineer worked at the model level, the model was not "pure" and semantically complete and it was not possible to semantically analysis these opaque elements (for example, there was no way to model-check whether any model level abstraction or constraint was broken in a C++ code snippet). It also caused several productivity issues for the system design engineer as (s)he spent significant amount of time dealing with the intricacies of C++ and understanding how a model is transformed to C++ to be able to write correct code snippets. This time could be better spent in designing the model. It also tied the model to a target language, platform and UML transform, rendering it impure and importable, and model simulation unfeasible.

A standard UML Action Language for specifying complete behavior can address these issues. The goal with developing UAL (and standardizing it at Object Management Group that oversees UML evolution) was to have a simple textual language for specifying behavior with well-defined semantics, so that model was "pure" and semantically complete and system engineers could work at model level. For UAL to be of real use to engineers, RSA and RSA-RTE are enhanced as Model IDE with robust tooling for UAL code editing, translation to C++/Java, and model & UAL code level debugging capabilities similar to modern programming IDEs.

The project started with a one line description: build a standard action language in RSA/RSA-RTE. It gave me incredible opportunity to work on this project from conceptualization to execution and delivery:

  • Contribute in drafting IBM's proposal and then as a reviewer of standard drafts during standardization of UAL at Object Management Group
  • Collaborated with key customers to understand requirements and chart out the goals and iterative delivery plans
  • Define architecture of UAL features in RSA and RSA-RTE
  • Design and implement some of the key components such UAL compilation and translation framework
  • Lead a small team of 4 engineers to implement from scratch version 1.0 of the UAL tooling released in RSA/RSA-RTE 8.0 in Aug 2010

Some of capabilities designed and developed by my team are:

  • RSA
    • UAL runtime definition consisting of UML model libraries
    • Extensible UAL compilation and translation framework
    • Extensible UAL translators for C++ and Java
    • UAL code snippet Editor and model based content completion assistant
    • Model Execution Framework
    • Extensible mechanism for UAL to target language mapping marker generation (functionally similar to line level debug symbols in traditional compilers, utilized for model level debugging)
  • RSA-RTE
    • Extensions to UAL C++ and Java translators for Real Time systems
    • UAL model simulation for Real Time systems with standard debugging constructs (e.g. break point, step over/in/out) at model and UAL code level
    • Model level debugging of generated C++ code, and event/message injection/tracing for Real Time systems

My work in this project as lead, architect and engineer earned me Outstanding Technical Achievement Award (OTAA), one of the highest technical excellence awards at IBM, and I was also featured in the inaugural edition of I Drive Excellence series at IBM India Software Lab.

With: , , Kalyan Prasad, , , ,

Product/Tool Info:

Name: Rational Software Architect
Feature: UML Action Language and Model Execution and Debugging
OS: Windows, Linux
Official Web Site: http://www.ibm.com/developerworks/rational/products/rsa/
Download Link: http://www.ibm.com/developerworks/downloads/r/architect/
Date: Aug 2010

Resources

Talks

  • Next Level of MDD Maturity: Develop Executable Models using UML Action Language. Satish Chandra Gupta, Andreas Henriksson. In Innovate 2010, The Rational Software Conference. Orlando, Florida, USA. 6-10 June 2010.