1 / 11

Expressive Power of CCS: Simulating Random Access Machines

This paper explores the expressive power of CCS by proving its ability to simulate Random Access Machines (RAMs), a Turing-complete formalism. The encoding of RAMs into CCS processes is defined, and the correctness of the encoding is proven.

Télécharger la présentation

Expressive Power of CCS: Simulating Random Access Machines

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. Concurrency 7 Expressive Power of CCS The p-calculus Catuscia Palamidessi catuscia@lix.polytechnique.fr

  2. The Expressive Power of CCS • CCS is a Turing-complete formalism. We will show this by proving that we can simulate in CCS the Random Access Machines, which are a Turing-complete formalism • Definition: A RAM is a computational model composed by: • a finite set of registers r1,...,rn which store natural numbers, one for each register, and can be updated (incremented or decremented) and tested for zero. • A program (1,I1), ... ,(m,Im), where the Ij’s are instructions of either of the following two forms: • Incr(rj) : add 1 to Register rj • DecJump(rj,s) : if the content of the register rj is not zero, then decrease rj by one and go to next intruction. Otherwise jump to instruction s. Concurrency 7

  3. The Expressive Power of CCS • The state of a RAM R is a tuple (j, k1,...,kn) where j is the index of the current instruction and k1,...,kn are the contents of the registers • The execution is defined by a transition relation among states: (j, k1,...,kn) R (j’, k’1,...,k’n) Meaning that the RAM goes from state(j, k1,...,kn) to state (j’, k’1,...,k’n) by executing the action Ij in the program of R • Weassume that the execution terminates if a special instruction index is reached. We also assume that the first register (r1) will initially contain the input of the program, and that it will contain the output when the program terminates. Concurrency 7

  4. The Expressive Power of CCS • Theorem: Every computable function can be expressed as the input-output relation computed by a RAM. • We define now a CCS process which encodes a given RAM R. • Each register is encoded by a labeled instance of a counter: Ch(k) repr. rh with content k • The program of R is encoded as a set of CCS definitions: Instrjinch.Instri+1 if Ii = Succ(rh) in R Instrjdech.Instri+1 + zeroh.Instrs if Ii = DecJump(rh,s) in R • Assume input k, so the initial configuration is (1,k,0,...,0). The CCS process encoding R is: [ (1,k,0,...,0) ]R = (ninc)(ndec)(nzero) (Instr1 | C1(k) | C2(0) | ... | Cn(0) ) where inc,dec and zero represent the vectors of theinch, dech and zeroh. • Theorem (correctness of the encoding): (j, k1,...,kn) R* (j’, k’1,...,k’n) if and only if [(j, k1,...,kn)]R * [(j’, k’1,...,k’n)]R Proof: Exercise t Concurrency 7

  5. The p-calculus • Milner, Parrow, Walker 1989 • A concurrent calculus where the communication structure among existing processes can change over time. • Link mobility. Concurrency 7

  6. The p calculus: scope extrusion • A private channel name can be communicated and its scope can be extended to include the recipient • Channel: the name can be used to communicate • Privacy: no one else can interfere • An example of link mobility: Q x y R P z Concurrency 7

  7. The p calculus: scope extrusion • A private channel name can be communicated and its scope can be extended to include the recipient • Channel: the name can be used to communicate • Privacy: no one else can interfere • An example of link mobility: Q z x y R P Concurrency 7

  8. The p calculus: scope extrusion • A private channel name can be communicated and its scope can be extended to include the recipient • Channel: the name can be used to communicate • Privacy: no one else can interfere • An example of link mobility: Q z x y R P z Concurrency 7

  9. The p calculus: syntax • Similar to CCS with value passing, but values are channel names, and recursion is replaced by replication (!) p ::= x(y) | xy | t action prefixes (input, output, silent) x, y are channel names P ::= 0 inaction | p . Pprefix | P | P parallel | P + P sum | (n x) P restriction,new name | ! P replication Concurrency 7

  10. Operational semantics (basic idea) m • Transition system P  Q where m can be x(y), xy, x(y), ort • Rules Inputx(y) . P P[z/y] Outputxy . P P Open ___________________ (n y) P  P’ x(z) xy xy P  P’ x(y) Concurrency 7

  11. Operational semantics (basic idea) Close ___________________________ P | (n y) Q (n y) (P’ |Q’) x(y) x(y) P  P’Q  Q’ t Concurrency 7

More Related