A Runtime Model for fUML
MRT 2012 – 7th International Workshop on Models@run.time
                                    p          @
www.modelexecution.org

                                  Tanja Mayerhofer, Philip Langer, Gerti Kappel
                                  Business Informatics Group
                                  Institute of Software Technology  and Interactive Systems 
                                  Vienna University of Technology
                                                    y           gy
                                  Favoritenstraße 9‐11/188‐3, 1040 Vienna, Austria
                                  phone: +43 (1) 58801‐18804 (secretary), fax: +43 (1) 58801‐18896
                                  office@big.tuwien.ac.at, www.big.tuwien.ac.at
Introduction

Foundational UML (fUML)

 OMG standard V1.0 released 02/2011

 Specification of dynamic semantics for UML class diagram and activity diagram

 Operational semantics approach specifying a UML virtual machine

 UML evolves to implementation language




                                                                             2
Problem Description
              p

     Activity

           … …


                                    fUML virtual 
                                    fUML virtual
                                      machine
                                                               Output
            Input


? Which activity nodes have been executed?
? In which order have the nodes been executed?
? Which values have been consumed as input / produced as output by a node?
? What other activities have been called?
? What has the input / output of a called activity been?
                                                                             3
Contributions

fUML virtual machine lacks in providing means for
1.   analyzing the execution              Trace model
2.   observing the execution state        Event model
3.   controlling the execution            Command API




                                                         4
Contributions

fUML virtual machine lacks in providing means for
1.   analyzing the execution                       Trace model
          Chronological execution order
          Input / output relationships
           Input / output relationships
          Token flows
          Call hierarchies
2.   observing the execution state                 Event model

3.   controlling the execution                     Command API




                                                                  5
Trace Model




                                  Activity1: Add a new student to a lecture

                                              student :
                           New student :      Student
                        Instantiate student
    name :     name :                                 object :
    String     String                                 Student
                                                             AddStructuralFeatureValue
                                                             AddSt   t   lF t    V l
                                                                   Add lecture
                                                                                         result :
   lecture :                                        value :                                         student :
                                                                                         Student
   Lecture                                          Lecture                                         Student




                                                                                                                6
Trace Model

Input / Output Relationship

name : String
                                         Activity1: Add a new student to a lecture
   "Alice"
                                                     student :        s : Student
                                  New student :      Student         name = "Alice"
                               Instantiate student
             name :   name :                                 object :
             String   String                                 Student
                                                                    AddStructuralFeatureValue
                                                                    AddSt   t   lF t    V l
                                                                             Add lecture
                                                                                                result :
         lecture :                                         value :                                         student :
                                                                                                Student
         Lecture                                                                                           Student
                                                           Lecture




                                                                                                                       7
Contributions

fUML virtual machine lacks in providing means for
1.   analyzing the execution                       Trace model

2.   observing the execution state                 Event model
          Start / end of activity execution
          Start / end of activity node execution
          Suspension of activity execution
           Suspension of activity execution
          Modification of extensional values
3.   controlling the execution                     Command API




                                                                  8
Contributions

fUML virtual machine lacks in providing means for
1.   analyzing the execution                         Trace model

2.   observing the execution state                   Event model

3.   controlling the execution                       Command API
          Start / stop execution
          Resume execution until certain activity node
          Resume execution stepwise
          Retrieve runtime information
           Retrieve runtime information




                                                                    9
Future Work

   Objective: Model execution environment based on fUML, enabling efficient 
                        testing and debugging of models
                        testing and debugging of models

       Impact analysis of changes                             DSL for specifying assertions on traces
       Trace‐based debugging                                  Automatic derivation of test cases

                                   Model                       Model 
                                  Debugging                    Testing


                                       fUML Model Execution
                                       fU L   d l       i


      Execution support for fUML  Execution support for DSML*
       Execution support for fUML     Execution support for DSML
          Specification of operational semantics using fUML
          Automatic derivation of execution support

