edu.udo.cs.ie.cowbots.bdi.brf
Class CRevisionComponent

Package class diagram package CRevisionComponent
java.lang.Object
  extended by edu.udo.cs.ie.cowbots.bdi.brf.CRevisionComponent
Direct Known Subclasses:
CowbotRevision

public abstract class CRevisionComponent
extends java.lang.Object

the basic interface for any class that represents a revision function within the cowbot bdi framework. it controls the updates of an agent's epistemic state.


Constructor Summary
CRevisionComponent()
           
 
Method Summary
abstract  void addProgram(ELP program, java.lang.String source)
          adds a logical program to an agents beliefs
abstract  void addUserProgram(java.lang.String name, ELP program)
          this method adds a logical program to the program storage
abstract  BeliefBase getBeliefBase()
          this method returns the logical belief base of an agent.
abstract  java.util.List<Literal>[] getChangeOfBeliefs()
          returns a tupel of two lists describing changes in an agent's beliefs. this is used to update the jason belief base properly after the epistemic state was revised.
abstract  IEpistemicState getEpistemicState()
          returns the epistemic state of an agent
abstract  void init(Settings stts, DLV dlv, ICowbotUI ui)
          initialization routine, allows the cowbot revision to be configured with user parameters.
abstract  boolean newRevisionMode()
          only used internally, do not care about!
abstract  java.util.List<Literal>[] processMessages(java.lang.String agName)
          this method should process all "tell" messages previously queued by queueMessage.
abstract  void queueMessage(Message m)
          this method queues an incoming message. the deliberation may then decide to handle the message
abstract  void reset()
          resets the revision component (is set back to a fresh initialized state).
abstract  java.util.List<Literal>[] revise_belief(Literal beliefToAdd, Literal beliefToDel, Intention i)
          this method is used to handle belief addition and deletion from jason.
abstract  boolean revise_percepts(java.util.List<Literal> per, java.util.List<ELPLiteral> explore)
          this method is used to integrate percepts from the environment into the agent's belief base.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRevisionComponent

public CRevisionComponent()
Method Detail

revise_percepts

public abstract boolean revise_percepts(java.util.List<Literal> per,
                                        java.util.List<ELPLiteral> explore)
this method is used to integrate percepts from the environment into the agent's belief base.

Parameters:
per - the list of environmental percepts
Returns:
true if beliefs were changed, false otherwise

revise_belief

public abstract java.util.List<Literal>[] revise_belief(Literal beliefToAdd,
                                                        Literal beliefToDel,
                                                        Intention i)
this method is used to handle belief addition and deletion from jason.

Returns:
list of added and deleted literals to fire jason events (can be null)

addProgram

public abstract void addProgram(ELP program,
                                java.lang.String source)
adds a logical program to an agents beliefs

Parameters:
program - logical program to add
source - source (agent name) of program

queueMessage

public abstract void queueMessage(Message m)
this method queues an incoming message. the deliberation may then decide to handle the message


processMessages

public abstract java.util.List<Literal>[] processMessages(java.lang.String agName)
this method should process all "tell" messages previously queued by queueMessage.

Returns:
list of added and deleted literals to fire jason events (can be null)

getEpistemicState

public abstract IEpistemicState getEpistemicState()
returns the epistemic state of an agent

Returns:
epistemic state

init

public abstract void init(Settings stts,
                          DLV dlv,
                          ICowbotUI ui)
                   throws java.lang.Exception
initialization routine, allows the cowbot revision to be configured with user parameters.

Parameters:
brfConfig - XML Node named "brf" containing setup data
configName - user configuration override from mas2j
dlv - instance of dlv asp solver
Throws:
java.lang.Exception

getChangeOfBeliefs

public abstract java.util.List<Literal>[] getChangeOfBeliefs()
returns a tupel of two lists describing changes in an agent's beliefs. this is used to update the jason belief base properly after the epistemic state was revised.

Returns:
tupel

newRevisionMode

public abstract boolean newRevisionMode()
only used internally, do not care about!

Returns:
true or false

addUserProgram

public abstract void addUserProgram(java.lang.String name,
                                    ELP program)
this method adds a logical program to the program storage

Parameters:
name -
program -

getBeliefBase

public abstract BeliefBase getBeliefBase()
this method returns the logical belief base of an agent.

Returns:

reset

public abstract void reset()
resets the revision component (is set back to a fresh initialized state).