Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to...

35
Using UML-based Framework to Integrate Real-Time Object-Oriented Programing Models Carlos Eduardo Pereira e Leandro Buss Becker [email protected] [email protected] Electrical Engineering Department Computer Science Institute Universidade Federal do Rio Grande do Sul - UFRGS Brazil

Transcript of Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to...

Page 1: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Using UML-based Framework to Integrate Real-Time Object-Oriented

Programing Models

Carlos Eduardo Pereira e Leandro Buss [email protected] [email protected]

Electrical Engineering Department Computer Science Institute

Universidade Federal do Rio Grande do Sul - UFRGS Brazil

Page 2: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Agenda!Historical Overview

!OO Requirements Specification and Validation!Methodology, AO/C++!SIMOO, SIMOO-RT

!Current Work!SIMOO/RT-Deployment Diagram!Integrated Scheduling, QoS!HW-Coprocessors

!Conclusions

Page 3: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Historical Perspective→Research work has started on 1990: PhD thesys

→Context: few OOA methods (Coad/Yourdon, Shlaer/Mellor, OMT, ...), no UMLS

→Main goal: how to apply OO to the development of distributed real-time systems (DRTS) with special emphasys for industrial automation systems

Page 4: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Historical Perspective! Results of a state-of-the-art analysis in 1991:

OO is very suitable for modeling DRTSSemantic mapping of automation equipmentsReuse/Inheritance/ExtensionsMajor Drawbacks:

Timing requirements specificationRequirements validation and verificationCASE tool supportRuntime support for distributed objects

Page 5: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Historical Perspective⇒ Proposal made in 1992 (presented at OOPSLA -

Workshop on RT Analysis and Design Methods):Notation for describing timing requirements

Based on RTLTradeoff: understandable vs. verifiablePeriodical activities, synchronization, end-to-end requirements (between events)

Page 6: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Historical Perspective• Research work during 92-94:

• Requirements verification (use of Constraint Propagation algorithms - CobaltBlue)

• Requirements validation through simulation• RT-extension to C++ (AO-C++)

Page 7: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Historical PerspectiveAO/C++

Main idea: mapping of OO "logical concurrency"to "physical concurrency" in RT-UNIX (QNX)

Use of keywords (keep it as simpler as possible)

Page 8: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

