30
BOM2UML Integrating BOM Specifications into UML-based Development Environments Andrea DAmbrogio 1 , Daniele Gianni 2 and Marco Grasso 1 1 [email protected] Dept. of Enterprise Engineering University of Roma Tor VergataRoma (Italy) 2 [email protected] European Space Agency Noordwijk, The Netherlands 2 nd Workshop on Model-driven Approaches for Simulation Engineering (Mod4Sim), in Symposium on Theory of Modeling and Simulation (TMS), SpringSim 2012

BOM2UML: Integrating BOM Specifications into UML-based Development Environments

  • Upload
    dgianni

  • View
    617

  • Download
    1

Embed Size (px)

DESCRIPTION

Presentation at the 2nd International Workshop on Model-driven Approaches for Simulation Engineering (held within the SCS/IEEE Symposium on Theory of Modeling and Simulation part of SpringSim 2012) Please see: http://www.sel.uniroma2.it/mod4sim12/ for further details

Citation preview

Page 1: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

BOM2UML Integrating BOM Specifications into

UML-based Development Environments

Andrea D’Ambrogio1, Daniele Gianni2 and Marco Grasso1

[email protected] Dept. of Enterprise Engineering

University of Roma “Tor Vergata” Roma (Italy)

[email protected] European Space Agency

Noordwijk, The Netherlands

2nd Workshop on Model-driven Approaches for Simulation Engineering (Mod4Sim), in Symposium on Theory of Modeling and Simulation (TMS), SpringSim 2012

Page 2: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Presentation Overview

Background

• IEEE High Level Architecture (HLA) and Basic Object

Model (BOM)

• Atlas Transformation Language (ATL)

BOM2UML:

• High Level Mapping

• Model Transformations

Example application

Page 3: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

IEEE High Level Architecture

Prominent standard for distributed simulation

Originally designed to increase simulator reusability and interoperability

The standard consists of four documents:

• Set of compliance rules

• Interfaces for distributed simulation services

• An Object Model Template (OMT) for data interchange

• A development process

The standard addresses software reusability at the coarse level of individual simulators

This is obtained through specification of OMT data

Page 4: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Basic Object Model (BOM)

BOMs document individual (fine grain) simulation components using an abstract notation • http://www.boms.info

BOMs can be coded in tabular and XML (DIF) forms

BOMs can be mapped onto HLA OMT for full compliance with the standard

BOMs can be grouped in: • Model Identification

• Conceptual Model Definition

• Model Mapping

• Object Model Definition

• Notes and Lexicons

Page 5: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Atlas Transformation Language (ATL)

A model transformation language and toolkit

• http://www.eclipse.org/atl

Used in the MDE (model-driven engineering)

field to produce a set of target models from a

set of source models

An ATL model-to-model transformation is

composed of rules that define how source model

elements are matched and navigated to create

and initialize the elements of the target models

Page 6: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Operational context of ATL

MOF

MMa MMb

Ma Mb MMa2MMb.atl

ATL

MMa is the

source

metamodel

Ma is the source model Mb is the target model

MMB is the

target

metamodel

Page 7: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

ATL overview Source models and target models are distinct:

• Source models are read-only (they can only be navigated, not modified)

• Target models are write-only (they cannot be navigated)

The language is a declarative-imperative hybrid: • Declarative part:

Matched rules with automatic traceability support

Side-effect free navigation (and query) language: OCL 2.0

• Imperative part: Called rules

Action blocks.

Recommended programming style: declarative

Page 8: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

BOM2UML: What is it?

BOM2UML is a first attempt to automatically

derive UML representations for BOM specs

BOM2UML consists of:

• a high-level model mapping between BOM concepts

and UML concepts

• a set of ATL transformations to convert BOM

specifications (coded in XML-based DIF) into UML

diagrams (coded in XMI)

Page 9: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

BOM2UML: Why is it needed?

BOM specs cannot be immediately integrated in

