com.agentfactory.logic.reasoner
Class QueryEngine

java.lang.Object
  extended by com.agentfactory.logic.reasoner.QueryEngine

public class QueryEngine
extends java.lang.Object


Nested Class Summary
static class QueryEngine.TestQuerySource
           
 
Field Summary
static int MAX_LEVELS
           
 
Constructor Summary
QueryEngine()
          Creates a new instance of QueryEngine
 
Method Summary
 void addSource(Queryable source)
           
 boolean evaluate(FOS query)
          evaluation method that returns true if the query is satisfied with respect to the associated knowledge sources, or false otherwise.
 java.util.ArrayList getSubstitutionSets()
          Get the set of substitutions for a formula that has been resolved.
static void main(java.lang.String[] args)
           
 boolean query(java.lang.Object goal)
           
 boolean queryAll(java.lang.Object goal)
          Take a set of current beliefs and belief rules, and resolve all the beliefs that are entailed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_LEVELS

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

QueryEngine

public QueryEngine()
Creates a new instance of QueryEngine

Method Detail

addSource

public void addSource(Queryable source)

evaluate

public boolean evaluate(FOS query)
evaluation method that returns true if the query is satisfied with respect to the associated knowledge sources, or false otherwise.


query

public boolean query(java.lang.Object goal)

queryAll

public boolean queryAll(java.lang.Object goal)
Take a set of current beliefs and belief rules, and resolve all the beliefs that are entailed. The only difference between this and the above, is two thirds in.

Parameters:
goal - - A Query Object. That which is to be checked for entailment.
Returns:
boolean - true if inBeliefManager entails inQuery, false otherwise.

getSubstitutionSets

public java.util.ArrayList getSubstitutionSets()
Get the set of substitutions for a formula that has been resolved. This method is normally called by a Belief Manager object following the successful resolving of a formula.

Returns:
A set of SubstitutionSet objects that hold the valid substitutions for resoleved formula.

main

public static void main(java.lang.String[] args)