Software Agent Metrics Analyzer (SAMA)
SAMA, Software Agent Metrics Analyzer is an application which will parse agent program written in Java. After parsing, it analyzes the program and computes the metrics about the agent. The parsing functionality is based on the ANTLR framework while the agent program to be analyzed should be developed under the JADE framework (version 3.1). The analyzer is written in Java version 1.4.2. SAMA current version is 1.3 (Released on 11/03/04). I have been working on SAMA since August 2003.
You can download SAMA from here.
There are three main files to be download, the lib.jar, parser.jar and example.jar or you can download just the main jar file (SAMA.jar), which will contains every files needed. After download SAMA.jar into your home directory, run jar -xfv SAMA.jar to unzip the files. It will create a new directory (Agents) automatically for all the files unzipped.
lib.jar
BookTradingVer3.jar (7 kB) BookBuyer.java, BookBuyerGui.java, BookSeller.java, BookSellerGui.java It contains an agent application used in the analysis by SAMA.
This application presents a multi agent system where there are two
types of trading agent: Buyer and Seller agents. The agents will act on behalf
for the user to buy or sell the books at the price with as much
profit as possible. More details could be found here
The application is based on the
JADE examples.
Files
Contents
Description
SAMA.jar (1.50
MB)
lib.jar, application.jar and example.jar
It contains all three jar files which formed the SAMA.
(1.46 MB)jade.jar, jadeTools,jar, Base64.jar, iiop.jar and
antlr.jar
It contains the five libraries. Antlr.jar is required for the java lexer and
parser. The rest of the libraries served as the JADE environment for the agents
applications. (jade.jar, jadeTools.jar, Base64.jar and iiop.jar)
parser.jar
(34 kB)JavaLexer, JavaRecognizer, JavaTokenTypes, JavaTreeParser,
JavaTreeParserTokenTypes, Class, ClassMgt, Method, Variable, Main and
agentAnalyzer
It contains all the files for the SAMA. These include the java parser, the
respective component class, the agent program analyzer and the main program.
example.jar
(1 kB)Simple1.java, TwoSteps.java
It contains the sample agent program, which used in the analysis by SAMA. The
files is based on the
JADE Primer Tutorial 2 and 3 examples.
After you have downloaded and unzipped SAMA.jar, you might need to setup the Java CLASSPATH so that the correct libraries are used.
Assume that the files are under c drive and inside the directory named c:\Agents, using Control Panel > System > Advanced > Environment Variables and create the CLASSPATH System variable and add the following values. (If the variable is already exists, append the values into the variable.)
c:\Agents\lib\jade.jar;c:\Agents\lib\jadeTools.jar;c:\Agents\lib\Base64.jar;c:\Agents\lib\iiop.jar;c:\Agents\lib\antlr.jar;
Before you can run SAMA, you need to compile the java files inside Parser directory. (You can use the command javac *.java) Type the following command to run the application.
For Win XP: java SAMA
Currently, SAMA is able to calculate the following attributes:
You could download SAMA final version here. It contains only the parser.jar, which will replaced the older parser files in SAMA 1.0, 1.1 and 1.2. The rest of the files remain unchanged.
The Java CLASSPATH must be set so that the correct libraries are used before the agent can run. (As shown in previous section 4) We would show how to run BookTradingVer3.jar in Windows environment. We would create two sellers and one buyer, sellers have to be created first as buyer will exist the system if it could not find any seller. Agents can't be executed directly like a normal java program, an environment container (jade.Boot) is needed to provide the necessary services to run an agent. Assume that BookTradingVer3.jar is under c drive and inside the directory named c:\Agents, here is the list of commands needed to run the book trading program: *Although SAMA analyzes agent program, it is not an agent. Please refer to section 5 on running SAMA.
Last updated on 30 Mar 2004 PM