T. Mayerhofer, P. Langer, M. Wimmer. “Towards xMOF: Executable DSMLs based on fUML”. Accepted for publication in:  10
     12th Workshop on Domain‐Specific Modeling at SPLASH 2012. 
Thank you!
      y




             Debugging and Testing Models Based on fUML

                      www.modelexecution.org
                            d l     ti




                                                          11

A Runtime Model for fUML

  • 1.
    A Runtime Model for fUML MRT 2012 – 7th International Workshop on Models@run.time p @ www.modelexecution.org Tanja Mayerhofer, Philip Langer, Gerti Kappel Business Informatics Group Institute of Software Technology  and Interactive Systems  Vienna University of Technology y gy Favoritenstraße 9‐11/188‐3, 1040 Vienna, Austria phone: +43 (1) 58801‐18804 (secretary), fax: +43 (1) 58801‐18896 office@big.tuwien.ac.at, www.big.tuwien.ac.at
  • 2.
    Introduction Foundational UML (fUML)  OMG standard V1.0 released 02/2011  Specification of dynamic semantics for UML class diagram and activity diagram Operational semantics approach specifying a UML virtual machine  UML evolves to implementation language 2
  • 3.
    Problem Description p Activity … … fUML virtual  fUML virtual machine Output Input ? Which activity nodes have been executed? ? In which order have the nodes been executed? ? Which values have been consumed as input / produced as output by a node? ? What other activities have been called? ? What has the input / output of a called activity been? 3
  • 4.
    Contributions fUML virtual machine lacks in providing means for 1. analyzing the execution  Trace model 2. observing the execution state  Event model 3. controlling the execution  Command API 4
  • 5.
    Contributions fUML virtual machine lacks in providing means for 1. analyzing the execution  Trace model  Chronological execution order  Input / output relationships Input / output relationships  Token flows  Call hierarchies 2. observing the execution state  Event model 3. controlling the execution  Command API 5
  • 6.
    Trace Model Activity1: Add a new student to a lecture student : New student : Student Instantiate student name : name : object : String String Student AddStructuralFeatureValue AddSt t lF t V l Add lecture result : lecture : value : student : Student Lecture Lecture Student 6
  • 7.
    Trace Model Input / Output Relationship name : String Activity1: Add a new student to a lecture "Alice" student : s : Student New student : Student name = "Alice" Instantiate student name : name : object : String String Student AddStructuralFeatureValue AddSt t lF t V l Add lecture result : lecture : value : student : Student Lecture Student Lecture 7
  • 8.
    Contributions fUML virtual machine lacks in providing means for 1. analyzing the execution  Trace model 2. observing the execution state  Event model  Start / end of activity execution  Start / end of activity node execution  Suspension of activity execution Suspension of activity execution  Modification of extensional values 3. controlling the execution  Command API 8
  • 9.
    Contributions fUML virtual machine lacks in providing means for 1. analyzing the execution  Trace model 2. observing the execution state  Event model 3. controlling the execution  Command API  Start / stop execution  Resume execution until certain activity node  Resume execution stepwise  Retrieve runtime information Retrieve runtime information 9
  • 10.
    Future Work Objective: Model execution environment based on fUML, enabling efficient  testing and debugging of models testing and debugging of models  Impact analysis of changes  DSL for specifying assertions on traces  Trace‐based debugging  Automatic derivation of test cases Model  Model  Debugging Testing fUML Model Execution fU L d l i  Execution support for fUML  Execution support for DSML* Execution support for fUML     Execution support for DSML  Specification of operational semantics using fUML  Automatic derivation of execution support T. Mayerhofer, P. Langer, M. Wimmer. “Towards xMOF: Executable DSMLs based on fUML”. Accepted for publication in:  10 12th Workshop on Domain‐Specific Modeling at SPLASH 2012. 
  • 11.
    Thank you! y Debugging and Testing Models Based on fUML www.modelexecution.org d l ti 11