EXSYS Professional Developer Interface
EXSYS Professional Developer Interface
EXSYS Professional Developer Interface
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Expert System Software<br />
THE <strong>EXSYS</strong><br />
®<br />
DE V E L O P E R<br />
OV E RV I E W<br />
SELECTING THE RIGHT TOOL<br />
FOR THE RIGHT PROJECT<br />
How To Get Systems Built<br />
FUZZY LOGIC TO REPORT GENERATION -<br />
FEATURES TO GET SYSTEMS BUILT FAST<br />
Terminology and the <strong>Developer</strong> <strong>Interface</strong><br />
INTEGRATE EXPERT SYSTEM DECISION-MAKING<br />
INTO EXISTING SYSTEMS<br />
I n t e rfaces and Embeddability
T<br />
ABLE OF CONTENTS<br />
When to Use an Expert System 1<br />
How Does an Expert System<br />
Get Developed 2<br />
<strong>EXSYS</strong> RULEBOOK 2<br />
<strong>EXSYS</strong> RULEBOOKPLUS 2<br />
<strong>EXSYS</strong> PROFESSIONAL 2<br />
<strong>EXSYS</strong> LINKABLE OBJECT MODULES 2<br />
The <strong>EXSYS</strong> <strong>Professional</strong> Terminology and<br />
Inference Engine 2<br />
<strong>EXSYS</strong> Rules 2<br />
<strong>EXSYS</strong> DATA ELEMENTS 3<br />
BACKWARD CHAINING 3<br />
FORWARD CHAINING 4<br />
PROCEDURAL COMMAND LANGUAGE 4<br />
CONFIDENCE MODES 5<br />
YES/NO SYSTEM 5<br />
0-10 SYSTEM 5<br />
-100 TO 100 SYSTEM 5<br />
INCREMENT/DECREMENT SYSTEM 6<br />
CUSTOM FORMULA SYSTEM 6<br />
FUZZY LOGIC 6<br />
<strong>EXSYS</strong> PROFESSIONAL FRAMES 6<br />
<strong>EXSYS</strong> PROFESSIONAL BLACKBOARDS 6<br />
PARAMETER REPLACEMENT 6<br />
The <strong>EXSYS</strong> RuleBook <strong>Developer</strong> <strong>Interface</strong> 6<br />
TREES 7<br />
NODES 7<br />
FACTORS 7<br />
VARIABLES 8<br />
CHOICES 8<br />
BALLOONS 8<br />
ADDING NODES TO A TREE 8<br />
THE RULEBOOK EXPERT 10<br />
RULEBOOK - THE BOTTOM LINE 10<br />
<strong>EXSYS</strong> RuleBook PLUS 11<br />
<strong>EXSYS</strong> <strong>Professional</strong> <strong>Developer</strong> <strong>Interface</strong> 11<br />
<strong>EXSYS</strong> PROFESSIONAL RULE EDITOR 11<br />
CONFIGURATION OPTIONS 11<br />
The <strong>Developer</strong> Overview<br />
FUZZY LOGIC 12<br />
HO W FU Z Z Y LO G I C I S IM P L E M E N T E D I N<br />
<strong>EXSYS</strong> PR O F E S S I O N A L 13<br />
DEFUZZIFICATION 14<br />
ADVANTAGE OF FUZZY SETS 15<br />
DE B U G G I N G 15<br />
<strong>EXSYS</strong> PROFESSIONAL AUTOMATIC SYSTEM<br />
VALIDATION AND TREE DIAGRAMS 15<br />
VALIDATION GRAPHS 16<br />
<strong>EXSYS</strong> PROFESSIONAL RULE COMPILER 17<br />
<strong>EXSYS</strong> REPORT GENERATOR 17<br />
<strong>EXSYS</strong> End User <strong>Interface</strong> 17<br />
<strong>EXSYS</strong> PROFESSIONAL CUSTOM SCREENS 17<br />
<strong>EXSYS</strong> EXDESIGN CUSTOM SCREEN 18<br />
DESIGN PROGRAM<br />
SCREEN TEMPLATES 19<br />
CUSTOM HELP 19<br />
HYPERTEXT 19<br />
WHY AND HOW 19<br />
CHANGE AND RERUN 19<br />
TEXT EXPLANATION 19<br />
UNDO 19<br />
REPORT GENERATOR 19<br />
HISTORY 19<br />
INTEGRATION 19<br />
DDE LINKS 20<br />
EMBEDDABILITY 20<br />
<strong>EXSYS</strong> <strong>Professional</strong> Linkable<br />
Object Modules 20<br />
<strong>Interface</strong>s 21<br />
DATABASES 21<br />
SPREADSHEETS 22<br />
LINEAR PROGRAMMING 22<br />
<strong>EXSYS</strong>/LINDO SYNTAX 22<br />
MODEL COMMANDS 22<br />
CONDITIONAL INCLUSION OF LINES 22<br />
DATA COMMANDS 23<br />
NEURAL NET INTERFACE 23<br />
<strong>EXSYS</strong>/PI INTERFACE 24<br />
OTHER PROGRAMS 24<br />
<strong>EXSYS</strong> Company History 25<br />
<strong>EXSYS</strong> Contact Information 25
E<br />
xpert knowledge is often scarce and valuable.<br />
Expert systems are computer programs that<br />
capture some of that knowledge and allow its<br />
dissemination to others.<br />
An Expert System is a program that emulates the<br />
interaction a user might have with a human expert to solve<br />
a problem. The end user provides input by selecting one or<br />
more answers from a list or by entering data. The program<br />
will ask questions until it has reached a conclusion. The<br />
conclusion may be the selection of a single solution or a<br />
list of possible solutions arranged in order of likelihood.<br />
The program can explain, in English, how it arrived at its<br />
conclusion and why.<br />
Many expert systems are not complex or difficult to build.<br />
In a very simple case, consider a tree diagram on paper<br />
describing how to solve a problem. By making a selection<br />
at each branch point, the tree diagram can help someone<br />
make a decision. In a sense, it is a very simple expert<br />
system. This type of tree structured logic can easily be<br />
converted to a computerized system that is easier to use,<br />
faster and automated. More elaborate systems may<br />
include confidence factors allowing several possible<br />
solutions to be selected with different degrees of<br />
confidence. Expert systems can explain why data is<br />
needed and how conclusions were reached. A system<br />
may be highly interactive (directly asking the user<br />
questions) or embedded where all input comes from<br />
another program.<br />
The range of problems that can be handled by expert<br />
systems is vast. Expert systems can be developed with<br />
<strong>EXSYS</strong> software for any problem that involves a selection<br />
from among a definable group of choices where the<br />
decision is based on logical steps. Any area where a<br />
person or group has special expertise needed by others is a<br />
possible area for <strong>EXSYS</strong>. Expert systems can help<br />
automate anything from complex regulations to aiding<br />
customers in selecting from among a group of products, or<br />
diagnosing equipment problems.<br />
When to Use an Expert System<br />
The first question in considering the development of an<br />
expert system is “Why build an expert system” Expert<br />
systems are very useful, but they can not solve all<br />
problems. Understanding when and why to use an expert<br />
system is important.<br />
<strong>EXSYS</strong> Expert System Software<br />
THE<br />
DE V E L O P E R<br />
OVERVIEW<br />
EXPERT SYSTEMS ARE IDEAL TO:<br />
Disseminate problem-solving knowledge, not just<br />
facts, with minimal training of end users.<br />
Most organizations have ways to disseminate data through<br />
databases and networks. Expert systems provide a way to<br />
disseminate knowledge through those same networks.<br />
Once an expert system is built and put on-line, the<br />
problem solving skill it contains is available to everyone.<br />
Staff with minimal training can immediately perform at a<br />
much higher level by using expert systems.<br />
Standardize the conclusions for a given set of data.<br />
For situations where there are many people answering the<br />
same types of questions, it is highly desirable that<br />
everyone give the same answer for the same input data.<br />
Expert systems guarantee that this will happen.<br />
Free a human expert from repetitive, routine jobs in<br />
order to do activities an expert system cannot do.<br />
Expert systems are very powerful tools, but they do not<br />
think. Expert systems can not come to novel or innovative<br />
solutions - only people can. However, most experts spend<br />
the majority of their time answering routine, well<br />
understood, questions. These are the best areas to convert<br />
to an expert system. This frees the human expert to<br />
concentrate on the complex problems that can not be done<br />
by an expert system.<br />
Codify a problem-solving technique for future users.<br />
Most organizations have people that are experts on some<br />
subject, but the expert has never documented how they<br />
make their decisions. Having the expert build an expert<br />
system, documents and preserves the steps they use to<br />
make their decisions.<br />
Allow the problem-solving skills of several people to<br />
be combined.<br />
In addition to documenting the steps a single expert may<br />
use, having a group of experts build a system will separate<br />
the consensus opinion from individual views. This can be<br />
very informative.<br />
The goal of a particular expert-system project may be a<br />
combination of several of the above. The best problems to<br />
attack with expert systems are those that are well<br />
understood and frequently asked. Typically these problems<br />
can be rapidly converted into expert systems with<br />
immediate payback. Building such systems frees the expert<br />
from the routine questions, allowing them to concentrate on<br />
the problems that can not be handled by an expert system.<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 1
Companies effectively using expert systems have found<br />
that “experts” are much more common in a company than<br />
it seems at first. The “expert” is the person who knows the<br />
answers. Many people in a company have specialized<br />
information needed by others. Whether it is how to fix a<br />
complex machine, provide answers at a Help Desk, ship a<br />
package or comply with regulations - usually there is an<br />
“expert” that everyone turns to. An expert system takes<br />
the expert’s knowledge and enables it to be preserved and<br />
disseminated.<br />
How Does an Expert System<br />
Get Developed<br />
Traditionally expert system development has been a major<br />
expense both in time and money. Getting even a single<br />
system built was a big project. The cost of system<br />
development prohibited building expert systems on more<br />
than a few projects. <strong>EXSYS</strong> tools change that. The key<br />
to implementing expert systems widely, effectively and at<br />
low cost is to make easy-to-use expert system development<br />
tools readily available to the experts. <strong>EXSYS</strong> provides a<br />
multi-level approach to expert system development by<br />
providing a suite of tools, combining many advanced<br />
features with the proven ease of the <strong>EXSYS</strong> development<br />
interface. This avoids the inefficiency of having to learn<br />
complex tools to do simple problems.<br />
<strong>EXSYS</strong> tools were developed to meet the increasingly<br />
sophisticated needs of experts building complex expert<br />
systems. The goal of <strong>EXSYS</strong> is to balance the often<br />
conflicting requirements of flexible power and ease-ofuse.<br />
To do this, <strong>EXSYS</strong> provides four levels of tools with<br />
increasing capability allowing developers to use the easiest<br />
tool that will meet their needs. In addition, the tools are<br />
designed so that you need only learn a small portion of the<br />
commands to build most expert systems.<br />
As more power is needed for certain applications, higher<br />
level tools can be used with advanced features to give you<br />
complete control over the inference engine,<br />
modularization of the knowledge base, flow of execution,<br />
the user interface and integration with other programs.<br />
The <strong>EXSYS</strong> tools are:<br />
<strong>EXSYS</strong> RuleBook<br />
Applications are built by creating tree diagrams of<br />
decision making logic. A very short learning curve allows<br />
experts to be rapidly building rules. The trees are<br />
automatically checked for completeness and for a variety<br />
of logic errors. The tree diagram approach makes it easy<br />
for developers to understand the logic without having to<br />
learn complex syntax. RuleBook applications are often<br />
built in just a few days.<br />
<strong>EXSYS</strong> RuleBook PLUS<br />
The RuleBook tree diagram approach to building<br />
applications is also used in RuleBook PLUS. However,<br />
RuleBook PLUS adds the procedural command language<br />
of <strong>EXSYS</strong> <strong>Professional</strong> enabling it to handle much more<br />
2 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
complex logic and control problems. RuleBook PLUS<br />
also adds many more interfaces, including SQL databases,<br />
spreadsheets, frames, tables, blackboards and linear<br />
programming.<br />
<strong>EXSYS</strong> <strong>Professional</strong><br />
Applications developed in RuleBook or RuleBook PLUS<br />
can be moved to <strong>EXSYS</strong> <strong>Professional</strong>. This is a rule<br />
editor where rules can be built and fine tuned one at a<br />
time, allowing logic that can not be diagrammed as trees<br />
to be represented. <strong>EXSYS</strong> <strong>Professional</strong> also support fuzzy<br />
logic, procedural commands and a wide variety of<br />
interfaces. <strong>Professional</strong> is a little more complex to use than<br />
RuleBook, but the <strong>EXSYS</strong> three day training class takes<br />
novice students through to prototyping their application.<br />
<strong>EXSYS</strong> Linkable Object Modules<br />
The perfect tool for embedded applications and custom<br />
development. Systems developed with <strong>EXSYS</strong> <strong>Professional</strong><br />
can be converted to C code. Custom commands and<br />
interfaces can be added, or the entire application can be<br />
invisibly embedded inside another program. Linkable<br />
Object Modules is a C programmers tool, and gives<br />
unlimited flexibility for complex applications.<br />
The ease of getting started, combined with the proven<br />
ability to handle complex problems has made <strong>EXSYS</strong><br />
software the tools of choice by both beginners and<br />
professional knowledge engineers.<br />
The <strong>EXSYS</strong> Terminology and<br />
Inference Engine<br />
<strong>EXSYS</strong> software is a rule-based expert system shell with<br />
many enhancements such as Frames, Blackboards and the<br />
Procedural Command Language. IF-THEN-ELSE rules<br />
are used to describe the logic of the system. The rules<br />
may be built one at a time in a rule editor (<strong>EXSYS</strong><br />
<strong>Professional</strong>) or built by converting tree diagram<br />
representation of the logic (<strong>EXSYS</strong> RuleBook).<br />
<strong>EXSYS</strong> RULES<br />
Expert systems deal with knowledge rather than data and<br />
the files they use are often referred to as knowledge bases.<br />
This knowledge is represented as rules. A rule is made up<br />
of a list of IF conditions (normal English sentences or<br />
algebraic expressions that can be tested to be TRUE or<br />
FALSE) and a list of THEN conditions (more sentences)<br />
or statements about the probability of a particular data or<br />
choice being the appropriate solution to the problem. If the<br />
computer determines that all IF conditions in a rule are<br />
true it adds the rule’s THEN conditions to what it knows<br />
to be true. The computer determines what additional<br />
information it needs and how best to get the information.<br />
If possible, the program will derive information rather than<br />
asking the user. This ability to derive information allows<br />
the program to combine many small pieces of knowledge<br />
to arrive at logical conclusions about complex problems.
An <strong>EXSYS</strong> rule is divided into five parts: an IF part, a<br />
THEN part, an optional ELSE part, an optional NOTE and<br />
an optional REFERENCE.<br />
IF<br />
Conditions<br />
THEN<br />
Conditions<br />
and Choices<br />
ELSE<br />
Conditions<br />
and Choices<br />
NOTE: ——————————<br />
REFERENCE: ———————-<br />
The IF part is simply a series of test conditions, expressed<br />
as English sentences or algebraic expressions. The test<br />
conditions are statements which may be true or false. For<br />
example, TODAY IS WEDNESDAY or [X]>1. The first<br />
statement will be true only on Wednesdays, the second<br />
will be true only if the value of the variable X is greater<br />
than 1. The IF conditions are tested against the data<br />
provided by the user, information that can be derived from<br />
other rules, and data obtained from other sources.<br />
The IF part, THEN part and ELSE part can each have up<br />
to 128 conditions. In the IF part, the tests can be<br />
combined with either AND or OR. Boolean operators can<br />
also be used to build complex logical tests.<br />
The THEN part can contain conditions similar to the IF<br />
part, but in the THEN part, they are not tests, but<br />
statements of fact. In the IF part we could have TODAY<br />
IS WEDNESDAY and it would be a t e s t that might be true<br />
or false. The same statement in the THEN part would be<br />
considered to be a valid fact if the IF conditions in the rule<br />
were true. When the IF conditions in a rule are determined<br />
to be true, <strong>EXSYS</strong> <strong>Professional</strong> assumes the THEN part is<br />
true and adds any facts in the THEN conditions to what it<br />
knows.<br />
The THEN part can also contain choices (the possible<br />
goals that the expert system will decide among) along with<br />
their assigned probability values. <strong>EXSYS</strong> keeps track of<br />
the value each choice receives and calculates a final<br />
confidence value for each of the choices.<br />
The THEN conditions may also include statements that<br />
assign a value to a numeric or string variable. This allows<br />
values to be calculated during a run and, optionally,<br />
displayed at the end.<br />
The ELSE part is the same as the THEN part and is<br />
applied if any of the IF conditions are FALSE. The ELSE<br />
part is optional and not needed in most rules. (Rules built<br />
from RuleBook trees only have IF and THEN parts.)<br />
In some cases it is desirable to add a note to a rule to<br />
provide some special information to the user. If there is a<br />
note added, it will be displayed with the rule. The note<br />
does not affect the logical operation of the program, but is<br />
very useful to provide information to the end user. The<br />
notes, from rules that fired, can also be output using the<br />
report generator.<br />
The developer of the expert system knowledge base may<br />
also add a reference for a rule. This is intended to help the<br />
end user find the source of the knowledge contained<br />
within a rule or for more information if they should need<br />
it. As with the note, the reference is optional and only for<br />
the end user’s information. It has no affect on the running<br />
of the program. The difference between the note and the<br />
reference is that the note is displayed whenever the rule is<br />
displayed. The reference is displayed only if the user<br />
requests the reference. The references, from rules that<br />
fired, can also be output using the report generator.<br />
<strong>EXSYS</strong> DATA ELEMENTS<br />
There are two main types of data in <strong>EXSYS</strong>: qualifiers<br />
and mathematical variables.<br />
Qualifiers are multiple choice lists. There can be up to 30<br />
possible selections in the list. Usually qualifiers are<br />
constructed so that when one or more items are selected<br />
from the list, it makes a sentence. For example we might<br />
have a qualifier with three possible values:<br />
The color is<br />
1 red<br />
2 white<br />
3 blue<br />
Qualifiers are used to build the text conditions in rules. If<br />
the first value was selected, the statement would be “The<br />
color is red”. In the IF part this would be a test. In the<br />
THEN part, it would be a statement of fact.<br />
The other type of expression is based on mathematical<br />
variables. <strong>EXSYS</strong> supports both numeric and string<br />
variables. Variables can have up to 18 character names<br />
and are indicted by [ ]. When building expressions,<br />
parenthesis, Boolean operators, trig functions and<br />
exponential functions are supported. An IF part test<br />
expression might be:<br />
IF<br />
(([X] < [Z]) AND (SIN([X] / 2) > .4))<br />
In addition to the more standard mathematical operators,<br />
<strong>EXSYS</strong> also support, MIN, MAX, the C language<br />
conditional assignment operator (__?__:__) and an<br />
approximately equal operator to handle round-off error<br />
problems.<br />
String variables can be tested for alphabetical order and<br />
can be concatenated.<br />
BACKWARD CHAINING<br />
Backward chaining is a term used to describe running the<br />
rules in a “goal driven” way. In backward chaining, if a<br />
piece of information is needed, the program will<br />
automatically check all of the rules to see if there is a rule<br />
that could provide the needed information. The program<br />
will then “chain” to this new rule before completing the<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 3
first rule. This new rule may require information that can<br />
be found in yet another rule. The program will then again<br />
automatically test this new rule. The logic of why the<br />
information is needed goes backwards through the chain<br />
of rules. For example, suppose we have a rule that we are<br />
testing:<br />
Rule 1<br />
IF<br />
The day is hot<br />
THEN<br />
Go to the beach<br />
The program needs to know if the day is hot. <strong>EXSYS</strong><br />
would automatically check all rules to see if there is a rule<br />
that tells if the day is hot. Suppose it finds Rule 35:<br />
Rule 35<br />
IF<br />
It is summer<br />
and It is sunny<br />
THEN<br />
The day is hot<br />
The program will wait to finish testing Rule 1 until it tests<br />
Rule 35. Rule 1 is now in the chain. If there are any other<br />
rules that tell the program if it is summer or if it is sunny,<br />
these rules would be tested before Rule 35, and so on,<br />
until there are no rules that can add information. Then the<br />
chain will unwind back to the starting rule. In all <strong>EXSYS</strong><br />
software, backward chaining is used as the default<br />
(forward chaining is also available). It is NOT necessary<br />
to specify which rules apply to which information.<br />
Backward chaining simplifies the development of the<br />
expert system. Each rule can simply state an individual<br />
fact. Unlike some expert system tools, you do not have to<br />
explicitly assign the relationships between rules. <strong>EXSYS</strong><br />
will automatically find the relevant rules and use them. In<br />
a backward chaining system, the rules can be in any order.<br />
As new facts are added to the system, rules are simply<br />
added and <strong>EXSYS</strong> will automatically determine when and<br />
how to use the new pieces of information.<br />
FORWARD CHAINING<br />
Forward chaining is the alternative to backward chaining.<br />
Forward chaining is a “data driven” way to run the rules<br />
(unlike the goal driven approach of backward chaining).<br />
In backward chaining, there is always a goal to be satisfied<br />
and a specific reason why rules are tested. In pure forward<br />
chaining, rules are simply tested in the order they occur<br />
based on available data. If information is needed, other<br />
rules are n o t invoked - instead, the user is asked for the<br />
information. Consequently, forward chaining systems are<br />
dependent on rule order. However, since time is not spent<br />
determining if information can be derived, forward<br />
chaining is much faster.<br />
<strong>EXSYS</strong> also provides a hybrid between backward and<br />
forward chaining where the basic approach is data driven,<br />
4 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
but information needed by rules is derived through<br />
backward chaining. This system combines the best of<br />
both worlds. Another technique is to divide an expert<br />
system into subsets of rules and run some in forward<br />
chaining and some in backward chaining with the<br />
Command Language. This enables the you to fine tune<br />
the chaining methods for the system.<br />
PROCEDURAL COMMAND LANGUAGE<br />
The <strong>EXSYS</strong> Procedural Command Language was<br />
developed to solve a major problem encountered in rulebased<br />
systems. When procedural control of a system is<br />
closely coupled with the logic of the rules, it becomes<br />
necessary to use artificial logical structures to force<br />
procedural operations to be performed. This is difficult to<br />
develop and maintain and can be very confusing to the end<br />
user. To solve this problem, the logical and procedural<br />
operations were separated. The <strong>EXSYS</strong> Procedural<br />
Command Language allows a purely procedural<br />
definition of the flow of the system to be stated. This<br />
removes procedural commands from the rules and allows<br />
the rules to represent only the logic of the system. The<br />
procedural and logical operations can communicate, but<br />
they do not get in each other’s way. Complex systems can<br />
be built easier and they are easier to maintain and<br />
understand. <strong>EXSYS</strong> <strong>Professional</strong> and <strong>EXSYS</strong> RuleBook<br />
PLUS are the only expert system shells that use this<br />
powerful approach to solve the problem of logical and<br />
procedural control.<br />
The Command Language syntax is somewhat like DOS<br />
batch language plus a little BASIC. The commands use<br />
syntax that is easy to follow and maintain.<br />
The Command Language provides control mechanisms for<br />
the input of data, execution of rule subsets, looping, and<br />
display of results. Most of the <strong>EXSYS</strong> <strong>Professional</strong><br />
default operations can be changed through the Command<br />
Language. The Command Language is used in conjunction<br />
with the report generator specifications for even greater<br />
control. The Command Language program is a text file<br />
that can be created and edited with any text editor, or with<br />
the special Command File editor built into <strong>EXSYS</strong>. If the<br />
command file is present, it is used. If it is not found,<br />
<strong>EXSYS</strong> <strong>Professional</strong> reverts to the standard defaults.<br />
Like many advanced <strong>EXSYS</strong> functions, the command file<br />
need only be created when it is needed.<br />
The <strong>EXSYS</strong> <strong>Professional</strong> Command Language includes<br />
commands for:<br />
• Controlling command flow: (WHILE, IF, GOTO, ...).<br />
• Running rules or subsets of rules in forward or<br />
backward chaining mode.<br />
• Calling report specification files.<br />
• Displaying results or intermediate results.<br />
• Instantiating facts or data.<br />
• Screen control to ask questions.<br />
• Calls to database or spread sheet files.<br />
• Calls to external programs.
While only a small part of the commands in the language<br />
can be described here, this short example gives some idea<br />
of the power and flexibility that can be achieved. This is<br />
not an actual expert system command file, it is simply a<br />
collection of commands for illustration purposes. (The<br />
line numbers are added only for reference, they are not<br />
part of the Command Language.)<br />
1 SET [Z] 0<br />
2 :START_LOOP<br />
3 RULES [X] /F<br />
4 IF ([X] > 5)<br />
5 RULES “PART 1:*”<br />
6 REPORT “FIRST.RPT”<br />
7 ELSE<br />
8 RULES “PART 2:*”<br />
9 REPORT “SECOND.RPT”<br />
10 ENDIF<br />
11 RESULTS<br />
12 CLEAR ALL<br />
13 WHILE ([Y] > 0)<br />
14 RULES 100-200 /C<br />
15 WEND<br />
16 IF ([ABC] < 0)<br />
17 SET [Z] ([Z]+1)<br />
18 GOTO START_LOOP<br />
19 ENDIF<br />
This program would first set <strong>EXSYS</strong> variable [Z] to 0<br />
(line 1). Line 2 is a loop branch point. Line 3 would run<br />
all of the rules that derive a value for variable [X] in a<br />
forward chaining mode. It would then test the value<br />
obtained for [X] (line 4). If [X] is greater than 5, the set of<br />
rules whose name begins with “PART 1:” would be run in<br />
backward chaining mode (line 5) and the results printed<br />
using the report specification “FIRST.RPT” (line 6). If<br />
[X] was not greater than 5, the subset of rules whose<br />
names begin with “PART 2:” would be run in backward<br />
chaining mode (line 8) and the report “SECOND.RPT”<br />
used (line 9). In either case the results would be displayed<br />
to the user (line 11), all rules, qualifiers, variables and<br />
choices are reset to unknown (line 12). The program will<br />
then determine the value of variable [Y] by running the<br />
relevant rules and test the WHILE condition. As long as<br />
the value of [Y] was greater than 0, the program would<br />
continue to run rules 100-200, clearing all data before each<br />
run (line 14). If the variable [ABC] is less than 0 (line 16),<br />
the program would increment [Z] (line 17) and loop back<br />
to the start (line 18).<br />
To create a similar execution sequence in other programs<br />
would require several separate knowledge bases, a<br />
blackboard file and some technique to control the order in<br />
which programs were called. In <strong>EXSYS</strong>, only a single<br />
knowledge base is needed and the steps in the execution<br />
can be clearly defined.<br />
There are great advantages to using a Command Language<br />
operating over a structured set of rules for complex<br />
applications. The Command Language increases the<br />
capabilities of <strong>EXSYS</strong> software substantially and allows it<br />
to handle much more complex problems.<br />
CONFIDENCE MODES<br />
<strong>EXSYS</strong> <strong>Professional</strong> provides six ways to handle<br />
uncertain data, the confidence or probability factors within<br />
your expert system. The different systems are designed to<br />
provide a range from simple and intuitive confidence<br />
systems, through customized systems that enable the<br />
developer to implement complex ways of handling<br />
confidence. The confidence methods provided are:<br />
YES / NO System<br />
If the system does not require any estimate of probability,<br />
the YES/NO (0/1) system is best. This confidence system<br />
is very easy to use since the first rule that fires for a choice<br />
sets the value to 1 for Yes or 0 for No. No intermediate<br />
values are assigned. This confidence system is good for<br />
selecting choices from a list, an automated questionnaire,<br />
or other systems where the choices used by the system are<br />
definitely “yes” or “no”.<br />
0-10 System<br />
The 0-10 System provides confidence values on a scale of<br />
0-10. This is often quite compatible with the intuitive<br />
knowledge used in the development of an expert system.<br />
A value of 0 locks the value for the choice at 0 (No) and a<br />
value of 10 locks the value at 10 (Yes). Confidence values<br />
between 1 and 9 are averaged to give a relative likelihood.<br />
This system can positively select or reject a choice (with a<br />
value of 10 or 0) but can also allow intermediate values to<br />
indicate choices that may also be appropriate.<br />
When obtaining a human expert’s intuitive confidence for<br />
confidence in an event, a 0-10 scale is often comfortable<br />
and easy to use. Unless valid statistical data is available,<br />
precision higher than 0-10 is difficult to obtain from<br />
intuitive human knowledge.<br />
Despite its simplistic calculations, the 0-10 System is quite<br />
suitable for many expert systems and is easy to use.<br />
-100 to 100 System<br />
The -100 to 100 System is effective if statistical data,<br />
accurate to two significant figures, is available, or if the<br />
nature of the problem requires that the confidence factors<br />
be combined as dependent or independent probabilities.<br />
Values can be assigned to choices in the range of -100 to<br />
100. This provides greater resolution than the 0-10<br />
system. However, there is no value that locks the value at<br />
“yes” or “no”; values of 0, 100 and -100 are treated like<br />
any other value. Also, there are three methods of<br />
combining the confidence values - average, dependent<br />
probabilities or independent probabilities.<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 5
Increment/Decrement System<br />
This system is intuitive and easy to use. Points are added<br />
to or subtracted from the total score for a choice. A rule<br />
can add or subtract as much as 100 points from the total<br />
for a choice. At the end, the total value for a choice is<br />
displayed. This system differentiates among possible<br />
solutions that would provide similar or identical scores<br />
using other systems.<br />
Custom Formula System<br />
This is by far the most complex of the systems. It can be<br />
used when a problem cannot be solved by one of the other<br />
systems. In this system, you can write your own formulas<br />
for the combination of confidence values. This provides<br />
enormous flexibility. One method of combining<br />
confidence values can be used in one part of an expert<br />
system and another method in the rest of the system.<br />
Also, in addition to the confidence associated with a<br />
choice, this system allows the <strong>EXSYS</strong> <strong>Professional</strong> data to<br />
have associated confidence values. The confidence values<br />
associated with the data can be asked of the user, set to<br />
default values, or derived from rules. The confidence of a<br />
choice can take into account the confidence of data<br />
relevant to that choice. This flexibility allows very<br />
complex systems of confidence factors to be implemented.<br />
Fuzzy Logic<br />
Fuzzy logic is a very powerful technique that enables you<br />
to build expert systems that more closely reflect the real<br />
world. In the Fuzzy Logic confidence mode, fuzzy<br />
membership functions are defined which assign<br />
confidence to various qualifier values based on the value<br />
of a variable. These confidence values are propagated<br />
through the rules to the confidence assigned to choices or<br />
other qualifiers. Specific values can be defuzzified out of<br />
the results to have the system give precise<br />
recommendations.<br />
<strong>EXSYS</strong> RuleBook and <strong>EXSYS</strong> RuleBook PLUS support<br />
the YES/NO, 0-10 and Increment / Decrement modes.<br />
<strong>EXSYS</strong> FRAMES<br />
FRAMES provide a way to handle more complex data.<br />
Frames allow multiple columns and complex search<br />
criteria with Boolean operators. The data in a frame can<br />
be read or updated by the expert system. Frames also<br />
provide inheritance which allows a hierarchical set of<br />
frames to be created with data in “parent” frames available<br />
to lower level frames. The use of frames provides a way<br />
for <strong>EXSYS</strong> expert systems to handle data that is portable<br />
across all platforms. Frame data is accessed by a FRAME<br />
command in <strong>EXSYS</strong> that can be used in rules, associated<br />
with data items, or called from the Command Language or<br />
report generator.<br />
<strong>EXSYS</strong> BLACKBOARDS<br />
Blackboards provide a flexible means for <strong>EXSYS</strong> expert<br />
systems, and other applications, to store and retrieve data.<br />
6 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
The data is typically shared between/among multiple<br />
expert systems and other programs in a knowledge based<br />
application. A set of <strong>EXSYS</strong> blackboard commands<br />
enable you to read or write data to the blackboard and to<br />
maintain the blackboard. The blackboard files are simply<br />
text files and can be easily read or created by other<br />
programs.<br />
PARAMETER REPLACEMENT<br />
Data dynamically set by the expert system can be inserted<br />
in any text string, formula or command. In <strong>EXSYS</strong>,<br />
variables are designated by including them in square<br />
brackets, [X]. For example, [X] would be the variable X.<br />
If a string contains the variable in double square brackets,<br />
the value/text for the variable will be inserted into the<br />
string before the string or command is executed.<br />
Similarly, qualifier text and values can also be embedded<br />
in a text string.<br />
This simple feature enables you to write dynamic<br />
commands that are modified and set by the system and<br />
user input. Notes can easily contain the actual data<br />
provided by the end user, or obtained from an external<br />
program. Complex meta-rules can be developed to step<br />
through arrays of data. Self-modifying command files can<br />
be generated. The use of parameter replacement allows<br />
the building of very complex systems.<br />
A simple example of parameter replacement is the<br />
development of user interfaces that reflect data input. We<br />
might have an <strong>EXSYS</strong> <strong>Professional</strong> variable [NAME] that is<br />
obtained from the user or a database which contains the name<br />
of the user. We could make the prompt to ask a question:<br />
[[NAME]], please tell me...<br />
<strong>EXSYS</strong> <strong>Professional</strong> will automatically replace [[NAME]]<br />
with the actual user name at the start of the prompt.<br />
This is a very simple use of parameter replacement, but it<br />
displays how easily such customization can be added in<br />
<strong>EXSYS</strong>. In other expert system shells, embedding the<br />
name would be difficult or impossible.<br />
The <strong>EXSYS</strong> RuleBook<br />
<strong>Developer</strong> <strong>Interface</strong><br />
<strong>EXSYS</strong> RuleBook introduces a new approach to building<br />
expert systems rapidly. A combination of a tree structured<br />
representation of the knowledge and a sophisticated<br />
system for detecting errors in the developer’s logic has<br />
produced a tool that can be learned in a very short time.<br />
Systems developed with RuleBook can serve as stand<br />
alone applications or be enhanced through upward<br />
compatibility with the <strong>EXSYS</strong> <strong>Professional</strong> Expert System<br />
Development tool and <strong>EXSYS</strong> Linkable Object Modules.<br />
<strong>EXSYS</strong> RuleBook PLUS provides a command language<br />
that can be used to control the execution of the expert<br />
system and interface to other programs and data sources.
Expert - Checks<br />
the system for<br />
logical errors<br />
Choice - Define<br />
the goals of the<br />
system<br />
Factor - Define<br />
the factors<br />
used in the<br />
decision<br />
Tree - Define<br />
the trees used<br />
in the system<br />
Report - Define<br />
a report format<br />
for the<br />
conclusions<br />
RuleBook is designed to<br />
look like a notebook.<br />
Sections are divided with<br />
page tabs. Clicking on a<br />
page tab will bring you to<br />
the specified section.<br />
Expert systems can be<br />
developed with RuleBook<br />
for any problem that<br />
involves a selection from<br />
among a definable group<br />
of choices where the<br />
decision is based on<br />
logical steps that can be<br />
described as a set of tree<br />
diagrams. The trees can<br />
involve relative probabilities<br />
of a choice being<br />
correct or derive<br />
information used in<br />
other trees.<br />
In RuleBook, the application knowledge is represented as<br />
tree diagrams. RuleBook automatically converts these trees to<br />
IF-THEN type rules that represent the same logic and which is<br />
portable to <strong>EXSYS</strong> <strong>Professional</strong>.<br />
RuleBook is easy to use. No special languages are needed<br />
and a l l input is in the form of either English text, algebraic<br />
expression or menu selection. The developer of an expert<br />
system works within the <strong>EXSYS</strong> RuleBook Editor, which<br />
provides menus, prompts and help. It is not necessary to<br />
memorize complex rule syntax.<br />
Systems are fielded with the RuleBook Runtime program. A<br />
RuleBook Runtime distribution license is provided which<br />
permits unlimited distribution of finished applications.<br />
Essentially all of the instruction necessary for an end user to<br />
run a fielded application is provided by the program and all<br />
output is in English. Little or no training is required to run an<br />
already developed knowledge base. The end user of the<br />
expert system can ask HOW conclusions were<br />
reached or WHY information is needed. The<br />
program will respond with a full explanation<br />
of the logic used to arrive at the conclusion,<br />
including backward chaining. The developer<br />
can customize screens and decide what options<br />
are available to the end user.<br />
Building trees in RuleBook is very similar to<br />
drawing tree diagrams on paper. RuleBook<br />
provides a variety of data items to use in the<br />
trees and ways to edit the trees.<br />
TREES<br />
A tree is a branched decision tree that<br />
represents all, or a portion, of the decision<br />
making instructions. In RuleBook, trees<br />
look like the illustration to the right.<br />
Test 1 : Value 1<br />
Test 1 : Value 2<br />
Test 1 : Value 3<br />
NODES<br />
The tree is made up of nodes that represent decision<br />
branch points, and those that are assignments of value.<br />
These correspond to IF and THEN conditions in a rule.<br />
The IF nodes always have at least 2 values - and may have<br />
as many as 30. The various values are joined together<br />
vertically in a block. In the example, Test 1, Test 2 and<br />
Test 3 are all IF nodes. The node values can be a multiple<br />
choice text items, ranges of a numeric variable or<br />
true/false tests of a mathematical expression.<br />
THEN Nodes have a single value and assign a value to a<br />
choice (goal) of the expert system, assign text or numeric<br />
data, display a message to the end user, or annotate the<br />
tree. THEN nodes have a black triangle on their left side.<br />
FACTORS<br />
Factors are text or numeric data items that are used to<br />
define the nodes. There are two types of factors:<br />
Qualifiers and Variables.<br />
Qualifiers<br />
Qualifiers are multiple value lists. These are typically text<br />
and can contain up to 30 values. For example, if the day<br />
of the week is relevant in reaching a conclusion, we could<br />
have a qualifier of "Today is", with possible values:<br />
Monday<br />
Tuesday<br />
Wednesday<br />
Thursday<br />
Friday<br />
Saturday<br />
Sunday<br />
A qualifier condition is a statement in the tree (or rule)<br />
made up of the starting qualifier text and one or more of<br />
the associated values.<br />
Qualifiers can be used in the IF part of a tree branch to test<br />
a value or in the THEN part to assign a value.<br />
Test 2 : Value 1<br />
Test 2 : Value 2<br />
Test 3 : Value 1<br />
Test 3 : Value 2<br />
Choice 5<br />
Choice 1<br />
Choice 2<br />
Choice 3<br />
Choice 4<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 7
Variables<br />
Variables contain numeric data. A variable value may be<br />
any value between its upper and lower bounds. For the<br />
purposes of building the tree, the value of the variable is<br />
divided into numeric ranges defined by the logical break<br />
points in the decision making process.<br />
CHOICES<br />
Choices are the goals that the expert system will decide<br />
among. A system to identify types of flowers would have<br />
the various species of flower as choices. A system to<br />
determine the cause for a failure in a machine would have<br />
the possible items that could break as choices. Depending<br />
on the Confidence Mode used, a choice may be assigned a<br />
confidence value to determine its relative likelihood.<br />
Choices can be used in the THEN part of branches only.<br />
Take a very small example identifying items on the desk:<br />
YES<br />
Makes<br />
noise?<br />
NO<br />
Color?<br />
Black<br />
White<br />
Black<br />
Flat<br />
T E L E P H O N E<br />
C O M P U T E R<br />
FLOPPY DISK<br />
P A P E R<br />
P E N C I L<br />
C y l i n d r i c a l<br />
When converted to RuleBook form this will look like:<br />
Makes Noise: YES<br />
Makes Noise: NO<br />
Color?<br />
Shape<br />
White<br />
Color: Black<br />
Color: White<br />
Color: Black<br />
Color: White<br />
It is easy to draw a tree on paper. It is just as easy to draw<br />
a tree in RuleBook once the editing commands are<br />
learned.<br />
BALLOONS<br />
RuleBook automatically converts each branch of the tree<br />
to an IF-THEN rule. To see the rule that is associated<br />
8 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
Telephone<br />
Computer<br />
Floppy Disk<br />
Shape: Flat<br />
Shape: Cylindrical<br />
with any branch, click on a node. A balloon will be<br />
displayed showing the rule up to that node. For example,<br />
a click on the box labeled Computer would display:<br />
Color: Black<br />
Color:<br />
Color: Black<br />
Color:<br />
ADDING NODES TO A TREE<br />
When a new tree is created, it will only have a terminal<br />
node that says "Double Click to Add Factor".<br />
Paper<br />
Pencil<br />
Telephone<br />
Computer<br />
Floppy Disk<br />
Shape: Flat<br />
Shape: Cylindrical<br />
Tree Name<br />
Double Click to Add Factor<br />
IF<br />
Makes Noise: YES<br />
and Color: Black<br />
THEN<br />
Computer<br />
Paper<br />
Pencil<br />
▲<br />
▼<br />
To add a factor to the tree, double click<br />
on the terminal node. This will bring up<br />
a dialog box for adding factors.
Qualifier<br />
Select qualifier by text or name: Find Find Again<br />
The color of the flower is<br />
The stem is<br />
The size of the flower is<br />
The leaves are<br />
Red<br />
White<br />
Yellow<br />
Orange<br />
Blue<br />
Green<br />
Other Values:<br />
Individual<br />
New Qual.<br />
OK Group All Together<br />
Custom<br />
Cancel<br />
A qualifier condition for the color of a flower, could be<br />
added by clicking on the TEXT button in the Add IF<br />
Factor box. This would display a dialog box with all of<br />
the qualifiers.<br />
In this case the statement that "The color of the flower is<br />
Red" has been selected. This will be added to the tree.<br />
The color of the flower is red<br />
The color of the flower is white<br />
The color of the flower is yellow<br />
The color of the flower is orange<br />
The color of the flower is blue<br />
The color of the flower is green<br />
Control for grouping<br />
other values<br />
Double Click to Add Factor<br />
Double Click to Add Factor<br />
Double Click to Add Factor<br />
Double Click to Add Factor<br />
Double Click to Add Factor<br />
Double Click to Add Factor<br />
The node that was added takes into account all possible<br />
answers that the end user may provide for the qualifier.<br />
The value we selected, "The color of the flower is red", is<br />
in the top line, but branches were automatically created for<br />
the other possible answers. The result is six branches each<br />
with a terminal node. In this way, RuleBook automatically<br />
creates branches and guarantees that the tree will be<br />
c o m p l e t e .<br />
Having RuleBook generate branches also<br />
helps to extract information from the<br />
system developer. It forces the developer<br />
to consider all possible cases. When the<br />
RuleBook Expert function checks the<br />
trees, it will report any branches that have<br />
not been completed.<br />
In some cases, it is not desirable to add a<br />
separate branch for each of the other<br />
possible values of the qualifier.<br />
RuleBook provides three options. At the<br />
bottom of the dialog where the qualifier<br />
and value was selected is a set of radio<br />
buttons that control how the other values<br />
are grouped:<br />
In the example, the default of<br />
"Individual" was selected. This causes<br />
each of the other values to be given an<br />
individual branch.<br />
The second option is "Group ALL<br />
Together". This causes all of the other<br />
values to be put in a single branch. If this<br />
had been selected, the tree would look<br />
like:<br />
The color of the flower is red<br />
The color of the flower is white<br />
OR yellow OR orange OR<br />
blue OR green<br />
Double Click to Add Factor<br />
Double Click to Add Factor<br />
There would only be two branches from the node.<br />
The third option is to do custom grouping of the other<br />
values. This provides custom control for the number of<br />
branches created and what values are associated with<br />
them. Selecting the "Custom" option displays the dialog:<br />
Group Values in Group:<br />
1<br />
2<br />
New<br />
Delete<br />
OK<br />
Cancel<br />
Add to Group Add All Delete from Group<br />
Values in Group:<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 9
This dialog would allow selection of the following custom<br />
groups:<br />
Group Values<br />
1 Red<br />
2 Yellow, Orange<br />
3 Blue, Green<br />
4 White<br />
This would build the node:<br />
The color of the flower is red<br />
The color of the flower is<br />
yellow OR orange<br />
The color of the flower is yellow<br />
OR blue OR green<br />
The color of the flower is white<br />
Double Click to Add Factor<br />
Double Click to Add Factor<br />
Double Click to Add Factor<br />
Double Click to Add Factor<br />
In this case four branches were created. The Custom<br />
option gives total control on the number of branches and<br />
values associated with them.<br />
The ability to add nodes rapidly with a point and click<br />
interface, plus RuleBook's feature of expanding the tree to<br />
consider all possible combinations of input, allows rules to<br />
be built very rapidly. The developer is prompted to<br />
consider all possible cases, which can be an excellent way<br />
to extract knowledge from the developer and guarantees<br />
system completeness.<br />
In most applications there would be multiple trees each<br />
representing a different aspect of the decision making<br />
problem. Trees can assign values in their THEN part. If<br />
other tree nodes require these values, the appropriate rules<br />
will automatically be called through backward chaining.<br />
The trees can be printed and discussed with other<br />
experts. Since the trees are easy to read, this<br />
facilitates group consensus on the application, even<br />
by experts not using RuleBook.<br />
THE RULEBOOK EXPERT<br />
RuleBook has a built in Expert to automatically<br />
validate the system and check for a variety of errors<br />
that may have been made in the trees. The expert is<br />
run by clicking on the Expert tab to display the<br />
Expert window.<br />
To have the Expert check the system, click on the<br />
Check System button. If there is a red border around<br />
the button, the trees have been changed since the last<br />
10 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
check and it is time to recheck the system. If there is<br />
no red border the trees have not been changed since the<br />
last check.<br />
The Expert does two different checks of the system. The<br />
first looks for errors that can be found rapidly. The second<br />
part actually runs the rules with all of the possible<br />
combinations of input data. Sets of input are<br />
systematically generated, and used to test the rules. During<br />
the test, the Expert looks for various types of errors.<br />
Systems developed with RuleBook can be automatically<br />
checked by the Validation Expert before fielding the<br />
application. The validation testing runs automatically and<br />
for larger systems can be done over a weekend or<br />
vacation.<br />
When the Expert checks the system, it will report on a<br />
variety of errors:<br />
Incomplete Branches<br />
Text Factors Not Used<br />
Variables Not Used<br />
Choices Not Used<br />
Text Factors Not Always Derived<br />
Variables Not Always Derived<br />
Multiple Factors Use<br />
Input Produces No Output<br />
Variable Assigned a Value out of Range<br />
Too Many Values for Text Factor<br />
Loop Error<br />
RULEBOOK - THE BOTTOM LINE<br />
The combination of the easy tree diagram developer<br />
interface plus the ability of RuleBook to check an<br />
application for many common errors makes it the ideal<br />
tool for rapid system development. RuleBook is an<br />
excellent choice for diagnostic problems, help desks<br />
and other areas where the logic can be described as a<br />
tree diagram.<br />
Expert<br />
Problems:<br />
Help!<br />
Check System<br />
Details Report
<strong>EXSYS</strong> RuleBook PLUS<br />
RuleBook PLUS uses the same tree structured developer<br />
interface as <strong>EXSYS</strong> RuleBook. It adds the <strong>EXSYS</strong><br />
Procedural Command Language and interfaces described<br />
later. These additions allow complex procedural operations<br />
to be separated from the logic of the rules. The procedural<br />
operations are defined in an easy to read procedural<br />
language. The ability to run subsets of the rules through<br />
the procedural operations allows modularizations and more<br />
complex systems to be built.<br />
RuleBook PLUS adds interfaces into many SQL<br />
databases and spreadsheets to automatically obtain<br />
data needed by the application. It supports the<br />
<strong>EXSYS</strong> <strong>Professional</strong> frame-based knowledge<br />
representation, black boards to share data between<br />
applications and interfaces to the LINDO linear<br />
programming tool for optimization systems.<br />
RuleBook PLUS allows any program that can be<br />
run on your computer to be called from an<br />
application with data passed to and from the<br />
called program.<br />
RuleBook PLUS is especially effective at process<br />
control applications and for expert system<br />
development where the basic logic can be<br />
described as a set of tree diagrams, but where<br />
external interfaces or procedural control is<br />
required.<br />
<strong>EXSYS</strong> <strong>Professional</strong> <strong>Developer</strong><br />
<strong>Interface</strong><br />
RuleBook is an ideal way to rapidly develop systems that<br />
can be described as a set of tree diagrams. However, the<br />
logic of some systems can not be described as trees.<br />
These systems require that individual rules be built.<br />
<strong>EXSYS</strong> <strong>Professional</strong> provides a rule editor for this task.<br />
Since RuleBook systems are upwardly compatible with<br />
<strong>EXSYS</strong> <strong>Professional</strong>, developers will often do as much as<br />
possible with a tree representation and then move to<br />
<strong>EXSYS</strong> <strong>Professional</strong> to add the non-tree structured logic.<br />
As an expert system developer using <strong>EXSYS</strong> <strong>Professional</strong>,<br />
you have a wide range of tools available for rule entry,<br />
editing, debugging, tracing and validation.<br />
<strong>EXSYS</strong> PROFESSIONAL RULE EDITOR<br />
The <strong>EXSYS</strong> Rule Editor is a powerful and flexible tool for<br />
expert system development. Using it, you can rapidly set<br />
the various parameters for the expert system and enter/edit<br />
rules. When you want to test the rules, select "RUN" from<br />
a menu and you are running. If you want to cancel a run<br />
and return to edit mode, just make another menu selection<br />
and you are back in the edit mode.<br />
This rapid edit-test-edit cycle speeds expert system<br />
development. It is made possible by <strong>EXSYS</strong><br />
<strong>Professional</strong>'s incremental compiling of the rules as they<br />
are entered. As each rule is input, it is compiled to<br />
<strong>EXSYS</strong>'s internal representation. This means that the rule<br />
editor has access to the logic of the rules already entered.<br />
If you enter a rule that is potentially in conflict with an<br />
existing rule, the editor will immediately tell you and give<br />
you the opportunity to correct it.<br />
Rule 24<br />
and The color of pipe A output is brown<br />
Rules are entered in a window that looks like:<br />
Clicking on the qualifier button brings up a list of the<br />
qualifiers in the system and their associated value lists. To<br />
build a qualifier, simply click on the desired qualifier and<br />
the desired value(s). The condition will appear in the rule<br />
window. You only have to type the qualifier text when it<br />
is first created or if it needs to be edited. Mathematical<br />
expressions and choice conditions are just as easy to input.<br />
If you want to add a custom command or access data from<br />
another program, click on the Command button. Just fill<br />
in data in a few of the dialog boxes and <strong>EXSYS</strong> will build<br />
syntactically correct commands for you. You do not have<br />
to memorize the command syntax.<br />
Frequently the first few conditions in a rule will be identical<br />
to the previous rule. Just click the Repeat button once for<br />
each condition and they will be copied into this rule.<br />
Rule editing is just as easy. Simply select a rule to edit and<br />
change, delete or add conditions. Conditions may also be<br />
cut or copied from other rules.<br />
CONFIGURATION OPTIONS<br />
You have control over many of the ways in which <strong>EXSYS</strong><br />
<strong>Professional</strong> operates through configuration option<br />
commands. This enables you to fine tune the performance<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 11
of the shell for a specific application, or for all of your<br />
development. Configuration options are listed in files that<br />
are automatically read when <strong>EXSYS</strong> <strong>Professional</strong> starts.<br />
One file is global for all applications developed and<br />
another is specific to the individual application.<br />
Configuration options have been developed for the many<br />
cases where some users need <strong>EXSYS</strong> <strong>Professional</strong> to work<br />
one way and others need something different. For<br />
example, <strong>EXSYS</strong> has default colors - if you would prefer<br />
other colors, you can set them with configuration<br />
commands. If you do all of your development on a<br />
computer with a color monitor, but want to see what an<br />
application will look like delivered on a monochrome<br />
laptop, you use just one configuration command. Likewise,<br />
<strong>EXSYS</strong> <strong>Professional</strong> has certain messages it displays that<br />
can be redefined with configuration commands.<br />
Configuration options also control the actual functioning of<br />
the inference engine. The choice between forward and<br />
backward chaining can be made with a configuration<br />
option. With a single command line in the configuration<br />
file you can run in a batch mode, have the display of final<br />
choices be unsorted, disable screen output, fine-tune<br />
chaining on variables or perform many other operations.<br />
Configuration options also allow you to tune the end user<br />
interface. You may not want the end user to be able to<br />
perform some operations such as displaying rules. These<br />
can be disabled with configuration options.<br />
With over 140 commands, there are many ways to tune<br />
<strong>EXSYS</strong> to your needs.<br />
FUZZY LOGIC<br />
<strong>EXSYS</strong> <strong>Professional</strong> supports fuzzy logic. Fuzzy logic is a<br />
way to build systems that much more closely reflect the real<br />
world. Fuzzy logic is often presented as a very complex<br />
technique, but it does not have to be. <strong>EXSYS</strong> Inc. has a<br />
long history of taking complex knowledge representation<br />
concepts and making them easy to use. This same<br />
philosophy has been applied to fuzzy logic. The powerful<br />
and useful part of fuzzy logic is available, but the complex<br />
mathematics is hidden from the developer.<br />
The temperature is<br />
12 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
To see how <strong>EXSYS</strong> implements fuzzy logic, lets look at<br />
an example:<br />
Suppose you are building an expert system to control the<br />
temperature of hot water fed to a machine. In a non-fuzzy<br />
system, you might have a rule<br />
IF<br />
THEN<br />
The input water is too hot<br />
Mix cold water with the<br />
input stream<br />
When this rule is run, it will ask the end user if the input<br />
water is "too hot". Since this is a somewhat ambiguous<br />
question, you could add a rule to derive more specific<br />
information.<br />
IF<br />
THEN<br />
[INPUT TEMP] > 180<br />
The input water is too hot<br />
Now the system will ask about the water temperature.<br />
This information might come from the end user or directly<br />
from instrumentation.<br />
The problem with this approach, is nothing happens at a<br />
temperature of 179.9999 and the system may add too<br />
much cold water at 180.0001. This can result in the<br />
temperature being put into oscillation rather than being<br />
brought to the desired temperature smoothly.<br />
The situation would be improved by adding more rules<br />
IF<br />
THEN<br />
IF<br />
THEN<br />
IF<br />
THEN<br />
The input water is a<br />
little too hot<br />
The amount of cold water to<br />
add to the input is<br />
a little<br />
The input water is too hot<br />
The amount of cold water to<br />
add to the input is medium<br />
The input water is way too<br />
hot<br />
The amount of cold water to<br />
add to the input is a lot<br />
with temperature rules to derive the values<br />
IF<br />
THEN<br />
[INPUT TEMP]
IF<br />
[INPUT TEMP] > 160<br />
and [INPUT TEMP] < 180<br />
THEN<br />
The input water is a little<br />
too hot<br />
IF<br />
[INPUT TEMP] >= 180<br />
and [INPUT TEMP] < 200<br />
THEN<br />
The input water is too hot<br />
IF<br />
THEN<br />
[INPUT TEMP] >= 200<br />
The input water is way<br />
too hot<br />
This breaks up the single step function into three steps. As<br />
the input water gets a little too hot, you try adding a little<br />
cold water. If this is not enough, and the temperature of<br />
the input water continues to rise, at 180 you increase the<br />
amount of cold water added. If the temperature reaches<br />
200, you increase the amount of cold water again.<br />
The three step system clearly is better at controlling the<br />
process and more closely reflects the way a human<br />
operator would react. A hard break point at 180 in the first<br />
system has been made slightly "fuzzier" by breaking it into<br />
three steps. But you had to write three times as many<br />
rules to do it. Suppose you want to break the process into<br />
100 steps and have many functions to control. The<br />
number of rules needed would become enormous and<br />
impractical. What would be best, is to make it a<br />
continuous function rather than a series of steps. The<br />
solution is Fuzzy Logic.<br />
How Fuzzy Logic Is Implemented in<br />
<strong>EXSYS</strong> <strong>Professional</strong><br />
Fuzzy logic is a technique of assigning degrees of<br />
confidence to various possible options, based on the value<br />
of a variable. In the rules we did this in a crude way that<br />
could be diagrammed in a graph as:<br />
C<br />
o<br />
n<br />
f<br />
1<br />
0<br />
OK little too hot too hot way too hot<br />
150 160 170 180 190 200<br />
T e m p e r a t u r e<br />
The confidence for each of the three possible values is<br />
either 0 or 1 depending on the temperature. There is no<br />
overlap and the confidence changes abruptly at a specific<br />
break point.<br />
It would be better to gradually increase the confidence in<br />
each of the values as the temperature increases.<br />
As a graph, this would look more like:<br />
C<br />
o<br />
n<br />
f<br />
1<br />
0<br />
way too<br />
OK little too hot too hot hot<br />
150 160 170 180 190 200<br />
T e m p e r a t u r e<br />
In this system, as the temperature increases, the<br />
confidence in each of the three ranges will gradually<br />
increase (and in some cases, fall off) smoothly. At a<br />
temperature of 152, the confidence in "a little too hot"<br />
starts to increase from 0 and reaches 1 at 162. The<br />
temperatures between 152 and 162 give a continuous<br />
smoothly increasing confidence value. For any<br />
temperature, the graph shows the confidence in each of the<br />
values. Notice that for some temperatures, you have some<br />
confidence in two different values. At 175, "a little too<br />
hot" has a confidence of .8 and "too hot" has a confidence<br />
of .4. This is a great advantage, since you want the rules<br />
based on "too hot" to kick in gradually, rather than<br />
suddenly at a threshold value.<br />
In a fuzzy system, there is a confidence associated with<br />
EACH VALUE of a qualifier - not just the qualifier as a<br />
whole.<br />
These graphs of confidence in a qualifier value, versus a<br />
variable (temperature) are called "membership functions"<br />
and are the key to making an expert system "fuzzy". For<br />
a simple case like this, it would be possible to write a<br />
series of rules that calculated the confidence, but it would<br />
be very cumbersome, even for this simple problem.<br />
In <strong>EXSYS</strong> <strong>Professional</strong>, fuzzy logic is implemented by<br />
two simple techniques:<br />
1. QUALIFIERS can be made fuzzy based on<br />
an <strong>EXSYS</strong> variable and membership functions.<br />
Membership functions are defined with a point<br />
and click graphical user interface that provides<br />
easy visualization.<br />
2. VARIABLES can be "de-fuzzified" based on<br />
the weighted average of a qualifier's confidence<br />
values. This is how a fuzzy system ends up<br />
giving a precise recommendation. (More on this<br />
later.)<br />
Use of the existing <strong>EXSYS</strong> <strong>Professional</strong> data elements<br />
(qualifiers and variables) makes the addition of fuzzy logic<br />
to applications very easy.<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 13
Returning to the example, in a fuzzy logic version you<br />
would have 4 simple rules.<br />
IF<br />
THEN<br />
IF<br />
THEN<br />
IF<br />
THEN<br />
IF<br />
THEN<br />
The input water is OK<br />
The amount of cold water to<br />
add to the input is none<br />
The input water is a little<br />
too hot<br />
The amount of cold water to<br />
add to the input is a<br />
little<br />
The input water is too hot<br />
The amount of cold water to<br />
add to the input is medium<br />
The input water is way<br />
too hot<br />
The amount of cold water to<br />
add to the input is a lot<br />
Now you do not have to create a set of rules to convert a<br />
temperature to a qualifier value. Instead you simply click<br />
on the "Fuzzify" box when defining the qualifier.<br />
A screen is displayed that allows you to define the<br />
membership function.<br />
Qualifier<br />
Value:<br />
1<br />
.8<br />
.6<br />
.4<br />
.2<br />
0<br />
OK<br />
Value: ▼<br />
1 100<br />
Cancel<br />
Zoom In<br />
Zoom Out<br />
U p d a t e<br />
Zoom In<br />
Variable:<br />
TEMP<br />
14 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
H Pos Conf<br />
Do NOT Fuzzify<br />
The membership function is defined by clicking on the<br />
graph to indicate the shape of the function, or point<br />
coordinates are directly entered into a table. Each value of<br />
the qualifier has a separate membership function, and each<br />
function is made up of as many as to 8 straight line<br />
segments. Therefore, complex membership function sets<br />
can be defined. A test function enables you to easily<br />
check the confidence of each qualifier value for any value<br />
of the variable. The graph window can be scrolled and<br />
rescaled to display the entire set of membership functions.<br />
For this problem, the membership functions are drawn to<br />
look like:<br />
1<br />
C<br />
o<br />
n<br />
f<br />
0<br />
way too<br />
OK little too hot too hot hot<br />
150 160 170 180 190 200<br />
T e m p e r a t u r e<br />
Once the membership function is defined for the qualifier,<br />
you do not need to add additional rules to derive the value<br />
for the qualifier. When the qualifier value is needed,<br />
<strong>EXSYS</strong> <strong>Professional</strong> will automatically ask the value of<br />
the associated variable "temperature". The confidence of<br />
the appropriate qualifier values will then be set, based on<br />
the temperature. This confidence is automatically passed<br />
through to the items set in the THEN part.<br />
For example, at a temperature of 175, "a little too hot" has<br />
a confidence of .8 and "too hot" has a confidence of .4.<br />
Based on the rules, "add a LITTLE water"<br />
would get a confidence of .8 and "add<br />
MEDIUM water" would get a confidence of<br />
.4. If the rules had more than one IF<br />
condition, the confidence of the IF parts<br />
would be combined before assigning the<br />
New<br />
confidence to the THEN part. The way the<br />
IF confidence is combined is handled<br />
automatically by <strong>EXSYS</strong>. In an actual<br />
▼ system, many factors would be taken into<br />
account to determine the confidence values<br />
of the "amount of water to add".<br />
D e f u z z i f i c a t i o n<br />
Now you have a system that gives levels of<br />
confidence in the various amounts of water<br />
to add. The problem has been made fuzzy,<br />
and the answer we get is certainly fuzzy.<br />
In a plant environment, we do not want to<br />
tell the operator that "a little water should<br />
be added with .8 confidence and a medium<br />
amount of water should be added with .4<br />
confidence". The operator just wants to<br />
know how much water to add. This is "defuzzification"<br />
- taking a fuzzy statement and<br />
converting it back to a precise number.
In <strong>EXSYS</strong> <strong>Professional</strong>, to make a qualifier fuzzy, you<br />
associate a variable. To de-fuzzify a value for a variable<br />
you associate a qualifier. This is typically a weighted<br />
average of the various confidences assigned to the<br />
qualifier values. For example, suppose you have a<br />
variable [WATER TO ADD] and you base its value on the<br />
de-fuzzification of the "add water" qualifier. You could<br />
use the formula:<br />
[WATER TO ADD] = 2 * (confidence in "add a LITTLE") +<br />
5 * (confidence in "add MEDIUM") +<br />
10 * (confidence in "add ALOT")<br />
In this example, it would be (2*.8) + (5*.4) = 3.6<br />
This is about what you would expect. It is more than "add<br />
a LITTLE" amount of 2 but less than the "add MEDIUM"<br />
amount of 5.<br />
Advantage of Fuzzy Sets<br />
The first one rule non-fuzzy system would have an "add<br />
water" graph that would look like:<br />
W<br />
a<br />
t<br />
e<br />
r<br />
Clearly a very crude control.<br />
With three rules, but without Fuzzy Logic, the graph<br />
improves to:<br />
W<br />
a<br />
t<br />
e<br />
r<br />
But when you add Fuzzy Logic, you easily obtain a<br />
continuous graph:<br />
W<br />
a<br />
t<br />
e<br />
r<br />
150 160 170 180 190 200<br />
T e m p e r a t u r e<br />
150 160 170 180 190 200<br />
T e m p e r a t u r e<br />
150 160 170 180 190 200<br />
T e m p e r a t u r e<br />
This is a much better way to control the process since it<br />
will tend to make corrections smoothly. The exact shape<br />
of the graph is determined by the shape of the membership<br />
functions.<br />
<strong>EXSYS</strong> <strong>Professional</strong> automatically handles the<br />
mathematics for assigning and propagating the Fuzzy<br />
Logic confidence values. Configuration options allow<br />
some control over the formulas used. For detailed control,<br />
<strong>EXSYS</strong> Linkable Object Modules allows access to the C<br />
source code used for the formulas used to combine Fuzzy<br />
confidence. For special applications, these formulas can<br />
be customized by the developer.<br />
Fuzzy Logic can also be used to assign confidence to<br />
qualifiers. It is particularly effective in systems for<br />
process control<br />
DEBUGGING<br />
Whenever you are writing down the logic of a process,<br />
either in programming or in building an expert system,<br />
errors will occur. Tracking down the errors can take time<br />
and effort. <strong>EXSYS</strong> <strong>Professional</strong> provides a variety of<br />
tools to assist you in debugging your systems. A trace<br />
window displays the history of the session – the order in<br />
which the rules fired, what data was set, etc. This allows<br />
you to follow exactly what happened and find the error.<br />
This trace can also be directed to a file for later reference.<br />
During a run, whenever <strong>EXSYS</strong> <strong>Professional</strong> asks for<br />
data, you can ask "WHY" it is asking. <strong>EXSYS</strong> will<br />
display the logic that required that item of data. Also you<br />
can display any rule, the data known to the system and the<br />
status of the choices. In all cases, you can ask how a<br />
particular item of data was derived to trace back the logic<br />
and find any errors.<br />
<strong>EXSYS</strong> can also generate cross reference listings to show<br />
you where data items are used and what rules assign<br />
values to variables, etc.<br />
<strong>EXSYS</strong> PR O F E S S I O N A L AU TO M AT I C SY S T E M<br />
VALIDATION AND TREE DIAGRAMS<br />
Testing and validating an expert system must be a major<br />
part of any expert system development project. It is<br />
important to make sure end users will get valid answers to<br />
any input. <strong>EXSYS</strong> <strong>Professional</strong>'s automatic validation<br />
function greatly simplifies and automates this process.<br />
<strong>EXSYS</strong> will automatically test your application,<br />
unattended, for a variety of errors. Your applications may<br />
be tested overnight or while you are on vacation.<br />
<strong>EXSYS</strong> <strong>Professional</strong> supports two methods of validation<br />
testing; systematic and random. Systematic testing allows<br />
all possible combinations of input to be tested for a variety<br />
of possible errors. If the expert system is very large and<br />
systematic testing of the entire system would take too<br />
long, testing of portions of the system or random testing of<br />
the entire system can be performed.<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 15
Three files are produced - two types of tree diagrams, and<br />
an error report file. The tree diagram shows all of the<br />
possible combinations of input and the resulting output of<br />
the system. Regardless of the complexity of the logic of<br />
the system, the input and output can always be<br />
diagrammed as a tree. The trees can be examined with a<br />
special display routine in <strong>EXSYS</strong> that enables you to<br />
scroll through the tree diagram. The nodes on the diagram<br />
are written in an abbreviated form, e.g. "Q3:2", means<br />
qualifier number 3 value 2. When the tree diagram is<br />
displayed, a mouse click on the node expands the<br />
abbreviated form to the full text form of the qualifier or<br />
variable.<br />
The two types of tree diagrams produced are linear and<br />
branched tree diagrams. They are equivalent in<br />
information content, but are diagrammed differently. The<br />
branched tree diagram graphically shows the branching in<br />
the system.<br />
For example:<br />
Q7:1 [X]:30 Q4:1 >>> C3:7 C2:1<br />
Q4:2 >>> C3:5<br />
Q4:3 >>> C1:2 C4:8<br />
[X]:35 Q4:1 >>> ERROR: Q6 could not be derived<br />
Q4:2 >>> C5:7<br />
Q4:3 >>> C6:6<br />
[X]:40 Q9:2 Q11:1 >>>C4:6<br />
Q11:3 >>>C5:2<br />
Q11:4 >>>C5:7<br />
Q7:2 Q11:1 >>>ERROR: No Choices set<br />
Q11:2 >>>ERROR: Q4 loop error<br />
Q11:3 >>> C6:3 C5:1<br />
Q11:4 >>> C3:4<br />
This is convenient for seeing the overall structure, but if a<br />
particular set of input produces an error, in a large tree it<br />
may take some scrolling to read all of the information on<br />
the input.<br />
In a linear tree diagram, all of the node values for a branch<br />
are displayed on a single line. The same tree would be<br />
displayed as:<br />
Q7:1 - [X]:30 - Q4:1 >>>C3:7 C2:1<br />
Q7:1 - [X]:30 - Q4:2 >>>C3:5<br />
Q7:1 - [X]:30 - Q4:3 >>>C1:2 C4:8<br />
Q7:1 - [X]:35 - Q4:1 >>>ERROR:Q6 could not be derived<br />
Q7:1 - [X]:35 - Q4:2 >>>C5:7<br />
Q7:1 - [X]:35 - Q4:3 >>>C6:6<br />
Q7:1 - [X]:40 - Q11:1 >>>C4:6<br />
Q7:1 - [X]:40 - Q11:2 >>>ERROR: Variable out of ...<br />
Q7:1 - [X]:40 - Q11:3 >>>C5:2<br />
Q7:1 - [X]:40 - Q11:4 >>>C5:7<br />
In the linear tree, it is easier to follow the data that lead to<br />
the conclusion, since all of the data is on a single line.<br />
When random testing is selected, only a linear diagram<br />
will be created. Due to the random nature of the testing,<br />
the data will not be tree structured.<br />
16 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
The error file contains reports of any detected errors which<br />
were detected and the input which produced the error.<br />
The validation function will detect and report<br />
combinations of input that:<br />
• Produced no conclusions.<br />
• Failed to derive needed qualifiers or variables<br />
that should be derived.<br />
• Created loop errors.<br />
• Assigned a variable a value which is outside of<br />
the limits specified.<br />
• Assigned more values to a qualifier than the<br />
maximum number allowed.<br />
• Failed special custom tests designed with the<br />
report generator.<br />
<strong>EXSYS</strong> <strong>Professional</strong> also provides statistics on rule<br />
utilization, especially rules not used, and statistics on the<br />
assignment of confidence factors for conclusions. You<br />
can examine these statistics to see if they are what you<br />
would expect.<br />
In most expert systems, some questions will only be asked<br />
when the user answers preceding questions in a particular<br />
way. In <strong>EXSYS</strong>'s validation mode, only the combinations<br />
of input that might actually be supplied by an end user are<br />
considered. This usually reduces the number of tests that<br />
must be run to far less than the total number of all possible<br />
combinations of data.<br />
You can either test the entire system, or limit the testing to<br />
part of the system by reducing the number of parameters<br />
that <strong>EXSYS</strong> tests. Once the parameters are set, <strong>EXSYS</strong><br />
<strong>Professional</strong> takes over and runs unattended.<br />
Most validation tests run quickly. Depending on the size<br />
of the application and speed of the computer, tens of<br />
thousands to hundreds of thousands of tests can be run<br />
overnight or over a weekend. Just start the <strong>EXSYS</strong><br />
<strong>Professional</strong> validation and you will have a report of any<br />
errors it finds when you return.<br />
Validation testing is also a very valuable system<br />
maintenance tool. If you make some changes in your<br />
computing environment and want to make sure your<br />
applications are still performing correctly, create a<br />
validation test file, change the environment and create a<br />
new validation test file. The two files should be identical.<br />
If they are not, you can compare them to see where<br />
problems have developed.<br />
VALIDATION GRAPHS<br />
<strong>EXSYS</strong> <strong>Professional</strong> provides a way to graphically<br />
examine the data produced during system validation. This<br />
is a very powerful way to examine the effects changing a<br />
variable may have on the results in a multi-variable system.<br />
Both the values of variables and choices can be examined.
For example, suppose a system uses a variable<br />
TEMPERATURE (plus other data) to determine the<br />
confidence in a choice "ADD WATER". We could select<br />
TEMPERATURE as the graph variable. If we did not add<br />
any other constraints we might get a graph:<br />
90 100 110 120 130<br />
TEMPERATURE<br />
This graph has a band of values that indicate the possible<br />
range of values of the choice ADD WATER for each<br />
temperature tested in the validation test. Remember that in<br />
the system there are other factors besides temperature that<br />
determine the final results. For example, at a temperature<br />
of 120, all possible combinations of input which produced<br />
a confidence for ADD WATER were taken from the<br />
validation test tree. The maximum and minimum values<br />
are displayed and combined for each temperature to make<br />
the graph. The values graphed can come from fuzzy logic<br />
systems, and are an excellent way to visualize the effects<br />
that changing membership functions have on the overall<br />
control strategy.<br />
By limiting various input parameters, the graph can be a<br />
very effective way to examine the results of a system for<br />
many different sets of input data.<br />
<strong>EXSYS</strong> PROFESSIONAL RULE COMPILER<br />
The <strong>EXSYS</strong> Rule Compiler allows a text representation of<br />
expert system rules to be compiled to the internal <strong>EXSYS</strong><br />
knowledge base representation. The files produced by the<br />
Rule Compiler can be run with the <strong>EXSYS</strong> <strong>Professional</strong><br />
Runtime or Rule Editor. There are many very substantial<br />
advantages to using the <strong>EXSYS</strong> Rule Editor over a text<br />
editor for most expert system development, however there<br />
are certain cases where the text editor approach has<br />
advantages. The Rule Compiler is designed to be used<br />
when these cases arise.<br />
Due to the nature of a compiler, certain syntactical<br />
information must be provided in the rules. The program<br />
has to be able to tell a qualifier from a formula, from a<br />
choice, etc. This is a problem found in all rule compilers.<br />
(The <strong>EXSYS</strong> Rule Editor "knows" the difference from the<br />
button pressed and the items selected.) In <strong>EXSYS</strong><br />
<strong>Professional</strong>, the extra syntactical notation has been kept<br />
to a minimum and the text editor representation of the<br />
rules looks as much like the standard text representation as<br />
possible. The required syntax information does not make<br />
the rules difficult to read.<br />
The <strong>EXSYS</strong> <strong>Professional</strong> Rule Editor has an option to<br />
print the rules with the extra syntactical information<br />
needed for the Rule Compiler, included. Such a file can<br />
be directly converted back using the Rule Compiler. This<br />
option of the Rule Editor plus the Rule Compiler allows<br />
easy incorporation of text editing in the development<br />
cycle.<br />
<strong>EXSYS</strong> REPORT GENERATOR<br />
<strong>EXSYS</strong> RuleBook, RuleBook PLUS and <strong>Professional</strong><br />
have a Report Generator language that allows you to<br />
specify exactly what information is to be output and in<br />
what format. The Report Generator language is easy to<br />
learn with very simple commands. For example, the<br />
command "V" outputs all variables with their values. The<br />
command "C" outputs all choices. However, each<br />
command has many optional parameters that can be added<br />
to the basic command. For example C3 >6 /"XXXXX"<br />
will print the string XXXXX if choice 3 has a value<br />
greater than 6. There are many options for positioning<br />
text. For complex forms, there is a program where you<br />
define a form with blanks and <strong>EXSYS</strong> will fill in the<br />
blanks with the desired information.<br />
The report generator output can go to a file or printer. A<br />
single command will display the text file created by the<br />
report generator and allow the end user to scroll through it.<br />
The report generator can even be used to generate <strong>EXSYS</strong><br />
<strong>Professional</strong> Custom Screen command files that are then<br />
displayed to the end user with active GUI controls such as<br />
buttons, graphical images or even multimedia.<br />
<strong>EXSYS</strong> End User <strong>Interface</strong><br />
<strong>EXSYS</strong> RuleBook, RuleBook PLUS and <strong>Professional</strong> give<br />
you the tools to design and control the end user interface.<br />
Custom screens control the way questions are asked. The<br />
Configuration options and the Report Generator give you<br />
complete control of how the results are presented to the<br />
end user. Custom help and Hypertext enable you to<br />
provide multilevel, context sensitive help to your users.<br />
All <strong>EXSYS</strong> development tools allow immediate running<br />
and testing of the rules in a system by selecting "Run" from<br />
the menu. A run can be cancelled at any point and returned<br />
to the edit mode. A separate Runtime program allows<br />
dissemination of the finished application to end users.<br />
<strong>EXSYS</strong> PROFESSIONAL CUSTOM SCREENS<br />
End user acceptance is the key to successfully fielding<br />
expert systems. <strong>EXSYS</strong> has a standard way to ask<br />
questions, but you may want to change the look and feel of<br />
the <strong>EXSYS</strong> questions. This is easily done with the<br />
Custom Screen language. <strong>EXSYS</strong> RuleBook, RuleBook<br />
PLUS and <strong>Professional</strong> support custom screens. A text<br />
file is created with commands that define the screens you<br />
want to use. Commands are typically one line and enable<br />
you to draw boxes, set colors, draw lines and add GUI<br />
controls such as buttons, check boxes, radio buttons, scroll<br />
bars, text edit regions, meters, etc.<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 17
Once a screen is defined with custom screen commands, it<br />
is portable across the various platforms. The same custom<br />
screens work on MS-Windows, Macintosh, VMS/Motif,<br />
Sun Open Look and OS/2 Presentation Manager.<br />
Most custom screens are associated with specific <strong>EXSYS</strong><br />
qualifiers or variables. When <strong>EXSYS</strong> needs to ask the end<br />
user for data on a qualifier or variable, it automatically<br />
uses the associated custom screen. Custom screens can<br />
return data for a single item or for many.<br />
Customs screens in MS-Windows can use .PCX graphics<br />
files as backgrounds or as part of the screen. For<br />
monitoring applications and displaying the status of<br />
process parameters, a METER command creates and adds<br />
a dynamic, automatically animated graphical display.<br />
Example:<br />
This is a screen with simple YES / NO buttons and some<br />
buttons for asking for additional information. It also has<br />
some buttons that allow the end user to ask for system<br />
information such as KNOW, WHY and HELP.<br />
The WARNING light is ON:<br />
YES NO<br />
WHY KNOWN EXIT HELP<br />
Examples of other custom screens are:<br />
18 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
Reconnecting CABLE A to the system with the power<br />
on and a signal in the amplifier produces:<br />
No signal<br />
S t a t i c<br />
Intermittent Static<br />
C l i c k s<br />
Loud POP<br />
Good Sound<br />
Connecting the cable to the system<br />
should be done with care. First turn<br />
off all power to the system. Check<br />
that all lights are off. Make all<br />
connections and then turn power<br />
back on, starting with the preamp.<br />
Turn the amplifier on last. If the<br />
system make a loud noise, turn it<br />
off immediately and check the<br />
fuses.<br />
Select the filter pattern to apply to the signal:<br />
20- 40- 80- 160- 320- 640- 1k- 2k- 4k- 8k-<br />
40 80 160 320 640 1k 2k 4k 8k 16k<br />
▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲<br />
50.5 50.5 50.5 50.5 50.5 50.5 50.5 50.5 50.5 50.5<br />
Name and Address<br />
Phone<br />
Social Security #<br />
OK<br />
Male<br />
Female<br />
OK<br />
Experience<br />
Technical<br />
Sales<br />
Management<br />
Clerical<br />
Other<br />
Highest Education Degree<br />
HS MS<br />
BS PhD<br />
Comments<br />
<strong>EXSYS</strong> EXDE S I G N CU S TO M SC R E E N DE S I G N<br />
PROGRAM<br />
The <strong>EXSYS</strong> ExDesign Screen Layout program allows<br />
<strong>EXSYS</strong> screens to be easily designed in a "paint" style<br />
program. Buttons, scroll bars, lines, arrows, list boxes, mouse<br />
regions, graphics, etc can be added to a screen, resized and<br />
moved with the mouse. <strong>EXSYS</strong> custom screen files are text<br />
files and can be edited with any text editor. ExDesign<br />
automatically generates these files for any screen desired.<br />
ExDesign can also be used to design screen templates that<br />
apply to all screens in a system.
SCREEN TEMPLATES<br />
Custom screen templates are generic custom screen<br />
designs that automatically apply to all of your qualifiers or<br />
variables. The entire look and feel of the end user<br />
interface can be modified by creating a single screen<br />
definition. The template screen is designed with<br />
replaceable parameters for the qualifier, qualifier values<br />
and variable prompt text. Whenever a qualifier is needed,<br />
the text specific to that qualifier will be used to replace the<br />
parameters. Qualifier value text can be automatically<br />
used to label buttons, define mouse "hot spots" or be<br />
included in list boxes. Variables can use the prompt text<br />
and an edit region to ask for the value. A single template<br />
applies to all of the qualifiers or variables in the system.<br />
CUSTOM HELP<br />
<strong>EXSYS</strong> supports context sensitive help with a file of<br />
custom screens associated with specific qualifiers and<br />
variables. This is very similar to the file of custom screens<br />
that <strong>EXSYS</strong> will use to ask questions, but these screens<br />
are designed to assist users in what a question means. The<br />
screens are designed with the <strong>EXSYS</strong> <strong>Professional</strong> screen<br />
design tool. If a user is asked a question, and they need<br />
clarification, they can select "More Information" off the<br />
menu and the Custom Help screen will automatically be<br />
displayed. These help screens are optional and if your<br />
application does not need them, they can be omitted.<br />
HYPERTEXT<br />
<strong>EXSYS</strong> RuleBook, RuleBook PLUS and <strong>Professional</strong><br />
have a built in Hypertext system that can be added to your<br />
applications. Hypertext is a another way of adding<br />
multilevel help for your end users. Like the Custom Help<br />
screens, Hypertext screens are designed with the <strong>EXSYS</strong><br />
<strong>Professional</strong> screen design tool. However, instead of<br />
being associated with a specific <strong>EXSYS</strong> variable or<br />
qualifier, they are associated with a hypertext keyword.<br />
These hypertext key words are marked in your application<br />
by putting "^^" before and after the keyword. <strong>EXSYS</strong><br />
will not display the ^^ but will instead automatically mark<br />
the keyword in reverse video anywhere it appears in your<br />
application. If the end user double clicks on the keyword,<br />
<strong>EXSYS</strong> will automatically bring up the associated<br />
hypertext screen. That screen may contain other hypertext<br />
keywords that will bring up other screens, etc. On some<br />
platforms, hypertext screens support multimedia interfaces<br />
such as laser disk video, which can be added to your<br />
applications.<br />
For example, to add hypertext to the <strong>EXSYS</strong> qualifier<br />
"The color is red", we could simply change the text to<br />
"The ^^color^^ is red". Now anywhere the qualifier is<br />
used, the word "color" will automatically be highlighted as<br />
a hypertext keyword. A double click on "color" will bring<br />
up the screen that is associated with the word "color".<br />
WHY AND HOW<br />
While the end user is running the system, they can ask<br />
questions, just as if they were working with a human<br />
expert. They can ask why a question is being asked.<br />
<strong>EXSYS</strong> will display the rules it is currently testing, that<br />
require the information. Because <strong>EXSYS</strong> rules use<br />
English statements and algebraic expressions, without<br />
complex syntax, it is easy for even novice users to read<br />
and understand the rules. At any time during the run, the<br />
end user can display the facts known to the system and ask<br />
how a fact was derived. <strong>EXSYS</strong> will explain the source of<br />
the data.<br />
When the conclusions of the system are displayed, the user<br />
can ask how a conclusion was reached and <strong>EXSYS</strong> will<br />
display the rules used.<br />
CHANGE AND RERUN<br />
At the end of a session, when the results are displayed, the<br />
end user may chose to display all of the data they input.<br />
They can then change one or a few of the answers and<br />
rerun the expert system with the new data. <strong>EXSYS</strong> will<br />
display the old and new results side-by-side for<br />
comparison. This type of "WHAT-IF" testing is very<br />
useful when the end user was not sure of a particular<br />
answer. By comparing the affect of an answer on the<br />
results, they can determine whether a particular question is<br />
critical to conclusions. They can examine the sensitivity<br />
of the conclusions to that answer. This change and rerun<br />
can be repeated as often as needed.<br />
TEXT EXPLANATION<br />
In many expert systems, it is desirable to give the end user<br />
a text explanation of what the system did. This is easily<br />
implemented in <strong>EXSYS</strong>. Each rule can have an associated<br />
Note or Reference. Notes can be used to explain the<br />
meaning of the rule, and references can be used to give the<br />
source of the fact represented by the rule. The notes in all<br />
of the rules that fired during a session can be put into a<br />
report with a single command. The notes may have the<br />
actual values for variables or qualifiers included with<br />
parameter replacement. The report file produced will be<br />
an English text explanation of what the system did, and<br />
can be displayed to the end user or saved with the system<br />
recommendations.<br />
UNDO<br />
If the end user makes a mistake answering a questions,<br />
they can select "Undo" and backup and correct errors up to<br />
ten questions back.<br />
REPORT GENERATOR<br />
<strong>EXSYS</strong> has a flexible report generator to output the results<br />
of a run to files or other programs.<br />
HISTORY<br />
In some applications it is desirable to keep a history of<br />
user input and interaction with the system. This can easily<br />
be done.<br />
INTEGRATION<br />
<strong>EXSYS</strong> <strong>Professional</strong> has a very open architecture. It can<br />
be integrated with your existing applications. <strong>EXSYS</strong> can<br />
be front ended by programs to provide data. <strong>EXSYS</strong> can<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 19
provide the results of a run to other programs and <strong>EXSYS</strong><br />
can call other programs during a run for data acquisition or<br />
other functions.<br />
DDE LINKS<br />
Using the <strong>EXSYS</strong> Linkable Object Modules, the <strong>EXSYS</strong><br />
inference engine can set up DDE links with other<br />
applications running under MS Windows or Windows NT.<br />
EMBEDDABILITY<br />
Using the <strong>EXSYS</strong> Linkable Object Modules, the <strong>EXSYS</strong><br />
inference engine can be invisibly embedded within another<br />
applications. This allows total control over the user interface.<br />
<strong>EXSYS</strong> <strong>Professional</strong> Linkable<br />
Object Modules<br />
<strong>EXSYS</strong> <strong>Professional</strong> is designed to be a general use expert<br />
system shell. It allows a wide range of functions to be<br />
performed. However, sometimes a special application<br />
requires a high degree of customization and modification<br />
of the shell. <strong>EXSYS</strong> <strong>Professional</strong> Linkable Object<br />
Modules give the advanced expert system developer the<br />
ability to create highly customized versions of the <strong>EXSYS</strong><br />
<strong>Professional</strong> Runtime to meet special situations. Systems<br />
are developed with the normal <strong>EXSYS</strong> <strong>Professional</strong><br />
Editor, and delivered with the highly customized runtime.<br />
To meet these needs, <strong>EXSYS</strong> is available as .obj modules<br />
(UNIX .o modules) that you can link to produce custom<br />
runtimes, or link into your applications.<br />
The <strong>EXSYS</strong> <strong>Professional</strong> Linkable Object Modules allow<br />
the developer to:<br />
• Call the <strong>EXSYS</strong> <strong>Professional</strong> inference engine<br />
as a C routine from within another program.<br />
• Add up to 100 user defined functions, which<br />
behave like internal <strong>EXSYS</strong> commands, to<br />
perform special functions for data acquisition<br />
or display.<br />
• Overlay <strong>EXSYS</strong> <strong>Professional</strong> with other<br />
programs which reduce the memory required to<br />
run large programs.<br />
• Combine the .RUL file, .TXT file and the<br />
<strong>EXSYS</strong> <strong>Professional</strong> inference engine into a<br />
single .EXE program.<br />
• Reduce the time needed to load external<br />
programs by linking them as internal routines.<br />
• Modify the start-up defaults to eliminate the<br />
need for a .CFG file.<br />
• Directly access the <strong>EXSYS</strong> <strong>Professional</strong><br />
knowledge base data to read or write data from<br />
your routines or programs.<br />
20 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
• Change the default screens used to ask questions.<br />
• Disable particular unused functions which<br />
increases available memory and reduces<br />
program size.<br />
• Modify the link file to reduce program size,<br />
optimize for speed or modify the stack.<br />
• Change the formulas used to combine<br />
confidence in the Fuzzy Logic mode.<br />
The MS-DOS <strong>EXSYS</strong> <strong>Professional</strong> Linkable Object<br />
Modules include:<br />
• The Linkable Object Modules for the target<br />
operating system and compiler.<br />
• Default make and link files.<br />
• A source code for the start-up routines, and<br />
null routines that can be replaced with<br />
your custom routines.<br />
• Special routines to access <strong>EXSYS</strong> data<br />
structures or write data for use by the expert<br />
system.<br />
The GUI Linkable Object Modules (MS Windows,<br />
Macintosh, SUN Open Look, VMS/Motif and OS/2<br />
Presentation Manager) allow you to:<br />
• Create custom windows and dialogs.<br />
• Access the event stream.<br />
• Embed the inference engine within another<br />
GUI application.<br />
• Set up data exchange links with other programs.<br />
The expert systems created with Linkable Object Modules<br />
will work with the <strong>EXSYS</strong> expert systems you have<br />
already developed. In fact, these are the same object<br />
modules that were used to build <strong>EXSYS</strong> <strong>Professional</strong>.<br />
The developer must supply:<br />
• The appropriate C compiler (DOS, OS/2 -<br />
Microsoft C, VMS - VAX C, UNIX - default<br />
C compiler for target machine).<br />
• GUI versions require XVT Software, Inc.'s<br />
libraries.<br />
• The appropriate Linker (DOS - Plink86, others -<br />
default linker for target machine).<br />
Use of Linkable Object Modules requires an <strong>EXSYS</strong><br />
Runtime license. The Runtime license allows distribution<br />
of customized systems produced with the Linkable Object<br />
Modules.
<strong>Interface</strong>s<br />
Expert systems are powerful on their own, but many<br />
applications require integrating the expert system with<br />
other programs that you already use. <strong>EXSYS</strong> <strong>Professional</strong><br />
has been designed to have a very open architecture and<br />
provide a wide range of interfaces into other programs.<br />
<strong>EXSYS</strong> <strong>Professional</strong> has many built-in functions which<br />
enable you to directly read or write data in many other<br />
popular programs and application formats. In addition, the<br />
<strong>EXSYS</strong> "RUN" command can call any program that you<br />
can run on your computer.<br />
Because <strong>EXSYS</strong> has such a wide range of interfaces, it can<br />
serve as a gateway between other programs that can not<br />
directly talk to each other.<br />
DATA B A S E S<br />
<strong>EXSYS</strong> <strong>Professional</strong> internal commands can read and<br />
write data from many popular databases. <strong>EXSYS</strong><br />
<strong>Professional</strong> supports an SQL option which allows<br />
accessing data in many popular databases. SQL<br />
commands are handled through the command language.<br />
Connection to a SQL server, execution of an SQL<br />
command and processing of the data returned for<br />
assignment to an <strong>EXSYS</strong> variable is handled as procedural<br />
operations in the Command Language. You can write SQL<br />
programs that execute an SQL "Select" command that will<br />
return multiple data items. <strong>EXSYS</strong> <strong>Professional</strong> can step<br />
through and analyze the various records of returned data.<br />
Blackboards<br />
Report<br />
Generator<br />
Graphics<br />
Multimedia<br />
Neural<br />
Nets<br />
S p r e a d s h e e t s<br />
DDE<br />
Automatic<br />
Test<br />
Equipment<br />
Front End<br />
Programs<br />
<strong>EXSYS</strong><br />
Inference Engine<br />
& Gateway<br />
MS-Windows MS-DOS<br />
Windows NT O S / 2<br />
Macintosh UNIX<br />
Open Look SCO UNIX<br />
VMS Motif V A X / V M S<br />
Data<br />
Tables<br />
SQL commands to write to the database or perform other<br />
database operations are also supported. <strong>EXSYS</strong> uses the<br />
Intersolv libraries for SQL database access and supports all<br />
SQL commands supported by Intersolv.<br />
The SQL databases supported include:<br />
ALLBASE INGRES<br />
Betrieve InterBase<br />
Clipper Microsoft SQL Server<br />
Database Manager NetWare SQL<br />
DB2 Oracle<br />
DB2/2 Paradox<br />
DB2/6000 PROGRESS<br />
dBase II, III, IV, V SQLBase<br />
Excel 5.0 SQL/400<br />
Excel .XLS files SQL/DS<br />
FoxBase Sybase SQL Server<br />
FoxPro Sybase System<br />
Gupta SQLBase Teradata<br />
IMAGE/SQL Text files<br />
INFORMIX XDB<br />
For simpler database access, there are other commands<br />
that perform direct read or write operations to some<br />
database files. Database calls can be executed from the<br />
Command Language or associated with data elements<br />
(qualifiers or variables). If a database call is associated<br />
with a variable, when the value or qualifier is needed, the<br />
database call will automatically be executed.<br />
External<br />
Programs<br />
Custom<br />
Commands<br />
Frames<br />
PI Plant<br />
Information<br />
System<br />
Linear<br />
P r o g r a m m i n g<br />
ANY<br />
Executable<br />
Program<br />
S Q L<br />
D a t a b a s e s<br />
Fuzzy<br />
Logic<br />
Custom<br />
Screens<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 21
SPREADSHEETS<br />
<strong>EXSYS</strong> <strong>Professional</strong> supports reading and writing data<br />
from Lotus 1-2-3 spreadsheets.<br />
Spreadsheet calls can be executed from the Command<br />
Language or associated with data elements (qualifiers or<br />
variables). If a spreadsheet call is associated with a<br />
variable or qualifier, when the value is needed, the<br />
spreadsheet call will automatically be executed.<br />
LINEAR PROGRAMMING<br />
LINDO is a powerful linear and integer programming tool<br />
developed by LINDO Systems, Inc. and available on a<br />
wide range of platforms and operating systems. The<br />
integration of <strong>EXSYS</strong> <strong>Professional</strong> with LINDO enables<br />
you to incorporate non-numeric constraints and heuristics<br />
with LP optimization. <strong>EXSYS</strong> can analyze data before the<br />
linear programming model is built. It provides expert<br />
analysis of the linear programming results to makes<br />
important data available to end users untrained in<br />
interpreting LP results.<br />
Expert systems are powerful tools for expressing nonnumeric<br />
relationships, but they have lacked the specialized<br />
functions to handle optimization problems. Linear<br />
programs are excellent at optimization, but have difficulty<br />
incorporating non-numeric constraints and heuristics. By<br />
combining these two powerful technologies, you have a<br />
tool that can handle a much wider range of problems.<br />
The combination of <strong>EXSYS</strong> and LINDO provides a<br />
unique solution for real world problems such as:<br />
• LP applications delivered to end users not<br />
trained in interpreting LP results.<br />
• Automating frequently run LPs.<br />
• Complex LPs that require detailed<br />
interpretation.<br />
• LPs that require interaction with other programs<br />
or external data.<br />
• LPs that have constraints which can not be<br />
expressed numerically.<br />
• LPs that need graphical interfaces.<br />
• Expert systems that solve optimization problems.<br />
• Integration of PC based expert systems with a<br />
mainframe LP.<br />
The total <strong>EXSYS</strong> <strong>Professional</strong> user interface wraps around<br />
LINDO, allowing you to deliver complex, but easily<br />
usable applications. When data is needed from the user,<br />
the <strong>EXSYS</strong> user interface can ask for data with custom<br />
screens, graphics, custom programs, hypertext, or even<br />
speech and video. Data can be obtained from direct access<br />
to databases or spreadsheets, custom programs written in<br />
any language, frame based data representations, data<br />
22 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
tables, or any program that can be run on your computer.<br />
The results from LINDO can not only be formatted with<br />
the flexible <strong>EXSYS</strong> <strong>Professional</strong> Report Generator, but<br />
can be intelligently analyzed to produce the data<br />
interpretation that users want and need.<br />
The <strong>EXSYS</strong> / LINDO interface is particularly well suited<br />
for expert systems developed for scheduling, resource<br />
optimization, or other problems where an optimal solution<br />
must be found. The interface is designed to be easy and<br />
transparent to the end user. While the developer must<br />
understand both <strong>EXSYS</strong> <strong>Professional</strong> and LINDO to use<br />
the programs effectively, the end user is given<br />
recommendations and results without having to know<br />
either program.<br />
<strong>EXSYS</strong> <strong>Professional</strong> uses a technique similar to a report<br />
generator to create a LINDO model. This model is then<br />
run by LINDO automatically. The results of the LINDO<br />
run are read back into specified <strong>EXSYS</strong> <strong>Professional</strong><br />
variables.<br />
<strong>EXSYS</strong> / LINDO SYNTAX<br />
The LINDO model syntax has been extended to allow the<br />
easy incorporation of <strong>EXSYS</strong> <strong>Professional</strong> variable values.<br />
It also supports the conditional inclusion of lines based on<br />
the values of variables. This allows a single model to be<br />
used for a wide range of problems. The basic syntax is:<br />
model commands<br />
~IF expression<br />
model commands<br />
~ELSE<br />
model commands<br />
~ENDIF<br />
model commands<br />
~RESULTS<br />
data commands<br />
MODEL COMMANDS<br />
Model commands are lines of the LINDO model. <strong>EXSYS</strong><br />
<strong>Professional</strong> variables and expressions are calculated and<br />
embedded in the model commands to incorporate data<br />
from the expert system. For example, the model<br />
command:<br />
MAX 2X+[NUM]Y<br />
would replace the <strong>EXSYS</strong> variable [NUM] with its value<br />
in the model. The value could have been calculated by the<br />
expert system or obtained through any of the <strong>EXSYS</strong><br />
<strong>Professional</strong> interfaces.<br />
CONDITIONAL INCLUSION OF LINES<br />
When building the model, it may be desirable to include<br />
certain model commands ONLY if some criteria are met in<br />
the expert system. This is more effective and maintainable<br />
than having many LINDO model files.<br />
Lines can be conditionally included in the model with the<br />
~IF, ~ELSE and ~ENDIF commands. ~IF is followed by
any legal <strong>EXSYS</strong> <strong>Professional</strong> expression that evaluates to<br />
TRUE or FALSE. The expression can use numeric or<br />
string data, and utilize the logical inferencing capability of<br />
the expert system.<br />
For example, a part of a model might be written:<br />
MAX 2X+[NUM]Y<br />
ST<br />
~IF ([PRICE]
<strong>EXSYS</strong>/PI INTERFACE<br />
The Plant Information System (PI) from Oil Systems, Inc.<br />
is a powerful process data historian for VAX/VMS and<br />
Alpha computers. PI has the ability to monitor many<br />
process parameters and to maintain a historical record of<br />
the process data.<br />
PI is a powerful and effective way to collect and analyze<br />
numeric data. Data can be viewed in a wide variety of<br />
graphical displays to detect trends and problems.<br />
Historical data can be analyzed to determine the cause of a<br />
problem.<br />
The <strong>EXSYS</strong>/PI interface enables you to develop expert<br />
systems which can access the vast amount of historical PI<br />
data to determine the cause of a problem and what steps<br />
should be taken to correct it.<br />
<strong>EXSYS</strong>'s interface allows the expert system to<br />
automatically get data from PI. This data may be<br />
combined with other non-numeric information asked of<br />
the user or obtained from other sources. The results of the<br />
expert system can be displayed to the user as<br />
recommended actions, or (with the correct hardware)<br />
action can be taken automatically. Data can be written<br />
directly back into the PI database. Best of all, the end user<br />
can ask the expert system "WHY" it is asking a question,<br />
or "HOW" it arrived at a particular conclusion. This both<br />
builds user confidence in the recommendations of the<br />
system, and simultaneously educates in the logic that was<br />
used. <strong>EXSYS</strong> incorporates Hypertext for even higher<br />
level help and explanation to users. Dynamic graphs of PI<br />
data can be displayed in <strong>EXSYS</strong> Custom Screens.<br />
PI provides a wide range of analytical tools through<br />
performance equations, but when even more power is<br />
needed, an expert system is an ideal solution. <strong>EXSYS</strong><br />
<strong>Professional</strong> combines sophisticated mathematical<br />
functions, non-numeric heuristics, IF-THEN-ELSE rules,<br />
frames and a procedural command language to build<br />
expert systems for complex real-world problems. The PI<br />
performance equations allow you take PI data,<br />
arithmetically manipulate it and write it back into PI tags.<br />
<strong>EXSYS</strong> allows you to take PI data and perform complex<br />
numeric and non-numeric analysis with the rules in an<br />
expert system, and write data back to a PI tag. Also, since<br />
the <strong>EXSYS</strong> rules are easy to read and understand, system<br />
maintenance problems are reduced.<br />
The expert system's capability offered by <strong>EXSYS</strong><br />
<strong>Professional</strong> is also a gateway from PI to a wide range of<br />
other <strong>EXSYS</strong> interface programs including: linear<br />
programming, data bases, spreadsheets, custom screen<br />
languages, user defined functions, data tables and frames,<br />
neural nets, and much more. The gateway provided by<br />
<strong>EXSYS</strong> <strong>Professional</strong> opens up an enormous variety of<br />
possibilities for analysis and presentation of PI data.<br />
<strong>EXSYS</strong> uses PI syntax and commands to make data<br />
acquisition from PI as easy as possible. As PI data<br />
acquisition commands are entered in <strong>EXSYS</strong>, they are<br />
automatically checked for syntactical correctness with<br />
existing PI tags and time formats. Direct access from the<br />
24 • THE <strong>EXSYS</strong> DEVELOPER OVERVIEW<br />
expert system to the PI logger and message facility allows<br />
expert system recommendations to be automatically sent<br />
to the people that need the data over the PI network, and in<br />
the form that PI users expect.<br />
The <strong>EXSYS</strong>/PI interface has been developed in close<br />
cooperation with the staff at Oil Systems, Inc. to provide<br />
the features and capabilities needed in real-world<br />
situations.<br />
<strong>EXSYS</strong> expert systems can be used to handle a wide range<br />
of tasks:<br />
• <strong>EXSYS</strong> can assist an operator in bringing a<br />
process that is operating outside of the desired<br />
parameters, back within parameters. A frequent<br />
problem is to over compensate and put a process<br />
into oscillation about the desired setting. An<br />
<strong>EXSYS</strong> expert system can recommend the<br />
necessary steps to bring the process in<br />
asymptotically.<br />
• <strong>EXSYS</strong> can capture and disseminate the skills<br />
of your best people. Often one operator will get<br />
significantly better performance than others.<br />
Having that person build a simple expert system<br />
makes their skill available to others and codifies<br />
their decision making process.<br />
• <strong>EXSYS</strong> can run in the background and monitor<br />
for developing problems or dangerous<br />
situations. This is especially useful in<br />
monitoring for rarely occurring problems<br />
which an operator may not notice.<br />
• <strong>EXSYS</strong> can be used to provide assistance in<br />
performing infrequently done operations such<br />
as starting up a piece of equipment.<br />
• <strong>EXSYS</strong> can monitor compliance with<br />
regulations, including those of ISO 9000.<br />
• <strong>EXSYS</strong> coupled with linear programming,<br />
can handle scheduling changes based on<br />
day-to-day operations and problems.<br />
• The <strong>EXSYS</strong>/PI interface is available for<br />
VAX/VMS, and can be run on terminals as<br />
simple as a VT-100. The interface is available<br />
in more sophisticated and easy to use<br />
VMS/Motif and Alpha/Motif versions, and for<br />
MS-Windows computers communicating to the<br />
VAX through Pathworks.<br />
OTHER PROGRAMS<br />
In addition to the interfaces built into <strong>EXSYS</strong>, you can<br />
call any program which you can run on your computer.<br />
<strong>EXSYS</strong> has an internal RUN(... ) command. Whatever<br />
command is put in the ( ) will be executed as if it was<br />
entered from the operating system command line. This<br />
enables you to run any program.
In addition to calling the program, you can pass <strong>EXSYS</strong><br />
data to the called program as command line arguments or<br />
in data files. The technique has been kept as generic and<br />
flexible as possible. For example:<br />
RUN(myprog [X] 1 "ABC" /C)<br />
<strong>EXSYS</strong> would call the program myprog and pass it the<br />
current value of the variable [X], the value 1, and the<br />
string "ABC". If you did not have the /C, the data would<br />
be written into a file that could be accessed by the called<br />
program.<br />
Likewise, the called program may need to return data to<br />
<strong>EXSYS</strong>. All the program has to do is write an ASCII file<br />
in a simple format containing the data. When the called<br />
program terminates, <strong>EXSYS</strong> automatically reads the data<br />
in this file.<br />
Using <strong>EXSYS</strong> Linkable Object Modules, more complex<br />
techniques for inter-process communication can be<br />
implemented such as pipes or DDE.<br />
<strong>EXSYS</strong> Company History<br />
<strong>EXSYS</strong> Inc. was founded in 1983 to market expert system<br />
development tools to the MS-DOS market. The goal was<br />
to produce an expert system development tool capable of<br />
being used by people with no A.I. training. To achieve<br />
this, it was necessary to design a tool that was<br />
conceptually as easy to use as a word processor, but<br />
capable of handling complex decision making problems.<br />
It was believed that given this sort of tool, domain experts<br />
could build expert systems themselves.<br />
<strong>EXSYS</strong> did not follow the traditional form of most<br />
academic AI tools. Easy-to-use functionality was<br />
emphasized over the standard academic knowledge<br />
representation techniques. The developers at <strong>EXSYS</strong> felt<br />
that while some complex techniques used in academic<br />
systems were certainly valid, they were not needed for<br />
most real-world applications and included only those<br />
functions that actually helped get systems built. Complex<br />
algorithms that were rarely needed were not used.<br />
The result was a program that was easy-to-use, could be<br />
learned in a few days, and had more than enough power to<br />
handle most real-world problems. Standard <strong>EXSYS</strong>, the<br />
first <strong>EXSYS</strong> expert system shell, was introduced in 1983.<br />
Users soon discovered that Standard <strong>EXSYS</strong> had<br />
sufficient power for their applications, was much easier to<br />
learn than other tools and much lower in cost.<br />
<strong>EXSYS</strong> Inc. has always had a very strong philosophy of<br />
listening to its users. When users requested new features,<br />
if possible, they were incorporated into the program.<br />
Using this approach, Standard <strong>EXSYS</strong> grew in power in<br />
the areas where users actually needed it. Complex<br />
features were only added when there was a need for them,<br />
not added just for the sake of adding them. All new<br />
features had to produce real benefits for actual users.<br />
Due to user requests, in 1986 it was decided to port<br />
Standard <strong>EXSYS</strong> to DEC VAX computers and in 1987, to<br />
the UNIX platform. The <strong>EXSYS</strong> C source code is very<br />
generic and portable. Ports were done for a wide variety<br />
of UNIX computers and several foreign languages.<br />
By 1988, thousands of applications had been developed<br />
using Standard <strong>EXSYS</strong>. It had been used successfully for<br />
a very wide range of problems. However, there were still<br />
some problems that were difficult to handle. Users<br />
requested a more powerful program that could handle<br />
these problems, but which was still easy to use.<br />
To meet these requests, <strong>EXSYS</strong> <strong>Professional</strong> was<br />
developed. This was a significantly more powerful<br />
program, however the <strong>EXSYS</strong> philosophy of keeping the<br />
program easy-to-use was maintained. <strong>EXSYS</strong><br />
<strong>Professional</strong> added many options for the user. If special<br />
features were needed in a particular area, they were<br />
available. The most powerful feature added was the<br />
Command Language which enables <strong>EXSYS</strong> <strong>Professional</strong><br />
to handle a much wider range of problems than the<br />
original Standard <strong>EXSYS</strong>.<br />
In 1991 the entire <strong>EXSYS</strong> <strong>Professional</strong> developer and user<br />
interface was rewritten to take advantage of the many GUI<br />
(Graphical User <strong>Interface</strong>s) platforms that had become<br />
popular. <strong>EXSYS</strong> <strong>Professional</strong> was ported to MS<br />
Windows, Windows NT, Macintosh, Sun Open Look,<br />
VAX/Motif and OS/2 Presentation Manager. The new<br />
GUI versions made expert system development faster than<br />
ever before and opened many new possibilities for the user<br />
interface options.<br />
In 1993 <strong>EXSYS</strong> RuleBook was developed to make it very<br />
easy to build applications where the logic could be<br />
represented as a tree diagrams. This covers a very wide<br />
range of problems, and produced a tool that could be very<br />
rapidly learned.<br />
In 1995, user requests lead <strong>EXSYS</strong> to add fuzzy logic to<br />
<strong>EXSYS</strong> <strong>Professional</strong>. As with other complex areas, the<br />
portion of fuzzy logic that is really useful and which can<br />
be easily understood was incorporated into the tool. This<br />
make fuzzy logic approachable and easy to use.<br />
<strong>EXSYS</strong> tools have continued to grow in features and<br />
capability. <strong>EXSYS</strong>, Inc. has a proven willingness to<br />
respond to the needs of its users.<br />
For more information contact:<br />
<strong>EXSYS</strong>, Inc<br />
1720 Louisiana Blvd. NE, Suite 312<br />
Albuquerque, NM 87110 U.S.A.<br />
TEL (505)256-8356<br />
FAX (505)256-8359<br />
THE <strong>EXSYS</strong> DEVELOPER OVERVIEW • 25
ACCOUNTING & FINANCE - Cost Code Selector, Stock &<br />
Commodity Trading, Portfolio Construction, Home Purchasing,<br />
Financial Planner Training and Selection, Personal Tax Advisor,<br />
Detecting Insider Trading, Organizational Services, Credit<br />
Analysis Advisor, Bank Loan Identification, Credit Control,<br />
Loan Documentation, Assessment of Risk and Fraud in Financial<br />
Institutions, Aid in Tax Form Completion, Commercial Loan<br />
Approval Predictor...<br />
A C T I V I T I E S - Aquarium Water Quality Analysis, Bridge<br />
Opening Bid Advisor, Bird Identification, Sailing Tactics,<br />
Weaving Trainer...<br />
A G R I C U L T U R A L - Irrigation and Pest Control, Crop Variety<br />
Selection and Management, Soil Characterization and Utilization<br />
for Specific Areas, Fertilizer, Climate and Soil Interaction and<br />
Analysis, Salmon Stocking Rates and Species Selection, Forest<br />
Inventory, Weed Identification, Soil Conservation, Tree Selection<br />
Based on Environmental Conditions, Planning and Design of<br />
Agroforestry Systems...<br />
B U S I N E S S - Alternatives for Fragmented Industry, Advertising<br />
Copy Development, Shipping Documentation and Routes, Market<br />
Advisor for Process Control Systems, Demographic and Market<br />
Assessment, Product Performance Trouble-shooting, Sales<br />
Personnel Assessment, Account Marketing, Invention Patent<br />
Ability, Salary & Benefit Planning, Client Profile Business<br />
Application Selection, <strong>Professional</strong> Service Selection, Career Goal<br />
Planning, Pension Fund Calculator, Unemployment Insurance<br />
Eligibility...<br />
C H E M I C A L - Hazard Evaluation, Chemical Facilities<br />
Procedures, Correct Propellant Ingredient Mixture, Pollution<br />
Control Technology Permits, Common Metal and Alloy<br />
Identification, Real-time Process Controlled City Waste Water<br />
Management, Solvent Selection for Chemical Compounds,<br />
Pottery Glaze Recipe and Identification, Pulp Bleaching Advisor,<br />
Toxicity of Laboratory Chemicals, Lime Recognition System,<br />
Process Diagnosing and Troubleshooting...<br />
C O M P U T E R - Software System Diagnostic Modeling,<br />
Application Sizing, Software Quality Assurance, Program<br />
Classification, Locating Component Failure & Analysis, New<br />
Technology Selection, Training Systems, Custom Hardware<br />
Diagnostics, Decision Support Systems, MIS Support System,<br />
Program Library Maintenance, Fault Detection and Diagnostics<br />
of Wide Area Networks, Analysis of Statistical Data, Personal<br />
Computer Configuration, Shielding Technique Selection,<br />
Database Design, Computerized Technical Service<br />
Representation, Hardware and Software Selection by Non<br />
Technical Users, New User of Computer Assistance,<br />
Documentation Recommendations to Users, Monitoring, Repair<br />
Assistance and Problem Prediction of Operating System...<br />
C O N S T R U C T I O N - Pavement Rehabilitation & Design,<br />
Structural Damage Assessment, Equipment Evaluation &<br />
Selection, Material Costing & Selection, Project Scheduling,<br />
Cost Estimating, Evaluating Multifamily Housing Projects, Work<br />
Zone Safety Trainer/Advisor, Weld Procedure Selection and<br />
This document and any examples contained herein are provided "as is" and are subject to change without notice.<br />
<strong>EXSYS</strong>,Inc. makes no warranty of any kind with regard to this document, including, but not limited to, the<br />
implied warranties of merchantability and fitness for a particular purpose. <strong>EXSYS</strong>, Inc. shall not be liable for any<br />
errors or for incidental or consequential damages in connection with the furnishing, performance, or use of this<br />
document or the examples herein.<br />
© 1995 <strong>EXSYS</strong>, Inc. All rights reserved. July 1995<br />
Printed and bound in the United States of America<br />
Expert System Applications<br />
All other product names are copyright and registered trademarks/tradenames of their respective owners.<br />
Cost Estimating, Soil Compacting, Fire Code Advisor, Alarm<br />
Management System...<br />
EDUCATION - TRAINING - Library Reference Material<br />
Recommendation, Interpretation of Statistical Quality Control<br />
Data, Teaching Mineral, Rock and Fossil Identification, Student<br />
Financial Aid Eligibility, Analysis of Metal Cautions, Fire<br />
Department Emergency Management Advisor, Medical Student<br />
Diagnostic Systems, Dentistry Advisor, Telephone Customer<br />
Support Instruction, Gas Turbine Training, Industrial Training,<br />
Patient Care Advisor for Student Nurses...<br />
ENGINEERING - INDUSTRIAL - Engineering Change<br />
Control Demonstrating, Diesel Engine Lube Oil Wear Analysis,<br />
Superalloys Phase Analysis, Equipment Diagnostics, Electronic<br />
Semiconductor Failure Testing, Parts List Selection & Sizing,<br />
Power Generation System Scheduling, Component Failure<br />
Prediction, Machining Advisor, Numerically Controlled Machine<br />
Tool Selection, Petrochemical Plant Process Control, Control<br />
Panel Layout Design, Material and Process Design Advisor...<br />
I N S U R A N C E - Rating for Substandard Life Insurance, Workers<br />
Comp Classification, Underwriting Assistance, Social Security<br />
Help Desk and Benefit Identification, Unemployment Insurance<br />
E l i g i b i l i t y . . .<br />
M E D I C A L - Admission Protocols, X-Ray Analysis,<br />
Hematological Diagnoses, Psychiatric Interviewing, Pediatric<br />
Auditory Brainstem Response Interpretation, Medical Decision<br />
Making, Respirator Selection for Preschool Children, Health<br />
Services Utilization and modeling, Diagnostic Systems, In-Vitro<br />
Fertilization, Symptom Analysis, Voice-Driven Lab Diagnosis,<br />
Rehabilitation Feasibility Strategies, Billing and Account<br />
Management, Disease Research...<br />
MILITARY , GOVERNMENT & SPACE RELATED -<br />
Submarine Approach Officer Training, Combat Methodology<br />
Selection, Radar Mode Workstation Designing, Federal Contract<br />
Management, Severe Weather Forecasting, Shuttle Payload On-<br />
Orbit Analysis, Metals Materials Selector, GB Satellite<br />
Abnormality Correction, Selection of Non-materials in<br />
Aerospace Applications...<br />
T R O U B L E - S H O O T I N G - Airplane Starting Systems, Data<br />
Communications, Test and Repair of a PCB, Gas Turbine<br />
Control System, Bearing System Failures, Telecommunications<br />
Difficulties, Real-Time Process Control, Meterman's Assistant<br />
System, Mechanical Equipment and Systems Diagnosis, Weld<br />
Flaw Detection, Web Break Diagnosis in Paper Milling, Power<br />
Plant Turbine Generator Bearing Maintenance System...<br />
MANY, MANY OTHERS - Telephone System Configurator,<br />
Training Material & Product Selection, Manufacturing Resource<br />
Planning, Production Scheduling, Service Networking, Airline<br />
Scheduling, Cost/Benefit Analysis, Planning Implementation,<br />
Career Development, Quick Proposal Estimating, Credit Control,<br />
Product Development, Telephone Call Screening, Real Estate<br />
Market & Mortgage Credit Analysis, Retirement Planning, Sales<br />
Analysis...<br />
<strong>EXSYS</strong>, Inc.<br />
1720 Louisiana Blvd. NE<br />
Suite 312<br />
Albuquerque, NM 8711<br />
TEL(505)256-8356<br />
FAX(505)256-8359