Introduction to LOTOS A LOTOS process is built
Introduction to LOTOS A LOTOS process is built up from events. An event is • unstructured - just a (gate) name e. g. g, a, send, open • structured - a name with a data offer e. g. g!1 g? x: N - offer the value 1 at gate g - offer to accept any value of sort N, bind it to variable x g? y: N[y<10] - offer to accept any number less than 10, bind it to variable y 1
Basic Operations Behaviour expressions Prefix a; P - offer event a and then behave like process P. - n. b. a is an event, P is a process. Choice P 1 [] P 2 - behave like process P 1 or process P 2. Termination stop or exit(…) - stop is deadlock - exit is “graceful” termination: d; stop - exit may have data values associates 2
Basic Operations Process Definition process Buffer[in, out](k: Nat) : = body endproc -Buffer is process name - […] is list of gates/events as formal parameters - (…) is list of data as formal parameters - body is behaviour expression 3
Semantics A LOTOS process/behaviour expression denotes a labelled transition system. The lts is defined by a set of axioms and inference rules. Axioms a; P a P g!n; P gn P g? x: Nat; P g 1 g 2 g 3 P P P . . . 4
More on Choice [] represents non-deterministic choice the environment resolves the non-determinisim. Does a; (b; stop [] c; stop) behave the same as a; b; stop [] a; c; stop ? This is a crucial question. View processes as trees. a b a c When are two processes equivalent? 5
Bisimulation for LOTOS • An LTS consists of • States S • An initial state S 0 • A set of labels L • A labelled transition relation -> on Lx. S E. g. g!n; P gn P Defn A strong bisimulation ~ is a binary relation on LTS’s. P and Q are strong bisimilar if P 0 ~ Q 0 , for all a in Act, where 1. if P a P’then there exists Q’ s. t. Q a Q’ and P’ ~ Q’. 2. if Q a Q’then there exists P’ s. t. P a P’ and P’ ~ Q’. a b a c b a b a b
Recursion A process can be recursive. E. g. Process P[a] : noexit : = a; P a process Buffer[in, out] : noexit : = in; out; Buffer[in, out] in out NB mutual recursion is allowed. 7
Parallelism Independent parallelism ||| Eg. P ||| Q. P a P’ -----------------P ||| Q a P’ ||| Q and v. v. e. g. Buffer[ain, aout] ||| Buffer[bin, bout] arbitrary interleaving of events. 8
Parallelism Dependent parallelism || Eg. P || Q. P a P’ Q a Q’ -----------------P || Q a P’ || Q’ complete dependence. 9
Example A[a, b, c, d] || B[a, b, c, d] when A is a; (b; stop [] c; stop) B is a; (c; stop [] b; stop) A is a; (b; stop [] c; stop) B is a; c; stop A is a; (b; stop [] c; stop) B is b; a; stop 10
Parallelism General parallelism |[…]| Eg. P |[g]| Q. P a P’ Q a Q’ --------------------a e {g 1, …, gn} P |[g 1, …, gn]| Q a P’ | |[g 1, …, gn]| | Q’ P a P’ --------------------a e {g 1, …, gn} P |[g 1, …, gn]| Q a P’ | |[g 1, …, gn]| | Q (and v. v. ) 11
Example 2 one-slot buffers to make 1 two-slot buffer process Buffer 2 slot[in, out, mid] : noexit : = Buffer 1[in, mid] |[mid]| Buffer 1[mid, out] endproc where process Buffer 1[in 1, out 1]: noexit : = in 1? x: Nat; out 1!x; Buffer 1[in 1, out 1] endproc in Buffer 1 mid is an internal gate. Buffer 1 out 12
Example A[a, b, c, d] |[. . ]| B[a, b, c, d] when A is a; (b; stop [] c; stop) B is a; (c; stop [] b; stop) … is [a, b, c] … is [b, c] A is a; (b; stop [] c; stop) B is b; stop … is [a, b, c] … is [c] … is [b] 13
- Slides: 13