[comp.lang.prolog] Knowledge representation and Prolog

ok@quintus (06/16/88)

This is a forwarded message.
In the future, I suggest that instead of sending things to me for
forwarding, people should send mail to the Prolog Digest at
	Prolog@Polya.Stanford.EDU

FORWARDED MESSAGE:
  Does anyone know of any KRL written in Prolog besides APES?  Has anyone any
  comments on attempts to mimic KEE or ART type systems in Prolog? 
   
  Jerry Harper: Merrion Gates Software, Rosemount Court, Booterstown Avenue,
              : Co Dublin, IRELAND
  jharper@euroies.uucp

finin@antares.PRC.Unisys.COM (Tim Finin) (06/17/88)

In article <121@quintus.UUCP> jharper@euroies.UUCP (Jerry Harper) writes:
>  Does anyone know of any KRL written in Prolog besides APES?  Has anyone any
>  comments on attempts to mimic KEE or ART type systems in Prolog? 
>   
>  Jerry Harper: Merrion Gates Software, Rosemount Court, Booterstown Avenue,
>              : Co Dublin, IRELAND
>  jharper@euroies.uucp

We here at the Unisys Paoli Research Center have been using KNET, a
Knowledge Represention system implemented in Prolog, on a number of AI
projects since about 1982.  Attached is a brief description of KNET.
More details can be found in an article which will appear in a
forthcoming issue of the Journal of Logic Programming.  Tim

___________________________________________________________________________


KNET is a frame-based knowledge representation system developed at the
Unisys Paoli Research Center to support the acquisition and
maintenance of large, real-world knowledge bases.  The KNET system is
currently being used in a rule-based diagnosis and maintenance system
(KSTAMP), in a model-driven configuration expert system (BEACON) and
in our natural language processing system (PUNDIT).

The KNET representation language is similar to KL-ONE in that it is
based on a formal semantic model which defines the meaning of objects
in its knowledge bases.  Objects in the knowledge base are called
concepts, each of which has a unique name.  A KNET knowledge structure
consists of a number of concepts organized into two distinct data
structures, called hierarchies.  Each hierarchy has its own structure,
but the two are related in a complex manner.

The first hierarchy is the specialization hierarchy.  Concept B is
said to specialize concept A if B is a kind of A.  There is a single
designated root concept, and all concepts participate in the
specialization hierarchy.  It is essentially the IS-A hierarchy used
as a basis of conventional semantic networks.  It is used so that
components (see below) may be described at a single concept and
inherited by all the children of that concept.  The specialization
hierarchy is more general than the conventional IS-A network in that
it is possible for a concept to specialize more than one other
concept, thus inheriting properties from all its parents.  This
feature is termed multiple inheritance.

The second hierarchy is the aggregation hierarchy.  In this hierarchy,
the children of a concept are its components, and taken as an
aggregate they completely define that concept.  In some cases these
children are not components in a literal sense, but are properties, as
for example the wall voltage required by a device may be a property of
that device.  A link in this hierarchy consists of an object called a
role which names the component, together with a connection to the
owner of the role and another connection to the type of the role
(which is another concept).

The final constituent of a KNET structure is the constraint.  A
constraint is a piece of executable code attached to the network.  The
code is available for use by a program using KNET (an application);
whether, when, and how it is used is up to the application.  A
constraint is housed at some particular concept, and refers to one or
more roles.  Exactly one of the roles referred to by a constraint is
designated as the trigger of the constraint; the remaining roles are
the targets of the constraint.  The purpose of the trigger is to
provide a means for indicating within the KNET structure when an
application program should use a constraint.  The meaning of a
constraint is always defined relative to the context in which the
constraint occurs.  This means that references to roles made from
within an inherited constraint always refer to the local context
rather than to the context in which the constraint was originally
defined.

Finally, it is important to maintain consistency in knowledge
networks.  The definition of consistency varies for differing kinds of
knowledge representation, and depends on the semantic model
implemented by the knowledge representation.  For KNET, a fundamental
consistency requirement is the subsumption requirement, defined as
follows: If concept A has a role R with type B, and if concept A2
specializes A, then the type of the inherited role R2 must be B or a
specialization of (a specialization of ...) B.  If this requirement is
not met, a subsumption violation is said to occur.  The program which
builds KNET structures, the Browser/Editor, automatically checks for
and disallows subsumption violations and several other types of
inconsistencies.

KNET has been implemented in a standard subset of Prolog which has
allowed it to be ported to several different Prolog systems on a
variety of machines.  Versions of KNET run on VAXes, Suns, Lisp
machines and PCs.  An interactive browser/editor system for KNET
knowledge bases can use a simple ASCII terminal interface, enabling
its use on each of these machines.  A more sophisticated graphical
browser/editor is available for use on Sun workstations.
Tim Finin			finin@prc.unisys.com
Paoli Research Center		..!{psuvax1,sdcrdcf,cbmvax,bpa}!burdvax!finin
Unisys Corporation		215-648-7446 (o)  
PO Box 517, Paoli PA 19301	215-386-1749 (h)

shardy@teknowledge-vaxc.ARPA (Steve Hardy) (06/17/88)

Jerry Harper asks about knwoledge representation languages
written in Prolog (besides APES.)

Teknowledge developed a prolog-based expert system shell called
M.1.  It was released in June 1984 and has sold close to 4,000
copies.

M.1 is unusual in that it is a complete logic programming
language as well as being an easy-to-use expert system shell.

For example:

/* --- simple EMYCIN-like heuristic rule --- */

	if main-component-of-meal = beef
		then best-color-of-wine = red cf 75.

/* --- list processing --- */

	infix <>.		/* for "append" */

	[] <> LIST = LIST.

	if LIST1 <> LIST2 = LIST3
	   then [ITEM|LIST1] <> LIST2 = [ITEM|LIST3].

/* --- objects and inheritance --- */

	issquare(obj-22).
	size(obj-22) = 5.

	if isrectangle(X) and
		height(X) = H and width(X) = W and H * W = R
	    then area(X) = R.

	if issquare(X) then isrectangle(X).
	if issquare(X) and size(X) = S then height(X) = S.
	if issquare(X) and size(X) = S then width(X) = S.

After releasing four versions of M.1 in Prolog, Teknowledge
recoded the system in C.  This led to the system being
approximately five times faster and able to handle knowledge
systems five times larger (up to 2000 rules on a 640K IBM-PC.)

It was easier to work out the design of M.1 with Prolog than it
would have been with C.

Steve Hardy, Teknowledge Inc., (415) 424-0500
DISCLAIMER: My opinioins are not necessarily those of
Teknowledge.