Presentation is loading. Please wait.

Presentation is loading. Please wait.

Processes and Basic LOTOS Team LOT ‘O Specs Cara Gibbs Terry Peckham Robert Cowles Manon Sanscartier Ergun Gurak.

Similar presentations

Presentation on theme: "Processes and Basic LOTOS Team LOT ‘O Specs Cara Gibbs Terry Peckham Robert Cowles Manon Sanscartier Ergun Gurak."— Presentation transcript:

1 Processes and Basic LOTOS Team LOT ‘O Specs Cara Gibbs Terry Peckham Robert Cowles Manon Sanscartier Ergun Gurak

2 Presentation Overview Cara LOTOS background & basics Terry Processes, basic LOTOS operators Robert Operational semantics: growing trees from expressions Manon Parallelism Ergun Process Controls

3 History & Background of LOTOS

4 Terms ISO International Organization for Standardization OSI Open Systems Interconnection FDT Formal Description Technique LOTOS Language of Temporal Ordering Specification ISO Health Care … OSI… Road Vehicles FDT Estelle LOTOS SDL

5 Purpose: Create standards to make life simpler. Increase reliability and effectiveness of goods and services. Standards Environment Health Care Natural Sciences Ship BuildingTelecommunications Food Technology ISO

6 OSI Standard for interconnection between any two points in network. Purpose: For equipment to consistently work with other equipment. Structure: 7 layer system

7 FDT Formal method for developing telecommunications services & protocols. Purpose: Produce unambiguous descriptions of OSI in a precise & comprehensive way. Three officially recognized FDT’s : Estelle, LOTOS, SDL.

8 LOTOS Developed during the years 1981 – 1986. Specification language. Built specifically for OSI. Can be used for concurrent & distributed systems also. Key Idea To ensure compatibility of communication and cooperation between machines.

9 Components of LOTOS 1.Processes & their interaction with each other and their environment. 2.Data structures and value expressions.

10 LOTOS Basics

11 Process Distributed, concurrent system. Performs external (observable) actions. Performs internal (unobservable) actions. Interacts with other processes and observer. (Environment)

12 Event An action synchronized between two or more processes. Occurs at interaction point. (Gate) Three kinds of events: 1.Pure Synchronization 2.Value Establishment 3.Value Negotiation

13 Process Representation PROCESS Environment a b c d e f Gates

14 Process Definition Defines a process by specifying its behavior. Behavior is given by a sequence of observable actions that may occur. Syntax Process P1[a, b, c, d, e, f]

15 Real World Example Process KNOWLEDGE[start_grade_1, learn_alpha, write_name, count_10, start_grade_2] KNOWLEDGE start_grade_1 learn_alpha write_name count_10 start_grade_2

16 Basic LOTOS

17 Describes process synchronization Covers basic operators Action prefix Inaction Choice Full LOTOS adds data types Covered in a future presentation by some other group

18 Process Definitions and Behaviour Expressions Key Bold for LOTOS commands Uppercase for process names Lowercase for event names

19 Process Example process MAX3 [ in1, in2, in3, out] := hide mid in (MAX2[in1, in2, mid] |[mid]| MAX2[mid, in3, out]) where process MAX2[a, b, c] := a; b; c; stop [] b; a; c; stop endproc

20 MAX3 Process Diagram

21 Process Definition Process definition is a description of the behaviour of a subsystem 3 main purposes: –Representation of recursivity (loops + infinite behaviours) –Create behaviour abstractions and hierarchies (top-down) –Gate re-labeling

22 Process Definition (cont.) Process process [ formal-gates] ( params): functions := behaviours where local-definitions endproc

23 Behaviour Expressions They are created by applying an operator to other behaviour expressions They may also include instantiations of other processes, whose definitions are provided in the where clause

24 Behaviour Example process MAX3 [ in1, in2, in3, out] := hide mid in ( MAX2[in1, in2, mid] |[mid]| MAX2[mid, in3, out]) where process MAX2[a, b, c] := a; b; c; stop [] b; a; c; stop endproc Process Definition Behaviour Expression Process Instantiation

25 Syntax Chart NameSyntax Inactionstop Action prefix - unobservable (internal)i ; Expression - observablegate ; Expression ChoiceExpression1 [] Expression2 Hiding hide gate1, gate2, …,gateN in Expression Process instantiation PROCESS_NAME [gate1, gate2, …gateN]

