logic
Class Engine

java.lang.Object
  extended bylogic.Engine

public class Engine
extends java.lang.Object

ASSUMES Relativized, Flattened actions, ok??


Field Summary
 graph.Isomorphism _iso
           
protected static java.util.Random _random
           
static double BIAS
           
static java.text.DecimalFormat dec
           
static boolean ENFORCE_NEQ
           
static boolean LISPY
           
static boolean NOHYPHENS
           
static java.text.DecimalFormat num
           
static boolean PROLOGY
           
 
Constructor Summary
Engine()
           
 
Method Summary
 void addBackgroundKnowledge(java.lang.String file)
           
static boolean areInconsistent(SList a, SList b)
           
 java.util.List ask(java.lang.Object query, java.lang.Object kb)
           
 java.util.List ask(java.lang.Object query, java.lang.Object kb, java.lang.Object subs)
           
 java.util.List ask(SList query, SList kb, java.util.List subList)
           
 java.util.List ask(SList query, SList kb, java.util.List subList, java.util.List variables)
           
 java.util.List ask(SList query, SList kb, java.util.List subList, java.util.List variables, SList constraints)
          MAIN KAHUNA we want to try to find a binding that matches, element by element, the incoming list of terms (@param query) against some subset of the KB Make sure all the variables in the list @param variables are bound, and that the inequality constraints @param constraints aren't violated.
 java.util.List askQuick(java.lang.Object query, java.lang.Object kb)
           
 java.util.List askSafe(Sentence query, SList kb)
           
 java.util.List askSafe(SList query, SList kb)
           
 void clearBasis()
           
 boolean doSmart()
           
 java.util.List fillIn(java.util.List subs, java.util.List vars, SList constraints)
           
 graph.Basis getBasis()
           
static api.Domain getDomain()
           
static api.ProblemInstance getProblemInstance()
           
static Wildcard getWildcard()
           
 boolean hasBackgroundKnowledge()
           
 boolean hasContradiction(java.lang.Object q, java.lang.Object k)
          assumes object @param q coming in is a negative term (or list of terms).
 graph.Isomorphism iso()
           
static double randomDouble()
           
 java.util.List satisfyEqualityConstraints(java.util.List subs, SList constraints)
           
 java.util.List satisfyNegConstraints(java.util.List subs, SList constraints, SList kb)
           
 void setBasis(graph.Basis basis)
           
static void setDomain(api.Domain d)
           
static void setProblemInstance(api.ProblemInstance p)
           
 void setRandomSeed(long seed)
           
 void setSmart(boolean flag)
           
 boolean supported(java.lang.Object q, java.lang.Object k)
          Is this query supported by this kb?
 boolean supported(java.lang.Object q, java.lang.Object k, java.util.List vars)
          Is this query, and all its variables, supported by the kb? The list @param vars is a list of variables; what we're asking is whether there's a way to answer the query @param q with the kb
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LISPY

public static final boolean LISPY
See Also:
Constant Field Values

PROLOGY

public static final boolean PROLOGY
See Also:
Constant Field Values

NOHYPHENS

public static final boolean NOHYPHENS
See Also:
Constant Field Values

BIAS

public static double BIAS

dec

public static final java.text.DecimalFormat dec

num

public static final java.text.DecimalFormat num

_random

protected static java.util.Random _random

ENFORCE_NEQ

public static boolean ENFORCE_NEQ

_iso

public graph.Isomorphism _iso
Constructor Detail

Engine

public Engine()
Method Detail

setBasis

public void setBasis(graph.Basis basis)

getBasis

public graph.Basis getBasis()

clearBasis

public void clearBasis()

setSmart

public void setSmart(boolean flag)

doSmart

public boolean doSmart()

getWildcard

public static Wildcard getWildcard()

randomDouble

public static double randomDouble()

setRandomSeed

public void setRandomSeed(long seed)

getDomain

public static api.Domain getDomain()

setDomain

public static void setDomain(api.Domain d)

setProblemInstance

public static void setProblemInstance(api.ProblemInstance p)

getProblemInstance

public static api.ProblemInstance getProblemInstance()

iso

public graph.Isomorphism iso()

addBackgroundKnowledge

public void addBackgroundKnowledge(java.lang.String file)

hasBackgroundKnowledge

public boolean hasBackgroundKnowledge()

askSafe

public java.util.List askSafe(Sentence query,
                              SList kb)

askSafe

public java.util.List askSafe(SList query,
                              SList kb)

askQuick

public java.util.List askQuick(java.lang.Object query,
                               java.lang.Object kb)

ask

public java.util.List ask(java.lang.Object query,
                          java.lang.Object kb,
                          java.lang.Object subs)

ask

public java.util.List ask(java.lang.Object query,
                          java.lang.Object kb)

ask

public java.util.List ask(SList query,
                          SList kb,
                          java.util.List subList)

ask

public java.util.List ask(SList query,
                          SList kb,
                          java.util.List subList,
                          java.util.List variables)

ask

public java.util.List ask(SList query,
                          SList kb,
                          java.util.List subList,
                          java.util.List variables,
                          SList constraints)
MAIN KAHUNA we want to try to find a binding that matches, element by element, the incoming list of terms (@param query) against some subset of the KB Make sure all the variables in the list @param variables are bound, and that the inequality constraints @param constraints aren't violated.


satisfyEqualityConstraints

public java.util.List satisfyEqualityConstraints(java.util.List subs,
                                                 SList constraints)

satisfyNegConstraints

public java.util.List satisfyNegConstraints(java.util.List subs,
                                            SList constraints,
                                            SList kb)

fillIn

public java.util.List fillIn(java.util.List subs,
                             java.util.List vars,
                             SList constraints)

hasContradiction

public boolean hasContradiction(java.lang.Object q,
                                java.lang.Object k)
assumes object @param q coming in is a negative term (or list of terms). asks if the negation of the incoming term is supported, then returns the negation of that answer.


supported

public boolean supported(java.lang.Object q,
                         java.lang.Object k,
                         java.util.List vars)
Is this query, and all its variables, supported by the kb? The list @param vars is a list of variables; what we're asking is whether there's a way to answer the query @param q with the kb

Parameters:
k - such that all of the variables are bound.

supported

public boolean supported(java.lang.Object q,
                         java.lang.Object k)
Is this query supported by this kb?


areInconsistent

public static boolean areInconsistent(SList a,
                                      SList b)