FROM π-CALCULUS SPECIFICATION TO SIMULATION OF A MOBILE AGENT USING JINI Andreea Barbu and Fabrice Mourlin University of Paris 12, LACL, 61. avenue du G´ en´ eral de Gaulle 94010 Cr´ eteil, France barbu@univ-paris12.fr, fabrice.mourlin@wanadoo.fr KEYWORDS: π-Calculus, process algebra, mobile agents, Jini Abstract This paper presents a formalism related to mobile agents. It describes the higher order π-calculus, an extension of the π-calculus who was introduced by R. Milner and later developed by Sangiorgi. This formalism defines a mathematical framework that can be used to reason about mobile code; it varies greatly in its expressiveness, in the mechanism it provides to specify mobile code based applications and in its practical usefulness for the validation and the verification of such applications. In this paper we show how this formalism can be used to represent the mobility and communication aspects of a mobile code environment called H oP iT ool. We developed the H oP iT ool, which is a Jini-based tool to implement mobile agents who respect an initial higher order π-calculus specification. We will also introduce the structure of the H oP iT ool with its most important elements. 1. INTRODUCTION - WHAT IS AN AGENT IN OUR FRAMEWORK? Mobile agents are omnipresent in today’s software ap- plications and Java is a significant language to develop these agents. For a few years, Java Intelligent Network Interface (Jini) [1] has been more and more essential on the framework market, allowing the development in dis- tributed networks. Jini is a tool based on Java and its en- ables us to realize, in a rather simple way, shared applica- tions. Just as robots automate many aspects of manufac- turing a computer, Jini automates and abstracts distributed applications’ underlying details. These details include the low-level functionality (socket communication, synchro- nisation) necessary to implement high-level abstractions (such as service registration, discovery, and use) that Jini provides. Jini was designed assuming that the network is not reliable. Things join the network and leave the net- work. There is no central control. Also, Jini blurs the distinction between hardware and software, dealing only with services. The objective of this work is first to de- scribe the modelling of mobile agents and second to im- plement a Java Tool, which is able to generate Jini code from our π-calculus specification. Mobile agents or trans- portable agents are codes, which move on the network to fulfil a mission. For a better understanding of their behav- ior and to validate properties of them, such as for example, their return on their starting machine, it is necessary to for- malize these aspects. A first realized study [2] leads to a higher order π-calculus formalisation. We use the for- mal language higher order π-calculus for the specification of the mobile agent and we chose the Java/Jini framework for its development. It is very significant to accentuate the higher order aspect because, to be able to develop a mo- bile agent, we need a language, which is able to express it like an essential characteristic. A mobile agent is a piece of code, which achieves a task required by an user. It must have a certain mobility to be able to move between var- ious computers. After a correct specification of our mo- bile system, we can generate Jini code with the help of our HOPiTool and the generated files can communicate with each other in a network. In a distributed environment, we can have one-to-many agent-hosts as well as one-to-many agents. To be an active agent platform, a given node in the system must have at least one active agent-host. Figure 1. describes the frame- work components. This component scheme can be mapped easily to the the Jini model. Jini, at the highest level, pro- vides the infrastructure that enables clients to discover and use various services. Jini also provides a programming model for developers of Jini clients and services. Proceedings 18th European Simulation Multiconference Graham Horton (c) SCS Europe, 2004 ISBN 3-936150-35-4 (book) / ISBN 3-936150-36-2 (CD)