Download presentation

Presentation is loading. Please wait.

Published byMoriah Laycock Modified over 2 years ago

1
FMCO 2005 / UpSTAIRS with Sequence Diagrams Ragnhild Kobro Runde UpSTAIRS with Sequence Diagrams Øystein Haugen, Ragnhild Kobro Runde, Ketil Stølen University of Oslo and SINTEF ICT, Norway

2
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 2 Ragnhild Kobro Runde Overview Interactions and trace semantics Interactions as example runs Underspecification and nondeterminism Refinement Data and guards

3
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 3 Ragnhild Kobro Runde Background: UML interactions Partial ordering of events: -The send event is ordered before the corresponding receive event. -Events on the same lifeline are ordered from the top and downwards. S specifies the two traces: - Lifeline (instance) Send-event (!x) Receive- event (?x) Message

4
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 4 Ragnhild Kobro Runde Alternatives S specifies the four traces: - First alternative Second alternative

5
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 5 Ragnhild Kobro Runde Example: Network communication Interactions = example runs! -Specifies a set of positive and/or negative behaviours. Positive Negative Inconclusive

6
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 6 Ragnhild Kobro Runde Negative behaviour Formally: (p1,n1) (p2,n2) = (p1 p2, (p1 n2)U(n1 p2)U(n1 n2) ) Note: -Inconclusive + positive/negative = inconclusive -Positive + negative = negative Positive: Negative:

7
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 7 Ragnhild Kobro Runde Overview Interactions and trace semantics Interactions as example runs Underspecification and nondeterminism Refinement Data and guards

8
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 8 Ragnhild Kobro Runde Underspecification and non-determinism Underspecification: Several alternative behaviours are considered equivalent (serve the same purpose). Inherent non-determinism: Alternative behaviours that must all be possible for the implementation. These two should be described differently!

9
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 9 Ragnhild Kobro Runde STAIRS Positive Negative Inconclusive Positive Negative Inconclusive Positive Negative Inconclusive Positive Negative Inconclusive Positive Negative Inconclusive Positive Negative Inconclusive xalt

10
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 10 Ragnhild Kobro Runde alt vs xalt Assume [[ d1 ]] = (p1,n1) [[ d2 ]] = (p2,n2) alt specifies potential behaviour: [[ d1 alt d2 ]] = [[ d1 ]] + [[ d2 ]] = (p1 U p2, n1 U n2) xalt specifies mandatory behaviour: [[ d1 xalt d2 ]] = [[ d1 ]] U [[ d2 ]] = (p1,n1) U (p2,n2) P1 N1 I1I1 P2 N2 I2I2 P1 U P2 N1 U N2 I

11
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 11 Ragnhild Kobro Runde Example: Network communication

12
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 12 Ragnhild Kobro Runde alt vs xalt A->G->N1->B Everything else A->G->N2->N3->B A->G->N2->N4->B Everything else S:network

13
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 13 Ragnhild Kobro Runde Overview Interactions and trace semantics Interactions as example runs Underspecification and nondeterminism Refinement Data and guards

14
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 14 Ragnhild Kobro Runde Refinement in STAIRS An interaction obligation o'=(p',n') is a refinement of an interaction obligation o=(p,n) iff -n n' -p p'Un' Positive Negative Inconclusive Supplementing Narrowing

