home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume3 / trc / part1 < prev    next >
Encoding:
Text File  |  1986-11-30  |  37.8 KB  |  1,920 lines

  1. Newsgroups: mod.sources
  2. Subject: TRC - expert system building tool (part 1 of 8)
  3. Approved: jpn@panda.UUCP
  4.  
  5. Mod.sources:  Volume 3, Issue 109
  6. Submitted by: ihnp4!dicomed!ndsuvax!nckary (Daniel D. Kary)
  7.  
  8. This is NOT a shell archive.  Simply delete everything up to and including
  9. the cut mark and save the result as overview.doc.
  10.  
  11. Dan Kary
  12. ihnp4!dicomed!ndsuvax!nckary
  13.  
  14. -------------- cut here ---------------
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                         CHAPTER  1
  25.  
  26.  
  27.                     COMPILER OVERVIEW
  28.  
  29.  
  30.  
  31.  
  32.      TRC is a useful tool for building expert systems, but
  33.  
  34. it  is  not  intended  as the only tool that the knowledge
  35.  
  36. engineer will use.  TRC augments  the  editing,  compiling
  37.  
  38. and  debugging  tools  already present on the system being
  39.  
  40. used for development.   Figure  1  illustrates  the  steps
  41.  
  42. involved in developing an expert system with TRC.
  43.  
  44.  
  45.      The knowledge engineer first creates the  TRC  source
  46.  
  47. code  file  using  whatever  text  file  editing tools are
  48.  
  49. available.  This text file is then passed to the TRC  com-
  50.  
  51. piler  which produces a set of C language files.  In addi-
  52.  
  53. tion  to  the  C  language  files  produced  by  TRC,  the
  54.  
  55. knowledge  engineer  must  provide  auxiliary  C  language
  56.  
  57. file(s).  At a minimum the auxiliary file(s) must  contain
  58.  
  59. a  main procedure which will initialize STM and invoke the
  60.  
  61. inference engine produced by TRC.  The size of the auxili-
  62.  
  63. ary  code is limited only by the C compiler itself and the
  64.  
  65. address space of target  machine.   The  inference  engine
  66.  
  67. might be a small part of a larger system.
  68.  
  69.  
  70.      The input and output facilities provided by  TRC  are
  71.  
  72. limited.  Any interaction with the user or the file system
  73.  
  74. on the  target  machine  will  usually  be  coded  in  the
  75.  
  76.  
  77.                                                          1
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.                                                          2
  88.  
  89.  
  90. auxiliary  code files.  C language code can be embedded in
  91.  
  92. either the situation or the action part of a rule.  It may
  93.  
  94. be convenient to place any procedures that are called from
  95.  
  96. within a rule in an auxiliary code file.
  97.  
  98.  
  99.           _________________
  100.           |               |
  101.           |      TRC      |
  102.           | Specification |
  103.           |_______________|
  104.                  |
  105.             _____V______
  106.             |          |
  107.             |   TRC    |
  108.             | Compiler |
  109.             |__________|
  110.                  |              _____________
  111.             _____V______        |           |
  112.             |          |        | Auxiliary |
  113.             |    C     |        |     C     |
  114.             |  Files   |        |   Files   |
  115.             |__________|        |___________|
  116.                  |__________________|
  117.                           |
  118.                      _____V_____
  119.                      |         |
  120.                      |   CC    |
  121.                      |_________|
  122.                           |
  123.                     ______V_______
  124.                     |            |
  125.                     | Executable |
  126.                     |    Code    |
  127.                     |____________|
  128.  
  129.               Figure 1: Development Sequence
  130.  
  131.  
  132.  
  133.      The C code produced by TRC and the auxiliary  C  code
  134.  
  135. provided  by the knowledge engineer are then passed to the
  136.  
  137. C compiler.  CC is the traditional  name  of  the  command
  138.  
  139. that   invokes  the  sequence  of  processes  required  to
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.                                                          3
  154.  
  155.  
  156. translate the C language file(s)  to  an  executable  code
  157.  
  158. file.   This sequence of processes will often include mul-
  159.  
  160. tiple compiler passes, an assembler process and  a  linker
  161.  
  162. process. In the context of figure 1, CC refers to whatever
  163.  
  164. sequence is required to translate the C language files  to
  165.  
  166. executable code.
  167.  
  168.  
  169.      Building an expert system is much like  building  any
  170.  
  171. other software system.  The system is specified, designed,
  172.  
  173. coded, tested and finally released.  Each  of  the  steps,
  174.  
  175. particularly   coding  and  testing,  will  frequently  go
  176.  
  177. through several iterations.  TRC provides debugging  tools
  178.  
  179. which  will  profile and trace the execution of the infer-
  180.  
  181. ence engine.  The TRC debugging tools along with  whatever
  182.  
  183. debugging  tools  are  provided with the C language system
  184.  
  185. can be used in the coding and testing  phase  to  simplify
  186.  
  187. development.
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.                         CHAPTER  2
  220.  
  221.  
  222.                     DESIGN OBJECTIVES
  223.  
  224.  
  225.  
  226.  
  227.      An expert system for configuring a packet switch pro-
  228.  
  229. vided  the  initial stimulus for this project.  The expert
  230.  
  231. system was implemented using PROS,  a  LISP  based  expert
  232.  
  233. system  building  tool.  PROS provided a convenient way to
  234.  
  235. represent the  knowledge  needed  to  configure  a  packet
  236.  
  237. switch.  The representation was easy to read and expressed
  238.  
  239. _w_h_a_t the machine was to do more than  _h_o_w  it  was  to  be
  240.  
  241. done.   There  was an aesthetic quality to the representa-
  242.  
  243. tion that a seasoned programmer can appreciate.  Execution
  244.  
  245. turned  out  to  be  a major disappointment.  A relatively
  246.  
  247. simple problem required over two hours of CPU  time  on  a
  248.  
  249. VAX  11/780.   A  human expert could easily solve the same
  250.  
  251. problem in fifteen minutes.
  252.  
  253.  
  254.      Artificial  Intelligence  programs  are  not   always
  255.  
  256. expected  to  solve problems faster than humans.  For some
  257.  
  258. problems, being able to solve the problem on a computer at
  259.  
  260. all  is a major accomplishment.  Being able to configure a
  261.  
  262. packet switch with a computer program did not seem like  a
  263.  
  264. major  accomplishment  and it seemed that a program should
  265.  
  266. be able to solve the problem  much  faster  than  a  human
  267.  
  268. expert.  It also seemed that a program could be written in
  269.  
  270.  
  271.  
  272.                                                          4
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.                                                          5
  283.  
  284.  
  285. a procedural language that would do the same thing in  the
  286.  
  287. same way as the expert system, only much faster.
  288.  
  289.  
  290.      The result of  the  initial  attempt  to  produce  an
  291.  
  292. expert  system  using a procedural language was a compiler
  293.  
  294. called 't' (translator).  The 't'  compiler  was  suitable
  295.  
  296. for the packet switch problem and similar simple problems.
  297.  
  298. The packet switch problem which required two hours of  cpu
  299.  
  300. time  in  the  LISP based implementation, executed in less
  301.  
  302. than one second when compiled  with  't'.   The  execution
  303.  
  304. time  of  the code produced by 't' was more reasonable for
  305.  
  306. the complexity of the problem.  This  seemed  to  indicate
  307.  
  308. that  it  might  be  possible to speed up the execution of
  309.  
  310. more complex problems.
  311.  
  312.  
  313.      The first step in designing  TRC  was  to  study  the
  314.  
  315. operation  of  PROS  and  PASVII.   The most objectionable
  316.  
  317. aspect of both these tools is the amount of time  required
  318.  
  319. for execution.  The expectation was that understanding the
  320.  
  321. operation of these tools would suggest ways in which  fas-
  322.  
  323. ter  executing expert systems could be produced.  PROS and
  324.  
  325. PASVII operate in similar manners and are not unlike other
  326.  
  327. LISP based implementation tools.
  328.  
  329.  
  330.      In PROS and PASVII, both STM and LTM are  represented
  331.  
  332. by  LISP  lists.   The STM list contains all the data that
  333.  
  334. the rules will operate on and the LTM  list  contains  all
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.                                                          6
  349.  
  350.  
  351. the  rules.   Each  system has a general purpose inference
  352.  
  353. engine that searches through the LTM list for a rule whose
  354.  
  355. situation  part  is  satisfied.   To test if the situation
  356.  
  357. part is satisfied, the STM list is searched  for  whatever
  358.  
  359. pattern was specified in the situation part.  Both systems
  360.  
  361. use the trivial conflict resolution  strategy  of  testing
  362.  
  363. the  rules sequentially and selecting the first rule whose
  364.  
  365. situation part is satisfied.
  366.  
  367.  
  368.      A LISP list can be used to  represent  any  structure
  369.  
  370. that  can  be imagined.  A single list is certainly suffi-
  371.  
  372. cient to represent STM.  Searching the list for a  pattern
  373.  
  374. match  involves  decomposing the list.  This operation can
  375.  
  376. be time consuming when the list  is  large  and/or  deeply
  377.  
  378. nested.   The  list must be decomposed each time a rule is
  379.  
  380. tested.  In both PROS and PASVII the list is  also  decom-
  381.  
  382. posed  in  the action part, if something has to be removed
  383.  
  384. from STM.  Reducing the time required to searching STM  is
  385.  
  386. an obvious way to speed up execution.
  387.  
  388.  
  389.      Since the LTM is also represented by a  single  list,
  390.  
  391. it  too is continuously decomposed in the execution of the
  392.  
  393. program.  Consider an expert system composed of a  hundred
  394.  
  395. rules.   If  each rule is equally likely to be selected by
  396.  
  397. the resolution strategy, then on the average  fifty  rules
  398.  
  399. will  have  to  be  tested  before  the rule that is to be
  400.  
  401. applied is found.  This means that fifty rules have to  be
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.                                                          7
  415.  
  416.  
  417. extracted  from  the  LTM  list and the STM list has to be
  418.  
  419. decomposed fifty times before one rule can be applied.  It
  420.  
  421. is  not  uncommon  for this type of system to spend 90% of
  422.  
  423. it's execution time testing rules and  only  10%  of  it's
  424.  
  425. time applying actions[12].  Eliminating the need to decom-
  426.  
  427. pose the LTM and reducing the time spent testing rules are
  428.  
  429. other obvious ways to improve execution speed.
  430.  
  431.  
  432.      Both PROS and PASVII  are  acceptable  languages  for
  433.  
  434. expressing  rules.   The  TRC language is quite similar to
  435.  
  436. both PROS and PASVII.  Differences  between  TRC  and  the
  437.  
  438. LISP  based  languages  are  due  primarily to differences
  439.  
  440. between C and  LISP.   TRC  also  contains  some  language
  441.  
  442. features  not  found  in  either  PROS or PASVII.  The TRC
  443.  
  444. language is described in detail in Appendix C.
  445.  
  446.  
  447.      Finally,  why  translate  to  the  C  language?   The
  448.  
  449. machine  of interest (VAX 11/780) runs an operating system
  450.  
  451. (4.2BSD) that is written largely in C.  The 4.2BSD C  com-
  452.  
  453. piler  is  intended  as a production compiler.  Other com-
  454.  
  455. pilers supplied with the system  (e.g.  PASCAL)  are  pri-
  456.  
  457. marily  instructional tools[18].  The C language is widely
  458.  
  459. used and compilers are available for small computers.  The
  460.  
  461. availability  of  C compilers for small computers makes it
  462.  
  463. feasible to develop expert systems with TRC that are  tar-
  464.  
  465. geted to small computers.
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.                         CHAPTER  3
  481.  
  482.  
  483.                    TRANSLATION STRATEGY
  484.  
  485.  
  486.  
  487.  
  488.      The first design objective is to reduce the amount of
  489.  
  490. time spent searching STM.  The way STM is represented will
  491.  
  492. affect the way a search is conducted.  Since speed is  the
  493.  
  494. objective,  a  representation that can be searched quickly
  495.  
  496. is desirable.  The representation must also be  sufficient
  497.  
  498. for  the  problem.        LISP based implementations use a
  499.  
  500. LISP list to represent STM.  The LISP list  representation
  501.  
  502. for  STM  has been sufficient for many complex problems[8,
  503.  
  504. 13, 14, 15, 16].
  505.  
  506.  
  507.      There is little possibility  that  any  program  will
  508.  
  509. exhaust  human  imagination  by using a LISP list in every
  510.  
  511. way it can possibly be used.  This implies that  the  full
  512.  
  513. capability  of a LISP list may not be required.  The ques-
  514.  
  515. tion, then, is how much or how little is enough.   A  LISP
  516.  
  517. list  can contain atoms or other LISP lists.  Atoms can be
  518.  
  519. strings or numbers, and numbers can be integers or  reals.
  520.  
  521. A  variable in a procedural language can be a string or an
  522.  
  523. integer or a real, so atoms are  simple  to  represent  in
  524.  
  525. procedural   languages.    The  question  now  is  how  to
  526.  
  527. represent or replace a list?
  528.  
  529.  
  530. _D_a_t_a _R_e_p_r_e_s_e_n_t_a_t_i_o_n
  531.  
  532.  
  533.                                                          8
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.                                                          9
  544.  
  545.  
  546.      It was decided  that  STM  would  be  represented  by
  547.  
  548. linked  lists  of  structures  that could contain whatever
  549.  
  550. variables (atoms) that were needed.  This is the subset of
  551.  
  552. a LISP list that is easy to build and manipulate in a pro-
  553.  
  554. cedural language.  The structures that are used  to  build
  555.  
  556. the linked list will be referred to as objects.  The vari-
  557.  
  558. ables that the object structures contain will be  referred
  559.  
  560. to  as elements.  Element values distinguish the otherwise
  561.  
  562. identical objects from one another.
  563.  
  564.  
  565.      The number and type of elements that are required  to
  566.  
  567. distinguish  an object will vary between applications.  An
  568.  
  569. expert system will often refer to  objects  that  bear  no
  570.  
  571. similarity to one another.  One object may be described by
  572.  
  573. two strings, while  another  object  may  require  a  real
  574.  
  575. number  and  an  integer  to  distinguish  it  from  other
  576.  
  577. objects.  It would be wasteful to require every object  to
  578.  
  579. contain  the  same number and type of elements.  Therefore
  580.  
  581. the description of STM is extended  to  a  set  of  lists,
  582.  
  583. rather  than  a single list.  Each list is a collection of
  584.  
  585. related objects.
  586.  
  587.  
  588.      One side effect of representing STM as a set of lists
  589.  
  590. is  that  STM  is  in effect partially sorted.  In the TRC
  591.  
  592. language every reference to an object or element  includes
  593.  
  594. an  implicit  reference  to  the list where the object may
  595.  
  596. exist.  Stated another way, it is not possible to refer to
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.                                                         10
  610.  
  611.  
  612. an  object or an element without implicitly mentioning the
  613.  
  614. list where the object or element  might  be  found.   This
  615.  
  616. means  that when STM is to be searched for an object there
  617.  
  618. is only one list where it can  possibly  exist,  therefore
  619.  
  620. only one of the set of lists has to be searched.
  621.  
  622.  
  623. _R_u_l_e _R_e_p_r_e_s_e_n_t_a_t_i_o_n
  624.  
  625.  
  626.      A situation-action rule  is  essentially  an  if-then
  627.  
  628. statement;  "if  this  situation  exists,  then  take this
  629.  
  630. action".  LTM is translated to a  single  procedure  which
  631.  
  632. contains an if statement for each rule.  The if statements
  633.  
  634. (rules) are tested successively  until  one  evaluates  to
  635.  
  636. true.   The action part of that statement is then executed
  637.  
  638. (the rule fires).  Control then branches back to the first
  639.  
  640. if  statement  (rule) and testing continues at that point.
  641.  
  642. This sequence of events continues until  no  if  statement
  643.  
  644. (rule)  evaluates to true (fires), at which point the pro-
  645.  
  646. cedure terminates.
  647.  
  648.  
  649.      Up to this point the overall action of an expert sys-
  650.  
  651. tem  has been described as "searching LTM for a rule whose
  652.  
  653. situation part is true".  On each iteration only one  rule
  654.  
  655. is  applied.   If  next  rule to be applied could be found
  656.  
  657. without searching LTM, the search time would be reduced to
  658.  
  659. zero.   Reducing  search time is a primary goal of the TRC
  660.  
  661. rule representation.   From  this  point  on  the  overall
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.                                                         11
  676.  
  677.  
  678. action  of an expert system will be to "reject at the ear-
  679.  
  680. liest possible moment rules that cannot be applied until a
  681.  
  682. rule that can be applied is found".  There are some conse-
  683.  
  684. quences of this new attitude worth noting.
  685.  
  686.  
  687.      One side effect of the representation for STM is that
  688.  
  689. it  is  possible  to have some knowledge of what is in STM
  690.  
  691. without searching STM.  Suppose there is an expert  system
  692.  
  693. where  two  types of objects can exist in STM, there would
  694.  
  695. then be two lists; call them list A  and  list  B.   Since
  696.  
  697. each list can contain only objects and not other lists, it
  698.  
  699. is possible to keep a count of how  many  objects  are  in
  700.  
  701. each  list.   The  count  of the number of objects in each
  702.  
  703. list can be used to reject a rule without  searching  STM.
  704.  
  705. Suppose the situation part of a rule specified two objects
  706.  
  707. from list A and one from list B.  If either list is  empty
  708.  
  709. or  if  list  A  contains only one object, the rule can be
  710.  
  711. rejected without searching  either  list.   TRC  places  a
  712.  
  713. precondition  on  every  rule  that  causes the rule to be
  714.  
  715. rejected if STM does not contain enough of  each  type  of
  716.  
  717. object to make the situation part possible.
  718.  
  719.  
  720. _S_e_a_r_c_h_i_n_g
  721.  
  722.  
  723.      The default strategy for searching STM is called  the
  724.  
  725. LINEAR  strategy.   A  search is conducted for each object
  726.  
  727. listed in the situation part, in the order the objects are
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.                                                         12
  742.  
  743.  
  744. listed.   If  any  single  search fails, the rule is aban-
  745.  
  746. doned.  This is consistent with the "reject at the  earli-
  747.  
  748. est  possible  moment"  attitude  adopted for LTM.  Unfor-
  749.  
  750. tunately this simple strategy may not  be  a  sufficiently
  751.  
  752. powerful  pattern  matching  tool  for  some expert system
  753.  
  754. implementation requirements.
  755.  
  756.  
  757.      An alternate search strategy available in TRC, called
  758.  
  759. the  RECURSIVE strategy, is designed to perform a combina-
  760.  
  761. toric search on STM.  When the RECURSIVE strategy is used,
  762.  
  763. the  failure  of  an  individual search causes the rule to
  764.  
  765. fail only when there is no previous  search  that  can  be
  766.  
  767. redone.  Speed of execution can be dramatically reduced by
  768.  
  769. using the RECURSIVE strategy. Time loss is largely  depen-
  770.  
  771. dent on the size of the lists being searched.
  772.  
  773.  
  774.      Allowing the search strategy to be  selected  by  the
  775.  
  776. knowledge  engineer  on  a  per-rule basis is a compromise
  777.  
  778. designed to give the best of both  worlds;  fast  searches
  779.  
  780. when  combinatoric possibilities do not exist and powerful
  781.  
  782. pattern matching when they do.  The search  strategy  used
  783.  
  784. by PROS and PASVII is similar to the RECURSIVE strategy.
  785.  
  786.  
  787.      Both search strategies are detailed  in  Appendix  B.
  788.  
  789. Of particular interest will be section 6.3.3 of Appendix B
  790.  
  791. where a small example system illustrates  the  differences
  792.  
  793. between the two strategies.
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.                                                         13
  808.  
  809.  
  810. _A_c_t_i_o_n_s
  811.  
  812.  
  813.      The action part consists primarily  of  additions  to
  814.  
  815. stm  and deletions from stm.  On the surface it seems that
  816.  
  817. adding and deleting objects should be trivial.  There are,
  818.  
  819. however, performance issues to be considered.
  820.  
  821.  
  822.      Deletions usually refer to objects that were found in
  823.  
  824. the  situation  part.   This is a matter of practical con-
  825.  
  826. cern, since only those objects found in the situation part
  827.  
  828. are  guaranteed  to  exist  in STM.  There are two general
  829.  
  830. strategies for deleting the objects, either remember where
  831.  
  832. in  STM the objects were found or search STM in the action
  833.  
  834. part for the objects to  delete.   Both  PROS  and  PASVII
  835.  
  836. search STM in both the situation and the action part.  The
  837.  
  838. objects that are found in the situation part are moved  to
  839.  
  840. the  front of STM to minimize the time spent searching STM
  841.  
  842. in the action part.
  843.  
  844.  
  845.      There are some objectionable aspects to the  strategy
  846.  
  847. of  searching  STM in both the situation and action parts.
  848.  
  849. Every rule that fires can reorder STM.  It can  be  argued
  850.  
  851. that  reordering STM is a good idea, but it may not always
  852.  
  853. be what the knowledge engineer wants.  If STM is reordered
  854.  
  855. in  the  situation  part it is possible that the search in
  856.  
  857. the action part  will  find  different  objects  than  the
  858.  
  859. search  in  the  situation part found.  The possibility of
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.                                                         14
  874.  
  875.  
  876. finding something different in the action  part  than  was
  877.  
  878. found  in the situation part is at least counter intuitive
  879.  
  880. and possibly incorrect.  Finally, searching STM twice  for
  881.  
  882. the exact same object(s) is objectionable in and of itself
  883.  
  884. because it consumes time redoing work.
  885.  
  886.  
  887.      PASVII has an interesting way of  adding  objects  to
  888.  
  889. STM.   The list that represents STM is initialized to con-
  890.  
  891. tain some number of objects which may be atoms  or  lists.
  892.  
  893. An  atom  or  a  list  can  replace an atom or a list that
  894.  
  895. exists in STM.  If an atom or a list is  inserted  at  the
  896.  
  897. head  of  the  list, the last object (atom or list) in the
  898.  
  899. list falls off.  This action is called a metaphor for  the
  900.  
  901. action  of  short  term memory in humans.  As knowledge is
  902.  
  903. gathered old unused knowledge fades to the back of  memory
  904.  
  905. and eventually is forgotten.  Quite frankly, this metaphor
  906.  
  907. sounds more  like  a  clever  explanation  for  a  program
  908.  
  909. 'feature' than a useful tool.
  910.  
  911.  
  912.      The actions of adding and deleting objects in TRC are
  913.  
  914. not  quite  as clever as the previous example.  Objects to
  915.  
  916. be added to STM are simply inserted at  the  head  of  the
  917.  
  918. list,  nothing ever falls off the end of the list.  STM is
  919.  
  920. searched only in the situation part.  Objects that are  to
  921.  
  922. be  deleted in the action part must have been found in the
  923.  
  924. situation part.  This rule is enforced  by  the  compiler.
  925.  
  926. When  an  object  is  found  in  the situation part, it is
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.                                                         15
  940.  
  941.  
  942. identified with an indexed pointer.  The object can now be
  943.  
  944. referred to or deleted without searching STM.
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.                         CHAPTER  4
  1006.  
  1007.  
  1008.                        OPTIMIZATION
  1009.  
  1010.  
  1011.  
  1012.  
  1013.      Most of the improvements in execution speed  provided
  1014.  
  1015. by  TRC are side effects of the translation strategy.  STM
  1016.  
  1017. is partially sorted by virtue of being  represented  as  a
  1018.  
  1019. set  of  lists  rather  than  as a single list.  For every
  1020.  
  1021. object that can exist, there is only  one  list  that  can
  1022.  
  1023. contain that object.  The TRC lists themselves are simpler
  1024.  
  1025. than LISP lists.  A single linear pass through a TRC  list
  1026.  
  1027. will reveal every object.  A LISP list can be more complex
  1028.  
  1029. to search because it can be arbitrarily nested.  Precondi-
  1030.  
  1031. tions placed on every rule eliminate testing rules when it
  1032.  
  1033. is known that the rule's situation part can  not  possibly
  1034.  
  1035. be met.  Selectable search strategies allow quick searches
  1036.  
  1037. of STM when combinatoric possibilities do not exist.
  1038.  
  1039.  
  1040.      The optimizer does not produce code that  is  optimum
  1041.  
  1042. in any sense.  What it does is to perform a single, useful
  1043.  
  1044. code modification that can have a positive impact on  exe-
  1045.  
  1046. cution time.
  1047.  
  1048.  
  1049.      The goal of the optimizer is to reduce the amount  of
  1050.  
  1051. time  spent searching. Each time a rule fires a great deal
  1052.  
  1053. of  implicit  knowledge  about  the  content  of  STM   is
  1054.  
  1055. obtained.   It  is  known  that  no  rule  previous to the
  1056.  
  1057.  
  1058.                                                         16
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.                                                         17
  1069.  
  1070.  
  1071. current rule is true and no rule previous to  the  current
  1072.  
  1073. rule  can  be true after the execution of the current rule
  1074.  
  1075. unless the current rule modifies STM in such a way  as  to
  1076.  
  1077. make  some previous rule true.  These simple facts are the
  1078.  
  1079. entire basis of the optimizer.  Three tests must  be  per-
  1080.  
  1081. formed  to determine if it is possible for a rule to fire.
  1082.  
  1083. These tests will be called the NOT test, the ADD test  and
  1084.  
  1085. the MARK test.
  1086.  
  1087.  
  1088.      The tests are named after  the  TRC  statements  that
  1089.  
  1090. figure  prominently  in  the  test.   The  details of each
  1091.  
  1092. statement are presented in Appendix B.  For the purpose of
  1093.  
  1094. this  discussion  it  should  suffice to know that the NOT
  1095.  
  1096. statement is an explicit test for an empty list,  the  ADD
  1097.  
  1098. statement  is  a  request  to add something to STM and the
  1099.  
  1100. MARK statement is a request to remove something from STM.
  1101.  
  1102.  
  1103.      The first case to be considered is the case of a rule
  1104.  
  1105. which  contains  a  NOT  statement  in the situation part.
  1106.  
  1107. When a rule that fires contains an ADD statement  it  will
  1108.  
  1109. not be possible for any previous rule with a NOT statement
  1110.  
  1111. referring to that list to be the next rule to fire.  If  a
  1112.  
  1113. rule  that  fires  contains  a  MARK  statement and no ADD
  1114.  
  1115. statement referring to that same list, it is possible that
  1116.  
  1117. the list will become empty making it possible for the rule
  1118.  
  1119. with the NOT statement that previously  failed  to  become
  1120.  
  1121. true.   If it is determined that it is possible for a rule
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.                                                         18
  1135.  
  1136.  
  1137. to fire after the NOT test, that rule becomes  the  candi-
  1138.  
  1139. date rule and no further testing is done.
  1140.  
  1141.  
  1142.      The ADD test finds recursive rules that can not  fire
  1143.  
  1144. on the next pass.  Consider the case of a rule with no NOT
  1145.  
  1146. statements that recursively searches STM for a  situation.
  1147.  
  1148. If  this  rule fails, it will continue to fail until some-
  1149.  
  1150. thing is added to STM to  make  it  true.   If  all  rules
  1151.  
  1152. searched  STM  recursively  it  would be known when a rule
  1153.  
  1154. fires that of the rules that  precede  the  current  rule,
  1155.  
  1156. only those rules that search for something added to STM by
  1157.  
  1158. the current rule can possibly fire in the next pass.
  1159.  
  1160.  
  1161.      If the current rule adds an object  to  STM,  control
  1162.  
  1163. could  continue with the first rule that searches for that
  1164.  
  1165. object rather than the first rule  in  LTM.   If  no  rule
  1166.  
  1167. prior  to the current rule searches for those things added
  1168.  
  1169. to STM by the current rule or if  the  current  rule  adds
  1170.  
  1171. nothing  to  STM  then no prior rule can execute.  Control
  1172.  
  1173. could continue with the current rule rather  than  at  the
  1174.  
  1175. beginning of LTM.
  1176.  
  1177.  
  1178.      The MARK test applies to rules that perform a  linear
  1179.  
  1180. search  on STM.  The previous conclusion about items being
  1181.  
  1182. added to STM is still true; a rule that adds something  to
  1183.  
  1184. STM  can  cause a linear search rule to become true.  With
  1185.  
  1186. linear search it is also possible that a rule will  become
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.                                                         19
  1201.  
  1202.  
  1203. true  if  something is removed from STM.  If a linear rule
  1204.  
  1205. searches for several similar items which are  present  but
  1206.  
  1207. not  correctly  ordered  it  is  possible  for this linear
  1208.  
  1209. search to fail where a recursive  search  would  not  have
  1210.  
  1211. failed.  If there were excess items,  removing one or more
  1212.  
  1213. may cause a different linear assignment which could make a
  1214.  
  1215. linear rule true.
  1216.  
  1217.  
  1218.      The TRC optimizer selects a  continuation  point  for
  1219.  
  1220. each  rule  based on what the rule adds to or deletes from
  1221.  
  1222. STM rather than testing from the beginning  of  LTM  after
  1223.  
  1224. any  rule  fires. The continuation point is the first rule
  1225.  
  1226. that could fire based on the NOT and  ADD  tests  for  all
  1227.  
  1228. rules, and the MARK test for linear rules.  The TRC optim-
  1229.  
  1230. izer is somewhat naive in that  it  considers  only  items
  1231.  
  1232. added or deleted with the ADD and MARK statements.
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.                         CHAPTER  5
  1267.  
  1268.  
  1269.                      FURTHER RESEARCH
  1270.  
  1271.  
  1272.  
  1273.  
  1274.      A hierarchical arrangement  for  expert  systems  has
  1275.  
  1276. been  suggested[19].  The divide and conquer strategy is a
  1277.  
  1278. technique used by  experts  in  almost  every  field.   By
  1279.  
  1280. decomposing  a  set of rules into several subsets arranged
  1281.  
  1282. in a hierarchy, only the rules that apply to  the  current
  1283.  
  1284. part  of  the problem need to be considered.  Reducing the
  1285.  
  1286. number of rules that have to be tested at  any  one  point
  1287.  
  1288. will  generally reduce the average amount of time it takes
  1289.  
  1290. to select a rule.
  1291.  
  1292.  
  1293.      Since hand optimization in TRC  allows  an  arbitrary
  1294.  
  1295. control  structure to be imposed on the rule based system,
  1296.  
  1297. it is not impossible to build a hierarchical expert system
  1298.  
  1299. with  TRC.  However, it might not be convenient to build a
  1300.  
  1301. hierarchical system with the current TRC compiler.
  1302.  
  1303.  
  1304.      The input language to TRC  should  be  redesigned  to
  1305.  
  1306. include the convenient expression of hierarchical systems.
  1307.  
  1308. Many programming languages support  multiple  module  pro-
  1309.  
  1310. grams.   Each  module in a multiple module program usually
  1311.  
  1312. contains a group of related procedures.  It might be  rea-
  1313.  
  1314. sonable  to  place  each system of rules in a hierarchy of
  1315.  
  1316. rule based systems in a separate module.
  1317.  
  1318.  
  1319.                                                         20
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.                                                         21
  1330.  
  1331.  
  1332.      In languages that support multiple  module  programs,
  1333.  
  1334. some  means  of  binding the modules together is provided.
  1335.  
  1336. In the C language the '#include' facility  permits  common
  1337.  
  1338. definitions  to  be loaded by each module.  In Ada[20] the
  1339.  
  1340. package specification is used to make type,  variable  and
  1341.  
  1342. procedure  declarations  visible to other modules.  Either
  1343.  
  1344. of these facilities could serve as a model for designing a
  1345.  
  1346. hierarchical language.
  1347.  
  1348.  
  1349.      Experts are frequently  asked  to  explain  how  they
  1350.  
  1351. arrived  at  a  conclusion.  It is reasonable to expect an
  1352.  
  1353. expert program to do the same  thing.   TRC  provides  lip
  1354.  
  1355. service  to  this  requirement  of expert systems with the
  1356.  
  1357. TRACE facility.  The  ordered  list  of  rules  that  were
  1358.  
  1359. applied  can  explain how or why a given answer was found,
  1360.  
  1361. but inferring an explanation from a trace may not be  sim-
  1362.  
  1363. ple.   A  more convenient facility for generating explana-
  1364.  
  1365. tions should be designed.
  1366.  
  1367.  
  1368.      With the current TRC grammar it is possible to search
  1369.  
  1370. for  the  absence  of object/element combinations by using
  1371.  
  1372. two rules.  TRC should be extended to  include  a  way  to
  1373.  
  1374. specify  a search for the absence of object/element combi-
  1375.  
  1376. nations in a single rule.  This could be  accomplished  by
  1377.  
  1378. extending the NOT statement and will have an impact on the
  1379.  
  1380. optimizer and search code generation.
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.                                                         22
  1393.  
  1394.  
  1395.      Some expert systems allow  certainty  factors  to  be
  1396.  
  1397. associated  with rules.  A confidence factor is the proba-
  1398.  
  1399. bility that it is appropriate to  apply  this  rule  given
  1400.  
  1401. that  the  situation part is true.  Confidence factors can
  1402.  
  1403. also be used to suggest the probability  that  the  answer
  1404.  
  1405. generated  by  the expert system is correct.  A convenient
  1406.  
  1407. facility for representing  confidence  factors  should  be
  1408.  
  1409. included in TRC.
  1410.  
  1411.  
  1412.      TRC uses the trivial conflict resolution strategy  of
  1413.  
  1414. applying the first rule whose situation part is satisfied.
  1415.  
  1416. Alternate conflict resolution strategies  should  be  con-
  1417.  
  1418. sidered.   If confidence factors are implemented, one con-
  1419.  
  1420. flict resolution strategy may be to  test  all  rules,  if
  1421.  
  1422. more  than  one rule is satisfied then select one based on
  1423.  
  1424. confidence factors.
  1425.  
  1426.  
  1427.      The C language is not the only language that could be
  1428.  
  1429. generated  by  a  compiler  like  TRC.  In a separate pro-
  1430.  
  1431. ject[21] TRC was modified to generate  TURBO  PASCAL.   It
  1432.  
  1433. has  been  suggested[22]  that  TRC  could generate INGRES
  1434.  
  1435. code.  STM can be viewed as a database, the situation part
  1436.  
  1437. of a rule can be viewed as a database query and the action
  1438.  
  1439. part of a rule can be viewed as  a  database  transaction.
  1440.  
  1441. For  problems  that  deal with a large amount of data, the
  1442.  
  1443. file handling capabilities of a DBMS could be put to  good
  1444.  
  1445. use.  Relational calculus is a powerful tool for searching
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.                                                         23
  1459.  
  1460.  
  1461. a data base that could be put to good use  on  some  prob-
  1462.  
  1463. lems.
  1464.  
  1465.  
  1466.      The current optimizer is very weak.   By  looking  at
  1467.  
  1468. the  elements  that are being searched for in STM in addi-
  1469.  
  1470. tion to the objects, additional implicit knowledge of  the
  1471.  
  1472. state  of  STM is gained.  It may be possible to skip over
  1473.  
  1474. some rules based on this knowledge, thus  reducing  search
  1475.  
  1476. time.   Consider this sketch where object A has an integer
  1477.  
  1478. element B:
  1479.  
  1480.      R1:     (A.B == 7)
  1481.              =>
  1482.              MARK A
  1483.              ;
  1484.      R2:     A
  1485.              =>
  1486.              MARK A
  1487.              ;
  1488.      R3:     =>
  1489.              ADD A(B => 6)
  1490.              ;
  1491.  
  1492.  
  1493.      When rule R3 is optimized by the  current  optimizer,
  1494.  
  1495. it will decide that it is possible for R1 to fire after R3
  1496.  
  1497. has fired because R3 adds an  object  of  type  A  and  R3
  1498.  
  1499. searches for an object of type A.  Clearly R1 can not fire
  1500.  
  1501. after R3 fires because the object of type A  added  by  R3
  1502.  
  1503. has  element  B equal to 6 while R1 searches for element B
  1504.  
  1505. equal to 7.  The current optimizer finds  the  first  rule
  1506.  
  1507. that  can possibly fire.  This does not mean the rule will
  1508.  
  1509. fire.  There can be any number of rules  between  the  the
  1510.  
  1511. last  rule  that fired and the first one that can possibly
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.                                                         24
  1525.  
  1526.  
  1527. fire next.  Preconditions could be placed on  these  rules
  1528.  
  1529. to  eliminate  testing  intermediate  rules  where  possi-
  1530.  
  1531. ble[23].  Consider this example:
  1532.  
  1533.      R1:     B C
  1534.              =>
  1535.              MARK B
  1536.              ;
  1537.      R2:     A B
  1538.              =>
  1539.              MARK A
  1540.              ;
  1541.      R3:     A C
  1542.              =>
  1543.              MARK A
  1544.              ;
  1545.      R4:     A
  1546.              =>
  1547.              MARK A
  1548.              ;
  1549.      R5:     =>
  1550.              ADD C
  1551.              ;
  1552.  
  1553.  
  1554.      The optimizer will correctly deduce that it is possi-
  1555.  
  1556. ble  for  R1  to fire after R5 fires.  It is also possible
  1557.  
  1558. that R1 will not fire.  If R5 fires and R1 does not  fire,
  1559.  
  1560. it is not possible for R2, R3 or R4 to fire either.  Since
  1561.  
  1562. R5 fired it is known that no  previous  rule  could  fire.
  1563.  
  1564. Since  R4  could not fire, it is not possible for R2 or R3
  1565.  
  1566. to fire.  When R5 fires, preconditions could be placed  on
  1567.  
  1568. R2,  R3 and R4 that would prevent even testing those rules
  1569.  
  1570. since it is known that they cannot fire.
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.                         CHAPTER  6
  1591.  
  1592.  
  1593.                        CONCLUSIONS
  1594.  
  1595.  
  1596.  
  1597.  
  1598.      A compiler has been described and built.   This  com-
  1599.  
  1600. piler  translates  a  rule  based language to a procedural
  1601.  
  1602. language and is a useful tool for building expert systems.
  1603.  
  1604. The  translation  to a procedural language may be advanta-
  1605.  
  1606. geous for reasons of speed,  portability  or  convenience.
  1607.  
  1608. Translation  to a procedural language is particularly con-
  1609.  
  1610. venient when integration of procedural code and an  expert
  1611.  
  1612. system is desirable.
  1613.  
  1614.  
  1615.      Some observations about building expert systems  have
  1616.  
  1617. been  made.  These observations are not necessarily unique
  1618.  
  1619. to the compiler  that  is  described,  i.e.  they  may  be
  1620.  
  1621. applied to other expert system tools.
  1622.  
  1623.  
  1624.      If the data objects that the rules will refer to  are
  1625.  
  1626. defined, it is possible to represent STM as a set of lists
  1627.  
  1628. rather than as a single list.  For many search  algorithms
  1629.  
  1630. reducing  the  size of the list to be searched will reduce
  1631.  
  1632. search time.  Defining data objects also  makes  automatic
  1633.  
  1634. generation  of  preconditions  that can eliminate the need
  1635.  
  1636. for searching a possibility.
  1637.  
  1638.  
  1639.  
  1640.  
  1641.                                                         25
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.                                                         26
  1652.  
  1653.  
  1654.      Many expert system tools are  conceptually  interpre-
  1655.  
  1656. tive.   A  single general purpose inference engine is used
  1657.  
  1658. for whatever problem is being addressed.   The  notion  of
  1659.  
  1660. generating a custom inference engine for each set of input
  1661.  
  1662. rules is novel.
  1663.  
  1664.  
  1665.      The optimizer is probably the most  significant  out-
  1666.  
  1667. come,  and it too is made possible by defining the objects
  1668.  
  1669. to be manipulated.  Optimization  of  interpretive  expert
  1670.  
  1671. system  tools has centered on developing efficient search-
  1672.  
  1673. ing and matching strategies.  The  notion  of  a  separate
  1674.  
  1675. optimizer  that  changes  the  operation  of the inference
  1676.  
  1677. engine without affecting the  order  in  which  rules  are
  1678.  
  1679. fired  is  novel and can be applied to other expert system
  1680.  
  1681. building tools.
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.                        BIBLIOGRAPHY
  1719.  
  1720.  
  1721.  
  1722.  
  1723. 1.  Aho  and  Ullman,  _P_r_i_n_c_i_p_l_e_s  _o_f   _C_o_m_p_i_l_e_r   _D_e_s_i_g_n.
  1724.  
  1725. Addison-Wesley, 1977.
  1726.  
  1727.  
  1728. 2. Pyster,  _C_o_m_p_i_l_e_r  _D_e_s_i_g_n  _a_n_d  _C_o_n_s_t_r_u_c_t_i_o_n,  Prindle,
  1729.  
  1730. Weber and Schmidt, 1980.
  1731.  
  1732.  
  1733. 3. Johnson, _Y_a_c_c: _Y_e_t _A_n_o_t_h_e_r _C_o_m_p_i_l_e_r _C_o_m_p_i_l_e_r.  Computer
  1734.  
  1735. Science Technical Report No. 32, Bell Laboratories, Murray
  1736.  
  1737. Hill, NJ   1975.
  1738.  
  1739.  
  1740. 4. Juell, _A_n _I_n_t_r_o_d_u_c_t_i_o_n _t_o _t_h_e _P_R_O_S  _P_r_o_d_u_c_t_i_o_n  _S_y_s_t_e_m.
  1741.  
  1742. Computer  Science  Department,  North Dakota State Univer-
  1743.  
  1744. sity, 1983.
  1745.  
  1746.  
  1747. 5. Mittal, _P_A_S-_I_I _U_s_e_r _M_a_n_u_a_l.  Department of Computer and
  1748.  
  1749. Information Science, Ohio State University, 1977.
  1750.  
  1751.  
  1752. 6. Forgy, _O_P_S_5 _U_s_e_r'_s _M_a_n_u_a_l.   Technical  Report  CMU-CS-
  1753.  
  1754. 81-135, Carnegie-Mellon University, Pittsburgh, 1981.
  1755.  
  1756.  
  1757. 7. Kernighan and  Ritchie,  _T_h_e  _C  _P_r_o_g_r_a_m_m_i_n_g  _L_a_n_g_u_a_g_e.
  1758.  
  1759. Prentice-Hall, NJ, 1978.
  1760.  
  1761.  
  1762. 8. Hayes-Roth, Waterman and Lenat,  _B_u_i_l_d_i_n_g  _E_x_p_e_r_t  _S_y_s_-
  1763.  
  1764. _t_e_m_s.  Addison-Wesley, 1983.
  1765.  
  1766.  
  1767. 9.  Winston,  _A_r_t_i_f_i_c_i_a_l  _I_n_t_e_l_l_i_g_e_n_c_e.    Addison-Wesley,
  1768.  
  1769.  
  1770.                                                         27
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.                                                         28
  1781.  
  1782.  
  1783. 1984.
  1784.  
  1785.  
  1786. 10. Ritchie and Thompson, _T_h_e  _U_N_I_X  _T_i_m_e-_S_h_a_r_i_n_g  _S_y_s_t_e_m.
  1787.  
  1788. The Bell System Technical Journal, Vol. 57, No. 6, Part 2,
  1789.  
  1790. 1978.
  1791.  
  1792.  
  1793. 11. Winston and Horn, _L_i_s_p.  Addison-Wesley, 1984.
  1794.  
  1795.  
  1796. 12. Gupta, _P_a_r_a_l_l_e_l_i_s_m _i_n _P_r_o_d_u_c_t_i_o_n _S_y_s_t_e_m_s: _T_h_e  _S_o_u_r_c_e_s
  1797.  
  1798. _a_n_d  _t_h_e  _E_x_p_e_c_t_e_d  _S_p_e_e_d-_u_p.  Department of Computer Sci-
  1799.  
  1800. ence, Carnegie-Mellon University, 1984.
  1801.  
  1802.  
  1803. 13. Lindsay, Buchanan, Feigenbaum and Lederberg,  _A_p_p_l_i_c_a_-
  1804.  
  1805. _t_i_o_n_s  _o_f  _A_I  _f_o_r _O_r_g_a_n_i_c _C_h_e_m_i_s_t_r_y: _T_h_e _D_E_N_D_R_A_L _P_r_o_j_e_c_t.
  1806.  
  1807. McGraw-Hill, 1981.
  1808.  
  1809.  
  1810. 14.  Shortliffe,  _C_o_m_p_u_t_e_r-_B_a_s_e_d  _M_e_d_i_c_a_l   _C_o_n_s_u_l_t_a_t_i_o_n_s:
  1811.  
  1812. _M_Y_C_I_N.  American Elsevier, New York, 1976.
  1813.  
  1814.  
  1815. 15. Davis, Buchanan and Shortliffe, _P_r_o_d_u_c_t_i_o_n _R_u_l_e_s _a_s  _a
  1816.  
  1817. _R_e_p_r_e_s_e_n_t_a_t_i_o_n _f_o_r _a _K_n_o_w_l_e_d_g_e-_B_a_s_e_d _C_o_n_s_u_l_t_a_t_i_o_n _P_r_o_g_r_a_m.
  1818.  
  1819. Artificial Intelligence, Vol. 8, No. 1, 1977.
  1820.  
  1821.  
  1822. 16. Erman, et. al,  _T_h_e  _H_e_a_r_s_a_y-_I_I  _S_p_e_e_c_h  _U_n_d_e_r_s_t_a_n_d_i_n_g
  1823.  
  1824. _S_y_s_t_e_m:  _I_n_t_e_g_r_a_t_i_n_g  _K_n_o_w_l_e_d_g_e  _t_o  _R_e_s_o_l_v_e  _U_n_c_e_r_t_a_i_n_t_y.
  1825.  
  1826. Computing Surveys, June 1980.
  1827.  
  1828.  
  1829. 17. Davis, _E_x_p_e_r_t _S_y_s_t_e_m_s: _W_h_e_r_e _A_r_e _W_e? _A_n_d _W_h_e_r_e  _D_o  _W_e
  1830.  
  1831. _G_o  _F_r_o_m  _H_e_r_e?.   Massachusetts  Institute of Technology,
  1832.  
  1833. A.I. Memo 665, 1982.
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.                                                         29
  1847.  
  1848.  
  1849. 18. Joy, et. al, _B_e_r_k_e_l_e_y _P_a_s_c_a_l _U_s_e_r'_s _M_a_n_u_a_l.   Computer
  1850.  
  1851. Science  Division,  University  of  California,  Berkeley,
  1852.  
  1853. 1983.
  1854.  
  1855.  
  1856. 19. Mizoguchi and Kakusho, _H_i_e_r_a_r_c_h_i_c_a_l _P_r_o_d_u_c_t_i_o_n _S_y_s_t_e_m,
  1857.  
  1858. IJCAI-79, p586, 1979.
  1859.  
  1860.  
  1861. 20. _A_m_e_r_i_c_a_n _N_a_t_i_o_n_a_l _S_t_a_n_d_a_r_d _R_e_f_e_r_e_n_c_e  _M_a_n_u_a_l  _f_o_r  _t_h_e
  1862.  
  1863. _A_d_a  _P_r_o_g_r_a_m_m_i_n_g  _L_a_n_g_u_a_g_e.   American  National Standards
  1864.  
  1865. Institute, Inc., 1983.
  1866.  
  1867.  
  1868. 21. Nygard, personal communication, 1985.
  1869.  
  1870.  
  1871. 22. Shapiro, personal communication, 1985.
  1872.  
  1873.  
  1874. 23. Rebel, personal communication, 1985.
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.