home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / ada / 2581 < prev    next >
Encoding:
Text File  |  1992-09-10  |  6.1 KB  |  102 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!jldh
  3. From: jldh@sei.cmu.edu (Jorge Luis Diaz-Herrera)
  4. Subject: Re: AI and Ada (Was: Multiple Inheritance -- the last post?)
  5. Message-ID: <1992Sep10.161051.23671@sei.cmu.edu>
  6. Sender: netnews@sei.cmu.edu (Netnews)
  7. Organization: The Software Engineering Institute
  8. References: <1992Aug22.221840.2982@seas.gwu.edu> <59831@mimsy.umd.edu> <1992Sep8.195650.5728@sei.cmu.edu> <14425@goanna.cs.rmit.oz.au>
  9. Date: Thu, 10 Sep 1992 16:10:51 GMT
  10. Lines: 90
  11.  
  12.  
  13. In article <14425@goanna.cs.rmit.oz.au>, ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
  14. |> ..., so I missed the bit where they were going to add support
  15. |> for logic programming.  It really does come as a surprise that Ada9X will
  16. |> "STRONGLY SUPPORT" logic programming.  I would definitely like to hear more
  17. |> about this, and I'm sure many other comp.lang.ada readers would too.
  18. |> ...
  19.  
  20. Probably one of the most widely used AI techniques are "production systems". 
  21. A production system consists of a collection of condition-action pairs called
  22. production rules stored in a rule-base, together with a database of known
  23. facts of the problem domain, state information of the current solution, and a
  24. procedure for "firing" the production rules called the inference mechanism.
  25. In this framework, a program is not a procedural sequence of instructions, but
  26. a set of declarative (i.e., non-procedural) statements providing information
  27. about the problem. (To some, these are not considered programs, but data!).
  28.  
  29. These tools are based on the idea of "programming in logic".  Logic or
  30. Predicate Programming is based on primitives for defining facts and rules
  31. (declarative programs, similar to pattern-matching computing).  This form of 
  32. logic programming is commonly done by using predicate calculus expressions
  33. called "Horn Clauses" in which at most one the literals of the expressions is
  34. unnegated.  Basically, a production rule consists of an IF part (or left-hand
  35. side, antecedent, or conditional part) that when evaluated to TRUE produces
  36. the THEN part (or right-hand side, consequent, or action).  Algorithms are not
  37. completely under the control of the programmer, but of the underlying control
  38. mechanism (or inference engine).  Programmers must master this underlying
  39. process in order to specify a correct set of assertions (facts and goals to
  40. prove).         
  41.  
  42. Although rules are representable using a frame structure (quite nicely
  43. implemented in Ada), special languages and environments have been developed,
  44. notably PROLOG.  Interpreters for these languages are purely procedural
  45. programs and thus better written entirely in modern software engineering
  46. languages like Ada.  Several Ada implementations of PROLOG (inference engines)
  47. have been developed.  Two approaches have been observed as follows:
  48. INTERNAL APPROACH: create Ada packages implementing inference systems.
  49.     Sequential as well as concurrent implementations have been done. E.g.,
  50.     each rule in this inference engine is implemented as a separate task,
  51.     which serves to demonstrate parallelism at the rule level.  
  52.  
  53. EXTERNAL APPROACH: provide an interface between Ada and inference-oriented
  54.     language or system. 
  55.  
  56. "Languages" and systems supporting logic programming have been designed based
  57. on Ada.  Notably ALLAN and PROVER.  ALLAN is a language that, although based
  58. on PROLOG, uses an Ada-like syntax, adding explanation capabilities and
  59. confidence factors typically found in expert systems shells. In PROVER, users
  60. supply facts and rules to prove a goal or possibly multiple goals; the system
  61. uses a generalized first-order logic resolution algorithm to repeatedly deduce
  62. new facts or to generate new subgoals until all alternatives are exhausted or
  63. a special valid state has been reached.  PROVER takes advantage of Ada strong
  64. typing and represents all assertions (well-formed formulas) as an abstract
  65. tree whose leaves are linked lists.
  66.  
  67. There have been several Ada-based expert systems tools implemented some of
  68. which are commercially available such as ART-Ada, CHRONOS, and CLIPS/Ada. The
  69. RTEX system is an industry oriented system for developing embedded 
  70. real-time expert systems.  The system integrates advance software engineering
  71. and real-time concepts through the use of Ada, with (concurrent)
  72. object-oriented programming, real-time inferencing, symbolic matching and
  73. signal understanding.  Data in RTEX is kept in messages, initialized by a
  74. burst of messages and which can come from external sources.  RTEX provides a
  75. concurrent object-oriented language in which objects do not react on every
  76. incoming message, but they know how to react on specific combinations of
  77. messages. Message protocol corresponds to the left-hand side of the production
  78. rules, whose associated "action parts" of the production rule correspond to
  79. the methods.  In this sense, RTEX is also a data driven language in which 
  80. execution control is triggered by the arrival of input data.  This accounts
  81. for the high degree of parallelism in the system. 
  82.  
  83. The Helsinki Prolog System-HPS provides advanced programming tools integrated
  84. into a programming environment to support modular Prolog systems development.
  85. HPS was totally implemented in Ada, with some parts using Prolog primitives
  86. (the system implements a superset of the Edinburgh Prolog Language).  The user
  87. interface is provided out of a library of routines by using Ada PRAGMAs at the
  88. implementation environment.  HPS consists of several integrated components,
  89. including an interpreter-virtual machine to execute Prolog programs, a
  90. compiler to produce a more efficient execution of predicates by the virtual
  91. machine, an editor which ties together a syntax checker, a translator, and a
  92. library manager in order to allow the incremental execution of intermediate
  93. programs during the editing of source code.  HSP's shell uses tasks to allow
  94. for concurrent queries to be handled graciously by the Ada run-time kernel.
  95. It also permits the association of timing constraints, and thus to control the
  96. use of resources spent in solving the queries in Prolog.
  97.  
  98. ------..-----
  99. If need further information, please do not hesitate to contact us.
  100.  
  101. J.L. Diaz-Herrera, chair AIWG, SIGada.
  102.