edu.ucla.belief
Class KnowledgeBase

Object
  extended by KnowledgeBase

public class KnowledgeBase
extends Object

Define KnowledgeBase.

Since:
033603
Author:
David Allen

Nested Class Summary
static class KnowledgeBase.KBUnsatisfiableStateException
          This Exception is thrown when the KnowledgeBase becomes inconsistent, or unsatisfiable.
static interface KnowledgeBase.KnowledgeBaseListener
           
 
Field Summary
 int INCREMENTAL_STACK_GROWTH
          Must be a positive value.
 int INITIAL_STACK_SIZE
          Must be a positive value.
static int KB_UNSATISFIABLE
           
 
Constructor Summary
KnowledgeBase(MappedList vars, int[] clausesIndex, int[] literalsVars, int[] literalsStates, boolean[] literalsPositive, KnowledgeBase.KnowledgeBaseListener lstn)
           
 
Method Summary
 int assertNegative(int var, int state)
          Asserts var!=state as true.
 int assertPositive(int var, int state)
          Asserts var=state as true.
static KnowledgeBase createFromBN(BeliefNetwork bn, MappedList vars, KnowledgeBase.KnowledgeBaseListener lstn)
           
 int currentState()
           
 int numClauses()
           
 int numLiterals()
           
 void retract(int size)
           
 void write(PrintStream stream)
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_STACK_SIZE

public int INITIAL_STACK_SIZE
Must be a positive value.


INCREMENTAL_STACK_GROWTH

public int INCREMENTAL_STACK_GROWTH
Must be a positive value.


KB_UNSATISFIABLE

public static final int KB_UNSATISFIABLE
See Also:
Constant Field Values
Constructor Detail

KnowledgeBase

public KnowledgeBase(MappedList vars,
                     int[] clausesIndex,
                     int[] literalsVars,
                     int[] literalsStates,
                     boolean[] literalsPositive,
                     KnowledgeBase.KnowledgeBaseListener lstn)
              throws KnowledgeBase.KBUnsatisfiableStateException
Throws:
KnowledgeBase.KBUnsatisfiableStateException
Method Detail

currentState

public int currentState()

numClauses

public int numClauses()

numLiterals

public int numLiterals()

createFromBN

public static KnowledgeBase createFromBN(BeliefNetwork bn,
                                         MappedList vars,
                                         KnowledgeBase.KnowledgeBaseListener lstn)
                                  throws KnowledgeBase.KBUnsatisfiableStateException
Throws:
KnowledgeBase.KBUnsatisfiableStateException

assertPositive

public int assertPositive(int var,
                          int state)
Asserts var=state as true. If KB is unsatisfiable it will return KB_UNSATISFIABLE.


assertNegative

public int assertNegative(int var,
                          int state)
Asserts var!=state as true. If KB is unsatisfiable it will return KB_UNSATISFIABLE.


retract

public void retract(int size)

write

public void write(PrintStream stream)


Copyright 2010 UCLA Automated Reasoning Group