26 Syntax Chart (cont.) NameSyntax Parallel composition - general case Expression1 | [gate1, gate2, …, gateN] | Expression2 - pure interleaving Expression1 ||| Expression2 - full synchronization Expression1 || Expression2 Successful termination exit Sequential composition (enabling) Expression1 >> Expression2 disabling Expression1 [> Expression2

27 Operator Precedence OperatorPrecedence Level Action prefixHighest Choice Parallel composition Disabling Enabling HidingLowest

28 Action prefix ; May denote actions in sequence Composes an event and a behaviour description The action prefix cannot take 2 behaviours as arguments –Ex. Action ; Expressiona; b; c gate ; Expression i ; Expression

29 Inaction Operator stop Is the representation of a behaviour such that no event will ever be observed It can be used to express that a process finishes it’s execution It can be used to express deadlock situations –Ex. With MAX3 as basis c; stopb; c; stop a; b; c; stop

30 Choice Operator [] Offers to the environment two (or more) alternatives. This is, the system may behave in several ways Choice composes two alternative behaviour descriptions. The environment will select among both behaviour descriptions

31 Choice Operator [] (cont.) Ex Behaviour1 [] Behaviour2 - The system behaves as either Behaviour1 or Behaviour2 Ex. With the MAX3 as basis a; b; c; stop [] b; a; c; stop

32 Operational Semantics Growing Trees From Expressions

33 Operational Semantics From a behaviour expression we derive the actions that a process performs The application of an action to a behaviour expression produces a new behavior expression From the application of each action we derive a labeled transition

34 Operational Semantics Each transition is of the form: B  x  B’ Where B and B’ are behavior expressions and x is an action that changes B to B’.

35 Operational Semantics The actions that are performed are all user- defined. They include the observable actions – the user defined gates for the behavior. They also include the unobservable or internal actions. In the syntax of the paper, this is the set 

36 Operational Semantics We also need a special non-user definable action that shows the successful termination of the current process and the enabling of a subsequent process. The paper uses  for this action. The complete set of actions is the set  

37 Operational Semantics The action prefix behavior expression is defined by the axiom:  ; B    B In the context of the Max2 example, this becomes: a; b; c; stop  a  b; c; stop

38 Operational Semantics We can describe the entire behavior for a process by its sequence of transitions. This is represented by a transition tree or synchronization tree. The nodes of the tree are labeled by the behavior expressions and the arcs are labeled by the action that causes the transition.

39 Operational Semantics Drawing from the Max2 example: Given the process: a; b; c; stop we produce this transition tree.

40 Operational Semantics We can also represent this process in an action tree. We produce an action tree by omitting the labels from the nodes of a transition tree. i.e. by only labeling the arcs.

41 Operational Semantics However, we have only examined one part of the process in Max2. Max2 involves a choice operator: a; b; c; stop [] b; a; c; stop Max2 can behave like either process. The process that it actually behaves like is determined by our first choice of action.

42 Operational Semantics If action a is selected, it behaves like: a; b; c; stop If action b is selected, it behaves like: b; a; c; stop

43 Operational Semantics This is described by the inference rules: B1  +  B1’ implies B1[]B2  +  B1’ B2  +  B2’ implies B1[]B2  +  B2’ For Max2 we have: a; b; c; stop  a  b; c; stop implies a;b;c;stop[]b;a;c;stop  a  b; c; stop

44 Operational Semantics Max2 gives us the choice of two action trees

45 Operational Semantics Since both action trees have a common starting point we draw them with a common root node:

46 Operational Semantics This process can be expanded to grow a tree of any size

47 Operational Semantics

48 As you can see this rapidly becomes cumbersome. This is where parallelism can simplify the process.

49 Parallelism “A Time and Place for Every Event.”

50 The Idea Parallel operators are used to model concurrency. They are useful for the synchronization of events. We can think of parallelism as a means to event ordering, prioritizing, preconditioning.

51 The Operators Partial Synchronization (General Case) Interleaving (Pure Interleaving) Full Synchronization In LOTOS, there are 3 types of parallel operators:

52 Partial Synchronization B1 |[g1, g2, …, gn]| B2 Process B1 Process B2 Synchronization Gates g1, …, gn |[]| Partial Synchronization Operator Behavior Expression

53 What Does that Mean? Certain events must be synchronized. Starting school: (shopping; start_grade_1; new_crayons; new_friends; start_grade_2; ballet; YEAR) |[start_grade_1, start_grade_2]| (start_grade_1; learn_alpha; write_name; count_10; start_grade_2; KNOWLEDGE) There are certain things you must do before you start grade 1, while you are in grade 1, and when you are done grade 1.

54 Example in1 in2 mid in3 mid out MAX2[in1, in2, mid] |[mid]| MAX2[mid, in3, out] Recall the above trees… We now compute

55 in1 in2in1 in2 mid in3 mid out in2 midout mid in3out in3 midout in2in3 in1 mid out in1 in3 mid out mid out in3 in2 in1 mid in1 mid in2 out in1in3 in2 in3 MAX2[in1, in2, mid] |[mid]| MAX2[mid, in3, out]

56 Interleaving B1 ||| B2 Process B1 Process B2 Set of Synchronization Gates is EMPTY ||| Interleaving Operator Behavior Expression

57 What Does that Mean? No events need be synchronized (independent processes). Reading text books for different classes: (b1_c1; b1_c2; b1_c3; BOOK1) ||| (b2_c1; b2_c2; b2_c3; BOOK2) As long as you read the individual books in sequential order, you can divide your time between classes. You do not HAVE to read all of book 1 before you start book 2 (although you may.)

58 Example in2out2in1out1 ||| where process BOX[in, out]:= in;out;stop end proc process BOXES[in1, out1, in2, out2]:= BOX[in1, out1] |||BOX[in2, out2] end proc in1, out1, in2, out2 in1, in2, out1, out2 in2, in1, out1, out2 in1, in2, out2, out1 in2, out2, in1, out1 in2, in1, out2, out1 Possible Sequences:

59 Full Synchronization B1 || B2 Process B1 Process B2 Set of Synchronization Gates is ALL Gates || Full Synchronization Operator Behavior Expression

60 What Does that Mean? All events must be synchronized. Jumping in the water holding hands: (walk; jump; land; YOU) || (walk; jump; land; ME) Everything must be done at the same time.

61 Example where … process BOXES[mid1, mid2, mid3]:= BOX1[mid1, mid2, mid3] ||BOX2[mid1, mid2, mid3] end proc mid1, mid2, mid3 Possible Sequence: mid3 mid1 mid2

62 Summary Partial Synchronization B1 |[g1, g2, …, gn]| B2 Interleaving B1 ||| B2 Full Synchronization B1 || B2 Synchronization at NO gates Synchronization at ALL gates General Case Special Cases

63 LOTOS Process Controls

64 Types of Process Controls i)Hiding ii)Internal Actions iii)Non-Determinism iv)Process Instantiation v)Process Recursion vi)Process Termination vii)Sequential Composition (Enabling) viii)Disabling