UML-based model-driven environments

UML representations contribute to solve

interoperability issues when integrating

simulation components

UML is part of the OMG MDA standard

UML eliminates the investment to retrofit

existing tools for BOM-based development

Page 10: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

High Level Mapping

BOM Template Concept UML Domain

Model

Identification Meta-data Class Diagram

Pattern of Interplay Dynamic

Behavior

Interaction Overview

Diagram and associated

Sequence Diagrams

State Machine FSM State Diagram

Entity Type Data Class

Event Type Data Class

Page 11: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

High Level Mapping

BOM Template Concept UML Domain

Model Mapping Model

Transformation

Platform Independent

to Platform

Specification

Transformation

Object Definition Object Model UML-HLA Profile*

Lexicon** List XML Query on UML

Model**

Note** Meta-attribute Note**

*Available in literature

**Work-in-progress

Page 12: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Model Transformations

State machine UML State Diagram

• BOM State UML State

• BOM Transition UML State transition

BOM Trigger != UML Trigger

Pattern of Interplay Interaction Overview Diagram

• BOM Action UML Activity

• BOM Variation UML Decision node plus UML Activity

• Each UML Activity is expanded into a Sequence Diagram to

represent the interaction triggering the BOM Event

Page 13: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Example

Application scenario consisting of:

• Cannon firing cannon shots

• Soldier throwing hand bombs

• Set of targets to be destroyed

All the BOMs were developed, but we illustrate

only the Event Types, Cannon State Machine,

and Firing Pattern of Interplay

Page 14: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Part of the defined Event Types

Event

Type

Source

Charact-

Name

Target

Charact

Name

Content Trigger

Condition Notes

Cannon-

shot Cannon Target ShotId

FiringCom-

mand==true NA

Bullet

Explosion Target Cannon NA NA NA

Page 15: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

‘Firing’ State Machine for the Cannon

State

Machine

Name

Concep-

tual Entity

State

Not

es State Name Exit Condition

Action Next

State

Firing Cannon

Ready FireCom-

mand Fire Na

Fire Cannon Fires

Bullet

Travel-

ling

Na

Bullet

Travelling

Bullet

Explodes Ready

Na

Bullet Faulty Na

Page 16: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

State Diagram for the ‘Firing’ State Machine

Fire

Ready

BulletTravelling

FiringThe triggering conditions

associated to each BOM

Event become the

transitions triggers Each BOM state

becomes a UML State

The BOM State

Machine becomes the

UML State Diagram

Guards and Entry

Action remain

undefined

Page 17: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

‘Firing’ Pattern of Interplay (PoI) (part 1)

PoI Seq Name Sender Recei-

ver Event

Condi

-tion

Firin

g

Pattern

Action 1

Fire

Cannon Cannon Target Fire Na

Variation

Throw

Handbo

mb

Soldier Target Launch Na

Pattern

Action 2

Explode

Bullet Cannon Target Explosion Na

Variation

Explode

Hand-

bomb

Soldier Target Explosion Na

Page 18: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

‘Firing’ Pattern of Interplay (PoI) (part 2)

PoI Seq Name Sender Recei-

ver Event

Condi-

tion

Firin

g

Exception Dischar-

ge Bullet Cannon NA

Faulty

Bullet

Bullet-

Exploded

==false

Exception

Dischar-

ge

Handbo

mb

Soldier NA

Faulty

Hand-

bomb

Hand-

Bomb

Exploded

==false

Page 19: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Interaction Overview Diagram

Fire Cannon

Throw

Handbomb

Explode Bullet

Explode

Handbomb

Discharge Bullet

Discharge

Handbomb

[Faulty Handbomb]

[Faulty Bullet]

ref

ref

ref

ref

ref

ref

Page 20: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Interaction Overview Diagram

Fire Cannon

Throw

Handbomb

Explode Bullet

Explode

Handbomb

Discharge Bullet

Discharge

Handbomb

