35
Supervised By: Dr. Juergen Dingel Suchita Ganesan, Laith “Leo” Juwaidah, Nondini Das Madiha Kazmi, Mojtaba Bagherzadeh Model-Based Monitoring for PapyrusRT 1

Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

Embed Size (px)

DESCRIPTION

Mission:Dignity Ministry Mission:Dignity TM Ministry  Provides approximately $7 million in financial aid each year  Mission:Dignity receives no Cooperative Program funds  All funding comes from direct gifts of individuals and churches  100% of gifts help someone in need A15-2

Citation preview

Page 1: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

1

Supervised By: Dr. Juergen DingelSuchita Ganesan, Laith “Leo” Juwaidah, Nondini DasMadiha Kazmi, Mojtaba Bagherzadeh

Model-Based Monitoring for PapyrusRT

Page 2: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

2

• Introduction to MDE•UML-RT and PapyrusRT• Research project goals• Implementation details•Demo• Challenges and Solutions•Next steps•Questions

Outline

Page 3: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

3

The Problem

Page 4: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

4

• Code is generated from model

• Documentation and code are always in sync

• Forces in-depth analysis of requirements

Why MDE?

Page 5: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

5

UML-RT and PapyrusRT

Page 6: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

6

• UML is enormously convenient for communicating design concepts

• Real time systems are huge and complex

• UML-RT is a profile of UML for real-time embedded systems

• Supports encapsulation and reuse

Why UML-RT?

Page 7: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

7

Structure

Page 8: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

8

Behaviour

Page 9: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

9

• UML-RT

• Open source Eclipse plugin

• Real-time variation

PapyrusRT

Page 10: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

10

Research Project Goals

Page 11: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

11

• UML-RT profile allows the specification of timing and resource information in the model• Determining the correctness of this information on the

model-level is impossible

Problem Statement

Page 12: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

12

•Different components of a large-scale model often need to be integrated• Creating these models can be problematic

Problem Statement

Page 13: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

13

•Monitoring the generated code can be used for:• Model debugging• Model refinement• Runtime verification• Monitoring performance

Solution

Page 14: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

14

Implementation Overview

Monitoring UICode Generation

Trace Display

Page 15: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

15

Workflow

Run and trace the code with LTTng

Display traces on model level

Code-generation feature of PapyrusRT

UI for monitoring configuration

Model with Monitoring Information

MO

DEL

LEVE

LCO

DE L

EVEL

Generated Trace Files

Code with Tracepoint Files

UML-RT Model

Model with Trace Results

UI for monitoring configuration

Page 16: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

16

• Monitoring UI

Profiled Model

• Code Generation

LTTng-Ready Code

• Trace Display

Model with Trace Info.

Monitoring UI

Page 17: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

17

• Provide a monitoring UI

• Provide feedback

Monitoring UI – Goals

Page 18: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

18

Monitoring UI – Monitoring Configuration

Page 19: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

19

Monitoring UI – Overview

UML-RT Model in PapyrusRT

• PapyrusRT

Extract information from model

• SAX Parser

User selects the elements to be

monitored

• Eclipse Plugin

Update the stereotypes of

selected elements

• UML Profiles

Page 20: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

20

• Created a UI for the user to select elements they want to monitor• Currently, the user is presented with a list of elements

• The UI updates the values of stereotype properties

• Indicate elements selected to be monitored

Monitoring UI – Current Progress

Page 21: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

21

• Monitoring UI

Profiled Model

• Code Generation

LTTng-Ready Code

• Trace Display

Model with Trace Info.

Code Generation

Page 22: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

22

• Modify the code generator to produce LTTng-ready code

Code Generation – Goals

Page 23: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

23

Capsule_Workstation::State Capsule_Workstation::state_____top__Workstation_Producing( const UMLRTMessage * msg ){ tracepoint( ActiveState__Workstation__Workstation_Producing_provider, ActiveState__Workstation__Workstation_Producing_tracepoint, "ActiveState__Workstation__Workstation_Producing" ); switch( msg->destPort->role()->id ) { case port_ProductionTimer: switch( msg->getSignalId() ) { case UMLRTTimerProtocol::signal_timeout: tracepoint( MessageReceived__Workstation__Workstation_finished_provider, MessageReceived__Workstation__Workstation_finished_tracepoint, "MessageReceived__Workstation__Workstation_finished" ); actionchain_____top__Workstation_finished__ActionChain4( msg ); return top__Workstation_Standby; default: this->unexpectedMessage(); break; } return currentState; default: this->unexpectedMessage(); break; } return currentState;}

Code Generation – Example

Page 24: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

24

• Monitoring profile

• Custom stereotypes

• Interface with the UI

• Extend the code generator

Code Generation – Approach

Page 25: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

25

Profiled model

• UML profiles

Add tracepoints

to code• Xtend

Generate LTTng-ready

code• LTTng

Code Generation – Overview

Page 26: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

26

• Created profiles with stereotypes for behavioural elements

• Add trace points to behavioural elements

• Generate LTTng ready code

Code Generation – Current Progress

Page 27: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

27

• Monitoring UI

Profiled Model

• Code Generation

LTTng-Ready Code

• Trace Display

Model with Trace Info.

Trace Display

Page 28: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

28

• Monitor generated code

• Collect the monitoring information

• Display the traces on the model

Trace Display – Goals

Page 29: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

29

Trace Display – Overview

Append LTTng script to the

code generator• Xtend

Run the generated code

and generate trace file

• LTTng

Parse the trace file

• Trace Compass

Display traces on the model

• Eclipse Plugin

Page 30: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

Trace Display – Current Progress

30

• Wrote a script to automate the monitoring process• The script is generated along with the code

• Using Trace Compass library to parse the generated trace file

• Trace results are displayed on the model

Page 31: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

31

Demo

Page 32: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

32

• Top capsule contains Control Software and Production Line capsules• Control Software controls other capsules• Production Line contains Workstation and Robot

capsules• Workstation capsule produces widgets• Robot capsule delivers widgets

Widget Production

Page 33: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

33

• PapyrusRT is work in progress• Communication with the developers

• Defining an interface for the process flow• Decided with creation of profiles

• Unfamiliarity with Eclipse plugin development• Various approaches

• Accessing elements in the active editor• Still unsolved

Challenges and Solutions

Page 34: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

34

• Monitoring UI• Provide UI for monitoring structural elements• Replace lists of elements with a friendlier UX• Eliminate the need to specify files

• Code generation• Monitoring structural components• Support different types of monitoring

• Monitoring and displaying of results• Support live and network tracing• Improve the UI• Switching between diagrams as necessary• Analysis of trace

Next Steps

Page 35: Mission Dignity Catalogue code: A15 Full presentation or module? Module Slide numbers: A15-1 to A15-3 Registered/Non-Registered Usage: All (Choices: registered

35

Questions