;; ***** automech.csrl ***** ;; written in a variant of CSRL ; From: Michael C Tanner ; To: dcb@sequoia.WPI.EDU ; Subject: Re: Feedback ; Date: Fri, 04 Feb 2000 08:49:34 -0500 ; I wrote the Automech program. Sriram Mahalingham did some work on it ; but moved on to something else before it was done. Two grad students ; from the nuclear engineering department served as "experts" (Hashemi and ; Ruparel). Tom Bylander and I co-wrote the only paper I know of: ; M. C. Tanner and T. Bylander, "Application of the CSRL Language to the ; Design of Expert Diagnosis Systems: The Auto-Mech Experience," in ; _Artificial Intelligence in Maintenance_, J. J. Richardson (ed.), pages ; 149-169, Noyes Publications, Park Ridge, NJ, 1985. ; (There was a tech report and a conference paper but I think this one is ; derived from them.) ; The original version was written in UCI Lisp on the DEC20, i.e., ; command-line interface, no graphics. Tom converted it to ; Interlisp/LOOPS when he ported CSRL, so the later demos were done on the ; Xerox workstations showing a graphical hierarchy and nodes being ; highlighted as they worked. ; -- mike (define-concept engine (declarations (subconcepts fuel) (superconcept engine)) (knowledge-groups (what (options end-after-match-all) (rules (condition (ask-tfu? (does the car stall?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (does the car run rough?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (will the car start?)) match ((if f then 3) (if t then -3))) (condition (ask-tfu? (does the car start hard?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (does the car hesitate?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (is the car slow to respond?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (do you hear knocking?)) match ((if t then 3) (if f then -3))))) (when (options end-after-match-all) (rules (condition (ask-tfu? (does the problem occur while accelerating?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (does the problem occur while decelerating?)) match ((if f then 3) (if t then -3))) (condition (ask-tfu? (does the problem occur while changing direction?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (does the problem occur on loading?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (does the problem occur while idling?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (does the problem occur while cruising?) match ((if t then 3) (if f then -3)))))) (temperature (options end-after-match-all) (rules (condition (ask-tfu? (does the problem occur while the engine is both hot and cold?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (does the problem occur only when the engine is hot?)) match ((if t then 3) (if f then -3))) (condition (ask-tfu? (does the problem occur only when the engine is cold?)) match ((if t then 3) (if f then -3) ) ) ) ) (summary (table (conditions what when temperature) (match (if (0 0 0) then 0) (if ((ge -18) ? (ge -6)) then 3) (if (? ? ?) then -3) )) ) ) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine) ) ) (define-concept fuel (declarations (subconcepts delivery choke carburetor mixture-screw vacuum air gas) (superconcept engine)) (knowledge-groups (summary (table (conditions (or (ask-tfu? (does the problem occur only when the engine is hot?)) (ask-tfu? (does the problem occur only when the engine is cold?))) (and (not (ask-tfu? (will the car start?))) (not (ask-tfu? (does the engine crank?)))) (ask-tfu? (have you eliminated ignition as a possible problem?))) (match (if (t ? ?) then 3) (if (? t ?) then -3) (if (? ? t) then 2))))) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine))) (define-concept delivery (declarations (superconcept fuel)) (knowledge-groups (steady-state (table (conditions (ask-tfu? (does the problem occur while cruising?)) (ask-tfu? (does the problem occur while idling?))) (match (if (f f) then -3) (if (f ?) then -2) (if (? f) then -2) (if (t t) then 3)))) (fuel-delivered (table (conditions (ask-tfu? (is there fuel in the filter?)) (ask-tfu? (is any fuel delivered to the carburetor?))) (match (if (f ?) then 3) (if (? t) then -2) (if (? ?) then 0)))) (tank (rules (condition (ask-tfu? (is there fuel in the tank?)) match ((if f then 3) (if t then -3) (if u then 0))))) (summary (table (conditions steady-state fuel-delivered tank) (match (if (? ? 3) then 3) (if ((le 2) ? ?) then -3) (if (3 ? ?) then 1))))) (messages-received (establish (if (le tank 0) then summary else tank)) (refine usual-refine) (establish-refine usual-establish-refine))) (define-concept choke (declarations (subconcepts choke-stuck-open choke-stuck-closed) (superconcept fuel)) (knowledge-groups (summary (rules (condition (ask-tfu? (does the problem occur while the engine is both hot and cold?)) match ((if t then -2))) (condition (or (ask-tfu? (does the problem occur only when the engine is hot?)) (ask-tfu? (does the problem occur only when the engine is cold?))) match ((if t then 2)))))) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine))) (define-concept choke-stuck-open (declarations (subperconcept choke)) (knowledge-groups (summary (rules (condition (ask-tfu? (does the problem occur only when the engine is cold?)) match ((if t then 2) (if u then 0) (if ? then -2)))))) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine))) (define-concept choke-stuck-closed (declarations (subperconcept choke)) (knowledge-groups (summary (rules (condition (ask-tfu? (does the problem occur only when the engine is hot?)) match ((if t then 2) (if u then 0) (if ? then -2)))))) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine))) (define-concept carburetor (declarations (subperconcept fuel)) (knowledge-groups (steady-state (table (conditions (ask-tfu? (does the problem occur while cruising?)) (ask-tfu? (does the problem occur while idling?))) (match (if (f f) then -3) (if (f ?) then -2) (if (? f) then -2) (if (t t) then 3)))) (temperature-independent (rules (condition (ask-tfu? (does the problem occur while the engine is both hot and cold?)) match ((if t then 3) (if ? then 0))))) (other (rules (condition (ask-tfu? (is there fuel leaking around the carburetor?)) match ((if t then 3))) (condition (ask-tfu? (does it idle fast?)) match ((if t then 3))))) (summary (table (conditions steady-state temperature-independent other) (match (if ((ge 2) 3 ?) then 3) (if ((ge 2) ? ?) then 2) (if (? 3 ?) then 2) (if (? ? 3) then 3) (if (0 0 0) then 0) (if (? ? ?) then -3))))) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine))) (define-concept mixture-screw (declarations (superconcept fuel)) (knowledge-groups (rough (table (conditions (and (ask-tfu? (does the car run rough?)) (ask-tfu? (does the problem occur while idling?))) (and (ask-tfu? (does the car run rough?)) (ask-tfu? (does the problem occur while loading?)))) (match (if (t t) then 3) (if (t ?) then 2) (if (? t) then 2) (if (f f) then -3) (if (? ?) then 0)))) (summary (table (conditions rough (ask-tfu? (do you hear knocking?)) (ask-tfu? (have you been getting bad millage?)) (ask-tfu? (do you smell gas?))) (match (if (-3 f ? ?) then -3) (if (? t ? ?) then 3) (if (? u u u) then 0) (if ((le 2) ? ? ?) then 2) (if (? ? t ?) then 2) (if (? ? ? t) then 2))))) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine))) (define-concept vacuum (declarations (superconcept fuel)) (knowledge-groups (rough (table (conditions (and (ask-tfu? (does the car run rough?)) (ask-tfu? (does the problem occur while idling?))) (and (ask-tfu? (does the car run rough?)) (ask-tfu? (does the problem occur while loading?)))) (match (if (t t) then 3) (if (t ?) then 2) (if (? t) then 2) (if (f f) then -3) (if (? ?) then 0)))) (oscillation (table (conditions (ask-tfu? (does the car hesitate?)) (ask-tfu? (does the car run rough?))) (match (if (t ?) then 3) (if (? t) then 3) (if (f f) then -3) (if (? ?) then 0)))) (physical (table (conditions (ask-tfu? (any cracked or punctured hoses?)) (ask-tfu? (can you hear hissing when engine is running?)) (ask-tfu? (are the vaccum hoses old?))) (match (if (t ? ?) then 3) (if (? t ?) then 2) (if (? ? t) then 1) (if (? ? ?) then 0)))) (summary (table (conditions rough oscillation physical) (match (if (? ? (ge 2)) then 3) (if (? -3 ?) then -3) (if (0 0 0) then 0) (if (? ? ?) then 2))))) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine))) (define-concept air (declarations (superconcept fuel)) (knowledge-groups (filter (table (conditions (ask-tfu? (can you see sunlight through the filter?)) (ask-tfu? (is the filter old?))) (match (if (f ?) then 3) (if (? t) then 2)))) (snorkel (table (conditions (and (ask-tfu? (does the problem occur only when the engine is cold?)) (ask-tfu? (is the valve in the snorkel open when the engine is cold?))) (ask-tfu? (is the snorkel pointing in the wrong direction?))) (match (if (t ?) then 3) (if (? t) then 2)))) (summary (table (conditions filter snorkel) (match (if (3 ?) then 3) (if (2 ?) then 2) (if (? 3) then 3) (if (? 2) then 2) (if (0 0) then 0) (if (? ?) then -2))))) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine))) (define-concept gas (declarations (superconcept fuel)) (knowledge-groups (summary (table (conditions (ask-tfu? (did the problem start after the last fillup?)) (ask-tfu? (has the problem gotten worse since the last fillup?)) (ask-tfu? (have you tried a higher grade of gas?))) (match (if (t ? ?) then 3) (if (f t ?) then 3) (if (f f f) then 3) (if (u u u) then 0) (if (? ? ?) then -3))))) (messages-received (establish summary) (refine usual-refine) (establish-refine usual-establish-refine))) --------------------- LAIR, Ohio State U.