15
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 15 Ragnhild Kobro Runde Refinement contd. An interaction d' is a refinement of an interaction d iff o [[ d ]]: o' [[ d' ]]: o o' P1 N1 I1I1 d: P2 N2 I2I2 d': P'1 N'1 I' 1 P'2 N'2 I' 2 P'3 N'3 I' 3 NOT VALID!

16
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 16 Ragnhild Kobro Runde Adding new obligations NEW

17
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 17 Ragnhild Kobro Runde Supplementing A->G->N1->B Everything else A->G->N2->N3->B A->G->N2->N4->B Everything else

18
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 18 Ragnhild Kobro Runde Overview Interactions and trace semantics Interactions as example runs Underspecification and nondeterminism Refinement Data and guards

19
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 19 Ragnhild Kobro Runde Including data Two special events: -write (for assignments) -check (for constraints) A state is a total function σ Var → Val For an expression expr, expr(σ) denotes its value in σ. Assignment: [[assign(var,expr)]] = ( { | σ'(var) = expr(σ)}, Ø}

20
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 20 Ragnhild Kobro Runde Constraints [[constr(c)]] = ( { |c(σ)}, { |¬c(σ)} )

21
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 21 Ragnhild Kobro Runde Guards A special kind of constraint May be overlapping Need not be exhaustive

22
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 22 Ragnhild Kobro Runde Definition of guarded xalt Assume: [[ d1 ]] = (p1,n1) [[ d2 ]] = (p2,n2) Guarded xalt: [[ g1->d1 xalt g2->d2]] = [[ constr(g1) seq d1 ]] U [[ constr(g2) seq d2 ]]

23
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 23 Ragnhild Kobro Runde Definition of guarded xalt Assume: [[ d1 ]] = (p1,n1) [[ d2 ]] = (p2,n2) Guarded xalt: [[ g1->d1 xalt g2->d2]] = ( { p1 | g1(σ)}, { p1 | ¬g1(σ)} U { n1 | g1(σ) v ¬g1(σ)} ) U ( { p2 | g2(σ)}, { p2 | ¬g2(σ)} U { n2 | g2(σ) v ¬g2(σ)} )

24
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 24 Ragnhild Kobro Runde

25
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 25 Ragnhild Kobro Runde Narrowing by using guards A->G->[N1 ok]->N1->B Everything else A->G->[N1 not ok]->N1->B A->G->[N2 ok]->N2->... Everything else A->G->[N2 not ok]->N2->...

26
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 26 Ragnhild Kobro Runde A->G->[N2 not ok]->N2->[N3 ok/not ok]->N3->B A->G->[N2 not ok]->N2->[N4 ok/not ok]->N4->B Narrowing by using guards A->G->[N2 ok]->N2->[N3 not ok]->N3->B A->G->[N2 ok]->N2->[N4 not ok]->N4->B A->G->[N2 ok]->N2->[N3 not ok and N4 not ok] A->G->[N2 ok]->N2->[N3 ok]->N3->B A->G->[N2 ok]->N2->[N4 ok]->N4->B Everything else A->G->[N2 ok]->N2->[N3 not ok]->N3->B A->G->[N2 ok]->N2->[N4 not ok]->N4->B

27
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 27 Ragnhild Kobro Runde xalt to ensure security

28
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 28 Ragnhild Kobro Runde A possible refinement

29
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 29 Ragnhild Kobro Runde Summary Interactions are partial specifications: -Distinguish between positive and inconclusive traces. Distinguish between underspecification (alt) and inherent non-determinism (xalt). Refinement also of partial interactions. -Supplementing -Narrowing Introducing guards should be a valid refinement step. -Traces with a false guards should be negative.

30
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 30 Ragnhild Kobro Runde Literature on STAIRS Øystein Haugen, Ketil Stølen: STAIRS – Steps to analyze interactions with refinement semantics (UML'2003, LNCS 2863). -Distinguishes between mandatory and potential behaviour Øystein Haugen, Knut Eilif Husa, Ragnhild Kobro Runde, Ketil Stølen: STAIRS towards formal design with sequence diagrams (SOSYM, Online First, 2005). -Denotational trace semantics for interactions -Formalizes the refinement relations in STAIRS Øystein Haugen, Knut Eilif Husa, Ragnhild Kobro Runde, Ketil Stølen: Why timed sequence diagrams require three- event semantics (Dagstuhl post-proc., LNCS 3466). Extended version as research report 309. -Extends STAIRS with time and three-event semantics

31
FMCO 2005 / UpSTAIRS with Sequence Diagrams / Slide 31 Ragnhild Kobro Runde Literature on STAIRS Ragnhild Kobro Runde, Øystein Haugen, Ketil Stølen: Refining UML interactions with explicit and implicit nondeterminism (Nordic Journal of Computing, to appear). -Extends STAIRS with data and guards -More on mandatory vs potential behaviour Ragnhild Kobro Runde, Øystein Haugen, Ketil Stølen: How to transform UML neg into a useful construct (NIK'2005, to appear). -Investigates various formal definitions for negation Atle Refsdal, Knut Eilif Husa, Ketil Stølen: Specification and refinement of soft real-time requirements using sequence diagrams (FORMATS'05). -Extends STAIRS with probabilistic alternatives

32
FMCO 2005 / UpSTAIRS with Sequence Diagrams Ragnhild Kobro Runde http://heim.ifi.uio.no/~ragnhilk/stairs/ Thank you!

Similar presentations

OK

H 1. 2 3 4 5 6 7 8 9 to shape fully developed personality to shape fully developed personality for successful application in life for successful.

H 1. 2 3 4 5 6 7 8 9 to shape fully developed personality to shape fully developed personality for successful application in life for successful.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on critical care nursing Ppt on fire extinguisher types Ppt on sikkim cultural Ppt on personality development for school students Ppt on 108 ambulance service Ppt on mass energy equation Ppt on active and passive voice Ppt on save environment logo Ppt on unique identification system Ppt on schottky diode