*** UMLInJADE README *** ============================================================================================================================== 1. Contents of this directory This directory (UMLInJADE) contains the classes belonging to the "UMLInJADE" package, as well as their source files, together with the XSL style sheets necessary to translate the XMI models into (ad-hoc) intermediate XML models and, afterwards, to create the files containing the code for running the Jess agents into JADE from the intermediate XML models. In particular: - the "Specif2Code.class" class is the one that makes the translation by calling the methods offered by the XSL processor to process the style sheets. Note that this class uses the following packages: javax.xml.transform.*; javax.xml.parsers.*; org.w3c.dom.*; org.xml.sax.*. The most recent versions of Java already integrate them, but if you have problems in the parsing phase, you might solve them by installing an XSL processor (for example, xalan from http://www.apache.org/dyn/closer.cgi/xml/xalan-j) and add the path to the XSL processor ("xalan.jar" if you are using xalan) to your CLASSPATH variable. - the "XSL/xmiarchitecture.xsl" style sheet translates the architecture diagram (in XMI format) into the intermediate XML format. - the "XSL/xmiagent.xsl" style sheet translates the agent diagram (in XMI format) into the intermediate XML format. - the "XSL/xmitraducer.xsl" style sheet is used when the XMI models are all in one single file. - the "XSL/xmltraducer.xsl" style sheet translates the architecture, agent and protocol diagrams (in intermediate XML format) into the corresponding Java and Jess code. The Jess agents produced by this translation are ready to be run into the JADE platform, but the Jess code that will be automatically loaded into the agent's Jess engine MUST FIRST BE COMPLETED by the developer, in order to contain all the information required for the agent's functioning. - the "intermed", "jacode" and "jecode" directories are initially empty: they are the directories where our translation program puts its output, which consists of intermediate XML code (in case the input was an XMI model), java pieces of code for integrating Jess code into JADE (thus obtaining a "jess agent"), and the Jess pieces of code that must be completed by the developer, respectively. ============================================================================================================================== 2. Requirements for using the translation program NOTE: A recent version of Java should be installed in your computer. -- Remember that Specif2Code uses the following packages: javax.xml.transform.*; javax.xml.parsers.*; org.w3c.dom.*; org.xml.sax.*. The most recent versions of Java already integrate them, but if you have problems in the parsing phase, you might solve them by installing and XSL processor (for example, xalan from http://www.apache.org/dyn/closer.cgi/xml/xalan-j) and add the path to the XSL processor ("xalan.jar", if you are using xalan) to your CLASSPATH variable. -- You need to have the three empty directories "intermed", "jacode" and "jecode" present in the DCaseLP\UMLInJADE directory, otherwise the translations ends with an error message. -- You need to have the path to the DCaseLP directory in your CLASSPATH variable, since Specif2Code uses the ErrorMsg class belonging to the tuPInJADE package, that can be found in the DCaseLP\tuPInJADE directory. 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. -- If you want to define your agent and architecture diagrams in UML, and not directly in the intermediate XML format, you need a UML editor that is capable of exporting class diagrams into XMI. We use ArgoUML (http://argouml.tigris.org); we are not sure that our translation program works with the output generated by editors different from ArgoUML, so we warmly suggest to use it. -- If, after translating the high-level specifications of the MAS into code, you want to run it, you need both JADE and Jess installed on your computer. Go to the DCaseLP\jessInJADE\ directory and read the jessInJADE-readme file in order to download and install JADE and Jess properly. ============================================================================================================================== 3. How to use the translation program -- Follow the tutorial that can be found in the DCaseLP\UMLInJADE\Tutorial directory to learn how to define textual interaction protocols, UML agent and architecture diagrams, how to export them into XMI, and how to translate them into Jess by using the Specif2Code translation program. -- Read the short manual that can be found in the DCaseLP\UMLInJADE\Manual directory to understand how the package works. -- For those who can read Italian, and who want more details on this package, the detailed - although slightly changed in the meanwhile - description of this package and of its functioning can be found in Stefano Miglia's master Thesis, written in Italian, that can be downloaded from http://www.disi.unige.it/person/MascardiV/Download/Miglia.tgz. ============================================================================================================================== 4. Credits The UMLInJADE package has been developed by Ivana Gungui, integrating previous work by Stefano Miglia