avalor / eJason

eJason: a Framework for Distributed and Fault-tolerant Multi-Agent Systems
14 stars 1 forks source link

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Thanks for your interest in eJason, our experimental implementation of Jason in Erlang. Here you can find the commands necessary to run a MAS using eJason (for UBUNTU Linux)

If you have any issues, please feel free to contact me at: avalor@babel.ls.fi.upm.es %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

To compile eJason sources, just type:

make

This will generate a set of ".beam" files inside "./eJason/ebin".

We also suggest copying into the "agents" folder all ".asl" files, i.e. all Jason source code files, that will be run. This folder is included in the path were eJason looks for Jason files.

To start an eJason system, execute the script 'ejason':

./ejason [-c ContainerName]

where ContainerName is the name of the container that composes the newly created system. As a matter of example, consider the command:

./ejason -c myContainer

Its execution will generate a container myContainer@userHost, where userHost is the name of the host where the command was executed.

The ejason script starts an erlang shell invoking the command 'erl'. Therefore, it accepts any parameter associated to 'erl' (see http://erlang.org/doc/man/erl.html).

The ejason runtime system (the Distribution Manager and the Supervision Manager) is started as well.


The source code of the Jason agents (i.e. the '.asl' files) that run in eJason must be placed in a directory belonging the to search path of eJason. By default, the folders "ebin", "include" and "agents" belong to it. Additional directories Dir1... DirN can be added via the parameter "-pa Dir1 ... DirN" to the ejason script.

To parse and compile the eJason code of an agent, the following command must be run:

ejason:parse(agentName). ejason:compile(agentName).

To run this agent, type:

ejason:run(agentName).

For simplicity, the three commands above can be consecutively run as:

ejason:crun(agentName).

For instance, to run the "counter" agent within the tests provided the following sequence of commands suffices:

./ejason -c container1

ejason:crun(counter).

Similarly, several agents (10 in this sample) can be started with the same code by executing:

ejason:crun(counter, 10).

This agent will always be alive. If we want to stop it, we must call:

ejason:kill(counter).

If "N" agents with the same name (actually, they will be renamed counter_2... counter_N) were launched, we can kill all them by invoking:

ejason:kill(counter, N).

** RUNNING TESTS ****

Check the README file for each of the tests, as some may require special start parameters or the start of several Erlang nodes

** NOTES ON THE LATEST GENERAL UPDATE **

The implementation of eJason now includes the monitoring and supervision mechanisms described in the Ph.D. thesis of the developer.

A formal semantics of these mechanisms is also available in the aforementioned work.

(More information will be added after the formal defense).