gevdemo.sl 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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 ((MEMQ 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 ((CONCATL CITY ", " STATE)))))
  51. (PHONE-NUMBER (LIST (AREA INTEGER)
  52. (NUMBER INTEGER))
  53. PROP ((SHORTVALUE ((CONCATL "(" 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 ((NTH '(January February March April May June July
  61. August September October November
  62. December)
  63. MONTH)))
  64. (YEAR (SHORTYEAR + 1900))
  65. (SHORTVALUE ((CONCATL 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 ((CONCATL 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. )
  90. % edited: 6-NOV-82 14:41
  91. % Initialize data structures for GEV demo.
  92. (DG GEVDEMO-INIT NIL
  93. (PROG NIL (HPP _ (A PROJECT WITH TITLE = "Heuristic Programming Project"
  94. ABBREVIATION = 'HPP))
  95. (MJH _ (A BUILDING WITH ABBREVIATION = 'MJH
  96. NAME = "Margaret Jacks Hall" NUMBER = 460))
  97. (ARPA _ (AN AGENCY WITH NAME =
  98. "Defense Advanced Research Projects Agency"
  99. ABBREVIATION = 'ARPA
  100. ADDRESS =
  101. (AN ADDRESS WITH STREET = "1400 Wilson Blvd." CITY =
  102. "Arlington"
  103. STATE = 'VA
  104. ZIP = 22209)
  105. PHONE = (A PHONE-NUMBER WITH AREA = 202 NUMBER = 6944349)))
  106. (NSF _ (AN AGENCY WITH NAME = "National Science Foundation" ABBREVIATION
  107. = 'NSF
  108. ADDRESS =
  109. (AN ADDRESS WITH STREET = "1800 G STREET N.W." CITY =
  110. "Washington"
  111. STATE = 'DC
  112. ZIP = 20550)
  113. PHONE = (A PHONE-NUMBER WITH AREA = 202 NUMBER = 6327346)))
  114. (NIH _ (AN AGENCY WITH NAME = "National Institutes of Health"
  115. ABBREVIATION = 'NIH
  116. ADDRESS =
  117. (AN ADDRESS WITH STREET = "9000 Rockville Pike" CITY =
  118. "Bethesda"
  119. STATE = 'MD
  120. ZIP = 20001)
  121. PHONE = (A PHONE-NUMBER WITH AREA = 301 NUMBER = 4964000)))
  122. (GSN _
  123. (A PERSON WITH NAME = "Gordon S. Novak Jr." INITIALS =
  124. 'GSN
  125. TITLE = 'VISITOR
  126. PROJECT = HPP SALARY = 30000.0 SSNO = 455827977 BIRTHDATE =
  127. (A DATE WITH DAY = 21 MONTH = 7 SHORTYEAR = 47)
  128. PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4974532)
  129. OFFICE = (A CAMPUS-ADDRESS WITH BUILDING = MJH ROOM = 244)
  130. HOME-PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4935807)
  131. HOME-ADDRESS =
  132. (AN ADDRESS WITH STREET = "3857 Ross Road" CITY = "Palo Alto"
  133. STATE = 'CA
  134. ZIP = 94303)))
  135. (TCR _
  136. (A PERSON WITH NAME = "Tom C. Rindfleisch" INITIALS = 'TCR
  137. TITLE = 'ADMINISTRATOR
  138. PROJECT = HPP SALARY = 30000.0 SSNO = 452123477 BIRTHDATE =
  139. (A DATE WITH DAY = 2 MONTH = 1 SHORTYEAR = 47)
  140. PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4972780)
  141. HOME-PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4324321)
  142. OFFICE = (A CAMPUS-ADDRESS WITH BUILDING = MJH ROOM = 236)
  143. HOME-ADDRESS = (AN ADDRESS)))
  144. (EAF _
  145. (A PERSON WITH NAME = "Edward A. Feigenbaum" INITIALS =
  146. 'EAF
  147. TITLE = 'PROF
  148. PROJECT = HPP SALARY = 99999.0 SSNO = 123123477 BIRTHDATE =
  149. (A DATE WITH DAY = 2 MONTH = 1 SHORTYEAR = 37)
  150. PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4974878)
  151. OFFICE = (A CAMPUS-ADDRESS WITH BUILDING = MJH ROOM = 226)
  152. HOME-PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4931234)
  153. HOME-ADDRESS =
  154. (AN ADDRESS WITH STREET = " " CITY = "Stanford" STATE =
  155. 'CA
  156. ZIP = 94305)))
  157. (MRG _
  158. (A PERSON WITH NAME = "Michael R. Genesereth" INITIALS =
  159. 'MRG
  160. TITLE = 'ASST-PROF
  161. PROJECT = HPP SALARY = 31234.0 SSNO = 123123477 BIRTHDATE =
  162. (A DATE WITH DAY = 2 MONTH = 1 SHORTYEAR = 50)
  163. PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4970324)
  164. OFFICE = (A CAMPUS-ADDRESS WITH BUILDING = MJH ROOM = 234)
  165. HOME-PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4324321)
  166. HOME-ADDRESS = (AN ADDRESS)))
  167. (J5 _
  168. (A CONTRACT WITH TITLE = "Advanced A.I. Architectures" LEADER = EAF
  169. SPONSOR = ARPA BUDGET =
  170. (A BUDGET WITH LABOR = 50000.0 COMPUTER = 10000.0)))
  171. (IA _
  172. (A CONTRACT WITH TITLE = "Intelligent Agents" LEADER = MRG SPONSOR =
  173. ARPA BUDGET = (A BUDGET WITH LABOR = 70000.0 COMPUTER = 50000.0)))
  174. (DART _
  175. (A CONTRACT WITH TITLE = "Diagnosis and Repair Techniques" LEADER
  176. = MRG SPONSOR = ARPA BUDGET =
  177. (A BUDGET WITH LABOR = 100000.0 COMPUTER = 150000.0)))
  178. (GLISP _
  179. (A CONTRACT WITH TITLE = "GLISP" LEADER = GSN SPONSOR = ARPA
  180. BUDGET = (A BUDGET WITH LABOR = 50000.0 COMPUTER = 20000.0)))
  181. (CM _
  182. (A PERSON WITH NAME = "Cookie Monster" INITIALS = 'CM
  183. TITLE = 'MONSTER
  184. PROJECT = HPP SALARY = 1.0 SSNO = 123456789 BIRTHDATE =
  185. (A DATE WITH MONTH = 4 DAY = 1 SHORTYEAR = 65)
  186. PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4971234)
  187. OFFICE = (A CAMPUS-ADDRESS WITH BUILDING = MJH ROOM = 252)
  188. HOME-PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4561234)
  189. HOME-ADDRESS =
  190. (AN ADDRESS WITH STREET = "123 Sesame Street" CITY = "Palo Alto"
  191. STATE = 'CA
  192. ZIP = 94303)
  193. ))
  194. (CARBM _
  195. (A CONTRACT WITH TITLE =
  196. "Carbohydrate Metabolism in Atypical Hominids"
  197. LEADER = CM SPONSOR = NIH BUDGET =
  198. (A BUDGET WITH LABOR = 1.39 COMPUTER = 5.0)))
  199. (HPP:ADMINISTRATOR _ TCR)
  200. (HPP:CONTRACTS _ (LIST J5 IA DART GLISP CARBM))
  201. (HPP:EXECUTIVES _ (LIST EAF MRG GSN TCR))
  202. (C _ (A CIRCLE WITH START =
  203. (A VECTOR WITH X = 1 Y = 1)
  204. RADIUS = 5.0))))
  205. % edited: 22-OCT-82 16:54
  206. (DG TODAYS-DATE NIL
  207. (A DATE WITH MONTH = 10 DAY = 15 SHORTYEAR = 82))
  208. % edited: 22-OCT-82 17:13
  209. (DG TOTAL-BUDGET (P:PROJECT)
  210. (PROG (SUM)
  211. (SUM_0.0)
  212. (FOR EACH CONTRACT SUM _+ BUDGET:TOTAL)
  213. (RETURN SUM)))
  214. (PUT 'TODAYS-DATE
  215. 'GLRESULTTYPE
  216. 'DATE)
  217. % Now initialize te data structures for the demo.
  218. (gevdemo-init)