[Faulty Handbomb]

[Faulty Bullet]

ref

ref

ref

ref

ref

refThe BOM Pattern of

Interplay becomes an

Interaction Overview

Diagram

Page 21: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Interaction Overview Diagram

Fire Cannon

Throw

Handbomb

Explode Bullet

Explode

Handbomb

Discharge Bullet

Discharge

Handbomb

[Faulty Handbomb]

[Faulty Bullet]

ref

ref

ref

ref

ref

ref

Each Variation

becomes an

“alternative” Action

Page 22: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Interaction Overview Diagram

Fire Cannon

Throw

Handbomb

Explode Bullet

Explode

Handbomb

Discharge Bullet

Discharge

Handbomb

[Faulty Handbomb]

[Faulty Bullet]

ref

ref

ref

ref

ref

ref

Each Action becomes

and Activity

Page 23: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Interaction Overview Diagram

Fire Cannon

Throw

Handbomb

Explode Bullet

Explode

Handbomb

Discharge Bullet

Discharge

Handbomb

[Faulty Handbomb]

[Faulty Bullet]

ref

ref

ref

ref

ref

ref

Each Action is

exploded and

represented as a

Sequence Diagram

Page 24: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Interaction Overview Diagram

Fire Cannon

Throw

Handbomb

Explode Bullet

Explode

Handbomb

Discharge Bullet

Discharge

Handbomb

[Faulty Handbomb]

[Faulty Bullet]

ref

ref

ref

ref

ref

ref

Cannon Target

cannonshot[firingCommand==true]

UML Class

representing the BOM

Event

Page 25: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Conclusions

BOM specs document HLA simulation components using

XML-based formats and thus cannot be exploited within

model-driven approaches for HLA

We have introduced BOM2UML to integrate BOMs into

existing model-driven simulation engineering approaches

BOM2UML consists in:

• a high level mapping between BOM and UML concepts

• a set of ATL transformations to derive UML diagrams

Work is in progress to define both a UML profile for BOM

to further enhance model verification

Page 26: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Backup slides

Page 27: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

ATL rules

A declarative rule specifies:

• the source pattern to be matched in the source models

• the target pattern to be created in the target models for each match during rule application

An imperative rule is basically a procedure:

• It is called by its name

• It may take arguments

• It can contain:

A declarative target pattern

An action block (i.e. a sequence of statements)

Both.

Page 28: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Declarative rules: source pattern

The source pattern is composed of:

• A labeled set of types coming from the source metamodels

• A guard (Boolean expression) used to filter matches

A match corresponds to a set of elements coming from the source models that:

• Are of the types specified in the source pattern (one element for each type)

• Satisfy the guard

Page 29: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Declarative rules: target pattern

The target pattern is composed of: • A labeled set of types coming from the target

metamodels

• For each element of this set, a set of bindings

• A binding specifies the initialization of a property of a target element using an expression

For each match, the target pattern is applied: • Elements are created in the target models (one

for each type of the target pattern)

• Target elements are initialized by executing the bindings: First evaluating their value

Then assigning this value to the corresponding property

Page 30: BOM2UML: Integrating BOM Specifications into UML-based Development Environments

Example ATL rule rule UMLInteractionOverview{

from patternOfInterplay:BOMs!PatternOfInterplay

to initialNode:UML!InitialNode(name<‐patternOf-

Interplay.Name+'InitialNode'),

finalNode:UML!ActivityFinalNode(

name<‐patternOfInterplay.Name+'FinalNode')

do {

‐‐defining a Decision Node for each Pattern Action

for(pattern in atternOfInterplay.Pattern2PatternAct){

‐‐setting the decision index with the action index

thisModule.indexDecision<‐patternOfInterplay.Pattern-

2PatternAct.indexOf(pattern);

‐‐instantiating a Decision Node per each Pattern Action

thisModule.UMLDecisionNode();

thisModule.entityNameType<‐'PatternAction';

}