ttool training ii. the turtle profile · ttool training ii. the turtle profile ludovic apvrille -...

71
TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 II. The TURTLE Profile Ludovic Apvrille [email protected] Eurecom, Office 223

Upload: others

Post on 24-Aug-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

TTool Training

II. The TURTLE Profile

Ludovic Apvrille - UML - 2005. Slide #1

II. The TURTLE Profile

Ludovic [email protected]

Eurecom, Office 223

Page 2: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

I. Introduction

�UML Profile�The TURTLE Profile�Design with TURTLE�Analysis with TURTLE

Ludovic Apvrille - UML - 2005. Slide #2

�Analysis with TURTLE�Deployment with TURTLE

Page 3: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

UML Profiles

�UML Profiles are defined as a formal part of the UML 1.4 specification

�Specific way to define the use of the UML �Subset of the UML model elements,

Ludovic Apvrille - UML - 2005. Slide #3

�Subset of the UML model elements, �Specializations of UML concepts, �Limitations and specific requirements for the used concepts, �Extra (meta)attributes that can be added to the UML models

�Must be defined within a metamodel

Page 4: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

UML profiles: Understanding Diagrams

�Common syntax: UML syntax�Except for new elements

�But various semantics

Ludovic Apvrille - UML - 2005. Slide #4

�Various way of making these diagrams�Methodology

� RUP� ROPES� etc.

Page 5: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

UML Profiles for Embedded Systems and Protocols

� Profile for Performance, Scheduling and Time� Profile defined at the OMG� Addresses more specifically real-time systems

� Rose RT Profile� Toolkit

� Capsules

Ludovic Apvrille - UML - 2005. Slide #5

� Capsules� Ports� Protocols� Communication channels

� Methodology� RUP

� TAU G2� Toolkit based on UML 2.0 elements issued from SDL� Methodology

Page 6: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

I. Introduction

�UML Profile�The TURTLE Profile�Design with TURTLE�Analysis with TURTLE

Ludovic Apvrille - UML - 2005. Slide #6

�Analysis with TURTLE�Deployment with TURTLE

Page 7: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Context

�Design of real-time embedded system is complex�Equipments’ heterogeneity�Functionalities to offer are more and more complex

�Actual methodologies

Ludovic Apvrille - UML - 2005. Slide #7

�Are informal (e.g. UML)� No formal validation

�Take into account a limited amount of constraints� Real-time constraints

�Formal methods�Hardly no industrial use

Page 8: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Propositions

� Idea: let us enrich UML� UML operators are informal� UML lacks advanced temporal operators such as time intervals� UML has no methodology (no validation)

� Proposition: Semi-formal UML-based environmentSemantics given by mapping to a Formal Description Technique

Ludovic Apvrille - UML - 2005. Slide #8

� Semantics given by mapping to a Formal Description Technique

� What formal language?� Well-defined formal semantics� Logical and temporal operators� Tools

=> TURTLE UML profile (Timed UML and RT-LOTOS Envir onment)

Page 9: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Methodology

Validation (RTL)Intensive simulationReachability analysis

Formal proofs

Translation to RT-LOTOS

Detailed designActivity diagram

(Behaviour)

Ludovic Apvrille - UML - 2005. Slide #9

DesignClass diagram(Architecture)

AnalysisScenarios

(Behaviour)

Page 10: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

TURTLE: Comparison with UML 1.5

UML 1.5

� Class diagram� Parallelism is implicit� Associations = documentation

TURTLE

� Extended class diagram� Explicit parallelism� Explicit association between classes

