24
UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1 , C. E. Pereira 1 1) Instituto de Informática - PPGC - UFRGS 2) Departamento de Engenharia Elétrica - UFRGS

UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

Embed Size (px)

Citation preview

Page 1: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS SIMOO-RTAn Integrated Object-Oriented Environment

for the Development of Distributed Real-Time Systems

L. B. Becker1, C. E. Pereira1

1) Instituto de Informática - PPGC - UFRGS2) Departamento de Engenharia Elétrica - UFRGS

Page 2: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Presentation Overview

• Introduction

• State-of-Art Analysis: OO Modeling Tools

• The SIMOO-RT Environment

• Case Study: Liquid-level Control System

• Conclusions and Future Works

Page 3: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Introduction

• Modern industrial automation systems have achieved a high level of complexity

• Object-orientation has been considered a suitable approach for dealing with such complex real-time applications

• Development methods and tool support are required

Page 4: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

State-of-Art Analysis: OO Modeling Tools

• Analysed tools: SIMOO, ObjecTime, Rational Rose

• Points of interest:– OO modeling support– Simulation/Animation support– High level behavior/temporal specification– RT-distributed code generation– Low-cost tool

Page 5: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Tools Comparison

Items: SIMOO ObjecTime Rational

OO Modeling Behavior Specification C++ code Roomcharts StatechartsTemporal Specification - Timers -Simulation -Visualization/Animation Poor - RT-Code Generation - -Cost (U$) nome 25.000 8.000Original Code Access free extra cost closed

Page 6: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

SIMOO-RT Environment

• Tool support for OO modeling , simulation, and implementation

• Main features:– Object-oriented modeling with real-time

constraints (deadlines, cyclic operations)– Behavior description using state-machines and C+

+ code templates– Simulation/animation capability– Automatic code generation (AO/C++ language)

Page 7: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

SIMOO-RT ModelEditing Tool

SIMOO-RT State-TransictionDiagram Editor

Overview of SIMOO-RT Environment

Page 8: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

SIMOO-RT: Specification of temporal aspects

• Timed operations (deadline)

• Default value for the class

• Handling code

• Cyclic operations

Page 9: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Behavior Specification: State-Transition Diagram Editor

PTSen:1PTSen:1 PTBomba:1PTBomba:1n

n

PDriver:1PDriver:1

PDriver:1PDriver:1

PPar:1PPar:1PPar:1

n

PPar:1PPar:1PPar:1

n

n

PBomba:1PBomba:1PSNivel:1PSNivel:1PSNivel:1

PBomba:1

n

PDriver:1 PTBomba:1

n

PTSen:1

n

Sensor

PDriver:1

n

Page 10: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Behavior Specification: State-Transition Diagram Editor

Page 11: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

AO/C++ target language

• Combines OO properties of C++ with benefits of Unix-RT OS:– maps 'logically distributed' OO model of C++, with

'physically distributed' process-oriented model of Unix-RT

• Adds primitives to C++ to allow definition of active objects, time-triggered methods, timing constraint specifications (e.g. deadline and its related exception handling code), etc.

Page 12: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

active class Sensor {private:

// references to other objectsEsteira REF theConveyor;Braco REF theArm;

...// other attributes and private operationsint status;

public:int sensor_ID; void DetectWorkPiece(cycle_t){begin_cycle

// cyclic operationend_cycle}

}

AO/C++ code example

Page 13: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Runtime Environment

• AO/C++ programs are parsed and converted to standard C++ with calls to an underlying runtime environment (e.g. QNX, Linux-RT)

• Special C++ instances allows a transparent remote method invocation of ‘active class’ methods

• Adopts a single-thread approach

Page 14: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

SIMOO-RT instance attributes

• Priority

• Execution node

Page 15: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Case Study: Liquid-level Control System

Page 16: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Simulation model

Visualization attribute

Simulator class

Page 17: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Simulation/animation overview

Page 18: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

PTSen:1PTSen:1 PTBomba:1PTBomba:1

TelaSNivel

n

TelaBomba

n

PDriver:1PDriver:1

PDriver:1PDriver:1

PPar:1PPar:1

DrvBomba

PPar:1

n

PPar:1PPar:1

DrvSensor

PPar:1

n

PortaPar

n

PBomba:1PBomba:1PSNivel:1PSNivel:1

Tanque

PSNivel:1PBomba:1

n

Bomba

PDriver:1 PTBomba:1

n

SNivel

PTSen:1

n

Sensor

PDriver:1

n

SisTanque

Implementation: redefinition of original model

Interface classes

Visualization Classes

Page 19: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Implementation: code redefinition

Simulation code:void Tanque::DesligarBomba(MSGEA m){ Parametros par; m.Set(Id(),bomba,"DESLIGA", NORMAL_PR,par); Send(m);}

Aplication code:void Tanque::DesligarBomba(){ bomba->Desliga();}

Page 20: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Statistics of the case-study

Simulation Code Execution Code

Items C++/Windows AO/C++ C++/QNX

Code lines 2690 729 2308

Number of Classes 9 10 20

Number of Instances 9 11 22

Levels of Inheritance (max =03/med =02) (max =02/med =01) (max =03/med =02)

Levels of agregation (max =02/med =02) (max =02/med =02) (max =02/med =02)

Page 21: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

• Robotic Manufacturing Cell

• Distributed Elevator Control

Others case-studies developed

Page 22: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGSMain feature: integrated environment

• Integrates SIMOO tool (analysis, simulation) + temporal extentions with AO/C++ distributed execution environment

Conclusions

• SIMOO-RT model and AO/C++ application are strongly coupled:– number AO/C++ code lines is shorter in comparision with C+

+ simulation/execution code

• Project mistakes detection become easier through simulation

Page 23: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS

Future Work

• Research others behavior formalism

• Purpose a methodology to define automatic creation

of interface elements

• Integrate SIMOO-RT code generation with

supervisory tools

Different behavior specification is required to avoid discontinuites between models

Page 24: UFRGS SIMOO-RT An Integrated Object-Oriented Environment for the Development of Distributed Real-Time Systems L. B. Becker 1, C. E. Pereira 1 1) Instituto

UFRGS Take a look at:

Contacts:[email protected]

[email protected]

http://www.inf.ufrgs.br/gpesquisa/simoo