Manual Power Loom
Manual Power Loom
Version: $Revision$
6 January 2023
Table of Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Powerloom Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Powerloom History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Running PowerLoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 Command-Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Conceptual Framework . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1 Terms and Propositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Truth Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Annotated Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1 Using Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4 Relation Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.5 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.6 Defined Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.7 Negation and Open and Closed World Semantics . . . . . . . . . . . . . . . 15
3.8 Retraction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.9 Clipping of Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.10 Rule-based Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.11 Explanation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.12 Contexts and Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.13 Equality Reasoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.14 Classification, Subsumption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.15 Truth Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.16 Inference Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.17 Keyword Axioms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.18 Cardinality/Type Reasoning with Frame Predicates . . . . . . . . . . . 24
3.19 Loom-to-PowerLoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.20 Deviations from KIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.21 Differences from Loom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.22 Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.23 Sets, Lists, SETOFALL, KAPPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
ii
6 PowerLoom API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.1 API Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.2 Language Specific Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.2.1 Lisp API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.2.1.1 Common Lisp Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.2.1.2 Type Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.2.1.3 NULL values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.2.1.4 Wrapped Literal Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.2.1.5 Special Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.2.1.6 CLOS Objects versus Structs . . . . . . . . . . . . . . . . . . . . . . . . 62
6.2.2 C++ API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.2.3 Java API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.2.3.1 Initializing PowerLoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.2.3.2 PowerLoom Java Conventions . . . . . . . . . . . . . . . . . . . . . . . . 62
6.2.3.3 Using the PLI Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.2.3.4 Using Stella Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.2.3.5 PowerLoom and Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.2.3.6 Setting and Restoring Global Variable Values . . . . . . . . 66
6.2.3.7 Java Character Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.2.3.8 Stella Exceptions in Java. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
6.2.3.9 Iteration in Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
6.2.3.10 Utility Classes for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7 Built-In Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
8 PowerLoom GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
8.1 Invoking the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
8.1.1 Starting a PowerLoom Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
8.2 GUI Design Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
8.3 GUI Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
8.4 GUI Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
8.4.1 Connect to Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
8.4.2 Edit Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
8.4.3 KB Load/Save. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
8.4.4 Browsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
8.4.5 Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
8.4.6 Choosers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
8.4.7 Extension Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
8.4.8 Ask and Retrieve Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
8.4.9 Search. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
8.4.10 Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
8.4.11 Cut/Copy/Paste/Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
8.5 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
8.5.1 Large KBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
8.5.2 Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
8.5.3 Drag and Drop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
8.5.4 Scrapbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
iii
9 Ontosaurus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
10 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
10.1 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
10.2 Unpacking the Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
10.3 Lisp Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
10.4 C++ Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
10.5 Java Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
10.6 Removing Unneeded Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
10.7 Installing PowerLoom Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
11 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
12 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
1 Introduction
This document describes the PowerLoom knowledge representation and reasoning system.
PowerLoom is the successor to the Loom knowledge representation system. It provides a
language and environment for constructing intelligent, knowledge-based applications. Pow-
erLoom uses a fully expressive, logic-based representation language (a variant of KIF). It
uses a natural deduction inference engine that combines forward and backward chaining
to derive what logically follows from the facts and rules asserted in the knowledge base.
While PowerLoom is not a description logic, it does have a description classifier which uses
technology derived from the Loom classifier to classify descriptions expressed in full first
order predicate calculus. PowerLoom uses modules as a structuring device for knowledge
bases, and ultra-lightweight worlds to support hypothetical reasoning.
To implement PowerLoom we developed a new programming language called STELLA,
which is a Strongly Typed, Lisp-like LAnguage that can be translated into Lisp, Java, and
C++. STELLA tries to preserve those features of Lisp that facilitate symbolic programming
and rapid prototyping, while still allowing translation into readable as well as efficient Java
and C++ code. Because PowerLoom in written STELLA, we are able to deliver it in all
three languages.
often due to "we could not express X in language L". The theoretical undecidability
and intractability of such an expressive language is counteracted by providing lim-
ited, "pragmatic" reasoning services that cover commonly encountered situations. For
example, reasoning with second-order sentences that quantify over relations is unde-
cidable and leads to very unfocused search; however, such sentences are very useful to
describe axiom schemata that can be cheaply run in forward direction to create regular
first-order rules (in a process not unlike macro expansion).
• Reasoning: The primary reasoning mechanism is logical deduction which infers state-
ments that logically follow from the asserted statements and rules. Such statements
can be asked about using PowerLoom’s query commands ask (for true/false questions)
and retrieve (for Wh-questions). PowerLoom uses a natural deduction system to
answer queries but also has a large number of specialized reasoning procedures to
efficiently handle concept and relation hierarchies, sets, frame predicates, search con-
trol, etc. The specialist architecture is extensible to allow users to plug-in their own
reasoners or computed predicates. PowerLoom also supports hypothetical reasoning,
equality reasoning, arithmetic and reasoning with inequalities. While PowerLoom is
not a description logic, it does have a classifier that can classify concept and relation hi-
erarchies and instances defined using the full expressive power of first-order logic. The
classifier does not provide any additional inferences, but allows PowerLoom to eagerly
pre-compute and cache subsumption relationships which can then be utilized over and
over without having to re-derive them. PowerLoom also provides some experimental
abductive and partial-match reasoning to handle incomplete knowledge bases.
• Meta-representation and reasoning: Concepts, relations, contexts, rules, queries, etc.
are all first-class citizens in the domain of discourse. Therefore, they can have assertions
made about them as well as reasoned about. This mechanism is commonly used by the
system itself, e.g., to assert that a relation is single valued or transitive, that a concept
is closed, etc.
• Explanation: PowerLoom can explain its reasoning by recording inference trees and
then rendering those into human-understandable explanations. PowerLoom also has
an experimental "WhyNot" facility to explain inference failures where no successful
proof tree was found.
• Contexts and modules: Contexts and modules provide separate name and assertion
spaces with inheritance which implement a powerful structuring mechanism for KBs.
Contexts allow encapsulation and organization of knowledge, efficient inference (by
separating irrelevant knowledge or by separating ontologies and assertion spaces from
volatile inference worlds), truth maintenance (via inference cache contexts), scenar-
ios and hypothetical reasoning, non-monotonic overrides in sub-contexts, etc. Pow-
erLoom’s context mechanism is built-in at a very low level using a very efficient and
light-weight implementation for maximum performance.
• Open and closed-world: By default, PowerLoom makes an open-world assumption
and returns unknown if it cannot prove or disprove a question. However, concepts
and relations can be selectively marked as closed to support selective closed-world
reasoning. PowerLoom also has a fail predicate (in addition to true negation via not)
to implement closed-world negation-as-failure which can be useful in certain situations.
• Knowledge base management: PowerLoom supports incremental monotonic and non-
monotonic updates that extend or non-monotonically change the assertion base. In
Chapter 1: Introduction 3
PowerLoom one can effectively interleave definitions, re-definitions, assertions and re-
tractions with retrieval and inference without having to reload large knowledge bases
from scratch after every change. Truth maintenance of cached inference results that
might have been invalidated by updates is done via inference cache contexts. After a
knowledge base has been loaded and changed by some updates, the changed state can
be saved out to a file or an (experimental) persistent store built on top of a relational
database.
• Scalability: Despite its emphasis on expressive representation which usually has to
be paid for with intractable and expensive reasoning procedures, PowerLoom is very
scalable and comes with a variety of mechanisms to control search and handle large
ontologies and knowledge bases. For example, PowerLoom’s reasoning specialists han-
dle a wide variety of inferencing very effectively without having to go through any
rule chaining. Search control annotations can be used to help the inference engine use
rules more effectively. For example, depending on fan-out, certain rules are run more
effectively forwards than backwards (or vice versa), and a KB developer can tell the
system when that’s the case. PowerLoom has resource-bounded depth-first or iterative
deepening search which provides an any-time inference scheme for situations where
resources are limited. A "just-in-time" forward inference engine elaborates the asser-
tion neighborhood of objects touched upon by inference. This allows focused forward
inference relevant to current inference goals, without having to run forward inference
over a potentially very large KB to completion. PowerLoom has a static and dynamic
query optimizer, that, similar to optimizers used in database systems, orders conjunc-
tive goals based on relation extension sizes and rule fan-out to minimize intermediate
result sets and chaining. The dynamic optimizer does this for each conjunctive sub-
goal based on actual bindings. Given this mechanism it is possible to run PowerLoom
queries that return 100,000’s of solutions. PowerLoom also has a powerful relational
database interface that allows it to utilize the power of databases for handling large
assertion bases (soon to be released). One application of this PowerLoom/RDBMS
integration is used with ISI’s Omega ontology. It is also a crucial part of our KOJAK
Link Discovery System.
• Tools and APIs: PowerLoom has a host of associated tools and APIs (not all of which
have been released yet). It comes with an interactive command-line interface which
is useful for developing ontologies and knowledge bases, an extensive programmatic
interface called PLI with Lisp, C++ and Java bindings, and a Lisp-based Loom API to
load legacy Loom KBs. Starting with PowerLoom version 4.0 Ontosaurus and a Java-
based GUI have been released as part of PowerLoom. Ontosaurus is a Web-based KB
browser that dynamically generates HTML pages viewable in a standard Web browser.
The Java-based GUI provides a browse/edit/query environment for developing KBs.
The GUI uses a client/server architecture and can be used embedded or standalone
against a PowerLoom server that might be hosted - among other options - in a Web
server such as Tomcat. A soon-to-be-released Protege plug-in allows export of Protege
ontologies into PowerLoom format. OntoMorph is a translation system that supports
writing of KB translators and importers, e.g., to import ontologies written in other
languages (for example, Flogic).
• Initial Semantic Web support: Given PowerLoom’s emphasis on expressive representa-
tion, we have not yet focused much on Semantic Web languages such as OWL, which
Chapter 1: Introduction 4
restricts expressivity to gain decidability. OWL also has other limitations such as re-
striction to binary relations and lack of support for arithmetic and inequalities which
limits its usefulness for practical applications. Nevertheless, given that people are
starting to use these languages more and more, we’ve developed some initial import
translators for RDF/RDFS and OWL which once they mature we will release as part
of PowerLoom.
• Portability and integration: Since PowerLoom is implemented in STELLA, it is avail-
able in Lisp, C++ and Java implementations and highly portable. PowerLoom can be
run in each of these languages under Unix (such as Linux, SunOS or MacOS X) as
well as Windows 2000 and XP. Due to the availability in three main-stream languages,
it can easily be integrated programmatically with most application software without
having to use some complex integration framework. The C++ and Java libraries for
PowerLoom are also quite small and light-weight, for example, the necessary STELLA
and PowerLoom jar files of the Java implementation are less than 2.5 Meg in size.
PL-USER |=
Chapter 1: Introduction 5
Under Windows, you can do something similar by running a Command Prompt window
and executing the powerloom.bat script. You can also simply double click on the script
which will run PowerLoom and bring up a Command Prompt window for you.
Once the |= prompt has come up you can type in PowerLoom commands and see their
results. The string preceding the prompt indicates the "current module" relative to which
commands are interpreted. For example, type the demo command to see a menu of available
demos. Step through one or more of them to get familiar with PowerLoom.
Starting with version 4.0 PowerLoom also ships with an experimental PowerLoom GUI
and the Ontosaurus browser which can additionally be used to edit and browse knowledge
bases.
2 Conceptual Framework
This chapter presents the fundamental conceptual building blocks that are used to construct
PowerLoom knowledge bases. The PowerLoom language is based on KIF, which provides a
syntax and a declarative semantics for first-order predicate calculus expressions. KIF is a
proposed ANSII standard language used by a variety of knowledge representation systems.
Practical knowledge representation systems necessarily add a procedural semantics that
defines the interpretation of knowledge structures when definitions and facts are retracted
or modified. This chapter assumes that the reader has some familiarity with the semantics
of the predicate calculus, and instead focuses on aspects of the semantics that go beyond
the traditional (KIF) semantics.
A PowerLoom knowledge base is constructed by first defining the terminology (concepts
and relations) for a domain, and then asserting additional rules and facts about that domain.
Facts can be asserted and later retracted, so the answers returned by queries may change
over time. The knowledge structures are organized into logical containers called “modules”.
The division into modules means that in general, facts are not asserted globally, but instead
hold only within a specific context. For example, a logical proposition may evaluate as true
within one module, and evaluate as false within a different one.
The discussion below uses some examples of actual PowerLoom syntax to illustrate
certain points. However, we gloss over the fine points of syntax, and instead focus on
semantic issues. The next chapter reverses that emphasis, and presents a series of examples
that illustrate the breadth of syntactic constructs implemented for the PowerLoom language.
2.2 Definitions
PowerLoom requires that relations are defined before they are used within assertions and
queries. The commands defconcept, defrelation, and deffunction are used to define
concepts, relations, and functions, respectively. The definitions
(defconcept person)
(defrelation married-to ((?p1 person) (?p2 person))
(deffunction + ((?n1 number) (?n2 number)) :-> (?sum number))
declare that person is a concept, that married-to is a binary relation that takes ar-
guments of type person, and that + is a function that takes arguments of type number1 .
The requirement that relations be defined before they are referenced can be inconvenient
at times. For example, suppose we wish to define parent as “a person who is the parent of
another person” and we also wish to state that the first argument to the parent-of relation
has type parent:
(defconcept parent (?p)
:<=> (and (person ?p) (exists ?c (parent-of ?p ?c))))
(defrelation parent-of ((?p parent) (?c person)))
In this example, the first reference to parent-of occurs before it is defined. PowerLoom
permits circular references such as these as long as they occur within definitions. It does so
by deferring evaluation of rules that occur within definitions. Here is a specification that is
logically equivalent, but is not legal because the parent-of relation appears in an assertion
before it is defined:
(defconcept parent (?p))
(assert (forall (?p) (<=> (parent ?p)
(and (person ?p) (exists ?c (parent-of ?p ?c))))))
(defrelation parent-of ((?p parent) (?c person)))
So when does the rule inside of the first parent definition get defined? All axioms (facts
and rules) that appear within the boundaries of a definition are evaluated just prior to
the next occurrence of a PowerLoom query. Hence, in the example above where the rule
occurred within the definition, there was no error because evaluation of that rule occured
sometime after the second definition (which defines the otherwise problematic reference to
parent-of).
One will sometimes see the command (process-definitions) appearing at intervals
within a file containing PowerLoom commands. Each such appearance forces the definitions
that preceed it to be fully-evaluated. This is done so that the interval between a definition
and its evaluation not be too great; it can get confusing if PowerLoom reports a semantic
violation long after the origin of the conflict.
PowerLoom definitions commands (those prefixed by “def”) have one other semantic
property that distinguishes them from ordinary assertions. Any axioms that appear within
a definition are tied to that definition. If a definition is modified and then reevaluated,
axioms that don’t survive the modification are retracted. For example, suppose we evaluate
the following two commands.
(defrelation parent-of ((?p1 person) (?p2 person))
:=> (relative-of ?p1 ?p2))
1
The function + and the concept number are predefined in PowerLoom.
Chapter 2: Conceptual Framework 8
If we now ask PowerLoom whether or not Mary is a person, the answer will be yes
(TRUE) because Mary is asserted to be an employee, and membership in employee implies
membership in person. In other words, although the direct assertion that Mary is a person
is not present in the knowledge base, a logical proof exists that the proposition “Mary is a
person” is true.
2.4 Modules
The knowledge loaded into an executing PowerLoom system is divided into logical partitions
called “modules”. The modules are arranged into a hierarchy; knowledge inherits down the
hierarchy from parents to children. A convenient way to organize knowledge is to put
definitional knowledge higher up in the module hierarchy, and factual knowledge lower
down. For example, suppose we want to build a knowledge base that defines a business
domain, and include a substantial number of facts about individual companies. We might
use one or a few modules to define terminology that relates to the business domain, and
then places the set of facts about each company in its own module. If we were querying
the knowledge base about one or a few companies, it would not be necessary to load the
modules for the remaining companies into the system.
Facts asserted within a module are not visible in sibling modules, or in ancestor modules.
Thus, if we enter into PowerLoom an assertion that“Georgia is a state”, we are not asserting
that Georgia is a state in all possible worlds, but that, from the vantage point of the current
module and those modules below, it is the case that Georgia is a state. If we want the fact
that Georgia is a state to be recognized as true in many or most other modules, then we
should make our assertion in a module that is relatively high up in the hierarchy, so that is
visible to (inherited by) the other modules.
The inheritance of facts is not monotonic—a child module can retract or override facts
inherited from its ancestors. For example, suppose we have two modules, called above
and below such that the below module is below (inherits from) the above module. Next,
suppose we make an assertion within the above module that “Joel is a duck”, and then
we shift to the below module and retract the proposition that “Joel is a duck”. From the
vantage point of the below module, if we now ask if Joel is a duck, we will get back the
value unknown. However, if we switch to the above module and ask the same question, we
get back the answer true This occurs because the effect of the retraction operation that
was applied to the below module is not “visible” to modules above it (or to any sibling
modules). Hence, when module hierarchies are involved, it is oversimplifying to state that
a retraction has the effect of erasing a prior assertion.
The PowerLoom execution process maintains a pointer to the current module, and all
asserions, queries, etc. are made relative to that module. Hence, when we talk about
10
“switching” from one module to another, we are speaking literally—a change-module com-
mand (or one of its equivalents) is invoked to switch from one module to another.2
PowerLoom comes with some modules already built-in. The module named PL-KERNEL
contains a set of general-purpose concept and relation definitions that collectively form
the foundation for constructing application-specific knowledge bases. PowerLoom attaches
specialized reasoners to many of the relations in PL-KERNEL. The command interpreter
starts up in a module named PL-USER. That module is initially empty, and is intended as
a convenient place to experiment with PowerLoom.
2
Many of the Powerloom API procedures take a module argument that causes a temporary switch to a
different module within the scope of that procedure.
11
3 Annotated Example
The section presents a small example of a PowerLoom knowledge base. It introduces the
fundamental PowerLoom modelling concepts and illustrates the syntax of basic PowerLoom
declarations, assertions, and commands. This section can be read stand-alone, but readers
who intend to use PowerLoom to create their own models are encouraged to load the demo
file ???, and run the examples “live”.
The conceptual terms introduced in this section include modules, concepts, relations,
functions, instances, propositions, assertions, queries, retraction, positive and negative facts,
clipping, rules, and contexts.
3.2 Concepts
Concepts are defined using the defconcept command. Here we define the concepts company
and corporation:
(defconcept company)
(defconcept corporation (?c company))
The first definition tells the system that company is a concept (in the business module).
The second definition defines a concept corporation. The type declaration (?c company)
indicates that corporation is a subconcept of company, i.e., all instances of corporation
are also instances of company. Let us now create a couple of companies:
(assert (company ACME-cleaners))
1
PowerLoom modules are case-insensitive by default. This means, for example, that a logical constant
named "Foo" may be referenced by any of the symbols ’FOO’, ’foo’, ’foO’ etc. You may create case-
sensitive modules, but if you do so, when inside that module all PowerLoom commands and other symbols
such as AND, EXISTS, etc. will need to be referred to using uppercase names, since no automatic case-
conversion will take place.
Chapter 3: Annotated Example 12
3.3 Relations
So far, our two companies aren’t very interesting. In order to say more about them, we can
define some relations and functions using the declarations defrelation and deffunction:
(defrelation company-name ((?c company) (?name STRING)))
This declaration defines a binary relation company-name. The first value in a
company-name tuple must be an instance of type company, while the second value must be
a string. We can now give our companies names, using the command assert:
(assert (company-name ACME-cleaners "ACME Cleaners, LTD"))
(assert (company-name megasoft "MegaSoft, Inc."))
We can retrieve pairs of companies and their names with the following query (note that
we omitted the optional retrieval variables in which case they are determined by collecting
the free variables in the query expression):
(retrieve all (company-name ?x ?y))
⇒
There are 2 solutions:
#1: ?X=MEGASOFT, ?Y="MegaSoft, Inc."
#2: ?X=ACME-CLEANERS, ?Y="ACME Cleaners, LTD"
Using retrieval variables is useful if we want to order the result columns in a certain way,
for example:
(retrieve all (?y ?x) (company-name ?x ?y))
⇒
There are 2 solutions:
#1: ?Y="MegaSoft, Inc.", ?X=MEGASOFT
#2: ?Y="ACME Cleaners, LTD", ?X=ACME-CLEANERS
3.5 Functions
This illustrates another point: A PowerLoom relation is by default “multi-valued”, which in
the case of a binary relation means that a single first value can be mapped by the relation
to more than one second value. In the present case, our model permits a company entity to
have more than one company-name. If a (binary) relation always maps its first argument to
exactly one value (i.e., if it it “single-valued”) we can specify it as a function instead of a
relation. For example, we can use a function to indicate the number of employees for a
company:
(deffunction number-of-employees ((?c company)) :-> (?n INTEGER))
When defining a function, all arguments but the last appear just as they do for a relation.
The last argument (and its type) appears by itself following the keyword :->. Defining a
single-valued relation as a function allows us to refer to it using a functional syntax within
a logical sentence, as in the following:
(assert (= (number-of-employees ACME-cleaners) 8))
(assert (= (number-of-employees megasoft) 10000))
The functional syntax often results in shorter expressions than equivalents that use
relational syntax. For example to retrieve all companies with fewer than 50 employees, we
can simply write:
Chapter 3: Annotated Example 14
2
Actually, PowerLoom implements a five-valued logic — the remaining two values are “default true” and
“default false”. However, the present discussion defers the subject of default truth values.
3
Because proving negations can be very difficult, PowerLoom will only conduct a very quick and shallow
search for a disproof. More extensive reasoning is used if a negation is asked about explicitly, thus
PowerLoom may return unknown if asked about P, but true if asked about (not P).
Chapter 3: Annotated Example 16
expensive queries, and the user or programmer should decide whether the effort should be
expended to ask both queries instead of just one.
PowerLoom can sometimes infer a negative fact without the necessity of a direct asser-
tion. For example:
(ask (= (number-of-employees ACME-cleaners) 8))
⇒
TRUE
(ask (= (number-of-employees ACME-cleaners) 10))
⇒
FALSE
(ask (not (= (number-of-employees ACME-cleaners) 10)))
⇒
TRUE
PowerLoom can infer the second and third answers because it knows that the function
number-of-employees can return only one value, and if that value is the number eight, it
cannot also be something else (in this case, ten).
Many systems, in particular, database systems and Prolog, make the assumptions that
if a proposition cannot be proved true, then it must be false. This is called the “closed
world assumption”. By default, PowerLoom makes an open-world assumption, but for
specific relations it can be instructed to assume a closed world if a user wants closed world
semantics. For example, suppose we introduce a relation works-for, and we assume that
all works-for facts have been entered in our knowledge base:
(defrelation works-for (?p (?c Company)))
(assert (works-for shirly ACME-cleaners))
(assert (works-for jerome zz-productions))
If we ask PowerLoom whether Jerome does NOT work for MegaSoft, it will return
unknown. But if we assert that the relation works-for is closed, then PowerLoom will
assume that Jerome only works for ZZ Productions:
(ask (not (works-for jerome megasoft)))
⇒
UNKNOWN
UNKNOWN
3.8 Retraction
Below, we introduce a few new terms for defining geographic information. We define a
relation called contains to assert that one geographic location (the second argument to
contains) is located within another:
(defconcept geographic-location)
(defconcept country (?l geographic-location))
(defconcept state (?l geographic-location))
(defconcept city (?l geographic-location))
(defrelation contains ((?l1 geographic-location)
(?l2 geographic-location)))
Now, we can assert some facts about U.S. geography (including one deliberate mistake):
(assert (and
(country united-states)
(geographic-location eastern-us)
(contains united-states eastern-us)
(state georgia) (contains eastern-us georgia)
(city atlanta) (contains georgia atlanta)
(geographic-location southern-us)
(contains united-states southern-us)
(state texas) (contains eastern-us texas)
(city dallas) (contains texas dallas)
(city austin) (contains texas austin)))
We would like to repair the incorrect assertion (contains eastern-us texas). The
PowerLoom command retract allows us to erase assertions that should not be true:
(ask (contains eastern-us texas))
⇒
TRUE
3.11 Explanation
PowerLoom provides a command called why that you can use to get an explanation of the
logic behind one of its answers. The why command explains the last query entered into the
system, i.e., it should invoked after one has submitted a retrieve or an ask command.
Before asking a why command, you must enable the justifications feature:
(set-feature justifications)
Queries execute a bit more slowly with jusifications enabled, which is why it is disabled
by default. Having enabled justifications, we must (re)run a query. Here is how we can ask
why Dallas is contained in the Southern US:
(ask (contains southern-us dallas))
⇒
TRUE
(why)
⇒
1 (CONTAINS SOUTHERN-US DALLAS)
follows by Modus Ponens
and substitution {?l3/DALLAS, ?l2/TEXAS, ?l1/SOUTHERN-US}
since 1.1 ! (forall (?l1 ?l3)
(<= (CONTAINS ?l1 ?l3)
(exists (?l2)
(and (CONTAINS ?l1 ?l2)
(CONTAINS ?l2 ?l3)))))
and 1.2 ! (CONTAINS SOUTHERN-US TEXAS)
and 1.3 ! (CONTAINS TEXAS DALLAS)
The above explanation tells us that a rule (our transitivity rule) was invoked during
the proof, and that two ground assertions (CONTAINS SOUTHERN-US TEXAS) and (CONTAINS
TEXAS DALLAS) were accessed to supply preconditions for the rule. These combined as-
sertions lead to the conclusion (CONTAINS SOUTHERN-US DALLAS). Within an explanation,
directly asserted propositions are indicated with the prefix ‘!’.
We can also ask why after a retrieve query. However, if the query has multiple solutions,
each one has a separate explanation. In order to ask why, we need to ask for one solution
at a time. This can be done by omitting the word all from the retrieve query, and
subsequently calling (retrieve) to obtain results one-at-a-time.5
(retrieve (contains southern-us ?x))
⇒
#1: ?X=DALLAS
(retrieve)
⇒
5
The order of solutions will not necessarily be the same as shown here.
Chapter 3: Annotated Example 21
(why)
⇒
1 (and (COMPANY-NAME MEGASOFT MegaSoft, Inc.)
(HEADQUARTERED-IN MEGASOFT DALLAS)
(CONTAINS SOUTHERN-US DALLAS))
follows by And-Introduction
since 1.1 ! (COMPANY-NAME MEGASOFT MegaSoft, Inc.)
and 1.2 ! (HEADQUARTERED-IN MEGASOFT DALLAS)
and 1.3 (CONTAINS SOUTHERN-US DALLAS)
3.19 Loom-to-PowerLoom
3.22 Defaults
language, and relatively awkward in Java and C++. Users of either of those languages
are more likely to want to call s-evaluate.
5 Commands
This chapter lists all available PowerLoom commands alphabetically. Each command is doc-
umented with its name, a (possibly empty) list of parameters specified as (<name> <type>)
pairs, its return type, and its category (Command). Almost all of the commands implic-
itly quote their arguments, meaning that when calling them, you don’t need to add any
quotation yourself. For example, the command all-facts-of is defined as follows:
The all-facts-of command has one parameter called instanceRef of type name, and
returns a STELLA list containing zero or more objects of type proposition as its result.
The type name subsumes the types symbol, surrogate, string, and keyword. Unless
you are in a case-sensitive module, the following four commands are equivalent:
(all-facts-of Merryweather)
(all-facts-of :MERRYWEATHER)
(all-facts-of "merryweather")
(all-facts-of @MerryWeather)
Commands can also have &rest parameters (similar to Lisp functions). These are either
used to allow a variable number of arguments, or to handle optional arguments, since
STELLA does not directly support optional arguments.
Here is a list of important parameter types used in the command specifications below:
• generalized-symbol: A generalized symbol is either a plain symbol (similar to a
Lisp symbol) such as Merryweather, a keyword (similar to a Lisp keyword) such as
:KIF, or a STELLA surrogate which is a symbol starting with an at-sign, e.g., @CONS.
STELLA surrogates are used as names for objects of arbitrary types.
• name: Names can be either a string, or a generalized-symbol (i.e., a symbol,
a keyword, or a surrogate). If a symbol is supplied, only its symbol-name is used.
Commands that take names as arguments usually coerce whatever argument is entered
into a string, but by allowing a name they make it a little bit more convenient to type
a name in an interactive invocation.1
• parse-tree: A parse tree is similar to a Lisp s-expression, i.e., it can either be an
atom such as a symbol, number, or a string, or a list of zero or more parse trees. For
example, the expression (happy Fred) is a parse tree, and so are its components happy
and Fred.
Here is the list of all available PowerLoom commands:
Conceptually, the classifier operates by comparing each concept or relation with all
other concepts/relations, searching for a proof that a subsumption relation exists be-
tween each pair. Whenever a new subsumption relation is discovered, the classifier
adds an implication link between members of the pair, thereby augmenting the
structure of the concept or relation hierarchy. The implemented classification algo-
rithm is relatively efficient – it works hard at limiting the number of concepts or
relations that need to be checked for possible subsumption relationships.
clear-caches () : [Command]
Clear all query and memoization caches.
copyright () : [Command]
Print detailed PowerLoom copyright information.
Chapter 5: Commands 31
(defmodule PL-USER/GENEALOGY)
The remaining options are relevant only for modules that contain STELLA code.
Modules used only to contain knowledge base definitions and assertions have no use
for them:
Chapter 5: Commands 33
print-features () : [Command]
Print the currently enabled and available PowerLoom environment features.
process-definitions () : [Command]
Finish processing all definitions and assertions that have been evaluated/loaded since
that last call to process-definitions. PowerLoom defers complete processing of
definitions to make it easier to support cyclic definitions. Following finalization of
definitions, this call performs semantic validation of any assertions evaluated since the
last call to process-definitions. PowerLoom calls this function internally before
each query; the primary reason to call it explicitly is to force the production of any
diagnostic information that results from the processing and validation.
reset-powerloom () : [Command]
Reset PowerLoom to its initial state. CAUTION: This will destroy all loaded knowl-
edge bases and might break other loaded STELLA systems if they do reference Pow-
erLoom symbols in their code.
store, the KB will saved to that store, otherwise, an error will be signalled. The
specifics on how a save operation will proceed for a persistent store depends on the
particular type of store (see respective documentation). For backwards compatibility,
this command also supports the old <module> <file> arguments specified without
keywords.
set-feature (&rest (features name)) : (list of keyword) [N-Command]
Enable the PowerLoom environment feature(s) named by features. Return the list of
enabled features. Calling set-feature without any arguments can be used to display
the currently enabled features. The following features are supported:
just-in-time-inference: Enables interleaving of forward chaining inference within
backward chaining queries.
iterative-deepening: Tells the query processor to use iterative deepening instead
of a depth-first search to find answers. This is less efficient but necessary for some
kinds of highly recursive queries.
trace-subgoals: Enables the generation of subgoaling trace information during
backchaining inference.
trace-solutions: Prints newly found solutions during retrieval right when they are
generated as opposed to when the query terminates.
trace-classifier: Tells the classifier to describe the inferences it draws.
justifications: Enables the generation of justifications during inference, which is
a prerequiste for the generation of explanations with (why).
emit-thinking-dots: Tells PowerLoom to annotate its inference progress by out-
putting characters indicating the completion of individual reasoning steps.
By default, the features emit-thinking-dots and just-in-time-inference are en-
abled, and the others are disabled.
set-load-path ((path string)) : (cons of string-wrapper) [Command]
Set the STELLA load path to the |-separated directories listed in path. Return the
resulting load path.
time-command ((command cons)) : object [N-Command]
Execute command, measure and report its CPU and elapsed time needed for its
execution, and then return its result.
unset-feature (&rest (features name)) : (list of keyword) [N-Command]
Disable the PowerLoom environment feature(s) named by features. Return the list
of enabled features. Calling unset-feature without any arguments can be used to
display the currently enabled features. See set-feature for a description of supported
features.
why (&rest (args object)) : [N-Command]
Print an explanation for the result of the most recent query. Without any arguments,
why prints an explanation of the top level query proposition down to a maximum
depth of 3. (why all) prints an explanation to unlimited depth. Alternatively, a
particular depth can be specified, for example, (why 5) explains down to a depth
of 5. A proof step that was not explained explicitly (e.g., due to a depth cutoff)
41
can be explained by supplying the label of the step as the first argument to why,
for example, (why 1.2.3 5) prints an explanation starting at 1.2.3 down to a depth
of 5 (which is counted relative to the depth of the starting point). The keywords
brief and verbose can be used to select a particular explanation style. In brief
mode, explicitly asserted propositions are not further explained and indicated with a
! assertion marker. Additionally, relatively uninteresting proof steps such as AND-
introductions are skipped. This explanation style option is sticky and will affect future
calls to why until it gets changed again. The various options can be combined in any
way, for example, (why 1.2.3 brief 3) explains starting from step 1.2.3 down to a
depth of 3 in brief explanation mode.
42
6 PowerLoom API
This chapter lists functions that collectively define the PowerLoom API. The first section
describes the API functions themselves. The signature is the basic Stella signature. In-
formation on how to translate the names of the functions and their arguments into the
programming languages Common Lisp, C++ or Java is given in the Language Specific In-
terface section.
Note that because names in modules that are not case-sensitive are canonicalized, the
name of the returned object may not match name exactly.
initialize () : [Function]
Initialize the PowerLoom logic system. This function needs to be called by all appli-
cations before using PowerLoom. If it is called more than once, every call after the
first one is a no-op.
reset-powerloom () : [Function]
Reset PowerLoom to its initial state. CAUTION: This will destroy all loaded knowl-
edge bases and might break other loaded STELLA systems if they do reference Pow-
erLoom symbols in their code.
operator omitted. Different from the PLI ask function, s-ask does not expect a
top-level pair of parentheses. For example, here are some legal query arguments:
"(happy Fred)"
"(happy Fred) :inference-level :assertion"
"(happy Fred) :inference-level :assertion :timeout 1.0"
Names in query will be interpreted relative to module module-name. A null module-
name 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.
The returned truth value represents the logical truth of the queried sentence as de-
termined by PowerLoom. It can be be tested via the functions is-true, is-false
and is-unknown (which see).
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.
Note that because names in modules that are not case-sensitive are canonicalized, the
name of the returned object may not match name exactly.
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.
s-get-direct-concept-instances ((concept-name string) [Function]
(module-name string) (environment environment)) : pl-iterator
Return instances of concept concept-name. Exclude instances of subconcepts of
concept-name. Depending on concept-name, the return values could be (wrapped)
literals.
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.
s-get-domain ((relation-name string) (module-name string) [Function]
(environment environment)) : logic-object
Return the type (concept) for the first argument to the binary relation relation-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.
s-get-inferred-binary-proposition-values [Function]
((relation-name string) (arg-name string) (module-name string)
(environment environment)) : pl-iterator
Return all values v such that (relation-name arg-name v) has been asserted or can
be inferred via a general PowerLoom retrieve.
A module name of null or the empty string refers to the current module. If no mod-
ule can be found with the name module-name, then a STELLA no-such-context-
exception is thrown.
s-get-nth-domain ((relation-name string) (n integer) [Function]
(module-name string) (environment environment)) : logic-object
Return the type (a concept) for the nth argument of the relation named relation-name.
Counting starts at zero.
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.
s-get-object ((name string) (module-name string) [Function]
(environment environment)) : object
Look for an object named name that is local to or visible from the module 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. name is not taken literally but will be parsed first
(see get-object).
s-get-parent-modules ((name string) (environment environment)) [Function]
: (pl-iterator of module)
Return the modules that are immediate parents of module name. If no module named
name exists, a Stella no-such-context-exception is thrown.
Chapter 6: PowerLoom API 58
s-is-true-proposition [???]
Not yet implemented.
Exceptions are made for class names that would otherwise conflict with normal Java
Classes. In that case, the prefix "Stella " is added to each class name. At the moment
this applies only to the following exceptions:
object => Stella_Object
class => Stella_Class
• Method and Function names begin with a lower case letter but each subsequent word
is capitalized. The hyphens from PowerLoom names are removed. Example:
wrapper-value => wrapperValue
• Storage slots are implemented as Java fields. The names begin with a lower case letter
but each subsequent word is capitalized. The hyphens from PowerLoom names are
removed. Example:
dynamic-slots => dynamicSlots
• Global and Special variable names are written in all uppercase. The hyphens from
PowerLoom are replaced by underscore ( ) characters. By convention, special variables
are written in PowerLoom with surrounding asterisk (*) characters. The asterisks are
replaced by dollar signs ($). Example:
*html-quoted-characters* => $HTML_QUOTED_CHARACTERS$
The most common non-alphanumeric characters are mapped as follows. A full set of
mappings is in section Section 6.2.3.7 [Java Character Mapping], page 67.
? => P (for Predicate)
! => X (eXclamation)
$ => B (Buck)
% => R (peRcent)
& => A (Ampersand)
* => $ Special variable marker.
The character mappings use uppercase characters if the basic identifier uses mixed or
lower case. The mappings use lowercase characters if the basic identifier uses upper case.
Stella modules are mapped to Java packages. The basic system distribution includes the
following package hierarchy:
edu
isi
stella
javalib
powerloom
logic
pl_kernel_kb
loom_api
Basic system functionality and data structures such as Cons and List objects are defined
in stella. PowerLoom’s logic (concepts, relations, rules, etc.) are defined in the logic package.
There is a set of interface functions in the PLI class in the powerloom package. They are
described in their own section below.
We recommend the following import statements in Java files that use PowerLoom:
import edu.isi.stella.*;
Chapter 6: PowerLoom API 64
import edu.isi.stella.javalib.*;
import edu.isi.powerloom.PLI;
import edu.isi.powerloom.logic.*;
Functions (in Java terms, static Methods) are translated as static methods on the class
of their first argument (as long as that argument is not a primitive type and is in the
same Stella module). Functions which take no arguments, those whose first argument is a
primitive type, and those whose first argument is a class not defined in the same module
are all placed into a class with the same name as the Stella module in which it appers. It
will be in the package corresponding to that Stella module. Java constructors should not
be called directly. Instead, there will be a static method new<ClassName> (with the class
name in mixed case!) that should be used instead.
Most of the functions of interest will be in the edu.isi.stella.Stella, edu.isi.powerloom.PLI
or edu.isi.powerloom.logic.Logic classes.
Methods typically refer to their first argument as "self".
Methods which return more than one return value will take a final argument which is
an array of Stella_Object, which will be used to return the additional arguments.
Primitive types in Stella have the following mapping in Java:
Stella Java
====== ====
INTEGER int
FLOAT double
NUMBER double
CHARACTER char
BOOLEAN boolean
STRING String
MUTABLE-STRING StringBuffer
NATIVE-OUTPUT-STREAM java.io.PrintStream
NATIVE-INPUT-STREAM java.io.PushbackInputStream (May change!!!)
Inside Stella/PowerLoom objects and collections, primitive types are wrapped using
Stella wrappers instead of Java’s primitive classes. So integers will be wrapped as
edu.isi.stella.IntegerWrapper rather than java.lang.Integer. Wrappers have a field called
wrapperValue which accesses the internal value. Example of use:
import edu.isi.stella.*;
import edu.isi.stella.javalib.*;
...
IntegerWrapper iWrap = IntegerWrapper.wrapInteger(42);
...
int answer = iWrap.wrapperValue;
...
rather than Stella objects. Generally that means that strings are used for PowerLoom
expressions and return values rather than Stella Cons objects.
Details about the methods can be found in the section Chapter 6 [PowerLoom API],
page 42. The names of functions in that section will need to be converted to their Java
equivalents using the conventions described in Section 6.2.3.2 [PowerLoom Java Conven-
tions], page 62. We also provide javadoc documentation for the edu.isi.powerloom.PLI
class. We recommend using this method for accessing PowerLoom functionality. We expect
to expand the range of PowerLoom interface functions that have an analog in the PLI class
over time.
// CONTEXT CHANGE.
Object savedModule = Stella.$MODULE$.get();
Module newModule
= Stella.getStellaModule(contextName, true);
if (newModule == null) { // Handle missing module
}
try {
Module.changeCurrentModule(newModule)
// Code that uses the newModule
} finally {
Module.changeCurrentModule(savedModule);
}
} finally {
Stella.$SAFETY$.set(savedValue);
}
Chapter 6: PowerLoom API 67
} finally {
Stella.$PRINTREADABLY$.set(savedValue);
}
The need to change the module using this type of code can be largely avoided by using
the functions in the PLI interface package. They take a module argument and can handle
the binding and restoration of the module value themselves.
‘ => _
{ => Y (Arbitrary (adjacent free letter))
| => V (Vertical bar)
} => Z (Arbitrary (adjacent free letter))
~ => T (Tilde)
<space> => _
while (iter.nextP()) {
processValue(iter.value);
}
The PLI class also contains a number of functions for simplifying the interaction with
PlIterator objects that are returned by various API functions. These are the getNth...
functions. They work on sequences and sequence-like objects such as Proposition and and
the value slot of PlIterator objects. Note that they do not return sequential elements of
the iterator, but rather elements of the implicit sequence that is the value of iterators that
have more than one return variable. For convenience, they also work (with index = 0) on
the value of PlIterator objects that have only a single return variable. For example:
// Get values of (object name age) in the iterator and then
// print out a message with the name and age (position 1 & 2).
Chapter 6: PowerLoom API 69
while (iter.nextP()) {
System.out.println(PLI.getNthString(iter, 1, null, null) + " is " +
PLI.getNthInteger(iter, 2, null, null ) + " years old.");
}
7 Built-In Relations
This chapter lists relations that come predefined in PowerLoom. They are defined in the
module PL-KERNEL; users can access them by including or using the PL-KERNEL module
within the declarations of their own modules.
member is derived multiple times, all occurrences are kept. This is useful, for example,
to collect and then sum up number-valued attributes of objects.
INSERT-ELEMENT ((?l list) (?n integer) (?e thing)) :-> (?r list) [Function]
Add ?e at position ?n (zero-based) to ?l to construct ?r (shifts the remaining elements
right). Count from end of the list and shift left if ?n is negative such that -1 inserts
at the end of the list, -2 second to last, etc.
a lower bound on the number of planets in the solar system, and then ask if eight is
(also) a lower bound:
(assert (range-cardinality-lower-bound hasPlanets SolarSystem 9))
(ask (range-cardinality-lower-bound hasPlanets SolarSystem 8)) ==> TRUE
PowerLoom will return TRUE. However if we ask if the minimum cardinality of the
solar system’s planets is eight, we get back UNKNOWN
(ask (range-min-cardinality hasPlanets SolarSystem 8)) ==> UNKNOWN
because eight is not the tightest lower bound.
RANGE-CARDINALITY-UPPER-BOUND ((?r relation) (?i thing) [Relation]
(?ub integer))
Relation that specifies an upper bound on the cardinality of the set of fillers of the
relation ?r applied to ?i. (see the discussion for range-cardinality-lower-bound).
RANGE-MAX-CARDINALITY ((?r relation) (?i thing)) :-> [Function]
(?maxcard integer)
Returns the strictest computable upper bound on the cardinality of the set of fillers
of the relation ?r applied to ?i. (see the discussion for range-cardinality-lower-
bound).
RANGE-MIN-CARDINALITY ((?r relation) (?i thing)) :-> [Function]
(?mincard integer)
Returns the strictest computable lower bound on the cardinality of the set of fillers
of the relation ?r applied to ?i. (see the discussion for range-cardinality-lower-
bound).
RANGE-TYPE ((?r relation) (?i thing) (?type collection)) [Relation]
Relation that specifies a type/range of the relation ?r applied to ?i. Multiple range
types may be asserted for a single pair <?r,?i>. Technically, a retrieval of types for a
given pair should include all supertypes (superconcepts) of any type that is produced,
but for utility’s sake, only asserted or directly inferrable types are returned.
REFLEXIVE ((?r relation)) [Relation]
A binary relation ?r is reflexive if it is always true when both of its arguments are
identical.
REFUTATION-QUERY ((?prop proposition)) [Relation]
Query ?prop with :inference-level set to :refutation. Equivalent to (query ?prop
:inference-level :refutation) but more efficient.
relation : mappable-object [Class]
Not documented.
abstract? : boolean [Slot of ]
Not documented.
RELATION-COMPUTATION ((?r relation) [Relation]
(?computation computed-procedure))
Names a computation (a function) that evaluates an (atomic) relation proposition
during query processing. The function is passed a proposition for evaluation for
Chapter 7: Built-In Relations 82
which all arguments are bound. The function returns a BOOLEAN if it represents a
predicate, or some sort of value if it is a function.
where both ?start and ?end are unbound in which case it can locate all occurrences
of the ?sub string in ?s. For example:
(retrieve all (?start ?end) (substring "foo" ?start ?end "o"))
==> ?start = 1, ?end = 2,
?start = 2, ?end = 3
Additional examples can be found in the test suite.
8 PowerLoom GUI
The PowerLoom GUI (or knowledge editor) is a Java-based graphical client for PowerLoom.
The GUI is implemented as a Swing-based Java application which communicates with an
embedded or remote PowerLoom server using a SOAP communication layer over HTTP.
The architecture of the PowerLoom GUI most closely resembles the traditional two-tier
client/server model. Since the GUI does not contain a great deal of business logic (e.g., it
does not know how to do inferencing), it does not directly map onto the traditional notion
of a smart client. Similarly, since PowerLoom is much “smarter” than a typical DBMS, it
does not cleanly map onto a traditional backend server. However, since the GUI contains
the presentation logic, it is more similar to a 2-tier model than a 3-tier model where the
presentation logic resides in a middle tier.
Communication between the GUI and PowerLoom is done via the XML-based SOAP
protocol. In order to effectively communication via SOAP, a Web service layer was built
on top of PowerLoom. This layer provides support for marshaling and unmarshaling of
PowerLoom objects to/from XML, and also provides a PowerLoom API that is accessible
as a web service. The Java client uses JAXM and the Castor framework (see http://www.
castor.org) to support SOAP communication.
PL-USER |=
Alternatively, PowerLoom can be started in its standard command loop mode and then
the GUI can be started with the start-powerloom-gui command. This is useful if the
Chapter 8: PowerLoom GUI 87
GUI becomes necessary at some point during development or if a different port should be
used. For example:
% powerloom
Initializing STELLA...
Initializing PowerLoom...
PL-USER |=
When the GUI is run against an embedded server as in the examples above, it is run
asynchronously and commands can be executed at the PowerLoom command loop at any
time. Moreover, when the GUI is exited, the command loop stays active until it is exited
explicitly as well.
The GUI can also be run standalone in which case the user needs to connect to a running
PowerLoom server. For example:
% powerloom --gui-only
Running standalone PowerLoom GUI...
Once the GUI is initialized, the user can connect to a server via the File -> Connect
to Server menu item. After the first connection, the host and port of the last used server
will be remembered for the next startup. If during the next startup that server is not active
anymore, an error will be signaled and the user can connect to a different server instead.
PL-USER |=
The command also accepts a :port option to make the server listen to a different port.
Alternatively, the PowerLoom Web Archive available in
powerloom-x.y.z/native/java/lib/ploom.war
can be deployed in an Apache Tomcat server by copying it into the server installation’s
webapps directory. The GUI can then connect to it at the server port used by Tomcat.
data from the server. Also, the GUI takes full advantage of Swing’s ability to control the
application via keyboard input. For example, to create a new instance named newName, a
user needs to simply type the key sequence Ctrl-I newName RET.
Context Sensitivity: For any given object that is displayed in a user interface, there is
a set of actions that can be performed on that object. Additionally, the actions that can
be performed on an object depend on where the object is displayed. Therefore, the GUI
pervasively supports context-sensitive popup menus. When users right-click on an object, a
list of appropriate actions will be presented in a menu. For example, when a user right-clicks
on a concept in the Knowledge Browser, the list of possible actions shown in Figure 8.1 is
presented.
application which would have its own application-specific menus and windows, but would
retain the general-purpose browsing, querying, and editing tools for direct manipulation of
the knowledge base.
• Query - menu items for querying the KB, searching the KB, and editing a relation’s
extension.
• View - this menu contains various items for updating the appearance of the application,
including a refresh item to bring the GUI up-to-date with the state of the KB on the
server, and menu items for showing/hiding the application’s toolbar and status bar.
This menu also contains items for changing the application’s font, for example, the
Demo Theme changes all fonts to a large bold font suitable for demo presentations.
• Navigate - contains menu items for navigating backward and forward in a browser’s
selection history.
• Window - contains a list of the currently open windows on the desktop. Selecting
a window brings the window to the top of the window stack, and if the window is
iconified, it is de-iconified.
• Help - contains an item to open an HTML help browser, and an item to open an About
box which contains information about the PowerLoom GUI.
Most menu items have accelerator keys that allow an item to be executed by a combina-
tion of keystrokes. The toolbar contains several buttons which provide shortcuts to menu
items. There are currently toolbar buttons for cutting, copying, pasting, deleting, editing
an object, and opening a query dialog. The toolbar may be undocked from its default
position by dragging it anywhere on the desktop. It may also be hidden and unhidden by
selecting the View -> Toolbar menu item.
The status bar at the bottom of the application contains information on the current
status of the application. The status bar is divided into two sections. The leftmost section
displays the last module that was selected by a user. The application keeps track of the
current module in order to provide continuity between operations. For example, if a user
opens a browser and browses the AIRCRAFT-KB, and then opens a query dialog, it makes
sense for the query dialog to use the AIRCRAFT-KB module instead of some other module.
The rightmost section of the status bar contains messages that pertain to the current
state of the application. For example, if a user selects a concept and then clicks the cut
toolbar button, a message will appear in the rightmost status bar prompting the user to
select another concept and perform a paste action. The status bar may be hidden and
unhidden by selecting the View -> Statusbar menu item.
Figure 8.2 shows a few internal frames that are open. The function of each frame is
identified in the frame’s title bar, and each type of frame has a unique icon in it’s upper
left-hand corner. In this example, the three open frames are used to browse the KB, query
the KB, and edit an instance.
A user typically follows a workflow cycle similar to the following sequence:
1. The user launches the GUI by executing the powerloom script, clicking on a desktop
icon or on a hyperlink in a browser.
2. The GUI is loaded on the user’s machine. If the GUI was launched via Java Web Start
(not yet fully supported), the entire application may need to be downloaded or updated
before execution begins.
3. The GUI reads a preferences file stored in a default location on the user’s local machine.
If this is the first time the application is being executed, a default preferences file is
Chapter 8: PowerLoom GUI 92
used. The preferences file includes among other things the PowerLoom server that was
last accessed.
4. If the preferences file contains the last-accessed server, the GUI attempts to connect
to the server and query the server for a description of the server’s capabilities. If
connection is successful, a browser window will open displaying the modules that are
currently loaded in the server instance.
5. The user selects any KB files (s)he wishes to load, and instructs the server to load the
files.
6. The user performs some browsing, querying, and editing of the loaded KB.
7. If any changes were made, the user saves the KB to a new or existing file.
8. The user repeats steps 5-7 as needed, and then exits the application.
8.4.3 KB Load/Save
In its standard configuration, PowerLoom stores knowledge bases via flat files. The user
can load one or more KB files from the local file system which will be transferred across the
network and loaded into the server instance via PowerLoom’s load command. Conversely,
a modified knowledge base can be saved to a local file on a per-module basis (using a version
of PowerLoom’s save-module command). Future versions of PowerLoom will support more
sophisticated persistence that will go directly to a database or other persistent store.
8.4.4 Browsing
The knowledge browser window, shown in Figure 8.3, can be opened by selecting the KB
-> Browse menu item or typing Ctrl-b. The browser provides a visual overview of all
knowledge in the KB, and is capable of launching specialized tools such as editors, search
dialogs, etc.
Chapter 8: PowerLoom GUI 93
The main method for filling the contents of a navigation pane is to select some object in a
navigation pane that is to the left or above it. This is discussed in more detail in the section
below. However, in some cases, it is possible to modify the contents of a navigation pane
without performing a selection. For example, in the instance navigation pane, it is possible
to show derived or inherited instances by right-clicking on the instance list and selecting an
appropriate menu item. Similarly, the relation navigation pane can toggle between direct or
inherited relations. Propositions and rules are by default displayed according to the module
that is currently selected. However, the contents of the proposition or rule navigation pane
can be updated by selecting a more specific module in the View From Module combobox
contained in the navigation pane’s title bar.
Selection: When the browser is initially opened, a tree of modules is displayed in the
module navigation pane, and all other navigation panes are empty. When a module is
selected, the remaining subpanes are populated with knowledge that is contained in that
module. Similarly, selecting a concept in the concept navigation pane populates the relation,
proposition, and instance panes with knowledge that is relevant to the selected concept. In
general, selecting an object in a given navigation pane may affect the contents of navigation
panes to the right and/or below it. More specifically, the rules for object selection are as
follows:
• Selecting a module populates the concept, relation, and instance subpanes with knowl-
edge contained in the module.
• Selecting a concept populates the relation subpane with relations that use the concept
as a domain type, and populates the instance subpane with the concept’s extension.
The proposition and rule subpanes are populated with propositions and rules associated
with the concept.
• Selecting a relation populates the proposition and rule subpanes with propositions and
rules associated with the relation.
• Selecting an instance with no selected relation populates the proposition subpane with
propositions that refer to the selected instance.
• Selecting an instance and a relation populates the proposition subpane with proposi-
tions that contain the relation as a predicate, and the instance as an argument.
• De-selecting an object will update the state of the browser appropriately. For example,
after selecting a module and a concept, deselecting the concept will refresh the concept,
relation, instance, proposition and rule subpanes to display the knowledge contained
in the selected module.
The title pane in each navigation pane displays a description of the source of the sub-
pane’s contents. For example, if both the relation WINGSPAN and the instance AGM-130 were
selected, the proposition subpane would contain the title “Propositions for WINGSPAN
and AGM-130”.
Each selection event is recorded in a selection history which can be rolled back and
forward. For example, assume the user selects the AIRCRAFT-KB module and then selects
the GUIDANCE-TYPE concept. If the user then selects the Navigate -> Back menu item, the
selection history will be rolled back so that only AIRCRAFT-KB is selected. If the user then
selects Navigate -> Forward, the selection history will be rolled forward to its original state
so that both AIRCRAFT-KB and GUIDANCE-TYPE are selected.
Chapter 8: PowerLoom GUI 95
8.4.5 Editing
Objects may be edited by right-clicking them and selecting the Edit... menu item in the
popup menu. Alternatively, an object may be selected, and then the Objects -> Edit
Object menu item or the the edit toolbar button can be pressed. Object editors do double-
duty as object viewers, since all relevant object information is present in each editor.
There are several common user actions that are available in edit dialogs. For example,
hitting RET while the cursor is positioned in the name field of the editor commits the concept.
Most editors have OK and Cancel buttons at the bottom to commit or abort edits. Lists of
items commonly have + and -- buttons at the top that allow one to add a new item or delete
the selected item. When the + button is pressed, either a chooser dialog (see Section 8.4.6
Chapter 8: PowerLoom GUI 96
[Choosers], page 97) or a specialized editor will be opened. Similar to the browser, list items
can be right-clicked to display a list of possible actions. For example, a superconcept can
be clicked in a concept editor to immediately edit the concept’s parent.
Each type of object has a specialized editor. For example, an instance editor is shown
in Figure 8.4. There are separate editors for modules, concepts, relations, instances, and
propositions/rules, which are described below.
Module Editor: The module editor contains a number of fields and components used to
enter information relevant for a new or existing module. Examples of values that can be
edited are a module’s name, its documentation and its includes (or supermodules) list.
Concept Editor: The concept editor allows editing of concept attributes such as a con-
cept’s supertypes, its name, its associated propositions, etc. In addition to the inherent
attributes of a concept, all relations which have the concept as a domain type are displayed
and may be edited. Clicking the + button above the relation list opens a new relation editor
with default values filled in. Similarly, clicking the + button above the proposition list opens
a proposition editor.
Chapter 8: PowerLoom GUI 97
Relation Editor: The relation editor allows the user to enter a list of variables and
types for the relation’s arguments, and allows the setting of various relation attributes, e.g.,
whether the relation is closed, functional, etc. Similar to the concept editor, propositions
and rules associated with a relation can be edited.
Instance Editor: The instance editor allows the user to input an instance’s name, doc-
umentation, and associated propositions. If a proposition uses the relation image-url, an
image will be retrieved from the server and presented in the editor window.
Proposition editor: The proposition editor, shown in Figure 8.5, consists of a text field for
entering the proposition, and a set of buttons for performing actions on the proposition. The
buttons allow a user to assert, deny, or retract the typed proposition. There are several text-
based facilities which support efficient editing of propositions. First, the editor supports
many Emacs-style keybindings which facilitate editing of Lisp-like expressions, including
selecting entire parenthesis-delimited subexpressions, jumping backward and forward over
subexpressions, and navigating up and down expression trees.
8.4.6 Choosers
In a number of situations, an object of a specific type must be selected. For example, when
selecting a superconcept in a concept editor, the user should be presented with a list of
Chapter 8: PowerLoom GUI 98
existing concepts. In these cases, a chooser dialog is presented to the user which displays a
filterable list of candidate objects. As the user types a name of the object in the name text
field, the list of objects is filtered so that only objects which begin with the typed prefix are
displayed. Choosers are available for modules, concept, instances, and relations. A variable
chooser allows the user to type a variable name and select a type from a concept from a
list.
by typing Ctrl-RET or by clicking on the Execute button at the bottom of the dialog.
After a query has executed, results will be displayed in the results table or a “No results
found” indicator will flash. The column headers for the results will display the correspond-
ing free variables in the query. Results may be sorted by clicking on a column header.
Doing so will sort the results by using the clicked column as an index. Users may toggle
ascending/descending sort order by clicking the header multiple times.
If the user clicks on a cell in the results table, the topmost browser will be updated to
display the selected item. Right-clicking on a query result brings up a context menu which
currently only contains an Explain result menu item. Selecting this will present an HTML
explanation in a separate window. The displayed explanation may contain hyperlinked
objects. Clicking on a hyperlinked object will update the topmost browser to display the
object.
Users may save frequently-executed queries in a query list by clicking the Save button
at the top of the options panel which will prompt them for a query name. Saved queries
will be stored in the preferences file using an XML representation. Saved queries are stored
in the combobox to the left of the save button. Selection of a saved query will prefill the
query dialog with the query and all saved parameters.
Most important PowerLoom query options are controllable in the options dialog, such
as number of results to retrieve, inference control options such as inference level, timeout,
moveout and various others.
8.4.9 Search
Users may search for objects in the KB by entering strings which match the name of the
object. A search dialog as shown in Figure 8.8 can be opened by selecting the Query ->
Search menu item, by typing Ctrl-f, or by pushing a search toolbar button (marked by
a flashlight icon) inside the browser. If the user activates a search toolbar button inside a
navigation pane, the search dialog will be configured to search for objects associated with
the type of object displayed in that pane. For example pushing the search button inside the
concept navigation pane will configure the search dialog to look for concept objects only.
Searches may be constrained in several ways. First, the module may be specified or
the user may specify that the search should be across all modules. Second, the types of
objects to be searched is configurable. For example, users may search for concepts and
instances, instances only, etc. Finally, users may specify that an object’s name must match
the beginning or end of the search string, or match the search string exactly.
Chapter 8: PowerLoom GUI 101
When the user executes the search by hitting RET or selecting the OK button, a list of
results is presented. These results are provided in a table format where one column is the
name of the retrieved object, another column contains the module that the object resides
in, and the final column specifies the type of the object (i.e., concept, instance, etc). As is
the case with query results, clicking on a search result item will update the topmost browser
to display the selected object.
8.4.10 Console
The console window, as shown in Figure 8.9, can be opened by selecting the KB -> Open
PowerLoom Console menu item or by typing Ctrl-p. This opens an internal window, which
allows PowerLoom commands to be typed directly and sent to the PowerLoom server. The
response generated by PowerLoom is sent back to the GUI and printed below the prompt.
This functionality is similar to that of a LISP listener.
Chapter 8: PowerLoom GUI 102
8.4.11 Cut/Copy/Paste/Delete
The PowerLoom GUI supports cut, copy, paste, and delete operations. These operations
can be used to edit text, and in some cases they can be used to edit objects in lists or trees.
For example, the concept hierarchy can be edited within the browser by selecting a con-
cept, executing a cut operation, selecting another concept, and then executing paste. This
sequence of operations will delete the concept from it’s original position in the hierarchy,
and make it a subconcept of the concept that was selected when the paste operation was
performed.
The GUI implements a robust data transfer framework that is capable of recognizing
the types of objects that are being transferred, and the types of potential transfer sources
and destinations. This allows the application to prohibit nonsensical data transfers such as
cutting a concept in a concept navigation pane and then trying to paste it into a module
pane. It also allows data transfer operations to be context sensitive. For example, cutting a
concept in a concept navigation pane means that a move operation is being initiated, while
cutting a concept in a concept editor’s superconcept list means that the concept should be
removed from the list. Additionally, copying an object such as a concept, then executing a
paste inside a text window will paste the name of the object.
As one would expect, text may be cut, copied and pasted between the GUI and outside
applications.
8.5.2 Undo
There is currently no undo facility and changes to the KB are written through to the server
as soon as a user clicks OK in an editing dialog. To support this properly, we would need a
snapshot mechanism that would allow rollback to earlier states of the KB.
8.5.4 Scrapbook
In creating and editing ontologies, it is sometimes desirable to maintain heterogeneous
scraps of information. We envision a scrapbook feature where text and objects of various
types could be dragged to and organized visually for later use.
8.5.6 Security
There is currently no authentication and access control mechanisms in the PowerLoom GUI.
The GUI client assumes that is communicating with a trusted host over a secure network.
Similarly, the PowerLoom server assumes that it is communicating with a friendly client
that has full access to the server. In the future, we need to add security mechanisms which
allow clients to be authenticated, and resources on the server to be made accessible to
authorized users only. In addition, we need to implement encryption mechanisms so that
clear text is not sent over insecure networks, potentially compromising sensitive data.
notification of KB updates, add support for transactions and KB locking, and improve our
caching mechanisms to detect when the GUI state is out of sync with respect to the server.
105
9 Ontosaurus
Ontosaurus is a Web-based KB browser that offers a convenient way to view the contents of
PowerLoom knowledge bases from a standard Web browser. Whenever a user searches for an
object or clicks on a hyperlink, Ontosaurus dynamically generates HTML pages describing
the requested object and related information. The description will itself contain links to
other relevant objects which the user can click on to quickly "surf" through a knowledge
base.
Similar to the PowerLoom GUI (see Chapter 8 [PowerLoom GUI], page 86), Ontosaurus
relies on a PowerLoom server that can handle HTTP requests. For this reason, it is currently
only supported in the Java version of PowerLoom or in Lisp version that supports a Web
server such as AServe or Portable AServe (e.g., Allegro CL).
To use Ontosaurus, do the following. Start PowerLoom in Java or a qualifying Lisp
version. Once PowerLoom is up and running, issue the following command:
PL-USER |= (start-ontosaurus)
PL-USER |=
The command also accepts a :port option to make the server listen to a different port.
Once the Ontosaurus server is running, go to your Web browser and enter the following URL:
http://localhost:9090/ploom/ontosaurus/ Substitute a fully qualified host name and
different port if necessary. Ontosaurus comes with a short online help page and is otherwise
self-explanatory.
Alternatively, the PowerLoom Web Archive available in
powerloom-x.y.z/native/java/lib/ploom.war
can be deployed in an Apache Tomcat server by copying it into the server installation’s
webapps directory. Ontosaurus can then connect to it at the above URL at the server port
used by Tomcat.
106
10 Installation
Any one of the Lisp, C++, or Java implementations of PowerLoom can be used to develop
your own PowerLoom-based applications. Which one you choose is primarily a matter of
your application and programming environment. The Lisp and Java versions are comparable
in speed, the C++ version is usually a factor of 2-3 faster than Lisp or Java.
which will bring up a PowerLoom listener that will allow you to execute PowerLoom
commands.
IMPORTANT: All unqualified Lisp symbols in this document are assumed to be in the
STELLA Lisp package. Moreover, the STELLA package does NOT inherit anything from the
COMMON-LISP package (see the file sources/stella/cl-lib/cl-setup.lisp for the few
exceptions). Hence, you have to explicitly qualify every Lisp symbol you want to use with
CL:. For example, to get the result of the previous evaluation, you have to type CL:* instead
of *.
PL-USER |=
This will run various PowerLoom startup code and then bring up a PowerLoom command
loop where you can execute commands. The c++ argument tells the script to run the
C++ version of PowerLoom (which is also run by default as long as the C++ version was
compiled). If the C++ version was not compiled or the java argument was given instead,
the Java version of PowerLoom will be run.
Type
(demo)
to bring up a menu of available demos, type
(run-powerloom-tests)
Chapter 10: Installation 109
PL-USER |=
Similar to the C++ executable, this will run various PowerLoom startup code and then
bring up a PowerLoom command loop where you can execute commands. Type
(demo)
to bring up a menu of available demos, type
(run-powerloom-tests)
to run the PowerLoom test suite, or type
exit
to exit PowerLoom.
you don’t need any of the STELLA sources, you can delete the directory sources/stella.
If you don’t need local copies of the STELLA and PowerLoom documentation, you can
delete parts or all of the directories sources/stella/doc and sources/logic/doc.
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!
backward-propagate-cached-network-multi-proof [Function]
((proof justification) (error float)) :
Recurse through :multiple-proofs antecedents guided by the current rule combination
scheme.
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 con-
straint is satisified or not. If more than one input value is null, then this constraint
code will not be called.
delete-neural-networks () : [Command]
Eliminate all neural networks and remove any connections to propositions and training
examples.
ensure-chameleon-ontology () : [Command]
Ensure the chameleon.plm ontology file has been loaded (assumes it exists in the
current load path).
Chapter 11: Miscellaneous 125
finalize-objects () : [Function]
Finalize all currently unfinalized objects. The user-level entry point for this is
(process-definitions).
forward-propagate-cached-network-from-justification [Function]
((just justification)) : float
Locally forward-propagate the network associated with just based on previously
cached positive-scores of antecedents.
course, if the various networks and their weights have not yet been updated during
learning.
forward-propagate-inputs (self) : float [Method on neural-network]
Activates the current inputs of the network self to compute its output. Sets self s
output slot and returns the computed value. Reads input activations and weights
and updates hidden and output activations.
forward-propagate-inputs (self) : [Method on proposition-neural-network]
float
Activates the current inputs of the network self to compute its output. Sets self s
output slot and returns the computed value. Reads input activations and weights
and updates hidden and output activations.
forward-propagate-inputs (self) : [Method on chameleon-neural-network]
float
Activates the current inputs of the network self to compute its output. Sets self s
output slot and returns the computed value. Reads input activations and weights
and updates hidden and output activations.
forward-propagate-inputs (self) : [Method on tensorflow-neural-network]
float
Activates the current inputs of the network self to compute its output. Sets self s
output slot and returns the computed value. Reads input activations and weights
and updates hidden and output activations.
forward-propagate-inputs [Method on tensorflow-batch-neural-network]
(self) : float
Activates the current inputs of the network self to compute its output. Sets self s
output slot and returns the computed value. Reads input activations and weights
and updates hidden and output activations.
function? ((relationRef object)) : boolean [Function]
Return TRUE if relationRef references a function.
generate-expression ((self object) [Function]
(canonicalizevariablenames? boolean)) : object
Return an s-expression representing the source expression for self.
generate-specialized-term (self) : object [Method on logic-thing]
Method to generate a specialized term for self. This is designed to allow for exten-
sion 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.
get-cached-network-proof ((example training-example)) : [Function]
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.
Chapter 11: Miscellaneous 128
get-one-supported-forward-justification [Function]
((proposition proposition)) : forward-justification
Return one of propositions forward justifications supported in the current context.
get-supported-forward-justifications [Function]
((proposition proposition)) : (list of forward-justification)
Return all of propositions forward justifications supported in the current context.
powerloom () : [Function]
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.
randomize-neural-networks () : [Command]
Undo all training and randomize weights in all neural networks.
Chapter 11: Miscellaneous 139
reset-clash-exceptions () : [Function]
Resets the collection of clash exceptions
reset-query-caches () : [Function]
Zero out all caches managed by the query optimizer, so that it will reoptimize subgoal
queries upon next invocation.
run-powerloom-tests () : [Command]
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.
upclassify-all-descriptions () : [Function]
Classify all named descriptions.
upclassify-all-instances () : [Function]
Classify all named instances.
initialize-kernel-kb () : [Command]
Bootstrap the PowerLoom built-in kernel KB.
157
12 Glossary
This glossary contains brief definitions for terms used in the PowerLoom User’s Manual
and/or used by the knowledge representation community. It is impractical to give a logically
precise definition for many of these terms, because their interpretation varies quite a bit. In
this case, the glossary attempts to indicate a range of interpretations consistent with their
use in PowerLoom.
Assertion: An assertion states that a particular proposition is True or False.
Backward and Forward Inference: ???
Backward Rule: ???
Binary Relation: A relation having two arguments (arity equals two), often as a mapping
from one concept domain to another. This is by far the most common form of relation.
Classifier: A classifier is a type of an inference engine that implements efficient strategies for
computing subsumption relations between pairs of concepts, or for computing instance-of
relations between a concept an a set of instances. PowerLoom implements a classifier that
can be explicitly invoked by an application program.
Clipping: If a function or single-valued binary relation maps an instance to two or more
other instances, a logical contradiction (a clash) exists. If clipping is enabled, PowerLoom
will automatically retract all assertions but the last that lead to a clash. Clipping can be
toggled on or off; it is enabled by default.
Closed-World Semantics: Under closed-world semantics it is assumed that “if proposition
P cannot be proved True, then assume that P is False.” PowerLoom gives programmers
the option to explicitly declare that concept or a relation operates under the assumption of
closed-world semantics (See also Open-World Semantics).
Concept: A concept defines a category or class of individuals. PowerLoom categorizes a
concept as a special kind of relation. The distinction between a concept and a unary relation
is subtle (some logicians do not believe that there is any distinction1 ). In linguistics, the
distinction is that between a noun and an adjective. In logic, the test we favor is whether or
not the relation has a domain — a unary relation has a domain, while a concept does not.
For example, the relation ‘married’ has domain ‘person’, while the concept ‘married-person’
does not have a domain (or is its own domain).
Constraint: “Constraint” at its most general is a synonym for “rule”. Often a constraint is
conceptualized as a rule that restricts the types of the arguments that can appear within a
tuple.
Context: ???
Default Rule: A default rule expresses an conditional implication that applies only when
its consequent is consistent with current state of the knowledge base. In other words, the
rule applies only when it will not lead to a contradition.
Definition: A definition binds a name to a logical expression. PowerLoom syntax defines
several operators with names of the form defxxx (e.g., defconcept and defrule) that
declare definitions for various types of entities.
1
but they are mistaken :).
Chapter 12: Glossary 158
Module: ???
Open-World Semantics: PowerLoom assumes an open-world semantics, unless a user ex-
plicitly specifies that it use closed-world semantics. Under this assumption, if PowerLoom
cannot prove or disprove a proposition, then it assigns that proposition the value Unknown
(See also Closed-World Semantics).
Predicate:. The term predicate is a syntactic notion that refers to the zeroth arguments of
a proposition. Predicates denote relations and properties, i.e., sets.
Proposition:. A logical sentence whose truth value can be evaluated with respect to some
context. Each PowerLoom assertion assigns the value True or False to some proposition.
Primitive Relation: P is a primitive concept or relation if and only if a proof that (P x1 ...
xn) is true exists only for the case that there exists an explicit assertion of a proposition (Q
x1 ... xn) and either Q equals P or Q is a proper subrelation of P. In otherwords, the only
rules that imply membership in P are those that relate P to one of its (proper) subconcepts
or subrelations.
Query: A query probes the informational state of a knowledge base. An ask query test
the truth of its propositional argument. A retrieve asks for sets of constants (bindings)
that make its propositional argument true when the constants are substituted in place of
its variables. The propositional argument to ask and retrieve arbitrary expression in the
first-order predicate calculus. Because of constraints imposed either by resource limitations
or inherent undecidability, PowerLoom cannot guarantee the completeness of its inferences.
Relation: ???
Retraction: A retraction changes the truth value of a proposition from either True or False
to the value Unknown. Retraction is a procedural (non-declarative) operation.
Rule: A “rule” is any universally-quantified proposition, i.e., a proposition of the form
(forall (?x1 ... ?xn) <logical sentence with free variables ?x1 ... ?xn). Power-
Loom supports several different syntactic constructs for defining rules. (See also Forward
Rule and Backward Rule).
Subsumption: A subsumption relation specifies the relative generality of two concepts. A
concept A subsumes a concept B if the definitions of A and B logically imply that members
of B must also be members of A.
Truth-Maintenance: ???
Type: Often used a synonym for the term concept. The phrase “a type of an instance”
generally refers to (one of) the concepts that the instance belongs to. The phrase “nth
domain type” refers to a concept that contains all instances of the nth column of a relation.
World: ???
160
13 PowerLoom Grammar
The syntax of PowerLoom is described below using a modified BNF notation adapted from
the KIF specification.
13.1 Alphabet
We distinguish between terminals, which are part of the language, and nonterminals. All
nonterminals are bracketed as follows <nonterminal>. Squared brackets means zero or
one instances of the enclosed expression; <nonterminal>* means zero or more occurrences
and <nonterminal>+ means one or more occurrences of <nonterminal>. The notation
<nonterminal1> - <nonterminal2> refers to all of the members of <nonterminal1> except
for those in <nonterminal2>.
A word is a contiguous sequence of characters, which include all upper case letters, lower
case letters, digits and alpha characters (ASCII character set from 93 to 128) excluding some
special characters like white spaces, single and double quotes and brackets.
<word> ::= a primitive syntactic object
Special words are those who refer to a variable. All variables are preceded by a question
mark.
<indvar> ::= a word beginning with the character ?
A string <string> is a character sequence including words plus all special charcters
(except double quotes) enclosed in double quotes. A double quote can be included in a
string if it is preceeded by the escape character ’\’.
13.2 Grammar
Legal expressions in PowerLoom are forms, which are either a statement or a definition,
described in more detail below.
<form> ::= <statement> | <definition>
13.2.2 Terms
Terms are used to denote objects in the world being described:
<term> ::= <indvar> | <constant> | <funterm> | <listterm> | <setterm> |
<quanterm>
<listterm> ::= (listof <term>*)
<setterm> ::= (setof <term>*)
<funterm> ::= (<funconst> <term>+)
Note: Zero arguments are allowed for <funterm> in KIF3.0: <term>*
<quanterm> ::= (the <vardecl> <sentence>) |
(setofall <vardecl> <sentence>) |
(kappa {<vardecl> | (<vardecl>+)} <sentence>) |
(lambda {<vardecl> | (<vardecl>+)} <term>)
Note: KIF3.0 allows <term> instead of <vardecl> for setofall. No <quanterm> as well
as no <setterm> in core of KIF as a result of descision 95-3 (March 1995).
13.2.3 Sentences
Sentences are used to express propositions about the world:
<sentence> ::= <constant> | <equation> | <inequality> |
<relsent> | <logsent> | <quantsent>
<equation> ::= (= <term> <term>)
<inequality> ::= (/= <term> <term>)
<relsent> ::= (<constant> <term>+)
Note: Zero arguments allowed in KIF3.0 for <relsent> (<term>*). <funconst> is
currently not allowed in PowerLoom (use (= <funterm> <term>) instead).
<logsent> ::= (not <sentence>) |
(fail <sentence>) |
(and <sentence>*) |
(or <sentence>*) |
(=> <sentence>* <sentence>) | (=>> <sentence>* <sentence>) |
(<= <sentence> <sentence>*) | (<<= <sentence> <sentence>*) |
(~> <sentence>* <sentence>) | (~>> <sentence>* <sentence>) |
(<~ <sentence> <sentence>*) | (<<~ <sentence> <sentence>*)
<quantsent> ::= (forall {<vardecl> | (<vardecl>+)} <sentence>) |
(forall {<vardecl> | (<vardecl>+)} <sentence> <sentence>) |
(exists {<vardecl> | (<vardecl>+)} <sentence>)
Chapter 13: PowerLoom Grammar 162
13.2.4 Definitions
PowerLoom supports two distinct categories of definitions — relation definitions (including
concept and function definitions) and rule definitions. A relation definition introduces a
new logical constant, and states some facts about that constant (e.g., who its parents are in
a subsumption taxonomy). A rule definitions binds a new constant to a proposition (so that
the constant denotes the proposition) and asserts the truth of that proposition. Usually, the
proposition asserted by a defrule is an implication. The assertional truth of a proposition
defined by a rule can be altered by asserting or retracting the constant that denotes the
proposition.
<keyword-option> ::= <keyword> <word>
<definition> ::= <reldefinition> | <objdefinition> | <ruledefinition>
<reldefinition> ::=
(defconcept <conceptconst> <vardecl>
[:documentation <string>]
[:<= <sentence>] | [:=> <sentence>] |
[:<<= <sentence>] | [:=>> <sentence>] |
[:<=> <sentence>] | [:<=>> <sentence>] | [:<<=> <sentence>] |
[:<<=>> <sentence>] |
[:axioms {<sentence> | (<sentence>+)}] |
[<keyword-option>*])
|
(deffunction <funconst> (<vardecl>+)
[:documentation <string>]
[:-> <vardecl>]
[:<= <sentence>] | [:=> <sentence>] |
[:<<= <sentence>] | [:=>> <sentence>] |
[:<=> <sentence>] | [:<=>> <sentence>] | [:<<=> <sentence>] |
[:<<=>> <sentence>] |
[:axioms {<sentence> | (<sentence>+)}]
[<keyword-option>*])
|
(defrelation <relconst> (<vardecl>+)
[:documentation <string>]
[:<= <sentence>] | [:=> <sentence>] |
[:<<= <sentence>] | [:=>> <sentence>] |
[:<=> <sentence>] | [:<=>> <sentence>] | [:<<=> <sentence>] |
[:<<=>> <sentence>] |
[:axioms {<sentence> | (<sentence>+)}]
[<keyword-option>*])
[:documentation <string>]
[<keyword-option>*])
<ruledefinition> ::= (defrule <ruleconst> <sentence>)
164
Function Index
* all-facts-of-n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 all-inconsistent-propositions . . . . . . . . . . . . . 112
all-instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
all-locally-modified-propositions . . . . . . . . 113
+ all-named-descriptions . . . . . . . . . . . . . . . . . . . . . 113
+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 all-named-instances . . . . . . . . . . . . . . . . . . . . . . . . 113
all-named-terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
all-propositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
– all-relation-values . . . . . . . . . . . . . . . . . . . . . . . . 113
- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 all-sentences-of . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
all-slot-value-types . . . . . . . . . . . . . . . . . . . . . . . 113
all-slot-values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
/ all-subrelations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
/ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 all-superrelations . . . . . . . . . . . . . . . . . . . . . . . . . . 114
all-taxonomic-types . . . . . . . . . . . . . . . . . . . . . . . . 114
all-terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
< all-types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 all-unnamed-terms . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
allocate-network-arrays on
chameleon-neural-network . . . . . . . . . . . . . 114
= allocate-network-arrays on
=< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 114
allocate-network-arrays on
> proposition-neural-network . . . . . . . . . . . . 114
allocate-network-arrays on
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 tensorflow-neural-network . . . . . . . . . . . . 114
>= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
allocate-supported-closure-iterator . . . . . . 114
allocate-transitive-closure-iterator . . . . . 115
2 ANTISYMMETRIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
apply-ask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
2_d_element on 2 d array. . . . . . . . . . . . . . . . . . . 111
2_d_element on 2 d float-array . . . . . . . . . . . . 111 apply-kappa? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
2_d_element-setter on 2 d array . . . . . . . . . . 111 apply-retrieve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
2_d_element-setter on 2 d float-array. . . . 111 arguments-unify-with-arguments? . . . . . . . . . . . 115
ARITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
ask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28, 42
A ask-partial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 assert. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
add-load-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 assert-binary-proposition . . . . . . . . . . . . . . . . . . . 43
add-testing-example . . . . . . . . . . . . . . . . . . . . . . . . 111 assert-from-query . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
add-training-example . . . . . . . . . . . . . . . . . . . . . . . 111 assert-nary-proposition . . . . . . . . . . . . . . . . . . . . . 43
AGGREGATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 assert-proposition . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
all-asserted-collection-members . . . . . . . . . . . 111 assert-rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
all-asserted-member-of- assert-unary-proposition . . . . . . . . . . . . . . . . . . . . 43
collection-supports . . . . . . . . . . . . . . . . . . . . . . 111 asserted-collection-members . . . . . . . . . . . . . . . 115
all-asserted-types . . . . . . . . . . . . . . . . . . . . . . . . . . 111 asserted-false? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
all-class-instances . . . . . . . . . . . . . . . . . . . . . . . . 112 asserted-true? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
all-cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 ASSERTION-QUERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
all-direct-subrelations . . . . . . . . . . . . . . . . . . . . 112
all-direct-superrelations. . . . . . . . . . . . . . . . . . 112
all-direct-types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
all-equivalent-relations . . . . . . . . . . . . . . . . . . . 112
all-facts-of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27, 28
all-facts-of-instance . . . . . . . . . . . . . . . . . . . . . . 112
Function Index 165
B chameleon-ignored-value-relation? . . . . . . . . 119
BACKTRACKING-QUERY . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 chameleon-partial-match-mode? . . . . . . . . . . . . . 119
backward-propagate-cached- chameleon-primitive-value-relation? . . . . . . 119
network-multi-proof . . . . . . . . . . . . . . . . . . . . . . 116 chameleon-truth-value-relation? . . . . . . . . . . . 119
backward-propagate-cached- chameleon-vector-relation? . . . . . . . . . . . . . . . . 119
network-proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 change-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
backward-propagate-error on class? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
chameleon-neural-network . . . . . . . . . . . . . 116 classify-instances . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
backward-propagate-error on classify-relations . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 116 clear-batch-arrays on neural-network . . . 119
backward-propagate-error on clear-caches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30, 43
proposition-neural-network . . . . . . . . . . . . 116 clear-instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
backward-propagate-error on clear-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30, 43
tensorflow-neural-network . . . . . . . . . . . . 116 CLOSED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
batch-backward-propagate-error on coerce-to-instance . . . . . . . . . . . . . . . . . . . . . . . . . . 119
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 116 coerce-to-instance-or-literal . . . . . . . . . . . . . 119
batch-forward-propagate-inputs on coerce-to-vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 116 COLLECT-INTO-ASCENDING-SET. . . . . . . . . . . . . . . . . . 71
batch-is-full? on neural-network . . . . . . . . 117 COLLECT-INTO-DESCENDING-SET . . . . . . . . . . . . . . . . 71
batch-process-cached-network-proof on COLLECT-INTO-LIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
network-proof-backward-queue . . . . . . . . 117 COLLECT-INTO-ORDERED-SET . . . . . . . . . . . . . . . . . . . . 72
batch-process-cached-network-proof on COLLECT-INTO-SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
network-proof-forward-queue. . . . . . . . . . 117 collection? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
batch-process-cached-network-proof on COLLECTIONOF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
network-proof-update-queue . . . . . . . . . . . 117 combine-multiple-match-scores . . . . . . . . . . . . . 119
batch-update-network-weights on COMMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 117 COMMUTATIVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
BINARY-RELATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 compact-partial-proof-to-network-proof . . . 120
bottom? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 conceive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30, 43
BOUND-VARIABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 conceive-inverted-proposition . . . . . . . . . . . . . 120
build-proposition-network on conceive-term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
chameleon-neural-network . . . . . . . . . . . . . 117 CONCEPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
build-proposition-network on CONCEPT-PROTOTYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 117 conjoin-truth-values . . . . . . . . . . . . . . . . . . . . . . . 120
build-proposition-network on cons-first . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
proposition-neural-network . . . . . . . . . . . . 117 cons-is-empty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
build-proposition-network on cons-length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
tensorflow-batch-neural-network . . . . . 118 cons-nth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
build-proposition-network on cons-nth-rest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
tensorflow-neural-network . . . . . . . . . . . . 117 cons-rest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
cons-set-first . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
cons-set-nth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
C cons-set-nth-rest . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
call-all-facts-of . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 cons-set-rest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
call-ask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 cons-to-pl-iterator. . . . . . . . . . . . . . . . . . . . . . . . . . 43
call-defconcept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 consify on justification . . . . . . . . . . . . . . . . . . . . 120
call-deffunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 consify on pl-iterator . . . . . . . . . . . . . . . . . . . . . 156
call-defobject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 consify on query-iterator . . . . . . . . . . . . . . . . . 120
call-defproposition . . . . . . . . . . . . . . . . . . . . . . . . 118 consify on query-solution-table . . . . . . . . . . . 120
call-defrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 consify-cached-query-solutions . . . . . . . . . . . . 120
call-list-undefined-relations . . . . . . . . . . . . . 118 consify-current-solutions on
call-propagate-constraints . . . . . . . . . . . . . . . . 118 query-iterator . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
call-retrieve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 consify-justification . . . . . . . . . . . . . . . . . . . . . . 121
call-retrieve-partial . . . . . . . . . . . . . . . . . . . . . . 118 constant-proposition? . . . . . . . . . . . . . . . . . . . . . . 121
call-run-forward-rules . . . . . . . . . . . . . . . . . . . . . 119 constant? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
call-set-inference-level . . . . . . . . . . . . . . . . . . . 119 copy on justification. . . . . . . . . . . . . . . . . . . . . . . . 121
CARDINALITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 copy-float-values-to-buffer . . . . . . . . . . . . . . . 121
cc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Function Index 166
F get-domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
false-truth-value? . . . . . . . . . . . . . . . . . . . . . . . . . . 125 get-enumerated-collection-members . . . . . . . . . 46
false? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 get-existing-module . . . . . . . . . . . . . . . . . . . . . . . . 150
fetch-duplicate-proposition on get-forward-justifications . . . . . . . . . . . . . . . . 128
object-store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 get-frame-arity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
fetch-instance on object-store . . . . . . . . . . . . 125 get-frame-binding-pattern. . . . . . . . . . . . . . . . . . 150
fetch-relation on object-store . . . . . . . . . . . . 126 get-frame-binding-state . . . . . . . . . . . . . . . . . . . . 150
FIFTH-ELEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 get-frame-iterator . . . . . . . . . . . . . . . . . . . . . . . . . . 150
fill-array on 2 d array . . . . . . . . . . . . . . . . . . . . 126 get-frame-proposition . . . . . . . . . . . . . . . . . . . . . . 150
fill-array on 2 d float-array . . . . . . . . . . . . . 126 get-home-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
FILLERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 get-inconsistent-propositions . . . . . . . . . . . . . 151
finalize-objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 get-inferred-binary-proposition-values . . . . 47
find-direct-supers-and-subs . . . . . . . . . . . . . . . 126 get-instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
find-direct-supers-of-instance . . . . . . . . . . . . 126 get-justification-neural-network . . . . . . . . . 128
find-instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 get-keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
find-rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 get-load-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
FIRST-ELEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 get-logic-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
FORK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 get-logic-type-name . . . . . . . . . . . . . . . . . . . . . . . . 151
forward-propagate-cached-network- get-logic-type-short-name. . . . . . . . . . . . . . . . . . 151
from-justification . . . . . . . . . . . . . . . . . . . . . . . 126 get-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47, 128
forward-propagate-cached-network-proof . . . 126 get-modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
forward-propagate-inputs on get-name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
chameleon-neural-network . . . . . . . . . . . . . 127 get-name-in-module . . . . . . . . . . . . . . . . . . . . . . . . . . 151
forward-propagate-inputs on get-neural-network-proposition on
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 127 chameleon-neural-network . . . . . . . . . . . . . 128
forward-propagate-inputs on get-neural-network-proposition on
proposition-neural-network . . . . . . . . . . . . 127 neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 128
forward-propagate-inputs on get-neural-network-proposition on
tensorflow-batch-neural-network . . . . . 127 proposition-neural-network . . . . . . . . . . . . 128
forward-propagate-inputs on get-neural-network-proposition on
tensorflow-neural-network . . . . . . . . . . . . 127 tensorflow-neural-network . . . . . . . . . . . . 128
FOURTH-ELEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 get-nth-domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
FRAME-PREDICATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 get-nth-float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
function? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 get-nth-frame-argument . . . . . . . . . . . . . . . . . . . . . 151
get-nth-frame-binding . . . . . . . . . . . . . . . . . . . . . . 151
get-nth-integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
G get-nth-logic-object . . . . . . . . . . . . . . . . . . . . . . . . 48
generate-expression . . . . . . . . . . . . . . . . . . . . . . . . 127 get-nth-string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
generate-specialized-term get-nth-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
on logic-thing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 get-object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
generate-unique-name . . . . . . . . . . . . . . . . . . . . . . . . 45 get-one-supported-forward-
get-arity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 justification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
get-binary-proposition . . . . . . . . . . . . . . . . . . . . . . 45 get-operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
get-binary-propositions . . . . . . . . . . . . . . . . . . . . . 45 get-parent-modules . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
get-cached-network-proof . . . . . . . . . . . . . . . . . . . 127 get-predicate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
get-chameleon-module . . . . . . . . . . . . . . . . . . . . . . . 128 get-proper-subrelations . . . . . . . . . . . . . . . . . . . . . 49
get-child-modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 get-proper-superrelations . . . . . . . . . . . . . . . . . . . 49
get-class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 get-property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
get-column-count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 get-property-boolean . . . . . . . . . . . . . . . . . . . . . . . 151
get-concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 get-property-float . . . . . . . . . . . . . . . . . . . . . . . . . . 151
get-concept-instance-matching-value . . . . . . . 46 get-property-integer . . . . . . . . . . . . . . . . . . . . . . . 151
get-concept-instances . . . . . . . . . . . . . . . . . . . . . . . 46 get-property-object . . . . . . . . . . . . . . . . . . . . . . . . 152
get-concept-instances-matching-value . . . . . . 46 get-property-string . . . . . . . . . . . . . . . . . . . . . . . . 152
get-current-module . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 get-proposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
get-direct-concept-instances . . . . . . . . . . . . . . . 46 get-proposition-neural-network . . . . . . . . . . . . 128
get-direct-subrelations . . . . . . . . . . . . . . . . . . . . . 46 get-propositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
get-direct-superrelations . . . . . . . . . . . . . . . . . . . 46 get-propositions-in-module. . . . . . . . . . . . . . . . . . 49
get-direct-types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 get-propositions-of. . . . . . . . . . . . . . . . . . . . . . . . . . 49
Function Index 168
get-range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 I
get-relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49, 129 ignored-value-argument? on
get-relation-extension . . . . . . . . . . . . . . . . . . . . . . 50 neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 131
get-rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35, 50 IMAGE-URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
get-self-or-prototype . . . . . . . . . . . . . . . . . . . . . . 129 in-dialect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
get-short-name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 in-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
get-skolem-name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 inconsistent-truth-value?. . . . . . . . . . . . . . . . . . 131
get-skolem-short-name . . . . . . . . . . . . . . . . . . . . . . 152 inconsistent? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
get-slot-maximum-cardinality . . . . . . . . . . . . . . 129 INEQUALITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
get-slot-minimum-cardinality . . . . . . . . . . . . . . 129 initialize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
get-slot-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 initialize-kernel-kb . . . . . . . . . . . . . . . . . . . . . . . 156
get-slot-value-type . . . . . . . . . . . . . . . . . . . . . . . . 129 initialize-network-weights on
get-stella-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 tensorflow-neural-network . . . . . . . . . . . . 131
get-stella-type-name . . . . . . . . . . . . . . . . . . . . . . . 152 insert-at on query-solution-table . . . . . . . . 131
get-stella-type-short-name . . . . . . . . . . . . . . . . 152 INSERT-ELEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
get-supported-forward-justifications . . . . . 129 INSTANCE-OF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
get-symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 INVERSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
get-tensorflow-callback . . . . . . . . . . . . . . . . . . . . 129 invert-truth-value . . . . . . . . . . . . . . . . . . . . . . . . . . 131
get-types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 IRREFLEXIVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
get-unary-propositions . . . . . . . . . . . . . . . . . . . . . 152 is-a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
get-undefined-relations . . . . . . . . . . . . . . . . . . . . 152 is-default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
get-variable-name . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 is-defined-property . . . . . . . . . . . . . . . . . . . . . . . . 153
get-variable-short-name . . . . . . . . . . . . . . . . . . . . 152 is-enumerated-collection . . . . . . . . . . . . . . . . . . . . 50
get-vector-argument-spec on is-enumerated-list . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 129 is-enumerated-set . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
get-vector-argument-spec on is-false . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
tensorflow-batch-neural-network . . . . . 130 is-float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
get-vector-argument-spec on is-frame-binding-pattern . . . . . . . . . . . . . . . . . . . 153
tensorflow-neural-network . . . . . . . . . . . . 129 is-inconsistent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
get-vector-argument-spec on is-instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
vector-neural-network . . . . . . . . . . . . . . . . . 129 is-integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
get-visible-clash-exceptions . . . . . . . . . . . . . . 130 is-known . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
get-why-justification . . . . . . . . . . . . . . . . . . . . . . 130 is-logic-object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
get-whynot-justifications. . . . . . . . . . . . . . . . . . 130 is-number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
GOES-FALSE-DEMON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 is-skolem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
is-strict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
GOES-TRUE-DEMON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
is-string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
GOES-UNKNOWN-DEMON . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
is-subrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
is-true . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
is-true-binary-proposition. . . . . . . . . . . . . . . . . . 51
H is-true-nary-proposition . . . . . . . . . . . . . . . . . . . 153
has-forward-justifications? . . . . . . . . . . . . . . . 130 is-true-proposition. . . . . . . . . . . . . . . . . . . . . . . . . . 51
has-supported-forward-justifications? . . . . 130 is-true-unary-proposition . . . . . . . . . . . . . . . . . . . 51
has-vector-arguments? on is-unknown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 130 is-variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
has-vector-arguments? on ISSUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
vector-neural-network . . . . . . . . . . . . . . . . . 130 IST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
have-active-object-stores? . . . . . . . . . . . . . . . . 130 iterator-to-pl-iterator . . . . . . . . . . . . . . . . . . . . . 51
help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
help-compute-argument-index . . . . . . . . . . . . . . . 130
help-print-outline on description . . . . . . . . . 131 J
help-print-outline on just-in-time-inference-cache? . . . . . . . . . . . . . 131
named-description. . . . . . . . . . . . . . . . . . . . . . . . 130
HOLDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
K
known-truth-value? . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Function Index 169
L MUTUALLY-DISJOINT-COLLECTION . . . . . . . . . . . . . . . 78
length on pl-iterator . . . . . . . . . . . . . . . . . . . . . . . . 51
length on query-solution-table . . . . . . . . . . . . 131
LENGTH. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
N
LEXEME. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 NAME-TO-OBJECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
link-neural-network on named-description? . . . . . . . . . . . . . . . . . . . . . . . . . . 134
chameleon-neural-network . . . . . . . . . . . . . 132 natural-deduction-mode? . . . . . . . . . . . . . . . . . . . . 134
link-neural-network on neural-network . . 131 next? on pl-iterator . . . . . . . . . . . . . . . . . . . . . . . . . 52
link-neural-network on non-empty? on float-vector . . . . . . . . . . . . . . . . 134
proposition-neural-network . . . . . . . . . . . . 131 non-empty? on query-solution-table . . . . . . . 134
link-neural-network on NORMAL-QUERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
tensorflow-neural-network . . . . . . . . . . . . 132 normalize-chameleon-training-options . . . . . 134
list-features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 notify-of-completion on
list-first . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 network-proof-queue . . . . . . . . . . . . . . . . . . . . 134
list-inconsistent-propositions . . . . . . . . . . . . . 35 nth on query-solution-table . . . . . . . . . . . . . . . 134
list-modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 nth-batch-key on neural-network . . . . . . . . . 134
list-nth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 nth-batch-output on neural-network . . . . . . 134
list-rest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 nth-input on
list-to-pl-iterator. . . . . . . . . . . . . . . . . . . . . . . . . . 51 chameleon-neural-network . . . . . . . . . . . . . 134
list-unclassified-instances . . . . . . . . . . . . . . . . 35 nth-input on neural-network . . . . . . . . . . . . . . 134
list-unclassified-relations . . . . . . . . . . . . . . . . 35 nth-input on
list-undefined-relations . . . . . . . . . . . . . . . . . . . . 36 proposition-neural-network . . . . . . . . . . . . 134
LIST-CONCATENATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 nth-input on
listify on pl-iterator . . . . . . . . . . . . . . . . . . . . . 156 tensorflow-batch-neural-network . . . . . 134
listify on query-iterator . . . . . . . . . . . . . . . . . 132 nth-input on
LISTOF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 tensorflow-neural-network . . . . . . . . . . . . 134
load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 51 nth-input-error on
load-cmd-line-files . . . . . . . . . . . . . . . . . . . . . . . . 132 chameleon-neural-network . . . . . . . . . . . . . 135
load-command-eval-phase . . . . . . . . . . . . . . . . . . . . 132 nth-input-error on neural-network . . . . . . . 134
load-directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 nth-input-error on
load-file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 proposition-neural-network . . . . . . . . . . . . 135
load-in-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 nth-input-error on
load-native-stream . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 tensorflow-batch-neural-network . . . . . 135
load-native-stream-in-module . . . . . . . . . . . . . . 153 nth-input-error on
load-stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52, 132 tensorflow-neural-network . . . . . . . . . . . . 135
load-stream-in-module . . . . . . . . . . . . . . . . . 132, 154 nth-kth-batch-input-error on
locally-modified-proposition? . . . . . . . . . . . . . 132 neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 135
logic-class? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 NTH-DOMAIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
logic-form-less? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 NTH-ELEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
logic-module? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 NTH-HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
lookup on query-solution-table . . . . . . . . . . . . 133 NTH-REST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
lookup-native-computation. . . . . . . . . . . . . . . . . . 133 number-of-ignored-value-arguments on
lookup-native-specialist . . . . . . . . . . . . . . . . . . . 133 neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 135
lookup-proposition-neural-network . . . . . . . . 133 number-of-inputs on
chameleon-neural-network . . . . . . . . . . . . . 135
number-of-inputs on neural-network . . . . . . 135
M number-of-inputs on
make-cached-query . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 proposition-neural-network . . . . . . . . . . . . 135
MAXIMUM-ELEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 number-of-inputs on
MAXIMUM-VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 tensorflow-batch-neural-network . . . . . 135
MEAN-VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 number-of-inputs on
MEDIAN-VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 tensorflow-neural-network . . . . . . . . . . . . 135
MEMBER-OF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 number-of-truth-value-arguments on
merge-truth-values . . . . . . . . . . . . . . . . . . . . . . . . . . 133 neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 135
meta-inference-cache? . . . . . . . . . . . . . . . . . . . . . . 133 number-of-vector-argument-inputs on
meta-proposition? . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 vector-neural-network . . . . . . . . . . . . . . . . . 135
MINIMUM-ELEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 number-of-vector-argument-specs on
MINIMUM-VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 vector-neural-network . . . . . . . . . . . . . . . . . 136
Function Index 170
retract-binary-proposition. . . . . . . . . . . . . . . . . . 52 SCALAR-INTERVAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
retract-facts-of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 SECOND-ELEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
retract-facts-of-instance. . . . . . . . . . . . . . . . . . 140 select-proof-result . . . . . . . . . . . . . . . . . . . . . . . . 141
retract-from-query . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 select-test-result . . . . . . . . . . . . . . . . . . . . . . . . . . 141
retract-nary-proposition . . . . . . . . . . . . . . . . . . . . 53 select-training-examples . . . . . . . . . . . . . . . . . . . 142
retract-proposition. . . . . . . . . . . . . . . . . . . . . . . . . . 53 set-error-print-cycle . . . . . . . . . . . . . . . . . . . . . . 142
retract-rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 set-feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
retract-unary-proposition . . . . . . . . . . . . . . . . . . . 53 set-frame-binding-state . . . . . . . . . . . . . . . . . . . . 155
retrieve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38, 53 set-frame-iterator . . . . . . . . . . . . . . . . . . . . . . . . . . 155
retrieve-partial . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 set-inference-level . . . . . . . . . . . . . . . . . . . . . . . . 142
retrieve-training-examples . . . . . . . . . . . . . . . . 140 set-input-values on
run-forward-rules . . . . . . . . . . . . . . . . . . . . . . . 53, 141 chameleon-neural-network . . . . . . . . . . . . . 142
run-powerloom-tests . . . . . . . . . . . . . . . . . . . . . . . . 141 set-input-values on neural-network . . . . . . 142
set-input-values on
proposition-neural-network . . . . . . . . . . . . 142
S set-input-values on
s-ask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 tensorflow-batch-neural-network . . . . . 142
s-assert-proposition . . . . . . . . . . . . . . . . . . . . . . . . 54 set-input-values on
s-change-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 tensorflow-neural-network . . . . . . . . . . . . 142
s-clear-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 set-load-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
s-conceive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 set-marker on marker-table . . . . . . . . . . . . . . . . 142
s-create-concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 set-nth-frame-binding . . . . . . . . . . . . . . . . . . . . . . 155
s-create-function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 set-num-neighbors . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
s-create-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 set-num-training-per-case. . . . . . . . . . . . . . . . . . 142
s-create-object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 set-powerloom-feature . . . . . . . . . . . . . . . . . . . . . . 142
s-create-relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 set-property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
s-destroy-object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 set-property-boolean . . . . . . . . . . . . . . . . . . . . . . . 156
s-evaluate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 set-property-float . . . . . . . . . . . . . . . . . . . . . . . . . . 156
s-get-arity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 set-property-integer . . . . . . . . . . . . . . . . . . . . . . . 156
s-get-child-modules. . . . . . . . . . . . . . . . . . . . . . . . . . 56 set-property-object . . . . . . . . . . . . . . . . . . . . . . . . 156
s-get-concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 set-property-string . . . . . . . . . . . . . . . . . . . . . . . . 156
s-get-concept-instances . . . . . . . . . . . . . . . . . . . . . 56 set-save-network-cycle . . . . . . . . . . . . . . . . . . . . . 143
s-get-direct-concept-instances . . . . . . . . . . . . . 57 set-vector-input-values on
s-get-domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 chameleon-neural-network . . . . . . . . . . . . . 143
s-get-inferred-binary- set-vector-input-values on
proposition-values . . . . . . . . . . . . . . . . . . . . . . . . 57 neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 143
s-get-nth-domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 set-vector-input-values on
s-get-object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 tensorflow-batch-neural-network . . . . . 143
s-get-parent-modules . . . . . . . . . . . . . . . . . . . . . 57, 58 set-vector-input-values on
s-get-proposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 tensorflow-neural-network . . . . . . . . . . . . 143
s-get-propositions . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 set-vector-input-values on
s-get-propositions-of . . . . . . . . . . . . . . . . . . . . . . . 58 vector-neural-network . . . . . . . . . . . . . . . . . 143
s-get-range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 SETOF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
s-get-relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 shallow-copy on justification . . . . . . . . . . . . . . 143
s-get-relation-extension . . . . . . . . . . . . . . . . . . . . 59 SHALLOW-QUERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
s-get-rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 SINGLE-VALUED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
s-is-true-nary-proposition . . . . . . . . . . . . . . . . 155 sort on query-solution-table . . . . . . . . . . . . . . 143
s-is-true-proposition . . . . . . . . . . . . . . . . . . . . . . . 59 specializes? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
s-print-rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 SQUARE-ROOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
s-register-computation-function . . . . . . . . . . . 155 STANDARD-DEVIATION . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
s-register-specialist-function . . . . . . . . . . . . 155 start-ontosaurus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
s-retract-proposition . . . . . . . . . . . . . . . . . . . . . . . 59 start-powerloom-gui . . . . . . . . . . . . . . . . . . . . . . . . 144
s-retrieve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 start-powerloom-server . . . . . . . . . . . . . . . . . . . . . 144
s-save-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 stop-ontosaurus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
satisfies? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 stop-powerloom-gui . . . . . . . . . . . . . . . . . . . . . . . . . . 144
save-all-neural-networks . . . . . . . . . . . . . . . . . . . 141 stop-powerloom-server . . . . . . . . . . . . . . . . . . . . . . 144
save-module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 60 strengthen-truth-value . . . . . . . . . . . . . . . . . . . . . 144
SCALAR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 strict-truth-value? . . . . . . . . . . . . . . . . . . . . . . . . 144
172
string-to-object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 unlink-neural-network on
string-to-stella-expression . . . . . . . . . . . . . . . 156 proposition-neural-network . . . . . . . . . . . . 146
STRING-CONCATENATE . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 unlink-neural-network on
STRING-MATCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 tensorflow-neural-network . . . . . . . . . . . . 146
STRING-MATCH-IGNORE-CASE . . . . . . . . . . . . . . . . . . . . 83 unnamed-description? . . . . . . . . . . . . . . . . . . . . . . . 146
stronger-truth-value? . . . . . . . . . . . . . . . . . . . . . . 144 unregister-neural-network. . . . . . . . . . . . . . . . . . 146
SUBRELATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 unregister-object . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
SUBSET-OF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
unregister-object-store . . . . . . . . . . . . . . . . . . . . 146
SUBSTRING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
unset-feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
SUBSUMPTION-QUERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
SUM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 unset-powerloom-feature . . . . . . . . . . . . . . . . . . . . 147
SUPERRELATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 upclassify-all-descriptions . . . . . . . . . . . . . . . 147
SYMMETRIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 upclassify-all-instances . . . . . . . . . . . . . . . . . . . 147
SYNONYM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 upclassify-instances . . . . . . . . . . . . . . . . . . . . . . . 147
upclassify-named-descriptions . . . . . . . . . . . . . 147
update-network-weights on
T chameleon-neural-network . . . . . . . . . . . . . 147
tensorflow-backend-available? . . . . . . . . . . . . . 144 update-network-weights on
termify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 147
test-closed-slot? . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 update-network-weights on
test-environment-level? . . . . . . . . . . . . . . . . . . . . 156 proposition-neural-network . . . . . . . . . . . . 147
test-function-slot? . . . . . . . . . . . . . . . . . . . . . . . . 145 update-network-weights on
test-marker? on marker-table . . . . . . . . . . . . . 145 tensorflow-neural-network . . . . . . . . . . . . 147
test-relation-on-arguments? . . . . . . . . . . . . . . . 145 update-proposition-in-store on
test-slot-value? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
object-store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
test-special-marker-table? . . . . . . . . . . . . . . . . 145
update-tuple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
test-subrelation? . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
test-type-on-instance? . . . . . . . . . . . . . . . . . . . . . 145
THIRD-ELEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
time-command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
TOTAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 V
train-chameleon-neural-networks . . . . . . . . . . . 145
VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
TRANSITIVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
VARIABLE-ARITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
translate-loom-file . . . . . . . . . . . . . . . . . . . . . . . . 145
true-truth-value? . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 VARIANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
true?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 vector-argument-index on
truth-value-argument-index on neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 148
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 146 vector-argument-index on
truth-value-argument? on vector-neural-network . . . . . . . . . . . . . . . . . 148
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 146 vector-argument? on neural-network . . . . . . 148
TYPE-OF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 vector-argument? on
vector-neural-network . . . . . . . . . . . . . . . . . 148
U
unassert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
unassert-proposition . . . . . . . . . . . . . . . . . . . . . . . 146 W
unknown-truth-value? . . . . . . . . . . . . . . . . . . . . . . . 146
unknown? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 weaken-truth-value . . . . . . . . . . . . . . . . . . . . . . . . . . 148
unlink-neural-network on why . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
chameleon-neural-network . . . . . . . . . . . . . 146 with-logic-environment . . . . . . . . . . . . . . . . . . . . . 148
unlink-neural-network on within-classification-session . . . . . . . . . . . . . 148
neural-network . . . . . . . . . . . . . . . . . . . . . . . . . . 146 within-meta-cache . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
173
Variable Index
A K
abstract? of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 kind of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
all-super-contexts of . . . . . . . . . . . . . . . . . . . . . . . 73
any-value of . . . . . . . . . . . . . . . . . . . . . . . . . . 72, 77, 82
arguments of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 M
method-code of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
method-function? of . . . . . . . . . . . . . . . . . . . . . . . . . . 75
B method-parameter-names of . . . . . . . . . . . . . . . . . . . 75
base-module of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 method-parameter-type-specifiers of . . . . . . . 75
method-return-type-specifiers of . . . . . . . . . . . 75
method-setter? of . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
C method-stringified-source of . . . . . . . . . . . . . . . 75
child-contexts of . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
context-number of . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
O
D operator of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
dependent-propositions of . . . . . . . . . . . . . . . . . . . 80
S
F surrogate-value-inverse of . . . . . . . . . . . . . . . . . . 84
function-code of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
T
H the-cons-list of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
home-context of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 truth-value of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
174
Concept Index
(Index is nonexistent)