Download presentation
Presentation is loading. Please wait.
Published bySusan Hill Modified over 8 years ago
1
1 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 - offer the value 1 at gate g g?x:N - 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
2
2 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 P1 [] P2 - behave like process P1 or process P2. Termination stop or exit(…) - stop is deadlock - exit is “graceful” termination: ;stop - exit may have data values associates
3
3 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
4
4 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 g1 P g2 P g3 P...
5
5 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 a a b c b c When are two processes equivalent?
6
Bisimulation for LOTOS An LTS consists of States S An initial state S 0 A set of labels L A labelled transition relation -> on LxSxS 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 in Act, where 1. if P P’then there exists Q’ s.t. Q Q’ and P’ ~ Q’. 2.if Q Q’then there exists P’ s.t. P P’ and P’ ~ Q’. a a a a a a b c b c b b b
7
7 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.
8
8 Parallelism Independent parallelism ||| Eg. P ||| Q. P a P’ ----------------------------------- and v.v. P ||| Q a P’ ||| Q e.g. Buffer[ain,aout] ||| Buffer[bin,bout] arbitrary interleaving of events.
9
9 Parallelism Dependent parallelism || Eg. P || Q. P a P’ Q a Q’ ----------------------------------- P || Q a P’ || Q’ complete dependence.
10
10 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
11
11 Parallelism General parallelism |[…]| Eg. P |[g]| Q. P a P’ Q a Q’ ----------------------------------------- a {g1,…,gn} P |[g1,…,gn]| Q a P’ | |[g1,…,gn]| | Q’ P a P’ ----------------------------------------- a {g1,…,gn} P |[g1,…,gn]| Q a P’ | |[g1,…,gn]| | Q (and v.v.)
12
12 Example 2 one-slot buffers to make 1 two-slot buffer process Buffer2slot[in,out,mid] : noexit := Buffer1[in,mid] |[mid]| Buffer1[mid,out] endproc where process Buffer1[in1,out1]:noexit := in1?x:Nat; out1!x; Buffer1[in1,out1] endproc in Buffer1 Buffer1 out mid is an internal gate.
13
13 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 [b,c] … is [c] … is [b]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.