active class Sensor {private:

Conveior REF theConveyor; //references to other objectsArm REF theArm;

public:void DetectWorkPiece(cycle_t){ //Time-triggered Method

// initialization codebegin_cycle

// cyclic operationend_cycle}

void StoreWorkPiece(dead_l){ //Method with deadline// exception code

begin_exception// exception code

end_ exception} };

AO/C++ code example

Page 9: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Historical PerspectiveAO/C++

Parser translates .ph .pC files into:Skeleton, stubs, ...

=> similarities with CORBA IDL <=

Papers: QNX93 and ACM SIGPLAN Workhop on Algorithms and Workshop on Languages, Compiler, and Tool Support for Real-Time Systems.

Page 10: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Pre-processing transformations:

Sensor.(ph;pC)

active class Sensor

Parser

Sensor.hclass Sensor

class SensorProc

Sensor.Cclass Sensor

SensorProc.Cclass SensorProc

SensorMain.C

Page 11: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Historical Perspective1996-1997: SIMOO Environment

Object-Oriented modeling toolSimulation tool

Page 12: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

SIMOO Model Editing Tool (MET)

Structure modeling: Classes and Instances diagram

Page 13: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Simulation/animation output:

Page 14: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Historical Perspective1998-1999: SIMOO-RT

• Timing requirements specification• Behavior definition with state-machines• Functional specification with use-cases and MSD• Consistence checking based in Meta-model• Automatic Code Generation in AO/C++

Page 15: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Timing specification: special atributes

• Timed operations (deadline)

• Default value for the class

• Exception handling code

• Cyclic operations

Page 16: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Behavior Specification: State-Transition Diagrams

Sensorn

Page 17: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Behavior Specification: C++ Templates

Page 18: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Functional specification: use-cases editor

Page 19: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Meta-Model

: Classe A : Classe B : Classe C

1: mensagem 1

2: mensagem 2

3: mensagem 3

4: mensagem 4

: Classe A : Classe B

: Classe C

1: mensagem 1

2: mensagem 2

3: mensagem 3

4: mensagem 4

Classe2

Verifica () : Boolea

Anotações

Classe3 Classe4

Generaliza

Classe1Atributo 1 : Tipo = ValorInicial

Método (ListaArgumentos) : RetornoTipo

Classe5

1

0..*

1

0..*{Se Classe1.Classe2.Verifica for "True" então Classe1.atributo1= 1}

Operando

Alarmada

Alarme

Máquina Silenciada

Silenciar_Alarme

Fim_Alarme

Máquina Estragada

Desligada

DesligarDesligar

Manutenção

Problema

ManutençãoFim_Manutenção

Conditionname

Atributename : stringcontrol : string

1..*

Componentname : stringtype : string

1..*

1..*

Processname : stringscheduling : string

1..*

1..*

1..*

Devicename : string

1..*

Use Casename : stringfunctionality : string1..*

0..*0..*

0..*

0..*1..* Relationship

name : stringtype : string

0..*

0..*

0..*1..*

1..*

0..*

Actorname : string

1..*0..*

1..*

Object

1..*

ObjectReciver1..*

Argumentname : string

0..*

1..1

1..*Classtype : stringcontrol : stringabstract : boolean = nil

1..*

1..1

1..*

0..*

1..1

ObjectSender

1..*

1

1..*

1..*1

Methodname : stringcontrol : string

0..*

1..* 1..1

1..*1

1

1

Timertime

1

1

1

Meta-M

odel

Meta-M

odel

Met

a-M

odel

Consistency Checking

Meta-Model

Page 20: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

RT-code Generation: AO/C++ program

Structure

SIMOO-RT

Behavior

Functionalities

RT Application

AO/C++ Classesand

Makefile

Pre-processorInstrumentedC++ Classes

C++ Compiler

Page 21: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Current work• Further extensions to SIMOO-RT:

• Instrumentation: Gergeleit (ISORC 99 + special issue)

Page 22: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Instrumentation: Validation of the temporal requirements

O-O Design

SIMOO-RT

DistributedC++ Program

AO/C++

Functional andTiming Description

in AO/C++

MonitoringDescription

mc4pInstrumented,

DistributedC++ Program

QNX withJewel Sensor/Global Time

Jewel Visualization

O-O Event Traces

Feedback into the Design

Page 23: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Current work• Further extensions to SIMOO-RT

• Instrumentation: Gergeleit (ISORC 99 + special issue)• Use cases + EDFDs: Automation Object Identification

(ISORC 00 + AARTC 00 best paper)

Page 24: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

MOSYS Design Methodology

• Functional model is mapped into a graph description

• A graph partition is carried out according to different criteria, leading to different possible task clustering

• Clustering criteria:• min-cut algorithm (enhance object autonomy)• number of objects (suggested by the designer)• object weight balance (in the algorithm)

Page 25: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Example of automatic architecture

:obj3

p1p5p7p8p9p21p22

at1at5at7at8at9at21at22

:r_linsen

:pcline

:obj2

p10p11p12p13p18p19p26

at10at11at12at13at18at19at26

:obj1

at4at14at15at16at17at23

p4p14p15p16p17p23

:obj4

p2p3p6p20p24p25

at2at3at6at20at24at25

:xlbslf :xlbslr

:lbctll:xlbwdev :xlbdy

:xfillab

:xcbotbs :xlboths :xlbtbs:xlbpsupp :xlbfs :elbolb :xlbjs :xlbnst

Page 26: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Current work• Further extensions to SIMOO-RT

• Instrumentation: Gergeleit (ISORC 99 + special issue)• Use cases + EDFDs: Automation Object Identification

(ISORC 00 + AARTC 00 best paper)• Supervisory systems (WORDS 99)

Page 27: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Proposed Environment:

IndustrialPlant

OOModels

Simulation

Visualization

Customer Designer

CodeGeneration

Multi/Mono Processor

SupervisoryModel

Visualization

Operator

Control

Computer-basedReal-time System

Page 28: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Current work• Further extensions to SIMOO-RT

• Instrumentation: Gergeleit (ISORC 99 + special issue)• Use cases + EDFDs: Automation Object Identification

(ISORC 00 + AARTC 00 best paper)• Supervisory systems (WORDS 99)• Deployment Diagram

Page 29: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Mapping Objects to Processors

inheritance

aggregationclass2

class3

class4

class5

class6

class7

aggregation

class1 OO model

targetarchitecture

Page 30: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Deployment diagram

Page 31: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Current work• Further extensions to SIMOO-RT

• Instrumentation: Gergeleit (ISORC 99 + special issue)• Use cases + EDFDs: Automation Object Identification

(ISORC 00 + AARTC 00 best paper)• Supervisory systems (WORDS 99)• Deployment Diagram• Code generator:

• Linux/TCP, mLinux/CAN• Future work: TAO (RT-CORBA), RT-JAVA

Page 32: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Current work• Further extensions to SIMOO-RT

• Instrumentation: Gergeleit (ISORC 99 + special issue)• Use cases + EDFDs: Automation Object Identification

(ISORC 00 + AARTC 00 best paper)• Supervisory systems (WORDS 99)• Deployment Diagram• Code generator:

• Linux/TCP, mLinux/CAN• Future work: TAO (RT-CORBA), RT-JAVA

• Mapping timing requirements to QoS specifications

Page 33: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Current work• Further extensions to SIMOO-RT

• Instrumentation: Gergeleit (ISORC 99 + special issue)• Use cases + EDFDs: Automation Object Identification

(ISORC 00 + AARTC 00 best paper)• Supervisory systems (WORDS 99)• Deployment Diagram• Code generator:

• Linux/TCP, mLinux/CAN• Future work: TAO (RT-CORBA), RT-JAVA

• Mapping timing requirements to QoS specifications• From QoS specs to Integrated Scheduling of Processes

and Messages => Mode-change, adaptive schedule (based on sound RT scheduling theory)

Page 34: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Current work• HW-Support

• Low-cost board (microcontroler-based) for running distributed objects (RT-mLinux, CAN)

• Scheduler co-processor (handling of event-based and time-based activation of tasks, scheduling, measurement of rutime execution times)

Page 35: Using UML-based Framework to Integrate Real-Time Object ......Current work •Further extensions to SIMOO-RT •Instrumentation: Gergeleit (ISORC 99 + special issue) •Use cases +

Final Remarks• Drawbacks identified in 90s were only partly

solved and remain a challenge• RT-DOC has increased interest of research

community (this workshop is a good example)• Good: more people and more funding• Bad: proliferation of non technical papers