home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l210 / 1.ddi / PIE.ARC / PIE.HLP < prev    next >
Encoding:
Text File  |  1988-06-21  |  3.5 KB  |  95 lines

  1.  
  2.         Prolog Inference Engine / Help Information
  3.         ==========================================
  4.  
  5. This program illustrates how to handle Prolog-like rules in
  6. Turbo Prolog. How to parse and assert them, and how to build the
  7. inference engine.
  8.  
  9. We have included in it most of the popular interpreted predicates.
  10. However, there are a few things that were implemented in a way
  11. different from most interpreters. 
  12.  
  13.   - Strings are not lists of integers but a separate type instead.
  14.  
  15.   - Characters have their own type
  16.  
  17.   - The term reader reads only to an end-of-line.
  18.  
  19.   - Spypoints are not implemented, (trace are).
  20.  
  21.   - get, get0, tab etc are not implemented, (read, readln, readchar are)
  22.  
  23.   - we do not support 1.2.3.[] notation for lists neither are list's
  24.     allowed as arguments to functor and univ
  25.  
  26. A list of the implemented standardpredicates are:
  27.  
  28. true                - succes
  29. fail                - fail
  30. repeat                - succeeds forever
  31. write(TERM*)            - writes out a list of arguments
  32. nl                - outputs a newline
  33. display(TERM*)            - outputs functors in prefix notation
  34. read(TERM)            - read a term
  35. readln(LINE)            - read a line into a string
  36. readchar(CHAR)            - read a character
  37. help                - help information
  38. retract(TERM)            - retract a term
  39. tell(FILENAME)            - redirect output to this file
  40. telling(FILENAME)        - return the current output file
  41. told                - close the current output file
  42. see(FILENAME)            - redirect input to this file
  43. seeing(FILENAME)        - return the current input file
  44. seen                - close  the current input file
  45. TERM =.. LIST            - univ; conversion between term and list
  46. arg(N,TERM,ARGn)        - unify ARGn with n'th argument of TERM
  47. functor(TERM,FUNCTOR,ARITY)    - return functor and arity of term or build new
  48. clause(HEAD,BODY)        - return clauses from the database
  49. concat(STRING,STRING,STRING)    - concatenation of strings
  50. str_int(STRING,INT)        - conversion between a string and an integer
  51. str_atom(STRING,ATOM)        - conversion between a string and an atom
  52. INTEGER is EXPRESSION        - evaluation of expressions
  53. TERM == TERM            - testing for true equality
  54. TERM \== TERM            - not true equality
  55. TERM = TERM            - unify two terms
  56. TERM \= TERM            - test whether unify
  57. TERM < TERM            - integer less than
  58. TERM > TERM            - integer greater than
  59. TERM =< TERM            - less than or equal
  60. TERM >= TERM            - greater than or equal
  61. TERM >< TERM            - different evaluated values
  62. integer(TERM)            - is the term an integer
  63. var(TERM)            - is the term a free variable
  64. nonvar(TERM)            - is the term bound
  65. list                - list all clauses
  66. list(pred)            - list all clauses for pred
  67. list(pred/arity)        - list selected arity
  68. edit                - save all clauses, edit, reconsult
  69. edit(file)            - edit file, reconsult file
  70. edit(pred/arity)        - edit selected predicate
  71. trace                - turn on tracing
  72. notrace                - turn off tracing
  73. time(HOUR,MIN,SEC,HUNDERDS)    - return the system time
  74. scr_char(ROW,COL,CHAR)        - print a character at a selected position
  75. char_int(CHAR,INT)        - conversion between characters and integers
  76. consult(FILENAME)        - consult a file
  77. reconsult(FILENAME)        - reconsult a file
  78. save(FILENAME)            - save a file
  79. op(PRIORITY,ASSOC,OP)        - returns operators, or change operator
  80.  
  81. GOAL , GOAL            - and
  82. GOAL ; GOAL            - or
  83. not(GOAL)            - negation
  84. !                - cut
  85. call(GOAL)            - call
  86. assert(RULE)            - assert
  87. asserta(RULE)            - asserta
  88. assertz(RULE)            - assertz
  89. VAR                - call pred which VAR is bound to
  90.  
  91. If you don't like our interpreter you are free to modify it and add new
  92. standard predicates and features (In fact, Appendix K provides
  93. an explanation of how the interpreter is implemented and how it may be
  94. extended.).
  95.