revisionlogic
Class BeliefChangeSzenario

java.lang.Object
  extended byrevisionlogic.BeliefChangeSzenario

public class BeliefChangeSzenario
extends java.lang.Object

BeliefChangeSzenario is a belief change scenario. It is comprised of a collection of knowledge bases, a conjunction of sentences for revision, a collection of sentences for contractions, a conjunction of entailment-based integrity constraints, and a collection of consistency-based integrity constraints.

Author:
Daphne Liu, daphnel@sfu.ca; Sven Thiele, sthiele@rz.uni-potsdam.de

Field Summary
(package private) static ISent bottom
          A reference to a Contradiction.
(package private) static java.util.HashSet emptySet
          A reference to an empty HashSet.
(package private) static java.util.Vector emptyVector
          A reference to an empty Vector.
(package private) static ISent top
          A reference to a Tautology.
 
Constructor Summary
BeliefChangeSzenario()
          Creates a new default BeliefChangeSzenario.
 
Method Summary
 java.util.Vector change()
          Checks if there are inconsistencies among the parameters of this BeliefChangeScenario, executes this BeliefChangeScenario using the selected change type, search algorithm, and merge type, and finally returns the resultant knowledge base.
 void setAlgo1(boolean isAlgo1)
          Sets the equivalence set search algorithm to AllEQDet1 if isAlgo1 is true, or to AllEQDet2 otherwise.
 void setCBIC(java.util.Vector ICc)
          Sets the consistency-based integrity constraints to those in ICc.
 void setChoiceType(boolean isChoiceOn)
          Sets the change type to choice change if isChoiceOn is true, or to skeptical change otherwise.
 void setConstraints(java.util.Vector ICc, ISent ICe)
          Sets the consistency-based integrity constraints to those in ICc, and sets the reference for the conjunction of entailment-based integrity constraints to ICe.
 void setContractor(java.util.Vector C)
          Sets the contraction sentences to be the negations of those in C.
 void setEBIC(ISent ICe)
          Sets the reference for the conjunction of entailment-based integrity constraints to ICe.
(package private)  void setKB(java.util.Vector K)
          Sets the knowledge bases to be the same as those in K.
 void setKBFromUI(java.util.Vector K)
          Sets the knowledge bases to be the same as those in K.
 void setProjMerge(boolean isProjOn)
          Sets the merge type to projection merge if isProjOn is true, or to default merge otherwise.
 void setRevisor(ISent R)
          Sets the reference for the conjunction of revision sentences to R.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

top

static final ISent top
A reference to a Tautology.


bottom

static final ISent bottom
A reference to a Contradiction.


emptyVector

static final java.util.Vector emptyVector
A reference to an empty Vector.


emptySet

static final java.util.HashSet emptySet
A reference to an empty HashSet.

Constructor Detail

BeliefChangeSzenario

public BeliefChangeSzenario()
Creates a new default BeliefChangeSzenario.

Method Detail

setKB

void setKB(java.util.Vector K)
Sets the knowledge bases to be the same as those in K.

If K is null or empty, then the knowledge base is set to T by default. This method is invoked for the command-line version of COBA.

Parameters:
K - the Vector of knowledge bases, each represented as an ISent conjunction.

setKBFromUI

public void setKBFromUI(java.util.Vector K)
Sets the knowledge bases to be the same as those in K.

If K is null or empty, then the knowledge base is set to T by default. This method is invoked for the applet version of COBA.

Parameters:
K - the Vector of knowledge bases, each represented as a Vector of ISent sentences.

setRevisor

public void setRevisor(ISent R)
Sets the reference for the conjunction of revision sentences to R.

If R is null or empty, then the conjunction of revision sentences is set to T by default.

Parameters:
R - a reference to the conjunction of revision sentences.

setContractor

public void setContractor(java.util.Vector C)
Sets the contraction sentences to be the negations of those in C.

Parameters:
C - the Vector of contraction sentences.

setEBIC

public void setEBIC(ISent ICe)
             throws InconsistencyException
Sets the reference for the conjunction of entailment-based integrity constraints to ICe.

Parameters:
ICe - a reference to the conjunction of entailment-based integrity constraints.
Throws:
InconsistencyException - if the entailment-based integrity constraints are mutually inconsistent.

setCBIC

public void setCBIC(java.util.Vector ICc)
Sets the consistency-based integrity constraints to those in ICc.

Parameters:
ICc - the Vector of consistency-based integrity constraints.

setConstraints

public void setConstraints(java.util.Vector ICc,
                           ISent ICe)
                    throws InconsistencyException
Sets the consistency-based integrity constraints to those in ICc, and sets the reference for the conjunction of entailment-based integrity constraints to ICe.

Parameters:
ICc - the Vector of consistency-based integrity constraints.
ICe - a reference to the conjunction of entailment-based integrity constraints.
Throws:
InconsistencyException - if the entailment-based integrity constraints are mutually inconsistent.

setChoiceType

public void setChoiceType(boolean isChoiceOn)
Sets the change type to choice change if isChoiceOn is true, or to skeptical change otherwise.

Parameters:
isChoiceOn - a boolean value indicating whether choice change is to be applied or not.

setAlgo1

public void setAlgo1(boolean isAlgo1)
Sets the equivalence set search algorithm to AllEQDet1 if isAlgo1 is true, or to AllEQDet2 otherwise.

Parameters:
isAlgo1 - a boolean value indicating whether AllEQDet1 is to be used or not.

setProjMerge

public void setProjMerge(boolean isProjOn)
Sets the merge type to projection merge if isProjOn is true, or to default merge otherwise.

Parameters:
isProjOn - a boolean value indicating whether projection merge is to be applied or not.

change

public java.util.Vector change()
                        throws InconsistencyException
Checks if there are inconsistencies among the parameters of this BeliefChangeScenario, executes this BeliefChangeScenario using the selected change type, search algorithm, and merge type, and finally returns the resultant knowledge base.

Returns:
a Vector of the resultant ISent knowledge base(s) for this BeliefChangeScenario.
Throws:
InconsistencyException - if there are inconsistencies among the parameters of this BeliefChangeScenario.