evaluationofuml-rtand papyrus-rtformodelling self ... · evaluationofuml-rtand...
TRANSCRIPT
![Page 1: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/1.jpg)
Evaluation of UML-RT andPapyrus-RT for ModellingSelf-Adaptive Systems
Nafiseh Kahani, Nicolas Hili, James R. Cordy, Juergen Dingel{kahani,hili,cordy,dingel}@cs.queensu.ca
School of Computing, Queen’s University,Kingston, Ontario, Canada
MiSE WorkshopMay, 2017
![Page 2: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/2.jpg)
Self-Adaptive Software (SAS) Systems
SAS systems can adapt their behaviour, because ofevolving their current configurations or in response tothe changing environment’s context to provide the re-quired services and maintain the intended properties.
This capability can be achieved by recon-sidering environmental or system require-ments, and then applying the proper adap-tation process to cope with the changingconditions.
Introduction & Motivation Context March, 2017 2 / 18
![Page 3: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/3.jpg)
Problem Statement
Design Complexity
� The uncertain and dynamic nature of SAS systems makes their design a complextask.
t
Model-Driven Engineering (MDE)
X MDE techniques can be applied to manage the increased design complexityposed by the adaptation process and increase reliability. However. . .
t
Suitability ?
ß Despite a strong interest in modelling SAS systems for real-time, few evaluationsof modelling languages exist to assess their suitability for providing an appropriateset of concepts for modelling adaptations.
Introduction & Motivation Problem Statement March, 2017 3 / 18
![Page 4: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/4.jpg)
Objectives
/ Evaluation of the suitability of UML for Real-Time (UML-RT) featuresfor modelling SAS systems;
ß Each feature is related to the structural and behavioural adaptations itcovers.
/ Assessment of the current state of support of these features by EclipsePapyrus for Real-Time (Papyrus-RT).
Introduction & Motivation Objectives March, 2017 4 / 18
![Page 5: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/5.jpg)
Outline
Introduction & MotivationContextProblem StatementObjectives
UML for Real-Time (UML-RT)UML-RT: History and Core ConceptsSupporting Adaptations
Structural AdaptationsBehavioural Adaptations
Evaluation
Conclusion
UML for Real-Time March, 2017 5 / 18
![Page 6: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/6.jpg)
UML-RT: History
I Real-time Object-Oriented Modeling (ROOM)I Early 1990 tiesI ObjecTime Ltd
I Major influence on UML 2
I Supported by many tools:I Rational Rose for Real-Time (RoseRT)I RSARTEI Eclipse Papyrus for Real-Time (Papyrus-RT)
[SGW94] B. Selic, G. Gullekson, and P.T. Ward.
Real-Time Object-Oriented Modelling. Wiley. 1994
UML for Real-Time UML-RT: History and Core Concepts March, 2017 6 / 18
![Page 7: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/7.jpg)
UML-RT: Core Concepts
[Dingel17] Dingel, J. (2017). CISC836: Models inSoftware Development: Methods, Techniques and Tools
• System: collection of capsules (instances) communicating via messages• Capsule (instances):
◦ Active class (object) whose behaviour is defined by a state machine◦ Communicates by sending and receiving messages through its ports
• Port: typed by protocol defining input and output messages• State machine:
◦ Transition triggered by incoming messages◦ Action code contains statements that send messages over certain ports
UML for Real-Time UML-RT: History and Core Concepts March, 2017 7 / 18
![Page 8: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/8.jpg)
UML-RT Example
PingPong
pinger: Pinger [1] ponger: Ponger [1]
p: P [1]
p: ~P [1]
Notation:
C Capsule
c: C [1] Capsule part (aka.Capsule instance)
p: P [1]
base port
p: ~P [1]
conjugatedport
connector
Playing
entry/p.ping().send();
p.pong() /
Playing
p.ping() /p.pong().send();
UML for Real-Time UML-RT: History and Core Concepts March, 2017 8 / 18
![Page 9: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/9.jpg)
Taxonomy of Adaptations for Modelling SAS Systems
Adaptation
Structural Behavior
Static Dynamic Static Dynamic
Component Connector Component Connector Component Connector Component Connector
Create/remove/update Behavior adaptation Behaviorreconfiguration
Messagere-routing
«uml-rt»Static replicationConnectors
«papyrus-rt»RTS support
«uml-rt»Optional capsulesSAP/SPP communication
«papyrus-rt»Frame service portSAP/SPP ports
«uml-rt»Hierarchical state machineCapsule/State machine inheritance
«papyrus-rt»Graphical notationPartial support of inheritance
«uml-rt»Protocol inheritance
«papyrus-rt»Partial support
«uml-rt»No support
«papyrus-rt»No support
«uml-rt»No explicit support
«papyrus-rt»Defer & recall
UML for Real-Time Supporting Adaptations March, 2017 9 / 18
![Page 10: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/10.jpg)
Case Study: Adaptive Failover System
/ Failover: a system involving a set of component servers to handle clientrequests;
/ Goal: maximizing availability when designing fault-tolerant systems;/ Two different replication modes:
I Passive replication: one master serverand m = (n − 1) backup servers;
I Active replication: all the servers canprocess client requests.
M
B1 B2 B3 . . . Bm
C1 C2 C3 C4 C5 . . . Cp
Bi : ith backup serverM: master serverCj : jth client
S1 S2 S3 . . . Sn
C1 C2 C3 C4 C5 . . . Cp
Si : ith serverCj : jth client
UML for Real-Time Supporting Adaptations March, 2017 10 / 18
![Page 11: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/11.jpg)
Static Structural Adaptations for Comps.& Connectors
M
B1 B2 B3 B4 B5
o
Failover
backup: Server [5]backup: Server [5] master: Server [1]
pServer: P [1] pServer: ~P [5]
Static replication:I ≈ multiplicity of a capsule part/port;I Statically defined within the model;I Action language:
// Without replicationpServer .msg ().send () // unicast
// With replicationpServer .msg ().send (); // broadcastpServer .msg (). sendAt ( index ); // unicast
I No support for unrelated connectors
UML for Real-Time Supporting Adaptations March, 2017 11 / 18
![Page 12: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/12.jpg)
Dynamic Structural Adaptations for Components
M
B1 B2 B3 B4 B5
o
Failover
backup: Server [0..n]backup: Server [0..n] master: Server [1]
pServer: P [1] pServer: ~P [5]
Notation: c: C [0..n] Optionalcapsule part
Dynamic replication:I Optional/plugin capsules;I Dynamically created instances at
run-time;I Action language
Incarnation:
// Incarnating a capsuleUMLRTCapsuleId backupId =
frame . incarnate (backup , Server );
if (! backupId . isValid ())context () ->perror (" incarnate failed .");
printf (" capsule : @%p\n",backupId . getCapsule ());
Destruction:
// Destroying a capsuleif (! frame . destroy ( backupId ))
context () ->perror (" destroy failed .");
UML for Real-Time Supporting Adaptations March, 2017 12 / 18
![Page 13: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/13.jpg)
Dynamic Structural Adaptations for Connectors
M
B1 B2 B3 B4 B5
o
Failover
backup: Server [0..n]backup: Server [0..n] master: Server [1]
pServer: P [1] pServer: ~P [n]
Notation: SPP port (conjugated)
SAP port (base)
Dynamic binding:I SAP/SPP ports;I Capsule parts are dynamically bound
at run-time (no explicit connectors);I SAP/SPP ports act like normal ports
(no specific action language).
Specific constraints:I One SPP port can be bound to
several SAP ports;I Ports must have the same type and
name;UML for Real-Time Supporting Adaptations March, 2017 13 / 18
![Page 14: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/14.jpg)
Static & Dynamic Behavioural Adaptations
Static adaptations:I Component:
I Hierarchical state machines;I Component / State machine
inheritance.I Connector:
I protocol inheritance.
Server State machine
RunAsServer RunAsBackup
failureRunning Recovering
recover
Running Recoveringfailure
recover/recall
*/defer. . .
// Deferring messagesmsg -> defer ();
// Recalling messages from a portport -> recall (...)
Dynamic adaptations:I Component:
I No support for behaviouralreconfiguration (≈ traits).
I Connector:I No explicit support in UML-RT;I Refer/recall mechanism.
UML for Real-Time Supporting Adaptations March, 2017 14 / 18
![Page 15: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/15.jpg)
ImplementationsSimulator
server1:Server
server2:Server
Backup
Backup
Server1Communication
client:Client[5]
Server2Communication
ConfigCommunication[7]
ENV
[5]
[5]
Failover w/o load balancer Failover with load balancer
Class diagram inheritance
Standby timeout/...Request/...timeout/...
TryBeMaster
Failure
RunAsMaster
RunAsBackup
KeepAliveMsg
PurgeOtherMsgs
Initial
Initial
ReturntoBackup
ReturntoBackup
Backup
NoKeepAlive
CheckConfiguration
ReturnToMaster RecoveryActiveMode
ExitPoint
EntryPoint
PassiveMode
ServerFailureBeMaster
BeMaster
CheckNoMaster
MasterRecoverd
BeBackup
Server state machine
Static replication
SAP/SPPOptional capsules
Capsule inheritance
Composite state
Defer &Recall
UML for Real-Time Evaluation March, 2017 15 / 18
![Page 16: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/16.jpg)
Evaluation
Adaptation
Structural Behavior
Static Dynamic Static Dynamic
Component Connector Component Connector Component Connector Component Connector
Create/remove/update Behavior adaptation Behaviorreconfiguration
Messagere-routing
«uml-rt»Static replicationConnectors
«papyrus-rt»RTS support
«uml-rt»Optional capsulesSAP/SPP communication
«papyrus-rt»Frame service portSAP/SPP ports
«uml-rt»Hierarchical state machineCapsule/State machine inheritance
«papyrus-rt»Graphical notationPartial support of inheritance
«uml-rt»Protocol inheritance
«papyrus-rt»Partial support
«uml-rt»No support
«papyrus-rt»No support
«uml-rt»No explicit support
«papyrus-rt»Defer & recall
UML for Real-Time Evaluation March, 2017 16 / 18
![Page 17: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/17.jpg)
Evaluation
Adaptation
Structural Behavior
Static Dynamic Static Dynamic
Component Connector Component Connector Component Connector Component Connector
Create/remove/update Behavior adaptation Behaviorreconfiguration
Messagere-routing
«uml-rt»Static replicationConnectors
«papyrus-rt»RTS support
«uml-rt»Optional capsulesSAP/SPP communication
«papyrus-rt»Frame service portSAP/SPP ports
«uml-rt»Hierarchical state machineCapsule/State machine inheritance
«papyrus-rt»Graphical notationPartial support of inheritance
«uml-rt»Protocol inheritance
«papyrus-rt»Partial support
«uml-rt»No support
«papyrus-rt»No support
«uml-rt»No explicit support
«papyrus-rt»Defer & recall
UML for Real-Time Evaluation March, 2017 16 / 18
![Page 18: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/18.jpg)
Evaluation
Adaptation
Structural Behavior
Static Dynamic Static Dynamic
Component Connector Component Connector Component Connector Component Connector
Create/remove/update Behavior adaptation Behaviorreconfiguration
Messagere-routing
«uml-rt»Static replicationConnectors
«papyrus-rt»RTS support
«uml-rt»Optional capsulesSAP/SPP communication
«papyrus-rt»Frame service portSAP/SPP ports
«uml-rt»Hierarchical state machineCapsule/State machine inheritance
«papyrus-rt»Graphical notationPartial support of inheritance
«uml-rt»Protocol inheritance
«papyrus-rt»Partial support
«uml-rt»No support
«papyrus-rt»No support
«uml-rt»No explicit support
«papyrus-rt»Defer & recall
UML for Real-Time Evaluation March, 2017 16 / 18
![Page 19: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/19.jpg)
Evaluation
Adaptation
Structural Behavior
Static Dynamic Static Dynamic
Component Connector Component Connector Component Connector Component Connector
Create/remove/update Behavior adaptation Behaviorreconfiguration
Messagere-routing
«uml-rt»Static replicationConnectors
«papyrus-rt»RTS support
«uml-rt»Optional capsulesSAP/SPP communication
«papyrus-rt»Frame service portSAP/SPP ports
«uml-rt»Hierarchical state machineCapsule/State machine inheritance
«papyrus-rt»Graphical notationPartial support of inheritance
«uml-rt»Protocol inheritance
«papyrus-rt»Partial support
«uml-rt»No support
«papyrus-rt»No support
«uml-rt»No explicit support
«papyrus-rt»Defer & recall
UML for Real-Time Evaluation March, 2017 16 / 18
![Page 20: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/20.jpg)
Evaluation
Adaptation
Structural Behavior
Static Dynamic Static Dynamic
Component Connector Component Connector Component Connector Component Connector
Create/remove/update Behavior adaptation Behaviorreconfiguration
Messagere-routing
«uml-rt»Static replicationConnectors
«papyrus-rt»RTS support
«uml-rt»Optional capsulesSAP/SPP communication
«papyrus-rt»Frame service portSAP/SPP ports
«uml-rt»Hierarchical state machineCapsule/State machine inheritance
«papyrus-rt»Graphical notationPartial support of inheritance
«uml-rt»Protocol inheritance
«papyrus-rt»Partial support
«uml-rt»No support
«papyrus-rt»No support
«uml-rt»No explicit support
«papyrus-rt»Defer & recall
UML for Real-Time Evaluation March, 2017 16 / 18
![Page 21: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/21.jpg)
Evaluation
Adaptation
Structural Behavior
Static Dynamic Static Dynamic
Component Connector Component Connector Component Connector Component Connector
Create/remove/update Behavior adaptation Behaviorreconfiguration
Messagere-routing
«uml-rt»Static replicationConnectors
«papyrus-rt»RTS support
«uml-rt»Optional capsulesSAP/SPP communication
«papyrus-rt»Frame service portSAP/SPP ports
«uml-rt»Hierarchical state machineCapsule/State machine inheritance
«papyrus-rt»Graphical notationPartial support of inheritance
«uml-rt»Protocol inheritance
«papyrus-rt»Partial support
«uml-rt»No support
«papyrus-rt»No support
«uml-rt»No explicit support
«papyrus-rt»Defer & recall
UML for Real-Time Evaluation March, 2017 16 / 18
![Page 22: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/22.jpg)
Outline
Introduction & MotivationContextProblem StatementObjectives
UML for Real-Time (UML-RT)UML-RT: History and Core ConceptsSupporting Adaptations
Structural AdaptationsBehavioural Adaptations
Evaluation
Conclusion
Conclusion March, 2017 17 / 18
![Page 23: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/23.jpg)
Summary
, Evaluation of the suitability of UML for Real-Time (UML-RT) featuresfor modelling SAS systems;
ß Most of the adaptations are covered by UML-RTß UML-RT still lacks of support for behavioural adaptation at run-time
, Assessment of the current state of support of these features by EclipsePapyrus for Real-Time (Papyrus-RT);
ß Mostly supported by service ports and the RTSß Some RTS mechanisms can be used to support behavioural adaptations
Conclusion March, 2017 18 / 18
![Page 24: EvaluationofUML-RTand Papyrus-RTforModelling Self ... · EvaluationofUML-RTand Papyrus-RTforModelling Self-AdaptiveSystems ... Introduction&MotivationProblemStatement March,2017 3/18](https://reader031.vdocuments.us/reader031/viewer/2022022518/5b0d8b387f8b9a952f8da7f7/html5/thumbnails/24.jpg)
Thank you !