global types for dynamic checking of protocol conformance
play

Global Types for Dynamic Checking of Protocol Conformance of - PowerPoint PPT Presentation

Global Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems Davide Ancona, Matteo Barbieri and Viviana Mascardi Universit` a di Genova Italian Conference on Theoretical Computer Science, Varese, September 19-21, 2012 D.


  1. Global Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems Davide Ancona, Matteo Barbieri and Viviana Mascardi Universit` a di Genova Italian Conference on Theoretical Computer Science, Varese, September 19-21, 2012 D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 1 / 36

  2. Outline Background on multi-agent systems 1 Previous work (Declarative Agent Languages and Technologies - 2 DALT 2012, Ancona, Drossopoulou, Mascardi) Global types: formalization 3 Expressive power of global types (by examples) 4 An extension to enhance the expressive power (not in the paper) 5 Conclusion and future work 6 D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 2 / 36

  3. Outline Background on multi-agent systems 1 Previous work (Declarative Agent Languages and Technologies - 2 DALT 2012, Ancona, Drossopoulou, Mascardi) Global types: formalization 3 Expressive power of global types (by examples) 4 An extension to enhance the expressive power (not in the paper) 5 Conclusion and future work 6 D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 3 / 36

  4. Multi-agent systems (MASs) industrial-strength technology for integrating and coordinating heterogeneous systems intrinsically distributed nature, asynchronous message passing agent-oriented programming languages are typically dynamically typed D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 4 / 36

  5. Jason AgentSpeak: a logic-based agent-oriented programming language, based on the belief-desire-intention (BDI) software model Jason: open source interpreter for an extended version of AgentSpeak, supporting a Prolog-like language for specifying agents behavior communication model: speech-act based, with performatives (a.k.a. illocutionary forces) D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 5 / 36

  6. Sending actions in Jason . send ( recipient , performative , content ) recipient : the id of the agent that will receive the message performative : specifies the semantics/aim of the message tell untell achieve unachieve tell - how untell - how ask - if ask - all ask - how content : a (possibly empty) set of atoms or plans D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 6 / 36

  7. Outline Background on multi-agent systems 1 Previous work (Declarative Agent Languages and Technologies - 2 DALT 2012, Ancona, Drossopoulou, Mascardi) Global types: formalization 3 Expressive power of global types (by examples) 4 An extension to enhance the expressive power (not in the paper) 5 Conclusion and future work 6 D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 7 / 36

  8. Protocols and multi-agent systems A protocol represents an agreement on how participating agents [systems] interact with each other. Without a protocol, it is hard to do a meaningful interaction: participants simply cannot communicate effectively. [From the manifesto of Scribble, a language to describe application-level protocols among communicating systems initially designed by Kohei Honda and Gary Brown, http://www.jboss.org/scribble/ ] D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 8 / 36

  9. Protocol specification Interaction diagrams in FIPA AUML specify the behavior of a system from a global point of view suitable for humans, but not for verification A first example: ping-pong protocol sd Ping-Pong alice: Ping bob: Pong loop tell(item) tell(ping) tell(pong) [FIPA Modeling: Interaction Diagrams, http://www.auml.org/auml/documents/ID-03-07-02.pdf ] D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 9 / 36

  10. Protocol specification: a formal approach protocol = (possibly infinite) set of (possibly infinite) sequences of sending actions Example 1: ping-pong protocol msg(alice,bob, tell ,ping) msg(bob,alice, tell ,pong) msg(alice,bob, tell ,ping) msg(bob,alice, tell ,pong) ... sd Ping-Pong alice: Ping bob: Pong loop tell(item) tell(ping) tell(pong) D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 10 / 36

  11. Protocols as global types Example 1: ping-pong protocol PingPong = α 1 : α 2 : PingPong where α 1 sending action type corresponding to msg(alice,bob, tell ,ping) where α 2 sending action type corresponding to msg(bob,alice, tell ,pong) sending action types = monadic predicates D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 11 / 36

  12. Global types as Prolog cyclic terms Modern Prolog systems (and Jason as well) support cyclic terms (a.k.a. regular or rational terms) Example: the unification problem PingPong = ping:pong:PingPong. succeeds with the answer PingPong = ping:pong:PingPong Regular terms naturally support recursive types Regular Prolog terms: a very compact representation of protocol specifications through global types Protocols can be easily manipulated and exchanged by agents D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 12 / 36

  13. Automatic generation of a self-monitoring MAS Jason implementation of a MAS S Jason implementation of a MAS S Protocol specification with a global type Generator Jason extended self-monitoring MAS S' Protocol specification with a global type Generator Jason extended self-monitoring MAS S' Sending action types as predicates Sending action types as predicates D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 13 / 36

  14. Centralized monitor agent Monitor Monitor ... Agent 1 Agent k Agent 1 Agent k protocol conformance dynamically checked by a monitor agent M other agents ask M permission to send their messages the monitor notifies all failures the monitor checks responsiveness of the agents D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 14 / 36

  15. Outline Background on multi-agent systems 1 Previous work (Declarative Agent Languages and Technologies - 2 DALT 2012, Ancona, Drossopoulou, Mascardi) Global types: formalization 3 Expressive power of global types (by examples) 4 An extension to enhance the expressive power (not in the paper) 5 Conclusion and future work 6 D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 15 / 36

  16. Global types The set of regular terms defined on the following constructors: λ (empty sequence), representing the singleton set { ǫ } containing the empty sequence ǫ . α : τ ( seq ), representing the set of all sequences whose first element is a sending action matching type α , and the remaining part is a sequence in the set represented by τ . τ 1 + τ 2 ( choice ), representing the union of the sequences of τ 1 and τ 2 . τ 1 | τ 2 ( fork ), representing the set obtained by shuffling the sequences in τ 1 with the sequences in τ 2 . τ 1 · τ 2 ( concat ), representing the set of sequences obtained by concatenating the sequences of τ 1 with those of τ 2 . D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 16 / 36

  17. Contractive global types A global type τ is contractive if it does not contain paths whose nodes can only be constructors in { + , | , ·} (such paths are necessarily infinite). Examples: a contractive type: T1 = ( λ + α :T1) a non contractive type: T2 = λ + (T2 | T2) + (T2 · T2) D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 17 / 36

  18. Transition rules T contractive global types, A sending actions total function δ : T × A → P fin ( T ) a → τ 2 means τ 2 ∈ δ ( τ 1 , a ) τ 1 a a → τ ′ → τ ′ τ 1 τ 2 1 2 (seq) a ∈ α (choice-l) (choice-r) a a a → τ ′ → τ ′ α : τ → τ τ 1 + τ 2 τ 1 + τ 2 1 2 a a → τ ′ → τ ′ τ 1 τ 2 1 2 (fork-l) (fork-r) a a → τ ′ → τ 1 | τ ′ τ 1 | τ 2 1 | τ 2 τ 1 | τ 2 2 a a → τ ′ → τ ′ τ 1 τ 2 1 2 ǫ ( τ 1 ) (cat-l) (cat-r) a a → τ ′ → τ ′ τ 1 · τ 2 1 · τ 2 τ 1 · τ 2 2 D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 18 / 36

  19. Definition of ǫ ( ) ǫ ( τ ) holds if and only if τ contains λ ǫ ( τ 1 ) ǫ ( τ 2 ) ( ǫ -seq) ǫ ( λ ) ( ǫ -lchoice) ( ǫ -rchoice) ǫ ( τ 1 + τ 2 ) ǫ ( τ 1 + τ 2 ) ( ǫ -fork) ǫ ( τ 1 ) ǫ ( τ 2 ) ( ǫ -cat) ǫ ( τ 1 ) ǫ ( τ 2 ) ǫ ( τ 1 | τ 2 ) ǫ ( τ 1 · τ 2 ) D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 19 / 36

  20. Interpretation of global types Run a n − 1 a n + 1 a 0 a 1 a n A run ρ for τ 0 is a sequence τ 0 → τ 1 → . . . → τ n → τ n + 1 → . . . of valid transitions such that either the sequence is infinite, or it terminates with the type τ k (with k ≥ 0) s.t. ǫ ( τ k ) . A ( ρ ) = sequence of sending actions a 0 a 1 . . . a n . . . contained in ρ . Interpretation � τ 0 � = { A ( ρ ) | ρ is a run for τ 0 } D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 20 / 36

  21. Results Proposition 1 Let τ be a contractive type. Either ǫ ( τ ) holds or there exist a and τ ′ s.t. a → τ ′ . τ Proposition 2 → τ ′ for some a , then τ ′ is contractive as well. a If τ is contractive and τ Corollary If τ is contractive, then � τ � � = ∅ D. Ancona (Univ. of Genova) Global Types for Multi-Agent Systems ICTCS12 21 / 36

Recommend


More recommend