65 Hiding Syntax: hide gate 1, …, gate n in behaviour expression Semantics: Hiding allows one to transform observable (external) actions into unobservable (internal) actions, thus making them unavailable for synchronization with other processes.

66 Example: process OUTER [in1, in2, out] := hide mid in INNER [in1, mid] | [ mid ] | INNER [mid, in2, out] endproc Hiding mid in1in2 out OUTER INNER

67 Hiding in1 in2 mid out in1 in2 i out Action Tree (after hiding mid) Action Tree (before hiding mid)

68 Internal Actions Definition: An internal action is an unobservable action: it cannot be seen from the environment. Example: i in1in2 out OUTER INNER

69 Non-Determinism Definition: Non-determinism occurs when more than one result is possible for a particular behaviour expression. Examples: a; b; stop [] a; c; stop i; b; stop [] i; c; stop a c stop b ? ai c b ? i

70 Process Instantiation Syntax: process_identifier [comma-delimited list of actual gates] Semantics: A process instantiation is formed by a process identifier with an associated list of actual gates. Example: SIMPLEX_BUFFER [in, out] out SIMPLEX_BUFFER in

71 Process Recursion Semantics: A process P is recursive if it is able to call itself. Recursion in LOTOS is used to express infinite behaviours. Example: process REUSABLE_SIMPLEX_BUFFER [in, out] := in; out; REUSABLE_SIMPLEX_BUFFER [out, in] endproc out REUSABLE_SIMPLEX_BUFFER in

72 Process Termination Syntax: exit Semantics: Exit is a process whose only purpose is to perform a successful termination action and thus transform itself into the dead process stop. Example: process DO_SOMETHING [a, b, c] := a; b; exit [] b; c; exit endproc

73 Sequential Composition (Enabling) Syntax: B1 >> B2 Semantics: The execution of behaviour B2 is enabled if and only if behaviour B1 terminates successfully. Example: UNLOCK_DOOR [key] >> open_door

74 Disabling Syntax: B1 [> B2 Semantics: Behaviour B1 may or may not be disabled by behaviour B2 as follows: –If B1 terminates successfully, B2 is not executed. –Else, B2 interrupts B1 and is executed instead.

75 Disabling Example: take_bath [> answer_phone

76 Questions?

Download ppt "Processes and Basic LOTOS Team LOT ‘O Specs Cara Gibbs Terry Peckham Robert Cowles Manon Sanscartier Ergun Gurak."

Similar presentations

Ads by Google