next up previous contents
Next: Block-to-Block Sequence Up: Sequencing Methods Previous: Sequencing Methods

Access Path Sequence

The access-path structure of individual rules enforces one type of ordering constraint.

Consider the following rule, taken from an expert system for the diagnosis of headache. It is invoked for a given patient, bound to the variable ?p, on the assertion (isa ?p Block6). Once the rule is invoked, the access path structure of the antecedent specifies the order in which the four predicates are queried. Each predicate backward-chains to an :ask form to query the user, and the questions are asked in the proper sequence. Forward-chaining rules are invoked to take an appropriate action in case any of the questions are answered true.

(:rules Block6

  ((isa ?p Block6)
   (flashes/spots-before-eyes-at-onset ?p ?tv1)
   (one-eye-red/tearful ?p ?tv2)
   (weakness-of-hand/arm/leg ?p ?tv3)
   (difficulty-speaking ?p ?tv4)
   ->
   (isa ?p Block7))

  ((flashes/spots-before-eyes-at-onset ?p True) -> (Dx ?p vascular-HA))
  ((one-eye-red/tearful ?p True)                -> (count-blues ?p True))
  ((weakness-of-hand/arm/leg ?p True)           -> (reds ?p True))
  ((difficulty-speaking ?p True)                -> (reds ?p True)))

(:rules Patients

((flashes/spots-before-eyes-at-onset ?p ?tv) <- (:ask (flashes/spots-before-eyes-at-onset ?p ?tv)))
((one-eye-red/tearful ?p ?tv)                <- (:ask (one-eye-red/tearful ?p ?tv)))
((weakness-of-hand/arm/leg ?p ?tv)           <- (:ask (weakness-of-hand/arm/leg ?p ?tv)))
((difficulty-speaking ?p ?tv)                <- (:ask (difficulty-speaking ?p ?tv))))



Micheal S. Hewett
Tue Oct 29 10:54:13 CST 1996