|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.api.CycAccess
Provides wrappers for the OpenCyc API.
Collaborates with the CycConnection class which manages the api connections.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Field Summary | |
static CycConstant |
and
Convenient reference to #$and. |
protected org.apache.oro.util.Cache |
askCache
Least Recently Used Cache of ask results. |
static CycConstant |
baseKB
Convenient reference to #$BaseKb. |
static CycConstant |
binaryPredicate
Convenient reference to #$binaryPredicate. |
static CycConstant |
collection
Convenient reference to #$Collection. |
static CycConstant |
comment
Convenient reference to #$comment. |
protected int |
communicationMode
|
protected org.apache.oro.util.Cache |
countAllInstancesCache
Least Recently Used Cache of countAllInstances results. |
protected CycConnectionInterface |
cycConnection
Reference to CycConnection object which manages the api connection to the OpenCyc server. |
static boolean |
DEFAULT_CONNECTION
Default value indicating that the OpenCyc api should use one TCP socket for the entire session. |
boolean |
deferObjectCompletion
Parameter indicating whether the OpenCyc binary api defers the completion of CycConstant attributes until used for the first time. |
static CycConstant |
different
Convenient reference to #$different. |
static CycConstant |
elementOf
Convenient reference to #$elementOf. |
static CycConstant |
genlMt
Convenient reference to #$genlMt. |
static CycConstant |
genls
Convenient reference to #$genls. |
static CycConstant |
isa
Convenient reference to #$isa. |
protected org.apache.oro.util.Cache |
isCollectionCache
Least Recently Used Cache of isCollection results. |
protected org.apache.oro.util.Cache |
isGenlOfCache
Least Recently Used Cache of isGenlOf results. |
static CycConstant |
not
Convenient reference to #$not. |
static CycConstant |
numericallyEqual
Convenient reference to #$numericallyEqual. |
static CycConstant |
or
Convenient reference to #$or. |
static boolean |
PERSISTENT_CONNECTION
Value indicating that the OpenCyc api should use one TCP socket for the entire session. |
boolean |
persistentConnection
Parameter indicating whether the OpenCyc api should use one TCP socket for the entire session, or if the socket is created and then closed for each api call. |
static CycConstant |
plusFn
Convenient reference to #$PlusFn. |
protected int |
saveTrace
Parameter that, when true, causes a trace of the messages to and from the server. |
static CycConstant |
thing
Convenient reference to #$Thing. |
static boolean |
TRANSIENT_CONNECTION
Value indicating that the OpenCyc api socket is created and then closed for each api call. |
Constructor Summary | |
CycAccess()
Constructs a new CycAccess object. |
|
CycAccess(java.lang.String hostName,
int basePort,
int communicationMode,
boolean persistentConnection)
Constructs a new CycAccess object given a host name, port, communication mode and persistence indicator. |
|
CycAccess(java.lang.String myAgentName,
java.lang.String cycProxyAgentName,
int agentCommunity)
Constructs a new CycAccess object to the given CycProxyAgent in the given agent community. |
Method Summary | |
boolean |
areAssertedCoextensional(CycFort collection1,
CycFort collection2)
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are asserted coextensional. |
boolean |
areDisjoint(CycFort collection1,
CycFort collection2)
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are disjoint. |
boolean |
areHierarchical(CycFort collection1,
CycFort collection2)
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are in a hierarchy. |
boolean |
areIntersecting(CycFort collection1,
CycFort collection2)
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 intersect with regard to all-specs. |
boolean |
areTacitCoextensional(CycFort collection1,
CycFort collection2)
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are tacitly coextensional via mutual genls of each other. |
CycList |
askWithVariable(CycList query,
CycVariable variable,
CycFort mt)
Returns a list of bindings for a query with a single unbound variable. |
CycList |
askWithVariables(CycList query,
java.util.ArrayList variables,
CycFort mt)
Returns a list of bindings for a query with unbound variables. |
void |
assertComment(CycConstant cycConstant,
java.lang.String comment,
CycFort mt)
Assert a comment for the specified CycConstant in the specified microtheory MT. |
void |
assertGaf(CycFort mt,
CycConstant predicate,
CycFort arg1,
CycFort arg2)
Asserts a ground atomic formula (gaf) in the specified microtheory MT. |
void |
assertGaf(CycFort mt,
CycConstant predicate,
CycFort arg1,
CycFort arg2,
CycFort arg3)
Asserts a ground atomic formula (gaf) in the specified microtheory MT. |
void |
assertGaf(CycFort mt,
CycConstant predicate,
CycFort arg1,
CycList arg2)
Asserts a ground atomic formula (gaf) in the specified microtheory MT. |
void |
assertGaf(CycFort mt,
CycConstant predicate,
CycFort arg1,
int arg2)
Asserts a ground atomic formula (gaf) in the specified microtheory MT. |
void |
assertGaf(CycFort mt,
CycConstant predicate,
CycFort arg1,
java.lang.String arg2)
Asserts a ground atomic formula (gaf) in the specified microtheory MT. |
void |
assertGaf(CycList gaf,
CycFort mt)
Asserts a ground atomic formula (gaf) in the specified microtheory MT. |
void |
assertGenls(CycFort specCollection,
CycFort genlsCollection,
CycFort mt)
Assert that the CycConstant GENLS is a genls of CycFort SPEC, in the specified defining microtheory MT. |
void |
assertIsa(CycFort cycFort,
CycFort aCollection,
CycFort mt)
Assert that the CycFort GENLS isa CycFort ACOLLECTION, in the specified defining microtheory MT. |
void |
assertIsaBinaryPredicate(CycConstant cycConstant,
CycFort mt)
Assert that the specified CycConstant is a #$BinaryPredicate in the specified defining microtheory MT. |
void |
assertIsaCollection(CycConstant cycConstant,
CycFort mt)
Assert that the specified CycConstant is a collection in the specified defining microtheory MT. |
void |
close()
Closes the CycConnection object. |
protected void |
commonInitialization()
Provides common local and remote CycAccess object initialization. |
CycAssertion |
completeCycAssertion(CycAssertion cycAssertion)
Completes the instantiation of a CycAssertion returned by the binary api. |
CycConstant |
completeCycConstant(CycConstant cycConstant)
Completes the instantiation of CycConstant returned by the binary api. |
CycList |
completeCycList(CycList cycList)
Completes the instantiation of objects contained in the given CycList. |
CycNart |
completeCycNart(CycNart cycNart)
Completes the instantiation of a CycNart returned by the binary api. |
CycVariable |
completeCycVariable(CycVariable cycVariable)
Completes the instantiation of HL CycVariable returned by the binary api. |
java.lang.Object |
completeObject(java.lang.Object object)
Completes the instantiation of objects contained in the given CycList. |
protected java.lang.Object[] |
converse(java.lang.Object command)
Converses with Cyc to perform an API command. |
boolean |
converseBoolean(java.lang.Object command)
Converses with Cyc to perform an API command whose result is returned as a boolean. |
int |
converseInt(java.lang.Object command)
Converses with Cyc to perform an API command whose result is returned as an int. |
CycList |
converseList(java.lang.Object command)
Converses with Cyc to perform an API command whose result is returned as a list. |
java.lang.Object |
converseObject(java.lang.Object command)
Converses with Cyc to perform an API command whose result is returned as an object. |
java.lang.String |
converseString(java.lang.Object command)
Converses with Cyc to perform an API command whose result is returned as a String. |
void |
converseVoid(java.lang.Object command)
Converses with Cyc to perform an API command whose result is void. |
int |
countAllInstances_Cached(CycFort collection,
CycFort mt)
Returns the count of the instances of the given collection, implements a cache to avoid asking the same question twice from the KB. |
int |
countAllInstances(CycFort collection,
CycFort mt)
Returns the count of the instances of the given collection. |
int |
countUsingBestIndex(CycList formula,
CycFort mt)
Returns the count of the assertions indexed according to the given pattern, using the best index (from among the predicate and argument indices). |
CycConstant |
createMicrotheory(java.lang.String mtName,
java.lang.String comment,
CycFort isaMt,
java.util.ArrayList genlMts)
Create a microtheory MT, with a comment, isa |
CycConstant[] |
createMicrotheorySystem(java.lang.String mtRootName,
java.lang.String comment,
java.util.ArrayList genlMts)
Create a microtheory system for a new mt. |
CycConstant |
createNewPermanent(java.lang.String constantName)
Creates a new permanent Cyc constant in the KB with the specified name. |
static CycAccess |
current()
Returns the CycAccess object for this thread. |
java.lang.Integer |
findNartId(CycNart cycNart)
Finds the id of a CycNart given its formula. |
CycList |
generateDisambiguationPhraseAndTypes(CycList objects)
Returns a list of disambiguation expressions, corresponding to each of the terms in the given list of objects. |
CycList |
getAllDependentSpecs(CycFort cycFort)
Gets a list of all of the dependent specs for a CycFort collection. |
CycList |
getAllGenlPreds(CycConstant predicate)
Gets a list of all of the genlPreds for a CycConstant predicate, using an upward closure. |
CycList |
getAllGenls(CycFort cycFort)
Gets a list of all of the direct and indirect genls for a CycFort collection. |
CycList |
getAllGenlsWrt(CycFort spec,
CycFort genl)
Gets a list of all of the direct and indirect genls for a CycFort SPEC which are also specs of CycFort GENL. |
CycList |
getAllInstances(CycFort cycFort)
Gets a list of all the direct and indirect instances (individuals) for a CycFort collection. |
CycList |
getAllIsa(CycFort cycFort)
Gets a list of the collections of which the CycFort is directly and indirectly an instance. |
CycList |
getAllSpecs(CycFort cycFort)
Gets a list of all of the direct and indirect specs for a CycFort collection. |
CycList |
getArg1Formats(CycConstant predicate)
Gets a list of the arg1Formats for a CycConstant predicate. |
CycList |
getArg1Isas(CycConstant predicate)
Gets a list of the arg1Isas for a CycConstant predicate. |
CycList |
getArg2Formats(CycConstant predicate)
Gets a list of the arg2Formats for a CycConstant predicate. |
CycList |
getArg2Isas(CycConstant predicate)
Gets a list of the arg2Isas for a CycConstant predicate. |
CycList |
getArgNGenls(CycConstant predicate,
int argPosition)
Gets a list of the argNGenls for a CycConstant predicate. |
CycList |
getArgNIsas(CycConstant predicate,
int argPosition)
Gets a list of the argNIsas for a CycConstant predicate. |
int |
getArity(CycFort predicate)
Returns the arity of the given predicate. |
CycAssertion |
getAssertionById(java.lang.Integer id)
Gets a CycAssertion by using its id. |
CycList |
getBackchainImplicationRules(CycConstant predicate,
CycList formula,
CycFort mt)
Gets a list of the backchaining implication rules which might apply to the given rule. |
CycList |
getBackchainRules(CycConstant predicate,
CycFort mt)
Gets a list of the backchaining implication rules which might apply to the given predicate. |
CycList |
getCoExtensionals(CycFort cycFort)
Gets a list of the coExtensionals for a CycFort. |
CycList |
getCollectionLeaves(CycFort cycFort)
Gets a list of the collection leaves (most specific of the all-specs) for a CycFort collection. |
java.lang.String |
getComment(CycConstant cycConstant)
Gets the comment for a CycConstant. |
int |
getCommunicationMode()
Returns the communication mode. |
CycConstant |
getConstantByGuid(Guid guid)
Gets a CycConstant by using its GUID. |
CycConstant |
getConstantById(java.lang.Integer id)
Gets a CycConstant by using its ID. |
CycConstant |
getConstantByName(java.lang.String constantName)
Gets a CycConstant by using its constant name. |
Guid |
getConstantGuid(CycConstant cycConstant)
Gets the Guid for the given CycConstant, raising an exception if the constant does not exist. |
Guid |
getConstantGuid(java.lang.Integer id)
Gets the Guid for the given constant id. |
Guid |
getConstantGuid(java.lang.String constantName)
Gets the Guid for the given constant name, raising an exception if the constant does not exist. |
java.lang.Integer |
getConstantId(CycConstant cycConstant)
Gets the ID for the given CycConstant. |
java.lang.Integer |
getConstantId(java.lang.String constantName)
Gets the ID for the given constant name. |
java.lang.String |
getConstantName(java.lang.Integer id)
Gets the name for the given constant id. |
CycConnectionInterface |
getCycConnection()
Returns the CycConnection object. |
CycNart |
getCycNartById(java.lang.Integer id)
Gets a CycNart by using its id. |
CycNart |
getCycNartFromCons(CycList elCons)
Gets a CycNart object from a Cons object that lists the names of its functor and its arguments. |
CycList |
getDisjointWiths(CycFort cycFort)
Gets a list of the disjointWiths for a CycFort. |
CycList |
getForwardChainRules(CycConstant predicate,
CycFort mt)
Gets a list of the forward chaining implication rules which might apply to the given predicate. |
CycList |
getForwardChainRules(CycConstant predicate,
CycList formula,
CycFort mt)
Gets a list of the forward chaining implication rules which might apply to the given rule. |
java.lang.String |
getGeneratedPhrase(CycFort cycFort)
Gets the default generated phrase for a CycFort (intended for predicates). |
CycList |
getGenlPreds(CycConstant predicate)
Gets a list of the genlPreds for a CycConstant predicate. |
CycList |
getGenls(CycFort cycFort)
Gets a list of the directly asserted true genls for a CycFort collection. |
CycList |
getGenlSiblings(CycFort cycFort)
Gets a list of the direct genls of the direct specs for a CycFort collection. |
java.lang.String |
getImpreciseParaphrase(CycList assertion)
Gets the imprecise paraphrase for a Cyc assertion. |
java.lang.String |
getImprecisePluralGeneratedPhrase(CycFort cycFort)
Gets the imprecise plural generated phrase for a CycFort (intended for collections). |
java.lang.String |
getImpreciseSingularGeneratedPhrase(CycFort cycFort)
Gets the imprecise singular generated phrase for a CycFort (intended for individuals). |
CycList |
getInstances(CycFort cycFort)
Gets a list of the instances (who are individuals) of a CycFort collection. |
CycList |
getInstanceSiblings(CycFort cycFort)
Gets a list of the instance siblings of a CycFort, for all collections of which it is an instance. |
CycList |
getIsas(CycFort cycFort)
Gets a list of the isas for a CycFort. |
CycList |
getKbSubset(CycFort cycKbSubsetCollection)
Gets a list of the elements of the given CycKBSubsetCollection. |
CycConstant |
getKnownConstantByGuid(Guid guid)
Gets a known CycConstant by using its GUID. |
CycConstant |
getKnownConstantByGuid(java.lang.String guidString)
Gets a known CycConstant by using its GUID string. |
CycConstant |
getKnownConstantByName(java.lang.String constantName)
Gets a known CycConstant by using its constant name. |
CycList |
getLocalDisjointWith(CycFort cycFort)
Gets a list of the collections asserted to be disjoint with a CycFort collection. |
CycList |
getMaxSpecs(CycFort cycFort)
Gets a list of the least specific specs for a CycFort collection. |
CycList |
getMinGenls(CycFort cycFort)
Gets a list of the minimum (most specific) genls for a CycFort collection. |
CycList |
getMinGenls(CycFort cycFort,
CycFort mt)
Gets a list of the minimum (most specific) genls for a CycFort collection. |
CycList |
getMinIsas(CycFort cycFort)
Gets a list of the most specific collections (having no subsets) which contain a CycFort term. |
java.lang.String |
getParaphrase(CycList assertion)
Gets the paraphrase for a Cyc assertion. |
java.lang.String |
getPluralGeneratedPhrase(CycFort cycFort)
Gets the plural generated phrase for a CycFort (intended for collections). |
CycList |
getPublicConstants()
Gets a list of the public Cyc constants. |
CycList |
getSampleLeafSpecs(CycFort cycFort,
int numberOfSamples)
Gets a list with the specified number of sample specs of a CycFort collection. |
CycList |
getSiblings(CycFort cycFort)
Gets a list of the siblings (direct specs of the direct genls) for a CycFort collection. |
java.lang.String |
getSingularGeneratedPhrase(CycFort cycFort)
Gets the singular generated phrase for a CycFort (intended for individuals). |
CycList |
getSpecs(CycFort cycFort)
Gets a list of the directly asserted true specs for a CycFort collection. |
CycList |
getSpecSiblings(CycFort cycFort)
Gets a list of the siblings (direct specs of the direct genls) for a CycFort collection. |
java.lang.Object |
getSymbolValue(CycSymbol cycSymbol)
Gets the value of a given KB symbol. |
java.lang.String |
getVariableName(java.lang.Integer id)
Gets the name for the given variable id. |
CycList |
getWhyCollectionsIntersect(CycFort collection1,
CycFort collection2)
Gets a list of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect. |
java.util.ArrayList |
getWhyCollectionsIntersectParaphrase(CycFort collection1,
CycFort collection2)
Gets an English parapharse of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect. |
CycList |
getWhyGenl(CycFort spec,
CycFort genl)
Gets a list of the justifications of why CycFort SPEC is a SPEC of CycFort GENL. |
java.util.ArrayList |
getWhyGenlParaphrase(CycFort spec,
CycFort genl)
Gets an English parapharse of the justifications of why CycFort SPEC is a SPEC of CycFort GENL. |
CycList |
getWhyIsa(CycFort spec,
CycFort genl)
Gets a list of the justifications of why CycFort TERM is an instance of CycFort COLLECTION. |
java.util.ArrayList |
getWhyIsaParaphrase(CycFort spec,
CycFort genl)
Gets an English parapharse of the justifications of why CycFort TERM is an instance of CycFort COLLECTION. |
boolean |
hasSomePredicateUsingTerm(CycConstant predicate,
CycFort term,
java.lang.Integer argumentPosition,
CycFort mt)
Returns true iff any ground formula instances exist having the given predicate, and the given term in the given argument position. |
int |
importMucExpression(CycList mucExpression,
java.lang.String mtName)
Imports a MUC (Message Understanding Conference) formatted symbolic expression into cyc via the function which parses the expression and creates assertions for the contained concepts and relations between them. |
boolean |
isa(CycFort term,
CycFort collection)
Returns true if CycFort TERM is a instance of CycFort COLLECTION, defaulting to all microtheories. |
boolean |
isa(CycFort term,
CycFort collection,
CycFort mt)
Returns true if CycFort TERM is a instance of CycFort COLLECTION, using the given microtheory. |
boolean |
isBackchainDiscouraged(CycConstant predicate,
CycFort mt)
Returns true iff backchain inference on the given predicate is discouraged. |
boolean |
isBackchainEncouraged(CycConstant predicate,
CycFort mt)
Returns true iff backchain inference on the given predicate is encouraged. |
boolean |
isBackchainForbidden(CycConstant predicate,
CycFort mt)
Returns true iff backchain inference on the given predicate is forbidden. |
boolean |
isBackchainRequired(CycConstant predicate,
CycFort mt)
Returns true iff backchain inference on the given predicate is required. |
boolean |
isBinaryPredicate(CycConstant cycConstant)
Returns true if cycConstant is a BinaryPredicate. |
boolean |
isCollection_Cached(CycFort cycFort)
Returns true if cycConstant is a Collection, implements a cache to avoid asking the same question twice from the KB. |
boolean |
isCollection(CycFort cycFort)
Returns true if cycConstant is a Collection. |
boolean |
isEvaluatablePredicate(CycConstant predicate)
Returns true if cycConstant is an evaluatable predicate. |
boolean |
isFunction(CycConstant cycConstant)
Returns true if cycConstant is a Function. |
boolean |
isGenlOf_Cached(CycFort genl,
CycFort spec)
Returns true if CycFort GENL is a genl of CycFort SPEC, implements a cache to avoid asking the same question twice from the KB. |
boolean |
isGenlOf(CycFort genl,
CycFort spec)
Returns true if CycFort GENL is a genl of CycFort SPEC. |
boolean |
isIndividual(CycFort cycFort)
Returns true if cycConstant is an Individual. |
boolean |
isIrreflexivePredicate(CycConstant predicate,
CycFort mt)
Returns true iff the predicate has the irreflexive property: (#$isa ?PRED #$IrreflexsiveBinaryPredicate). |
boolean |
isPredicate(CycFort cycFort)
Returns true if cycFort is a Predicate. |
boolean |
isPublicConstant(CycConstant cycConstant)
Returns true if cycConstant is a PublicConstant. |
boolean |
isQueryTrue_Cached(CycList query,
CycFort mt)
Returns true iff the query is true in the knowledge base, implements a cache to avoid asking the same question twice from the KB. |
boolean |
isQueryTrue(CycList query,
CycFort mt)
Returns true iff the ground query is true in the knowledge base. |
boolean |
isQuotedCollection(CycFort cycFort)
Returns true if term is a quotedCollection, in any microtheory |
boolean |
isQuotedCollection(CycFort cycFort,
CycFort mt)
Returns true if term is a quotedCollection is a quotedCollection. |
boolean |
isSpecOf(CycFort spec,
CycFort genl)
Returns true if CycFort SPEC is a spec of CycFort GENL. |
boolean |
isUnaryPredicate(CycConstant cycConstant)
Returns true if cycConstant is a UnaryPredicate. |
boolean |
isValidConstantName(java.lang.String candidateName)
Returns true if the candidate name is a valid CycConstant name. |
boolean |
isWellFormedFormula(CycList cycList)
Returns true iff CycList represents a well formed formula. |
void |
kill(java.util.ArrayList cycConstants)
|
void |
kill(CycConstant cycConstant)
Kills a Cyc constant. |
void |
kill(CycConstant[] cycConstants)
|
void |
kill(CycFort cycFort)
Kills a Cyc NART (Non Atomic Reified Term). |
CycConstant |
makeCycConstant(java.lang.String name)
Constructs a new CycConstant object using the constant name. |
CycList |
makeCycList(java.lang.String string)
Constructs a new CycList object by parsing a string. |
boolean |
predicateRelates(CycConstant binaryPredicate,
CycFort arg1,
CycFort arg2)
Returns true if CycConstant BINARYPREDICATE relates CycFort ARG1 and CycFort ARG2. |
CycList |
rkfPhraseReader(java.lang.String text,
CycFort parsingMt,
CycFort domainMt)
Returns a list of parsing expressions, each consisting of a parsing span expression, and a list of parsed terms. |
void |
setCyclist(CycConstant cyclist)
|
void |
setCyclist(java.lang.String cyclistName)
Sets the value of the Cyclist, whose identity will be attached via #$myCreator bookkeeping assertions to new KB entities created in this session. |
void |
setKePurpose(CycConstant project)
|
void |
setKePurpose(java.lang.String projectName)
Sets the value of the KE purpose, whose project name will be attached via #$myCreationPurpose bookkeeping assertions to new KB entities created in this session. |
void |
setReadableNarts(java.lang.String guid)
Sets the *print-readable-narts* feature on. |
static void |
setSharedCycAccessInstance(CycAccess sharedCycAccessInstance)
Sets the shared CycAccess instance. |
void |
setSymbolValue(CycSymbol cycSymbol,
java.lang.Object value)
Sets a KB symbol to have the specified value. |
java.lang.String |
toString()
Returns a string representation of this object. |
void |
traceOff()
Turns off the diagnostic trace of socket messages. |
void |
traceOn()
Turns on the diagnostic trace of socket messages. |
void |
traceOnDetailed()
Turns on the detailed diagnostic trace of socket messages. |
void |
unassertGaf(CycList gaf,
CycFort mt)
Unasserts the given ground atomic formula (gaf) in the specified microtheory MT. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final boolean TRANSIENT_CONNECTION
public static final boolean PERSISTENT_CONNECTION
public static final boolean DEFAULT_CONNECTION
public boolean deferObjectCompletion
public boolean persistentConnection
protected int communicationMode
protected int saveTrace
public static CycConstant baseKB
public static CycConstant isa
public static CycConstant genls
public static CycConstant genlMt
public static CycConstant comment
public static CycConstant collection
public static CycConstant binaryPredicate
public static CycConstant elementOf
public static CycConstant and
public static CycConstant or
public static CycConstant not
public static CycConstant numericallyEqual
public static CycConstant plusFn
public static CycConstant different
public static CycConstant thing
protected org.apache.oro.util.Cache askCache
protected org.apache.oro.util.Cache countAllInstancesCache
protected org.apache.oro.util.Cache isCollectionCache
protected org.apache.oro.util.Cache isGenlOfCache
protected CycConnectionInterface cycConnection
Constructor Detail |
public CycAccess() throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycAccess(java.lang.String myAgentName, java.lang.String cycProxyAgentName, int agentCommunity) throws java.io.IOException, CycApiException
myAgentName
- the name of the local agentcycProxyAgentName
- the name of the cyc proxy agentagentCommunity
- the agent community to which the cyc proxy agent belongspublic CycAccess(java.lang.String hostName, int basePort, int communicationMode, boolean persistentConnection) throws java.io.IOException, java.net.UnknownHostException, CycApiException
hostName
- the host namebasePort
- the base (HTML serving) TCP socket port numbercommunicationMode
- either ASCII_MODE or BINARY_MODEpersistentConnection
- when true keep a persistent socket connection with
the OpenCyc serverMethod Detail |
protected void commonInitialization() throws java.io.IOException, CycApiException
public java.lang.String toString()
toString
in class java.lang.Object
public static CycAccess current()
public static void setSharedCycAccessInstance(CycAccess sharedCycAccessInstance)
the
- shared CycAccess instancepublic void traceOn()
public void traceOnDetailed()
public void traceOff()
public CycConnectionInterface getCycConnection()
public void close()
public int getCommunicationMode()
protected java.lang.Object[] converse(java.lang.Object command) throws java.io.IOException, java.net.UnknownHostException, CycApiException
command
- the command string or CycListpublic java.lang.Object converseObject(java.lang.Object command) throws java.io.IOException, java.net.UnknownHostException, CycApiException
command
- the command string or CycListpublic CycList converseList(java.lang.Object command) throws java.io.IOException, java.net.UnknownHostException, CycApiException
command
- the command string or CycListpublic java.lang.String converseString(java.lang.Object command) throws java.io.IOException, java.net.UnknownHostException, CycApiException
command
- the command string or CycListpublic boolean converseBoolean(java.lang.Object command) throws java.io.IOException, java.net.UnknownHostException, CycApiException
command
- the command string or CycListpublic int converseInt(java.lang.Object command) throws java.io.IOException, java.net.UnknownHostException, CycApiException
command
- the command string or CycListpublic void converseVoid(java.lang.Object command) throws java.io.IOException, java.net.UnknownHostException, CycApiException
command
- the command string or CycListpublic void setReadableNarts(java.lang.String guid) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycConstant getKnownConstantByName(java.lang.String constantName) throws java.io.IOException, java.net.UnknownHostException, CycApiException
constantName
- the name of the constant to be instantiatedpublic CycConstant getConstantByName(java.lang.String constantName) throws java.io.IOException, java.net.UnknownHostException, CycApiException
constantName
- the name of the constant to be instantiatedpublic java.lang.Integer getConstantId(CycConstant cycConstant) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycConstant
- the CycConstant object for which the id is soughtpublic java.lang.Integer getConstantId(java.lang.String constantName) throws java.io.IOException, java.net.UnknownHostException, CycApiException
constantName
- the name of the constant object for which the id is soughtpublic Guid getConstantGuid(CycConstant cycConstant) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycConstant
- the CycConstant object for which the id is soughtpublic Guid getConstantGuid(java.lang.String constantName) throws java.io.IOException, java.net.UnknownHostException, CycApiException
constantName
- the name of the constant object for which the Guid is soughtpublic Guid getConstantGuid(java.lang.Integer id) throws java.io.IOException, java.net.UnknownHostException, CycApiException
id
- the id of the CycConstant whose guid is soughtpublic CycConstant getConstantById(java.lang.Integer id) throws java.io.IOException, java.net.UnknownHostException, CycApiException
id
- the id of the CycConstant soughtpublic java.lang.String getConstantName(java.lang.Integer id) throws java.io.IOException, java.net.UnknownHostException, CycApiException
id
- the id of the constant object for which the name is soughtpublic java.lang.String getVariableName(java.lang.Integer id) throws java.io.IOException, java.net.UnknownHostException, CycApiException
id
- the id of the variable object for which the name is soughtpublic CycConstant getKnownConstantByGuid(java.lang.String guidString) throws java.io.IOException, java.net.UnknownHostException, CycApiException
guid
- the globally unique ID string of the constant to be instantiatedpublic CycConstant getKnownConstantByGuid(Guid guid) throws java.io.IOException, java.net.UnknownHostException, CycApiException
guid
- the globally unique ID of the constant to be instantiatedpublic CycConstant getConstantByGuid(Guid guid) throws java.io.IOException, java.net.UnknownHostException, CycApiException
guid
- the GUID from which to find the constantpublic java.lang.Object completeObject(java.lang.Object object) throws java.io.IOException, java.net.UnknownHostException, CycApiException
object
- the CycConstant to be completed, or the Object whose
embedded constants are to be completedpublic CycConstant completeCycConstant(CycConstant cycConstant) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycConstant
- the CycConstant whose name and guid are to be completedpublic CycVariable completeCycVariable(CycVariable cycVariable) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycVariable
- the CycVariable whose name is to be completedpublic CycList completeCycList(CycList cycList) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycList
- the CycList whose constants are to be completedthe
- completed CycList objectpublic CycNart completeCycNart(CycNart cycNart) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycNart
- the CycNart whose constants are to be completedthe
- completed CycNart objectpublic CycAssertion completeCycAssertion(CycAssertion cycAssertion) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycAssertion
- the CycAssertion whose constants are to be completedthe
- completed CycAssertion objectpublic java.lang.Integer findNartId(CycNart cycNart) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycNart
- the CycNart object with functor and arguments instantiatedpublic CycNart getCycNartById(java.lang.Integer id) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycAssertion getAssertionById(java.lang.Integer id) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycNart getCycNartFromCons(CycList elCons)
public boolean predicateRelates(CycConstant binaryPredicate, CycFort arg1, CycFort arg2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.lang.String getImprecisePluralGeneratedPhrase(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.lang.String getPluralGeneratedPhrase(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.lang.String getImpreciseSingularGeneratedPhrase(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.lang.String getSingularGeneratedPhrase(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.lang.String getGeneratedPhrase(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.lang.String getParaphrase(CycList assertion) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.lang.String getImpreciseParaphrase(CycList assertion) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.lang.String getComment(CycConstant cycConstant) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getIsas(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getGenls(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getMinGenls(CycFort cycFort, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycFort
- the collectionmt
- the microtheory in which to lookpublic CycList getMinGenls(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getSpecs(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getMaxSpecs(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getGenlSiblings(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getSiblings(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getSpecSiblings(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getAllGenls(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getAllSpecs(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getAllGenlsWrt(CycFort spec, CycFort genl) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getAllDependentSpecs(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getSampleLeafSpecs(CycFort cycFort, int numberOfSamples) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isSpecOf(CycFort spec, CycFort genl) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isGenlOf(CycFort genl, CycFort spec) throws java.io.IOException, java.net.UnknownHostException, CycApiException
genl
- the collection for genl determinationspec
- the collection for spec determinationpublic boolean isGenlOf_Cached(CycFort genl, CycFort spec) throws java.io.IOException, java.net.UnknownHostException, CycApiException
genl
- the collection for genl determinationspec
- the collection for spec determinationpublic boolean areTacitCoextensional(CycFort collection1, CycFort collection2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean areAssertedCoextensional(CycFort collection1, CycFort collection2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean areIntersecting(CycFort collection1, CycFort collection2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean areHierarchical(CycFort collection1, CycFort collection2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getWhyGenl(CycFort spec, CycFort genl) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.util.ArrayList getWhyGenlParaphrase(CycFort spec, CycFort genl) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getWhyCollectionsIntersect(CycFort collection1, CycFort collection2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.util.ArrayList getWhyCollectionsIntersectParaphrase(CycFort collection1, CycFort collection2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getCollectionLeaves(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getLocalDisjointWith(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean areDisjoint(CycFort collection1, CycFort collection2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getMinIsas(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getInstances(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getInstanceSiblings(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getAllIsa(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getAllInstances(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isa(CycFort term, CycFort collection) throws java.io.IOException, java.net.UnknownHostException, CycApiException
term
- the termcollection
- the collectionpublic boolean isa(CycFort term, CycFort collection, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
term
- the termcollection
- the collectionmt
- the microtheory in which the ask is performedpublic CycList getWhyIsa(CycFort spec, CycFort genl) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public java.util.ArrayList getWhyIsaParaphrase(CycFort spec, CycFort genl) throws java.io.IOException, CycApiException
public CycList getGenlPreds(CycConstant predicate) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getAllGenlPreds(CycConstant predicate) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getArg1Isas(CycConstant predicate) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getArg2Isas(CycConstant predicate) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getArgNIsas(CycConstant predicate, int argPosition) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getArgNGenls(CycConstant predicate, int argPosition) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getArg1Formats(CycConstant predicate) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getArg2Formats(CycConstant predicate) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getDisjointWiths(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getCoExtensionals(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isCollection(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isCollection_Cached(CycFort cycFort) throws java.io.IOException, CycApiException
cycConstant
- the constant for determination as a Collectionpublic boolean isIndividual(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isFunction(CycConstant cycConstant) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isEvaluatablePredicate(CycConstant predicate) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isPredicate(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycFort
- the term for determination as a predicatepublic boolean isUnaryPredicate(CycConstant cycConstant) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isBinaryPredicate(CycConstant cycConstant) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isValidConstantName(java.lang.String candidateName) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isQuotedCollection(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycFort
- the given CycFort termpublic boolean isQuotedCollection(CycFort cycFort, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycFort
- the given CycFort termmt
- the microtheory in which the query is madepublic boolean isPublicConstant(CycConstant cycConstant) throws java.io.IOException, java.net.UnknownHostException, CycApiException
cycConstant
- the given constantpublic CycList getPublicConstants() throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList getKbSubset(CycFort cycKbSubsetCollection) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void kill(CycConstant cycConstant) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void kill(CycConstant[] cycConstants) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void kill(java.util.ArrayList cycConstants) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void kill(CycFort cycFort) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void setCyclist(java.lang.String cyclistName) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void setCyclist(CycConstant cyclist)
public void setKePurpose(java.lang.String projectName) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void setKePurpose(CycConstant project)
public CycConstant createNewPermanent(java.lang.String constantName) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void assertGaf(CycFort mt, CycConstant predicate, CycFort arg1, CycFort arg2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
mt
- the microtheory in which the assertion is madepredicate
- the binary predicate of the assertionarg1
- the first argument of the predicatearg2
- the second argument of the predicatepublic void assertGaf(CycFort mt, CycConstant predicate, CycFort arg1, java.lang.String arg2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
mt
- the microtheory in which the assertion is madepredicate
- the binary predicate of the assertionarg1
- the first argument of the predicatearg2
- the second argument of the predicate, which is a stringpublic void assertGaf(CycFort mt, CycConstant predicate, CycFort arg1, CycList arg2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
mt
- the microtheory in which the assertion is madepredicate
- the binary predicate of the assertionarg1
- the first argument of the predicatearg2
- the second argument of the predicate, which is a CycListpublic void assertGaf(CycFort mt, CycConstant predicate, CycFort arg1, int arg2) throws java.io.IOException, java.net.UnknownHostException, CycApiException
mt
- the microtheory in which the assertion is madepredicate
- the binary predicate of the assertionarg1
- the first argument of the predicatearg2
- the second argument of the predicate, which is an intpublic void assertGaf(CycFort mt, CycConstant predicate, CycFort arg1, CycFort arg2, CycFort arg3) throws java.io.IOException, java.net.UnknownHostException, CycApiException
mt
- the microtheory in which the assertion is madepredicate
- the ternary predicate of the assertionarg1
- the first argument of the predicatearg2
- the second argument of the predicatearg3
- the third argument of the predicatepublic void assertGaf(CycList gaf, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
mt
- the microtheory in which the assertion is madepublic void unassertGaf(CycList gaf, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
mt
- the microtheory in which the assertion is madepublic void assertComment(CycConstant cycConstant, java.lang.String comment, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycConstant createMicrotheory(java.lang.String mtName, java.lang.String comment, CycFort isaMt, java.util.ArrayList genlMts) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycConstant[] createMicrotheorySystem(java.lang.String mtRootName, java.lang.String comment, java.util.ArrayList genlMts) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void assertIsaCollection(CycConstant cycConstant, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void assertGenls(CycFort specCollection, CycFort genlsCollection, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void assertIsa(CycFort cycFort, CycFort aCollection, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public void assertIsaBinaryPredicate(CycConstant cycConstant, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public CycList makeCycList(java.lang.String string) throws CycApiException
string
- the string in CycL external (EL). For example:(#$isa #$Dog #$TameAnimal)
public CycConstant makeCycConstant(java.lang.String name) throws java.net.UnknownHostException, java.io.IOException, CycApiException
name
- Name of the constant. If prefixed with "#$", then the prefix is
removed for canonical representation.public CycList askWithVariable(CycList query, CycVariable variable, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
query
- the query to be asked in the knowledge basevariable
- the single unbound variable in the query for which bindings are soughtmt
- the microtheory in which the query is askedpublic CycList askWithVariables(CycList query, java.util.ArrayList variables, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
query
- the query to be asked in the knowledge basevariables
- the list of unbound variables in the query for which bindings are soughtmt
- the microtheory in which the query is askedpublic boolean isQueryTrue(CycList query, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
query
- the query to be asked in the knowledge basemt
- the microtheory in which the query is askedpublic boolean isQueryTrue_Cached(CycList query, CycFort mt) throws java.io.IOException, CycApiException
query
- the query to be asked in the knowledge basemt
- the microtheory in which the query is askedpublic int countAllInstances(CycFort collection, CycFort mt) throws java.io.IOException, CycApiException
collection
- the collection whose instances are countedmt
- microtheory (including its genlMts) in which the count is determinedpublic int countAllInstances_Cached(CycFort collection, CycFort mt) throws java.io.IOException, CycApiException
collection
- the collection whose instances are countedmt
- microtheory (including its genlMts) in which the count is determinedpublic CycList getBackchainImplicationRules(CycConstant predicate, CycList formula, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
predicate
- the predicate for which backward chaining implication rules are soughtformula
- the literal for which backward chaining implication rules are soughtmt
- the microtheory (and its genlMts) in which the search for backchaining implication rules takes placepublic CycList getForwardChainRules(CycConstant predicate, CycList formula, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
predicate
- the predicate for which forward chaining implication rules are soughtformula
- the literal for which forward chaining implication rules are soughtmt
- the microtheory (and its genlMts) in which the search for forward chaining rules takes placepublic CycList getBackchainRules(CycConstant predicate, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
predicate
- the predicate for which backchaining rules are soughtmt
- the microtheory (and its genlMts) in which the search for backchaining rules takes placepublic CycList getForwardChainRules(CycConstant predicate, CycFort mt) throws java.io.IOException, java.net.UnknownHostException, CycApiException
predicate
- the predicate for which forward chaining rules are soughtmt
- the microtheory (and its genlMts) in which the search for forward chaining rules takes placepublic java.lang.Object getSymbolValue(CycSymbol cycSymbol) throws java.io.IOException, java.net.UnknownHostException, CycApiException
symbol
- the KB symbol which will have a value boundpublic void setSymbolValue(CycSymbol cycSymbol, java.lang.Object value) throws java.io.IOException, java.net.UnknownHostException, CycApiException
symbol
- the KB symbol which will have a value boundvalue
- the value assigned to the symbolpublic boolean isWellFormedFormula(CycList cycList) throws java.io.IOException, java.net.UnknownHostException, CycApiException
public boolean isBackchainRequired(CycConstant predicate, CycFort mt) throws java.io.IOException, CycApiException
predicate
- the CycConstant predicate for which backchaining required status is soughtmt
- microtheory (including its genlMts) in which the backchaining required status is soughtpublic boolean isBackchainEncouraged(CycConstant predicate, CycFort mt) throws java.io.IOException, CycApiException
predicate
- the CycConstant predicate for which backchaining encouraged status is soughtmt
- microtheory (including its genlMts) in which the backchaining encouraged status is soughtpublic boolean isBackchainDiscouraged(CycConstant predicate, CycFort mt) throws java.io.IOException, CycApiException
predicate
- the CycConstant predicate for which backchaining discouraged status is soughtmt
- microtheory (including its genlMts) in which the backchaining discouraged status is soughtpublic boolean isBackchainForbidden(CycConstant predicate, CycFort mt) throws java.io.IOException, CycApiException
predicate
- the CycConstant predicate for which backchaining forbidden status is soughtmt
- microtheory (including its genlMts) in which the backchaining forbidden status is soughtpublic boolean isIrreflexivePredicate(CycConstant predicate, CycFort mt) throws java.io.IOException, CycApiException
predicate
- the CycConstant predicate for which irreflexive status is soughtmt
- microtheory (including its genlMts) in which the irreflexive status is soughtpublic boolean hasSomePredicateUsingTerm(CycConstant predicate, CycFort term, java.lang.Integer argumentPosition, CycFort mt) throws java.io.IOException, CycApiException
term
- the term present at the given argument positionpredicate
- the CycConstant predicate for the formulaargumentPosition
- the argument position of the given term in the ground formulamt
- microtheory (including its genlMts) in which the existence is soughtpublic int countUsingBestIndex(CycList formula, CycFort mt) throws java.io.IOException, CycApiException
formula
- the formula whose indexed instances are countedmt
- microtheory (including its genlMts) in which the count is determinedpublic int importMucExpression(CycList mucExpression, java.lang.String mtName) throws java.io.IOException, CycApiException
mucExpression
- the MUC (Message Understanding Conference) formatted symbolic
expressionmtName
- the name of the microtheory in which the imported assertions will be madepublic CycList rkfPhraseReader(java.lang.String text, CycFort parsingMt, CycFort domainMt) throws java.io.IOException, CycApiException
(RKF-PHRASE-READER "penguins" #$RKFEnglishLexicalMicrotheoryPSC #$InferencePSC) ==> (((0) (#$Penguin #$PittsburghPenguins)))
text
- the phrase to be parsedparsingMt
- the microtheory in which lexical info is askeddomainMt
- the microtherory in which the info about candidate terms is askedpublic CycList generateDisambiguationPhraseAndTypes(CycList objects) throws java.io.IOException, CycApiException
(GENERATE-DISAMBIGUATION-PHRASES-AND-TYPES (QUOTE (#$Penguin #$PittsburghPenguins))) ==> ((#$Penguin "penguin" #$Bird "bird") (#$PittsburghPenguins "the Pittsburgh Penguins" #$IceHockeyTeam "ice hockey team"))
objects
- the list of terms to be disambiguatedpublic int getArity(CycFort predicate) throws java.io.IOException, CycApiException
predicate
- the given predicate whose number of arguments is sought
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |