Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!goldenapple.srv.cs.cmu.edu!das-news2.harvard.edu!news.dfci.harvard.edu!camelot.ccs.neu.edu!news.mathworks.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!cam-news-feed5.bbnplanet.com!WWW1!not-for-mail
From: Everardo Cunha <ecunha@foxboro.com>
Subject: Re: VW inference engine - NeOpus
Message-ID: <33393F71.51BF@foxboro.com>
Date: Wed, 26 Mar 1997 10:23:29 -0500
References: <33373411.6A5@sprintmail.com>
X-Mailer: Mozilla 3.0Gold (WinNT; I)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 272

Hello Gang,

	I have been using NeOpus for almost a year in a manufacturiing
environment and believe that it is a sound product. Here is a brief
description of the product by the author, Francois Pachet.

	If you need more info, please email me.

	Thank you,

	Everardo

README file for general information about the NeOpus system
***********************************************************
Francois Pachet (pachet@laforia.ibp.fr)

More info on the web at: 
http://www-laforia.ibp.fr/~fdp/NeOpus.html



Background 
*************

The NeOpus system is basically an extension to Smalltalk-80 with first
order, forward chaining production rules.
It originated from an OOPSLA '87 paper by [Atkinson@Laursen]
(ParcPlace),
that described the "Opus" system, a transposition of OPS5 rules in
Smalltalk-80.
The NeOpus system is a rewriting of the Opus system that started in 89,
and
includes a number of original features (described below). It has been
the
core of a number of research projects in Knowledge Representation at
LAFORIA
(AI lab of Paris 6 University) and other research labs in France.
The system's implementation, as well as a discussion of the conceptual
hypothesis
and methodological issues may be found in F. Pachet' PhD thesis (in
French,
available at LAFORIA on request).
Some other papers describe various aspects of the system (rule base
inheritance,
the control architecture). Some papers describe applications of the
system (such
as M.Dojat's system for real-time medical diagnosis, etc). A list of the
current
and most interesting applications that use the system is in progress is
available on request.



Quick description of the system
************************************

NeOpus adds a facility for writing 1st order forward-chaining rules to
Smalltalk-80. Those rules may be seen as "conditional actions" and are
expressed
as if-then statements.

The main characteristics of the system is its ability to 
 - match *any* Smalltalk object in the rules
 - use *any* Smalltalk expression in the rules'condition as well as
action parts.

Practically this means that NeOpus respects encapsulation : writing
rules does not
require to know the structure of the objects (as in other rule-based
systems,
where the structure of objects is explicitely manipulated in rules via
attributes).
Also, no extra "rule language" is introduced : rules parts are
exclusively composed
of Smalltalk messages defined by the classes of the objects that match
it.
Rules are compiled in an extended Rete network for efficiency [Forgy].
This means
that "partial matches" are computed only once. When a object is created
or
modified, the system (Rete network) minimizes the number of update
operations.

Here is an example of a NeOpus rule. If we supose the classes Doctor and
Patient,
we can write a rule that says that "when the blood pressure of the
patient is
greater than the maximum blood pressure, then the doctor considers a
treatment",
as follows:

considerTreatmentForHyperTension
	| Doctor d. Patient p|
	p bloodPressure > d maxBloodPressureForPatient: p.
actions
	d considersTreatmentFor: p


This rule is to be interpreted as "For any d instance of Doctor, and any
p
instance of Patient, if "p bloodPressure > d maxBloodPressureForPatient:
p"
is true then execute "d considersTreatmentFor: p".
Of course bloodPressure, maxBloodPressureForPatient: and
considersTreatmentFor:,
are standard Smalltalk methods implemented in the classes of the
corresponding
classes.

Besides the standard first-order forward-chaining scheme, a couple of
original
and powerful features have been added to the basic Rete-based
mechanisms.

	(1) Taking of class inheritance into account
In the preceding rules, the expression "For any x instanceOf Patient"
may mean
several things depending on wether class inheritance is taken into
account or not.
NeOpus gives the posibility of specifying 2 types of typing for rule
variables:
"simple" typing (only the instances of the class are considered) or
"natural"
typing(instances of subclasses are also considered). In our example,
this can
be useful to have natural typing, and to have subclasses of Doctor that
redefine
method maxBloodForPatient: for instance. The same rule may therefore be
used
with different classes of objects, and yield different results.

	(2) Rule base inheritance
Rules are written using the basic facilities for writing methods. 
Rules are grouped in rule bases which are abstract classes. A novel
meachnism has
been implemented to transpose the notion of class inheritance to rule
bases. This
allows structuring rule bases in hierarchies so as to factorize common
rules,
specialize existing rule bases, and redefine rules locally. The rule
base inheritance
may also be used as a default control strategy where rules defined in
the lowest base
are preferred in case of conflicts.

	(3) Declarative control architecture
Control in NeOpus may be specified using NeOpus itself. In this scheme,
rule bases
are not activated by the procedural inference engine, but by the
activation of
other rule bases (called meta-bases). These meta-bases are standard
NeOpus rule
bases. This allows to use all the functionalities of NeOpus to specify
control.
The benefits are :
 - complete separation and independance of control knowledge with domain
knowledge
 - ability to factorize control specification (using rule base
inheritance)
		
	(4) other more technical facilities
These include local variables in rules, possibility of mixing 0-order
with
1st order reasining, possibility of specifying initial sets of objects
to be
matched against the rules (context) to avoid combinatorial explosion,
the
possibility to retain the current state of instanciation to perform
non-continuous
inferences.

	(5) facilities for multi-agent programming
Rule bases may be "instanciated" so as to have completely indepedendent
yet
"identical" rule bases. Each instance has its own set of objects to be
matched,
initial context, conflict set, control strategies. This is particularily
useful
in multi-agent environments where several agents may have the same rule
base,
but with its own set of execution objects and parameters.

	(6) The programming environment for rules and rule bases follows the
same
spirit than the standard Smalltalk environment for writing methods and
classes : rule
browsers, hierarchy browsers, cross-references (implementors, senders,
messages) for
rules, file in/out and so forth.  Some tools are specially dedicated to
rule-based
programming: steppers, conflict set views, graphical conflict set views
(using the
orchestra score metaphor), instance browser, and dedicated rule base
browsers.



Availability, requirements
**************************
There is a page about NeOpus (with basically this README file and
other links to our work here) :
http://www-laforia.ibp.fr/~fdp/NeOpus.html.

The system is available via anonymous ftp at ftp.ibp.fr, under name:
anonymous
(and your electronic address as password). The sources are located in
the directory
ibp/softs/laforia/NeOpus/.

You can get all the files located under this directory, by getting the
compressed
tar file sourcesNeOpus.tar.Z, uncompressing and untaring it.

One of the files in the sourcesNeOpus directory is the file you are
reading know
(README).
An another one is the fileIn.st file, which loads all the necessary
Smalltalk files to build a NeOpus image. You have to edit the fileIn.st
file to
indicate the directory where you put the source files, before actually
filing it in.

There is a directory (kb) containing example files (sources for classes
and rule 
bases), that you can load at your convenience.

It runs on Smalltalk 4.1, with or without VisualWorks, on all platforms
supported
by Smalltalk. It uses (and therefore requires) the Parser generator from
Object Kit
(APOK). Ask your local Smalltalk distributor for info on APOK. A
collaborative project
with Canadian compagny OTI is in progress to implement the NeOpus ideas
in other
dialects of Smalltalk.


Documentation (In French usually, except for some articles in English)
is also
available via the same chanel. There is a User's Manual in English
available from
the same ftp site.
I suggest to load the examples in the kb directory to understand the
system's philosophy.

Those wanting to have information on the development of NeOpus and
associated
work may send me their electronic address, and I will forward them all
news
concerning updates and news on NeOpus in general.

If you do use the system and like it, you can send me a postcard at the
following
address:

Francois Pachet LAFORIA, Institut Blaise Pascal, Boite 169
Universite Paris VI
Tour 46-00, 75252 Paris Cedex

Tel : (33).1.44.27.70.04
Fax:  (33).1.44.27.70.00

If you have any sort of comment, suggestion for improvement, bug-report,
you can use the same address of mail me directly at
pachet@laforia.ibp.fr.
I am particularily interested in any ideas for improvement, modification
and by
your ideas in using Smalltalk for knowledge representation in general.

NeOpus is not a comercialized product. I will try to maintain the system
in
good working condition but it remains a research product.

