aima.logic.propositional.algorithms
Class Model

java.lang.Object
  extended by aima.logic.propositional.algorithms.Model
All Implemented Interfaces:
Visitor, PLVisitor

public class Model
extends java.lang.Object
implements PLVisitor


Constructor Summary
Model()
           
 
Method Summary
 Model extend(java.lang.String s, boolean b)
           
 Model extend(Symbol symbol, boolean b)
           
 Model flip(Symbol s)
           
 java.util.Set<Symbol> getAssignedSymbols()
           
 java.lang.Boolean getStatus(Symbol symbol)
           
 boolean isFalse(Sentence clause)
           
 boolean isFalse(Symbol symbol)
           
 boolean isTrue(Sentence clause)
           
 boolean isTrue(Symbol symbol)
           
 boolean isUnknown(Sentence clause)
           
 boolean matches(java.lang.String variable, boolean value)
           
 void print()
           
 java.lang.String toString()
           
 java.lang.Object visitBinarySentence(BinarySentence bs, java.lang.Object arg)
           
 java.lang.Object visitFalseSentence(FalseSentence fs, java.lang.Object arg)
           
 java.lang.Object visitMultiSentence(MultiSentence fs, java.lang.Object argd)
           
 java.lang.Object visitNotSentence(UnarySentence fs, java.lang.Object arg)
           
 java.lang.Object visitSymbol(Symbol s, java.lang.Object arg)
           
 java.lang.Object visitTrueSentence(TrueSentence ts, java.lang.Object arg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Model

public Model()
Method Detail

getStatus

public java.lang.Boolean getStatus(Symbol symbol)

isTrue

public boolean isTrue(Symbol symbol)

isFalse

public boolean isFalse(Symbol symbol)

extend

public Model extend(Symbol symbol,
                    boolean b)

extend

public Model extend(java.lang.String s,
                    boolean b)

print

public void print()

isTrue

public boolean isTrue(Sentence clause)

isFalse

public boolean isFalse(Sentence clause)

isUnknown

public boolean isUnknown(Sentence clause)

flip

public Model flip(Symbol s)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

visitSymbol

public java.lang.Object visitSymbol(Symbol s,
                                    java.lang.Object arg)
Specified by:
visitSymbol in interface PLVisitor

visitTrueSentence

public java.lang.Object visitTrueSentence(TrueSentence ts,
                                          java.lang.Object arg)
Specified by:
visitTrueSentence in interface PLVisitor

visitFalseSentence

public java.lang.Object visitFalseSentence(FalseSentence fs,
                                           java.lang.Object arg)
Specified by:
visitFalseSentence in interface PLVisitor

visitNotSentence

public java.lang.Object visitNotSentence(UnarySentence fs,
                                         java.lang.Object arg)
Specified by:
visitNotSentence in interface PLVisitor

visitBinarySentence

public java.lang.Object visitBinarySentence(BinarySentence bs,
                                            java.lang.Object arg)
Specified by:
visitBinarySentence in interface PLVisitor

visitMultiSentence

public java.lang.Object visitMultiSentence(MultiSentence fs,
                                           java.lang.Object argd)
Specified by:
visitMultiSentence in interface PLVisitor

getAssignedSymbols

public java.util.Set<Symbol> getAssignedSymbols()

matches

public boolean matches(java.lang.String variable,
                       boolean value)