edu.udo.cs.ie.cowbots.bdi.brf.operators
Class CausalRejection

Package class diagram package CausalRejection
java.lang.Object
  extended by edu.udo.cs.ie.cowbots.bdi.brf.operators.CausalRejection
All Implemented Interfaces:
IInferenceOperator

public class CausalRejection
extends java.lang.Object
implements IInferenceOperator

implementation of update programs based on causal rejection (proposed by eiter et. al).


Field Summary
protected  ELP updProgram
           
 
Constructor Summary
CausalRejection()
           
 
Method Summary
protected  ELP buildTestProgram(ELP up)
          this method creates a test program for strictly minimal answer sets
 ELP createBeliefState(java.util.List<InformationObject> ioList)
          this method builds a belief state from a list of information objects.
 java.util.Map<java.lang.String,java.util.List<ELPLiteral>> getRejectSet()
          returns the literals being rejected in the answer set analyzed by selectAnswerSet.
protected  ELPLiteral indexLiteral(ELPLiteral l, int index)
          creates an indexed version of a literal, with proper sign
protected  ELPLiteral inverse(ELPLiteral l)
          returns the negation of a positive or strict negated literal
protected  ELPAtom isRejRule(ELPRule r)
          this method returns the rej-Literal, if it is in the head of a rule
 AnswerSet selectAnswerSet(java.util.List<AnswerSet> asl, DLV dlv)
          this method evaluates a collection of answer sets and returns the "best" answer set. it is used in situations where multiple answer sets arise from an asp solver. additionally, any literals introduced during belief state construction, which are part of the inference's extended alphabet has to be removed here!
 void setSavePredicates(java.util.Set<java.lang.String> savePreds)
          assigns a set of "save" functor names to the inference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

updProgram

protected ELP updProgram
Constructor Detail

CausalRejection

public CausalRejection()
Method Detail

createBeliefState

public ELP createBeliefState(java.util.List<InformationObject> ioList)
Description copied from interface: IInferenceOperator
this method builds a belief state from a list of information objects.

Specified by:
createBeliefState in interface IInferenceOperator
Parameters:
ioList - list of information objects
Returns:
belief state (encoded as an elp)

indexLiteral

protected ELPLiteral indexLiteral(ELPLiteral l,
                                  int index)
creates an indexed version of a literal, with proper sign

Parameters:
l - literal a(X) to index
index - index of literal
Returns:
a_index_p(X,index) or a_index_n(X,index)

inverse

protected ELPLiteral inverse(ELPLiteral l)
returns the negation of a positive or strict negated literal

Parameters:
l -
Returns:

selectAnswerSet

public AnswerSet selectAnswerSet(java.util.List<AnswerSet> asl,
                                 DLV dlv)
Description copied from interface: IInferenceOperator
this method evaluates a collection of answer sets and returns the "best" answer set. it is used in situations where multiple answer sets arise from an asp solver. additionally, any literals introduced during belief state construction, which are part of the inference's extended alphabet has to be removed here!

Specified by:
selectAnswerSet in interface IInferenceOperator
Parameters:
asl - a list of answer sets
dlv - instance to dlv
Returns:
answer set to be transformed into a belief set

buildTestProgram

protected ELP buildTestProgram(ELP up)
this method creates a test program for strictly minimal answer sets

Parameters:
up - update sequence to create test for
Returns:
test program

isRejRule

protected ELPAtom isRejRule(ELPRule r)
this method returns the rej-Literal, if it is in the head of a rule

Parameters:
r - rule to test
Returns:
reject literal or null

getRejectSet

public java.util.Map<java.lang.String,java.util.List<ELPLiteral>> getRejectSet()
Description copied from interface: IInferenceOperator
returns the literals being rejected in the answer set analyzed by selectAnswerSet.

Specified by:
getRejectSet in interface IInferenceOperator
Returns:
functor-hashed lists of rejected literals

setSavePredicates

public void setSavePredicates(java.util.Set<java.lang.String> savePreds)
Description copied from interface: IInferenceOperator
assigns a set of "save" functor names to the inference. a save predicate is assumed to cause no conflicts and can be written directly into the edb (and answer set).

Specified by:
setSavePredicates in interface IInferenceOperator
Parameters:
savePreds - set of predicates which should not be transformed