[ < ] [ > ]   [ << ] [ 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-collection-members ((self OBJECT) (direct? BOOLEAN)) : ASSERTED-COLLECTION-MEMBERS-ITERATOR

Return an iterator generating all asserted members of the collection self. If direct? is true, do not consider sub-collections. This is an iterator reimplementation of asserted-collection-members (which see).

Function: all-asserted-member-of-collection-supports ((member OBJECT) (collection OBJECT)) : ASSERTED-MEMBER-OF-COLLECTION-SUPPORTS-ITERATOR

Allocate an iterator that generates all propositions that support that member is in collection. Finding one such support is enough for the original member-of-collection? semantics (which see), however, we generalized it to allow us to handle all-proofs situations where we want to find all supports. This function generates the iterator which in each iteration produces the same member value but a potentially different supporting proposition and truth value. We set it up this way to be in mostly equivalent to asserted-collection-members.

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-locally-modified-propositions ((module MODULE)) : (ITERATOR OF PROPOSITION)

Iterate over all conceived propositions visible from module that had their truth value locally modified (initialized, asserted, retracted). Note, that this will always include all locally conceived propositions.

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.

Method on NEURAL-NETWORK: allocate-network-arrays (self (num-in INTEGER) (num-hidden INTEGER) (num-out INTEGER)) :

Allocates array space for a neural network with given number of input, hidden and output units.

Method on PROPOSITION-NEURAL-NETWORK: allocate-network-arrays (self (num-in INTEGER) (num-hidden INTEGER) (num-out INTEGER)) :

Allocates array space for a neural network with given number of input, hidden and output units.

Method on CHAMELEON-NEURAL-NETWORK: allocate-network-arrays (self (num-in INTEGER) (num-hidden INTEGER) (num-out INTEGER)) :

Allocates array space for a neural network with given number of input, hidden and output units.

Method on TENSORFLOW-NEURAL-NETWORK: allocate-network-arrays (self (num-in INTEGER) (num-hidden INTEGER) (num-out INTEGER)) :

Allocates array space for a neural network with given number of input, hidden and output units.

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)

Function: arguments-unify-with-arguments? ((subProposition PROPOSITION) (referenceProposition PROPOSITION)) : BOOLEAN

Return TRUE if the arguments in proposition subProposition unify with those in referenceProposition. If one of the propositions is a HOLDS, the other one has to be also for unification to succeed.

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: asserted-collection-members ((self OBJECT) (direct? BOOLEAN)) : LIST

List version of all-asserted-collection-members for backwards compatibility. This is called lots of places, including MEMBER-OF-specialist. If self is a native collection, a skolem collection, or a named description, return a list of asserted members of self, otherwise, return NULL. If direct?, don’t look down isa hierarchies.

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

Return true if self has been asserted to be false.

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

Return true if self has been asserted to be true.

Function: backward-propagate-cached-network-multi-proof ((proof JUSTIFICATION) (error FLOAT)) :

Recurse through :multiple-proofs antecedents guided by the current rule combination scheme.

Function: backward-propagate-cached-network-proof ((proof JUSTIFICATION) (error FLOAT)) :

Propagate the error between proofs conclusion and the desired target value through proofs network and its antecedents, and adjust weights to decrease the error. Multiple iterations through forward/backward-propagate-cached-network-proof with updated top-level errors will train the involved networks to minimize the error as much as possible.

Method on NEURAL-NETWORK: backward-propagate-error (self (error FLOAT)) :

Given a properly forward activated network self for the current set of inputs, and a training error between the current output and the goal value, backpropagate the error and update selfs vector of input errors. Reads output, hidden activations and weights and updates hidden errors and input errors.

Method on PROPOSITION-NEURAL-NETWORK: backward-propagate-error (self (error FLOAT)) :

Given a properly forward activated network self for the current set of inputs, and a training error between the current output and the goal value, backpropagate the error and update selfs vector of input errors. Reads output, hidden activations and weights and updates hidden errors and input errors.

Method on CHAMELEON-NEURAL-NETWORK: backward-propagate-error (self (error FLOAT)) :

Given a properly forward activated network self for the current set of inputs, and a training error between the current output and the goal value, backpropagate the error and update selfs vector of input errors. Reads output, hidden activations and weights and updates hidden errors and input errors.

Method on TENSORFLOW-NEURAL-NETWORK: backward-propagate-error (self (error FLOAT)) :

Given a properly forward activated network self for the current set of inputs, and a training error between the current output and the goal value, backpropagate the error and update selfs vector of input errors. Reads output, hidden activations and weights and updates hidden errors and input errors.

Method on NEURAL-NETWORK: batch-backward-propagate-error (self) :

Run backward propagation on the current input and target batch and store back-propagated errors in the input error batch.

Method on NEURAL-NETWORK: batch-forward-propagate-inputs (self) : FLOAT-ARRAY

Run forward propagation on the current input batch and store outputs in the output batch.

Method on NEURAL-NETWORK: batch-is-full? (self) : BOOLEAN

Return true if input batch arrays have been filled to capacity.

Method on NETWORK-PROOF-FORWARD-QUEUE: batch-process-cached-network-proof (queue (proof JUSTIFICATION)) :

Compute the same partial match score as the call to compute-partial-truth that generated proof (which is assumed to have been compacted with a call to compact-partial-proof-to-network-proof. The score will only be identical of course, if the various networks and their weights have not yet been updated during learning.

Method on NETWORK-PROOF-BACKWARD-QUEUE: batch-process-cached-network-proof (queue (proof JUSTIFICATION)) :

Queue and process operations for update-network-weights for proof.

Method on NETWORK-PROOF-UPDATE-QUEUE: batch-process-cached-network-proof (queue (proof JUSTIFICATION)) :

Queue and process operations for update-network-weights for proof.

Method on NEURAL-NETWORK: batch-update-network-weights (self) :

Run weight updates for the current input and target batches.

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

Return TRUE if self is the undefined individual BOTTOM.

Method on NEURAL-NETWORK: build-proposition-network (self (prop PROPOSITION)) :

Build a neural network for the proposition prop and link them. This builds a two-layer perceptron network whose input nodes are activated by the truth of props arguments and whose output node computes the truth of prop.

Method on PROPOSITION-NEURAL-NETWORK: build-proposition-network (self (prop PROPOSITION)) :

Build a neural network for the proposition prop. This builds a two-layer perceptron network whose input nodes are activated by the truth of props arguments and whose output node computes the truth of prop.

Method on CHAMELEON-NEURAL-NETWORK: build-proposition-network (self (prop PROPOSITION)) :

Build a neural network for the proposition prop. This builds a two-layer perceptron network whose input nodes are activated by the truth of props arguments and whose output node computes the truth of prop.

Method on TENSORFLOW-NEURAL-NETWORK: build-proposition-network (self (prop PROPOSITION)) :

Build a neural network for the proposition prop. This builds a two-layer perceptron network whose input nodes are activated by the truth of props arguments and whose output node computes the truth of prop.

Method on TENSORFLOW-BATCH-NEURAL-NETWORK: build-proposition-network (self (prop PROPOSITION)) :

Build a neural network for the proposition prop. This builds a two-layer perceptron network whose input nodes are activated by the truth of props arguments and whose output node computes the truth of prop.

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)) :

