home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / language / prolog68 / init.wam < prev    next >
Encoding:
Text File  |  1993-10-23  |  6.5 KB  |  324 lines

  1. %     INIT.WAM                Initialization file for WAM emulator
  2. %
  3. %     This file is part of Prolog-68.
  4. %
  5. %     Copyright © 1990,1991  Jens Kilian
  6. %
  7. %     This program is free software; you can redistribute it and/or modify
  8. %     it under the terms of the GNU General Public License as published by
  9. %     the Free Software Foundation; either version 1, or (at your option)
  10. %     any later version.
  11. %
  12. %     This program is distributed in the hope that it will be useful,
  13. %     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. %     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. %     GNU General Public License for more details.
  16. %
  17. %     You should have received a copy of the GNU General Public License
  18. %     along with this program; if not, write to the Free Software
  19. %     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. %
  21. %------------------------------------------------------------------------------
  22. %     This file serves as a script to set up the data structures of the
  23. %     WAM emulator. It is divided into several parts. An empty line
  24. %     terminates each part.
  25. %     Lines beginning with '%' contain comments and are ignored. All
  26. %     other lines must be given in the correct format to be recognized.
  27. %
  28. %---- Part I : names of atoms known to the emulator ---------------------------
  29. %
  30. %     Each line contains the name of an atom, enclosed in apostrophes.
  31. %     A line corresponds to an entry in the STD...[] array.
  32. %
  33. %---- basic atoms
  34. '[]'
  35. '{}'
  36. ','
  37. ';'
  38. '-'
  39. 'end_of_file'
  40. %---- entry points
  41. 'shell'
  42. 'failure_error_handler'
  43. %---- comparison codes
  44. '<'
  45. '='
  46. '>'
  47. %---- keywords for statistics/2
  48. 'runtime'
  49. 'memory'
  50. 'core'
  51. 'program'
  52. 'heap'
  53. 'global_stack'
  54. 'local_stack'
  55. 'trail'
  56. 'garbage_collection'
  57. %---- atoms for the decompiler
  58. 'true'
  59. 'fail'
  60. '!'
  61. %---- names of predefined I/O streams
  62. 'user'
  63. 'user_input'
  64. 'user_output'
  65. 'user_error'
  66. 'printer_output'
  67. 'modem_input'
  68. 'modem_output'
  69. 'midi_input'
  70. 'midi_output'
  71. 'ikbd_output'
  72. ''
  73. %---- stream opening modes
  74. 'read'
  75. 'write'
  76. 'append'
  77. 'read_binary'
  78. 'write_binary'
  79. 'append_binary'
  80. %---- error ID codes
  81. 'generic_error'
  82. 'type_error'
  83. 'instantiation_error'
  84. 'range_error'
  85. 'existence_error'
  86. 'expression_error'
  87. 'zero_division_error'
  88. 'input_output_error'
  89. 'memory_error'
  90. 'system_error'
  91. %---- names of global flags
  92. 'character_escapes'
  93. 'fileerrors'
  94. 'gc_trace'
  95. 'unknown'
  96. 'error_handling'
  97. '$debugger_mode'
  98. '$debugger_counter'
  99. '$debugger_skip_id'
  100.  
  101. %---- Part II : names and arities of functors known to the emulator -----------
  102. %
  103. %     Each line contains the name of an atom (see above) and a decimal
  104. %     number, separated by '/'.
  105. %     A line corresponds to an entry in the STD...[] array.
  106. %
  107. %---- basic functors
  108. '.'/2
  109. '{}'/1
  110. ':-'/2
  111. ','/2
  112. ';'/2
  113. 'call'/1
  114. %---- decompiler data : arithmetic predicates, relations, operations etc.
  115. 'is'/2
  116. '=:='/2
  117. '=\\='/2
  118. '<'/2
  119. '=<'/2
  120. '>'/2
  121. '>='/2
  122. '-'/1
  123. '\\'/1
  124. 'abs'/1
  125. '+'/2
  126. '-'/2
  127. '*'/2
  128. '/'/2
  129. 'mod'/2
  130. '/\\'/2
  131. '\\/'/2
  132. 'xor'/2
  133. '<<'/2
  134. '>>'/2
  135. '->'/2
  136. %---- functor used to mark variables for write/[1,2] and writeq/[1,2]
  137. '$VAR'/1
  138. %---- functors used to construct database references, streams etc.
  139. '$ref'/2
  140. '$stream'/2
  141.  
  142. %---- Part III : names and arities of built-in predicates ---------------------
  143. %
  144. %     Each line corresponds to an entry in the emulator's dispatching table
  145. %     for built-ins. The table index is given before the name of the builtin.
  146. %
  147. %---- system predicates
  148. 0   'halt'/1
  149. 1   'true'
  150. 2   '$CALL'/1
  151. 3   '$CREATE_BLOCK'/2
  152. 4   '$DELETE_BLOCK'
  153. 5   '$LOCK_BLOCK'
  154. 6   '$UNLOCK_BLOCK'
  155. 7   'signal_exception'/1
  156. 8   '$MARK'/1
  157. 9   '$CUT'/1
  158. 10  '$GC'
  159. 11  '$UNKNOWN'
  160. 12  'statistics'
  161. 13  '$STATISTICS'/2
  162. 14  'abort'/0
  163. 16  'system'/1
  164. 20  'signal_error'/3
  165. 21  'propagate_error'/4
  166. 22  '$LOCAL_HANDLERS'/2
  167. 23  'set_error_handler'/3
  168. %---- term comparison
  169. 32  '='/2
  170. 33  'compare'/3
  171. 34  '=='/2
  172. 35  '\\=='/2
  173. 36  '@<'/2
  174. 37  '@=<'/2
  175. 38  '@>'/2
  176. 39  '@>='/2
  177. 40  'sort'/2
  178. 41  'keysort'/2
  179. 42  'msort'/2
  180. %---- input & output of terms
  181. 48  'read'/1
  182. 49  'read'/2
  183. 50  'sread'/2
  184. 51  'sread'/3
  185. 52  'write'/1
  186. 53  'write'/2
  187. 54  'writeq'/1
  188. 55  'writeq'/2
  189. 56  'display'/1
  190. 57  'display'/2
  191. 58  'displayq'/1
  192. 59  'displayq'/2
  193. %---- input & output of characters
  194. 60  'get0'/1
  195. 61  'get0'/2
  196. 62  'get'/1
  197. 63  'get'/2
  198. 64  'skip'/1
  199. 65  'skip'/2
  200. 66  'put'/1
  201. 67  'put'/2
  202. 68  'tab'/1
  203. 69  'tab'/2
  204. %---- I/O support
  205. 72  'op'/3
  206. 73  'prompt'/2
  207. 74  'prolog_flag'/3
  208. %---- BIOS access (for demos only)
  209. 75  'biosstat'
  210. 76  'biosget0'/1
  211. 77  'biosput'/1
  212. %---- stream operations
  213. 80  'open'/3
  214. 81  'open_null_stream'/1
  215. 82  '$CLOSE'/1
  216. 83  'flush_output'/1
  217. 84  '$STREAM'/3
  218. 85  '$NEXT_STREAM'/2
  219. 86  'set_input'/1
  220. 87  'set_output'/1
  221. 88  'current_input'/1
  222. 89  'current_output'/1
  223. 90  'character_count'/2
  224. 91  'line_count'/2
  225. 92  'line_position'/2
  226. 93  '$SET_STREAM_POS'/4
  227. 94  '$ABS_FILE_NAME'/3
  228. %---- structure access
  229. 96  '=..'/2
  230. 97  'functor'/3
  231. 98  'arg'/3
  232. 99  'atom_chars'/2
  233. 100 'number_chars'/2
  234. 101 'name'/2
  235. 102 'copy_term'/2
  236. %---- database access
  237. 130 '$FUNCTOR'/3
  238. 131 '$PROCEDURE'/3
  239. 133 '$LOAD_CODE'/4
  240. 134 '$DECOMPILE'/2
  241. 136 '$NEXT_ATOM'/2
  242. 137 '$CURR_PROC'/1
  243. 138 '$NEXT_PROC'/2
  244. 139 '$NEXT_OP'/5
  245. 140 '$INSTALL_CODE'/2
  246. 141 '$ABOLISH'/2
  247. 152 'recorda'/3
  248. 153 'recordz'/3
  249. 154 '$RECORDED'/3
  250. 155 '$NEXT_RECORDED'
  251. 156 '$CURR_KEY'/1
  252. 157 '$NEXT_KEY'
  253. 159 'erase'/1
  254. %---- term classification
  255. 160 'var'/1
  256. 161 'nonvar'/1
  257. 162 'constant'/1
  258. 163 'nonconstant'/1
  259. 164 'composite'/1
  260. 165 'simple'/1
  261. 166 'integer'/1
  262. 167 'atom'/1
  263. 168 'atomic'/1
  264. 169 'nonatomic'/1
  265.  
  266. %---- Part IV : names, types and priorities of standard operators -------------
  267. %
  268. %     Each line contains the name of an atom, a (decimal) priority
  269. %     and an operator type, separated by single spaces.
  270. %
  271. ':-' 1200 xfx
  272. '-->' 1200 xfx
  273. '?-' 1200 fx
  274. ':-' 1200 fx
  275. 'meta_predicate' 1150 fx
  276. 'multifile' 1150 fx
  277. 'mode' 1150 fx
  278. 'public' 1150 fx
  279. 'dynamic' 1150 fx
  280. ';' 1100 xfy
  281. '->' 1050 xfy
  282. ',' 1000 xfy
  283. '\\+' 900 fy
  284. 'spy' 900 fy
  285. 'not' 900 fy
  286. 'nospy' 900 fy
  287. '=' 700 xfx
  288. 'is' 700 xfx
  289. '=..' 700 xfx
  290. '==' 700 xfx
  291. '\\==' 700 xfx
  292. '@<' 700 xfx
  293. '@>' 700 xfx
  294. '@=<' 700 xfx
  295. '@>=' 700 xfx
  296. '=:=' 700 xfx
  297. '=\\=' 700 xfx
  298. '<' 700 xfx
  299. '>' 700 xfx
  300. '=<' 700 xfx
  301. '>=' 700 xfx
  302. '\\' 700 xfy
  303. ':' 600 xfy
  304. '+' 500 yfx
  305. '-' 500 yfx
  306. '\\/' 500 yfx
  307. '/\\' 500 yfx
  308. 'and' 500 yfx
  309. 'or' 500 yfx
  310. 'xor' 500 yfx
  311. '+' 500 fx
  312. '-' 500 fx
  313. '*' 400 yfx
  314. '/' 400 yfx
  315. '//' 400 yfx
  316. '>>' 400 yfx
  317. '<<' 400 yfx
  318. 'mod' 300 xfx
  319. '^' 200 xfy
  320. % '+' 100 fx
  321. % '-' 100 fx
  322.  
  323. %---- END OF FILE -------------------------------------------------------------
  324.