
% {DSK}GEVDEMO.PSL;1  5-FEB-83 15:41:04 





(GLISPOBJECTS


(PROJECT (ATOM (PROPLIST (TITLE STRING)
			 (ABBREVIATION ATOM)
			 (ADMINISTRATOR PERSON)
			 (CONTRACTS (LISTOF CONTRACT))
			 (EXECUTIVES (LISTOF PERSON))))
PROP    ((SHORTVALUE (ABBREVIATION))
	 (DISPLAYPROPS (T))
	 (BUDGET TOTAL-BUDGET)))


(CONTRACT (ATOM (PROPLIST (TITLE STRING)
			  (LEADER PERSON)
			  (SPONSOR AGENCY)
			  (BUDGET BUDGET)))
PROP    ((SHORTVALUE (TITLE))))


(AGENCY (ATOM (PROPLIST (NAME STRING)
			(ABBREVIATION ATOM)
			(ADDRESS ADDRESS)
			(PHONE PHONE-NUMBER)))
PROP    ((SHORTVALUE (ABBREVIATION))))


(PERSON (ATOM (PROPLIST (NAME STRING)
			(INITIALS ATOM)
			(TITLE ATOM)
			(PROJECT PROJECT)
			(SALARY REAL)
			(SSNO INTEGER)
			(BIRTHDATE DATE)
			(PHONE PHONE-NUMBER)
			(OFFICE CAMPUS-ADDRESS)
			(HOME-ADDRESS ADDRESS)
			(HOME-PHONE PHONE-NUMBER)
			(PICTURE PICTURE)))
PROP    ((SHORTVALUE (INITIALS))
	 (CONTRACTS ((THOSE CONTRACTS OF PROJECT WITH LEADER=self)))
	 (AGE ((THE YEAR OF (TODAYS-DATE))
	       - BIRTHDATE:YEAR))
	 (MONTHLY-SALARY (SALARY/12))
	 (DISPLAYPROPS (T)))
ADJ     ((FACULTY ((MEMQ TITLE '(PROF ASSOC-PROF ASST-PROF))))))


(BUDGET (LIST (LABOR REAL)
	      (COMPUTER REAL))
PROP    ((OVERHEAD (LABOR * 0.59))
	 (TOTAL (LABOR+OVERHEAD+COMPUTER))
	 (SHORTVALUE (TOTAL))
	 (DISPLAYPROPS (T))))


(ADDRESS (LIST (STREET STRING)
	       (CITY STRING)
	       (STATE ATOM)
	       (ZIP INTEGER))
PROP    ((SHORTVALUE ((CONCATL CITY ", " STATE)))))


(PHONE-NUMBER (LIST (AREA INTEGER)
		    (NUMBER INTEGER))
PROP    ((SHORTVALUE ((CONCATL "(" AREA ") " (SUBSTRING NUMBER 1 3)
			      "-"
			      (SUBSTRING NUMBER 4 7)))))
ADJ     ((LOCAL (AREA=415 OR AREA=408))))


(DATE (LIST (MONTH INTEGER)
	    (DAY INTEGER)
	    (SHORTYEAR INTEGER))
PROP    ((MONTHNAME ((NTH '(January February March April May June July 
					 August September October November 
					 December)
			       MONTH)))
	 (YEAR (SHORTYEAR + 1900))
	 (SHORTVALUE ((CONCATL MONTHNAME " " DAY ", " YEAR)))))


(PICTURE ANYTHING
MSG     ((EDIT PAINTW)
	 (GEVDISPLAY PICTURE-GEVDISPLAY)))


(CAMPUS-ADDRESS (LIST (BUILDING BUILDING)
		      (ROOM ATOM))
PROP    ((SHORTVALUE ((CONCATL BUILDING:ABBREVIATION " " ROOM)))))


(BUILDING (ATOM (PROPLIST (ABBREVIATION ATOM)
			  (NAME STRING)
			  (NUMBER INTEGER)))
PROP    ((SHORTVALUE (NAME))))


(CIRCLE (LIST (START VECTOR)
	      (RADIUS REAL))
PROP    ((PI (3.141593))
	 (DIAMETER (RADIUS*2))
	 (CIRCUMFERENCE (PI*DIAMETER))
	 (AREA (PI*RADIUS^2))
	 (SQUARESIDE ((SQRT AREA)))
	 (DISPLAYPROPS ('(DIAMETER CIRCUMFERENCE AREA))))
MSG     ((GROW (AREA_+100))
	 (SHRINK (AREA_AREA/2))
	 (STANDARD (AREA_100.0)))
ADJ     ((BIG (AREA>100))
	 (SMALL (AREA<80))))



)



% edited:  6-NOV-82 14:41 
% Initialize data structures for GEV demo. 
(DG GEVDEMO-INIT NIL
(PROG NIL (HPP _ (A PROJECT WITH TITLE = "Heuristic Programming Project" 
		    ABBREVIATION = 'HPP))
      (MJH _ (A BUILDING WITH ABBREVIATION = 'MJH
		NAME = "Margaret Jacks Hall" NUMBER = 460))
      (ARPA _ (AN AGENCY WITH NAME = 
		  "Defense Advanced Research Projects Agency"
		  ABBREVIATION = 'ARPA
		  ADDRESS =
		  (AN ADDRESS WITH STREET = "1400 Wilson Blvd." CITY = 
		      "Arlington"
		      STATE = 'VA
		      ZIP = 22209)
		  PHONE = (A PHONE-NUMBER WITH AREA = 202 NUMBER = 6944349)))
      (NSF _ (AN AGENCY WITH NAME = "National Science Foundation" ABBREVIATION 
		 = 'NSF
		 ADDRESS =
		 (AN ADDRESS WITH STREET = "1800 G STREET N.W." CITY = 
		     "Washington"
		     STATE = 'DC
		     ZIP = 20550)
		 PHONE = (A PHONE-NUMBER WITH AREA = 202 NUMBER = 6327346)))
      (NIH _ (AN AGENCY WITH NAME = "National Institutes of Health" 
		 ABBREVIATION = 'NIH
		 ADDRESS =
		 (AN ADDRESS WITH STREET = "9000 Rockville Pike" CITY = 
		     "Bethesda"
		     STATE = 'MD
		     ZIP = 20001)
		 PHONE = (A PHONE-NUMBER WITH AREA = 301 NUMBER = 4964000)))
      (GSN _
	   (A PERSON WITH NAME = "Gordon S. Novak Jr." INITIALS =
	      'GSN
	      TITLE = 'VISITOR
	      PROJECT = HPP SALARY = 30000.0 SSNO = 455827977 BIRTHDATE =
	      (A DATE WITH DAY = 21 MONTH = 7 SHORTYEAR = 47)
	      PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4974532)
	      OFFICE = (A CAMPUS-ADDRESS WITH BUILDING = MJH ROOM = 244)
	      HOME-PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4935807)
	      HOME-ADDRESS =
	      (AN ADDRESS WITH STREET = "3857 Ross Road" CITY = "Palo Alto" 
		  STATE = 'CA
		  ZIP = 94303)))
      (TCR _
	   (A PERSON WITH NAME = "Tom C. Rindfleisch" INITIALS = 'TCR
	      TITLE = 'ADMINISTRATOR
	      PROJECT = HPP SALARY = 30000.0 SSNO = 452123477 BIRTHDATE =
	      (A DATE WITH DAY = 2 MONTH = 1 SHORTYEAR = 47)
	      PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4972780)
	      HOME-PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4324321)
	      OFFICE = (A CAMPUS-ADDRESS WITH BUILDING = MJH ROOM = 236)
	      HOME-ADDRESS = (AN ADDRESS)))
      (EAF _
	   (A PERSON WITH NAME = "Edward A. Feigenbaum" INITIALS =
	      'EAF
	      TITLE = 'PROF
	      PROJECT = HPP SALARY = 99999.0 SSNO = 123123477 BIRTHDATE =
	      (A DATE WITH DAY = 2 MONTH = 1 SHORTYEAR = 37)
	      PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4974878)
	      OFFICE = (A CAMPUS-ADDRESS WITH BUILDING = MJH ROOM = 226)
	      HOME-PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4931234)
	      HOME-ADDRESS =
	      (AN ADDRESS WITH STREET = " " CITY = "Stanford" STATE =
		  'CA
		  ZIP = 94305)))
      (MRG _
	   (A PERSON WITH NAME = "Michael R. Genesereth" INITIALS =
	      'MRG
	      TITLE = 'ASST-PROF
	      PROJECT = HPP SALARY = 31234.0 SSNO = 123123477 BIRTHDATE =
	      (A DATE WITH DAY = 2 MONTH = 1 SHORTYEAR = 50)
	      PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4970324)
	      OFFICE = (A CAMPUS-ADDRESS WITH BUILDING = MJH ROOM = 234)
	      HOME-PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4324321)
	      HOME-ADDRESS = (AN ADDRESS)))
      (J5 _
	  (A CONTRACT WITH TITLE = "Advanced A.I. Architectures" LEADER = EAF 
	     SPONSOR = ARPA BUDGET =
	     (A BUDGET WITH LABOR = 50000.0 COMPUTER = 10000.0)))
      (IA _
	  (A CONTRACT WITH TITLE = "Intelligent Agents" LEADER = MRG SPONSOR = 
	     ARPA BUDGET = (A BUDGET WITH LABOR = 70000.0 COMPUTER = 50000.0)))
      (DART _
	    (A CONTRACT WITH TITLE = "Diagnosis and Repair Techniques" LEADER 
	       = MRG SPONSOR = ARPA BUDGET =
	       (A BUDGET WITH LABOR = 100000.0 COMPUTER = 150000.0)))
      (GLISP _
	     (A CONTRACT WITH TITLE = "GLISP" LEADER = GSN SPONSOR = ARPA 
		BUDGET = (A BUDGET WITH LABOR = 50000.0 COMPUTER = 20000.0)))
      (CM _
	  (A PERSON WITH NAME = "Cookie Monster" INITIALS = 'CM
	     TITLE = 'MONSTER
	     PROJECT = HPP SALARY = 1.0 SSNO = 123456789 BIRTHDATE =
	     (A DATE WITH MONTH = 4 DAY = 1 SHORTYEAR = 65)
	     PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4971234)
	     OFFICE = (A CAMPUS-ADDRESS WITH BUILDING = MJH ROOM = 252)
	     HOME-PHONE = (A PHONE-NUMBER WITH AREA = 415 NUMBER = 4561234)
	     HOME-ADDRESS =
	     (AN ADDRESS WITH STREET = "123 Sesame Street" CITY = "Palo Alto" 
		 STATE = 'CA
		 ZIP = 94303)
                 ))
      (CARBM _
	     (A CONTRACT WITH TITLE = 
		"Carbohydrate Metabolism in Atypical Hominids"
		LEADER = CM SPONSOR = NIH BUDGET =
		(A BUDGET WITH LABOR = 1.39 COMPUTER = 5.0)))
      (HPP:ADMINISTRATOR _ TCR)
      (HPP:CONTRACTS _ (LIST J5 IA DART GLISP CARBM))
      (HPP:EXECUTIVES _ (LIST EAF MRG GSN TCR))
      (C _ (A CIRCLE WITH START =
	      (A VECTOR WITH X = 1 Y = 1)
	      RADIUS = 5.0))))


% edited: 22-OCT-82 16:54 
(DG TODAYS-DATE NIL
(A DATE WITH MONTH = 10 DAY = 15 SHORTYEAR = 82))


% edited: 22-OCT-82 17:13 
(DG TOTAL-BUDGET (P:PROJECT)
(PROG (SUM)
      (SUM_0.0)
      (FOR EACH CONTRACT SUM _+ BUDGET:TOTAL)
      (RETURN SUM)))

 (PUT 'TODAYS-DATE
      'GLRESULTTYPE
      'DATE)

% Now initialize te data structures for the demo.
(gevdemo-init)