gevdemo.old 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. (FILECREATED " 8-NOV-82 09:44:50" {DSK}GEVDEMO.LSP;22 10081
  2. changes to: (FNS GEVDEMO-INIT)
  3. (VARS GEVDEMOCOMS)
  4. previous date: "26-OCT-82 16:10:02" {DSK}GEVDEMO.LSP;20)
  5. (PRETTYCOMPRINT GEVDEMOCOMS)
  6. (RPAQQ GEVDEMOCOMS ((GLISPOBJECTS PROJECT CONTRACT AGENCY PERSON BUDGET ADDRESS PHONE-NUMBER DATE
  7. PICTURE CAMPUS-ADDRESS BUILDING CIRCLE VECTOR RADIANS DEGREES
  8. RVECTOR)
  9. (FNS GEVDEMO-INIT TODAYS-DATE TOTAL-BUDGET)
  10. (PROP GLRESULTTYPE TODAYS-DATE)
  11. (P (GEVDEMO-INIT))))
  12. [GLISPOBJECTS
  13. (PROJECT
  14. [ATOM (PROPLIST (TITLE STRING)
  15. (ABBREVIATION ATOM)
  16. (ADMINISTRATOR PERSON)
  17. (CONTRACTS (LISTOF CONTRACT))
  18. (EXECUTIVES (LISTOF PERSON]
  19. PROP ((SHORTVALUE (ABBREVIATION))
  20. (DISPLAYPROPS (T))
  21. (BUDGET TOTAL-BUDGET)) )
  22. (CONTRACT
  23. (ATOM (PROPLIST (TITLE STRING)
  24. (LEADER PERSON)
  25. (SPONSOR AGENCY)
  26. (BUDGET BUDGET)))
  27. PROP ((SHORTVALUE (TITLE))) )
  28. (AGENCY
  29. (ATOM (PROPLIST (NAME STRING)
  30. (ABBREVIATION ATOM)
  31. (ADDRESS ADDRESS)
  32. (PHONE PHONE-NUMBER)))
  33. PROP ((SHORTVALUE (ABBREVIATION))) )
  34. (PERSON
  35. (ATOM (PROPLIST (NAME STRING)
  36. (INITIALS ATOM)
  37. (TITLE ATOM)
  38. (PROJECT PROJECT)
  39. (SALARY REAL)
  40. (SSNO INTEGER)
  41. (BIRTHDATE DATE)
  42. (PHONE PHONE-NUMBER)
  43. (OFFICE CAMPUS-ADDRESS)
  44. (HOME-ADDRESS ADDRESS)
  45. (HOME-PHONE PHONE-NUMBER)
  46. (PICTURE PICTURE)))
  47. PROP ((SHORTVALUE (INITIALS))
  48. (CONTRACTS ((THOSE CONTRACTS OF PROJECT WITH LEADER=self)))
  49. (AGE ((THE YEAR OF (TODAYS-DATE))
  50. - BIRTHDATE:YEAR))
  51. (MONTHLY-SALARY (SALARY/12))
  52. (DISPLAYPROPS (T)))
  53. ADJ [(FACULTY ((MEMB TITLE (QUOTE (PROF ASSOC-PROF ASST-PROF] )
  54. (BUDGET
  55. (LIST (LABOR REAL)
  56. (COMPUTER REAL))
  57. PROP ((OVERHEAD (LABOR*0.59))
  58. (TOTAL (LABOR+OVERHEAD+COMPUTER))
  59. (SHORTVALUE (TOTAL))
  60. (DISPLAYPROPS (T))) )
  61. (ADDRESS
  62. (LIST (STREET STRING)
  63. (CITY STRING)
  64. (STATE ATOM)
  65. (ZIP INTEGER))
  66. PROP [(SHORTVALUE ((CONCAT CITY ", " STATE] )
  67. (PHONE-NUMBER
  68. (LIST (AREA INTEGER)
  69. (NUMBER INTEGER))
  70. PROP [(SHORTVALUE ((CONCAT "(" AREA ") " (SUBSTRING NUMBER 1 3)
  71. "-"
  72. (SUBSTRING NUMBER 4 7]
  73. ADJ ((LOCAL (AREA=415 OR AREA=408))) )
  74. (DATE
  75. (LIST (MONTH INTEGER)
  76. (DAY INTEGER)
  77. (SHORTYEAR INTEGER))
  78. PROP [[MONTHNAME ((CAR (NTH (QUOTE (January February March April May June July August September
  79. October November December))
  80. MONTH]
  81. (YEAR (SHORTYEAR + 1900))
  82. (SHORTVALUE ((CONCAT MONTHNAME " " DAY ", " YEAR] )
  83. (PICTURE
  84. ANYTHING
  85. MSG ((EDIT PAINTW)
  86. (GEVDISPLAY PICTURE-GEVDISPLAY)) )
  87. (CAMPUS-ADDRESS
  88. (LIST (BUILDING BUILDING)
  89. (ROOM ATOM))
  90. PROP [(SHORTVALUE ((CONCAT BUILDING:ABBREVIATION " " ROOM] )
  91. (BUILDING
  92. (ATOM (PROPLIST (ABBREVIATION ATOM)
  93. (NAME STRING)
  94. (NUMBER INTEGER)))
  95. PROP ((SHORTVALUE (NAME))) )
  96. (CIRCLE
  97. (LIST (START VECTOR)
  98. (RADIUS REAL))
  99. PROP [(PI (3.141593))
  100. (DIAMETER (RADIUS*2))
  101. (CIRCUMFERENCE (PI*DIAMETER))
  102. (AREA (PI*RADIUS^2))
  103. (SQUARESIDE ((SQRT AREA)))
  104. (DISPLAYPROPS ((QUOTE (DIAMETER CIRCUMFERENCE AREA]
  105. MSG ((GROW (AREA_+100))
  106. (SHRINK (AREA_AREA/2))
  107. (STANDARD (AREA_100.0)))
  108. ADJ ((BIG (AREA>100))
  109. (SMALL (AREA<80))) )
  110. (VECTOR
  111. (LIST (X INTEGER)
  112. (Y INTEGER))
  113. PROP [(MAGNITUDE ((SQRT X^2 + Y^2)))
  114. (ANGLE ((ARCTAN2 Y X T))
  115. RESULT RADIANS)
  116. (UNITVECTOR ((A RVECTOR WITH X = X/MAGNITUDE , Y = Y/MAGNITUDE]
  117. ADJ ((ZERO (X IS ZERO AND Y IS ZERO))
  118. (NORMALIZED (MAGNITUDE = 1.0)))
  119. MSG [(PRIN1 ((PRIN1 "(")
  120. (PRIN1 X)
  121. (PRIN1 ",")
  122. (PRIN1 Y)
  123. (PRIN1 ")")))
  124. (PRINT ((_ self PRIN1)
  125. (TERPRI] )
  126. (RADIANS
  127. REAL
  128. PROP ((DEGREES (self* (180.0/3.1415926))
  129. RESULT DEGREES)
  130. (DISPLAYPROPS (T))) )
  131. (DEGREES
  132. REAL
  133. PROP ((RADIANS (self* (3.1415926/180.0))
  134. RESULT RADIANS)
  135. (DISPLAYPROPS (T))) )
  136. (RVECTOR
  137. (LIST (X REAL)
  138. (Y REAL))
  139. SUPERS (VECTOR) )
  140. ]
  141. (DEFINEQ
  142. (GEVDEMO-INIT
  143. [GLAMBDA NIL (* edited: " 6-NOV-82 14:41")
  144. (* Initialize data structures for GEV demo.)
  145. (PROG NIL
  146. (HPP _(A PROJECT WITH TITLE = "Heuristic Programming Project" , ABBREVIATION =(QUOTE
  147. HPP)))
  148. (MJH _(A BUILDING WITH ABBREVIATION =(QUOTE MJH)
  149. , NAME = "Margaret Jacks Hall" , NUMBER = 460))
  150. (ARPA _(AN AGENCY WITH NAME = "Defense Advanced Research Projects Agency" ,
  151. ABBREVIATION =(QUOTE ARPA)
  152. , ADDRESS =(AN ADDRESS WITH STREET = "1400 Wilson Blvd." , CITY =
  153. "Arlington"
  154. , STATE =(QUOTE VA)
  155. , ZIP = 22209)
  156. , PHONE =(A PHONE-NUMBER WITH AREA = 202 , NUMBER = 6944349)))
  157. (NSF _(AN AGENCY WITH NAME = "National Science Foundation" , ABBREVIATION =(QUOTE
  158. NSF)
  159. , ADDRESS =(AN ADDRESS WITH STREET = "1800 G STREET N.W." , CITY =
  160. "Washington"
  161. , STATE =(QUOTE DC)
  162. , ZIP = 20550)
  163. , PHONE =(A PHONE-NUMBER WITH AREA = 202 , NUMBER = 6327346)))
  164. (NIH _(AN AGENCY WITH NAME = "National Institutes of Health" , ABBREVIATION =(QUOTE
  165. NIH)
  166. , ADDRESS =(AN ADDRESS WITH STREET = "9000 Rockville Pike" , CITY =
  167. "Bethesda"
  168. , STATE =(QUOTE MD)
  169. , ZIP = 20001)
  170. , PHONE =(A PHONE-NUMBER WITH AREA = 301 , NUMBER = 4964000)))
  171. (GSN _(A PERSON WITH NAME = "Gordon S. Novak Jr." , INITIALS =(QUOTE GSN)
  172. , TITLE =(QUOTE VISITOR)
  173. , PROJECT = HPP , SALARY = 30000.0 , SSNO = 455827977 , BIRTHDATE =(A
  174. DATE WITH DAY = 21 , MONTH = 7 , SHORTYEAR = 47)
  175. , PHONE =(A PHONE-NUMBER WITH AREA = 415 , NUMBER = 4974532)
  176. , OFFICE =(A CAMPUS-ADDRESS WITH BUILDING = MJH , ROOM = 244)
  177. , HOME-PHONE =(A PHONE-NUMBER WITH AREA = 415 , NUMBER = 4935807)
  178. , HOME-ADDRESS =(AN ADDRESS WITH STREET = "3857 Ross Road" , CITY =
  179. "Palo Alto"
  180. , STATE =(QUOTE CA)
  181. , ZIP = 94303)))
  182. (TCR _(A PERSON WITH NAME = "Tom C. Rindfleisch" , INITIALS =(QUOTE TCR)
  183. , TITLE =(QUOTE ADMINISTRATOR)
  184. , PROJECT = HPP , SALARY = 30000.0 , SSNO = 452123477 , BIRTHDATE =(A
  185. DATE WITH DAY = 2 , MONTH = 1 , SHORTYEAR = 47)
  186. , PHONE =(A PHONE-NUMBER WITH AREA = 415 , NUMBER = 4972780)
  187. , HOME-PHONE =(A PHONE-NUMBER WITH AREA = 415 , NUMBER = 4324321)
  188. , OFFICE =(A CAMPUS-ADDRESS WITH BUILDING = MJH , ROOM = 236)
  189. , HOME-ADDRESS =(AN ADDRESS)))
  190. (EAF _(A PERSON WITH NAME = "Edward A. Feigenbaum" , INITIALS =(QUOTE EAF)
  191. , TITLE =(QUOTE PROF)
  192. , PROJECT = HPP , SALARY = 99999.0 , SSNO = 123123477 , BIRTHDATE =(A
  193. DATE WITH DAY = 2 , MONTH = 1 , SHORTYEAR = 37)
  194. , PHONE =(A PHONE-NUMBER WITH AREA = 415 , NUMBER = 4974878)
  195. , OFFICE =(A CAMPUS-ADDRESS WITH BUILDING = MJH , ROOM = 226)
  196. , HOME-PHONE =(A PHONE-NUMBER WITH AREA = 415 , NUMBER = 4931234)
  197. , HOME-ADDRESS =(AN ADDRESS WITH STREET = " " , CITY = "Stanford" , STATE =(
  198. QUOTE CA)
  199. , ZIP = 94305)))
  200. (MRG _(A PERSON WITH NAME = "Michael R. Genesereth" , INITIALS =(QUOTE MRG)
  201. , TITLE =(QUOTE ASST-PROF)
  202. , PROJECT = HPP , SALARY = 31234.0 , SSNO = 123123477 , BIRTHDATE =(A
  203. DATE WITH DAY = 2 , MONTH = 1 , SHORTYEAR = 50)
  204. , PHONE =(A PHONE-NUMBER WITH AREA = 415 , NUMBER = 4970324)
  205. , OFFICE =(A CAMPUS-ADDRESS WITH BUILDING = MJH , ROOM = 234)
  206. , HOME-PHONE =(A PHONE-NUMBER WITH AREA = 415 , NUMBER = 4324321)
  207. , HOME-ADDRESS =(AN ADDRESS)))
  208. (J5 _(A CONTRACT WITH TITLE = "Advanced A.I. Architectures" , LEADER = EAF , SPONSOR
  209. = ARPA , BUDGET =(A BUDGET WITH LABOR = 50000.0 , COMPUTER = 10000.0)))
  210. (IA _(A CONTRACT WITH TITLE = "Intelligent Agents" , LEADER = MRG , SPONSOR = ARPA ,
  211. BUDGET =(A BUDGET WITH LABOR = 70000.0 , COMPUTER = 50000.0)))
  212. (DART _(A CONTRACT WITH TITLE = "Diagnosis and Repair Techniques" , LEADER = MRG ,
  213. SPONSOR = ARPA , BUDGET =(A BUDGET WITH LABOR = 100000.0 , COMPUTER =
  214. 150000.0)))
  215. (GLISP _(A CONTRACT WITH TITLE = "GLISP" , LEADER = GSN , SPONSOR = ARPA , BUDGET =(
  216. A BUDGET WITH LABOR = 50000.0 , COMPUTER = 20000.0)))
  217. (CMPICTURE _(CREATEW (create REGION
  218. LEFT _ 0
  219. BOTTOM _ 0
  220. WIDTH _ 100
  221. HEIGHT _ 100)))
  222. (CM _(A PERSON WITH NAME = "Cookie Monster" , INITIALS =(QUOTE CM)
  223. , TITLE =(QUOTE MONSTER)
  224. , PROJECT = HPP , SALARY = 1.0 , SSNO = 123456789 , BIRTHDATE =(A DATE WITH
  225. MONTH = 4
  226. , DAY = 1
  227. ,
  228. SHORTYEAR =
  229. 65)
  230. , PHONE =(A PHONE-NUMBER WITH AREA = 415 , NUMBER = 4971234)
  231. , OFFICE =(A CAMPUS-ADDRESS WITH BUILDING = MJH , ROOM = 252)
  232. , HOME-PHONE =(A PHONE-NUMBER WITH AREA = 415 , NUMBER = 4561234)
  233. , HOME-ADDRESS =(AN ADDRESS WITH STREET = "123 Sesame Street" , CITY =
  234. "Palo Alto"
  235. , STATE =(QUOTE CA)
  236. , ZIP = 94303)
  237. , PICTURE = CMPICTURE))
  238. (CARBM _(A CONTRACT WITH TITLE = "Carbohydrate Metabolism in Atypical Hominids" ,
  239. LEADER = CM , SPONSOR = NIH , BUDGET =(A BUDGET WITH LABOR = 1.39 ,
  240. COMPUTER = 5.0)))
  241. (HPP:ADMINISTRATOR _ TCR)
  242. (HPP:CONTRACTS _(LIST J5 IA DART GLISP CARBM))
  243. (HPP:EXECUTIVES _(LIST EAF MRG GSN TCR))
  244. (C _(A CIRCLE WITH START =(A VECTOR WITH X = 1 , Y = 1)
  245. , RADIUS = 5.0])
  246. (TODAYS-DATE
  247. (GLAMBDA NIL (* edited: "22-OCT-82 16:54")
  248. (A DATE WITH MONTH = 10 , DAY = 15 , SHORTYEAR = 82)))
  249. (TOTAL-BUDGET
  250. (GLAMBDA (P:PROJECT) (* edited: "22-OCT-82 17:13")
  251. (PROG (SUM)
  252. (SUM_0.0)
  253. (FOR EACH CONTRACT SUM_+BUDGET:TOTAL)
  254. (RETURN SUM))))
  255. )
  256. (PUTPROPS TODAYS-DATE GLRESULTTYPE DATE)
  257. (GEVDEMO-INIT)
  258. (DECLARE: DONTCOPY
  259. (FILEMAP (NIL (4061 9998 (GEVDEMO-INIT 4071 . 9592) (TODAYS-DATE 9594 . 9764) (TOTAL-BUDGET 9766 .
  260. 9996)))))
  261. STOP