Professional Documents
Culture Documents
Knowledge
Explanation Facility Inference Engine Base
Knowledge
User Engineer
Overview
• ESTA is a rule based system that has the facilities
for
– Knowledge base
– Inference engine
– Graphic user interface
– Graphic developer interface
– Explanation
– Uncertain reasoning
– Debugging
– interface to system programs
Knowledge base
– Sections
– Parameters
KnowledgeBase - Sections
if (problem='starting_problem') do
starting_problem
if (problem='overheating') do overheating
if (problem='smell_of_gasoline') do
smell_of_gasoline
if (problem='vibration') do vibration
do other
Strings
Strings are a sequence of characters between two single quotes.
‘This is a string.’
Symbols
Comparison symbols: < > <> <= >= =
Arithmetic operators: * - + /
Other symbols : () .. , . /* */
Knowledge Representation
Comments
Comments are enclosed within /* */
Expresions
There are three types of expressions in ESTA
Text expression
Number expression
Boolean expression
Text Expressions
explanation
‘Marital status is determined by whether’ &
‘there exists a marriage certificate for’ &
name ‘and’ name_of_partner ‘ or not’
options
married,
unmarried.
question ‘What is the marital status of’ name ‘?’
Parameters
The Question Field
• The question field is used when the value of a parameter is to be
determined by an answer to a question.
• If the question text is omitted, ESTA will generate a default text for
the question, based on the description text of the decleration field and
type of the parameter.
• Examples
rules
‘blue’ if frequency < 1000,
‘orange’ if frequency >= 1000 and frequency < 2000,
‘red’ if frequency > 2000 and frequency < 3000,
‘invisible’.
Parameters
The Picture Field
The picture field is used to specify a picture that will be shown during the
consultation.
The picture can be specified by the name of the picture from the picture
database or the name of a parameter.
picture ‘cars’
/* cars is a picture name from the pictures db. */
picture car
/* car is a parameter name */
Boolean Parameter
parameter wet_weather ‘the weather is wet’
type boolean
explanation ‘It has been raining within the last few days
or it is foggy’
question ‘Is the weather wet?’
Category Parameter
parameter car ‘the kind of car’
type category
explanataion ‘Identify your car with one of the listed types’
option
ambulance,
policecar,
sedan,
van.
question ‘Which kind of car do you have?’
picture ‘cars’
Sections
parameter n ‘n’
type number
Sections
Chain
The chain action enables ESTA to consult new knowledge
bases
Example
section start : 'Start section in the demo knowledge
base'
Stop
The stop action may be used to optimize rules written in a section. Execution
of a stop action indicates that no more actions are to be executed in the
containing section.
Sections
Call
The call action is used to call one of the built in procedures in ESTA.
call clear_all() – clears all the parameter values in the current knowledge
base
Example
You can specify a picture as a title
*cars*
or
• cf_not(P1) -> P3
P3 is (1-P1)
dde_execute(Channel, Command)
• Sends the commands in Command to the server for
execution.Channel is the number returned from
dde_initiate.
DDE Communication
dde_request(Channel, Item)
is used to retrieve a data item from the server.
DDE Communication
Example:
CH := dde_initiate(‘excel’, ‘file_a.xls’)
dde_poke_number(CH, ‘R2C4’, 546)
dde_execute(CH, ‘[OPEN(\034file_b.xls\034)]’
VAL := dde_request_number(CH, ‘R1C2’)
dde_terminate(CH)
http://www.comp.rgu.ac.uk/staff/khui/cm3016/cours
ework/CM3016%20coursework%200708.pdf