Download
a tutorial on lotos n.
Skip this Video
Loading SlideShow in 5 Seconds..
A tutorial on LOTOS PowerPoint Presentation
Download Presentation
A tutorial on LOTOS

A tutorial on LOTOS

126 Views Download Presentation
Download Presentation

A tutorial on LOTOS

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. A tutorial on LOTOS By: Ed Brinksma Presented by: Felipe Jovel

  2. LOTOS • Specification language developed to formally specify protocols and services for computer networks. • Developed with the Open Systems Interconnection (OSI) Reference model in mind. • Based on: • CCS • CSP

  3. Distributed Systems • Described in terms of processes. • Specification of system is essentially a hierarchy of process definitions a P Q c b d

  4. Lotos Process Abstraction process <process-identifier><parameter-part> := <behavior-expression>endproc • process-identifier – Name used to refer to process • parameter-part – List of potential external events • behavior-expression – Defines the behavior of the process

  5. Lotos Process Abstraction process P[a,b,c] := … endproc Process Q[b,d] := … endproc a P Q c b d

  6. ; , [] operators and Stop process • B1;B2 • B1 [] B2 • Stop

  7. Example 1 process one-time-buffer[in-data,out-data] := in-data ; out-data ; stopendproc in-data out-data

  8. Example 2 process simple-duplex-buffer[in-a,in-b,out-a,out-b] := in-a ; ( in-b ; ( out-a ; out-b ; stop [] out-b ; out-a ; stop ) [] out-a ; in-b ; out-b ; stop ) [] in-b ; ( in-a ; ( out-b ; out-a ; stop [] out-a ; out-b ; stop ) [] out-b ; in-a ; out-a ; stop)endproc in-b out-b in-a out-a

  9. Recursion processbuffer[in-data,out-data] := in-data ; out-data; buffer[in-data,out-data] endproc

  10. Parallelism without internal communication process simple-duplex-buffer’[in-a,in-b,out-a,out-b] := one-time-buffer[in-a,out-a] ||| one-time-buffer[in-b,out-b] where process one-time-buffer[in,out] in ; out ; stopendprocendproc in-b out-b in-a out-a

  11. Parallelism with internal communication process two-slot-buffer[in,out] := ( Buffer[in, middle] || Buffer[middle,out] )\[middle] where process Buffer[in,out] :=in ; out ; Buffer[in,out] endprocendproc out in m m = middle

  12. Sequential composition of processes process Sender[ConReq,ConCnf,DatReq,DisReq] :=Connection-Phase[ConReq,ConCnf] >> Data-Phase[DatReq,DisReq]endprocwhere process Connection-phase[ConReq,ConCnf] :=ConReq ; ConCnf ; exitendproc process Data-phase[DataReq,DisReq] := ( DataReq ; Data-phase[DataReq,DisReq] [] DisReq ; stop )endprocendproc

  13. Disruption of processes process Activity[a,b,c] := a ; b ; c ; Activity[a,b,c] [>Disrupt[discon,reason]endprocprocess disrupt[discon,reason] :=discon ; reason ; stop

  14. Exercise pc1 Producer Channel Consumer cc1 pc2 cc2

  15. Solution process Producer[pc1, pc2] := pc1; pc2; exit endproc process Consumer[ cc1, cc2] := cc1; (cc2; exit [] exit) [] cc2; exit []exitendproc process Channel[pc1, pc2, cc1, cc2] := pc1; ( pc2 ; cc1; exit [] cc1; pc2; exit [] i; pc2; exit ) >> ( cc2; exit [] i; exit) endproc

  16. Solution with parallelism process Producer_Consumer[ pc1, pc2, cc1 cc2 ] := ( Producer [pc1,pc2] ||| Consumer [cc1,cc2] ) ||Channel[pc1,pc2,cc1,cc2]whereprocess Producer … process Consumer … process Channel …

  17. Thank You