home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / prog2 / vtprolog.lzh / VTPROLOG.DOC next >
Encoding:
Text File  |  1986-09-20  |  2.9 KB  |  74 lines

  1.  
  2.  
  3. Directions to Using VT-PROLOG - Very Tiny Prolog
  4.  
  5.  
  6. VT-PROLOG  is a simple prolog interpreter provided with full source  code 
  7. to encourage experimentation with PROLOG.
  8.  
  9. Startup
  10. 1. Boot the system.
  11. 2. Insert the disk containing VTPROLOG.COM in Drive A:
  12. 3. If the DOS prompt is not A>, type A: and press the ENTER key to switch 
  13.    to drive A:.
  14. 4. Type VTPROLOG and press RETURN. VTPROLOGshould respond withits heading 
  15.    and a '-> ' prompt.
  16.  
  17. Loading a data base
  18. 1. You may enter rules and queries directlty from the keyboard. The        
  19.    syntax of both queries and rules is described below. Be sure to 
  20.    terminate all queries, rules and commands with a period.
  21. 2. Data bases may be stored as ASCII text files. To read a text file type 
  22.    the command:
  23.          @ filename .
  24.    where filename is a legitimate DOS filename, the default extension is 
  25.    'PRO'. If the filename contains a ':', '.' or a '\' then it must be 
  26.    enclosed in single quotes. For example, the following are legitmate 
  27.    file commands:
  28.          @ wine .
  29.          @ 'b:wine.pro' .
  30.          @ 'c:\prolog\test\wine' .
  31. 3. VTPROLOG will read and compile the text file. Any queries included in 
  32.    the file will be executed just as if they had been typed from the 
  33.    keyboard.
  34. 4. Data base files may contain commands to read to other data base files.
  35.  
  36. Terminating VTPROLOG
  37. 1. To exit VTPROLOG, type :
  38.           exit .
  39.    at the '-> ' prompt. Don't forget the period.
  40.  
  41. VTPROLOG Grammar
  42.    The following BNF describes the syntax of VTPROLOG rules and queries:
  43.  
  44.      sentence ::- rule | query | command
  45.      rule ::- head '.' | head ':-' tail '.'
  46.      query ::- '?-' tail '.'
  47.      command ::- '@' file_name '.'
  48.      head ::- goal
  49.      tail ::- goal | goal ',' tail
  50.      goal ::- constant | variable | structure
  51.      constant ::- {quoted string} | {token beginning with 'a' .. 'z'}
  52.      variable ::- {identifier beginning with 'A' .. 'Z' or '_' }
  53.      structure ::- functor '(' component_list ')'
  54.      functor ::- {token beginning with 'a' .. 'z'}
  55.      component_list ::- goal | goal ',' components_listè     file_name ::- {legitimate DOS file name, must be surrounded with
  56.                     single quotes if it contains a '.',':' or '\'}
  57.  
  58.    Constant,  variable  or  functor names may be up to 80  characters  in 
  59.    length.   Constants  beginning  with  capital  letters  or  containing 
  60.    imbedded blanks, commas, paraenthesis or periods must be surrounded by 
  61.    single quote marks.
  62.  
  63.    Good  luck  with VTPROLOG.  We would be very interested in hearing  of 
  64.    your experiments,  enhancements or even (gasp) bugs that you may find. 
  65.    Please write to us with your comments or questions.
  66.  
  67.           Bill and Bev Thompson
  68.           C/O AI Expert Magazine
  69.           650 5th St.
  70.           Suite 311
  71.           San Francisco, CA 94107
  72.  
  73.  
  74.