Scone User's Guide
Scott E. Fahlman
Carnegie Mellon University
School of Computer Science
sef@cs.cmu.edu
August 25, 2008
Copyright Notice:
This manual is copyright © 2003-2008 by Scott E. Fahlman.
Carnegie Mellon
University holds the copyright to
the Scone software.
The Scone software is made available to the
public under the CPL 1.0 Open Source license.
A copy of this license is distributed with the software. The license can also be found at http://www.opensource.org/licenses/cpl.php.
By using, modifying, reproducing, or distributing the Scone
software, you agree to be bound by the terms and conditions set forth in the
CPL 1.0 Open Source License. If you do not
agree to these terms and conditions, or if they are not legally applicable in
the jurisdiction where such use takes place, then you may not use the Scone
software.
Scone incorporates some parts of
the NETL2 Knowledge Representation System, developed by Scott E. Fahlman for
IBM Corporation between June 2001 and May 2003.
IBM holds the copyright on NETL2 and has made that software available to
the author under the CPL 1.0 Open Source license.
Acknowledgment:
Development of Scone has been
supported in part by the Defense Advanced Research Projects Agency (DARPA)
under contract NBCHD030010. Any
opinions, findings and conclusions or recommendations expressed in this
material are those of the author(s) and do not necessarily reflect the views of
DARPA or the Department of Interior-National Business Center (DOI-NBC).
Table of Contents
1. Overview.. 5
Note on Common Lisp Syntax. 5
2. Running Scone. 6
3. Loading and
Saving KB Files. 8
Functions. 8
4. Structure of
Scone Elements. 8
Functions. 10
5. Flags,
Properties, and Markers. 11
Functions. 13
6. Referring to
Scone Elements. 15
6.1 Element Internal
Names. 15
Functions. 17
6.2 Element
External (English) Names. 18
Functions. 20
7. Scone
Elements. 21
7.1 Creating New
Elements. 21
7.2 Indv Nodes. 23
Functions. 24
7.3 Type Nodes. 24
Functions. 25
7.4 IS-A Links. 26
Functions. 26
7.5 EQ Links. 26
Functions. 26
7.6 Cancel Links. 27
Functions. 27
7.7 Relations. 27
Functions. 28
7.8 Statement
Links. 29
Functions. 29
7.9 Splits and
Complete Splits. 30
Functions. 30
7.10 Negations. 31
Functions. 31
8. More
Functions to Create Network Structure. 32
Functions. 32
9. Removing
Elements. 33
Functions. 33
10. Marker Scans. 33
Functions. 33
11. Queries and
Predicates. 34
Functions. 35
12. Mark, List,
and Show Functions. 35
Functions. 35
13. Roles. 37
Functions That Create New Structure in the KB.. 37
Query Functions for Roles. 38
14. Relations and
Statements. 39
Functions. 39
15. Cardinality. 40
16. Miscellaneous
Functions. 40
17. Domain-Specific
Structure-Creation Functions. 40
Functions. 40
18. Scone Crib
Sheet 42
19. Alphabetical
Function List 47
Scone is a knowledge-base (KB)
system intended for use as a component in a wide range of software
applications. Scone
comprises a search/inference engine and a base-load of common knowledge. Application-specific knowledge and interfaces
to other applications can be added on top of this common base.
The current version of Scone is
written in Common Lisp. The primary
vehicle for Scone development is CMU Common Lisp (http://www.cons.org/cmucl/), a free,
high-performance implementation of Common Lisp running on Intel/Linux
systems. However, Scone
also has been run successfully on commercial Common Lisp systems such as LispWorks
and Allegro Common Lisp.
Scone
can be run as a server process on an Intel/Linux system, communicating with
other software applications via character-stream I/O using the TCP/IP socket
mechanism. The other software
applications may be written in any computer language and may be on the same
machine or a different machine on the Internet.
Scone is designed for efficiency of
search and inference on conventional high-end workstations, though the Scone
architecture was originally designed with parallelism in mind. Scone is therefore
well suited for future implementation on a massively parallel machine or
perhaps a computing grid.
The greatest problem for users of knowledge-base systems
has been the difficulty of adding new knowledge to the system and making that
knowledge fully effective. This gives
rise to spotty coverage of common-sense domains. Scone attempts to ease
this burden by relatively clean design and by separating system-efficiency
concerns from knowledge-entry concerns.
This manual covers the operation and functions of the Scone
software. It is not intended to be a
tutorial on knowledge representation in Scone. Such a tutorial document is needed, and it is
currently under development.
This manual assumes that the reader has some general
familiarity with Common Lisp syntax. As
a quick reminder, if this document indicates
that a function’s syntax looks like this
(some-function
a b &optional c)
then some-function
is the name of the function, arguments a and b
are required, while argument c
is optional, with some default value.
The default default value is nil – Lisp's representation for both the empty list and
"false".
If a function's syntax specification looks like this
(some-function
a b &key cat dog)
then a
and b are
required arguments, while dog
and cat are
optional “keyword” arguments, which the caller can pass in any order. So some syntactically legal calls to this
function would include the following
(some-function
27 'my-arg)
(some-function 27 'my-arg :cat "Felix" :dog "Fido")
(some-function 27 'my-arg :dog "Fido" :cat "Felix")
In Common Lisp, 'foo represents a
quoted constant (in this case the symbol foo), and "foo" represents a
string. Symbols prefixed with the colon
character are called keywords, and are self-quoting; these are used for
named tokens or enumerations and for labeling the keyword/value pairs in a function
call.
In Common Lisp, functions may return more than one value
via the values
form. This is useful when a function
generates more than one useful value – for example, to return both a quotient
and a remainder from a division function.
If the function is called normally, return values beyond the first one
are discarded, but if the function is called under multiple-value-bind or similar functions,
several return values are captured.
In this document we will often say "if the :foo argument is t …", but in fact
any non-nil value
will work in such situations. It seems
needlessly confusing to say "if :foo is provided and is non-nil…" in dozens of different
places.
The curly-brace syntax that Scone
uses for element internal names is not standard Common Lisp syntax; it is a
Scone-specific extension created using Lisp's character macro facility.