ES Program Structure - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

ES Program Structure

Description:

If there is none, it goes to the Questions. ... PUT filename. MENU ... See Page 65 of text. action statements. Assignment Statement ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 18
Provided by: lefk
Category:
Tags: act | an | on | program | put | question | structure | to

less

Transcript and Presenter's Notes

Title: ES Program Structure


1
(No Transcript)
2
ES Program Structure
  • Action Block
  • Rules Block
  • Questions Block

3
Action Block
  • ACTION
  • action statements

4
action statements
  • Display
  • Find
  • Get
  • Put
  • Menu
  • Assignment
  • Comment

5

action statements
  • DISPLAY text string or
  • string1 variablename string2
  • DISPLAY "Your credit request of CredRequest is
    Approval."

6

action statements
  • FIND variablename
  • 1. Engine goes to first (next) Rule that
    contains variablename in its THEN clause. If
    there is none, it goes to the Questions.
  • 2. Engine determines if the IF clause of the
    Rule is TRUE.
  • 3. If TRUE, Engine returns the value assigned in
    the THEN clause.
  • 4. If FALSE it returns to Step 1, and continues
    until there is a True in Step 3.

7
Rules are sets of IF Statements
  • IF logicexpression THEN variablename value
  • See Page 42 of text

8

action statements
  • GET variablename fieldname, filename, ALL
  • PUT filename
  • MENU ...
  • See Page 65 of text

9
Assignment Statement
  • variablename value
  • 1. value is considered a string literal
  • e.g. Member_status OK
  • 2. If value is a variable, then the contents of
    the variable are assigned by
  • variablename (value)
  • e.g. NPA (NetPersonalAssets)
  • 3. All variables have the initial value UNKNOWN

10
Comment
  • ! commentline
  • Example
  • ! This is the Income computation

11
ES Program Structure
  • Action Block
  • Rules Block
  • Questions Block

12
Rules Block
  • RULE label-1
  • ifstatement
  • ifstatement
  • RULE label-2
  • ifstatement
  • See Page 30 of text

13
ifstatement
  • IF logicexpression THEN statements
  • logicexpression
  • 1. OR is stronger than AND
  • a and b or c a and (b or c)
  • 2. X operator Y (e.g. X gt Y)
  • (1) If X is UNKNOWN, engine will
    automatically do a FIND
  • (2) If Y is UNKNOWN it will not. You
    must first do a FIND Y

14
ifstatement
  • IF logicexpression THEN statements
  • logicexpression
  • 3. X operator Y
  • If Y is an arithmetic expression, always
    write (Y).
  • Example Income gt (3 Expense)

15
ES Program Structure
  • Action Block
  • Rules Block
  • Questions Block

16
Questions Block
  • ASK vblname promptstring
  • ASK vblname promptstringCHOICES vblname
    value1, value2,
  • ASK vblname promptstring
  • MENU vblname, See Page 65

17
The ProblemCredit Analysis by an Expert System
  • Approval of a Credit Request for a given amount
  • Customer has a credit record in a commercial
    credit database (CDB)
  • Customer submits a file of information of current
    business data for his account (ADB)
  • The government maintains an industry stability
    rating database (SRDB)
  • Customer is asked questions during the session
    (UQ)
Write a Comment
User Comments (0)
About PowerShow.com