OBSOLETE: use call-run-forward-rules instead.

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 ((context CONTEXT) (local? BOOLEAN) (force? BOOLEAN)) :

Callable implementation for run-forward-rules (which see).

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: chameleon-ignored-value-relation? ((x OBJECT)) : BOOLEAN

Return TRUE if x is an explicitly marked as ignored or a vector relation that is not also marked as a truth value relation.

Function: chameleon-partial-match-mode? () : BOOLEAN

Return TRUE if a query is computing Chameleon partial matches.

Function: chameleon-primitive-value-relation? ((x OBJECT)) : BOOLEAN

Return TRUE if x is an explicitly marked primitive value relation.

Function: chameleon-truth-value-relation? ((x OBJECT)) : BOOLEAN

Return TRUE if x is an explicitly marked truth value relation or otherwise not known to be ignored.

Function: chameleon-vector-relation? ((x OBJECT)) : BOOLEAN

Return TRUE if x is an explicitly marked vector relation.

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

Return TRUE if objectRef denotes a class.

Method on NEURAL-NETWORK: clear-batch-arrays (self) :

Clear all currently batched inputs (with keys) and associated target values.

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.

Function: combine-multiple-match-scores ((scores (CONS OF FLOAT-WRAPPER))) : FLOAT

Combine partial match scores from alternative :multiple-proofs scores according to the current *rule-combination* strategy.

Function: compact-partial-proof-to-network-proof ((proof JUSTIFICATION)) : JUSTIFICATION

Convert proof into a compacted network tree form that only contains :AND, :OR, :MULTI and :PRIMITIVE nodes (some of which such as instance-of might contain further antecedents if they were computed by specialists, for example).

Function: conceive-inverted-proposition ((prop PROPOSITION)) : PROPOSITION

Return the simplest inversion of prop, trying to reuse existing negations or negated arguments of prop if possible.

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.

Function: consify-cached-query-solutions ((queryIterator QUERY-ITERATOR) (truthValues? BOOLEAN) (justifications? BOOLEAN)) : CONS CONS CONS

Collect queryIterators current solutions into a list of CONS tuples. Only collect output values that have been bound as a result of the query, that is exclude any bindings provided as initial values. If truthValues?, also return a list of truth values for each solution (NIL otherwise). If justifications? and justifications are currently being recorded, also return a list of justifications for each solution (NIL otherwise). Despite the name, this will also work for regular, non-cached queries.

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-proposition? ((self PROPOSITION)) : BOOLEAN

Return true if self is a constant such as TRUE or FALSE.

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.

Function: copy-float-values-to-buffer ((values OBJECT) (buffer (ARRAY () OF FLOAT)) (start INTEGER) (end INTEGER)) :

Copy the float values in sequence to buffer between start and end. Missing values will be set to 0.0, extra values will be ignored.

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.

Method on NEURAL-NETWORK: current-batch-size (self) : INTEGER

Return the number of currently batched inputs.

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.

Method on QUERY-ITERATOR: debug-id-setter (self (id STRING)) :

Set the debug ID of self to id. If id is NULL, simply use the current ID counter and increment it appropriately.

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.

Method on NEURAL-NETWORK: delete-neural-network (self) :

Unlink the network self from its associated proposition and mark it as deleted.

Method on PROPOSITION-NEURAL-NETWORK: delete-neural-network (self) :

Unlink the network self from its associated proposition and mark it as deleted.

Method on CHAMELEON-NEURAL-NETWORK: delete-neural-network (self) :

Unlink the network self from its associated proposition and mark it as deleted.

Method on TENSORFLOW-NEURAL-NETWORK: delete-neural-network (self) :

Unlink the network self from its associated proposition and mark it as deleted.

Command: delete-neural-networks () :

Eliminate all neural networks and remove any connections to propositions and training examples.

Method on NEURAL-NETWORK: deleted? (self) : BOOLEAN

Return trun if self has been deleted.

Method on PROPOSITION-NEURAL-NETWORK: deleted? (self) : BOOLEAN

Return trun if self has been deleted.

Method on CHAMELEON-NEURAL-NETWORK: deleted? (self) : BOOLEAN

Return trun if self has been deleted.

Method on TENSORFLOW-NEURAL-NETWORK: deleted? (self) : BOOLEAN

Return trun if self has been deleted.

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: description? ((self OBJECT)) : BOOLEAN

Return TRUE if self is a description.

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.

Command: ensure-chameleon-ontology () :

Ensure the chameleon.plm ontology file has been loaded (assumes it exists in the current load path).

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.

Method on NETWORK-PROOF-QUEUE: execute-all (queue) :

Execute queued ops in queue until there is nothing more to do.

Function: explain-proposition ((prop PROPOSITION) (style KEYWORD) (maxdepth INTEGER) (stream OUTPUT-STREAM)) :

Print an explanation for prop if there is one. This will only happen for forward-chained propositions.

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-duplicate-proposition (store (prop PROPOSITION)) : PROPOSITION

Fetch a duplicate of prop if defined by store. EXPERIMENTAL! The exact semantics of this still needs to be worked out. This needs to be appropriately specialized on actual OBJECT-STORE implementations.

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: forward-propagate-cached-network-from-justification ((just JUSTIFICATION)) : FLOAT

Locally forward-propagate the network associated with just based on previously cached positive-scores of antecedents.

Function: forward-propagate-cached-network-proof ((proof JUSTIFICATION)) : FLOAT

