*** jessInJADE README *** ============================================================================================================================== 1. Contents of this directory NOTE: we call "jess agents" those agents that are JADE agents, since they extend the JADE "Agent" class, but whose initial beliefs and behaviour are defined in the Jess language. The Jess code that characterises the agent's beliefs and behaviour must be defined in a file that is read by the agent (see the "JavaStubSkeleton" description below), and is executed by it. This directory (jessInJADE) contains the two classes belonging to the "jessInJADE" package ("jessAg" and "jessBhv"), as well as their source files, for integrating jess code into JADE. It also contains the "JavaStubSkeleton" source code (but no class file!!!) that, once opened in a text editor and completed in the two points marked by "/********** COMPLETE THE CODE HERE ***********/" (an explanation of how to complete the code follows the mark), and saved with the name chosen for this class, behaves like a JADE agent that executes a piece of Jess code (namely, behaves like a "jess agent" in our terminology). Finally, the "JessAgentSkeleton" that the developer must edit and complete in order to implement a jess agent, is also provided. In particular -- the java class "jessAg" extends the JADE "Agent" class by adding to it the capability to exchange messages with any JADE agent. -- the java class "jessBhv" defines the behaviour of a jess agent, which is a cyclic behaviour. -- the java class "XXX" (where "XXX" is the name that the user must give to the class, by manually editing the JavaStubSkeleton file, completing it, and then saving it as "XXX.java") is the one that really performs the integration of a Jess piece of code, defining the agent's initial beliefs and behaviour, into JADE: it extends the "jessAg" class, thus being a JADE Agent (since jessAg extends the JADE Agent class), and integrates a piece of code written in Jess, that must be saved in a file somewhere. The name of this file must be manually added to the "XXX" source code. The "XXX.java" agent that is obtained so far, is then the real "jess agent". -- The jess "JessAgentSkeleton" file contains a set of functions that the developer can use in order to make the jess agent communicate with other agents in a JADE platform (no matter if these agents are jess agents, tuProlog agents or JADE ones). -- Note that there are TWO ways to obtain a jess agent: 1. by editing both the JavaStubSkeleton and the JessAgentSkeleton files, completing them, and finally saving them with the right name; 2. by using the Specif2Code transator program, offered by the UMLInJADE package, that automatically creates two pieces of code for any agent that is defined in the UML diagrams or in their equivalent intermediate XML representations: One piece of code (put in the "DCaseLP\UMLInJADE\jacode" directory) is equal to the JavaStubSkeleton code, but it does not need to be manually completed, since it already contains the right information on the class name and path to the Jess file, and has the right name. Another piece of code (put in the "DCaseLP\UMLInJADE\jecode" directory) is equal to the JessAgentSkeleton, and MUST be manually completed. For more details on this second approach, refer to the manual that can be found in the "DCaseLP\UMLInJADE\Manual" directory, and follow the tutorial contained in the "DCaseLP\UMLInJADE\Tutorial" directory. ============================================================================================================================== 2. Requirements for using the jessInJADE package NOTE: A recent version of Java should be installed in your computer For using the package, you need 1) To download JADE from http://jade.tilab.com (open source), and install it. 2) To download jess from http://herzberg.ca.sandia.gov/jess/ (free academic license upon request), and install it. 3) To update your classpath so that the packages offered by JADE and jess can be imported by the jessInJADE package. -- For example, if you have extracted all the JADE .jar files to the directory C:\Programs\jade\lib, you should add the following paths to your classpath variable: C:\Programs\jade\lib\jade.jar; C:\Programs\jade\lib\jadeTools.jar; C:\Programs\jade\lib\iiop.jar; C:\Programs\jade\lib\base64.jar -- In a similar way, if you have extracted the jess .jar file to the directory C:\Programs\Jess61p8\, you should add the following path to your classpath variable: C:\Programs\Jess61p8\jess.jar; -- Since the jessInJADE package makes use of the ErrorMsg class provided by the tuPInJADE package, it is necessary to extract the tuPInJADE directory to your hard disk first, and to add the path to the tuPInJADE package to your classpath variable. If, for example, you have extracted the tuPInJADE directory in C:\Documents and Settings\myname\Documents\DCaseLP, then you should add C:\Documents and Settings\myname\Documents\DCaseLP to your classpath. -- Finally, make sure that the current directory (".") belongs to your classpath. NOTE that jessInJADE cannot work if JADE, tuPInJADE and Jess have not been correctly installed, and if the classpath has not been changed accordingly. ============================================================================================================================== 3. How to use the jessInJADE package -- Once you have installed both JADE, tuPInJADE and Jess, you can start using the jessInJADE package. -- Follow the tutorial that can be found in the DCaseLP\jessInJADE\Tutorial directory to learn how to define jess agents and to integrate them into JADE. -- Read the manual that can be found in the DCaseLP\jessInJADE\Manual directory to understand how the package works. -- If you are interested in obtaining the code of the "jess agents" automatically from a higher level specification given in UML or in an XML intermediate format, go to the "UMLInJADE" directory, and read the "UMLInJADE-readme" file. ============================================================================================================================== 4. Credits The jessInJADE package has been developed by Ivana Gungui, integrating previous work by Stefano Miglia