|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.isi.powerloom.PLI
public class PLI
| Field Summary | |
|---|---|
static boolean |
$POWERLOOM_INITIALIZEDp$
|
static Environment |
ASSERTION_ENV
|
static Environment |
INFERENCE_ENV
|
static Keyword |
KWD_CASE_SENSITIVEp
|
static Keyword |
KWD_SUBSET_OF
|
static Surrogate |
SGT_PLI_ENVIRONMENT
|
static Surrogate |
SGT_PLI_PL_ITERATOR
|
static Symbol |
SYM_PLI_F_GET_INFERRED_BINARY_PROPOSITION_VALUES_QUERY_000
|
static Symbol |
SYM_PLI_pI
|
static Symbol |
SYM_PLI_pR
|
static Symbol |
SYM_PLI_PROPER_SUBRELATION
|
static Symbol |
SYM_PLI_pV
|
static Symbol |
SYM_PLI_STARTUP_PLI
|
static Symbol |
SYM_STELLA_LEVEL
|
static Environment |
TAXONOMIC_ENV
|
| Constructor Summary | |
|---|---|
PLI()
|
|
| Method Summary | |
|---|---|
static TruthValue |
ask(Cons query,
Module module,
Environment environment)
Returns a truth value for query in module and environment. |
static Proposition |
assertBinaryProposition(LogicObject relation,
Stella_Object arg,
Stella_Object value,
Module module,
Environment environment)
Assert that the proposition ( relation arg value) is TRUE
in module. |
static Proposition |
assertNaryProposition(Stella_Object relationAndArguments,
Module module,
Environment environment)
Assert that the proposition represented by the list RelationAndArguments satisfies
the relation relation. |
static Proposition |
assertProposition(Proposition proposition,
Module module,
Environment environment)
Assert that the proposition proposition is true in module. |
static Proposition |
assertUnaryProposition(LogicObject relation,
Stella_Object arg,
Module module,
Environment environment)
Assert that the proposition ( relation arg) is TRUE in module. |
static Module |
changeModule(Module module)
Set the current module to module and return it. |
static void |
clearCaches()
Clear all query and memoization caches. |
static Module |
clearModule(Module module)
Destroy the contents of the module module as well as
the contents of all of its children, recursively. |
static PlIterator |
conceive(Stella_Object sentence,
Module module,
Environment environment)
Create one or more proposition objects from the sentence sentence
in the module module. |
static LogicObject |
createConcept(java.lang.String name,
LogicObject parent,
Module module,
Environment environment)
Create a concept named name in the designated module, with the
designated parent superconcept (which can be left undefined). |
static LogicObject |
createEnumeratedList(Cons members,
Module module,
Environment environment)
Create a logical term that denotes a list containing members in
module using environment. |
static LogicObject |
createEnumeratedSet(Cons members,
Module module,
Environment environment)
Create a logical term that denotes the enumerated set containing members
in module using environment. |
static LogicObject |
createFunction(java.lang.String name,
int arity,
Module module,
Environment environment)
Create a function named name with arity arity in the designated
module. |
static Keyword |
createKeyword(java.lang.String name)
Returns the Stella keyword name, creating it if
necessary. |
static Module |
createModule(java.lang.String name,
Module parent,
boolean caseSensitiveP)
Creates a new module name as a child of parent. |
static LogicObject |
createObject(java.lang.String name,
LogicObject concept,
Module module,
Environment environment)
Create an object named name of type concept in the designated
module. |
static LogicObject |
createRelation(java.lang.String name,
int arity,
Module module,
Environment environment)
Create a relation named name with arity arity in the
designated module. |
static Symbol |
createSymbol(java.lang.String name,
Module module,
Environment environment)
Returns the Stella symbol name visible in module,
creating it if necessary. |
static void |
destroyObject(LogicObject renamed_Object)
Delete the object renamed_Object, retracting all facts attached to it. |
static Stella_Object |
evaluate(Stella_Object command,
Module module,
Environment environment)
Evaluate the command command within module and return
the result. |
static java.lang.String |
generateUniqueName(java.lang.String prefix,
Module module,
Environment environment)
Generates a name based on prefix with a number appended that
is not currently in use in moduleD In a non-case-sensitive module, the returned
name will be all upper case (This latter feature may change!) |
static int |
getArity(LogicObject relation)
Return the arity of the relation relation. |
static Proposition |
getBinaryProposition(LogicObject relation,
Stella_Object arg1,
Stella_Object arg2,
Module module,
Environment environment)
Return a proposition such that ( relation arg1 arg2)
is true. |
static PlIterator |
getBinaryPropositions(LogicObject relation,
Stella_Object arg1,
Stella_Object arg2,
Module module,
Environment environment)
Return propositions such that ( relation arg1 arg2)
is true. |
static PlIterator |
getChildModules(Module module)
Return the modules that are immediate children of module. |
static int |
getColumnCount(Stella_Object obj)
Return the number of columns in obj, which must
be of type proposition, cons, vector or PL-iterator. |
static LogicObject |
getConcept(java.lang.String name,
Module module,
Environment environment)
Return a class/concept named name that is local to
or visible from the module module. |
static Stella_Object |
getConceptInstanceMatchingValue(LogicObject concept,
LogicObject relation,
Stella_Object value,
Module module,
Environment environment)
Return a member of concept concept that
has an attribute matching value for the binary relation relation, i.e.,
_relationLresultGValue_ holds. |
static PlIterator |
getConceptInstances(LogicObject concept,
Module module,
Environment environment)
Return instances of the concept concept. |
static PlIterator |
getConceptInstancesMatchingValue(LogicObject concept,
LogicObject relation,
Stella_Object value,
Module module,
Environment environment)
Return members of concept concept that
have an attribute matching value for the binary relation relation, i.e.,
_relationLresultGValue_ holds. |
static PlIterator |
getDirectConceptInstances(LogicObject concept,
Module module,
Environment environment)
Return instances of concept concept. |
static PlIterator |
getDirectSubrelations(LogicObject relation,
Module module,
Environment environment)
Return relations that directly specialize relation. |
static PlIterator |
getDirectSuperrelations(LogicObject relation,
Module module,
Environment environment)
Return relations that directly generalize relation. |
static PlIterator |
getDirectTypes(LogicObject renamed_Object,
Module module,
Environment environment)
Return most specific concepts that renamed_Object belongs to. |
static LogicObject |
getDomain(LogicObject relation)
Return the type (a concept) for the first argument to the binary relation relation. |
static Cons |
getEnumeratedCollectionMembers(Stella_Object collection,
Module module,
Environment environment)
Returns the members of an enumerated collection. |
static Module |
getHomeModule(LogicObject renamed_Object)
Return the module in which renamed_Object was created. |
static PlIterator |
getInferredBinaryPropositionValues(LogicObject relation,
Stella_Object arg,
Module module,
Environment environment)
Return all values v such that (relation arg v)
has been asserted or can be inferred. |
static Keyword |
getKeyword(java.lang.String name)
Returns the Stella KEYWORD name if it exists. |
static Module |
getModule(java.lang.String name,
Environment environment)
Return a module named name. |
static PlIterator |
getModules(boolean kbModulesOnlyP)
Return all modules currently loaded into PowerLoom. |
static java.lang.String |
getName(Stella_Object obj)
Return the fully qualified name of obj, if it has one. |
static java.lang.String |
getNameInModule(Stella_Object obj,
Module module,
Environment environment)
Return the name, qualified as necessary, so that obj can be found from
module. |
static LogicObject |
getNthDomain(LogicObject relation,
int n)
Return the type (a concept) for the the nth argument of the relation relation. |
static double |
getNthFloat(Stella_Object sequence,
int n,
Module module,
Environment environment)
Return the floating point value in the nth column of
sequence. |
static int |
getNthInteger(Stella_Object sequence,
int n,
Module module,
Environment environment)
Return an integer representation of the value in the nth column of
sequence. |
static LogicObject |
getNthLogicObject(Stella_Object sequence,
int n,
Module module,
Environment environment)
Return a logic object representation of the value in the nth column
of sequence. |
static java.lang.String |
getNthString(Stella_Object sequence,
int n,
Module module,
Environment environment)
Return a string representation of the value in the nth column of
sequence. |
static Stella_Object |
getNthValue(Stella_Object sequence,
int n,
Module module,
Environment environment)
Return the value in the nth column of sequence. |
static Stella_Object |
getObject(java.lang.String name,
Module module,
Environment environment)
Look for an object named name that is local to
or visible from the module module. |
static Symbol |
getOperator(java.lang.String name)
Returns the logical operator object (a Stella SYMBOL) for name. |
static PlIterator |
getParentModules(Module module)
Return the modules that are immediate parents of module. |
static LogicObject |
getPredicate(Proposition prop)
Return the concept or relation predicate for the proposition prop. |
static PlIterator |
getProperSubrelations(LogicObject relation,
Module module,
Environment environment)
Return relations that specialize relation. |
static PlIterator |
getProperSuperrelations(LogicObject relation,
Module module,
Environment environment)
Return relations that generalize relation. |
static Proposition |
getProposition(Stella_Object relationAndArguments,
Module module,
Environment environment)
Return a proposition matching relationAndArguments that
has been asserted (or inferred by forward chaining). |
static PlIterator |
getPropositions(Stella_Object relationAndArguments,
Module module,
Environment environment)
Return propositions matching relationAndArguments that
have been asserted (or inferred by forward chaining). |
static PlIterator |
getPropositionsInModule(Module module,
Environment environment)
Return propositions that have been conceived in the module module. |
static PlIterator |
getPropositionsOf(LogicObject renamed_Object,
Module module,
Environment environment)
Return all propositions that have renamed_Object among their arguments,
and that are TRUE in the scope of the module module. |
static LogicObject |
getRange(LogicObject relation)
Return the type (a concept) for fillers of the binary relation relation. |
static LogicObject |
getRelation(java.lang.String name,
Module module,
Environment environment)
Return a concept or relation named name that is local to
or visible from the module module. |
static PlIterator |
getRelationExtension(LogicObject relation,
Module module,
Environment environment)
Return propositions that satisfy relation. |
static PlIterator |
getRules(LogicObject relation,
Module module,
Environment environment)
Return rules attached to the concept/relation relation
in either antecedent or consequent position. |
static java.lang.String |
getShortName(Stella_Object obj)
Return the short name of obj, if it has one. |
static Symbol |
getSymbol(java.lang.String name,
Module module,
Environment environment)
Returns the Stella SYMBOL name visible in module if it
exists. |
static PlIterator |
getTypes(LogicObject renamed_Object,
Module module,
Environment environment)
Return all named concepts that renamed_Object belongs to. |
static void |
initialize()
Initialize the PowerLoom logic system. |
static boolean |
isA(Stella_Object renamed_Object,
LogicObject concept,
Module module,
Environment environment)
Return TRUE if renamed_Object is a member of the concept concept. |
static boolean |
isDefault(TruthValue tv)
Tests whether tv is a default truth value. |
static boolean |
isEnumeratedCollection(Stella_Object obj)
Test whether obj is an enumerated collection. |
static boolean |
isEnumeratedList(Stella_Object obj)
Test whether obj is an enumerated list |
static boolean |
isEnumeratedSet(Stella_Object obj)
Test whether obj is an enumerated set. |
static boolean |
isFalse(TruthValue tv)
Tests whether tv is a false truth value. |
static boolean |
isFloat(Stella_Object obj)
Test whether obj is of type FLOAT (double) |
static boolean |
isInconsistent(TruthValue tv)
Tests whether tv is an inconsistent truth value. |
static boolean |
isInteger(Stella_Object obj)
Test whether obj is of type INTEGER |
static boolean |
isLogicObject(Stella_Object obj)
Test whether obj is of type LOGIC-OBJECT |
static boolean |
isNumber(Stella_Object obj)
Test whether obj is of type NUMBER. |
static boolean |
isStrict(TruthValue tv)
Tests whether tv is a strict (non-default) truth value. |
static boolean |
isString(Stella_Object obj)
Test whether obj is of type STRING |
static boolean |
isSubrelation(LogicObject sub,
LogicObject renamed_Super,
Module module,
Environment environment)
Return TRUE if sub is a subconcept/subrelation of renamed_Super. |
static boolean |
isTrue(TruthValue tv)
Tests whether tv is a true truth value. |
static boolean |
isTrueBinaryProposition(LogicObject relation,
Stella_Object arg,
Stella_Object value,
Module module,
Environment environment)
Return TRUE if the proposition ( relation arg value) has
been asserted (or inferred by forward chaining). |
static boolean |
isTrueProposition(Proposition proposition,
Module module,
Environment environment)
Return TRUE if proposition is TRUE in the module module. |
static boolean |
isTrueProposition1(Stella_Object relationAndArguments,
Module module,
Environment environment)
Return TRUE if a proposition ( relation args) has
been asserted (or inferred by forward chaining). |
static boolean |
isTrueUnaryProposition(LogicObject relation,
Stella_Object arg,
Module module,
Environment environment)
Return TRUE if the proposition ( relation arg) has
been asserted (or inferred by forward chaining). |
static boolean |
isUnknown(TruthValue tv)
Tests whether tv is an unknown truth value. |
static void |
load(java.lang.String filename,
Environment environment)
Read logic commands from the file named filename and evaluate them. |
static void |
loadNativeStream(java.io.PushbackInputStream stream,
Environment environment)
Read logic commands from the native input stream stream and evaluate them. |
static void |
loadStream(InputStream stream,
Environment environment)
Read logic commands from the STELLA stream stream and evaluate them. |
static void |
main(java.lang.String[] argv058)
Main PowerLoom entry point for your code in C++ and Java. |
static double |
objectToFloat(Stella_Object self)
Coerce self to a float, or throw a Stella Exception if the coersion is not feasible. |
static int |
objectToInteger(Stella_Object self)
Coerce self to an integer, or throw a Stella Exception if the coersion is not feasible. |
static java.lang.String |
objectToParsableString(Stella_Object self)
Return a string representing a printed representation of the object self. |
static java.lang.String |
objectToString(Stella_Object self)
Return a printed representation of the term self as a string. |
static void |
registerSpecialistFunction(java.lang.String name,
java.lang.reflect.Method functionReference,
Module module,
Environment environment)
Register name as a function name in module which will invoke the
native code procedure described by functionReferenceD The name
is a fully-qualified name which will be interpreted by the normal
rules for reading names in PowerLoom. |
static void |
resetPowerloom()
Reset PowerLoom to its initial state. |
static Proposition |
retractBinaryProposition(LogicObject relation,
Stella_Object arg,
Stella_Object value,
Module module,
Environment environment)
Retract that the proposition ( relation arg value) is TRUE
in module. |
static Proposition |
retractNaryProposition(Stella_Object relationAndArguments,
Module module,
Environment environment)
Retract the proposition that arguments satisfies
the relation relation. |
static Proposition |
retractProposition(Proposition proposition,
Module module,
Environment environment)
Retract the truth of the proposition proposition in module. |
static Proposition |
retractUnaryProposition(LogicObject relation,
Stella_Object arg,
Module module,
Environment environment)
Retract that the proposition ( relation arg) is TRUE in module. |
static PlIterator |
retrieve(Cons query,
Module module,
Environment environment)
Returns an iterator of variable bindings that when substituted for the open variables in query satisfy the query proposition. |
static void |
runForwardRules(Stella_Object module,
boolean forceP)
Run forward inference rules in module module. |
static TruthValue |
sAsk(java.lang.String query,
java.lang.String moduleName,
Environment environment)
Returns a truth value for query in module moduleName and environment. |
static PlIterator |
sAssertProposition(java.lang.String sentence,
java.lang.String moduleName,
Environment environment)
Assert that the logical sentence sentence is true in the module
named moduleName. |
static void |
saveModule(Module module,
java.lang.String filename,
java.lang.String ifexists,
Environment environment)
Save the contents of the module mod into a file named filename. |
static Module |
sChangeModule(java.lang.String name,
Environment environment)
Set the current module to the module named name. |
static Module |
sClearModule(java.lang.String name,
Environment environment)
Destroy the contents of the module named name, as
well as the contents of all of its children, recursively. |
static PlIterator |
sConceive(java.lang.String sentence,
java.lang.String moduleName,
Environment environment)
Create one or more proposition objects from the sentence sentence
in the module named moduleName. |
static LogicObject |
sCreateConcept(java.lang.String name,
java.lang.String parentName,
java.lang.String moduleName,
Environment environment)
Create a concept named name in the designated module, with
with the concept named parentName as superconcept (which can be left
undefined). |
static LogicObject |
sCreateFunction(java.lang.String name,
int arity,
java.lang.String moduleName,
Environment environment)
Create a function named name with arity arity in the designated
module. |
static Module |
sCreateModule(java.lang.String name,
java.lang.String parentName,
boolean caseSensitiveP,
Environment environment)
Creates a new module name as a child of parentName. |
static LogicObject |
sCreateObject(java.lang.String name,
java.lang.String conceptName,
java.lang.String moduleName,
Environment environment)
Create an object named name of type conceptName in the designated
module. |
static LogicObject |
sCreateRelation(java.lang.String name,
int arity,
java.lang.String moduleName,
Environment environment)
Create a relation named name with arity arity in the
designated module. |
static void |
sDestroyObject(java.lang.String objectName,
java.lang.String moduleName,
Environment environment)
Delete the object named objectName, retracting all facts
attached to it. |
static Stella_Object |
sEvaluate(java.lang.String command,
java.lang.String moduleName,
Environment environment)
Evaluate the command represented by the string command within module and
return the result. |
static int |
sGetArity(java.lang.String relationName,
java.lang.String moduleName,
Environment environment)
Return the arity of the relation named relationName. |
static PlIterator |
sGetChildModules(java.lang.String name,
Environment environment)
Return the modules that are immediate children of module name. |
static LogicObject |
sGetConcept(java.lang.String name,
java.lang.String moduleName,
Environment environment)
Return a class/concept named name that is local to
or visible from the module moduleName. |
static PlIterator |
sGetConceptInstances(java.lang.String conceptName,
java.lang.String moduleName,
Environment environment)
Return instances of concept conceptName. |
static PlIterator |
sGetDirectConceptInstances(java.lang.String conceptName,
java.lang.String moduleName,
Environment environment)
Return instances of concept conceptName. |
static LogicObject |
sGetDomain(java.lang.String relationName,
java.lang.String moduleName,
Environment environment)
Return the type (concept) for the first argument to the binary relation relationName. |
static PlIterator |
sGetInferredBinaryPropositionValues(java.lang.String relationName,
java.lang.String argName,
java.lang.String moduleName,
Environment environment)
Return all values v such that (relationName argName v)
has been asserted or can be inferred. |
static LogicObject |
sGetNthDomain(java.lang.String relationName,
int n,
java.lang.String moduleName,
Environment environment)
Return the type (a concept) for the nth argument of the relation named relationName. |
static Stella_Object |
sGetObject(java.lang.String name,
java.lang.String moduleName,
Environment environment)
Look for an object named name that is local to
or visible from the module moduleName. |
static PlIterator |
sGetParentModules(java.lang.String name,
Environment environment)
Return the modules that are immediate parents of module name. |
static Proposition |
sGetProposition(java.lang.String relationAndArguments,
java.lang.String moduleName,
Environment environment)
Return a proposition matching relationAndArguments that
has been asserted (or inferred by forward chaining). |
static PlIterator |
sGetPropositions(java.lang.String relationAndArguments,
java.lang.String moduleName,
Environment environment)
Return propositions matching relationAndArguments that
have been asserted (or inferred by forward chaining). |
static PlIterator |
sGetPropositionsOf(java.lang.String objectName,
java.lang.String moduleName,
Environment environment)
Return all propositions that have the object named objectName among
their arguments, and that are TRUE in the scope of the module moduleName. |
static LogicObject |
sGetRange(java.lang.String relationName,
java.lang.String moduleName,
Environment environment)
Return the type (a concept) for fillers of the binary relation relationName. |
static LogicObject |
sGetRelation(java.lang.String name,
java.lang.String moduleName,
Environment environment)
Return a concept or relation named name that is local to
or visible from the module moduleName. |
static PlIterator |
sGetRelationExtension(java.lang.String relationName,
Module module,
Environment environment)
Return propositions that satisfy the relation named relationName. |
static PlIterator |
sGetRules(java.lang.String relationName,
java.lang.String moduleName,
Environment environment)
Return rules attached to the concept/relation named relationName found in the module named moduleName. |
static boolean |
sIsTrueProposition(java.lang.String relationAndArguments,
java.lang.String moduleName,
Environment environment)
Return TRUE if a proposition that prints as the string relationAndArguments is true in the module named moduleName. |
static void |
sPrintRules(java.lang.String name,
OutputStream stream,
java.lang.String moduleName,
Environment environment)
Print rules attached to the concept/relation named name. |
static void |
sRegisterSpecialistFunction(java.lang.String name,
java.lang.String nativeName,
java.lang.String moduleName,
Environment environment)
Register name as a function name in the module named moduleName. |
static PlIterator |
sRetractProposition(java.lang.String sentence,
java.lang.String moduleName,
Environment environment)
Retract the truth of the logical sentence sentence in the module named
moduleName. |
static PlIterator |
sRetrieve(java.lang.String query,
java.lang.String moduleName,
Environment environment)
Returns an iterator of variable bindings that when substituted for the open variables in query satisfy the query proposition. |
static void |
sSaveModule(java.lang.String moduleName,
java.lang.String filename,
java.lang.String ifexists,
Environment environment)
Save the contents of the module moduleName into a file named filename. |
static Stella_Object |
stringToObject(java.lang.String string,
LogicObject type,
Module module,
Environment environment)
Evaluate string with respect to module and environment
and return the corresponding logical term. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean $POWERLOOM_INITIALIZEDp$
public static Surrogate SGT_PLI_ENVIRONMENT
public static Symbol SYM_STELLA_LEVEL
public static Environment ASSERTION_ENV
public static Environment TAXONOMIC_ENV
public static Environment INFERENCE_ENV
public static Surrogate SGT_PLI_PL_ITERATOR
public static Symbol SYM_PLI_pR
public static Symbol SYM_PLI_pI
public static Symbol SYM_PLI_pV
public static Symbol SYM_PLI_F_GET_INFERRED_BINARY_PROPOSITION_VALUES_QUERY_000
public static Symbol SYM_PLI_PROPER_SU