1 / 18

CSP

CSP. Communicating Sequential Processes. History. Communicating Sequential Processes, 1985 Prentice Hall A formal language Describe patterns of interaction in concurrent systems First described in a 1978 paper by C. A. R. Hoare as a concurrent programming language

arissa
Télécharger la présentation

CSP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSP Communicating Sequential Processes

  2. History • Communicating Sequential Processes, 1985 Prentice Hall • A formal language • Describe patterns of interaction in concurrent systems • First described in a 1978 paper by C. A. R. Hoare as a concurrent programming language • Influenced Occam, Limbo and Go

  3. C. A. R. Hoare • Tony Hoare, bornFeb 11, 1934 • British computer scientist • 1980Turing Award • Quicksort

  4. Primitives • Event • Process

  5. Example : Vending Machine • Event : coin : insertion of a coin in the slot of a vending machine choc : extraction of a chocolate • Process : VMS αVMS= { coin , choc }

  6. Prefix (x → P) x event P process First engages in the event x then behaves as described by P

  7. Example : Vending Machine VMS = (coin → (choc → STOPαVMS))

  8. Recursion µX : A • F (X) Xprocess name Aalphabet of X F expression containing the process name X which begins with a prefix

  9. Example : Vending Machine VMS = µX : {coin, choc} • (coin → (choc → X)))

  10. Choice (x → P | y → Q ) x, ydiferent events P, Qprocesses

  11. Example : Vending Machine αVMS = { in2 in1 out1 choc } VMS = (in1 → (choc → VMS) | in2 → (out1 → choc → VMS))

  12. Mutual Recursion αDD = αO = αL = {set.oset.l o l} DD = (set.o→ O | set.l→ L) O = (o → O | set.l→ L | set.o→ O) L = (l → O | set.o→ O | set.l→ L)

  13. Trace • A finite sequence of symbols recording the events in which the process has engaged up to some moment in time • <coin, choc, coin, choc>

  14. Interaction α(P || Q ) = αP = αQ VMS = (in1 →choc→VMS |in2 →STOP) FOOLCUST = ( in2 → choc → FOOLCUST | in1 → choc → FOOLCUST ) (FOOLCUST || VMS) = µX • (in1 → choc → X | in2 → STOP)

  15. Concurrency α(P || Q ) = αP ∪ αQ NOISYVM = (coin → clink → choc → clunk → NOISYVM ) CUST = (coin → (toffee → CUST | curse → choc → CUST)) (NOISYVM || CUST) = µX • (coin → (clink → curse → choc → clunk → X | curse → clink → choc → clunk → X ))

  16. Pictures

  17. Implementation prefix(c, P) = λ x • if x = c then P else "BLEEP

  18. Thanks

More Related