|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.udo.cs.ie.cowbots.bdi.brf.BeliefBase
public class BeliefBase
This class holds the belief base from the Cowbot-BDI-model, in which the belief base consists of information objects. An information object is a pair of ELP and meta-information (usually time and agent source).
Field Summary | |
---|---|
ELPLiteral |
agIson
|
(package private) Annotator |
annot
|
(package private) java.util.List<ELP> |
bsetprograms
|
private java.util.List<java.util.List<InformationObject>> |
ioList
|
(package private) IdentTable |
itab
|
private java.util.Map<IKnowledgeOperator,java.util.Set<ELPLiteral>> |
kopDeleteBuffer
|
private java.util.Map<IKnowledgeOperator,java.util.List<InformationObject>> |
kopInputBuffer
|
private java.util.List<IKnowledgeOperator> |
kopOrder
|
(package private) MapOperator |
map
|
private java.util.Map<IKnowledgeOperator,java.util.List<InformationObject>> |
opDomain
|
private java.util.Queue<Message> |
pendingMessages
|
private java.util.List<InformationObject> |
programs
|
(package private) UpdatePolicy |
upol
|
(package private) java.util.Map<java.lang.String,ELP> |
userprograms
|
Constructor Summary | |
---|---|
BeliefBase()
default constructor |
Method Summary | |
---|---|
void |
addBeliefSetProgram(ELP program)
adds a program that operates on the belief set of an agent. those programs are concatenated at the belief state. |
void |
addFacts(java.util.Collection<ELPLiteral> facts,
java.lang.String source)
adds facts from a given source to the belief base |
void |
addMessage(Message m)
this functions stores an unprocessed message in the agents belief base |
void |
addProgram(ELP program,
java.lang.String source,
int time)
adds a program from a given source into the belief base. if no source is given, the source is set to the agent itself. |
void |
addProgram(InformationObject program)
|
void |
addUserProgram(java.lang.String name,
ELP program)
adds a program with a given name that is only stored, but not used by the revision. |
void |
clear()
this method deletes all information object stored in the belief base. |
void |
deleteFacts(java.util.Set<ELPLiteral> factsToDelete)
delete facts from the belief base. |
java.util.List<InformationObject> |
getAllIO()
returns a list with all information objects in the belief base. |
Annotator |
getAnnotator()
this method returns the annotator associated with this belief base |
java.util.List<ELP> |
getBeliefSetPrograms()
returns a collection of programs that should be part of the belief state, but are not part of a revision process. these programs are used to perform calculations over an answer set, and the user has to take care the head alphabets of programs are consistent with ordinary programs in the beliefs of an agent. |
IdentTable |
getIdentifiers()
returns the identifier table associated with this belief base (optional element) |
java.util.List<IKnowledgeOperator> |
getKnowledgeOperators()
this method returns the list of all knowledge operators in order defined in the update policy. |
MapOperator |
getMapOperator()
returns the map operator associated with the belief base. in any belief base, only one map operator may exist. |
java.util.Queue<Message> |
getMessages()
this function returns the queue of all unprocessed messages. |
java.util.List<InformationObject> |
getOperatorIO(IKnowledgeOperator op)
returns the area of information objects within the belief base associated with a knowledge operator |
ELP |
getProgram(java.lang.String name)
returns a uniquely-named program that is stored in the belief base of an agent. |
UpdatePolicy |
getUpdatePolicy()
|
void |
registerKnowledgeOperator(IKnowledgeOperator kop)
registers a knowledge operator to the belief base. this method is responsible for setting up a domain of information objects for new (unknown) operators |
void |
reset()
resets the belief base |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.List<java.util.List<InformationObject>> ioList
private java.util.List<InformationObject> programs
private java.util.Map<IKnowledgeOperator,java.util.List<InformationObject>> opDomain
private java.util.Queue<Message> pendingMessages
IdentTable itab
MapOperator map
Annotator annot
UpdatePolicy upol
private java.util.Map<IKnowledgeOperator,java.util.List<InformationObject>> kopInputBuffer
private java.util.Map<IKnowledgeOperator,java.util.Set<ELPLiteral>> kopDeleteBuffer
private java.util.List<IKnowledgeOperator> kopOrder
java.util.Map<java.lang.String,ELP> userprograms
java.util.List<ELP> bsetprograms
public ELPLiteral agIson
Constructor Detail |
---|
public BeliefBase()
Method Detail |
---|
public Annotator getAnnotator()
public UpdatePolicy getUpdatePolicy()
public void registerKnowledgeOperator(IKnowledgeOperator kop)
kop
- knowledge operator to registerpublic java.util.List<InformationObject> getOperatorIO(IKnowledgeOperator op)
op
- knowledge operator
public java.util.List<InformationObject> getAllIO()
public void addMessage(Message m)
m
- message to storepublic java.util.Queue<Message> getMessages()
public void clear()
public IdentTable getIdentifiers()
public MapOperator getMapOperator()
public void addProgram(InformationObject program)
public void addProgram(ELP program, java.lang.String source, int time)
program
- source
- time
- public void addFacts(java.util.Collection<ELPLiteral> facts, java.lang.String source)
facts
- literals to addsource
- source of literals (null for an agent itself)public void deleteFacts(java.util.Set<ELPLiteral> factsToDelete)
factsToDelete
- public ELP getProgram(java.lang.String name)
name
- progam name
public void addUserProgram(java.lang.String name, ELP program)
name
- program nameprogram
- logical programpublic void addBeliefSetProgram(ELP program)
program
- public java.util.List<ELP> getBeliefSetPrograms()
public java.util.List<IKnowledgeOperator> getKnowledgeOperators()
public void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |