**********************************************************************
               INSTRUCTIONS FOR RUNNING LCC INTERACTIONS
                  (written by Nardine on 18/04/2007)             
**********************************************************************


This is the application used for executing LCC interaction protocols.
Ofcourse, the LCC interaction protocols as well as the agents running
these protocols should also be defined.  In what follows, we provide
brief instructions for using this application. 


STEP 1: DEFINE YOUR AGENTS
==========================
Define each agent in an '.kb' file saved in the ./agents directory.
This file should contain the agent's knowledge required for the
interaction it will be engaged in.  These are specified via Prolog
facts and rules.  Note that if an agent will engage in an interaction,
then its '.kb' file should exist even if it is empty.  It is this
file's name that will be used in Step 3 as the agent's name
('AgentId').


STEP 2: DEFINE YOUR LCC INTERACTION PROTOCOL
============================================
Write your LCC interaction protocol in an '.lcc' file saved in the
./interaction_models directory.  The name of this file will be used as
the interaction's name ('Interaction') in Step 3.


STEP 3: RUN THE LCC INTERACTION PROTOCOL
========================================

1- In one terminal, start the Linda server, as follows:
   a- Start sicstus:
         $ sicstus
   b- Start the Linda server:
	 |?- [linda_server].

2- In a different terminal, load the agent that will initiate the
   interaction protocol:
   a- Start sicstus:
         $ sicstus
   b- Load 'initiation.pl'
	 |?- [initiation].
   c- Initiate the protocol:
	 |?- initiate(AgentId, Role, Interaction).
      where, 
      * the 'AgentName' is the agent's file name (excluding the
	'.kb' file extension) in the ./agents directory
      * the 'Role' is the role played by this agent in this
	interaction protocol.  This includes the parameters as well,
	if any
      * the 'InteractionName' is the LCC interaction's file name
	(excluding the '.lcc' file extension) in the
	./interaction_models directory 

3- In other terminals, and for each other agent engaged in the
   interaction:
   a- Start sicstus:
         $ sicstus
   b- Load 'initiation.pl'
	 |?- [initiation].
   c- Join the protocol:
	 |?- join(AgentId,Role,Interaction).
      where, 
      * the 'AgentName' is the agent's file name (excluding the
	'.kb' file extension) in the ./agents directory
      * the 'Role' is the role played by this agent in this
	interaction protocol, this includes the parameters as well, if
	any
      * the 'InteractionName' is the LCC interaction's file name
	(excluding the '.lcc' file extension) in the
	./interaction_models directory
