[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11. Miscellaneous

This is a catch-all section for documented functions, methods and relations that haven’t been categorized yet into any of the previous sections. They are in random order and many of them will never be part of the official PowerLoom interface. So beware!

Method on 2_D_ARRAY: 2_d_element (array (row INTEGER) (column INTEGER)) : (LIKE (ANY-VALUE SELF))

Return the element of array at position [row, column].

Method on 2_D_FLOAT-ARRAY: 2_d_element (array (row INTEGER) (column INTEGER)) : FLOAT

Return the element of array at position [row, column].

Method on 2_D_ARRAY: 2_d_element-setter (array (value OBJECT) (row INTEGER) (column INTEGER)) : (LIKE (ANY-VALUE SELF))

Set the element of array at position [row, column] to value and return the result.

Method on 2_D_FLOAT-ARRAY: 2_d_element-setter (array (value FLOAT) (row INTEGER) (column INTEGER)) : (LIKE (ANY-VALUE SELF))

Set the element of array at position [row, column] to value and return the result.

N-Command: add-testing-example ((form CONS) (score PARTIAL-MATCH-SCORE)) :

Add a query and score pair to the master list of testing examples

N-Command: add-training-example ((form CONS) (score PARTIAL-MATCH-SCORE)) :

Add a query and score pair to the master list of training examples

Function: all-asserted-types ((self OBJECT)) : (CONS OF NAMED-DESCRIPTION)

Return a set of all of the types that are asserted to be satisfied by self.

Function: all-class-instances ((type SURROGATE)) : CONS

Return a set of instances that belong to the class type.

Function: all-cycles ((module MODULE) (local? BOOLEAN)) : (CONS OF CONS)

Return a list of lists of descriptions that are provably co-extensional.

Function: all-direct-subrelations ((relation NAMED-DESCRIPTION) (removeEquivalents? BOOLEAN)) : (CONS OF NAMED-DESCRIPTION)

Return a set of relations that immediately specialize relation. If removeEquivalents? (recommended), don’t include any relations equivalent to relation.

Function: all-direct-superrelations ((relation NAMED-DESCRIPTION) (removeEquivalents? BOOLEAN)) : (CONS OF NAMED-DESCRIPTION)

Return a set of relations that immediately subsume relation. If removeEquivalents? (recommended), don’t include any relations equivalent to relation.

Function: all-direct-types ((self OBJECT)) : (CONS OF LOGIC-OBJECT)

Return a set of most specific types that are satisfied by self.

Function: all-equivalent-relations ((relation NAMED-DESCRIPTION) (reflexive? BOOLEAN)) : (CONS OF NAMED-DESCRIPTION)

Return a list of all relations equivalent to relation. If reflexive?, include relation in the list.

Function: all-facts-of-instance ((self OBJECT) (includeunknownfacts? BOOLEAN) (elaborate? BOOLEAN)) : (LIST OF PROPOSITION)

Return a list of all definite (TRUE or FALSE) propositions attached to self.

N-Command: all-facts-of-n ((n INTEGER) &rest (instanceRefs NAME)) : (CONS OF PROPOSITION)

This is a generalization of all-facts-of (which see). With n = 0 and only one instance this command behaves just like all-facts-of. Otherwise, returns a cons list of all definite (TRUE or FALSE) propositions that reference any of the instances listed in instanceRefs, plus if n >= 1 all propositions that reference any instances that are arguments of propositions collected in the previous step, plus if n >= 2... and so on. That is, if we only consider binary propositions, this can be viewed as growing a graph with instances as its nodes and predicates as its arcs starting from the set of seed instanceRefs to depth n-1. Caution: with a fully connected KB and large enough n this could return the whole knowledge base.

The returned propositions include those asserted to be true or false by default, but it does not include propositions that are found to be true only by running the query engine. Facts inferred to be true by the forward chainer will be included. Hence, the returned list of facts may be longer in a context where the forward chainer has been run then in one where it has not (see run-forward-rules).

Function: all-inconsistent-propositions ((module MODULE) (local? BOOLEAN)) : (ITERATOR OF PROPOSITION)

Iterate over all conceived propositions visible from module that have an inconsistent truth value. If local?, only return inconsistent propositions conceived locally in module.

Function: all-instances ((module MODULE) (local? BOOLEAN)) : (ITERATOR OF LOGIC-OBJECT)

Iterate over all instances (or individuals) visible from module. Only instances that haven’t been deleted will be considered. If local?, only return instances created locally in module.

Function: all-named-descriptions ((module MODULE) (local? BOOLEAN)) : (ITERATOR OF NAMED-DESCRIPTION)

Iterate over all named descriptions visible from module. If local?, return only named descriptions interned in module. If module is null, return all named descriptions interned everywhere.

Function: all-named-instances ((module MODULE) (local? BOOLEAN)) : (ITERATOR OF LOGIC-OBJECT)

Iterate over all named instances (or individuals) visible from module. Only instances that haven’t been deleted will be considered. If local?, only return instances created locally in module.

Function: all-named-terms ((module MODULE) (local? BOOLEAN)) : (ITERATOR OF OBJECT)

Iterate over all named terms visible from module. A term can be an instance (or individual) as well as a description. Only terms that haven’t been deleted will be considered. If local?, only return terms created locally in module.

Function: all-propositions ((module MODULE) (local? BOOLEAN)) : (ITERATOR OF PROPOSITION)

Iterate over all conceived propositions visible from module. Only propositions that haven’t been deleted will be considered. If local?, only return propositions conceived locally in module.

Function: all-relation-values ((relation SURROGATE) (nMinusOneArguments CONS)) : CONS

Return a set of values that satisfy the relation relation (a surrogate) applied to nMinusOneArguments plus that last value.

Command: all-sentences-of ((instanceRef OBJECT)) : (CONS OF STRING-WRAPPER)

Return a list of sentences describing facts about instanceRef.

Function: all-slot-value-types ((self LOGIC-OBJECT) (relation SURROGATE)) : (CONS OF NAMED-DESCRIPTION)

Return a set of the most specific types for fillers of the slot relation applied to self.

Function: all-slot-values ((self LOGIC-OBJECT) (relation SURROGATE)) : CONS

Return a set of values for the slot relation (a surrogate) applied to self (an object).

Function: all-subrelations ((relation NAMED-DESCRIPTION) (removeequivalents? BOOLEAN)) : (CONS OF NAMED-DESCRIPTION)

Return a set of all (named) relations that specialize relation.

Function: all-superrelations ((relation NAMED-DESCRIPTION) (removeequivalents? BOOLEAN)) : (CONS OF NAMED-DESCRIPTION)

Return a set of all relations that subsume relation.

Function: all-taxonomic-types ((self OBJECT)) : (CONS OF NAMED-DESCRIPTION)

Return a set of all of the types that are satisfied by self, using only assertions and upward taxonomic reasoning.

Function: all-terms ((module MODULE) (local? BOOLEAN)) : (ITERATOR OF OBJECT)

Return a list of all terms visible from module. A term can be an instance (or individual) as well as a description. Only terms that haven’t been deleted will be considered. If local?, only return terms created locally in module.

Function: all-types ((self OBJECT)) : (CONS OF NAMED-DESCRIPTION)

Return a set of all of the types that are satisfied by self.

Function: all-unnamed-terms ((module MODULE) (local? BOOLEAN)) : ITERATOR

Iterate over all unnamed terms visible from module. A term can be an instance (or individual) as well as a description. Only terms that haven’t been deleted will be considered. If local?, only return terms created locally in module.

Function: allocate-supported-closure-iterator ((startnode CONS) (allocateadjacencyiterator FUNCTION-CODE) (filterfunction FUNCTION-CODE)) : SUPPORTED-CLOSURE-ITERATOR

Similar to allocate-transitive-closure-iterator (which see), but return a SUPPORTED-CLOSURE-ITERATOR instead.

Function: allocate-transitive-closure-iterator ((startNode OBJECT) (allocateAdjacencyIterator FUNCTION-CODE) (filterFunction FUNCTION-CODE)) : ITERATOR

Return an iterator that generates the transitive closure of applying iterators generated by allocateAdjacencyIterator to startNode. If filterFunction is non-null, that function is applied as a filter to each node generated (nodes filtered out still generate descendants, but they don’t get returned).

Macro: apply-ask (&body (body CONS)) : OBJECT

Execute a yes/no query composed of input-variables inputVariables and body queryBody. Before executing, bind variables to inputBindings (in sequence). (apply-ask inputVariables queryBody inputBindings)

Function: apply-kappa? ((description DESCRIPTION) (vector VECTOR)) : BOOLEAN

Apply (inherit) the description description to members of the vector vector. Return TRUE if no clash was detected. Constraint propagation happens only if it is enabled prior to calling apply-kappa?.

Macro: apply-retrieve (&body (body CONS)) : OBJECT

Execute a query composed of io-variables variables and body queryBody. Before executing, bind variables to inputBindings (in sequence). If one variable is left unbound, returns a cons list of bindings of that variable. If two or more are unbound, returns a cons list of cons lists of bindings. Setting the option :singletons? to FALSE always returns a list of lists. Example call: (apply-retrieve variables queryBody inputBindings)

N-Command: ask-partial (&rest (proposition&options PARSE-TREE)) : FLOAT

Similar to ask (which see), but return the highest partial match score for the supplied proposition instead of a truth value. If the option :MAXIMIZE-SCORE? is set to FALSE, return after the first partial match score has been generated.

Function: bottom? ((self OBJECT)) : BOOLEAN

Return TRUE if self is the undefined individual BOTTOM.

Command: call-all-facts-of ((instanceRef OBJECT)) : (LIST OF PROPOSITION)

Return a list of all definite (TRUE or FALSE) propositions that reference the instance instanceRef.

Function: call-ask ((query OBJECT)) : TRUTH-VALUE

Callable version of ask (which see). Accepts queries specified by a query iterator, or specified as a CONS-list of arguments as they would be supplied to ask. Raises LOGIC-EXCEPTIONs in case of illegal queries and logical expressions.

Function: call-defconcept ((arguments CONS)) : NAMED-DESCRIPTION

Callable version of the defconcept command (which see). Expects the same arguments as defconcept but supplied as a list.

Function: call-deffunction ((arguments CONS)) : NAMED-DESCRIPTION

Callable version of the deffunction command (which see). Expects the same arguments as deffunction but supplied as a list.

Function: call-defobject ((arguments CONS)) : LOGIC-OBJECT

Callable version of the defobject command (which see). Expects the same arguments as defobject but supplied as a list.

Function: call-defproposition ((arguments CONS)) : PROPOSITION

Callable version of the defproposition command (which see). Expects the same arguments as defproposition but supplied as a list.

Function: call-defrelation ((arguments CONS)) : NAMED-DESCRIPTION

Callable version of the defrelation command (which see). Expects the same arguments as defrelation but supplied as a list.

Function: call-list-undefined-relations ((module MODULE) (local? BOOLEAN)) : CONS

Callable version of list-undefined-relations (which see).

Function: call-propagate-constraints ((context CONTEXT)) :

Trigger constraint propagation over all propositions in the module or world context.

Function: call-retrieve ((query OBJECT)) : QUERY-ITERATOR

Callable version of retrieve (which see). Accepts queries specified by a query iterator, or specified as a CONS-list of arguments as they would be supplied to retrieve. Raises LOGIC-EXCEPTIONs in case of illegal queries and logical expressions.

Function: call-retrieve-partial ((query OBJECT)) : QUERY-ITERATOR

Callable version of retrieve-partial (which see). Accepts queries specified by a query iterator, or specified as a CONS-list of arguments as they would be supplied to retrieve-partial. Raises LOGIC-EXCEPTIONs in case of illegal queries and logical expressions.

Function: call-run-forward-rules ((module MODULE) (force? BOOLEAN)) :

Run forward inference rules in module module. If module is NULL, the current module will be used. If forward inferencing is already up-to-date in the designated module, no additional inferencing will occur, unless force? is set to TRUE, in which case all forward rules are run or rerun.

Function: call-set-inference-level ((levelKeyword KEYWORD) (module MODULE)) : KEYWORD

Set the inference level of module to the level specified by levelKeyword. If module is NULL and we are inside a query, set the level of the current query iterator. Otherwise, set the level globally.

Function: class? ((objectRef OBJECT)) : BOOLEAN

Return TRUE if objectRef denotes a class.

Function: coerce-to-instance ((self OBJECT) (original OBJECT)) : LOGIC-OBJECT

Return the logic instance referred to by self.

Function: coerce-to-instance-or-literal ((self OBJECT) (original OBJECT)) : OBJECT

Return the logic instance referred to by self, or self if it is a literal (e.g., string or number) that can’t be coerced.

Function: coerce-to-vector ((self OBJECT)) : VECTOR

Return a vector containing the elements in self. Coerce each element of self to be a logic object or literal.

Function: collection? ((objectRef OBJECT)) : BOOLEAN

Return TRUE if objectRef denotes a relation or a class.

Command: conceive-term ((tree OBJECT)) : OBJECT

tree is a term expression (a string or an s-expression), or is a class reference (a symbol or surrogate). Return a (possibly newly-conceived) term representing the internalized representation of that term.

Function: conjoin-truth-values ((tv1 TRUTH-VALUE) (tv2 TRUTH-VALUE)) : TRUTH-VALUE

Return the logical conjunction of truth values tv1 and tv2.

Method on JUSTIFICATION: consify (self) : CONS

Return a CONS tree representation of the proof self. Each proof step is represented as a CONS tree of the form (<proposition> (<key> <value>...) <antecedent>...) where each <antecedent> is a CONS tree representing a subproof. The consification follows the original proof structure literally, i.e., no uninteresting nodes such as patterns or AND-introductions are suppressed.

Method on QUERY-ITERATOR: consify (self) : CONS

Generate all solutions for the query self, and collect them into a cons list of result tuples. If :SINGLETONS? TRUE, collect a list of atoms rather than a list of lists for tuples of arity=1.

Method on QUERY-SOLUTION-TABLE: consify (self) : CONS

Collect all solutions of self into a cons list and return the result.

Method on QUERY-ITERATOR: consify-current-solutions (self) : CONS

Collect the current solutions of self into a cons list of result tuples. If :SINGLETONS? TRUE, collect a list of atoms rather than a list of lists for tuples of arity=1.

Function: consify-justification ((self JUSTIFICATION) (style KEYWORD)) : CONS

Return a CONS tree representation of the proof self. Each proof step is represented as a CONS tree of the form (<proposition> (<key> <value>...) <antecedent>...) where each <antecedent> is a CONS tree representing a subproof. style indicates what nodes in the proof tree should be suppressed. :RAW preserves the original structure literally, :VERBOSE keeps AND- introductions but suppresses all auxiliary (non-logical) nodes such as pattern nodes, and :BRIEF additionally suppresses AND-introduction nodes.

Function: constant? ((objectRef OBJECT)) : BOOLEAN

Return TRUE if objectRef denotes a literal or scalar.

Method on JUSTIFICATION: copy (self) : (LIKE SELF)

Return a copy of the proof starting at self. Allocates all new justification objects, but structure-shares other information such as propositions and substitutions.

N-Command: create ((name GENERALIZED-SYMBOL) &rest (type GENERALIZED-SYMBOL)) : OBJECT

Create a logic object with name name and return it. If type is also supplied, assert that the object belongs to that type.

Function: create-2_d_array ((nof-rows INTEGER) (nof-columns INTEGER) &rest (values OBJECT)) : 2_D_ARRAY

Create a two-dimensional array with nof-rows rows and nof-columns columns, and initialize it in row-major-order from values. Missing values will be padded with NULL, extraneous values will be ignored.

Function: create-2_d_float-array ((nof-rows INTEGER) (nof-columns INTEGER) &rest (values FLOAT)) : 2_D_FLOAT-ARRAY

Create a two-dimensional array with nof-rows rows and nof-columns columns, and initialize it in row-major-order from values. Missing values will be padded with NULL, extraneous values will be ignored.

Function: create-float-vector (&rest (values FLOAT)) : FLOAT-VECTOR

Return a vector containing values, in order.

Function: create-marker-storage ((supportRecall? BOOLEAN)) : MARKER-TABLE

Return a new marker storage object, used to remember with objects have been marked. If supportRecall? is set, then the iterator recall-marked-objects can be invoked on the new marker storage object.

Function: create-vector (&rest (values OBJECT)) : VECTOR

Return a vector containing values, in order.

Command: current-inference-level () : NORMAL-INFERENCE-LEVEL

Return the current inference level that is active in the current query, the current module, or, otherwise, globally.

Function: default-false? ((self PROPOSITION)) : BOOLEAN

Return true if self is default false.

Function: default-true? ((self PROPOSITION)) : BOOLEAN

Return true if self is default true.

Function: default-truth-value? ((self TRUTH-VALUE)) : BOOLEAN

Return TRUE if self is a default truth value.

Macro: define-arithmetic-operation-on-wrappers ((name SYMBOL) (operation-name SYMBOL)) : OBJECT

Defines name as an arithmetic comparision operation using the test test-name. It will take two wrapped number parameters and return a wrapped number. The code will use the appropriate test for the specific subtype of wrapped number actually passed in, and return the appropriate subtype of wrapped number based on the normal arithmetic contagion rules.

For example, if both input parameters are wrapped integers then the output will be a wrapped integer. If the inputs are a wrapped integer and a wrapped float then the output will be a wrapped float, etc.

Macro: define-arithmetic-test-on-wrappers ((name SYMBOL) (test-name SYMBOL)) : OBJECT

Defines name as an arithmetic comparision operation using the test test-name. It will take two wrapped number parameters and return a boolean. The code will use the appropriate test for the specific subtype of wrapped number actually passed in.

Macro: define-computed-constraint ((name SYMBOL) (var-list CONS) (constraint-test CONS) &body (position-computations CONS)) : OBJECT

Defines name to be a constraint computation which uses constraint-test to determine if a fully bound set of variables satisfies the constraint. The forms in position-computations are used to compute the value for each of the positions. All such computations must set the variable value to be the result computed for the missing position. Setting value to null for any such computation means that that particular argument cannot be computed from the others. The input variables in var-list will be bound to the N arguments to the constraint. The generated function will return a Stella Object and take as inputs the values of the N arguments to the constraint. A value of null means that the value is not available. If all arguments are not null, then the return value will be a Stella wrapped boolean indicating whether the constraint is satisified or not. If more than one input value is null, then this constraint code will not be called.

Function: deobjectify-tree ((self OBJECT)) : OBJECT

Return a copy of self where all logic objects are replaced by their generated parse-tree version. This is useful to convert the result of a retrieval query into a regular parse tree.

Method on NAMED-DESCRIPTION: describe-object (self (stream OUTPUT-STREAM) (mode KEYWORD)) :

Prints a description of self to stream stream. mode can be :terse, :verbose, or :source. Used by describe.

Method on NAMED-DESCRIPTION: description-name (self) : SYMBOL

Return the name of the description self.

Method on DESCRIPTION: description-name (self) : SYMBOL

Return the name of the description self, if it has one.

Function: destroy-instance ((self OBJECT)) :

Destroy all propositions that reference self, and mark it as deleted?, thereby making it invisible within class extensions.

Function: destroy-object ((self OBJECT)) :

Destroy self which can be a term or a proposition. Destroy all propositions that reference self and mark it as deleted? (thereby making it invisible within class extensions).

Function: destroy-proposition ((proposition PROPOSITION)) : PROPOSITION

Retract and destroy the proposition proposition. Recursively destroy all propositions that reference proposition. Also, destroy all satellite propositions of proposition.

Function: destroy-term ((self LOGIC-OBJECT)) :

Destroy all propositions that reference self, and mark it as deleted?, thereby making it invisible within class extensions. Unlink descriptions from native relations.

Function: direct-superrelations ((self RELATION)) : (ITERATOR OF (LIKE SELF))

Return direct super classes/slots of self.

Function: disabled-powerloom-feature? ((feature KEYWORD)) : BOOLEAN

Return true if the STELLA feature is currently disabled.

Function: disjoin-truth-values ((tv1 TRUTH-VALUE) (tv2 TRUTH-VALUE)) : TRUTH-VALUE

Return the logical disjunction of truth values tv1 and tv2.

Function: disjoint-terms? ((d1 DESCRIPTION) (d2 DESCRIPTION)) : BOOLEAN

Return TRUE if d1 and d2 belong to disjoint partitions.

Function: do-clear-instances ((module MODULE)) :

Function version of clear-instances that evaluates its argument.

Function: do-save-module ((module MODULE) (store OBJECT)) :

Save module to the persistent store store which can either be an output stream or a persistent OBJECT-STORE.

Method on QUERY-SOLUTION-TABLE: empty? (self) : BOOLEAN

Return TRUE if self has zero entries.

Method on FLOAT-VECTOR: empty? (self) : BOOLEAN

Return TRUE if self has length 0.

Function: enabled-powerloom-feature? ((feature KEYWORD)) : BOOLEAN

Return true if the STELLA feature is currently enabled.

Method on PAGING-INDEX: estimated-length (self) : INTEGER

Return the estimated length of the sequences in self, which could be too large if some of the members have been deleted.

Function: evaluate-proposition ((self PROPOSITION)) :

Evaluate self against its arguments, possibly resulting in the setting or changing of its truth value.

Function: evaluation-state ((proposition PROPOSITION)) : KEYWORD

Return :POSTED if proposition is on the evaluation queue for *context*, :EVALUATED if has been evaluated, or NULL if it has never been evaluated.

Function: evaluation-state-setter ((proposition PROPOSITION) (state KEYWORD)) :

Record the evaluation state of proposition.

Function: explain-why ((label STRING) (style KEYWORD) (maxdepth INTEGER) (stream OUTPUT-STREAM)) :

Programmer’s interface to WHY function.

Function: explain-whynot ((label STRING) (style KEYWORD) (maxdepth INTEGER) (summary? BOOLEAN) (stream OUTPUT-STREAM)) :

Programmer’s interface to the WHYNOT function.

Function: false-truth-value? ((self TRUTH-VALUE)) : BOOLEAN

Return TRUE if self represents some form of falsehood.

Function: false? ((self PROPOSITION)) : BOOLEAN

Return true if self is false (or default-false if we are considering default assertions).

Method on OBJECT-STORE: fetch-instance (store (name OBJECT)) : OBJECT

Fetch the instance identified by name (a string or symbol) from store and return it as an appropriate logic object. This needs to be appropriately specialized on actual OBJECT-STORE implementations.

Method on OBJECT-STORE: fetch-relation (store (name OBJECT)) : NAMED-DESCRIPTION

Fetch the relation identified by name (a string or symbol) from store and return it as a named description. This needs to be appropriately specialized on actual OBJECT-STORE implementations.

Method on 2_D_ARRAY: fill-array (self &rest (values OBJECT)) :

Fill the two-dimensional array self in row-major-order from values. Missing values will retain their old values, extraneous values will be ignored.

Method on 2_D_FLOAT-ARRAY: fill-array (self &rest (values FLOAT)) :

Fill the two-dimensional array self in row-major-order from values. Missing values will retain their old values, extraneous values will be ignored.

Function: finalize-objects () :

Finalize all currently unfinalized objects. The user-level entry point for this is (process-definitions).

Function: find-direct-supers-and-subs ((self DESCRIPTION) (onlysupers? BOOLEAN)) : (CONS OF DESCRIPTION) (CONS OF DESCRIPTION) (CONS OF DESCRIPTION)

Classify self and return three values, its direct supers, direct subs, and a list of equivalent descriptions. Setting supersOnly? may speed up the computation (perhaps by a lot). If description is nameless and has no dependent propositions, then it is automatically removed from the hierarchy after classification.

Function: find-direct-supers-of-instance ((self OBJECT)) : (CONS OF LOGIC-OBJECT)

Classify self and return a list of most specific named descriptions among all descriptions that it satisfies.

N-Command: find-instance ((instanceRef OBJECT)) : OBJECT

Return the nearest instance with name instanceRef visible from the current module. instanceRef can be a string, symbol, or surrogate. If instanceRef is a surrogate, the search originates in the module the surrogate was interned in.

N-Command: find-rule ((ruleName NAME)) : PROPOSITION

Search for a rule named ruleName. Like get-rule, but find-rule implicity quotes its input argument.

Function: function? ((relationRef OBJECT)) : BOOLEAN

Return TRUE if relationRef references a function.

Function: generate-expression ((self LOGIC-OBJECT) (canonicalizevariablenames? BOOLEAN)) : OBJECT

Return an s-expression representing the source expression for self.

Method on LOGIC-THING: generate-specialized-term (self) : OBJECT

Method to generate a specialized term for self. This is designed to allow for extension of the term generation code to cover other types of objects for the logic. This particular method will signal an error unless there is a surrogate-value-inverse link set.

Function: get-class ((instanceRef OBJECT)) : LOGIC-OBJECT

Return the nearest class with name instanceRef visible from the current module. instanceRef can be a string, symbol, or surrogate. If instanceRef is a surrogate, the search originates in the module the surrogate was interned in.

Function: get-forward-justifications ((proposition PROPOSITION)) : (LIST OF JUSTIFICATION)

Return propositions forward justifications.

Function: get-instance ((instanceRef OBJECT)) : OBJECT

Return the nearest instance with name instanceRef visible from the current module. instanceRef can be a string, symbol, or surrogate. If instanceRef is a surrogate, the search originates in the module the surrogate was interned in.

Function: get-module ((moduleRef OBJECT)) : MODULE

Return a module named moduleRef.

Function: get-relation ((instanceRef OBJECT)) : LOGIC-OBJECT

Return the nearest relation with name instanceRef visible from the current module. instanceRef can be a string, symbol, or surrogate. If instanceRef is a surrogate, the search originates in the module the surrogate was interned in.

Function: get-self-or-prototype ((instanceRef OBJECT)) : LOGIC-OBJECT

Used to convert a computation to reference so-called template slots rather than own slots: If instanceRef denotes a class, return a prototype of that class. Otherwise, return instanceRef.

Function: get-slot-maximum-cardinality ((self LOGIC-OBJECT) (relation SURROGATE)) : INTEGER

Return a maximum value for the number of fillers of relation relation (a surrogate) applied to the instance self (an object).

Function: get-slot-minimum-cardinality ((self LOGIC-OBJECT) (relation SURROGATE)) : INTEGER

Return a minimum value for the number of fillers of relation relation (a surrogate) applied to the instance self (an object).

Function: get-slot-value ((self LOGIC-OBJECT) (relation SURROGATE)) : OBJECT

Return a single value for the slot relation (a surrogate) applied to self (an object).

Function: get-slot-value-type ((self LOGIC-OBJECT) (relation SURROGATE)) : NAMED-DESCRIPTION

Return a most specific type for fillers of the slot relation (a surrogate) applied to self. If there is more than one, pick one.

Function: get-why-justification ((label STRING)) : JUSTIFICATION

Returns the current WHY justification. May also throw one of the following subtypes of EXPLAIN-EXCEPTION: EXPLAIN-NO-QUERY-EXCEPTION EXPLAIN-NO-SOLUTION-EXCEPTION EXPLAIN-NO-MORE-SOLUTIONS-EXCEPTION EXPLAIN-NOT-ENABLED-EXCEPTION EXPLAIN-NO-SUCH-LABEL-EXCEPTION EXPLAIN-QUERY-TRUE-EXCEPTION

Function: get-whynot-justifications ((query QUERY-ITERATOR) (label STRING) (mapping EXPLANATION-MAPPING)) : (LIST OF JUSTIFICATION)

Programmer’s interface to WHYNOT function. Derive justifications why query failed, or, if label was supplied as non-NULL, lookup its justification relative to mapping and return the result.

Function: has-forward-justifications? ((proposition PROPOSITION)) : BOOLEAN

Return TRUE if proposition has any forward justifications.

Method on NAMED-DESCRIPTION: help-print-outline (top (stream OUTPUT-STREAM) (current-depth INTEGER) (depth INTEGER) (named? BOOLEAN)) :

Helper function for print-concept-outline

Method on DESCRIPTION: help-print-outline (top (stream OUTPUT-STREAM) (current-depth INTEGER) (depth INTEGER) (named? BOOLEAN)) :

Helper function for print-concept-outline

N-Command: in-dialect ((dialect NAME)) : KEYWORD

Change the current logic dialect to dialect. Currently supported dialects are KIF, STELLA, and PREFIX-STELLA. The STELLA dialects are not recommended for the construction of knowledge bases, they are mainly used internally by PowerLoom.

Function: inconsistent-truth-value? ((self TRUTH-VALUE)) : BOOLEAN

Return TRUE if self represents INCONSISTENT.

Function: inconsistent? ((self PROPOSITION)) : BOOLEAN

Return true if self is inconsistent (true and false).

Method on QUERY-SOLUTION-TABLE: insert-at (self (key (LIKE (ANY-KEY SELF))) (value (LIKE (ANY-VALUE SELF)))) :

Insert value identified by key into self. If a solution with that key already exists, destructively modify it with the slot values of value. This is necessary to preserve the order of solutions in self.

Function: invert-truth-value ((self TRUTH-VALUE)) : TRUTH-VALUE

Return the logical negation of self.

Function: known-truth-value? ((self TRUTH-VALUE)) : BOOLEAN

Return TRUE if self is a known truth value, that is either TRUE or FALSE, but not UNKNOWN, INCONSISTENT, etc.

Method on QUERY-SOLUTION-TABLE: length (self) : INTEGER

Return the number of entries in self.

Command: list-features () : LIST

Return a list containing two lists, a list of currently enabled PowerLoom features, and a list of all available PowerLoom features.

N-Command: list-unclassified-instances ((module NAME) (local? BOOLEAN)) : (CONS OF LOGIC-OBJECT)

Collect all instances in module (or in any module if module is NULL) that were not (or will not be) classified due to their lack of non-inferable/primitive type assertions.

N-Command: list-unclassified-relations ((module NAME) (local? BOOLEAN)) : (CONS OF NAMED-DESCRIPTION)

Collect all named description in module (or in any module if module is NULL) that were not (or will not be) classified due to their lack of non-inferable/primitive ancestor relations.

N-Command: list-undefined-relations ((module NAME) (local? BOOLEAN)) : (CONS OF NAMED-DESCRIPTION)

Return a list of as yet undefined concepts and relations in module. These relations were defined by the system, since they were referenced but have not yet been defined by the user. If module is NULL look in the current module. If local? only look in module but not in any modules it inherits.

Method on QUERY-ITERATOR: listify (self) : LIST

Just like QUERY-ITERATOR.consify but return a LIST instead.

Command: load-cmd-line-files () :

Loads all PowerLoom files specified on the command line. If directories are listed, all PowerLoom files in those directories are loaded. Since when this is called we might still have unprocessed command line args, this only looks at files which are to the right of the last argument that starts with a - character.

Command: load-directory ((directory STRING)) :

Load all PowerLoom files (*.plm) in directory in alphabetic sort order.

Function: load-stream ((stream INPUT-STREAM)) :

Read logic commands from stream and evaluate them.

Function: load-stream-in-module ((stream INPUT-STREAM) (default-module MODULE)) :

Read logic commands from stream and evaluate them. If default-module is not null, then any commands will be read into that module unless an in-module declaration is encountered which will over-ride the default value. If noe default-module is specified, and the input stream does not have an in-module form, an error is signaled.

Function: logic-class? ((self CLASS)) : BOOLEAN

Return TRUE if the class self or one of its supers supports indices that record extensions referenced by the logic system. Also return true for literal classes.

Function: logic-form-less? ((o1 OBJECT) (o2 OBJECT)) : BOOLEAN

A sorting predicate for objects o1 and o2 that can appear in logical forms. Performs a combined numeric and lexocographic sort that accounts for lists, collections and propositions. Numbers precede all other values, null follows all other values.

Function: logic-module? ((self MODULE)) : BOOLEAN

Return TRUE if self is a logic module, implying that relations defined within it define a knowledge base. A module is a logic module iff it inherits the module PL-KERNEL.

Method on QUERY-SOLUTION-TABLE: lookup (self (key (LIKE (ANY-KEY SELF)))) : (LIKE (ANY-VALUE SELF))

Lookup the solution identified by key in self and return its value, or NULL if no such solution exists.

Function: lookup-native-computation ((native-name STRING) (arity INTEGER)) : FUNCTION-CODE

Returns the native funtion code for native-name if it exists and the underlying programming languages supports such lookups. It is looked up using the signature of a computation function supported by the computation specialist.

Function: lookup-native-specialist ((native-name STRING)) : FUNCTION-CODE

Returns the native funtion code for native-name if it exists and the underlying programming languages supports such lookups. Uses the signature of a specialist function.

Function: named-description? ((self DESCRIPTION)) : BOOLEAN

Return TRUE if self is the description of a named class or relation.

Function: natural-deduction-mode? () : BOOLEAN

True if normalization is governed by natural deduction semantics.

Method on QUERY-SOLUTION-TABLE: non-empty? (self) : BOOLEAN

Return TRUE if self has at least 1 entry.

Method on FLOAT-VECTOR: non-empty? (self) : BOOLEAN

Return TRUE if self has length > 0.

Method on QUERY-SOLUTION-TABLE: nth (self (position INTEGER)) : (LIKE (ANY-VALUE SELF))

Return the nth solution in self, or NULL if it is empty.

Function: object-name ((self OBJECT)) : SYMBOL

Return the name symbol for the logic object self.

Function: object-name-string ((self OBJECT)) : STRING

Return the name string for the logic object self.

Function: object-surrogate ((self OBJECT)) : SURROGATE

Return the surrogate naming the object self, which may be a Stella class that is used in PowerLoom as well as a more normal powerloom object.

Function: object-surrogate-setter ((self OBJECT) (name SURROGATE)) : SURROGATE

Return the name of the logic object self to name.

Method on QUERY-SOLUTION-TABLE: pop (self) : (LIKE (ANY-VALUE SELF))

Remove and return the first solution of self or NULL if the table is empty.

Function: post-for-evaluation ((self PROPOSITION) (world CONTEXT)) :

Push self onto the evaluation queue (unless it’s already there).

Function: powerloom () :

Run the PowerLoom listener. Read logic commands from the standard input, evaluate them, and print their results. Exit if the user entered bye, exit, halt, quit, or stop.

Function: powerloom-gui-exit-hook ((ignore OBJECT)) :

Exit hook to stop the PowerLoom GUI if it is running.

Command: powerloom-information () : STRING

Returns information about the current PowerLoom implementation. Useful when reporting problems.

Function: pretty-print-logical-form ((form OBJECT) (stream OUTPUT-STREAM)) :

Pretty-print the logical form form to stream according to the current setting of *logic-dialect*.

Method on 2_D_ARRAY: print-array (self (stream NATIVE-OUTPUT-STREAM)) :

Print the array self to stream.

Method on 2_D_FLOAT-ARRAY: print-array (self (stream NATIVE-OUTPUT-STREAM)) :

Print the array self to stream.

Function: print-extension-sizes ((module MODULE) (sizeCutoff INTEGER)) :

Print the extension sizes of concepts visible in module. If module is NULL the current module is used. Do not report extensions with size less than sizeCutoff (default is 10).

N-Command: print-facts ((instanceref OBJECT)) :

Like ALL-FACTS-OF, but prints each fact on a separate line on the standard output stream.

Function: print-goal-stack ((frame CONTROL-FRAME) (verbose? BOOLEAN)) :

Print stack of goals. Assumes that query has been interrupted with a full stack of control frames.

Function: print-logical-form ((form OBJECT) (stream OUTPUT-STREAM)) :

Print the logical form form to stream according to the current setting of *logic-dialect*. Pretty-printing is controlled by the current setting of *prettyPrintLogicalForms?*.

Function: print-logical-form-in-dialect ((self OBJECT) (dialect KEYWORD) (stream OUTPUT-STREAM)) :

Produce a stringified version of a logical representation of self and write it to the stream stream. Use the dialect dialect, or use the current dialect if dialect is NULL.

Function: print-unformatted-logical-form ((form OBJECT) (stream OUTPUT-STREAM)) :

Print the logical form form to stream according to the current setting of *logic-dialect*. Pretty-printing is explicitly forced to be turned off.

Function: print-whynot-justification ((justification JUSTIFICATION) (stream OUTPUT-STREAM) (maxDepth INTEGER) (style KEYWORD) (summary? BOOLEAN)) :

Print a WHYNOT justification to stream according to maxDepth and style. Print a summary only if summary? is TRUE.

Function: random-float ((n FLOAT)) : FLOAT

Generate a random integer in the interval [0..n-1]. n must be <= 2^15.

Method on MARKER-TABLE: recall-marked-objects (self) : LIST-ITERATOR

Return an iterator that generates all marked objects recorded in self.

Function: record-justifications? () : BOOLEAN

Return TRUE if every query records justifications to enable the explanation of concluded results.

Function: register-computation-function ((name STRING) (code FUNCTION-CODE) (arity INTEGER)) :

Creates a registration entry for name as a computation which executes code. Essentially just builds the Stella meta-information tructure needed to funcall name as a computation function by the computation specialist. The function definition in code needs to accept ARITY Stella OBJECTs as arguments and return a Stella OBJECT suitable for PowerLoom use. (These are generally LOGIC-OBJECTs and the literal wrappers FLOAT-WRAPPER, INTEGER-WRAPPER and STRING-WRAPPER.)

Command: register-computation-function-name ((stella-name STRING) (native-name STRING) (arity INTEGER)) :

registers a computation function stella-name based on the native-name for the particular programming language in question. Use of this command makes the resulting code or knowledge bases non-portable to other target languages.

Function: register-logic-dialect-print-function ((dialect KEYWORD) (fn FUNCTION-CODE-WRAPPER)) :

Register fn as a logic-object print function for dialect. Each function should have the signature ((self OBJECT) (stream OUTPUT-STREAM)). Any return values will be ignored.

Function: register-specialist-function ((name STRING) (code FUNCTION-CODE)) :

Creates a registration entry for name as a specialist which executes code. Essentially just builds the Stella meta-information tructure needed to funcall name as a specialist. The function definition in code needs to accept a CONTROL-FRAME and KEYWORD as arguments and return a KEYWORD. Side effects on elements of the proposition in the control frame can be used to bind and thus return values.

Command: register-specialist-function-name ((stella-name STRING) (native-name STRING)) :

registers a specialist function stella-name based on the native-name for the particular programming language in question. Use of this command makes the resulting code or knowledge bases non-portable to other target languages.

Function: relation-name ((self NAMED-DESCRIPTION)) : STRING

Given a relation object, return it’s name.

Function: relation? ((objectRef OBJECT)) : BOOLEAN

Return TRUE if objectRef denotes a relation or a class.

Method on QUERY-SOLUTION-TABLE: remove-at (self (key (LIKE (ANY-KEY SELF)))) :

Remove the solution identified by key from self. To preserve the solution ordering chain, the solution is marked as deleted and will be completely removed upon the next iteration through self.

Method on PAGING-INDEX: remove-deleted-members (self) : (LIKE SELF)

Destructively remove all deleted members of self.

Function: reset-query-caches () :

Zero out all caches managed by the query optimizer, so that it will reoptimize subgoal queries upon next invocation.

Function: retract-facts-of-instance ((self LOGIC-OBJECT)) :

Retract all definite (TRUE or FALSE) propositions attached to self.

N-Command: retrieve-partial (&rest (tree PARSE-TREE)) : QUERY-ITERATOR

Partial-match version of retrieve (which see) that generates scored partial solutions based on the current partial match strategy. By supplying BEST instead of ALL, or by adding the option :SORT-BY :SCORE, the generated solutions will be sorted so that solutions with higher scores come first. Use the :MATCH-MODE option to override the global default setting established by set-partial-match-mode, e.g., use :MATCH-MODE :NN to use the neural net partial match mode. The :MINIMUM-SCORE option can be used to only retrieve solutions that have at least the specified minimum match score. By default, retrieve-partial does not maximize the match scores of its returned bindings. To only get maximal scores use :MAXIMIZE-SCORE? TRUE (this is not yet implemented - you can use ask-partial to maximize scores for individual solutions by hand).

N-Command: run-forward-rules ((moduleRef NAME) &rest (force KEYWORD)) :

Run forward inference rules in module moduleRef. If moduleRef is NULL, the current module will be used. If forward inferencing is already up-to-date in the designated module, no additional inferencing will occur, unless the optional keyword :force is included, in which case all forward rules are run or rerun.

Calling run-forward-rules temporarily puts the module into a mode where future assertional (monotonic) updates will trigger additional forward inference. Once a non-monotonic update is performed, i.e., a retraction or clipping of relation value, all cached forward inferences will be discarded and forward inferencing will be disabled until this function is called again.

Command: run-powerloom-tests () :

Run the PowerLoom test suite. Currently this simply runs all demos and echos commands and their results to standard output. The output can then be diffed with previously validated runs to find deviations.

Function: satisfies? ((instanceOrTuple OBJECT) (relationRef OBJECT)) : TRUTH-VALUE

Try to prove whether instanceOrTuple satisfies the definition of the relation relationRef and return the result truth value of the query. instanceOrTuple can be a single object, the name or surrogate of an object, or a collection (a list or vector) of objects. relationRef can be a relation, description, surrogate or relation name.

Command: save-all-neural-networks ((file STRING)) :

Save all neural networks to file (if file is non-NULL). If networks are saved periodically (see set-save-network-cycle) this file name will be used to perform periodic saves.

Function: select-proof-result ((success? BOOLEAN) (continuing? BOOLEAN) (terminal? BOOLEAN)) : KEYWORD

Helping function for specialists. Return the appropriate keyword indicating success or failure of a proof.

Function: select-test-result ((success? BOOLEAN) (terminal? BOOLEAN) (frame CONTROL-FRAME)) : KEYWORD

Helping function for specialists testing the validity of a fully bound inference frame. Based on the test result success? and reversePolarity?*, set the truth value of frame and return an appropriate keyword. The keyword will be either :final-success :terminal-failure if terminal? is true. Otherwise it will be :final-success or :failure.

Command: set-error-print-cycle ((i INTEGER)) :

Set number of cycles between which error rates are saved to the file established by the last call to save-all-neural-networks appended with extension .err. A number <= 0 (or NULL) turns off periodic saving.

N-Command: set-inference-level ((level NAME) (module NAME)) : KEYWORD

Set the inference level of module to the level specified by levelKeyword. If module is NULL, set the level globally.

Method on MARKER-TABLE: set-marker (self (object OBJECT)) :

Record membership of object in the marker storage object self.

Command: set-num-neighbors ((d INTEGER)) :

Sets the number of nearest neighbors to predict from.

Command: set-num-training-per-case ((d INTEGER)) :

Sets the number of training examples for each case in the training set.

Function: set-powerloom-feature ((feature KEYWORD)) :

Enable the PowerLoom environment feature feature.

Command: set-save-network-cycle ((i INTEGER)) :

Set number of cycles between which networks are saved to the file established by the last call to save-all-neural-networks. A number <= 0 or a NULL number turns off periodic saving.

Method on QUERY-SOLUTION-TABLE: sort (self (predicate FUNCTION-CODE)) : (LIKE SELF)

Perform a stable, destructive sort of self according to predicate, and return the result. If predicate has a < semantics, the result will be in ascending order.

Function: specializes? ((subObject OBJECT) (superObject OBJECT)) : TRUTH-VALUE

Try to prove if the description associated with subObject specializes the description for superObject and return the result truth value of the query.

Command: start-ontosaurus (&rest (options OBJECT)) :

Start the PowerLoom HTTP server at :port (defaults to 9090). Loads the required support systems in Lisp and Java if necessary (C++ is not yet supported).

Command: start-powerloom-gui (&rest (options OBJECT)) :

Start the PowerLoom server at :port (defaults to 9090) and launches the GUI which will communicate with the server at that port. If :host is specified, the GUI will try to communicate with a server at host:port instead of the local embedded server (note, you can always point the GUI manually to a different server from its Connect to Server menu item). Loads the required support systems if necessary. Embedded calls to the GUI are currently only supported in Java; however, when the GUI is run in standalone mode, it can communicate with any PowerLoom installation that supports an HTTP server (currently Lisp and Java).

Command: start-powerloom-server (&rest (options OBJECT)) :

Start the PowerLoom HTTP server at :port (defaults to 9090). Loads the required support systems in Lisp and Java if necessary (C++ is not yet supported).

Command: stop-ontosaurus () :

Stop the PowerLoom HTTP server and free up any bound ports. This is a no-op if no server is running or the server is not supported.

Command: stop-powerloom-gui () :

Closes the PowerLoom GUI application if it is currently visible. This is a no-op if the GUI is not running or if it is not supported.

Command: stop-powerloom-server () :

Stop the PowerLoom HTTP server and free up any bound ports. This is a no-op if no server is running or the server is not supported.

Function: strengthen-truth-value ((tv1 TRUTH-VALUE) (tv2 TRUTH-VALUE)) : TRUTH-VALUE

If tv2 has greater strength than tv1, adapt the strength of tv1 (not its value!) and return the result. Otherwise, return tv1 unmodified.

Function: strict-truth-value? ((self TRUTH-VALUE)) : BOOLEAN

Return TRUE if self is a strict truth value.

Function: termify ((self OBJECT)) : OBJECT

Convert self into an equivalent PowerLoom object that can be passed as an argument wherever an instance is expected.

Function: test-closed-slot? ((relation SURROGATE)) : BOOLEAN

Return TRUE if relation (a surrogate) is asserted to be closed or if the current module closes all relations.

Function: test-function-slot? ((relation SURROGATE)) : BOOLEAN

Return TRUE if relation (a surrogate) is a function.

Method on MARKER-TABLE: test-marker? (self (object OBJECT)) : BOOLEAN

Return TRUE if object is stored (marked) in self.

Function: test-relation-on-arguments? ((relation SURROGATE) (arguments CONS)) : BOOLEAN

Return TRUE if relation (a surrogate) is TRUE when applied to arguments.

Function: test-slot-value? ((self LOGIC-OBJECT) (relation SURROGATE) (filler OBJECT)) : BOOLEAN

Return TRUE if the proposition (<relation> <self> <filler>) is true.

Function: test-special-marker-table? ((self OBJECT)) : BOOLEAN

Return TRUE if the object self is stored (marked) in the table pointed at by the special variable *specialMarkerTable*. Designed for use by remove-if.

Function: test-subrelation? ((subrelation SURROGATE) (superrelation SURROGATE)) : BOOLEAN

Return TRUE if subrelation specializes superrelation.

Function: test-type-on-instance? ((self OBJECT) (type SURROGATE)) : BOOLEAN

Return TRUE if self satisfies type.

Command: translate-loom-file ((input FILE-NAME) (output FILE-NAME)) :

Translate the Loom file input to PowerLoom and write the translation to the file output. Note that this will only work for fairly vanilla Loom files that do not contain any Lisp-isms. It might require to clean the Loom file manually before this translation will work.

Function: true-truth-value? ((self TRUTH-VALUE)) : BOOLEAN

Return TRUE if self represents some form of truth.

Function: true? ((self PROPOSITION)) : BOOLEAN

Return true if self is true (or default-true if we are considering default assertions).

N-Command: unassert ((proposition PARSE-TREE)) : OBJECT

Retract the truth, falsity or inconsistency of proposition. This is a more general version of retract that also handles falsity. For example, if we assert the proposition "(not (sad Fred))", and then execute the statement "(unassert (sad Fred))", the truth value of the proposition "(sad Fred)" will be set to UNKNOWN. If we had called retract in place of unassert, the proposition "(sad Fred)" would remain set to FALSE. Note that for this unassertion to succeed, the logic constant Fred and the relation sad must already be defined.

Function: unassert-proposition ((self PROPOSITION)) :

Retract the truth, falsity or inconsistency of the proposition self.

Function: unknown-truth-value? ((self TRUTH-VALUE)) : BOOLEAN

Return TRUE if self represents UNKNOWN.

Function: unknown? ((self PROPOSITION)) : BOOLEAN

Return true if the truth of self is unknown.

Function: unset-powerloom-feature ((feature KEYWORD)) :

Disable the PowerLoom environment feature feature.

Function: upclassify-all-descriptions () :

Classify all named descriptions.

Function: upclassify-all-instances () :

Classify all named instances.

Function: upclassify-instances ((module MODULE) (local? BOOLEAN)) :

Classify instances local to module and inherited by module. If local?, don’t classify inherited descriptions. If module is NULL, classify descriptions in all modules.

Function: upclassify-named-descriptions ((module MODULE) (local? BOOLEAN)) :

Classify named descriptions local to module and inherited by module. If local?, don’t classify inherited descriptions. If module is NULL, classify descriptions in all modules.

Method on OBJECT-STORE: update-proposition-in-store (store (proposition PROPOSITION) (update-mode KEYWORD)) :

A module with store has had the truth value of proposition change according to update-mode. The default method does nothing.

Function: update-tuple ((relation SURROGATE) (arguments (CONS OF OBJECT)) (updatemode KEYWORD)) : PROPOSITION

Assert or retract a proposition that applies relation to arguments.

Function: weaken-truth-value ((tv1 TRUTH-VALUE) (tv2 TRUTH-VALUE)) : TRUTH-VALUE

If tv2 has lesser strength than tv1, adapt the strength of tv1 (not its value!) and return the result. Otherwise, return tv1 unmodified.

Macro: with-logic-environment ((moduleForm OBJECT) (environment OBJECT) &body (body CONS)) : OBJECT

Execute body within the module resulting from moduleForm. *module* is an acceptable moduleForm. It will locally rebind *module* and *context* and shield the outer bindings from changes.

Macro: within-classification-session ((descriptionorinstance KEYWORD) &body (body CONS)) : OBJECT

Used during classification. Execute body within the indicated classification session and inference world.

Macro: within-meta-cache (&body (body CONS)) : OBJECT

Execute body within the meta cache of the current module. Set appropriate special variables.

Function: create-keyword ((name STRING)) : KEYWORD

Returns the Stella keyword name, creating it if necessary. name is treated case-sensitively. This should generally not be necessary to do.

Function: create-symbol ((name STRING) (module MODULE) (environment ENVIRONMENT)) : SYMBOL

Returns the Stella symbol name visible in module, creating it if necessary. name is ALWAYS treated case-sensitively, even if module is case insensitive. This should generally not be necessary to do.

Function: get-keyword ((name STRING)) : KEYWORD

Returns the Stella KEYWORD name if it exists. Case sensitive.

Function: get-name-in-module ((obj OBJECT) (module MODULE) (environment ENVIRONMENT)) : STRING

Return the name, qualified as necessary, so that obj can be found from module. If there is no name for the object return null.

Function: get-short-name ((obj OBJECT)) : STRING

Return the short name of obj, if it has one. Otherwise return null.

Function: get-symbol ((name STRING) (module MODULE) (environment ENVIRONMENT)) : SYMBOL

Returns the Stella SYMBOL name visible in module if it exists. name is ALWAYS treated case sensitively.

Function: is-known ((tv TRUTH-VALUE)) : BOOLEAN

Tests whether tv is a known truth value (i.e., true or false).

Function: is-true-proposition1 ((relation-and-arguments OBJECT) (module MODULE) (environment ENVIRONMENT)) : BOOLEAN

Return TRUE if a proposition (relation args) has been asserted (or inferred by forward chaining).

Function: load-in-module ((filename STRING) (module MODULE) (environment ENVIRONMENT)) :

Read logic commands from the file named filename and evaluate them. If the file does not have an in-module declaration that specifies the module within which all remaining commands are to be evaluated, it will be loaded in the module specified. If no module is specified and the file does not contain an in-module declaration, an error will be signaled. The remaining commands are evaluated one-by-one, applying the function evaluate to each of them.

Function: load-native-stream-in-module ((stream NATIVE-INPUT-STREAM) (module MODULE) (environment ENVIRONMENT)) :

Read logic commands from the native input stream stream and evaluate them. Assumes stream is a line-buffered stream which is a safe compromise but does not generate the best efficiency for block-buffered streams such as files. If the stream does not supply an in-module declaration that specifies the module within which all remaining commands are to be evaluated, it will be loaded in the module specified. If no module is specified and the file does not supply an in-module declaration, an error will be signaled. The remaining commands are evaluated one-by-one, applying the function evaluate to each of them.

Function: load-stream-in-module ((stream INPUT-STREAM) (module MODULE) (environment ENVIRONMENT)) :

Read logic commands from the STELLA stream stream and evaluate them. If the stream does not supply an in-module declaration that specifies the module within which all remaining commands are to be evaluated, it will be loaded in the module specified. If no module is specified and the file does not supply an in-module declaration, an error will be signaled. The remaining commands are evaluated one-by-one, applying the function evaluate to each of them.

Function: main () :

Main PowerLoom entry point for your code in C++ and Java.

Function: register-computation-function ((name STRING) (function-reference FUNCTION-CODE) (arity INTEGER) (module MODULE) (environment ENVIRONMENT)) :

Register name as a function name in module which will invoke the native code procedure described by function-reference. The name is a fully-qualified name which will be interpreted by the normal rules for reading names in PowerLoom. The function must conform to the signature for computation functions used by the computation specialist. Arity specifies the number of arguments the computation accepts.

The exact form of function-reference depends on the underlying programming language. The following type mappings are used: C++: cpp_function_code (a pointer to the function code) Common Lisp: FUNCTION (result of #’ or (FUNCTION ...)) Java: java.lang.reflect.Method

Function: register-specialist-function ((name STRING) (function-reference FUNCTION-CODE) (module MODULE) (environment ENVIRONMENT)) :

Register name as a function name in module which will invoke the native code procedure described by function-reference. The name is a fully-qualified name which will be interpreted by the normal rules for reading names in PowerLoom. The function must conform to the signature for specialist functions.

The exact form of function-reference depends on the underlying programming language. The following type mappings are used: C++: Common Lisp: FUNCTION (result of #’ or (FUNCTION ...)) Java: java.lang.reflect.Method

Function: s-register-computation-function ((name STRING) (native-name STRING) (arity INTEGER) (module-name STRING) (environment ENVIRONMENT)) :

Register name as a function name in the module named module-name. This function will the native code named native-name. The name is a fully-qualified name which will be interpreted by the normal rules for reading names in PowerLoom. The native-name will be processed in a manner that depends on the underlying programming language. The following type mappings are used: C++: Not available. Error signaled. Common Lisp: The native-name is read by READ-FROM-STRING and then the SYMBOL-FUNCTION is taken. Java: A fully package-qualified name is required. It is looked up using the Reflection tools. The function found must conform to the signature for computation functions. Arity specifies the number of arguments the computation accepts.

Function: s-register-specialist-function ((name STRING) (native-name STRING) (module-name STRING) (environment ENVIRONMENT)) :

Register name as a function name in the module named module-name. This function will the native code named native-name. The name is a fully-qualified name which will be interpreted by the normal rules for reading names in PowerLoom. The native-name will be processed in a manner that depends on the underlying programming language. The following type mappings are used: C++: Not available. Error signaled. Common Lisp: The native-name is read by READ-FROM-STRING and then the SYMBOL-FUNCTION is taken. Java: A fully package-qualified name is required. It is looked up using the Reflection tools. The function found must conform to the signature for specialist functions.

Function: test-environment-level? ((env ENVIRONMENT) (level STRING)) : BOOLEAN

Test if env has level set to level

Method on PL-ITERATOR: consify (self) : CONS

Convert self into a Stella CONS.

Method on PL-ITERATOR: listify (self) : LIST

Convert self into a Stella LIST.

Command: initialize-kernel-kb () :

Bootstrap the PowerLoom built-in kernel KB.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Hans Chalupsky on October 16, 2010 using texi2html 1.82.