gevdemo.sl 8.3 KB

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