(parallelism, synchronization

Ludovic Apvrille - UML - 2005. Slide #10

Associations = documentation

� Behavior diagram� Operation calls� Delay with pre-determined duration

� Industrial tools� Implementation-oriented simulation� Sequence diagram based testing

Explicit association between classes (parallelism, synchronization through gates, etc.)

� Extended activity diagrams� Data sending/ receiving on gates� Advanced temporal operators

� Time intervals

� Tools� TTool + RTL + Aldebaran / CADP� Generation of reachability graphs

Page 11: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Chronology of TURTLE

� 1999� First definition of operators

� 2000 -2001� Definition of a methodology supporting validation� Modeling and translation rules� Translation from TURTLE to RT-LOTOS partially implemented

� 2002� New operators (temporal operators, new diagrams)

Ludovic Apvrille - UML - 2005. Slide #11

� New operators (temporal operators, new diagrams)� Methodological extensions

� 2003� First release of the TURTLE toolkit (Ttool)

� 2004� TURTLE 2.0

� UML 2.0-based extensions

� 2005� TURTLE analysis� TURTLE deployment� Code generation

� Java

Page 12: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Labs and People Involved in TURTLE

� LAAS / CNRS� Jean-Pierre Courtiat

� ENSICA� Pierre de Saqui-Sannes

� Concordia University

Ludovic Apvrille - UML - 2005. Slide #12

� Ferhat Khendek

� ENST� Ludovic Apvrille

� ENST Bretagne� Christophe Lohr

� Alcatel Space Industries� Thesis

Page 13: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

References

� Definition of the profile� L. APVRILLE, J.-P. COURTIAT, C. LOHR, P DE SAQUI-SANNES, “TURTLE: A Real-Time

UML Profile Supported by a Formal Validation Toolkit”, IEEE Transactions on Software Engineering, To appear.

� C. LOHR , L. APVRILLE, P DE SAQUI-SANNES, J.-P. COURTIAT, "New Operators for the TURTLE Profile", 6th IFIP International Conference on Formal Methods for Open Object-based Distributed Systems (FMOODS'03), LNCS, Springer, Paris, France, November 2003.

� L. APVRILLE, P DE SAQUI-SANNES, F. KHENDEK, "TURTLE-P: un profil UML pour la validation d'architectures", 10ème Colloque Francophone sur l'Ingénierie des Protocoles (CFIP'2003), Paris (France), 7-10 Octobre 2003, pp.17-32.P. DE SAQUI-SANNES, L. APVRILLE, C. LOHR, P. SÉNAC, J.-P. COURTIAT, "UML and

Ludovic Apvrille - UML - 2005. Slide #13

� P. DE SAQUI-SANNES, L. APVRILLE, C. LOHR, P. SÉNAC, J.-P. COURTIAT, "UML and RT-LOTOS : An Integration for Real-Time System Validation", European Journal of Automation (JESA), Vol. 36, p. 1029-1042, Ed. Hermès, 2002.

� L. APVRILLE, P. DE SAQUI-SANNES, C. LOHR, P. SÉNAC, J.-P. COURTIAT, "A New UML Profile for Real-time System Formal Design and Validation", Proceedings of the Fourth International Conference on the Unified Modeling Language (UML'2001), Toronto, Canada, October 2001.

� Use of the profile� L. APVRILLE, P DE SAQUI-SANNES, P. SENAC, C. LOHR, "Verifying Service Continuity in

a Satellite Reconfiguration Procedure", Journal of Automated Software, Engineering, Kluver , issue 11:2, 2004.

� L. APVRILLE, P. DE SAQUI-SANNES, P. SÉNAC, C. LOHR, "Reconfiguration dynamique de protocoles embarqués à bord de satellites", Actes du Colloque Francophone sur l'Ingéniérie des Protocoles (CFIP'2002), Montréal, mai 2002.

Page 14: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Online Documentation

http://labsoc.comelec.enst.fr/turtle/HELP/

�Installing TTool�Using TTool

Ludovic Apvrille - UML - 2005. Slide #14

�Using TTool�Examples of TURTLE modeling

Page 15: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

I. Introduction

�UML Profile�The TURTLE Profile�Design with TURTLE�Analysis with TURTLE

Ludovic Apvrille - UML - 2005. Slide #15

�Analysis with TURTLE�Deployment with TURTLE

Page 16: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

A TURTLE Design

�Class diagram�Architecture of the system

� Instances– Tclasses

– Tobjects

Relations between these classes / objects

Ludovic Apvrille - UML - 2005. Slide #16

� Relations between these classes / objects

�Activity diagram�Behavior of classes

Page 17: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Tclasses and Gates

Tclass Id

Attributes Gate

Ludovic Apvrille - UML - 2005. Slide #17

Attributes

Gates

Operations

Behavior Description

InGate

OutGate

Page 18: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Example of Tclasses

Ludovic Apvrille - UML - 2005. Slide #18

Page 19: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Relations between Tclasses: TURTLE’s Composition Operators

� Default relation� Parallel

� Communication relations� Synchro� Invocation

Ludovic Apvrille - UML - 2005. Slide #19

� Invocation� Note: Tclasses exchange information exclusively through communication

gates

� Others� Sequence� Preemption

� There can be only one composition relation between two tclasses

Page 20: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Parallel Composition Operator

Ludovic Apvrille - UML - 2005. Slide #20

Page 21: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Synchronization Composition Operator

�Synchronization between 2 gates of two different tclasses

�Data can be exchanged when synchronization occur�A synchronization gate can be involved in only one

synchronization relation

Ludovic Apvrille - UML - 2005. Slide #21

synchronization relation�For example, let’s assume that T1.g1 is synchronized

with T2.g2�g1 can synchronize with g2�g1!1 can synchronize with g2?x:nat�g1!1 can synchronize with g2!1�g1!x1?y1:nat can synchronize with g2?x2:nat!y2

Page 22: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Synchronization Composition Operator

double click!

Ludovic Apvrille - UML - 2005. Slide #22

double click!

Page 23: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Sequence Composition Operator

� Semantics� T1 – seq -> T2 means that T2 executes once T1 has terminated its execution

� A new instance of T2 is executed

� Note: the association must be directed to the created instance

Ludovic Apvrille - UML - 2005. Slide #23

no “start”!

Page 24: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Sequence Composition Operator (Cont.)

� Note: T2 on previous slide had no “start”� If T2 has a “start”

� When the system is started� An instance of T1 is started� An instance of T2 is started� There is no relation between these two instances -> they execute in parallel

Once T1 has terminated

Ludovic Apvrille - UML - 2005. Slide #24

� Once T1 has terminated� Another instance of T2 is started� There is no relation between the two instances of T2

Page 25: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Preemption Composition Operator

� Semantics� T1 – preempt -> T2 means that, when T2 can perform one of its first action,

T1 is terminated and T2 executes

� Note: the association must be directed from the preempted instance to the executed one

Ludovic Apvrille - UML - 2005. Slide #25

No “start”!

Page 26: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Invocation Composition Operator

� Modeling of an operation call� Caller is suspended until the callee unblocks it

� Operation call� Return from operation call

� Data can be exchanged From the caller to the callee when the operation call is performed

Ludovic Apvrille - UML - 2005. Slide #26

� From the caller to the callee when the operation call is performed � From the callee to the caller when returning from operation call

� Example: a basic calculator� Experimentation with your first activity diagram!

Page 27: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Invocation Composition Operator: Example

Ludovic Apvrille - UML - 2005. Slide #27

Page 28: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Invocation Composition Operator: Example

T1 Calculator

Ludovic Apvrille - UML - 2005. Slide #28

Page 29: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Activity Diagrams

�An activity diagram must be provided for each Tclass�TURTLE activity diagrams extend UML activiyt

diagrams with two main features�Synchronization operators

Temporal operators

Ludovic Apvrille - UML - 2005. Slide #29

�Temporal operators

Page 30: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Activity diagrams: Logical and Temporal Operators

Ludovic Apvrille - UML - 2005. Slide #30

Page 31: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

TURTLE Types

� Boolean� not :bool->bool� and :bool,bool->bool� or :bool,bool->bool

� Natural� + :nat,nat->nat� - :nat,nat->nat� * :nat,nat->nat

Ludovic Apvrille - UML - 2005. Slide #31

� * :nat,nat->nat� min :nat,nat->nat� max :nat,nat->nat� < :nat,nat->bool� > :nat,nat->bool� <= :nat,nat->bool� >= :nat,nat->bool� == :nat,nat->bool� div :nat,nat->nat� mod :nat,nat->nat� divs :nat,nat->nat

Page 32: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Example: Enhancing the Calculator

� The calculator must be able to perform several operations� Subtract operation on substractgate � Add operation on addition gate

� Subtract and Add can be performed at the same time� Two subtract operations cannot be performed at the same time

Ludovic Apvrille - UML - 2005. Slide #32

� Two subtract operations cannot be performed at the same time� Two add operations cannot be performed at the same time

� T1 makes subtract operations� T2 make add operations

� An add operation takes between 5 and 6 time units� A subtract operation takes exactly 10 time units� Model T1, T2 and Calculator

Page 33: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Enhancing the Calculator: Class Diagram

Ludovic Apvrille - UML - 2005. Slide #33

Page 34: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Enhancing the Calculator: Activity Diagrams

Ludovic Apvrille - UML - 2005. Slide #34

Page 35: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Using Operators of Activity Diagrams

Ludovic Apvrille - UML - 2005. Slide #35

Page 36: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Advanced Concepts on Composition Operators

� Use of composition operators might be ambiguous� Instances created at startup

� “start” stereotype� For each tclasses pointed out by preemption relations

� Instances created at run time� Sequence relations

Ludovic Apvrille - UML - 2005. Slide #36

� Sequence relations

� On which instances exactly are applied those composition operators?

� Problematic� Multiple compositions operators � Priorities between composition operators� Tinstances vs. Tclasses

� Examples on next slides!

Page 37: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Multiple Preemption Relations

Ludovic Apvrille - UML - 2005. Slide #37

Page 38: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Priorities of Composition Operators

Ludovic Apvrille - UML - 2005. Slide #38

Page 39: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Use of Multiple Sequence Operators

Ludovic Apvrille - UML - 2005. Slide #39

Page 40: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Use of Multiple Sequence Operators (Cont.)

Ludovic Apvrille - UML - 2005. Slide #40

Page 41: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Using Tobjects instead of Tclasses

�TURTLE Class diagram�Describe the static architecture of the system under design�But: describe also the dynamics of the systems -> notion of

instances

�For describing one instance of a Tclass -> use of a tclass

Ludovic Apvrille - UML - 2005. Slide #41

�For describing one instance of a Tclass -> use of a tclass�For describing several instances of the same tclass ->

use of tobjects�Example on next slides!

Page 42: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Use of Tobjects: Example

�Webserver having several clients�Clients can connect to the web server�Each client can be distinguished with an identifier�Request of clients are conveyed through a medium

Ludovic Apvrille - UML - 2005. Slide #42

�Request of clients are conveyed through a medium�Modeling of the system: 3 clients, a webserver, and a

medium

Page 43: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Webserver: Class Diagram

Ludovic Apvrille - UML - 2005. Slide #43

Page 44: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Webserver: Activity Diagram (WebClient)

Ludovic Apvrille - UML - 2005. Slide #44

Page 45: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Webserver: Activity Diagram (Medium and Webserver)

Ludovic Apvrille - UML - 2005. Slide #45

Page 46: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Advanced Data types: Tdatas

�TURTLE supports two types�Natural�Boolean

�Data structures: Tdatas!

Ludovic Apvrille - UML - 2005. Slide #46

�Set of Natural and Boolean

�Using Tdatas�Declared as other attributes�Used as in C language

� c.field1 = 5

Page 47: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Example on Tdatas

Ludovic Apvrille - UML - 2005. Slide #47

� send!pdu if client has an attribute names pdu of type PDU

Page 48: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

I. Introduction

�UML Profile�The TURTLE Profile�Design with TURTLE�Analysis with TURTLE

Ludovic Apvrille - UML - 2005. Slide #48

�Analysis with TURTLE�Deployment with TURTLE

Page 49: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Methodology

Validation (RTL)Intensive simulationReachability analysis

Formal proofs

Translation to RT-LOTOS

Detailed designActivity diagram

(Behaviour)

Ludovic Apvrille - UML - 2005. Slide #49

DesignClass diagram(Architecture)

(Behaviour)

AnalysisScenarios

Synthesis

Page 50: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

A TURTLE Analysis

�Purpose�Exemplify very basic scenarios�Nominal scenarios�Error scenarios

Interaction Overview Diagram

Ludovic Apvrille - UML - 2005. Slide #50

� Interaction Overview Diagram�Linking between scenarios

�Sequence Diagrams�Scenarios�Message exchange�Timing constraints

Page 51: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

TURTLE’s IOD

Ludovic Apvrille - UML - 2005. Slide #51

Page 52: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Example

Ludovic Apvrille - UML - 2005. Slide #52

Page 53: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Using Choices

Ludovic Apvrille - UML - 2005. Slide #53

Page 54: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

TURTLE’s Sequence Diagrams

Ludovic Apvrille - UML - 2005. Slide #54

Page 55: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Message Semantics

�Synchronous message�Sender and receiver must synchronize

�Asynchronous message�Sender writes message on a channel�Receiver reads message from the channel

Ludovic Apvrille - UML - 2005. Slide #55

�Receiver reads message from the channel

�Various possible semantics for channels�Default semantics

�No delay�Total ordering�FIFO buffer at receiver’s side�1 channel is settled for each trio (sender, receiver, message)

Page 56: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Absolute and Relative Time Constraints

Ludovic Apvrille - UML - 2005. Slide #56

Page 57: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Simulating with Time Constraints

Ludovic Apvrille - UML - 2005. Slide #57

Page 58: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Using Timers

Ludovic Apvrille - UML - 2005. Slide #58

Page 59: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Using Timers (Cont.)

Ludovic Apvrille - UML - 2005. Slide #59

Page 60: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Using Timers (Cont.)

Ludovic Apvrille - UML - 2005. Slide #60

Projection on all gates except the one used for the management of time constraints

Page 61: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Non-Implementability Issue

�Temporal constraints may reduce possible paths�No path at all!�Temporal inconsistencies

Ludovic Apvrille - UML - 2005. Slide #61

� Instances execute their events on their own�Distributed system�At choice node, they may not all execute the same scenario

leading to deadlock situations

Page 62: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Temporal Constraints Reducing Logical Paths

Ludovic Apvrille - UML - 2005. Slide #62

Deadlock situation if action ”b_in” is fired after 13 time units: action

“b_out” never happens

Page 63: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Temporal Constraints Reducing Logical Paths (Cont.)

Ludovic Apvrille - UML - 2005. Slide #63

Deadlock situation : action “b_out” never happens

Page 64: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Non-Implementability due to Logical Constraints

Ludovic Apvrille - UML - 2005. Slide #64

Page 65: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Non-Implementability due to Logical Constraints (Cont.)

Ludovic Apvrille - UML - 2005. Slide #65

Page 66: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Non-Implementability due to Logical Constraints (Cont.)

Ludovic Apvrille - UML - 2005. Slide #66

Page 67: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

I. Introduction

�UML Profile�The TURTLE Profile�Design with TURTLE�Analysis with TURTLE

Ludovic Apvrille - UML - 2005. Slide #67

�Analysis with TURTLE�Deployment with TURTLE

Page 68: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Methodology with Deployment

(3) Deployment:components + DD

(4) Code (Java)

Code generation

Execution

Formal validation

Ludovic Apvrille - UML - 2005. Slide #68

(1) Analysis:IOD + SDs

Formal validation

(2) Design:CD + ADs

Automatic synthesisFormal

validation

Generation and

execution of Java

code

Page 69: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

What is a UML Deployment diagram?

� Set of execution nodes� nodes may host artifacts

� Links between nodes

Ludovic Apvrille - UML - 2005. Slide #69

client:Client

<<client>>

server:Server

<<server>>

Page 70: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

TURTLE Deployment diagrams

� TURTLE artifacts� Set a classes modeled in a TURTLE designs

� TURTLE Deployment diagrams� Execution nodes

� May hosts TURTLE artifacts

Ludovic Apvrille - UML - 2005. Slide #70

� Links between nodes� Interconnection of Artifacts’ gates� Formal specification

– Parameter: delay, loss rate

– Pseudo FIFO

• Actions in the same time slot may be reordered

� For Java code generation– Protocol: UDP, TCP, RMI

– Ports

Page 71: TTool Training II. The TURTLE Profile · TTool Training II. The TURTLE Profile Ludovic Apvrille - UML - 2005. Slide #1 Ludovic Apvrille ludovic.apvrille@telecom-paris.fr Eurecom,

Example of TURTLE Deployment Diagram

Artifact PkgClient is defined here, and used there

Ludovic Apvrille - UML - 2005. Slide #71