ufrgs simoo-rt an integrated object-oriented environment for the development of distributed...
TRANSCRIPT
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
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
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
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
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
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)
UFRGS
SIMOO-RT ModelEditing Tool
SIMOO-RT State-TransictionDiagram Editor
Overview of SIMOO-RT Environment
UFRGS
SIMOO-RT: Specification of temporal aspects
• Timed operations (deadline)
• Default value for the class
• Handling code
• Cyclic operations
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
UFRGS
Behavior Specification: State-Transition Diagram Editor
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.
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
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
UFRGS
SIMOO-RT instance attributes
• Priority
• Execution node
UFRGS
Case Study: Liquid-level Control System
UFRGS
Simulation model
Visualization attribute
Simulator class
UFRGS
Simulation/animation overview
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
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();}
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)
UFRGS
• Robotic Manufacturing Cell
• Distributed Elevator Control
Others case-studies developed
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
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