home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / LF / SETUP < prev    next >
Text File  |  1996-06-18  |  6KB  |  254 lines

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %
  3. % Copyright 1991 Digital Equipment Corporation.
  4. % All Rights Reserved.
  5. %
  6. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  7. %
  8. % This file is read upon startup each time Wild_Life is run.
  9. % It should not be modified by the user.
  10. %
  11. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  12. %    $Id: .set_up_basis,v 1.4 1996/01/17 00:49:53 vorbeck Exp $    
  13.  
  14.  
  15. %%%%%%%%%%%%%%%%%%%% RM: Jan 12 1993
  16. % Set up the basic modules correctly.
  17. % The system starts up with an undetermined current module.
  18.  
  19.  
  20.  
  21. built_ins#set_module("built_ins")?
  22.  
  23. % trace_input?
  24.  
  25. non_strict(public) ? %% BD June 10 1993
  26.  
  27. public(public)?
  28. public(str2psi)?
  29. public(c_op)?
  30. public(xfy)?
  31. public(xfx)?
  32.  
  33. public(yfx)?  %% BD June 10 1993
  34. public(fx)?
  35. public(fy)?
  36. public(xf)?
  37. public(yf)?
  38.  
  39. public(set_module)?
  40. public(open_module)?
  41.  
  42.  
  43. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  44. % S Y N T A X
  45.  
  46. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  47.  
  48. set_module("syntax")?
  49. built_ins#open_module("built_ins")?
  50.  
  51. % The problem guys:
  52. c_op(1000,xfy,',')?
  53. c_op(700,xfx,=)?
  54.  
  55.  
  56. A=str2psi("{"),public(A)?
  57. A=str2psi("}"),public(A)?
  58. A=str2psi("["),public(A)?
  59. A=str2psi("]"),public(A)?
  60.  
  61. % A=str2psi("("),public(A)?
  62. % A=str2psi(")"),public(A)?
  63. % A=str2psi("?"),public(A)?
  64.  
  65. A=str2psi("."),public(A)?
  66. A=str2psi(","),public(A)?
  67. A=str2psi("{}"),public(A)?
  68.  
  69.  
  70. public(
  71.  
  72. '!', '#', '$<', '$>', '$>=', '$\==', '&', '*', '+', ',', '-', '->', '/',
  73. '//', '/\', ':', ':-', '::', ':<', ':=', ':=<', ':==', ':>', ':><', ':>=',
  74. ':\<', ':\=<', ':\==', ':\>', ':\><', ':\>=', ';', '<', '<-', '<<', '<<-',
  75. '<|', '=', '=:=', '=<', '===', '\===', '=>', '=\=', '>', '>=', '>>', '@',
  76. '\/', '^', '`', 'and', 'end_of_file', 'or', 'not', 'xor', 'mod', '|', '\'
  77.  
  78. % , '<<<-'   Obsolete % RM: Feb 24 1993 
  79.  
  80. )?
  81.  
  82. public('\+','$==','$=<') ?    %% BD June 10 1993
  83.  
  84.  
  85. % Operator declarations.
  86. % Insofar as possible, these correspond with ISO standard Prolog.
  87.  
  88. % Declarations of sorts, functions, and predicates.
  89. c_op(1200,xfx,:-)?
  90. c_op(1200,xfx,->)?
  91. c_op(1200,xfx,<|)?
  92. c_op(1200,fx,::)?
  93. c_op(1200,xfx,:=)?
  94.  
  95. % Control flow inside of predicates.
  96. c_op(1150,xfx,|)?
  97. c_op(1100,xfy,;)? 
  98. c_op(900,fy,'\+')?
  99.  
  100. % Unification predicate and lookalikes.
  101. c_op(700,xfx,<-)?
  102. c_op(700,xfx,<<-)?
  103.  
  104. % Functions.
  105. % All expressions have precedence < 700.
  106. % PVR 24.2.94: changed according to Bruno's suggestion
  107. c_op(675,yfx,or)?
  108. c_op(675,yfx,xor)? % PVR 10.2.94
  109. c_op(650,yfx,and)? 
  110. c_op(625,fy,not)? % PVR 10.2.94
  111.  
  112. c_op(600,xfx,===)?
  113. c_op(600,xfx,\===)?
  114.  
  115. % Arithmetic comparisons 
  116. c_op(600,xfx,<)?
  117. c_op(600,xfx,>)?
  118. c_op(600,xfx,=<)?
  119. c_op(600,xfx,>=)?
  120. c_op(600,xfx,=:=)?
  121. c_op(600,xfx,=\=)?
  122.  
  123. % String comparisons
  124. c_op(600,xfx,$<)?
  125. c_op(600,xfx,$>)?
  126. c_op(600,xfx,$=<)?
  127. c_op(600,xfx,$>=)?
  128. c_op(600,xfx,$==)?
  129. c_op(600,xfx,$\==)?
  130.  
  131. % Sort comparisons
  132. c_op(600,xfx,:<)?
  133. c_op(600,xfx,:>)?
  134. c_op(600,xfx,:=<)?
  135. c_op(600,xfx,:>=)?
  136. c_op(600,xfx,:==)?
  137. c_op(600,xfx,:><)?
  138. c_op(600,xfx,:\<)?
  139. c_op(600,xfx,:\>)?
  140. c_op(600,xfx,:\=<)?
  141. c_op(600,xfx,:\>=)?
  142. c_op(600,xfx,:\==)?
  143. c_op(600,xfx,:\><)?
  144.  
  145. % Arithmetic operations
  146. c_op(500,yfx,+)?
  147. c_op(500,yfx,-)?
  148. c_op(500,yfx,/\)?
  149. c_op(500,yfx,\/)?
  150.  
  151. c_op(400,yfx,*)?
  152. c_op(400,yfx,//)?
  153. c_op(400,yfx,/)?
  154. c_op(400,yfx,>>)?
  155. c_op(400,yfx,<<)?
  156. c_op(400,yfx,mod)? % PVR 24.2.94
  157. c_op(200,fy,-)? % PVR 24.2.94
  158. c_op(200,xfy,^)?
  159. c_op(200,fy,\)?
  160.  
  161. % Unify function and coreference tag
  162. c_op(150,yfx,.)? % PVR 24.2.94
  163. c_op(100,xfy,&)?   % RM: Feb  1 1993  % PVR 24.2.94
  164. c_op(75,fy,`)?  % RM: Feb  1 1993 % PVR 24.2.94
  165. c_op(50,xfy,:)? % PVR 24.2.94
  166.  
  167. %%% Old stuff:
  168.  
  169. % c_op(700,xfx,<<<-) ?  % RM: Feb  8 1993    Obsolete % RM: Feb 24 1993 
  170. % c_op(695,fx,`)?  % Quote is loosest of the functions
  171. % c_op(500,xfy,\)?
  172. % c_op(500,fx,+)? PVR 24.2.94
  173. % c_op(500,fx,-)? PVR 24.2.94
  174.  
  175. % Project operator
  176. % c_op(400,yfx,##)?   % RM: Jan  7 1993
  177.  
  178. %% c_op(300,yfx,mod)? BD June 10 1993
  179.  
  180. % Module operator
  181. % c_op(130,xfy,#)?   % RM: Jan  7 1993 
  182.  
  183.  
  184. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  185. % B U I L T _ I N 
  186.  
  187. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  188.  
  189. built_ins#set_module("built_ins")?
  190.  
  191. open_module("syntax")? % This module contains symbols init. in built_ins.c
  192. % open_module("x")?
  193.  
  194. %% BD June 11 1993
  195. global(tools_dir<-"+SETUPDIR+/Tools/") ?
  196.  
  197. global(examples_dir<-"+SETUPDIR+/Examples/") ?
  198. global(superlint_dir<-"+SETUPDIR+/Examples/SuperLint/") ?
  199. global(demo_dir<-"+SETUPDIR+/Demo/") ? %% MJV January 16 1996
  200. global(lib_dir<-"+SETUPDIR+/Lib/") ?
  201.  
  202. simple_load("~built_in.lf") ?       %% BD June 10 1993
  203. simple_load("~term_exp.lf") ?
  204. simple_load("~onlinedo.lf")?
  205.  
  206. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  207. % X start up.
  208.  
  209. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  210.  
  211. % PVR 13.10.93
  212.  
  213. % persistent(x_loaded), x_loaded<<-false?
  214.  
  215. % public(x_loaded)?
  216. % persistent(x_loaded)?
  217. % x_loaded<<-false?
  218.  
  219. % public(load_x)?
  220. % dynamic(load_x)?
  221. % load_x :-
  222. %     retract(load_x :- G),
  223. %     assert((load_x :- write_err("*** X library already loaded."),nl)),
  224. %     quiet_write("Loading X library..."),
  225. %     simple_load("~xpublic.lf"),      % RM: Jan 13 1993 
  226. %     simple_load("~xconstants.lf"),
  227. %     simple_load("~xtables.lf"),
  228. %     simple_load("~xgetset.lf"),
  229. %     simple_load("~xpred.lf").
  230. %%  simple_load("~xfunctions.lf"),  % RM: Mar 11 1993 
  231.   
  232. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  233.  
  234. % Get ready for user input
  235.  
  236. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  237.  
  238. % The 'user' module:
  239.  
  240. display_modules(false) ?
  241.  
  242. module("user")?
  243. open_module("built_ins")?
  244. open_module("syntax")?
  245. % PVR 13.10.93 open_module("x")?
  246. init,
  247. initrandom(real_time)?
  248.  
  249. % display_modules(false)?   % BD June 10 1993
  250. % display_module_status?
  251.