1 / 98

Gedistribueerde AI: Overview

Gedistribueerde AI: Overview. Concurrency - Communicating Sequential Processes - Concurrent Constraint Programming Agent-Oriented Programming - 3APL. Evolution. Mastering Complexity : From Operating Systems (mutual exclusion, scheduling) To Global Computing

cyma
Download Presentation

Gedistribueerde AI: Overview

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. Gedistribueerde AI: Overview • Concurrency - Communicating Sequential Processes - Concurrent Constraint Programming • Agent-Oriented Programming - 3APL

  2. Evolution Mastering Complexity: From Operating Systems (mutual exclusion, scheduling) To Global Computing Bioinformatics Multi-Agent Systems (negotiation, human interactions)

  3. Abstraction Procedures  Classes (Objects)  Agents (Subjects)

  4. Concurrency Main Features • Communication • Coordination • Real-Time • Non-determinism • Deadlock • Livelock

  5. Founding Fathers • E.W. Dijkstra: - Guarded Command Language - Weakest Precondition Calculus - Semaphores (Mutual Exclusion) • T. Hoare - Hoare Logic - Communicating Sequential Processes (CSP) - Monitors • R. Milner - Calculus of Commincating Systems (CCS) - PI-calculus (mobility) • V. Saraswatt - Concurrent Constraint Programming (CCP)

  6. CSP Process consists of • Internal Computation • Interface - Static (Signature) - Dynamic (Behavior)

  7. A Coffee Machine Events: coffee, thee A machine with buttons (menu) coffee thee

  8. Interfaces in OO Class Stack push pop Events: push(v), pop(v) Behavior: ?

  9. Operational Semantics  Labeled Transitions: P  Q • P,Q: Processes •   =a,b,c,.. , - a,b,c,..: External Events - : Termination - : Internal action

  10. Computation 1 2 3 P1  P2  P2  … • Finite • - successfull termination • - deadlock • Infinite • - fairness (strong, weak)

  11. The STOP-Process The process models inaction STOP STOP

  12. Performing Events a P Event Prefixing: Intuitive meaning: do firstathen P Formally (a P)  P a

  13. A Light Bulb on (on (off  stop))  (off  stop) off on (off  stop)  stop off

  14. Finite Automata P1 on P0 off stop P1 = on (off  stop)) P1=(off  stop)

  15. Making Choices(what’s life all about, isn’t it?) Choice Construct Meaning choose aA and continue with P(a) Formally x: A  P(x) (with A) (x:AP)  P(a) for aA a

  16. Example x : coffee,chocolate  P(x) P(coffee) = x : milk,black  stop P(chocolate) = x : hot, cold  stop

  17. Example (Cont’d) coffee (x : coffee,chocolate  P(x)) (x : milk,black  stop) stop milk

  18. Example (Cont’d) P0 chocolate P2 coffee hot cold milk P1 stop black

  19. Compound Events Communication Events C.V C: Channel V: Value syntax behavior C!V  P C.V (C!V  P) P output C?x P(x) C.V (C?x P(x)) P(V) input

  20. Example: A Simple Filter in?x out!op(x)  stop in op out

  21. Unix-Shell Scripts ECHO ! “please enter your name”  READ ? name  ECHO ! “welcome name”  stop

  22. Recursion N=P N: name P: process Example: light = on(off  light)  P Q N=P  N Q

  23. The Light Bulb (again) on (on (off  light)) (off  light) on (off  light) light on light P off

  24. The Dining Philospher P=think leftforkrightfork eatP

  25. Cognitive Robotics Sense-Act Cycle Cycle= x: Events  Act(x) Act(x) = a(x) Cycle

  26. Deriving Transitions Proof Rules 1 1 P1 Q1 … Pn Qn  P Q

  27. Mutual Recursion Example LIGHT=on ON ON=off  LIGHT

  28. Counter Example inc dec count(0) = inc  count(1) count(n+1) = x:{inc,dec}  P(x) P(inc) = count(n+2) P(dec) = count(n)

  29. Computation Graph inc inc inc count(0) count(1) count(2) count(3) … dec dec dec

  30. External Choice Syntax Semantics P  Q a P  P'  P  P' a P  Q P'  Q P  Q  P'

  31. Fifo Buffer in buffer out B() = in?x  B(<x>) B(<v>.s) = in?x  B(<x,v>.s)  out!v  B(s)

  32. Internal Choice Syntax Semantics P  Q P  Q P 

  33. Tossing a Coin Toss = (head Toss)  (tail Toss )  toss P head tail  Q

  34. Termination SKIP The process indicates successful termination: SKIP STOP 

  35. Sequential Composition Syntax Semantics P;Q  P  P'  P  P'   P ; Q  P';Q P ; Q  Q

  36. Purchase Purchase=Choose;Pay Select= select  (SKIP  return  Select) Pay= cash  receipt  SKIP  card  swipe  (receipt  sign  SKIP  reject  Pay)

  37. A One-Time Stack A Finite Representation Push = in?x  (Push; (out!xSKIP))  pop SKIP

  38. A Computation in.5 Push Push; (out!5 SKIP) Push;(out!3SKIP); (out!5 SKIP) SKIP;(out!3SKIP); (out!5 SKIP) (out!3SKIP); (out!5 SKIP) SKIP; (out!5 SKIP) out!5 SKIP SKIP in.3 pop  out.3  out.5 

  39. Concurrency Communication: Message Receiver Sender • Synchronous • Asynchronous • Broadcast

  40. Rendez-Vous parameters Callee Caller synchronization suspended method result

  41. Parallel Composition • Interleaving • Synchronization on common actions P | Q

  42. Architecture b a c P Q b b Interface(P) = {a,b} Interface(Q) = {b,c}

  43. Semantics Interleaving Synchronization  P  P'  P || Q  P' || Q   P  P' P  Q'  P || Q  P' || Q '

  44. A Skating Race Syntax A Run start  finish1  STOP || start  finish2  STOP start start  finish1  STOP || start  finish2  STOP finish1 finish1  STOP || finish2  STOP finish2 STOP || finish2  STOP STOP || STOP

  45. Modeling a False Start Pi= start  finish1  STOP + starti Pi

  46. Interleaving Syntax Semantics P ||| Q  P  P'  P ||| Q  P' ||| Q

  47. The Counter Example Revisited Count= inc  (dec  STOP) ||| Count) dec STOP dec  STOP dec (dec  STOP) ||| Count STOP ||| Count

  48. Dynamic Process Creation inc Count (dec  STOP) ||| Count (dec  STOP) ||| (dec  STOP) ||| Count inc

  49. A Bag Syntax A computation step Bag Bag = in?x  (out!x  STOP) ||| Bag) in.3 (out!3  STOP) ||| Bag)

  50. Buffers P= c?x  d!x  P Q= d?x  e!x Q One-place Buffers A Pipeline Synchronization on events: P || Q d.v

More Related