Compute the same partial match score as the call to compute-partial-truth that generated proof (which is assumed to have been compacted with a call to compact-partial-proof-to-network-proof. The score will only be identical of course, if the various networks and their weights have not yet been updated during learning.

Method on NEURAL-NETWORK: forward-propagate-inputs (self) : FLOAT

Activates the current inputs of the network self to compute its output. Sets selfs output slot and returns the computed value. Reads input activations and weights and updates hidden and output activations.

Method on PROPOSITION-NEURAL-NETWORK: forward-propagate-inputs (self) : FLOAT

Activates the current inputs of the network self to compute its output. Sets selfs output slot and returns the computed value. Reads input activations and weights and updates hidden and output activations.

Method on CHAMELEON-NEURAL-NETWORK: forward-propagate-inputs (self) : FLOAT

Activates the current inputs of the network self to compute its output. Sets selfs output slot and returns the computed value. Reads input activations and weights and updates hidden and output activations.

Method on TENSORFLOW-NEURAL-NETWORK: forward-propagate-inputs (self) : FLOAT

Activates the current inputs of the network self to compute its output. Sets selfs output slot and returns the computed value. Reads input activations and weights and updates hidden and output activations.

Method on TENSORFLOW-BATCH-NEURAL-NETWORK: forward-propagate-inputs (self) : FLOAT

Activates the current inputs of the network self to compute its output. Sets selfs output slot and returns the computed value. Reads input activations and weights and updates hidden and output activations.

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

Return TRUE if relationRef references a function.

Function: generate-expression ((self 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-cached-network-proof ((example TRAINING-EXAMPLE)) : JUSTIFICATION

Variant of create-cached-network that takes a training example, runs its cons query, and stores a compacted version of the associated proof tree as the examples cached solution which will also be returned. If a cached and up-to-date solution already exists, it will be returned instead.

Function: get-chameleon-module () : MODULE

Return the namespace module for Chameleon relations

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 FORWARD-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-justification-neural-network ((just JUSTIFICATION)) : NEURAL-NETWORK

Return the neural network associated with an :AND or :OR justification. Raise an error if the associated proposition is not linked to a neural network.

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

Return a module named moduleRef.

Method on NEURAL-NETWORK: get-neural-network-proposition (self) : PROPOSITION

Return the proposition linked to self.

Method on PROPOSITION-NEURAL-NETWORK: get-neural-network-proposition (self) : PROPOSITION

Return the proposition linked to self.

Method on CHAMELEON-NEURAL-NETWORK: get-neural-network-proposition (self) : PROPOSITION

Return the proposition linked to self.

Method on TENSORFLOW-NEURAL-NETWORK: get-neural-network-proposition (self) : PROPOSITION

Return the proposition linked to self.

Function: get-one-supported-forward-justification ((proposition PROPOSITION)) : FORWARD-JUSTIFICATION

Return one of propositions forward justifications supported in the current context.

Function: get-proposition-neural-network ((prop PROPOSITION) (error? BOOLEAN)) : NEURAL-NETWORK

Return the neural network associated with prop. If error?, raise an exception if it cannot be found, otherwise, simply return NULL.

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-supported-forward-justifications ((proposition PROPOSITION)) : (LIST OF FORWARD-JUSTIFICATION)

Return all of propositions forward justifications supported in the current context.

Function: get-tensorflow-callback ((name SYMBOL)) : FUNCTION-CODE

Access the TensorFlow callback code registered under name.

Method on NEURAL-NETWORK: get-vector-argument-spec (self (arg OBJECT)) : OBJECT

Generate a single argument spec for arg that can be used for set-vector-input-values. arg can either be a proposition or justification.

Method on VECTOR-NEURAL-NETWORK: get-vector-argument-spec (self (arg OBJECT)) : OBJECT

Generate a single argument spec for arg that can be used for set-vector-input-values. arg can either be a proposition or justification.

Method on TENSORFLOW-NEURAL-NETWORK: get-vector-argument-spec (self (arg OBJECT)) : OBJECT

Generate a single argument spec for arg that can be used for set-vector-input-values. arg can either be a proposition or justification.

Method on TENSORFLOW-BATCH-NEURAL-NETWORK: get-vector-argument-spec (self (arg OBJECT)) : OBJECT

Generate a single argument spec for arg that can be used for set-vector-input-values. arg can either be a proposition or justification.

Function: get-visible-clash-exceptions ((incoherentProp PROPOSITION)) : (CONS OF EXCEPTION-RECORD)

Return the set of clash exceptions for incoherentProp that are visible from the current context. These are recorded most-recent first in order of occurrance.

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 viable forward justifications.

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

Return TRUE if proposition has any forward justifications supported by the current context.

Method on NEURAL-NETWORK: has-vector-arguments? (self) : BOOLEAN

Return TRUE if self has at least one vector input argument.

Method on VECTOR-NEURAL-NETWORK: has-vector-arguments? (self) : BOOLEAN

Return TRUE if self has at least one vector input argument.

Function: have-active-object-stores? () : BOOLEAN

Return TRUE if we have at least one object store opened/linked into PowerLoom, which changes some index access routines to be considerate of that.

Function: help-compute-argument-index ((self NEURAL-NETWORK) (arg PROPOSITION) (kind KEYWORD)) : INTEGER

Memoizable helper function for truth-value-argument-index and friends.

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

Method on NEURAL-NETWORK: ignored-value-argument? (self (arg PROPOSITION)) : BOOLEAN

Return TRUE if the partial truth value of arg will be ignored for selfs inputs. This top-level method only looks at arg and ignores self.

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 TENSORFLOW-NEURAL-NETWORK: initialize-network-weights (self) :

Initialize the weights of the neural network self - eiher randomly or from a saved state.

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: just-in-time-inference-cache? ((self CONTEXT)) : BOOLEAN

Return true if self is the JIT cache of some world state.

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.

Method on NEURAL-NETWORK: link-neural-network (self (prop PROPOSITION)) :

Link the network self to its associated proposition prop.

Method on PROPOSITION-NEURAL-NETWORK: link-neural-network (self (prop PROPOSITION)) :

Link the network self to its associated proposition prop.

Method on CHAMELEON-NEURAL-NETWORK: link-neural-network (self (prop PROPOSITION)) :

Link the network self to its associated proposition prop.

Method on TENSORFLOW-NEURAL-NETWORK: link-neural-network (self (prop PROPOSITION)) :

Link the network self to its associated proposition prop.

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.

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.

Function: load-command-eval-phase ((tree OBJECT)) : KEYWORD

Analyze a command tree in a load file and determine when it should be processed.

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

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

Function: load-stream ((stream INPUT-STREAM) &rest (options OBJECT)) :

Read logic commands from stream and evaluate them. Does the actual work for load (which see for a description of options).

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

Read logic commands from stream and evaluate them in module. This is a backwards-compatibility wrapper. Note that module will not override any in-module declarations in stream.

Function: locally-modified-proposition? ((proposition PROPOSITION) (module MODULE)) : BOOLEAN

Return true if proposition’s truth-value has been locally modified in module (initialized, asserted, retracted). This will always succeed for locally conceived propositions regardless of whether their truth value is defined or not.

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: lookup-proposition-neural-network ((prop PROPOSITION)) : NEURAL-NETWORK

Lookup the neural network for prop in the global networks list.

Function: make-cached-query ((variables CONS) (query OBJECT) (inputBindings CONS) (options OBJECT) (cacheid SYMBOL)) : QUERY-ITERATOR

Find or create a cached query and reinitialize as necessary. variables are the list of IO variables, some of which will be bound by inputBindings. variables can be NULL in case a query iterator was passed in for query. query must be a query body cons tree, a query iterator found by find-cached-query, or NULL. Called by apply-cached-retrieve and apply-cached-ask.

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

Merge two truth values that are describing the "same" logical proposition. This handles subordination of default to strict values, known over unknown and potential inconsistent values.

In particular, this can be used to check for negated values by asking for the truth of a proposition and its negation, inverting the negation and then using merge to come up with an answer.

Function: meta-inference-cache? ((self CONTEXT)) : BOOLEAN

Return true if self is the meta-JIT cache of some world state.

Function: meta-proposition? ((proposition PROPOSITION)) : BOOLEAN

Return TRUE if proposition is tied only to at least one meta object and no other objects except literals or function terms that are itself meta objects.

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.

Function: normalize-chameleon-training-options ((options OBJECT)) : PROPERTY-LIST

Normalize and provide defaults for options supplied to train-chameleon-neural-networks.

Method on NETWORK-PROOF-QUEUE: notify-of-completion (queue (proof JUSTIFICATION) (prerequisite JUSTIFICATION)) :

Notify proof that one of its prerequisites had its computation completed.

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.

Method on NEURAL-NETWORK: nth-batch-key (self (n INTEGER)) : OBJECT

Return the key associated with the n-th set of inputs in the input batch.

Method on NEURAL-NETWORK: nth-batch-output (self (n INTEGER)) : FLOAT

Return the output value for the n-th set of inputs in the input batch.

Method on NEURAL-NETWORK: nth-input (self (n INTEGER)) : FLOAT

Return the 0-based n-th proposition input of self (ignores bias unit).

Method on PROPOSITION-NEURAL-NETWORK: nth-input (self (n INTEGER)) : FLOAT

Return the 0-based n-th proposition input of self (ignores bias unit).

Method on CHAMELEON-NEURAL-NETWORK: nth-input (self (n INTEGER)) : FLOAT

Return the 0-based n-th proposition input of self (ignores bias unit).

Method on TENSORFLOW-NEURAL-NETWORK: nth-input (self (n INTEGER)) : FLOAT

Return the 0-based n-th proposition input of self (ignores bias unit).

Method on TENSORFLOW-BATCH-NEURAL-NETWORK: nth-input (self (n INTEGER)) : FLOAT

Return the 0-based n-th proposition input of self (ignores bias unit).

Method on NEURAL-NETWORK: nth-input-error (self (n INTEGER)) : FLOAT

Return the 0-based n-th proposition input error of self (ignores bias unit).

Method on PROPOSITION-NEURAL-NETWORK: nth-input-error (self (n INTEGER)) : FLOAT

Return the 0-based n-th proposition input error of self (ignores bias unit).

Method on CHAMELEON-NEURAL-NETWORK: nth-input-error (self (n INTEGER)) : FLOAT

Return the 0-based n-th proposition input error of self (ignores bias unit).

Method on TENSORFLOW-NEURAL-NETWORK: nth-input-error (self (n INTEGER)) : FLOAT

Return the 0-based n-th proposition input error of self (ignores bias unit).

Method on TENSORFLOW-BATCH-NEURAL-NETWORK: nth-input-error (self (n INTEGER)) : FLOAT

Return the 0-based n-th proposition input error of self (ignores bias unit).

Method on NEURAL-NETWORK: nth-kth-batch-input-error (self (n INTEGER) (k INTEGER)) : FLOAT

Return error of the k-th input in the n-th set of inputs in the input batch. k ignores the bias unit.

Method on NEURAL-NETWORK: number-of-ignored-value-arguments (self (prop PROPOSITION)) : INTEGER

Return the number of arguments of prop whose partial truth value will be ignored for selfs inputs. This top-level method only looks at prop and ignores self.

Method on NEURAL-NETWORK: number-of-inputs (self) : INTEGER

Return the number of input values expected by self (ignores bias unit).

Method on PROPOSITION-NEURAL-NETWORK: number-of-inputs (self) : INTEGER

Return the number of input values expected by self (ignores bias unit).

Method on CHAMELEON-NEURAL-NETWORK: number-of-inputs (self) : INTEGER

Return the number of input values expected by self (ignores bias unit).

Method on TENSORFLOW-NEURAL-NETWORK: number-of-inputs (self) : INTEGER

Return the number of input values expected by self (ignores bias unit).

Method on TENSORFLOW-BATCH-NEURAL-NETWORK: number-of-inputs (self) : INTEGER

Return the number of input values expected by self (ignores bias unit).

Method on NEURAL-NETWORK: number-of-truth-value-arguments (self (prop PROPOSITION)) : INTEGER

Return the number of arguments of prop whose partial truth value will be considered for selfs inputs. This top-level method only looks at prop and ignores self.

Method on VECTOR-NEURAL-NETWORK: number-of-vector-argument-inputs (self (prop PROPOSITION)) : INTEGER

Return the total number of input positions to store all elements of all vector arguments of prop. prop can be NULL in which case the linked proposition will be used.

Method on VECTOR-NEURAL-NETWORK: number-of-vector-argument-specs (self (prop PROPOSITION)) : INTEGER

Return the total number of argument specs generated by vector arguments of prop. This is only different than number-of-vector-arguments if at least one of props vector argument relations has arity > 1. prop can be NULL in which case the linked proposition will be used.

Method on NEURAL-NETWORK: number-of-vector-arguments (self (prop PROPOSITION)) : INTEGER

Return the number of arguments of prop that yield one or more vectors for selfs inputs. prop can be NULL in which case the linked proposition will be used.

Method on VECTOR-NEURAL-NETWORK: number-of-vector-arguments (self (prop PROPOSITION)) : INTEGER

Return the number of arguments of prop that yield one or more vectors for selfs inputs. prop can be NULL in which case the linked proposition will be used.

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.

Function: parse-logic-command-options ((options OBJECT) (legaloptions&types CONS) (coercionerror? BOOLEAN) (allowotherkeys? BOOLEAN)) : PROPERTY-LIST

This is simply a wrapper to parse-options (which see). We keep this alias in case we ever want to add any logic-specific extensions.

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 sorts and 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: proposition-has-strength? ((self PROPOSITION) (minimalStrength TRUTH-VALUE)) : BOOLEAN

Return true if the truth-value of self satisfies minimalStrength.

Method on NEURAL-NETWORK: push-input-values (self (key OBJECT) (values OBJECT)) :

Push input values onto the input batch array and associate them with key (which can be NULL). Associating a key lets us easily map inputs/outputs to some processing object of interest (e.g., a justification).

Method on NEURAL-NETWORK: push-target-value (self (value FLOAT)) :

Push a target value onto the target batch array which is assumed to correspond to the input values at the same respective position in the batch. Inputs and targets are associated by position in the batch, they can be pushed independently, as long as they are fully synchronized when processing of the batch starts.

Method on NEURAL-NETWORK: push-vector-input-values (self (vectorSpecs OBJECT)) :

Push vectorSpecs onto the vector argument batch array which is assumed to correspond to the input values at the same respective position in the batch. Truth-valued and vector-valued inputs are associated by position in the batch, they can be pushed independently, as long as they are fully synchronized when processing of the batch starts. If self has no vector-valued argument, the associated batch array can be left undefined.

Method on NETWORK-PROOF-QUEUE: queue-input-values (queue (net NEURAL-NETWORK) (proof JUSTIFICATION) (inputs OBJECT) (vectorspecs OBJECT)) :

Queue inputs in nets input batch. Execute the current batch if we are full.

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

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

Method on NEURAL-NETWORK: randomize-network-weights (self) :

Randomize the weights of the neural network self.

Method on PROPOSITION-NEURAL-NETWORK: randomize-network-weights (self) :

Randomize the weights of the neural network self.

Method on CHAMELEON-NEURAL-NETWORK: randomize-network-weights (self) :

Randomize the weights of the neural network self.

Method on TENSORFLOW-NEURAL-NETWORK: randomize-network-weights (self) :

Randomize the weights of the neural network self.

Command: randomize-neural-networks () :

Undo all training and randomize weights in all neural networks.

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-neural-network ((self NEURAL-NETWORK)) :

Register the network self on the global networks list (assumes self has been linked).

Function: register-object-store ((store OBJECT-STORE)) :

Register store as an active object store.

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: register-tensorflow-callback ((name STRING) (code FUNCTION-CODE)) :

Special-purpose callback support that registers code under the logic symbol with name, which by convention we make the qualified method name of the method we are using this for. This is a special-purpose hack which eventually we might want to generalize so others can use it too.

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-clash-exceptions () :

Resets the collection of clash exceptions

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).

Command: retrieve-training-examples (&rest (options OBJECT)) : (LIST OF TRAINING-EXAMPLE)

Retrieve a subset of current training examples defined via cham/training-example.

N-Command: run-forward-rules (&rest (options OBJECT)) :

Run forward inference rules in the module defined by the :module option (which defaults to the current module). If forward inferencing is already up-to-date in the designated module, no additional inferencing will occur, unless the :force? option is specified as TRUE, in which case all forward rules are run or rerun (for backwards compatibility, this command also supports the old <module> :force arguments specified with a non-standard keyword notation). If :local? is TRUE (the default), only propositions asserted locally in the module will be posted for forward inference, otherwise, all true propositions visible in the module will be posted.

Calling run-forward-rules with :disable-jit? TRUE will disable future just-in-time forward inference which will preserve cached forward inference in case of monotonic assertions that do not clip (implicitly retract) any existing values. Subsequent calls can then trigger new inferences based on these updates only. If the JIT stays enabled, even monotonic updates will throw away the JIT cache. Also, once any retractions have been performed, all cached inferences will be thrown away and forward inference has to be rerun from scratch or just-in-time forward inference needs to be enabled 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: select-training-examples (&rest (options OBJECT)) : (VECTOR OF TRAINING-EXAMPLE)

Select a subset of currently defined training examples. Currently the selection is purely based on module and/or number. Results will be shuffled if :shuffle? is TRUE (default).

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 NEURAL-NETWORK: set-input-values (self (values OBJECT)) :

Set the current truth-value inputs of the network self to float values in sequence. Missing inputs will be set to 0.0, extra values will be ignored.

Method on PROPOSITION-NEURAL-NETWORK: set-input-values (self (values OBJECT)) :

Set the current truth-value inputs of the network self to float values in sequence. Missing inputs will be set to 0.0, extra values will be ignored.

Method on CHAMELEON-NEURAL-NETWORK: set-input-values (self (values OBJECT)) :

Set the current truth-value inputs of the network self to float values in sequence. Missing inputs will be set to 0.0, extra values will be ignored.

Method on TENSORFLOW-NEURAL-NETWORK: set-input-values (self (values OBJECT)) :

Set the current truth-value inputs of the network self to float values in sequence. Missing inputs will be set to 0.0, extra values will be ignored.

Method on TENSORFLOW-BATCH-NEURAL-NETWORK: set-input-values (self (values OBJECT)) :

Set the current truth-value inputs of the network self to float values in sequence. Missing inputs will be set to 0.0, extra values will be ignored.

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 NEURAL-NETWORK: set-vector-input-values (self (vectorSpecs OBJECT)) :

Set the current vector inputs of the network self to the vectors described by vectorSpecs. Each vector spec describes a vector-generating proposition that produces one or more vectors. How those specs are translated into actual numeric vectors such as embeddings is specific to the particular neural network type.

Method on CHAMELEON-NEURAL-NETWORK: set-vector-input-values (self (vectorSpecs OBJECT)) :

Set the current vector inputs of the network self to the vectors described by vectorSpecs. Each vector spec describes a vector-generating proposition that produces one or more vectors. How those specs are translated into actual numeric vectors such as embeddings is specific to the particular neural network type.

Method on VECTOR-NEURAL-NETWORK: set-vector-input-values (self (vectorSpecs OBJECT)) :

Set the current vector inputs of the network self to the vectors described by vectorSpecs. Each vector spec describes a vector-generating proposition that produces one or more vectors. How those specs are translated into actual numeric vectors such as embeddings is specific to the particular neural network type.

Method on TENSORFLOW-NEURAL-NETWORK: set-vector-input-values (self (vectorSpecs OBJECT)) :

Set the current vector inputs of the network self to the vectors described by vectorSpecs. Each vector spec describes a vector-generating proposition that produces one or more vectors. How those specs are translated into actual numeric vectors such as embeddings is specific to the particular neural network type.

Method on TENSORFLOW-BATCH-NEURAL-NETWORK: set-vector-input-values (self (vectorSpecs OBJECT)) :

Set the current vector inputs of the network self to the vectors described by vectorSpecs. Each vector spec describes a vector-generating proposition that produces one or more vectors. How those specs are translated into actual numeric vectors such as embeddings is specific to the particular neural network type.

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

Similar to copy but does not copy antecedent justifications.

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: stronger-truth-value? ((tv1 TRUTH-VALUE) (tv2 TRUTH-VALUE)) : BOOLEAN

Compare the two truth values and return true if tv1 is strictly stronger than tv2. Stronger uses the following partial order: INCONSISTENT > STRICT > DEFAULT > UNKNOWN. Truth values at the same level are equal in strength.

Function: tensorflow-backend-available? () : BOOLEAN

Return TRUE if TensorFlow callbacks have been properly registered.

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: train-chameleon-neural-networks (&rest (options OBJECT)) :

Train rule neural networks based on :n-train (or all) training examples looked up in :module/:local?. Train for :epochs (defaults to 20) or until :error-cutoff is reached. Print every :print-cycle epochs or not at all. If :shuffle? (the default) randomly shuffle the selected training examples before every epoch. If :batch?, use batch training mechanism (which will fail if the current network implementation does not support it).

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).

Method on NEURAL-NETWORK: truth-value-argument-index (self (arg PROPOSITION)) : INTEGER

Return the 0-based input position of truth value argument arg. Ignores bias unit which is a network-implementation-specific detail. Generates indices in the order expected by set-input-values. If arg is not a truth value argument, returns -1.

Method on NEURAL-NETWORK: truth-value-argument? (self (arg PROPOSITION)) : BOOLEAN

Return TRUE if the partial truth value of arg will be considered for selfs inputs. This top-level method only looks at arg and ignores self.

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.

Method on NEURAL-NETWORK: unlink-neural-network (self) :

Unlink the network self from its associated proposition.

Method on PROPOSITION-NEURAL-NETWORK: unlink-neural-network (self) :

Unlink the network self from its associated proposition.

Method on CHAMELEON-NEURAL-NETWORK: unlink-neural-network (self) :

Unlink the network self from its associated proposition.

Method on TENSORFLOW-NEURAL-NETWORK: unlink-neural-network (self) :

Unlink the network self from its associated proposition.

Function: unnamed-description? ((self OBJECT)) : BOOLEAN

Return TRUE if self is an unnamed description.

Function: unregister-neural-network ((self NEURAL-NETWORK)) :

Unregister the network self on the global networks list.

Function: unregister-object-store ((store OBJECT-STORE)) :

Remove store from the list of active object stores.

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 NEURAL-NETWORK: update-network-weights (self (error FLOAT)) :

Given a properly forward activated and backpropagated network self for the current inputs and training error, update the network’s weights according to current gradients, learning rate and momentum terms to reduce the error for the given inputs. Reads output, hidden and input activations, hidden error, weights and weight deltas, and updates weights and weight deltas.

Method on PROPOSITION-NEURAL-NETWORK: update-network-weights (self (error FLOAT)) :

Given a properly forward activated and backpropagated network self for the current inputs and training error, update the network’s weights according to current gradients, learning rate and momentum terms to reduce the error for the given inputs. Reads output, hidden and input activations, hidden error, weights and weight deltas, and updates weights and weight deltas.

Method on CHAMELEON-NEURAL-NETWORK: update-network-weights (self (error FLOAT)) :

Given a properly forward activated and backpropagated network self for the current inputs and training error, update the network’s weights according to current gradients, learning rate and momentum terms to reduce the error for the given inputs. Reads output, hidden and input activations, hidden error, weights and weight deltas, and updates weights and weight deltas.

Method on TENSORFLOW-NEURAL-NETWORK: update-network-weights (self (error FLOAT)) :

Given a properly forward activated and backpropagated network self for the current inputs and training error, update the network’s weights according to current gradients, learning rate and momentum terms to reduce the error for the given inputs. Reads output, hidden and input activations, hidden error, weights and weight deltas, and updates weights and weight deltas.

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.

Method on NEURAL-NETWORK: vector-argument-index (self (arg PROPOSITION)) : INTEGER

Return the 0-based input position of vector argument arg. Ignores bias unit which is a network-implementation-specific detail. If arg is not a vector argument, returns -1.

Method on VECTOR-NEURAL-NETWORK: vector-argument-index (self (arg PROPOSITION)) : INTEGER

Return the 0-based input position of vector argument arg. Ignores bias unit which is a network-implementation-specific detail. If arg is not a vector argument, returns -1.

Method on NEURAL-NETWORK: vector-argument? (self (arg PROPOSITION)) : BOOLEAN

Return TRUE if arg yields one or more vectors for selfs inputs.

Method on VECTOR-NEURAL-NETWORK: vector-argument? (self (arg PROPOSITION)) : BOOLEAN

Return TRUE if arg yields one or more vectors for selfs inputs.

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* or NULL are acceptable moduleForms. 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: cons-first ((self CONS)) : (LIKE (ANY-VALUE SELF))

Access the first element of the CONS-list self (available to support access in C).

Function: cons-is-empty ((self CONS)) : BOOLEAN

Return TRUE if the CONS-list self is empty (available to support access in C).

Function: cons-length ((self CONS)) : INTEGER

Return the length of the CONS-list self (available to support access in C).

Function: cons-nth ((self CONS) (n INTEGER)) : (LIKE (ANY-VALUE SELF))

Access the n-th element of the CONS-list self (available to support access in C).

Function: cons-nth-rest ((self CONS) (n INTEGER)) : (LIKE SELF)

Access the n-th rest (tail) of the CONS-list self (available to support access in C).

Function: cons-rest ((self CONS)) : (LIKE SELF)

Access the rest (tail) of the CONS-list self (available to support access in C).

Function: cons-set-first ((self CONS) (value OBJECT)) :

Set the first element of the CONS-list self to value (available to support access in C).

Function: cons-set-nth ((self CONS) (n INTEGER) (value OBJECT)) :

Set the n-th element of the CONS-list self to value (available to support access in C). The run-time complexity of this operation is O(n).

Function: cons-set-nth-rest ((self CONS) (n INTEGER) (rest CONS)) :

Set the n-th rest (tail) of the CONS-list self to rest (available to support access in C). If rest is NULL, it will point to the empty list. The run-time complexity of this operation is O(n).

Function: cons-set-rest ((self CONS) (rest CONS)) :

Set the rest (tail) of the CONS-list self to rest (available to support access in C). If rest is NULL, it will point to the empty list.

Function: create-boolean-wrapper ((self BOOLEAN)) : BOOLEAN-WRAPPER

Create a STELLA boolean wrapper for self.

Function: create-cons ((first OBJECT) (rest CONS)) : CONS

Create a STELLA CONS-cell whose value points to first and tail points to rest. If rest is NULL, it will point to the empty list (available as a constructor in C).

Function: create-cons-list ((length INTEGER)) : CONS

Create a STELLA CONS-list of length with elements initialized to NULL (available as a constructor in C).

Function: create-direct-string-wrapper ((self STRING)) : STRING-WRAPPER

Create a STELLA string wrapper for self. This wraps self directly and does not allocate a PowerLoom copy first, hence, memory management of self needs to be carefully handled by the caller.

Function: create-float-wrapper ((self FLOAT)) : FLOAT-WRAPPER

Create a STELLA float wrapper for self.

Function: create-integer-wrapper ((self INTEGER)) : INTEGER-WRAPPER

Create a STELLA integer wrapper for self.

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

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

Function: create-long-integer-wrapper ((self LONG-INTEGER)) : LONG-INTEGER-WRAPPER

Create a STELLA long-integer wrapper for self.

Function: create-string ((content STRING)) : STRING

Create a PowerLoom copy of the string content which uses PowerLoom memory management and garbage collection. This is primarily necessary in C environments when a string is passed to a PowerLoom PLI function which might then be pointed to by a PowerLoom result object such as a string wrapper. If such an argument string is later explicitly freed or overwritten, the result object would have a dangling reference or its content destroyed.

Function: create-string-wrapper ((self STRING)) : STRING-WRAPPER

Create a STELLA string wrapper for self. This automatically copies self before the wrapper is allocated to avoid garbage collection issues in case self is freed.

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

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

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

Return the module named name or raise a STELLA no-such-context-exception if it doesn’t exist.

Function: get-frame-arity ((frame CONTROL-FRAME)) : INTEGER

Return the arity of the proposition currently being inferred by frame. This will be the actual number of arguments, even if the proposition is of variable arity.

Function: get-frame-binding-pattern ((frame CONTROL-FRAME)) : STRING

Return a string representation of the argument binding pattern of frame. The syntax of the pattern is the same as used for is-frame-binding-pattern (which see).

Function: get-frame-binding-state ((frame CONTROL-FRAME)) : CONS

Return a frame variable binding stack state that can be used to unbind all frame variables to the state they were in when the binding stack state was recorded.

Function: get-frame-iterator ((frame CONTROL-FRAME)) : PL-ITERATOR

Return the iterator generating successive bindings for the proposition that is currently being inferred by frame.

Function: get-frame-proposition ((frame CONTROL-FRAME)) : PROPOSITION

Return the proposition currently being inferred by this control frame. This proposition will generally have bound and/or unbound pattern variables as its arguments.

Function: get-inconsistent-propositions ((module MODULE) (environment ENVIRONMENT)) : (PL-ITERATOR OF PROPOSITION)

Return inconsistent propositions visible in module.

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

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

Function: get-logic-type ((self OBJECT)) : SYMBOL

Return the name symbol of the logic object type of self. This type describes the basic role this object plays in the logic system such as PROPOSITION, CONCEPT, THING, etc., as indicated by its native object type, it does not have anything to do with type propositions asserted about self.

Function: get-logic-type-name ((self OBJECT)) : STRING

Return the qualified name of the logic type of self.

Function: get-logic-type-short-name ((self OBJECT)) : STRING

Return the unqualified name of the logic type of self.

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-nth-frame-argument ((frame CONTROL-FRAME) (n INTEGER)) : OBJECT

Return the n-th argument of the proposition that is currently being inferred by frame. This will generally be a pattern variable that might be unbound or bound.

Function: get-nth-frame-binding ((frame CONTROL-FRAME) (n INTEGER)) : OBJECT

Return the binding of the n-th argument of the proposition that is currently being inferred by frame. This will be NULL if the argument is unbound, otherwise, the object bound to the variable.

Function: get-property ((property STRING) (defaultvalue STRING)) : STRING

Synonym for get-property-string (which see).

Function: get-property-boolean ((property STRING) (defaultValue BOOLEAN)) : BOOLEAN

Return the value of the global STELLA configuration property as a boolean or defaultValue if it is undefined. Raises an error if the defined value is not a boolean.

Function: get-property-float ((property STRING) (defaultValue FLOAT)) : FLOAT

Return the value of the global STELLA configuration property as a float or defaultValue if it is undefined. Raises an error if the defined value is not a float.

Function: get-property-integer ((property STRING) (defaultValue INTEGER)) : INTEGER

Return the value of the global STELLA configuration property as an integer or defaultValue if it is undefined. Raises an error if the defined value is not an integer.

Function: get-property-object ((property STRING) (defaultValue OBJECT)) : OBJECT

Return the value of the global STELLA configuration property or defaultValue if it is undefined.

Function: get-property-string ((property STRING) (defaultValue STRING)) : STRING

Return the value of the global STELLA configuration property as a string or defaultValue if it is undefined.

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

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

Function: get-skolem-name ((skolem SKOLEM)) : STRING

Return the fully qualified name of skolem. Note that skolems are anonymous objects which cannot be referenced by their name in logic expressions, so this function is only useful in special circumstances such as inside specialist computations, etc.

Function: get-skolem-short-name ((skolem SKOLEM)) : STRING

Return the unqualified name of skolem. Note that skolems are anonymous objects which cannot be referenced by their name in logic expressions, so this function is only useful in special circumstances such as inside specialist computations, etc.

Function: get-stella-type ((self OBJECT)) : SYMBOL

Return the name symbol of the STELLA class of which self is a direct instance.

Function: get-stella-type-name ((self OBJECT)) : STRING

Return the qualified name of the STELLA class of which self is a direct instance.

Function: get-stella-type-short-name ((self OBJECT)) : STRING

Return the unqualified name of the STELLA class of which self is a direct instance.

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 literally and case sensitively.

Function: get-unary-propositions ((relation LOGIC-OBJECT) (arg OBJECT) (module MODULE) (environment ENVIRONMENT)) : (PL-ITERATOR OF PROPOSITION)

Return propositions such that (relation arg) is true. The relation argument must be bound to a relation. arg may be set to NULL, which is interpreted as a wildcard.

Function: get-undefined-relations ((module MODULE) (environment ENVIRONMENT)) : (PL-ITERATOR OF LOGIC-OBJECT)

Return relations that have been referenced but not defined in module.

Function: get-variable-name ((variable PATTERN-VARIABLE)) : STRING

Return the fully qualified name of variable.

Function: get-variable-short-name ((variable PATTERN-VARIABLE)) : STRING

Return the unqualified name of variable.

Function: is-defined-property ((property STRING)) : BOOLEAN

Return TRUE if property has a defined value.

Function: is-frame-binding-pattern ((frame CONTROL-FRAME) (pattern STRING)) : BOOLEAN

Return TRUE if the arguments of frame are bound according to pattern. Each character in pattern corresponds to an argument at the particular position and must be either B (for bound) or _ for unbound. The function returns TRUE if frame has at least as many arguments as pattern has characters and their bindings match pattern. If frame has additional arguments, they will be ignored. If pattern has more positions than frame has arguments, the function returns FALSE.

Function: is-instance ((object OBJECT) (concept LOGIC-OBJECT) (module MODULE) (environment ENVIRONMENT)) : BOOLEAN

Return TRUE if object is an instance of the concept concept. This uses subsumption inference only.

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

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

Function: is-skolem ((obj OBJECT)) : BOOLEAN

Test whether obj is of type SKOLEM (which subsumes pattern variables).

Function: is-true-nary-proposition ((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: is-variable ((obj OBJECT)) : BOOLEAN

Test whether obj is of type PATTERN-VARIABLE.

Function: list-first ((self LIST)) : (LIKE (ANY-VALUE SELF))

Access the first element of the list self (available to support access in C).

Function: list-nth ((self LIST) (n INTEGER)) : (LIKE (ANY-VALUE SELF))

Access the n-th element of the list self (available to support access in C).

Function: list-rest ((self LIST)) : (CONS OF (LIKE (ANY-VALUE SELF)))

Access the rest (tail) of the list self (available to support access in C). NOTE: the rest of a STELLA list is a CONS-list not a LIST.

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

Read logic commands from the file named filename and evaluate them. Binds the load command’s :module option to module. See load command help for more information.

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. Binds the load command’s :module option to module. See load command help for more information.

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

Read logic commands from the STELLA stream stream and evaluate them. Binds the load command’s :module option to module. See load command help for more information.

Function: pl-iterator-is-empty ((self PL-ITERATOR)) : BOOLEAN

Return TRUE if the iterator self has no more elements. This is here primarily to support the is-... naming convention for tests.

Function: pl-iterator-value ((self PL-ITERATOR)) : OBJECT

C-callable iterator value-slot accessor.

Function: powerloom ((module MODULE) (environment ENVIRONMENT)) :

Run the PowerLoom read/eval/print loop.

Function: print-properties () :

Print all currently defined STELLA configuration properties and values.

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-object ((object OBJECT)) : CONS

Register object to prevent it from being garbage-collected by the PowerLoom GC. The result of registration is a handle for object which can later be used to unregister it. Currently it is assumed that calling this immediately after an object was returned by a PLI function is safe; however, we might have to handle registration in PLI functions before objects are returned. This is not thread safe and needs to be explicitly synchronized in a threaded environment.

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-is-true-nary-proposition ((relation-and-arguments STRING) (module-name STRING) (environment ENVIRONMENT)) : BOOLEAN

Return TRUE if a proposition that prints as the string relation-and-arguments is true in the module named module-name. A module name of null or the empty string refers to the current module. If no module can be found with the name module-name, then a Stella no-such-context-exception is thrown.

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: set-frame-binding-state ((frame CONTROL-FRAME) (state CONS)) :

Reset the frame variable binding stack state to state. This will set all frame variables to the state they were in when the binding stack state was recorded.

Function: set-frame-iterator ((frame CONTROL-FRAME) (iterator PL-ITERATOR)) :

Set the iterator for generating successive bindings for the proposition that is currently being inferred by frame to iterator.

Function: set-nth-frame-binding ((frame CONTROL-FRAME) (n INTEGER) (value OBJECT)) : BOOLEAN

Set the binding of the n-th argument of the proposition that is currently being inferred by frame to value. If the binding was successful, that is if the argument was unbound or is already bound to binding, the function returns TRUE. Otherwise, the argument will keep its current binding and FALSE will be returned.

Function: set-property ((property STRING) (value STRING)) :

Synonym for set-property-string (which see).

Function: set-property-boolean ((property STRING) (value BOOLEAN)) :

Set the global STELLA configuration property to a boolean value.

Function: set-property-float ((property STRING) (value FLOAT)) :

Set the global STELLA configuration property to a float value.

Function: set-property-integer ((property STRING) (value INTEGER)) :

Set the global STELLA configuration property to an integer value.

Function: set-property-object ((property STRING) (value OBJECT)) :

Set the global STELLA configuration property to value.

Function: set-property-string ((property STRING) (value STRING)) :

Set the global STELLA configuration property to a string value.

Function: string-to-stella-expression ((expression STRING) (module MODULE) (environment ENVIRONMENT)) : OBJECT

Read the STELLA expression in module and return the result. Raises a reader exception in case of incorrect STELLA syntax.

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

Test if env has level set to level

Function: unregister-object ((objectHandle CONS)) :

Unregister the object whose registered handle is objectHandle to make it available for PowerLoom garbage collection. This also is not thread safe and needs to be explicitly synchronized in a threaded environment.

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 January 6, 2023 using texi2html 1.82.