Global Session Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems
چکیده
Multi-agent systems (MASs) have been proved to be an industrial-strength technology for integrating and coordinating heterogeneous systems. However, due to their intrinsically distributed nature, testing MASs is a difficult task. In recent work [1] we have tackled the problem of runtime verification of the conformance of a MAS implementation to a specified protocol by exploiting global session types on top of the Jason agent oriented programming language [2]. Global session types [3,6,4] (or session types, for short) are behavioral types designed for specifying in a compact way multiparty interactions between distributed components, and verifying their correctness. Session types can be naturally represented as cyclic Prolog terms (that is, regular terms), and their interpretation can be given by a transition function, that can be suitably implemented with a Prolog predicate. With such a predicate, a Jason monitor agent can be automatically implemented to dynamically check that the message exchange between the agents of a system conforms to a specified protocol. In this paper we continue our research in two directions: on the one hand, we investigate the theoretical foundations of our framework; on the other we extend it by introducing a new concatenation operator that allows a significant enhancement of the expressive power of our session types. As two significant examples, we show how two non trivial protocols can be compactly represented in our framework: a ping-pong protocol, and an alternating bit protocol, in the version proposed by Deniélou and Yoshida [5]. Both protocols cannot be specified easily (if at all) by other session type frameworks, while in our approach they can be expressed by two deterministic types (in a sense made precise in the sequel) that can be effectively employed for dynamic checking of the conformance of the system to the protocol.