Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

A procedural model of recognition for machine perception Havens, William S. 1978

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-UBC_1978_A1 H39.pdf [ 10.45MB ]
Metadata
JSON: 831-1.0051790.json
JSON-LD: 831-1.0051790-ld.json
RDF/XML (Pretty): 831-1.0051790-rdf.xml
RDF/JSON: 831-1.0051790-rdf.json
Turtle: 831-1.0051790-turtle.txt
N-Triples: 831-1.0051790-rdf-ntriples.txt
Original Record: 831-1.0051790-source.json
Full Text
831-1.0051790-fulltext.txt
Citation
831-1.0051790.ris

Full Text

A PROCEDUEAL MODEL OF RECOGNITION FOR MACHINE PERCEPTION by WILLIAM S. M.Sc, Virginia B.Sc., V i r g i n i a  HAVENS  Polytechnic Polytechnic  Institute, Institute,  1973 1969  A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY in THE  FACULTY OF GRADUATE STUDIES  (Department  o f Computer  Science)  We a c c e p t t h i s t h e s i s a s c o n f o r m i n g to t h e r e q u i r e d standard.  THE  UNIVERSITY OF BRITISH COLUMBIA March, (c) W i l l i a m  1978  S. Havens,  197 8  In  presenting  this  an a d v a n c e d  degree  the  shall  I  Library  f u r t h e r agree  for  scholarly  by h i s of  this  written  thesis at  the U n i v e r s i t y  make  that  it  purposes  for  freely  permission may  representatives. thesis  in p a r t i a l  financial  is  of  British  2075 W e s b r o o k P l a c e Vancouver, Canada V 6 T 1W5  by  for  gain  Columbia  shall  t h e requirements f o r  Columbia,  that  not  I  agree  r e f e r e n c e and copying  t h e Head o f  understood  permission.  University  British  for extensive  Department The  of  available  be g r a n t e d  It  fulfilment of  of my  copying  that  study.  this  thesis  Department o r or  publication  be a l l o w e d w i t h o u t  my  ii  Abstract  This  thesis  i s  machine p e r c e p t i o n . emerging  from  concerned  I t i s shown  research  understanding,  in  with  aspects  of  a theory of  that a comprehensive theory  computer  c o g n i t i v e psychology,  vision,  n a t u r a l language  and A r t i f i c i a l  Intelligence  programming  language technology.  A number o f a s p e c t s  perception  are  Perception  process terms  characterized.  w h i c h composes of  stored  Perception  reguires  representation necessary  of  for  theory  of  both  knowledge  machine  schema-based and  a  model  search  perception,  i s presented.  mechanisms  in  parsing  integrates  bottcm-up,  knowledge  and  As an a p p r o a c h t o w a r d s  recognition  model  a  performing  representation.  the  a  theory  top-down,  is  in  s c h e m a t a as models t o g u i d e  bottom-up  recognition language  model  called  procedural  as MAYA  modes.  an  formalism of  the  deduction  The  Artificial  i s described.  world. f o r the  processes on  development  methods  may be a p p l i e d c o n c u r r e n t l y search  the  that of  model  a of  The r e c o g n i t i o n search  hierarchical  with  and  cf  discussed.  Heuristic  methods  experience i n  hypothesis-driven  search  recognition  o f t h e model t o f o r m a l  representations.  Multiple  a  c f machine  computational  The s i m i l a r i t y  data-driven  particular  is  new d e s c r i p t i o n s o f s e n s o r y  stereotypical  is  with  schemata  are associated  their recognition. in  both  implementation  Intelligence  top-down of the  programming  MAYA i s a m u l t i p r o c e s s i n g  iii  dialect  o f LISP t h a t  schemata  provides  networks  and  top-down and bottom-up from s c e n e a n a l y s i s , the  operation  language. Finally, are  control  structures  processing.  A  for  characteristic  o f t h e model and t h e u t i l i t y  of  example  to illustrate  the  programing  manual f o r MAYA i s i n c l u d e d .  a p p l i c a t i o n s f o r both t h e r e c o g n i t i o n and some p r e m i s i n g  representing  f o r integrating  w r i t t e n i n MAYA, i s p r e s e n t e d  A programming r e f e r e n c e  discussed  proposed.  data s t r u c t u r e s  model  directions for future  and  MAYA  research  iv  TABLE OF CONTENTS  1: I n t r o d u c t i o n 1 2: Mechanisms f o r Machine P e r c e p t i o n 5 2.1 I n t r o d u c t i o n 5 2.2 A r t i f i c i a l I n t e l l i g e n c e and P s y c h o l o g y 6 2.3 Programming L a n g u a g e s 8 2.4 R e p r e s e n t a t i o n o f Knowledge 11 2.4.1 L o g i c a l R e p r e s e n t a t i o n s 11 2.4.2 The P r o c e d u r a l R e f o r m a t i o n 13 2.4.3 Schemata 14 2. 4. 4 S e a r c h .. . ... 17 2.5 M a c h i n e V i s i o n 23 2.5.1 R o b e r t s ' P a r a d i g m 23 2.5.2 Guzman's SEE 26 2.5.3 Huffman and C l o w e s 28 2.5.4 W a l t z ' s A l g o r i t h m ...29 2.5.5 Mackworth's MAPSEE 32 2.5.6 F r e u d e r ' s SEER 35 3: A P r o c e d u r a l Model 39 3.1 I n t r o d u c t i o n 39 3.2 M o d e l O v e r v i e w 39 3.2.1 Schemata . .. 40 3.2.2 Schema H i e r a r c h i e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.2.3 R e c o g n i z e r s 49 3.2.4 N o n - D e t e r m i n i s m 51 3.2. 5 R e c u r s i o n 55 3.3 E a r l e y ' s A l g o r i t h m 56 3.4 T h r e e P h a s e s o f R e c o g n i t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.4.1 E x p e c t a t i o n 61 3.4.2 M a t c h i n g 63 3.4.3 C o m p l e t i o n 64 3.5 S c h e d u l i n g , 68 3.6 Method H i e r a r c h i e s 71 3.7 C o o r d i n a t i o n and C o m m u n i c a t i o n 74 3.8 I n t e g r a t i o n 75 4: An Example f r o m Machine V i s i o n 78 4.1 P e r s p e c t i v e 78 4.2 The P r o b l e m 79 4.3 A n n o t a t e d P r o t o c o l 88 4.4 C o n c l u s i o n 114 5: Maya 115 5.1 I n t r o d u c t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 5.2 Language O v e r v i e w 116 5.2.1 D a t a T y p e s ... 116 5.2.2 E v a l u a t i o n 120 5.3 R e p r e s e n t a t i o n 122 5.3. 1 Schemata 122 5.3.2 Messages 126 f  V  5.4 P a t t e r n H a t c h i n g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5 Top-down Methods 5.6 Bottom-up Methods 5.7 C o n c l u s i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6: R e c o g n i t i o n R e v i s i t e d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 P e r s p e c t i v e 6.2 R e c o g n i t i o n R e v i s i t e d 6.3 A p p l i c a t i o n s and F u t u r e R e s e a r c h . . . . . . . . . . . . . . . . . . . . . Bibliography Appendix-A: E a r l e y ' s P a r s i n g A l g o r i t h m A p p e n d i x - B : MAYA Language R e f e r e n c e Manual . . . . . . . . . . . . . . . . . B.1 R e l a t i n g t o MAYA B.2 The D a t a b a s e B.3 E v a l u a t i o n B.4 E r r o r C o n d i t i o n s and t h e DEBUG System B.5 I n p u t / O u t p u t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.6 P a t t e r n M a t c h i n g B.7 G e n e r a t o r s B.8 P r o c e s s e s and R e c o g n i z e r s A p p e n d i x C: Example Program L i s t i n g  130 132 137 141 142 142 142 151 153 160 164 164 166 171 173 177 178 183 186 188  vi  L I S T OF FIGURES  3.1: A B i c y c l e Schema 3.2: E i c y c l e C o m p o s i t i o n H i e r a r c h y 3.3: I n d e x e d I n s t a n c e H i e r a r c h y 3.4: R e c o g n i t i o n C y c l e s 4.1: Scene C o m p o s i t i o n Hierarchy 4.2: I n p u t Scene 4.3: V e r t e x I n s t a n c e H i e r a r c h y 4.4a: V e r t e x Schemata 4.4b: L i n e Schemata 4.5: V e r t e x L a b e l l i n g C o n v e n t i o n s 4.6: R e c o g n i t i o n o f a 6.1: P e r c e p t u a l C y c l e s A.1: The P r e d i c t o r F u n c t i o n A.2: The S c a n n e r F u n c t i o n A.3: The C o m p l e t e r F u n c t i o n  ..  fledge  ..... 41 44 48 66 80 83 84 85 ..85 87 89 148 162 162 162  Acknowle dcements  "When a p i c k p o c k e t meets a h o l y man. A l l he s e e s i s h i s p o c k e t s . " Anonymous  I  would  invaluable McCalla,  like  to  guidance Michael  Browse f o r fiackworth  and  helpful  tolerance,  Rosenberg  and  transportation, his  faithful  supervising the  Sheryl  constant  This research from  the  Assistantship  this  and Adam  Gordon  my  Marian  my h o u s e m a t e s f o r t h e i r especially  providing  L . B. F l o y d  Richard  accomodation  and  f o r many i n s i g h t s and Alan  enthusiasm,  Mackworth f o r and  providing  of a friend.  was s u p p o r t e d of  Gelbart,  criticisms,  and above a l l ,  and f a i t h  University  and  thesis,  for  sharing  for their  Rowat, J a n M u l d e r , and B o g e r  understanding,  companionship,  support  Rachel  discussions  my d e a r f r i e n d  my r e s e a r c h ,  d o c t o r a l cemmittee  Peter  proofreading  comraderie,  my  perspective,  Kuttner,  many for  thank  by a  British  f r o m t h e Department  Postgraduate Columbia  o f Computer  and  Scholarship a  Science.  Research  1  CHAPTER  The dream  of  mankind  engine,  time, the  been  mind  with  for  of our  understanding  steam  INTRODUCTION  creation of i n t e l l i g e n t  sophistication the  1:  and  telephone  metaphors, taken 1963).  Only  of i n t e l l i g e n t  Gelernter  created have do  maddeningly  y e t h a v e an  overall  theory  theory  of  thesis  that  process  concerned  observation as  and  representation  two of  years,  the their of  however,  computer  has  successes  the  Simon  major  knowledge  (1963), these In  of  Samuel  and  others,  expectations particular,  of perception as part However, as  a theory  with  be  and  experience.  having  early  aspects  T h i s work  can  plans  for  functioning  few  to r e a l i z e .  elements o f such  by  tool  clockworks,  the  last  machine i n t e l l i g e n c e .  is  the  have e a c h , i n  Unfortunately,  difficult  perception  guided  the  N e w e l l and  o f machine p e r c e p t i o n .  belief  seen  by  adequate theory  (1977c) p o i n t s o u t , This  switchboard  in  m a c h i n e s been a s e r i o u s p o s s i b i l i t y .  high expectations.  been  not  (1963),  Hydraulics,  i n the  compelling  seen as a new  Neumann d i g i t a l  Such a p o s s i b i l i t y , e n c o u r a g e d (1963),  been  been a  advancement  as t h e o r i e s o f  i n v e n t i o n o f t h e von  realization  Each  has  ourselves.  the  (Rapoport,  the  millennia.  technology  of  automata has  is  are  cf  we an  Mackworth  emerging.  of t h i s  developing  motivated  by  the  c h a r a c t e r i z e d as a r e c o g n i t i o n expectations  A theory parts and  -  and  driven  by  of machine p e r c e p t i o n i s a  formalism  a model o f the  for  processes  the and  1: I n t r o d u c t i o n  2  control that  structures required  representation.  process  i s emphasized  perception in  this  t h a t has thesis  perception. for  The  perception  not  Perception  a  is  and  observed  in  this  formation  of the  an  process  seen t o e x p l o i t the  of  Likewise,  the  incomplete  this  is  of the  a  world  is  that  partial  confirmation  expectation  sensory  is and  fcllcwinq  terms The  and  a perceived  observation.  Our  sensory  often  illusory.  i n t e r p r e t sensory  experience  Yet The  perception perceptual  exploitinq t o be  operates process  context  and  hypothesized  in must  allowinq and  their  concurrently.  b o t h an a  experience  observations.  and  by  the  Perception  of e v e r y d a y  ambiguous  which we  knowledqe  concept.  and  new  stored  relational,  can  be  of  new  process.  interpretations  attempted  Perception  for  paradigm  composes  non-deterministic  environment.  t o l e r a t e non-determinacy multiple  Presented  the  in  abstract  often erroneous.  uncertain  machine  recognition  on  world.  s e q u e n t i a l nature  k n o w l e d g e by and  of  as a computational  a s s u m i n q c a u s a l r e l a t i o n s h i p s among e v e n t s  experience  aspect  developed.  process  the  description of  Perception  and  and  experience  created  is  between r e p r e s e n t a t i o n  based  recoqnition  descriptions of  by  is  and  perception. a  of  on  model  model i s i n t e n d e d  of  deduction  p o i n t out  procedural  stereotypical  is  to  search  been s u f f i c i e n t l y  research  characterization  descriptions  distinction  i n order  is  The  t o perform  a c t i v e process  passive  process  Observations  quided  driven  a c t as  by  by  hypothesis events  c u e s which 1:  and  stimulate  Introduction  3  both the formation knowledge  o f h y p o t h e s e s and t h e a c t i v a t i o n o f  associated  with  specific  hypothesis-specific  knowledge i s u s e d  process  observations,  by  attempting  making  to s a t i s f y  Perception solely  is  those also  The  successfully  a  perception  perceptual  perceived  of higher  recursive but may  process  concept  search  with  schema-based explicit  bottom-up, knowledge  in  associated recognition applied of  of  i n both  methods  mechanisms methods  with  may  the r e s u l t  specific  as  an  abstract  of  cue  in  the  machine  perception,  hypothesis-driven  search  employing  in  The  hierarchical,  model  top-down  those  active  cue/model  procedures,  schemata schemata.  and bottorn-up  search  simultaneously.  to  drive  Methods  may  the be  modes and a number The model  defines  concurrent  method-scheduling  of c o m p u t i n g a method's  called  Methods a r e  o f c o m m u n i c a t i o n and c o o r d i n a t i o n between a deductive  defines  recursive  Heuristic  of  a  b a s e d on t h e s e c h a r a c t e r i z a t i o n s .  stereotypial  instances  b a s e d on t h e n o t i o n  of  u s e s t h e d e s c r i p t i o n o f some  to g u i d e t h e r e c o g n i t i o n p r o c e s s .  be  and  Cues a r e not  in fact,  representations. for  and a l s o d e f i n e s  perception  process.  be,  data-driven  perception.  methods, a r e u s e d  recognition  expectations,  an i n t e g r a t i o n o f top-down,  mechanisms  hierarchies  the  Such  concepts.  model i s p r e s e n t e d  The model p r o v i d e s  to d i r e c t  c r e a t i n g new  As an a p p r o a c h t o w a r d s a t h e o r y procedural  hypotheses.  expectations.  primitive observations  perception.  heuristic  technique  applicability  to the  process. 1:  Introduction  4  As an i m p l e m e n t a t i o n language  called  Maya  language i s designed  of the p e r c e p t i o n  has  been  developed.  as a m u l t i p r o c e s s i n g  and  s c h e m a t a - b a s e d knowledge  bottom-up creating  and  coordinating In  processes  the i n t e r a c t i o n  presenting  implementation,  of  the  model  the t h e s i s takes  representational programmes. in  detail.  example model  of  of  Chapter 4  and  to  description  programming artificial  of  style.  its  o f machine p e r c e p t i o n  given  here.  form:  Chapter  are  specific perception  recognition  but  the b e n e f i t s  o f Maya as a  of  other  of Maya, on  of t h i s  as t o the p o s s i b l e d i r e c t i o n s of f u t u r e  Maya  relevant  the perspective  i s i n v e s t i g a t e d and  the  programming  of the design  The r e l e v a n c e  model  characteristic  and a s m a l l t u t o r i a l  from  2  to the e v o l u t i o n of  re-examines  research  the are  presented  6  model  its  small  an o v e r v i e w  procedural study  a  features,  intelligence  and  l a n g u a g e s , and  the u t i l i t y  Chapter  recognition  Examined  to i l l u s t r a t e  Chapter 5 provides  for  the procedural  presents  demonstrate  mechanisms f o r and  research  t h e o r i e s , programming  Chapter 3 presents  and  deductively  the f o l l o w i n g  perception.  from computer v i s i o n  language. a  theory  well,  processes.  reviews the c o n t r i b u t i o n s of r e c e n t a computational  As  f o r i n t e g r a t i n g top-down  The l a n g u a g e a l s o p r o v i d e s  scheduling  of  representations.  primitives  processing.  dialect  programming  constructing, manipulating,  accessing  control  This  and  data  defines  for  programming  LISP  provides  Maya  structures  model, a  of the  work  to  suggestions  research.  1:  Introduction  5  £111111  2.1  2: MECHANISMS  FOR MACHINE  PERCEPTION  Introduction  If there these  t h e dream o f i n t e l l i g e n t a u t o m a t a must  exist  a  machines w i l l  knowledge  will  principles science, science  will  body  a  concerned  f o r our  be  realized,  effect  from  of  this  on  mankind.  human  and  a l l other  reasoning.  society will  be f e l t  of Its  computer  branches of  Its  i n now  which  body  i n mathematics, psychology,  philosophy,  with  to  principles  The d i s c o v e r y  profound  be m a n i f e s t  linguistics,  implications  of underlying  be b u i l t . have  i s  ultimate  unimaginable  ways. An  apparent convergence of ideas  memory, t h e u n d e r s t a n d i n g knowledge, that  must  perception.  exist  The  investigated  and  that  research  too  In t h i s  2:  representation  mechanisms psychology,  indicates that f a r from  this  images  mechanisms  similar  chapter,  supporting  the o r g a n i z a t i o n of  of visual  computational  linguistics  may r e s i d e n o t  knowledge.  from r e c e n t  fact  the  i n the f i e l d s of c o g n i t i v e  intelligence,  present  language,  and t h e m a c h i n e p e r c e p t i o n  there  principles  of  about  the  a review  these  of  suggests governing  are  being  artificial underlying  surface  of  our  o f some  evidence  view i s p r e s e n t e d ,  Mechanisms f o r Machine  Perception  6  2.2 A r t i f i c i a l  I n t e l l i g e n c e and  Both c o g n i t i v e psychology concerned computer  with  has g i v e n  metaphor in  understanding  for  the  to  particular compare  with  the  an  behavioural  mechanisms.  processing  In  mechanisms  as  a  1972) ( N e w e l l  memory, o r  a test of theory  of  (Bumelhart 8  & Simon,  1972)  model o f some  learning;  then  to  a d e q u a c y o f t h e computer s i m u l a t i o n t o  early  given  example  t h e same t a s k . of this  approach  s o l v i n g (Newell,1963).  smaller  exchange,  intelligence  information-processing  o f human s u b j e c t s  "baclc-chaining" and  an i n f o r m a t i o n  artificial  of perception,  model o f human problem  smaller  these  5 Quillian,  propose  significant  simple  The  T h e a p p r o a c h o f many r e s e a r c h e r s  (Collins  aspect  the behaviour A  t h e mechanisms o f p e r c e p t i o n .  of our computational  Norman, 1973} been  are  have g i v e n  human p e r c e p t i o n .  has  intelligence  v i s u a l i z i n g c o g n i t i v e mechanisms and a l a b o r a t o r y  experiments  validity  and a r t i f i c i a l  p s y c h o l o g i s t s both  which t o e x p e r i m e n t  their  Psychology  scheme  of breaking  sub-problems  i s t h e GPS  The model u s e s a problem  until  progress  model  of  a  down  into  on  some  s u b - p r o b l e m c a n be made. A n o t h e r example developed tree node  i s  by Feigenbaum  the  EPAM  (1963).  verbal  learning  The model u s e s a d i s c r i m i n a t i o n  a s an a s s o c i a t i v e memory f o r nonsense s y l l a b l e s . in  perform  the  tree,  a binary  constructed.  As  only  sufficient  discrimination test more  nonsense 2:  information at the  syllables  time are  At  each  i s retained to the  node  added  Mechanisms f o r Machine  is  to the  Perception  7  network,  the  test  discrimination. failure  This  t o respond  stimuli,  becomes  and  to  leads a  insufficient to  such  stimulus,  oscillation  for  retrieval  confusion  between  proper  errors  between  correct  and  as a  similar incorrect  responses. An  important  representations semantic  contribution  o f knowledge  networks  i s Quillian's  directed  nodes  represent  binary  r e l a t i o n s h i p s between  arbitrary  (1968)  graph  concepts  proposal  H i s work  structure  and  concepts.  t h e network i s c o n s i d e r e d  from the concept  t h e d e v e l o p m e n t o f machine  as a model o f human memory.  memory a s an a r c - l a b e l l e d  in  to  which  arcs represent  typed  The meaning  t o be t h e e n t i r e  of a  represented  encyclopedic Although Hoods  as  network  property. a  set  of  T h e meaning  network a s viewed  of  isolated  of  with  t h i s r e p r e s e n t a t i o n i s extremely  rich  these  a  facts,  relationships  (1975) h a s a n a l y z e d  is  but  an  other  and  misconceptions.  Recently,  (1975)  has  extended  the  representational  power  Hendrix  (1975) a l s o h a s  partitioning  mechanism  hypothetical  situations.  Quillian's  original  logical augmented to  concepts.  r e l a t i o n s h i p s and p o i n t s  problems  incorporate  quantifiers the  research  of  a  semantic  and c o n n e c t i v e s . with  guantification  and t h e mere r e c e n t  2: Mechanisms  cut  Schubert  representation  incorporate  as  i n i t sstructure,  of  to  semantic  concept  number  networks  concept  node.  have an a p p e a l i n g  not  models  in  As a r e p r e s e n t a t i o n scheme f o r machine p e r c e p t i o n , nets  of  f o r Machine  a and  work o f  Perception  8  Collins  and L o f t u s (1975) have m o d e l l e d  parallel  spreading  From two c o n c e p t manner  to  occurs.  each  activation  process  i n a semantic  nodes, t h e s e a r c h p r o c e e d s of  their  neighbours  arcs  traversed  The t y p e s o f  supposed  human memory s e a r c h as a  t o represent the semantic  in  until  a  breadth-first  a path  during  intersection  the  relationship  network.  search  are  between t h e two  concepts.  2.3 Programming  Languages  A number o f a r t i f i c i a l suggest  aspects  i n c l u d e both structure  1973). an  computational  language  h a s been  the  (1972) P l a n n e r l a n g u a g e , Hewitt's  represented associative associated  procedure  language  declaratively database  and  associative  The  as  best  i s the Popler  The  database  and  an  partial  called  These a  control The most  implementation  (Sussman,  realization  patterns  procedures, language  of  in  a  called relies  retrieval,  written  of  of  In Planner, f a c t s are  automatic  language  languages  Micro-Planner  system.  implementation  languages  representation.  n-tuple  as  patterns.  invocation,  structure.  theory.  provides a procedural  higher-order l o g i c  with  mechanisms:  programming  a scheme f o r r e p r e s e n t i n g knowledge and  incomplete  proposal  a  scheme f o r o p e r a t i n g on t h a t  p o p u l a r such Hewitt*s  of  intelligence  theorems, on  three  pattern-directed  backtracking the o r i g i n a l in  global  Pop-2  by  control Planner Davies  (1973) a t E d i n b u r g h . 2:  Mechanisms f o r Machine P e r c e p t i o n  9  The  utility  Hinograd  (1973a).  McDermott, notably  o f the P l a n n e r  1972)  However, as  (Hayes,  the lack  paradigm  1973),  has been there  paths  Backtracking  No  reverses The  i s treated  problem  theorems  be  Each  a  side-effects that  between  each  of  is  the  alternative  any  manner. rejected  at a  decision  difficulty.  alternative  solutions i s  from f a i l u r e s .  The  a g g r a v a t e d by t h e i n t e n d e d m o d u l a r i t y o f t h e  matching one  most  s e m a n t i c s and  alternative  competing  P l a n n e r theorems. a given  succeeds.  modular  theorem  theorem every  fact  i s further  subgoal u n t i l to  the  by  (Sussman S  problems,  f o r generating  Consequently, nothing i s learned  pattern-invoked all  are s e r i o u s  independently i s the source of the  communication  possible.  out  i n a u n i f o r m and e x h a u s t i v e d e p t h - f i r s t  alternatives. point  demonstrated  pointed  of a precise representational  dependence on a u t o m a t i c b a c k t r a c k i n g solution  was  method  language  pattern  attempts t c  However, e a c h theorem  o f a l l o t h e r s and,  ignorant  use  t o a c h i e v e some g o a l  the  as a r e s u l t ,  o f the e f f o r t s  or  i s considered  alone capable of a c h i e v i n g  i s independent effectively  The  and  goal. each  methods o f  other. HcDermott  and  problems,  designed  language,  Conniver.  using  control  the  Wegbreit backtracking  (1973).  Sussman and The  ( 1 9 7 3 ) , i n an a t t e m p t  implemented language  structure Conniver  a  suggested  provides  nor automatic r e s t o r a t i o n  2:  successor  these  programming  supports multiprocessing  model  made t o t h e d a t a b a s e n o r m a l l y r e m a i n  to solve  of  changed  by  Bobrow  neither  and  automatic  variables. unless  by  Changes  specifically  Mechanisms f o r Machine  Perception  10  restored  by  the  communication solutions to  among  processes  the  t o use context  experimental copy a r e As  copy o f t h e  database.  co-routine that  to  can  communication  port  structure,  within  possibilities  Conniver's language  provided powerful Conniver  and  authors  the  not  new  depend  generators  which  values  possibilities automatic  list to  list.  are  between in  a  Instead  backtracking represented  on  Instead, i t  multiple  as  control data  items  provides  primitives  and  recalling  generators.  improve some  AI of  programming the  Conniver  mechanisms realized  in  problems has  also  decidedly  more  Micro-Planner.  r e p r e s e n t a t i o n of h y p o t h e t i c a l w o r l d s  the  utility 2:  of  also  Micro-Planner.  p r o p e r t i e s t o be  chapter,  does  return  those  a  separate,  c h a n g e s made t o t h i s  repairing  than  a  state  intended  of  request  internal  representational  permits  may  permit  provides  an  Conniver  by  Conniver  called  the p o s s i b l i t i e s  flexible  allows a r b i t r a r y next  list.  database  In o r d e r t o  alternatives.  are e x p l i c i t l y  i n t h e use some  a  an  technology  encountered  the  called  alternatives  manipulating  may  the  context.  qenerate  maintain  Generators  embedded  consult  Conniver  mechanism  invocations.  for  Any  mentioned,  defines  the  process  previously  backtrackinq  in  Any  e x t e r n a l to the  procedures  may  hypothetical situations, mechanism.  permits  exploring alternative  o f her s i b l i n g s .  not v i s i b l e  a  modification  processes  Each p r o c e s s  results  automatic  being  This  "sister"  to a problem.  discover  layered  programmer.  a s s o c i a t e d with of t h i s  last  patterns.  mechanism w i l l  Mechanisms f o r Machine  and In be  Perception  11  investigated. Conniver design.  does  In  fact,  Micro-Planner. and  not  propose  i t  defeats  However, t h e  manipulation  of  capability,  if  not  mechanisms.  A second list  be  by o t h e r  A  very  proposed a  by  model  schematic will  2.4  be  Bobrow and  of  search  Logical  a  the  as  of  creation  providing  data  a  search  i s i t s use  Winograd for  language,  cf  the  s t r u c t u r e s to  KRL-0,  (1977).  They  machine  perception  i n the  next  has  explicitly  a n o t i o n of schema  been  propose  based  matching.  on  a  KRL  section.  Knowledge  for  trajor a s p e c t  the  computer  of a theory  been ah  important  r e p r e s e n t a t i o n of  o f machine  for representations exhibiting  perception.  desirable properties  research  effort.  Representations  First-order as  programming  mechanisms  p e r c e p t i o n has  2.4.1  of  model  f o r u s i n g bottom-up  processes  d i s c u s s e d i n more d e t a i l  Representation  thus  in i t s  processes.  r e p r e s e n t a t i o n and  knowledge a r e a  for  facility,  recognition  Suitable  The  processes  to represent  recent  primitive  c o n t r i b u t i o n of Conniver  possibilities manipulated  the  language does support  multiple the  a model o f c o m p u t a t i o n  p r e d i c a t e c a l c u l u s has  computational  paradigm 2:  for  been a d v o c a t e d Artificial  by  many  Intelligence  Mechanisms f o r Machine P e r c e p t i o n  12  (HcCarthy  S Hayes,  offers  the  from  and  proof  advocated,  A  of  used of  and  and  calculus  completely  modular  semantics. ,  i s specifically perform  proof  All  divorced  search  procedures  resolution  a uniform  Predicate  formal  to  t h e most p a r t , t h e s e  process  a  and  factually  number  mechanisms u t i l i z i n g  1969) .  both  precise  most n o t a b l y t h e  For  concept  of  procedures  representation.  (1965).  a  i s represented  the  (Green,  advantages  representation knowledge  1969)  on  that  have  been  principle  of  Robinson  proof procedures  are  syntactic  interpreter.  control  T h e r e i s no  i n h e r e n t i n the l o g i c  general system  itself. A the  number  search  dynamic  of  strategies  process  in  pruning  have been p r o p o s e d  predicate  of  the  calculus  search  domain-specific  h e u r i s t i c procedures  Reiter  has  (1973)  search  space  A as  and  number  language  a uniform  to  introduce  mechanism, Hayes structure  (1973)  operators  is  proof  1974)  system.  defining  a the  the  procedure. predicate calculus  procedure  semantics  by  the  (VanEmden,  programming  deducible  cf  attaching  of a model t o r e s t r i c t  proof  logical  including  and  t o axioms  use  (Kowalski,  s t r u c t u r e model f o r t h e  attempt  space  t o g i v e a d v i c e t o the  implementations,  control  the  contrclling  systems,  o f r e s e a r c h e r s have a d v o c a t e d  a programming  most  advocated  for  1977).  i s used  language. into  language logic  In  as  the  In  an  the  control  of  control  system  during  execution. These  efforts  point  to 2:  the  need  t o have t h e  deductive  Mechanisms f o r Machine P e r c e p t i o n  13  process guided uniform of  by s e m a n t i c knowledge i n s t e a d  s y n t a c t i c procedure.  the r e p r e s e n t a t i o n  2.4.2 The P r o c e d u r a l  The given  representing competing quickly  schools,  positions  man's  knowing  view.  of Hewitt  on  by Winograd  of  a  that  firm  entity.  Access  Their the  a detailed discussion  of these  that  means.  The  world  is  of  objects  system.  the  the  knowledge  is  a large  is  basis.  by t h e  "what".  directed  at  2:  putting  The knowledge o f some procedure  representing  i n an a c t o r  i s permitted  interpreter are  Actor  point of  by i t s  c a n a l t e r n a t i v e l y be v i e w e d  Actors  part  The  a message which i t i n t e r p r e t s  system  best  knowledge o f p r o c e s s -  t h e extreme of t h i s  information  formalism  decentralization  of  argument i s t h a t  h i s research  to  own  two  thereby  contend  exhibited  by s e n d i n g t h e a c t o r  formalism f o r  (1975).  procedural  only  have  view  (1973) d e f i n e s  i s the behavior  of  formalism  reformation,  points  "how" i n s t e a d o f a f a c t u a l knowing  semantics  that  logical  serious  respective  i n procedures.  Hewitt s t a t e s  entity  any  positions. ,  knowledge  formalism  process.  p r o c e d u r a l i s t s and t h e d e c l a r a t i v i s t s ,  their  those  i n  proceduralists  represented of  i n the purely  as  the  i s outlined  The  a  i s an i n t e g r a t i o n  t o t h e development o f a p r o c e d u r a l  delineated  on  Reformation  knowledge.  radicalizing  What i s r e q u i r e d  relying  w i t h a model o f c o n t r o l and  problems observed  impetus  of  among  as the  the  data  a g e n e r a l i z a t i o n c f the  Mechanisms f o r Machine  Perception  14  formal  notion  programming It  language  (Dahl,  seems c l e a r t h a t  expressed handled  o f c l a s s e s and  introduced  process  because by  the  provide  interactions  operations  and  higher  order  a d u a l i t y between t h e and  the  From t h e  declared  perception,  that  between a t h e o r y a theory is  an  procedural  recognition,  2.4.3  procedural  cf developing duality  of  the  the  can  - the  aspect. of  duality  between  and  what i s needed a  declarative  are s p e c i f i a b l e  there  of  distinction  i n t e g r a t i o n c a n n o t be  Instead,  between f o r m and  theory  declarative aspect,  i n t e r a c t i o n s that  out  representations.  seen as t h e  modularity  of technigues. inherent  be  for  representations  a computational  procedural  That  to s p e c i f y  (1975) p o i n t s  in  of r e p r e s e n t a t i o n  respects the  Winograd  are the  convenient  inherent  same  with  are  declarative  representation.  concatenation that  knowledge.  of r e c o g n i t i o n - the  representation  they  best  of  n a t u r a l way  of  goal  integration  a  are  nature  modularity  interaction  Simula  relationships  sequential  Procedures  representing  the  in general  temporal  representation. as  in  1966).  method and  procedurally automatically  objects  must be  a  a  in a simple  synthesis  representation  and  process.  Schemata  Within  the  representations memory  research  last  few  years,  o f knowledge i n such (Bobrow  &  Norman, 2:  research diverse 1975)  Mechanisms f o r  into  fields  suitable as  (Pylyshyn, fiachine  human 1976),  Perception  15  linguistics (Minsky,  1975)  convergent work  (Fillmore,  of  Bartlett  following representing  Schemata  situations,  and  situations.  Schemata  networks  Quillian  of  encyclopedic concept. abstract. simpler  Complex  conceptual  (1968)  concepts  units  single  a  hierarchical detail  data  schemata  schemata  of  includes  represents complex,  knowledge  same  rich  a generic  concrete  organized  of p r o c e s s  detail,  and  or  as a composition  i s  as  events,  the semantic  schema  are represented  for  actions,  the  or  the  structures  events,  single  can d e a l concepts,  of into with as  or, a l t e r n a t i v e l y , the  s t r u c t u r e c a n be examined  i s composed and  includes the notion  schema  of  simple  of  been  including objects,  information  level  h a s now  a t a deeper l e v e l of  when r e q u i r e d .  Each schema other  schemata data  modules, t h e i n t e r p r e t a t i o n amounts o f  the  exhibiting  Each  Because  large related at  be  to  many i n c a r n a t i o n s .  are  sequences  concept  form n e t w o r k s t r u c t u r e s l i k e  may  schemata.  the  of  concepts  organization.  Concepts  1977) has l e d t o w a r d s t h e  although  characterization  stereotypical  intelligence  The t e r m i s a t t r i b u t a b l e  u n d e r v a r i o u s names w i t h  aspects.  artificial  Winograd,  (1932),  general  actions,  6  (Bobrow  and  n o t i o n o f schemata.  rediscovered A  1968),  p r i m i t i v e values. of  may be c o p i e d  stereotype  o f a s e t of  stereotype  to yield  initially  i t s named r e l a t i o n s .  and  named  relations  The r e p r e s e n t a t i o n a l s o instance.  m u l t i p l e schema  Stereotype  instances.  may c o n t a i n d e f a u l t v a l u e s  When t h e schema 2: Mechanisms  with  i s copied  for  Each some  to represent  f o r Machine  Perception  16  an  instance of  functions. instance  First,  interpreted  of  they  t h a t must be  represented  used  i t s stereotype,  instantiating  particular schema*s  data  default  a  the  contain  passive  consists  Minsky he the  o f what t y p e i n the  instance  the  assignments  are  of information instance.  becomes  calls  a  Abelson  fully  of  the  the  d e s c r i p t i o n of the  values  proposed  of  may  The  be  process  search  for  satisfying  the  knowledge.  In  a  of  he  use  the  His  extends  passive  relational  instance. representation  vision  knowledge  its applicability  (1975) has  further  to  a  number o f  primitive  to  actions  represent  narratives.  to c o n s t r u c t  the  system 2:  schema-based scripts  Using  cause  and  parsing  schematic representation can  infer  the  Schank  system  which u s e s a  a case  other  specified  i n n a t u r a l language r e s e a r c h .  developed  and  work i s p r i m a r i l y c o n c e r n e d  called  (1975)  named  schema-based  s t o r y understanding  r e l a t i o n s h i p s i n simple  expectations instance,  schemata f o r c o m p u t e r  Winograd  for  specified  narrative  Schank's  the  a  (1975) have  (Fillmore,1968)  passive  In  although  Recently, paradigm  a c t i v e and  frajje systems.  development  domains.  both  knowledge i n c l u d e s  (1975) has  representations,  story,  default  the  of  embedded sub-schema i n s t a n c e s  v a r i a b l e s comprising  and  Second,  schema  values.  knowledge  frames  knowledge a b o u t  two  expectations.  a stereotype,  with  generic  default values  or  Schemata may  which  provide  expectations  to r e p l a c e the  d e f a u l t assignments serve  g e n e r a l l y t r u e o f most o c c u r r e n c e s  concept. as  the  fcr small  effect method of  a paraphrase of  Mechanisms f o r Machine  a the  Perception  17  story  including  original  Charniak  understanding  process  and  using  passing  and  proposed  narrative  a  in  the  schema-based systems i s the  to  the  Their efforts  the  recently  schematic  are d e c i d e d l y  existence  a As  of  suitable  active  memory p r o c e s s e s  natural  language  i n t e g r a t e s both  syntactic  semantic  analysis  among c o o p e r a t i n g  (1975) and  of  structural  n e t w o r k s as  in l i n g u i s t i c  and  message  Ortony  schemata  Norman, R u m e l h a r t ,  as  schemata.  Rumelhart  characterization well,  modelled  His system  grammar and  Norman  presented  human memory.  et a l .  (1976)  f o r modelling (1975)  have  schemata f o r m o d e l l i n g  comprehension.  Search  A popular  perspective i n a r t i f i c i a l  view machine i n t e l l i g e n c e  heuristic  techniques  recognition as  has  interpretation  Eobrow and  to  present  neither of these  concern.  schemata.  using a case  proposed  has  the  assume  (1977)  parsing  2.4.4  explicitly  mechanisms,  McCalla dialogue  In  from  of primary  representational recognition  (1975)  system.  of t r a n s l a t i o n  representation  have  not  narrative.  Similarly, story  information  having  mechanisms  (Slagle,  as  intelligence  a complex s e a r c h  1971).  From  this  methods f o r machine p e r c e p t i o n c a n  two  major a s p e c t s - t h e  for  particular  development  been  guided  by  perspective,  be c h a r a c t e r i z e d  of p o w e r f u l  r e p r e s e n t a t i o n s and 2:  task  has  search  the d i s c o v e r y of  Mechanisms f o r Machine P e r c e p t i o n  18  powerful and  heuristics  reduce  mechanisms  the  size  of the search  (1975) has a d v o c a t e d  (1974) h a s  deduction.  proposed  In the author's  the  domains  space.  to  order  A number o f  search  representations.  t h e use o f p a r a l l e l use  of  opinion, both  attempts to s o l v e the perception Although  knowledge  have been a d v a n c e d f o r schema-based  Fahlman Bieger  for particular  problem  unrestricted of these with  plight,  they  should  fcrward  proposals are  a "bigger  a d v a n c e s i n t h e s t a t e o f t h e hardware  programming  hardware.  a r t may  haamer". ease our  n o t be t h e b a s i s o f a t h e o r y  of  perception. Kuipers recognition  (1975) h a s a d v o c a t e d model  for  schema  stereotypes contain heuristic process.  As  constitute of  the  external of  the  systems. knowledge  stereotype's  h y p o t h e s e s a b o u t what instance.  Schemata  other  sub-schemata  mechanisms Described  In this to  recognize  default  subgoals.  thereby below  order  must  suffering  from  schema  the  search  expectations the  instances calling  driven  model,  guide  slots  by  on t h e  making efforts  unfortunately,  scheme f o r c e s t h e use o f p u r e l y g o a l  1. A schema  schema  as  hypothesis  to look f o r t o f i l l  o b s e r v a t i o n s and by r e c u r s i v e l y  recognition  A  well,  a top-down,  driven  this search  a number o f s e r i o u s drawbacks.  are t h r e e such  deficiencies:  be e x p l i c i t l y  hypothesized  as  a  subgoal  in  to recognize i n s t a n c e s of i t s stereotype.  may  contain  heuristic  knowledge  2: Mechanisms  to  f o r Machine  guide  the  Perception  19  recognition  process.  available,  the  subgoal  by some  I n order  schema  must  higher  schema.  top-down, g o a l d i r e c t e d  2.  An o r d e r i n g must  The at  a time.  search  should  subgoal  be  i s  a  tecome  explicitly  This  a  forces  as a  reliance  on  strategies.  must  be  hypothesized  made  on  Each  subgoal  mechanism  completely of  hypotheses.  failure  driven.  and  expectation  schema  Consider a  before to  Which  subgoal  must be  This  choice  called.  i s available  each  subgoals.  One p a r t i c u l a r  hypothesis  schema  f o r activating  alternative  first?  "blind"  e x p e r t i s e o f the subgoal decision.  the  number  c h o s e n a s t h e most l i k e l y  the help  heuristic make  may c o n t a i n h e u r i s t i c  the  knowledge  drive t h e r e c o g n i t i o n o f i t s s t e r e o t y p e , y e t t h a t guidance i s  available  only  after  a committment h a s been made t o t h e schema  a subgoal.  3. I d e n t i c a l s u b g o a l s  A schema  may  be  must be c a r r i e d  successful  subgoals.  If,  however,  subsequently  fail,  t h e schema  its  to  hypothesized  be a s s i g n e d t o a l t e r n a t i v e  Furthermore,  schema c o n t a i n i n g  as  be  knowledge  top-down r e c o g n i t i o n model f o r c e s t h e c h o i c e o f one s u b g o a l  alternative  to  for this  caller.  Later,  at  achieving  another must  t h e system  out i n d e p e n d e n t l y .  a  necessary  itself  return  number  of i t s  subgoal a  should  failure  may r e - c o m p u t e t h o s e  to  identical  2: Mechanisms f o r Machine P e r c e p t i o n  20  subgcals.  This behavior  has  been  called  thrashing  (Bobrow  S  R a p h a e l , 1974). Minsky proposed  (1975),  a  mechanism,  attempts to When  a  avoid  schema  applicable to network then  similarity  map  automatic  (1977b) has  labelled  chicken  egg  and  heuristically  heuristic recognition  the  it  that  consults  completed  both  that  each next  a  is  Top-down,  The  schema  into  the  ccntrol  mapping  exists  and  to continue only  that  the  in  s p a c e by  itself  system  the  general.  search.  research driven  but  "the  search  more  ones.  sufficient  to  Mackworth  attempting  likely  few  to schemata,  hypothesis  less  in  not  passes  candidate  a p p l i c a b l e not  not  is  complete t h a t r e l a t i v e l y  backtracking  trying  that  similarity  Such s u r p r i s e s f o r c e t h e  the search  before  it  subgoals then  has  subgcals.  a  t h e same phenomenon i n v i s i o n  orders  ordering  (1975),  for identical  d r i v e n systems  problem".  interpretations  compared  occur.  hypothesis  Winston  schema and  assumes  a b o v e comments a r e  hierarchical  evidence  candidate  schema and  failures on  by  objection,  a replacement candidate.  i t s correctly new  third  observation  network i s s u f f i c i e n t l y  entirely  At  from  recommends  failing  inexplicable  The  used  situation,  mechanism  between e a c h  rely  given  of the  This  this  d u p l i c a t i o n of e f f o r t  a  which  expectations  first  discovers  attempts t o  to i t .  anticipating  likely  However, to solve  the  problem. other  discovered against  e x t r e m e , bottom-up s e a r c h from domain  observation. specific 2:  i s driven solely  Such  knowledge  Mechanisms  evidence  can  by be  to c o n s t r a i n t h e  f o r Machine  Perception  21  interpretation. backtracking mechanisms  is  of  needed  overall  not  provide  expectation are  Since  no  One  such  integrate  is  and  the  scheme.  The  to  look  for  each  sentence.,  GSP  employs a p r i o r i t y  u s e s a g r a m m a t i c a l c h a r t as processes. one  The  extreme,  Auqmented  system  of  search.  give  yet  Kaplan GSP,  permit the  flexible  recoqnition  on  has a  independent  constituent  queue s c h e d u l i n q  to  (1973)  based  creates  qrammatical  Network p a r s e r  to  multiprocessing  communication  i s very  top-down  Transition  a  techniques  scheme.  system  processes  no  circumvent  a n a t u r a l language p a r s i n q system,  multiprocessing  at  process,  search is  search  to  use  bottom-up  there  perception,  recoqnition  p u r e l y top-down  formed,  bottom-up  directed  techniques  approach  top-down  developed  the  be  since  For  hypothesis  data-driven  i n e f f i c i e n c i e s of the  either  experience.  to  need  Unfortunately,  quidance  allow  quidance  hypotheses  required.  future  which  bottom-up,  no  in  a  mechanism  and  mechanism  between  i n t h a t i t can  emulate,  such  as  Woods*  (1970)  and,  at  the o t h e r  extreme,  (1977),  as  mentioned  earlier,  bottom-up r e c o q n i t i o n . Recently,  Bobrow and  have r e p o r t e d on  the development of a  lanquaqe supportinq designed  as  an  knowledqe w i t h  In  KRL,  schema-based  multiprocessinq called  integration  of  KRL.  o f p r o c e d u r a l and  a r e c o q n i t i o n model b a s e d  schemata  <1§ s c r i p t i o n s  Winoqrad  which  are  composed may  have 2:  of  The  proqramminq lanquaqe i s  declarative on  modular  associated  schema  forms  matchinq.  entities  called  procedures  Mechanisms f o r Machine  and  Perception  22  attributes, each As  A description  describing  the  are  are  higher  mechanism set  model,  fundamental  of  schemata  for achieving descriptions  concept  to the  operations  be  are  unit.  This  to  semantic  Hinograd  of  matching propose  matcher uses both the  overall  knowledge a t t a c h e d  model  described  syntax  of  to  the  units  top-down  how  and  based  in  on  The  KRL  matcher i s  or  at  the  of  the the  other  recognition descriptors markers  descriptions. driven.  recognition  To  model,  scheme t h a t  priority  strategies for scheduling  user-supplied  a  level  authors propose a m u l t i p r o c e s s i n g gueue w i t h  a  units  matcher  semantic  i s e s s e n t i a l l y hypothesis  with  well,  recognition  operation  knowledge e n c o d e d as  procedural  problems noted  As  the  matching.  The  the  associating  d e s c r i p t i o n s contained  a model o f  process.  as  by  i n t e n d e d as  process.  drive  specific  are  composed  marker scheme p r o v i d e s a f u r t h e r  to  domain  be  procedures.  on t h e  extreme,  and  Onits  to  and  Descriptions  may  forms s y n t a c t i c a l l y ,  the  stereotype  and  indicates  description  t o compare two  of  attachment  a set  performed  extended concept of  designed  units.  which  s p e c i a l i z a t i o n f o r the Bobrow and  descriptors,  representation.  procedural with  type  an  the  called  possess a category  of  multiple  b a s i c a l l y intensional representations  into  the  of  schema's c o n c e p t from a d i f f e r e n t v i e w p o i n t .  i n Minsky's frames  instance  i s made up  provides a  and The  avoid the  process and  resource a l l o c a t i o n .  2:  Mechanisms  for  Machine  Perception  23  2.5  Machine V i s i o n  Recent r e s e a r c h significant  i n machine v i s i o n  contribution  machine p e r c e p t i o n . forced  the  First,  understanding perception. being  vision  The  the  use  essential  has,  by  computational  role of  t o the  complexity  of  vision  the  methods  domain.  T h i s second  germane  to t h i s  perceptual been  aspect  will  of  be  two  process.  Second,  is  machine  research  particularly  examined i n t h i s vision  visual  developing  for this  vision  our  recognized  with  powerful  machine  maior  knowledge i n is  of has  expanded  knowledge  o f machine  t h e s i s and  from has  concerned  sufficiently  more c o m p r e h e n s i v e r e v i e w  problem  research  heuristic  necessity,  particularly a theory  of d o m a i n - s p e c i f i c  this  a of  machine v i s i o n  o f the The  of  made  development  inherent  confrontation  directions.  as  to  has  can  section.  be  fouisd  A in  Mackworth(1977b).  2.5.1  Roberts*  The paradigm  early  a  could  towards  two-pass  polyhedral data  research e f f o r t s  f o r machine v i s i o n  contribution used  Paradigm  a  to perfect l i n e perform  which  theory  procedure  objects.  The  of Roberts(1965) e s t a b l i s h e d a has  recognize  which  recognition. 2:  significant  scenes  pass reduced  drawings from  object  a  o f machine p e r c e p t i o n .  to  first  provided  The  the  Roberts  of  simple  gray-level picture second  ability  of  Mechanisms f o r Machine  procedure the  first  Perception  24  procedure without  t o produce  From attempts  a  perfect  line  t o compute a of  geometric  three  space  prototypical  Roberts to  polyhedron,  object  He  noted  in  some  lines.  ability  A second  selected, that  of  a  model  When  prototype.  is  that  specific  based for  the  particular  Instead  b e l o n g t o some  exploited  on the  the  use  the  process. of  picture  The program's models a r e cues  model.  I f a model i s f o u n d  that  suggest  Once  a  of  the  i t s partial remaining  model  the is  recognition  instantiation, lines  of  the  t o be i n a p p r o p r i a t e ,  then  another  i n r e c o g n i z i n g a simple 2:  of  topologically  the r e c o g n i t i o n  models.  particular  model i s s u c c e s s f u l  these  where i n t h e p i c t u r e t o l o c k f o r  cue d i s c o v e r y p r o c e s s i s c o n t i n u e d t o s e l e c t a  of a  I n o t h e r words, R o b e r t s  where i n t h e p i c t u r e t o l o o k  cubes,  the search f o ra  of viewpoints.  model d i r e c t s t h e r e m a i n d e r  calculating,  geometrical  power o f  t h e view  domain f o r l i n e s  of  procedure  complexity  picture  o f models t o guide  by t h e d i s c o v e r y  by  the  c o n t r i b u t i o n o f h i s work i s  appropriateness  process  that  wide r a n g e  to hypothesize p a r t i c u l a r  invoked  data doubted  specifically  constrain  because  a model c a n p r e d i c t  second  the predictive  given  a relatively  those p a r t i c u l a r  the  used  significantly  of s e a r c h i n g i n the p i c t u r e  cues  h a s been  using  polyhedra,  c o u l d be r e d u c e d  over  predictive  realistic  Roberts*  interpretation  prototypical  models  invariant  from  interpretation  drawing,  scene  interpretation.  search  drawings  1977b).  wedges, and p r i s m s .  scene  line  performing h i g h e r - l e v e l  (Mackworth,  models  perfect  model.  polyhedron,  Mechanisms f o r Machine P e r c e p t i o n  25  that new  object i s "edited cues  resumed.  reccqnizinq simpler  polyhedra  cyclic  hypothesis, the On  p i c t u r e and  provides a crude  as the c o m p o s i t i o n  modelled  by  of  the  proqram.  proqram has  discoverinq  attemptinq  cues,  to v e r i f y  that  picture  and  the  k third discovery This  recoqnized simple process  mechanism f o r of  of  as  depends on t h e  an  work  ordered  notion  of  is  that  attempts fails,  to f i n d the  three-line  v e r t e x as a  The  very e a r l y  significant  steps  used  an  two  as a l a s t  the r e c o q n i t i o n  cue  procedure.  approved  polygon  c u b e , wedqe,  a picture  vertex  pclyqons.  a polygon resort,  If  this  containing a  i t locks for  a  cue.  towards  quide  the  I f unsuccessful, i t  approved  to f i n d  work o f R o b e r t s  he  qeometric  a  can  theory  now  be  seen  t o have made  of  machine  perception.  models o f s i m p l e  process.  a mechanism f o r s e l e c t i n g mechanism  polyqons.  attempts  Otherwise,  First,  search  attempts  joininq  procedure vertex.  first  approved  a line  three-line  1S77b).  the  heuristic  to f i n d  procedure three  likely  i s d e l e t e d from  or  by  a  fcllowinq  (Mackworth,  f a c e o f any  surrounded  as  a most  which i s d e f i n e d a s a view o f a p o l y g o n The  three  recoqnition  h y p o t h e s i s , and  Roberts'  process i s r e a l i z e d  prism.  the  The  activatinq  polyhedron  for  iterates.  contribution  procedure  search  been c h a r a c t e r i z e d  consequences of a s u c c e s s f u l hypothesis success, the  the  polyhedra  i n Roberts'  process  of t h e  T h i s technique  complex  model embodied  out"  further  a  S e c o n d , he  relevant constrained 2:  polyhedral objects used  model. the  p i c t u r e cues This  search  Mechanisms f o r K a c h i n e  to as  bottcm-up space  by  Perception  26  utilizing  evidence discovered  hypothesis.  And  a recognition  task  In  light  of  third, driven  the  criticized  be  the  program  uses only  no  notion  of  the  which o p e r a t e s , the  picture  driven  by  no  suffice  using  Guzman's by  Roberts.  regions local  of  can  now  be  and  models.  that  itself  cannot  scene,  notably,  Cues  mechanism  directly  cycle  methods  A single global polygon  types.  easily faulted, i t s t i l l  t o w a r d s a t h e o r y f o r machine  in  process i s  model s a t i s f a c t i o n .  all  be  recognizing  recognition  heuristic  is are  themselves  but  iterative  research  There  process of  of  cue  There i s for  the  method  must  Although remains  an  perception.  SEE  (1968) work d i v e r g e d  from the  Guzman's program, c a l l e d SEE, line  corner  Host  discovery.  the  p a r t i c u l a r models.  step  Guzman's  and  specific  of  a r t , Roberts•  primitive composition  method, t h e  recognition  viable  was  cue  w e l l , the  lastly,  invocation,  Roberts' research  2.5.2  cues  interpreted  of  amazing f i r s t  of  not  of  f o r the  of  As  And  discovery  shortcomings.  via a  model  recognition  the  i s handled  domain.  possibility  of  discoveries  a single global  discovery,  state  hierarchy  i n the  cue  select a  a h e u r i s t i c procedure.  a single level  recognition.  scenes  p i c t u r e to  process of  number o f  context-free  r e s u l t of  complex  for a  a  by  present  can  completely  the  i n the  drawings junction  into  polyhedral  information. 2:  paradigm  established  attempts to p a r t i t i o n objects  SEE  Mechanisms f o r  employs Kachine  using a two  only pass  Perception  27  method. placed  In the f i r s t between  junction with  adjacent  types that  placing  regions  as a f u n c t i o n of the p i c t u r e  of picture  inhibition  pass  attempts  sharing  two  rules  second  both  l i n k s are  In  order  to  cope  j u n c t i o n s , Guzman used  rules  to  temper  the  t o compute  or  more  the t r a n s i t i v e  links  to moderate t h e p r o c e s s .  pass  depends c r i t i c a l l y  i t sinhibition must  rules  while  link  pass  c r e a t e enough  on t h e " t u n e d "  labelling  c a n be o b t a i n e d ; t h e  links  second  closure  again  The s i m p l e  and t h e r u l e s o f  The f i r s t  the  method  first  method  pass. scene  must  then  unambiguous  results.  be c o n s e r v a t i v e enough  prevent  Both methods, the  joining  background.  Guzman  without  the  use  paradigm  of Roberts.  model-specific procedure  interpretation  o f s e p a r a b l e o b j e c t s to each o t h e r claimed  of  must  models,  that a  SEE  performed  divergence  Y e t , as Mackworth  knowledge r e p r e s e n t e d  i s hidden  inhibition  however,  of  performance  so t h a t a complete pass  using  c l o s e enough r e g i o n s s o t h a t a u n i g u e  hoc  a  process.  inhibition  of  regions  "connectedness"  t h e two r e g i o n s s h a r e .  complicated  The s e c o n d  this  relational  the inherent ambiguity  number o f  of  pass,  from  to  cr the  recognition the e a r l i e r  (1977b) p o i n t s o u t , t h e  i n Roberts*  by Guzman i m p l i c i t l y  i n the  cue r e c o g n i t i o n complicated  ad  rules.  2: Mechanisms  f o r Machine P e r c e p t i o n  28  2.5,3  Huffman and C l o w e s  Huffman generalized in  the  the  scene.  the  scene  (1971)  both  junction in  predicates  have  scenes  objects. on  r e l a t i o n along  each such  An edge must  the junctions  mechanisms  Guzman, t h e y  refrained  domain  Instead,  they  and  satisfied  using  junction  suitable  virtues  that  each  corner  three-dimensional were s e e n  to  type  be  can be  i s further constrained edges i t s h a r e s  extended  for  by  with  other  at  both  o u r knowledge  machine  from  t r y i n g t o perform  only  local  vision.  i n t h e s c e n e domain. simultaneous  a d e p t h - f i r s t search  i n the  junction  as cues t o invoke  of  Unlike  recognition  knowledge a b o u t  junctions  the r e s u l t i n g system o f  type.  parallel They  then  constraints  by  and i n t h e o t h e r ,  a  search.  Unfortunately, the  real  and  i t s ends.  constraints  e m p l o y i n g , i n one c a s e ,  domain  have t h e same s c e n e l a b e l l i n g  used p i c t u r e  binary  breadth-first  appearing  valid  a particular junction  the p i c t u r e  defining  recognition  few  constraints  C l o w e s and Huffman s i g n i f i c a n t l y  picture  shapes  picture  a  containing  t h e way  a  junctions.  only  Such p h y s i c a l  As w e l l ,  binary  independently  Huffman and C l o w e s r e a s o n e d  can  labelled.  unary  later  a s c u e s f o r t h e i r i n t e r p r e t a t i o n as c o r n e r s i n  domain,  polyhedral  of  (1971)  By d i f f e r e n t i a t i n g between t h e  interpretations  unary  Clowes  t h e work o f Guzman t o u s e j u n c t i o n  picture  picture  and  of  like  using  t h e i r p r e d e c e s s o r , b o t h men  explicit  object  2: Mechanisms  models  to  f o r Hachine  neglected guide  the  Perception  29  recognition compiled well,  Huffman  and  types  trivial  given  Consequently, hierarchy  The  Waltz extended  those  Waltz, type  their  new  set  Such  an  program  of  of by  approach  in  more  discovery semantics  is of  recognition  a  a the  cannot  process.  neither cf  hierarchy  Waltz  of  a  cues  elaborated  Guzman, Huffman, and two  important to  the  visual  of  i n c l u d e d knowledge a b o u t  blocks  expanded  considerably  and  a  label for  the  crude  the  junction  labels crack  representation  s e t c r e a t e d a huge number  each* junction  complexity  of  applying  u n a r y c o n s t r a i n t o f what c o r n e r world",  of  directions.  the  labels  set  Clowes.  expanding  labellings  appear i n the " r e a l  (1972)  knowledge s p e c i f i c  however, n o t i c e d t h a t a f t e r the  the  nor  developed  incorporated  possible corner increasing  the  the p i c t u r e  I n o t h e r words, c u e s  of  models,  analysis  e d g e s between a d j a c e n t shadows.  Cue  As  models.  o f t o y b l o c k s by The  cues,  r e c o g n i t i o n mechanism makes use  the t e c h n i g u e s  used.  result  effectively  interpretations.  data. of  are  Algorithm  scene  he  input  interpreted.  object  with  Waltz's  First,  models  primitive  independent  the  this of  associated  world  i n the  scene being  recursively  further  their  Clowes u s e d o n l y  computation  particular  2.5.4  Instead,  i n t o t h e s e t s of p o s s i b l e c o r n e r  junction  be  process.  remaining  the to  type,  of  valid  space.  junction  interpretations set  of  thereby  search each  of  could labels  2: Mechanisms f o r Machine P e r c e p t i o n  30  was  much  polyhedron semantics search  reduced.  Adding  junctions  increased  without  more d i m e n s i o n s the  t o the l a b e l l i n g of  richness  exponentially increasing  Haltz  in  order  developed  constrain  the  breadth-first  a  t o cope  junction  search  search  with t h e expanded filtering  space  before attempting  f o r a global  assignment junction The picture junction,  junction,  a t each  filtering  which  edge w i t h  in  some  that  once f o r each newly  corner  junction  label a  matching  such  by  touring  a  breadth-first  search,  that  such  labelled  of  At  a l l corner  were  type.  static  i s  are  junction  t h e new j u n c t i o n  each  deleted. neighbouring  2:  Then,  and  Next, t h e c o r n e r  junction  neighbouring  of  each  predicates f o r that  lists  junction  s e t of  order.  list  unary  the  "pruned"  s h a r i n g an  t h a t c o n d i t i o n "C" h o l d s .  interpretation  junction,  label  or  That i s ,  having  t h a t d o e s n o t match an edge l a b e l o f e a c h a l r e a d y  neighbouring  This  assigned to  junction,  arbitrary  the  t h e l a b e l s e t s of each this  either  attaches  satisfy  o f each  a d e p t h - f i r s t or  labelled.  Waltz noted  interpretations  is  neighbouring  the algorithm f i r s t  be c o m p i l e d  against  once  further  the notion of a consistency  algorithm operates  junctions  type.  on  there  labelled,  h a s n o t y e t been  interpretations junction  based  to  interpretation.  "C", w h i c h h o l d s t r u e i f , f o r e v e r y  particular  i s  scene  condition,  label  of the  set of labels,  algorithm  algorithm  any  domains  the complexity  filtering  could  the  space.  Second,  a  of  in  a  junction  Mechanisms f o r Machine  an edge labelled  spreading prunes i t s Perception  31  label  set  against  likewise until, network. only it  this  j u n c t i o n and e a c h o f i t s n e i g h b o u r s do  once a g a i n ,  The s i g n i f i c a n c e o f t h i s  a s i n g l e pass through  terminates,  eliminated. each  c o n d i t i o n "C" h o l d s  the algorithm  j u n c t i o n , thereby  Baltz specific  negating  extended  knowledge  and  techniques  i t requires  junctions.  yields  a single labelling  t h e need f o r a s u b s e q u e n t  the  use i n machine v i s i o n  introduced to  the  the f i e l d .  use  of  He d e m o n s t r a t e d t h a t by  scene,  over-constrained  network  representation  use  constraint  which t h r o u g h  the  can q u i c k l y y i e l d  From t h e p r e s e n t  perspective of developing  use o f models o f t h e p o l y h e d r a  relies  on t h e i m p l i c i t labels.  completely  a context-free  entities,  the p i c t u r e j u n c t i o n s given  far  known  abstract  Likewise,  c a n be n e i t h e r about entities  a  a  can  be  propagation  the  process.  computational  H i s program  i t recognizes.  knowledge o f p o l y h e d r a  junction  discovery  wcrld"  W a l t z c a n be c r i t i c i z e d f o r  same d e f i c i e n c i e s a s h i s p r e d e c e s s o r s .  explicit it  of  about a " b l o c k s  a unique i n t e r p r e t a t i o n ,  model o f r e c o g n i t i o n f o r p e r c e p t i o n , the  scene  constraint  information  technigues  for  o f domain  enouqh s e m a n t i c  constructed  When  i n t e r p r e t a t i o n s have been  incorporating an  the  search.  both  propagation  i s that  the s e t of p i c t u r e  a l l i n c o n s i s t e n t corner  Often,  interpretation  algorithm  throughout  cue  computed  discovery  process  Cues a r e , i n f a c t ,  scene,  as  Their  knowledqe  nor c a n t h e y the  Mechanisms f o r K a c h i n e  is  primitive  i n the i n p u t d a t a .  recursively 2:  Instead,  embedded i n t h e  a function of the p a r t i a l  particular  makes no  so  be complex result  of  Perception  32  recognition.  2.5.5  H a c k w o r t h ' s MftPSEE  The and  constraint  others  1977a)  techniques  have been r e c e n t l y q e n e r a l i z e d  to a c l a s s  shown  satisfaction  to  be  o f network c o n s i s t e n c y  more  backtracking  for  efficient search  constraint  satisfaction  basis  a  of  search  tasks  recognition  model  for  of  constraints.  techniques  (1977a) has  f o r the  proqram, c a l l e d according  to  seqmentation b a s e d on from of  by of  simple  the  lines,  primary  the  i n the  map  provided each  by  model  performinq  freehand  the  such  to y i e l d  acute  models locale  a model may establishes  be  anqles, These  that  of the  Cues  consistency maps.  o f an  cue.  features  are  then  The  island The  reqion cues  derived free-ends used  to  p a r t i a l - i n t e r p r e t a t i o n s of  Note t h a t t h e  initially  partial  point c l u s t e r s , cues  provide  interpretation  h i q h l y ambiquous.  constraininq 2:  networks  a set of primary are  the  which  semantics of cartoqraphy.  input sketch  as  n-ary  forms  to  sketch  a very conservative  j u n c t i o n types.  invoke  of  picture features.  sketch and  conventional  as  perception  network  are  automatic  formulated  algorithms  used  (1975,  These  than  (lapsee, i n t e r p r e t s a hand-drawn map the  proqram b e q i n s  recently  interpretation  algorithms.  be  Waltz  Mackworth  machine  constraint satisfaction  Mackworth  by  Network c o n s i s t e n c y  applies general simultaneous  by  methods  which can  problems.  developed  relationships  Mechanisms f o r Machine  However, with  its  Perception  33  geographic The  neighbours  resulting  nodes  are  according  to the cartographic  network c a n be v i s u a l i z e d  pictorial  objects  as a  hyper-graph  ( r e g i o n s and c h a i n s  whose n - a r y a r c s a r e c o n s t r a i n i n g  semantics.  relations  whose  o f l i n e s ) and  derived  from  the  models. Mapsee t h e n a p p l i e s a n e t w o r k c o n s i s t e n c y network  that  progressively  interpretations represented  for  by t h e m o d e l s .  models c h o s e n i s r i c h explicit  the  in  constrained  algorithm  eliminates  various  enough, and  i f  i t s representation,  and t h e a l g o r i t h m  a  the  inconsistent  cartographic  I f the conventional  to  features  semantics of the  given  sketch  the resulting  map  system  may c o n v e r g e t o a s i n g l e  is  i s over possible  interpretation. Mapsee d e m o n s t r a t e s f i r s t can  be  combined  that  these  outside  methods may  the  recognition noted and  that  "blocks  this  perception. although  picture  be a p p l i e d world".  to  that  interpretation  inadequate  perception  task  Hackworth  requires  and  domains cyclic  (19771) has  conservative  picture  satisfaction  among t h e s e  can  then  be  He  segmentation,  f o r a global interpretation, yields appropriate  which  segmentation.  and egg p r o b l e m " f o r machine  invoke  interpretation  technigues  segmentation r e q u i r e s scene i n t e r p r e t a t i o n  Hapsee's i n i t i a l  to  search  recognition  S e c o n d , Hapsee d e f i n e s a  phenomenon " t h e c h i c k e n  primary cues constraint  network c o n s i s t e n c y  model f o r m a c h i n e p e r c e p t i o n .  conversely  calls  with  t h a t cue/model d r i v e n  models.  The  models p r o v i d e s used  to  guide  2: Mechanisms f o r Machine  enough  subsequent an  initial a  more  Perception  3a  c o n t e x t - s e n s i t i v e re-segmentation. until  a complete  consistency structure  algorithms  for  by  most  tend  focusing  on  process  be  iterated  Third,  network  a  uniform  syntactic  control  to  network  converge  those  representations. towards  nodes i n t h e  scene  interpretation  that  is  c o n t e x t - s e n s i t i v e re-segmentation, thereby richer  cues  for  the  s e e n as  a  means  of  thereby  avoiding  the  Mapsee u t i l i z e s still  be  intepretation  next c y c l e .  benefits 1975).  as  and  "chicken  modular  part of  models  can  easily  As  well, since  in  the  egg  to  technigues  of  are  an  interpretation However,  the  and  incrementally  added  during  d e c l a r a t i v e models, the  use  2:  scene  of  purely familiar  {Wincgrad,  of c o n s t r a i n i n g  New  c o n s t r a i n t s and  and  deleted  system  the  models.  representation  domain s p e c i f i c  must  re-segmentation.  e x h i b i t the  sets  since  cues  m o d e l s , network c o n s i s t e n c y  paradigm.  a l l o f the  by  as  a  mechanism i s  encourage the  realized  drive  iterative  o f c u e s and  that  new  semantically  recognized  representations  a  yielding  problem".  detected  a hierarchy  among o t h e r  computational be  and  features  limitations  Since  «hich  computes  used  into  1 1  more complex e n t i t i e s  knowledge  relationships  This  "bootstrapping  Network c o n s i s t e n c y declarative  unigue  network  n o n - h i e r a r c h i c a l d e s c r i p t i v e models,  primitive  They c a n n o t be  a  ambiguous.  Each c y c l e i n Mapsee's r e c o g n i t i o n p r o c e s s approximate  may  obtained.  declarative  algorithms  interpretation  is  provide  searching  Consistency  remain the  interpretation  This  is a new  from the  very models  network.  knowledge i s embodied  i s portable.  Mechanisms f o r Machine  It  can  be  Perception  35  easily  applied  semantics  to  other  expressable  constraints.  as  the  a  On t h e o t h e r  models f r o m t h e p r o c e d u r e s forces  recognition system  used t o search  use o f a s i n g l e  such  search  models i s p o s s i b l e . of  a  uniform  models and schema-based  2.5.6  has  simultaneous  search  structure method, t h e  domain-specific  knowledge  methods  associated with  particular  (1977c) h a s n o t e d  method  advocated  t h e network  the limitations  fornon-hierarchical descriptive  "exploring  control  strategies  for  theories of perception".  F r e u d e r « s SEER  Freuder for  exhibit a  No  Mackworth  search  mutual  global syntactic  algorithm.  heuristic  of  which  hand, t h e d i v o r c e o f t h e d e c l a r a t i v e  network c o n s i s t e n c y as  tasks  (1976)  schema-based  with  the  perception..  representations  specification  hammer  argues that  algorithms semantics  of  control  represented most  w h i c h do n o t r e l y of t h e scene being  knowledge  about  as  recognition  is  primarily  structures  concerned  for  gray-level schemes  on computed perceived.  employs t h e d i s c o v e r y o f p a r t i a l general  that  a r e c o g n i t i o n model  H i s p r o g r a m , SEER, r e c o g n i z e s a s c e n e o f  machinist's Freuder  has r e c e n t l y developed  To t h e  to  guide  common  video  data. ccntrol  results  or the  contrary,  hammer components  hammers  a  employ  partial  machine  combined  the  SEER with  recognition  process. In  SEER,  knowledge  i s  represented  2: Mechanisms  in  two  f o r Machine  forms  of  Perception  36  hierarchical about  semantic  hammers i s r e p r e s e n t e d  networks, instance  whereas is  network.  The  nodes  between t h e s e  the  in  a  hammers, s u c h  On  the  instantiated  s t r u c t u r e and the  GK  General  structures to  schema  knowledge called  a particular  instance  as  handles  and  these  items  other  heads.  hand, a PK  i n s t a n c e o f a GK  may  a  concept  PK  of  visual  The  links  establish  network  GK  hammer  called  network r e p r e s e n t i t e m s  nodes r e p r e s e n t how  partially  Both  schema  specific  o f a GK  other's recognition.  its  structures.  in  knowledge  represented  knowledge a b o u t  a  network  each  represents  and  inherits  procedures. and  PK  l e a v e s o f e a c h PK  instances  of  the  particular  PK  tree  networks  tree  are  specific  GK  structure  p r o c e d u r a l methods c o n c e r n e d  with  form t r e e d a t a procedures  which  concept. represent  structures.  The the  ftt  search leaves  state  the r e c o g n i t i o n of  for of  of  a the  t h a t schema  instance. In  Preuder's  top-down and feature  model,  bottom-up s e a r c h  recognition  proceeds  w i t h i n a PK  structure.  i s d i s c o v e r e d , i t i s used a s  hypothesis  of h i g h e r  part.  new  A  PK  conjectures structure  is  be  created to represent  this  new  exploration  resulting Since the  the c r e a t i o n of new of  their  i n the c r e a t i o n of subordinate a number o f c o n j e c t u r e s c a n  c o n t r o l structure question 2:  the  may  permits  top-down  for  new  feature  As  the  both  When a  bottom-up e v i d e n c e  of which  possible relationship. the  well,  using  be  conjectures  subgoals  thereby  conjectures. active  simultaneously,  c e n t e r s about which c o n j e c t u r e Mechanisms f o r Machine  to  Perception  37  explore  next.  The  priority-gueue a  priority  changed  it  by  the  c h o s e n by  T h e s e new is  he  He  with  focused  as  exploitinq  the  by  may  monitor  attempts  to  be  then  ccnfirra  SEES f o l l o w s a  scheduler t h e n be  cyclic  i s explored.  exploited  conjectures  a t t e n t i o n on  c o n t r o l of  the  has  combined  the  If  resulting  as  new  priority  o f cue  usinq  subgoals  and  use  invoked  important  PK  queue  of  realizes of  the  a schema-based  models.  scheme t o  the  aspect  during  multiple active  by s i m u l a t i n q  consequences  an  processor  queue m u l t i p r o c e s s i n q  top-down s e a r c h  conjectures  assigned  methods.  the  bottom-up s e a r c h  realizes  and  are  priority  A global  higher  a hierarchy  defines a p r i o r i t y  SEEB  their  faailiar  repeated.  process.  top-down and  i s the  s c h e m a t a a r e added t o t h e  work has  representation  the  i t may  of suggested  machine p e r c e p t i o n ,  search  defined  i s achieved,  process  queue and  of i t s p r o c e d u r a l  A conjecture  SEES  Conjectures  conjecture  model  Freuder*s of  the  priority  one  hypothesis  in  scheme.  recognition  structures. and  on  used  r e c o q n i t i o n process.  highest  conjecture the  placed  the  activating  process.  in  when  the  The  the  multiprocessing  durinq  selects  mechanism  As  veil,  inteqrate  hypotheses.  exploration  bottcm-up  search  successfully  of by  recognized  conjectures. As  was  simulate It  is  parallel  pointed  parallel a  out  search  syntactic, execution,  and  f o r KBL,  the  use  of  multiprocessinq  s u f f e r s from a number o f  non-deterministic is  inept 2:  at  method realizinq  Mechanisms  to  deficiencies. of  simulatinq  intelligently  f o r Machine  Perception  38  guided  parallel  search.  compute a p r i o r i t y egg  p r o b l e m " i n two s i g n i f i c a n t  the  priority  procedure.  And, more i m p o r t a n t l y ,  discovered  i n t h e scene to help  assigned  to  a  this  decide  d e c i s i o n has  essentially parallel  search  recognition  the  that  A  schedules  discovery  process  the existence  to  of  schedule  o f those  2:  of  This  very  placed t o that that  information  processes  the information  mechanism  being local  f o r a process  discovered.  backwards.  utilizing  exploit  been  before which  a i s  to run.  i s , i n effect,  processes. required  mechanism  i s needed  This t c make operates  f o r simulating  processes  semantically  particular  cues  those  and  i t assumes t h a t a  method r e q u i r e s  scheduling  be made b e f o r e  the "chicken  t o a process  process  a non-deterministic must  First,  some p r o c e d u r e  on i n f o r m a t i o n  procedure t h a t p i c k s a p r i o r i t y  computation this  ways.  queue b a s e d o n l y  be  computinq  manifests  a global priority  priority  The  reguirement t h a t  f o r a new p r o c e s s  p r o c e d u r e can a s s i g n on  The  processes  by  during  the  which  can  cues.  Mechanisms f o r Machine  Perception  39  CHAPTER  3.1  3: A PROCEDURAL MODEL  Introduction  This chapter  presents  t h e development o f a p r o c e d u r a l  o f r e c o g n i t i o n f o r schema-based motivated the  by b o t h  first  perception overview number  techniques will  3.2  chapter  and  examined  its  The  the c h a r a c t e r i z a t i o n of perception the  aspects.  for realizing  be d i s c u s s e d  current  in  be g i v e n Then  in  First,  order  to  model  is  outlined in  methodology  i n the second chapter.  o f t h e model w i l l of  representations.  model  of  machine  an  informal  highlight  i n the remainder o f the  t h e model a s a c o m p u t a t i o n a l  a  chapter, mechanism  detail.  Model O v e r v i e w  A first  theory chapter  of as  machine having  knowledge  and  a  recognition  on t h a t  set  perception both  of  a  search  was  c h a r a c t e r i z e d i n the  formalism  for  mechanisms  for  representing performing  representation.  3:  A Procedural  Model  40  3.2. 1 Schemata  In t h i s schema  i s  m o d e l , knowledge i s a  modular  represented  object, event,  or situation.  manifest  three  First,  knowledge a b o u t facts  form  attached  forms.  the concept  that the  procedures.  S e c o n d , e a c h schema  knowledge t o g u i d e  concept.  And t h i r d ,  the search  schemata form  creating hierarchical  complex c o n c e p t s schemata  and  t o be r e p r e s e n t e d  provides  an  example.  hypothetical that  used  slots  value  an  3.1  system.  bicycle  (Minsky,  (often  a  name),  a  the s l o t .  to  create  a  other  (1977).  a  This  schema  allows  as n e t w o r k s o f mechanism  schema  to  either another  stereotype the  for  a  i s s i m i l a r to  T h i s schema  of information  bicycle,  schemata  (Quillian,1968) .  containing  When t h e b i c y c l e  and  procedural  retrieval  illustrates  what t y p e  instance of a particular  copied  with  by composition  pointer  Such  o f data  and c o n s i s t s o f a s e t o f named each  factual  f o r t h e schema's  T h e n o t a t i o n employed  1975),  indicating  process  is  represented  may c o n t a i n  relations  networks  by Bobrow and H i n o g r a d  expectation fill  Figure  vision  a stereotypical or  and may be  encyclopedic  about  represents.  network s t r u c t u r e s .  analogous to that o f semantic For  schema  A  knowledqe  p r o c e d u r a l l y , o r a s some c o m b i n a t i o n  heuristic  thereby  That  known  e a c h schema c o n t a i n s  a d e s c r i p t i o n o f the concept  declaratively,  schemata.  representation of everything  some c o n c e p t , in  as  a  represents relations primitive  schema, c r an  may be  used  to  i s used t o r e p r e s e n t  stereotype  i n s t a n c e and i t s s l o t s , 3:  schema  is  initially  A Procedural  Model  41  NAME:  BICYCLE  FRONT-WHEEL:  REAR-WHEEL:  (A WHEEL DIAMETER = (RANGE 19 27) WITH (A T I R E WIDTH = NARROW) TYPE = SPOKED CONNECT (AND FRAME CRANK SET) (TD-METHOD FIND-BIKE-WHEEL) (BO-METHOD FOUND-BIK E-WHEEL)} (A WHEEL DIAMETER = (RANGE 19 27) WITH (A TIRE WIDTH = MRROW) TYPE = SPOKED CONNECT (AND FRAME CRANKSET) (TD-METHOD FIND- BIKE-WHEEL) (BU-METHOD FOUND-BIKE-WHEEL))  FRAME:  (A FRAME TYPE = DOUBLE-DIAMOND (TD-METHOD FIND-BIKE-FRAME) (BU-METHOD FOUND-BIKE—FRAME)}  CRANKS ET:  (A MECHANISM TYPE = CHAIN-DRIVE WITH (A PEDAL-CRANK) MAY-HAVE (A MECHANISM TYPE =DERAILLEUR) (TD—METHOD FIND-CRAKKSET) )  STEERING-SET:  ISA:  (A  MECHANISM  TYPE = STEERING-FORK WITH (A HANDLE—EAR) (TD-METHOD FIND-STEERING-SET) )  VEHICLE  INSTANCES:  NIL j  Figure  3.1: B i c y c l e  Schema  3:  A Procedural  Model  12  containing  expectations,  information This  specific  are  replaced  bicycle  schema  f e a t u r e s o f t h e r e c o g n i t i o n model. that  the  each stereotype pointer  o r by s i m p l y  knowledge  about  wheel,  rear  a  transmission mechanism  slots  called  structural  a  relations  recognize  recognized  3.2.2 Schema  a  form  Complex  schema  A  bicycle  o f t h e schema  to  By naming  either  by  a  represent  composition  i s composed  of a front  double-diamond  steering-set. a  frame,  a crankset,  instances  of the  of  that  power fork  perception,  the  schema  define  concept  that  concept.  o f i t s component  a  and a s t e e r i n g  For  stereotype  those can  be  A bicycle i s  p a r t s composed  in a  the g e s t a l t of a b i c y c l e .  hierarchical  stereotypical  which  networks  concepts  are a composition  by  sub-schemata.  a  composition  composition  referred  the  called  in  slot  Hierarchies  Schemata  schemata  in  by t h e d i s c o v e r y  way t h a t r e p r e s e n t s  ways.  be  and f u n c t i o n a l a s p e c t s  to  The f i r s t  a number o f  i t s name.  bicycles. wheel,  illustrates  o f t h e schema i s BICYCLE.  i t can  using  mechanism  composition  used  name  schema,  The n e x t f i v e  by  t o t h e b i c y c l e as i t i s d i s c o v e r e d .  stereotype  specifies  systematically  The r e s u l t i n g  hierarchy.  This  are  o f other  of a l l possible instances  two  significant  represented  concepts  hierarchical static  in  by  represented  structure i s called  hierarchy  represents the  of the c l a s s . 3: A P r o c e d u r a l  Model  43  Figure  3.2  stereotypical a  frame,  generic  shows  various  components  represented  by  stereotypes  is by  be  and  hub  Figure an  the  and  each  relation  that  with  "part-of" relation search  instances  specific  i l l u s t r a t e s the  sub-schemata,  within the  of  schema. and  is  schemata  This  specified stereotype  In  At  o f an  the  top  uninstantiated  this  generic  instance  tire the  stereotype  model For  with  to  A  instance  i n the  have  WHEEL  one  or  an  performing  of  each more  inverse  i s osually called  that may  way.  may  the  bottom-up  form  Each  have many  schema  partially  themselves f u n c t i o n  a number o f  manner, schemata  instance  relation  second  These i n s t a n c e s  s c h e m a t a each h a v i n g  instances.  these  network.  a s t e r e o t y p i c a l concept instances.  objects  assembly.  schemata.  relation  essential  of  inclusion  sub-schemata  Schemata f o r m h i e r a r c h i e s i n a represents  a specific  between  a composition these  these  components  c e n t r a l hub  by  3.2  schema h a v i n g  of  Each w h e e l  by  relation  Each of  class  represented  the  wheels,  For i n s t a n c e , the  and  well.  also  of  generic  a l l wheels.  schemas as  inverse composition  stereotype  own  sub-schemata.  rim,  for  In t u r n , e a c h o f t h e  its  of a t i r e ,  type  mechanisms.  schema.  class of  be  composed  stereotypical  of  stereotype  wheel w i l l  of a p a r t i c u l a r  a  composed  composed  particular  rim  form  hierarchy  B i c y c l e s are  mechanical  a stereotype  schema r e p r e s e n t s will  composition  b i c y c l e schema.  and  represented  a  more f u l l y  instance  specified  hierarchies^  h i e r a r c h y i s a schema r e p r e s e n t i n g  concept.  Each  of 3:  its  as  an  sub-schemata  A Procedural  Model  Figure  3.2:  B i c y c l e Composition  Hierarchy  3:  A Procedural  Model  45  instances  represent  partially  concept.  Each  represents  more f u l l y  of  the  of t h e  referred  t o as  "ISA"  each  interior  At partially  the  of a  hierarchy  represent  whereas,  specified  instance  more  indicates  yet, the  that  this  no  instances of  INSTANCES These  facilitate creation  concept  composition  instances are  also  hierarchy,  the  non-deterministic than  top  its  of the  possible  last  parent instance  instances,  represent  s m a l l e r , more  two  of  as  slots  Since b i c y c l e s of  vehicle,  instance  t h i s example,  i t s own,  hierarchies  hierarchies representing  of  of  bottom  the  the  are  the  instances  ISA  of another  schema  relation  stereotype,  b i c y c l e schema has,  i n d i c a t e d by  the  NIL  value  as for  relation. two  Composition  the  hierarchy.  In  a  the  bottom  schema i s an  VEHICLE schema.  the  concepts.  schema,  general  at  1975).  concepts  classes the  c l a s s e s of  an  establish  of  turn,  instance  Schemata n e a r  nearer  bicycle  an  instances, in  specified  represents  class  large  the  in  that  hierarchies  (Fahlman,  schema  l e v e l above.  schemata  the  node  of  until,  Instance  hierarchies  a smaller  stereotype  In  tree.  instantiated  description  the  instances  r e s u l t i n g t r e e s t r u c t u r e , completely of  of  occurrences  descendants of these  specified  become l e a v e s  fully  specified  a  data  conceptual  bicycle  as a t e m p l a t e  Each o c c u r r e n c e  different  static  complex  particular  hierarchy  schema i n s t a n c e .  are  serve  instance from  o f an  which  structures  that  objects.  The  uses the b i c y c l e to c o n s t r u c t  expectation 3:  purposes.  for a  A Procedural  the  frame, Model  46  mechanism, o r w h e e l i n t h e b i c y c l e s t e r e o t y p e by  an  instance  (perhaps  only  partially  will  be  replaced  specified)  of that  stereotype. In  contrast,  structures  that  mechanism  upon  instance  provide  hierarchies  a  primary  which t o base s e a r c h  in  an  maintains the For  instance  an i n d e x  schema's  hierarchy  o v e r t h e schemata  network.  l a r g e r networks, each  sub-instances  based  syntactic  pattern  indexed  organized perceived  a  in  made  from  a  priori  Cues a r e r e c o g n i z a b l e observed  an  index  the  of i t s  cues.  structure f o r  network.  in  analogous  1963)  and the  most S  The  artificial  Raphael,  1974).  a t r e e s t r u c t u r e d d a t a b a s e by common semantic  mechanism  i s found i n the  where, f o r i n s t a n c e ,  hierarchical The  that  of a l l i t s instances.  (Bobrow  cues  database used  p r o p e r t i e s o f each c l a s s c f p l a n t l i f e . not  data-bases,  and r e c o g n i z a b l e  patterns  taxonomy  cues.  For s m a l l  list  in  Each  schema  (Feigenbaum,  languages  A similar  botanical into  EPAM  of  programming  elements.  Linnaean  retrieval  retrieval  are  concepts.  stereotype  maintains  observable  mechanisms i n c l u d e  intelligence  a  of  becomes an i n v e r t e d i n d e x  associative  associative  Patterns  schema  on  instance hierarchy then performing  i s  c a n be a s i m p l e  data  retrieval  of a l l i t s instances.  index  dynamic  associative  These h i e r a r c h i e s a r e viewed as taxonomies node  are  are  plant  indexed  by  physical  The c h o i c e  life i s easily  observable of  cues  is  c o n s i d e r a t i o n s , but f o r convenience.  features  o f each  class  that  are  easily  and c a n f u n c t i o n a s r e l i a b l e d i s c r i m i n a t o r s . 3:  A Procedural  Model  47  In by  t h i s r e c o g n i t i o n model, i n s t a n c e  cues  class.  schema.  all  easily  be  The  wheels  instances. can  are  F o r example,  wheel of  that  in  as  the  a  list  makes no  i n s t a n c e used as larger  advantageous. for the  the  wheel i n s t a n c e  hierarchy  are  wheels t h a t can  3.3  hierarchy  effectively example,  of  wheels a r e used.  Neither indexed  The  choice  arbitrarily  based  wheels usinq  such a v a i l a b l e  observed  wheel's  Each o f t h e s e recoqnizable  on  rim,  the  database  bound  necessity  to  of  of  observable  a  this  searching  wheel i n s t a n c e .  the  the  inverted  usinq  be  features  index  an  Such  of  the  three the  scheme.  observable  different  features  of  features  the  of  structure  made  hierarchy from  a  and  as  width of i t s t i r e , Linnaean  the and  nor  priori  index  d i s c r i m i n a t e amonq  information  perception  of  observable  is  to  Indices  classes  features  ability  is  various  s t r u c t u r e of  both  structure  a s s o c i a t i v e database  this  readily  f e a t u r e s , as i n t h e during  the  class  specified  advantage  d i s c r i m i n a t e amonq  this  considerations.  The  illustrates  chosen t o  of  any  the  wheels.  choice  by  the  the  cues.  of  the  In  for  fully  instances  a particular  of  databases, Figure  of  stereotype.  use  hierarchy  and  indexed  stereotype  wheel i n s t a n c e s , t h e  list  sequentially to find  desired For  partially  i s balanced  search  instance  number o f  simple  a blind  f e a t u r e s of a  wheel schema r e p r e s e n t s  all  wheel  scheme»s s i m p l i c i t y the  an  stereotype  a small  organized  variable  consider  including  For  recognized  h i e r a r c h i e s are  type  is  various of  the  i t s diameter.  taxonomy,  is  a  cue  process. 3:  A Procedural  Model  48  Figure  3.3:  Indexed  Instance  Hierarchy  3:  A Procedural  Kodel  3.2.3  Recognizers  Perception active  i s not  process  (Bartlett,  a passive r e f l e c t i o n  motivated  1932).  as  a  other  In an  instance  more p r i m i t i v e this  for  individual  recognizer  in  process  specific search  search  schemata t o e x p l o i t effective The an  task  that  a seguence  of  i s represented  of r e l a t i o n s h i p s  among  stereotypical o f such  knowledge  tailored  methods special  recognizers. to  from s e n s c r y  guide  search be  relying  every  techniques  that  with are  their  of  domain  on  general  schema  associated  the  Methods a r e  exploitation  for  an  observations.  a method.  of  be  Every  f o r the r e c o g n i t i o n of  Instead  can  concept,  necessary  Methods a l l o w t h e  the  to  in  the  particular  particularly  f o r t h a t schema. e x p e c t a t i o n s a s s o c i a t e d with  important  role  stereotype  i n the r e c o q n i t i o n process.  p r o p e r t i e s o f e a c h schema instance  its  techniques.  specific  an  desires  schema i s c o n s i d e r e d  knowledge i s c a l l e d  methods t o c o n d u c t  system,  i s composed  f o r i t s concept  specifically schemata.  from  T h i s concept  a system  active  Such a c t i v e h e u r i s t i c  associated  concept  model, each s t e r e o t y p e  schema c o n t a i n s t h e  recognition  but  concepts.  recognizer  procedures  a  world.  which  active  recognition  is  of a perceived  o b s e r v a t i o n s o f the  schema  p l a n s , e x p e c t a t i o n s , and  Perception  composes a d e s c r i p t i o n external  by  of s e n s a t i o n  that  proceeds towards beinq  chanqe fully  as  schemata They are  the  specified. 3:  play  dynamic  uninstantiated At e a c h  point  A Procedural  Model  50  in  the  process,  additional From  a  schema's  different of  found  from  next  the  perspective,  they  world:  i t expects  may  be r e p r e s e n t e d  values  mechanisms.  information  to  the  expectations. procedural Servants In  these  which  may  rear  expectations  these  siailar  to  cf  a diameter  expectations  are  the  specify  their  a  spoked  associated  the  c h a r a c t e r i z a t i o n of  3.1,  types  expectations are of  schema  i n the s l o t .  a top-down  Each  method  and  F o r example, both  bicycle  schema  wheel with  27 i n c h e s .  the  contain  a narrow  Attached  methods t a i l o r e d  of  (1977).  of the type  i t . the  of  different  or both  of  between 19 and specific  recognition  two  replace the expectation  slots  for  of i t s expectation.  of  Figure  with  of  procedural  to search  by Bobrow and W i n o g r a d  schema  wheel  c r be  top-down and bottom-up  to continue  of  associated  that  attached  requirements  e x p e c t a t i o n s has e i t h e r  front  next  are d i s c o v e r e d , o r they  as d e c l a r a t i v e s p e c i f i c a t i o n s  method  having  are  bicycle  bottom-up and  when t h e y  satisfaction  and Demons p r o p o s e d  represented  of  on  The n o t i o n s  methods  the  instances  based  schema's  d e f a u l t values to  Top-down methods a r e d e s i g n e d  satisfy  schemata  the  t o occur  by s i m p l e  methods use b o t h  Bottom-up methods a r e d e s i g n e d their  i t s recognition.  represent  by complex p a t t e r n s w i t h  These a t t a c h e d  what  1975).  be r e p r e s e n t e d  be r e p l a c e d by o b s e r v e d  search  represent  E x p e c t a t i o n s embody t h e n o t i o n  (Schank & A b e l s o n ,  Expectations  methods.  what  observation.  plan or s c r i p t  may  expectations  i n f o r m a t i o n i s r e q u i r e d t o complete  knowledge  a  the  to  tire these  f o r the r e c o g n i t i o n  3: A P r o c e d u r a l  Bodel  51  of b i c y c l e wheels. method, can  different  upon t o a t t e m p t  The  second  a  in  i n s t a n c e , then  the to  Perception  search  slot  tthich  to f i l l  the  the  wheel  FO0ND-BIKE-HHEEL, It will  expectations  with  t h e new  recognition  t h e knowledge  perception  t o sensory cannot  gained  is  be  a  invoked  for a bicycle r e p l a c e the  recognized process  wheel  for  by t h e d i s c o v e r y  completely  i s not a  search  mechanisms.  the  c f the  (1975) have c a l l e d data-driven.  to permit  and these  by  utilize  data-driven two  Goal-directed  search.  modes, or  to r e l y  process.  solely  can the search  purely an  on be a  Sensory data-driven  integration Bobrow and  conceptually-driven 8 Procedural  cf  Norman  conceptually-driven  3:  an  bases,  observation.  a r e l i a n c e on must  knowledge  goal-directed  Neither  driven  process.  base t o a s s i g n  large  top-down  mechanisms.  Machine p e r c e p t i o n  goal-directed  For  i s f a r t o o complex  bottcm-up process  i s t o o ambiguous  deterministic  o f a knowledge  input.  be a s i m p l e  knowledge o f t h e w o r l d  goal-directed  both  wheel  r e q u i r e s the search  interpretation  data  procedure  Non-Determinism  Unfortunately,  Our  One  wheel.  3.2.4  this  specified.  I t s function i s to f i r s t  continue  utilizing  search  called  wheel m a t c h i n g t h e s p e c i f i e d  expectation  new  are  bottom-up s e a r c h .  w h e e l h a s been r e c o g n i z e d .  bicycle  top-down  method,  procedure f o r performing when  methods  FIND-BIKE-WHEEL, i s a h y p o t h e s i s - d r i v e n  be c a l l e d  slot.  Two  and  search Kodel  52  provides active the  guidance  b a s e d on  being  attempted,  hypothesis  utilizes  the  domain-specific whereas  o b s e r v a t i o n o f cues t o  knowledge  data-driven  intelligently  of  search  select  likely  hypotheses. In  this  recognition  hypothesis-driven recognition  and  process.  top-down s e a r c h  model,  data-driven  of a composition  from  sensory  their  sub-schemata as  bicycle satisfy  i n p u t and  order  stereotypes  to recognize  a bicycle  to look  expectations.  likely  order.  recognize suitable those  s c h e m a t a as To  realize  networks  To  Each of  do  bottom-up, that Since  involves  a  attempt  to  on  observations the e f f o r t s  u s i n g top-down s e a r c h ,  by  so  i t will its  invoke  of  calling  the that  its  expectations  methods w i l l t h e n  data-driven  on  the  the  recognition  methods, t h e s e  methods must be  hypotheses  concurrently.  methods a r e r e a l i z e d  search  m u l t i p l e h y p o t h e s e s be  these  multi-processinq  making  the  attempt methods  own in to of  subgoals.  representing  techniques  perform  Schemata  calling  each o f  these  sub-schemata  reguires  simultaneously.  by  both  f o r sub-schemata i n s t a n c e s  top-down methods a s s s o c i a t e d w i t h some  to  recognition  hierarchy.  by r e c u r s i v e l y  employ  subgoals.  schema a t t e m p t s its  may  methods  Hypothesis-driven  recognize i n s t a n c e s of t h e i r  In  schemata  allowed In  as c o n c u r r e n t  mechanism  are  the  conducted  bottom-up  by their  search,  processes.  In  this  for simulatinq concurrent 3:  schemata  allowed  of  to apply  in  to  exist  schemata procedural heuristic therefore, model,  a  methods i s  A Procedural  Model  53  based  on  the  particular  or  new  deductive  method  as a process,  of  the  T h e method  expectations  schema's  may t h e n  for  the  suspend  t o these  such  as  is  expectations  more  and  evidence  supporting  matching  i s  resumed  by t h e d i s c o v e r y  set then  those  resumed.  evidence  method  and  Methods  discovered  renewed  suspending  is  their  t h e m s e l v e s and Since  expectations,  possibly  the discovery o f evidence  The  method a s s o c i a t e d  with  i t s schema's  non-deterministic script  has  until those  of the  the  expectations  recognition.  of  the  methods  to  may be a t t a c h e d t o represent  diverse  The c h o i c e o f s e a r c h  i s then  chosen  expectation. activated to  A b r a n c h i n t h e schema's  taken. f o r e x a m p l e , a wheel i n s t a n c e  i n the input scene.  either  a  instances,  but i s data-driven,  that expectation  following situation,  been r e c o g n i z e d  then computing  matching a p a r t i c u l a r  has been  suspended  a c y c l e o f being  ether  expectations  hypothesis  the  e v o l v i n g schema  m u l t i p l e methods  these  by  In  probability  i t e r a t e through  about  i s n o t made by b l i n d  continue  i t sunrealized  matching  discovered,  p o s s i b l e d i r e c t i o n s f o r a schema's s c r i p t . path  creating  new e x p e c t a t i o n s  of matching e v i d e n c e ,  of expectations  expectations.  multiple  by  success.  When s u c h  new  the  until  prove d i f f i c u l t to  describe  I t remains attached  time  stereotype  i t sexecution  schema t h a t  A  applies i t s heuristic  expectations  objectives.  schema's  scheduling.  t o t h e r e c o g n i t i o n o f i t s schema's  more  achieve.  of  method, r e a l i z e d  techniques one  notion  front  I t s f e a t u r e s match  or r e a r wheel s l o t s 3:  A Procedural  the  c f the Model  54  bicycle these  schema.  Both o f the  expectations  may  wheel's e x p e c t a t i o n This has  bottom-up  wheel i n t h e an  method w i l l to guide  Since the  steering-set,  the  of  For t h i s  the  known  it  based  Typical  of  computes  on  that  the  discovery  of a  specific  wheel  instance.  wheel i n t h e  scene,  expectations  will  for  new  bicycle  The well, these resumed  method  that a front  this  i s normally  with  the  known  bicycle.  Such  realized  i n the  of  might  be  be  case  has  of  for  the  discerned.  connected must be  i s the tc  the  above  for bicycles. on  does  ccntrol  included  a c t as c o n s t r a i n i n g i n f o r m a t i o n  a  schema.  vicinity  expectations i t  as  method  retaining  orientation the  the  its  bottom-up  of  must  of  wheel  of  a particular  which  which  Its  parts  the is  with  set  that  invoked.  the  These  the  search  components.  method  to these  as  fact  information  information  steering-set  its  knowledge  new  expectations  front  neighborhood  Instead  a  assume t h a t t h e  remainder of  discover significant  wastefully, bicycle  i n the  assume t h a t  instance.  with  a CONNECT r e l a t i o n  method a s s o c i a t e d  example, we  associated  search f o r ether  common-sense  wheel  the  wheel has  method l o o k s  bottom-up p r o c e d u r a l  easily  front  the  He and  exploit  i n p u t scene f o r the  application  not  activated.  i s matched f i r s t  been d i s c o v e r e d  bicycle.  be  bottom-up methods  suspends i t s e l f  new  expectations to continue  expectations. is  and  possibly other  I f evidence  discovered,  its  matching  suspended  i t s techniques., u s i n g t h e  3:  methods,  new  as  one  of  method  is  information.  A Procedural  Kodel  55  3.2.5  Recursion  Perception some  concept  perception be  i s a l s o a r e c u r s i v e process. may b e used  features  abstract  internal  When  a  method  fully  specified  level  cue.  data drive  of  instance  (Havens,  as  or they  schema  present  and  the  can be  instances. for a  complex  high  concepts,  "chicken  and  egg  S t a r t i n g at t h e sensory  i n t h e i n p u t c a n be  recognition  used  of l o w - l e v e l  level  concepts.  cues s t i m u l a t i n g  recognition  mechanism depends on t h e e x i s t e n c e  of  the  inverse  composition  r e l a t i o n s ( P a r t - o f ) i n t h e schemata  network.  When a  k n o w l e d g e o f what h i g h e r it the  might  this  extracted methods.  instance  of those  Attempts a r e then  the i n p u t  In the vision and  bottcm-up  uses i t s hierarchies  made t o  match  schemata.  model, p r i m i t i v e c u e s a r e d i s c o v e r e d  from  segmentation  completed  schemata i n any c o m p o s i t i o n  p l a u s i b l y be p a r t o f .  expectations In  the  This  the  of  has been r e c o g n i z e d ,  interpretations.  to  hypothesis  concept  abstract  can  becomes an i n t e r n a l  1976).  t h e n behave a s h i g h e r more  world  cues  a l l i t s schema's e x p e c t a t i o n s  f o r avoiding  p r i m i t i v e cues  These f e a t u r e s  external  cue i n t h e  model,  c u e s t o be a r b i t r a r i l y  realized  hypothesis  In this  represented  concept, that  f o r schemata  the  the  features  By a l l o w i n g  level,  concepts.  satisfies  a mechanism i s problem"  r e c u r s i v e l y a s an i n t e r n a l  o f more a b s t r a c t  primitive  The r e c o g n i t i o n o f  image u s i n g  context-free  domain, s u c h t e c h n i g u e s  line-finding  from  algorithms.; 3:  features  cue d i s c o v e r y  include  region  The p r i m i t i v e c u e s A Procedural  Model  56  are  matched  thereby these  against  activating methods  hypothesis. recognized inverse  then  one  process  illustrate, becomes  the  b i c y c l e schema.  as  type  and  the  should  of  its  these  to  schemata o f  by  both  Each  own  attempt  to be  the  using  its  match  the  part.  This  a bottom-up r e c o g n i t i o n  primitive  of  schema's  methods s u c c e e d ,  which i t may  be  schemata  bottom-up methods.  becomes a h i g h e r - l e v e l cue  seen t o  context-free  when a wheel i s  found  in  an  i n the  higher  a b s t r a c t cue  The  size,  fact  bicycle is a likely be  invoked.  itodel  cues  and  scene,  its  successful  will  perhaps,  in  containing  realizing  features,  and  that  Then, i f  the  methods  a matching  process  scheira  recognizing a bicycle instance,  become a h i g h e r  cue  this  hypothesizing  example,  in  the  recognition a  class  such  indicates  its  bicycle  of  is that  process, of  scenes  bicycles. ,  Earley's  an  in  hypothesis  bicycle's expectations  hypothesis  expectation.  the  i t s recognized  T h i s i s c h a r a c t e r i z e d as  eventually instance  that  match t h e  and  In  low-level  confirm  more  is  between cue  3.3  of  c o n t e x t - s e n s i t i v e cues recognized r e c u r s i v e l y .  discovery  that  to  knowledge  of higher  schemata d r i v e n  To  or  schema i n s t a n c e  recursive  attached  attempts  composition  abstract  expectations  their  When  expectations  for  the  Algorithm  attempt this  to  model,  develop the  computational  author  mechanisms  investigated 3:  the  A Procedural  for  formal Hodel  57  recognition parsing the  models u s e d  domain  perceptual  can  that  assigns  on  hierarchical  phrase-structure recursive  for  of E a r l e y  perspective  any  2  In  bottom-up  been  is,  where n i s t h e not  In  provides  studying  bookkeeping processes was  length  require  Appendix-A  function  his  the  simultaneously  of  that a  to  operate  handle  space  an  from  algorithm and  3  is  directly  The n  from  is  order  Morever,  it  non-determinism.  of t h e  alqorithm.  as  a  simulation  of  multiple  bottcm-up  same i n p u t  sentence,  (the  attempts t o recognize  a complete  the  of  on  the  dynamically grammar)  The  a set  a  parsing  not  algorithm  and  well  properties  sentence,  presentation  sentence).  qrammar  right-hand-side  input  bottcm-up  bottom-up  i n time order  operating  hierarchy  (the i n p u t  context-free  the  context-free  Earley's algorithm  t h a t can  algorithm, the  based  exhibiting  some i n t e r e s t i n g  of the  a formal  sentence  and  developed  backtracking  scheme f o r  noticed  portions  operate  of  recognition  a  top-down  particular,  recognizer  I t can  a  subset  interpretation i s inherently a both  (1972) has  is input  that  of m a c h i n e p e r c e p t i o n ,  elegant.  does  it  have  context-free  restricted  parsing  base, The  The  n c n - l e f t - r e c u r s i v e c c n t e x t - f r e e grammar.  quite n  as a h i g h l y  which  algorithms  algorithm  theory.  i n t e r p r e t a t i o n t o an  grammar.  properties.  efficient  viewed  knowledge  understood  the  parsing  Context-free  an  process  recognition  be  domain.  task a  in  on  rule 3 :  form in  as  a  certain  a selection  operates  parsers.  sentential  particular  inverts  based  alqorithm  of v a l i d  p a r s e r , but  from  Each derived the  a  parser from  grammar.  A Procedural  fcodel  58  Initially,  the  set contains  only  a s i n g l e parser  to  recognize  a s e n t e n t i a l form  the  grammar.  Such a d e r i v a t i o n w i l l  sentence  in  the  language.  d e r i v a t i o n o f any  for  rule  i n the  left-hand-side.  This  from  be,  the  parser,  grammar  new  having  function  is  symbol  a  symbol  parsers  that  attempts  start  of course,  I f a non-terminal  next i n the every  derived  which  complete may  appear  are  created  non-terminal  called  of  prediction  as i t s in  the  algorithm. The each be  algorithm  symbol  a valid  of  the  next  are  parsers  are  parsers  sentence.  in  new  The  parsers  by  the  next  The  of  algorithm  search  yet  hierarchy.  Portions  of t h e  input  recursively  from  symbol  list,  list.  scans the  prediction  from  can  of  any  then  those  All  ether  input once.  the  derivation.  Old  It  grammar  when  parsers  which  input sentence to the  what the  a  some  current  interesting  properties  model  o f r e c o g n i t i o n f o r computer  provides  a mechanism f o r i m p l e m e n t i n g  operates  d e p e n d i n g on and  parse  algorithm  exhibits  bottom-up  selectively,  parse  order  destroyed.  standpoint  perception.  observed  s e n t e n t i a l forms  the c u r r e n t  appear next i n the  are then  in a left-to-right  I f the  i n the  i n t o the  Earley*s algorithm  the  scanning  d e r i v e some p o r t i o n o f t h e  position  from  by  t e r m i n a l symbol  deleted.  r u l e can  cannot  input  propagated  hypothesizes their  i n the  active  parsers  proceeds  directly  hierarchy  are  from  dynamically  what t e r m i n a l s y m b o l s a r e  non-terminal input.  These  symbols are  are  appealing 3:  a  top-down inverted,  observed  in  recognized attributes  A Procedural  Kodel  59  s i n c e schema s y s t e m s a r e o r g a n i z e d it  i s d e s i r e d t o d r i v e the  discovery As not  of a  only  to parsing  algorithm processes input. on  As  but  also to  from t h e  parallel  remain  same  symbol  Then,  such  each  hierarchy  a scheduling  until  matched  on  such  f o r which t h e y parser  iy  the  i s applicable  in general.  multiple co-existent  but  and  cues.  multiprocessing  search,  suspended  non-terminal  hierarchies  scheme, E a r l e y ' s a l g o r i t h m  well, i t provides  emulating  Parsers  recognized  systematically simulates operating  top-down  bottom-up r e c o g n i t i o n p r o c e s s  b o t h p r i m i t i v e and bookkeeping  as  and  on  The  parsing  the  mechanism  same  based,  concurrent  not  deduction.  t i m e as t h e  terminal  are  looking  is  is  resumed  to continue  or  discovered. its  recognition. The  algorithm  efficiently. non-terminal the  next  that  also  When  a  list  every  constituent.  invalid  above  qeneral  has  abilities  with  adaptinq and  those  Woods of  n a t u r a l l y and  scanned  that  deleted.  No  was  and  his  there  alqorithm  favorably  auqmented  as  and  are a  a  search  perception. as a  problem  compared  transition 3:  input  is  possible.  r e j e c t e d i t s use  (1974) has  into  backtracking  desirable,  Barley's  a  expecting  only once i n the  as s o o n as  cr  propagates  more complex domain of  considered  space r e p r e s e n t a t i o n .  parser  found  deleted  is  algorithm  p r o p e r t i e s are  of problems with  (1973)  the  are  need be  i n t e r p r e t a t i o n s are  mechanism f o r t h e Minker  symbol  suspended  A l l others  Constituents  Althouqh the number  terminal  symbol i s r e c o g n i z e d ,  parse  required.  handles non-determinism  its  network  A Procedural  Model  60  parsers. There  appear  t h i s approach.  to  be  First,  the  and  non-terminal  too  top-down,  process  have to  In  the  a  parsing  suitably  feasible. proposed  In a  such  can  be  portion  the  of the  natural  are  inefficiency  grammars  this  parser  input  sentence.  encoded  language.  sequential content,  f o r example,  is  of  an  explicit  constrain mechanism The  part  invalid must last  the  has  i n t e r p r e t a t i o n s , but  sequential  proliferation  as t h e  parsers  be an  surface  Where  efficient as  some some  form  very  effectively  aspects with  however,  have  of  a l l parsers  i n t e r p r e t a t i o n s of  i t can  perceived  are  parallel  remaining  aspects  handle n o n - s e q u e n t i a l  machine  (1973)  strict  image a n a l y s i s .  perception,  difficulty  For  perception,  other  t o l e r a t e d by  propagated  s e q u e n t i a l l y , such  However,  be  hierarchy.  creating  the  has  invalid In  the  GSP.  set, a l l  They r e p r e s e n t  egg  the p r e d i c t i o n  Kaplan  for  limit  symbol  and  knowledge b a s e  depends upon t h e  next i n p u t next  the  scheme  efficiently  derivation is  employed. of  in  terminal  chicken  can  difficulty,  prediction  to  "the  l a r g e branches of  this  algorithm  to the  deleted.  aspects  of  i n the  hierarchy,  i n h i s p a r s i n g system,  A f t e r the  valid  of  restrictions  similar  of parsing  parsers.  very  inherent  p r e d i c t i n g which  appear next  aspects  the  spite  Second,  still  tour  of  knowledge  domain,  no  interpretations  nature  large  restricting  perception,  may  exhibiting  For  major d i f f i c u l t i e s  process  symbols  problem". may  three  little sequence used  to  perception  well.  Earley's alqorithm 3:  of  A Procedural  is  Model  61  t h a t t h e mode o f s e a r c h is  no top-down  b o t h top-down  3.4  mode d e f i n e d .  parsing  f o r perception,  are e s s e n t i a l .  algorithm  of Earley  was  shown  a number o f p r o p e r t i e s d e s i r a b l e f o r a r e c o g n i t i o n  machine p e r c e p t i o n . develops  a  r e c o g n i t i o n model f o r p e r c e p t i o n  using  some o f t h e t e c h n i g u e s  same t i m e , a v o i d i n g This  schema-based  new  representations.  first  since  they  previous  discussion.  The  phases, c a l l e d  inherent  b o t h top-down  explained  expectation,  also  d e v e l o p e d by E a r l e y w h i l e ,  the d i f f i c u l t i e s  model s u p p o r t s  nsodel  difficulties  section  were  to  A few  This  3.4.1  There  Recognition  The c o n t e x t - f r e e  for  bcttom-up.  As has been s e e r ,  and bottom-up mechanisms  Three Phases of  exhibit  employed i s c o m p l e t e l y  and b o t t c m - u p  derived,  at  search  mechanisms  in  part,  in  will  from  r e c o g n i t i o n model c o n s i s t s o f m a t c h i n g , and  the  i n h i s algorithm.  The bottom-up  are  noted.  be the  three  completion.  Expectation  The e x p e c t a t i o n prediction recognition  function model  expectations stereotype information  as  of for  are which  phase o f t h i s Earley's schemata  described are  i t  model  by  static  systematically  i s discovered.  analogous  algorithm. given  as  is  the  I n t h e top-down Kuipers  properties  replaced  In t h i s  to  model,  by  (1575), of  the  specific  expectations  3: A P r o c e d u r a l  Model  62  are  computed d y n a m i c a l l y  function any  during  of the current  partial  recognition specific An  of  the  as  c f t h e schema. a  a At  non-deterministic  i n s t a n t i a t i o n s o f t h e schema.  i s a method  schema  process  based  designed  to  continue  on t h e s a t i s f a c t i o n  the  of that  expectation. instance  hierarchy  non-deterministic Recognition stereotype  is  characterized  into a specific  instance  h a s been  1977).  In  stereotype  the  of  a  of a general as  the  instance.  towards  or  a  chairs.  particular  procedure.  In  The schema  this  t h e schema  differentiation  be  i s found  selected  model, t h i s  instantiation  refining specified Wincgrad,  class  The r e c o g n i t i o n  this  must  &  of the  r e c o g n i t i o n m o d e l , however, a schema  during  schema  of  a fully  jBobrow  i n the d e s c r i p t i o n o f a p a r t i c u l a r  replacement  objects.  differentiation  results  process,  m o d e l , as a  c l a s s of  This process  as r e p r e s e n t i n g  tables  i n this  specialization  top-down  as  regarded,  stereotype  called  i s portrayed  such  is  representation  expectations  objects  represent  of a l l p o s s i b l e f i n a l  Bound t o e a c h e x p e c t a t i o n  recognition  instantiation  p o i n t , a schema's e x p e c t a t i o n s  description  the  the  of  process  table or chair.  If,  t o be i n a p p r o p r i a t e , a by  some  substitution  s u b s t i t u t i o n i s not  i s c h a r a c t e r i z e d as b e i n g  necessary.  a process  of  instead of selection.  3:  A Procedural  Hodel  63  3.4.2  Matching  The  second  expectation cycle.  phase o f t h e model i s t h e m a t c h i n g p h a s e .  and m a t c h i n g  p h a s e s form  an  iterative  by s u i t a b l e o b s e r v a t i o n s  medium o r by t h e r e c u r s i v e r e c o g n i t i o n o f o t h e r a schema has c r e a t e d  a s e t of expectations  those  the expectations  or  expectations,  recognized  methods. the  Each  calculate,  method  based  expectations, new  co-exist  thereby  first  over  within  some  input  schemata.  After  from  and bound  may be matched by  activating  the  pattern  new  evidence,  itself  and  perhaps  This  schemata  It  a  cycles  then  s e t of  methods  of  a multiprocessing  into  may  next  other  depends  on  the  to  c y c l e may many  ether  mechanism f o r  mechanism i n t h e by o b s e r v a t i o n containing  availability  schemata  matching over  schema s y s t e m s  expectations  and  are  general  however,  the 3:  New  must be a b l e  which  i t can  o f which  involve  similar  to  o f d e s c r i p t i o n matching advocated In  o f an  network.  and d e d u c t i o n ,  Two s u c h mechanisms a r e p r o p o s e d , b o t h  (1S77).  observed  associated  expectation/matching  the r e c o g n i t i o n  phase  discovered  extended concept flinograd  this  to  search.  retrieval  those  methods  i n c o r p o r a t e s t h e new e v i d e n c e  cycle realizes  matching  evidence,  match.  time with  parallel  associative  find  suspending  This  simulating The  on  expectations.  schemata.  to  evidence,  bound  e v o l v i n g i n s t a n c e o f i t s schema's s t e r e o t y p e .  these  recognition  I n bottom-up r e c o g n i t i o n , t h e e x p e c t a t i o n s  schemata a r e s a t i s f i e d  The  the  by Bobrcw and  problem  i s  quite  A Procedural  Model  64  complex.  Indeed,  a  associative  retrieval  over semantic  problem can  be  The  first  associative artificial 1974).  seen  this as  contained  advocated  s u c h an  second  implementation  as  organization  within  a  the  a  are  associative  McCalla  schemata  Raphael,  schema  pattern  schema. for  Planner-like  (Bobrow 8 of  and  (1977)  in  a  has  natural  using  of  model.  The  search  matching  over  the  the  instance  a  taxcncmic  Such  schemata the  provides  the  matching phase  of  process t h e r e f o r e  schemata  of e x p e c t a t i o n s  network i n  represented  involves  conjurction as  patterns.  Completion  expectations  higher This  a  problem.  matching  newer  databases.  system  A schema c o m p l e t e s t h e its  in  mechanisms t o s u p p o r t  with s y n t a c t i c matching  3.4.3  the  involves  associative  retrieval  cue-driven  in  This  system. mechanism  recognition  pattern  expectations  the  deductive  recognition  languages  patterns  within  hierarchies  the  simple  programming the  of  networks i s r e q u i r e d .  i s familiar  system,  database  language dialogue  uses  as  n-tuple  theory  r e c u r s i v e l y , the  mechanism  intelligence  represented  necessary  be,  retrieval  In  The  to  comprehensive  schemata is  the  analogous to  are  r e c o g n i t i o n o f an  satisfied.  of which the completion  the  I t must r e t u r n  instance  can  phase of the  completion  instance  function  be  a  that  to  part.  model and  Earley's 3:  all  success  component  recognition of  when  is  algorithm  A Procedural  Model  65  (Appendix-fi,) . using  the  completing  top-down s e a r c h a s a  explicit to  If  caller  schema's  subgoal.  then  On  the other  hand, a  using  expectation  matched by some o t h e r p r o c e s s .  bottom-up  caller  and  is  between s u b g o a l s  in  they  are  subroutines attached activated  control  to  at  processes  may  i s based  whose e x i s t e n c e may  the  failure nay  has  supergoal.  are  types  be  no The  on t h e  way  activated  as  supergoals  continue  of  an  associated  r o u t i n e , whereas  Both  has  after  methods  recognition of their  are  s c h e m a t a and  o f top-down and b o t t c m - u p  techniques  do s o . When  a  requirements stereotype, enters  supergoal  has  satisfied  the recognized concept  the  matching  phase  the completed  of  internal  by  attempting which  to the  It  match  the  particular  p a r t . . Such knowledge i s a v a i l a b l e  schema i n s t a n c e t h r o u g h  the inverse  composition  of i t s stereotype.  Figure nature  schema's  becomes an a b s t r a c t c u e .  h i g h e r schemata o f  i n s t a n c e m i g h t be a p l a u s i b l e  relations  its  f o r t h e r e c o g n i t i o n o f an i n s t a n c e o f t h e schema's  e x p e c t a t i o n s of those  to  a  Subgoals  to the c a l l e r .  use a c o m b i n a t i o n  an  T h i s method  as  called  or  method  having  and s u p e r g o a l s  activated.  completing  by  to  t o the c a l l i n g  has r e t u r n e d  directed both  as  search  referred  distinction  are  schema  schema's  activated  which  the  was  and must e v e n t u a l l y r e t u r n a s u c c e s s  that c a l l e r .  explicit  method  3.4 this  illustrates process.  Schema-1 a t t h e f i r s t  level  both For  the c y c l i c  and  example,  the  i n the hierarchy 3:  may  the  recursive  recognition  of  proceed  over  A Procedural  Rodel  66  primitive  Figure  3.4:  cues  Recognition  from o b s e r v a t i o n context-free  Cycles  3:  A Procedural  Kodel  67  time with through  the r e c o g n i t i o n o f other  Schema-1  several cycles cf creating expectations,  methods  to those  primitive  expectations,  cues  expectations completion higher  schemata. ,  computed  and  from  being  the  phase.  schema,  Since  i t was  i t s description  effect,  description,  i t a t t e m p t s t o match t h e e x p e c t a t i o n s  Schema-3. both  I f t h e match  of these  information  i n the hierarchy,  i s s u c c e s s f u l , the  recognition.  through  a number o f e x p e c t a t i o n / m a t c h i n g  other recognizers. matched result  by  realizing  is  perception.  parallel  search  realizing  one  alsc  or  proceed with  expectations are  recursively  as t h e  methods. these  s e e n as a " h a n d l e "  It  provides  v i a a deductive  i n t h e r e c o g n i t i o n model  features a  method  cf  mechanism  a  theory  and f o r  The  coordinating  remaining  scheduling  efforts  sections of t h i s  features are achieved the  the  of  for simulating scheme,  a r e c u r s i v e cue/model h i e r a r c h y , f o r r e a l i z i n g  hierarchies,  In  of  cycles concurrent  recognized  a number o f d e s i r a b l e  machine  how  schemata  of perception.  Completion for  this  o f Schema-1 t o  T h e i r r e c o g n i t i o n may  cues  in  Schema-2 and  methods  B u t , u n l i k e Schema-1, t h e i r  non-primitive  c f any  abstract  of  case,  s c h e m a t a a r e resumed a s s u p e r g o a l s  their  an  contained  in this  continue  enters i t s  as a subgoal  cue.  the second l e v e l  the  matching  When a l l t h e  i t then  high-level  at  From  not c a l l e d i s , in  by  data.  o f Schema-1 h a v e been s a t i s f i e d ,  go  suspending i t s  resumed  input  may  of  chapter  for  method  concurrent will  explain  i n t h e model. ,  analysis of Earley*s algorithm,  i t was  pointed  3: fl P r o c e d u r a l  out  Model  68  that In  t h e p r e d i c t i o n phase may be c o m p u t a t i o n a l l y  t h i s r e c o g n i t i o n model, t h e problem  the  expectation until  some i n p u t  observation  supergoal  attempts  part,  such  i t must f i r s t  schema  to  supergoal  time  schema  need  that  net  be  supergcal or When  a  t o match a schema o f w h i c h i t c a n l i k e l y  be  If  upon t h e  t o match t h a t  expensive.  by n o t i n g  as a n o t h e r c o m p l e t i n g  attempts  search  match.  calls  instance.  i s avoided  phase f o r seme p a r t i c u l a r  performed  very  for a  particular  no such i n s t a n c e schema  instance  of  that  c a n be f o u n d , t h e n t h e  stereotype  Thereby, the e x p e c t a t i o n  schema.  to  create  a  new  phase i s p e r f o r m e d o n l y  when  needed.  3.5  Scheduling  Proposals  for simulating  multiprocessing allocate  scheme  the processor.  time-slicing  mechanism  Sinograd,  1977).  simulatinq  the concurrent  effective  at  non-deterministic schedulinq processes. the when  This  processes, The  fl  search  technique  based  on  a  type  of  mechanism  the  methods.  employ  a  on some g l o b a l a l g o r i t h m t o  popular  evaluation  usually  is  priority  a  weighted  queue  (Bobrow 6  i s  effective  at  of procedures but i t i s not parallel  application  The t e c h n i q u e  of  i s directed at  n o t a t t h e methods t h a t a r e i m p l e m e n t e d as  scheme  proqrammer t o a s s i q n i t i s placed  that r e l i e s  simulatinq search  parallel  i s t o o low l e v e l . a q l o b a l numeric  on t h e p r i o r i t y  I t typically  priority  to a  forces process  queue. 3:  A Procedural  Model  69  A scheduling needed. to  mechanism, o p e r a t i n g a t  Methods  should  become a c t i v e  the r e c o g n i t i o n process  process  spontaneously  To system  that  higher  when t h e i r  level,  is  applicability  i s d i s c o v e r e d o r d e d u c e d , n o t when  reaches  illustrate this  a  the front  further,  i s implemented  of a p r i o r i t y  gueue.  c o n s i d e r an a u t o m a t i c  deduction  i n a multiprocess environment.  a complex p r o o f .  process  c o n s i d e r a b l e p r o m i s e b u t has been u n a b l e  shown  achieve  some r e s u l t ,  say P{x).  itself  until  time  deducing should assign a  such  P{x). be  In t h i s  assigned  scheme  another  priority  to  situation  based  parallelism their  on is  this  to  d r i v e n system, suspended  occur?  deductive required.  coordinate method  problem  mechanism s h o u l d  some  to  which  process?  i n order  scheduling  How d o e s one  instead  of  simple  be s c h e d u l e d  when  has been computed.  The  o f m u l t i p l e methods. result,  a s k , "What methods a r e  for  a multiprocessing  should  intermediate  in  priority  i s not t o s i m u l a t e p a r a l l e l l i s m , efforts  to  suspend  that i t wait  Obviously,  Processes  the simultaneous  achieves  decides  deductive  process has succeeded  a p p l i c a b i l i t y t o the system's task  bottcm-up s e a r c h  the  tut to When a  schedulinq  suspended  waitinq  for  phase o f t h e r e c o q n i t i o n model  provides  such  result?". The  a  The p r o c e s s  a p r i o r i t y number t o a p r o c e s s  specific  this  as  One p a r t i c u l a r  The  system i s attempting has  a  completion  schedulinq  characterized scheduled  mechanism. as the  next.  In f a c t ,  computation Methods  t h e r e c o q n i t i o n model c a n be of  remain  what  methods  suspended 3:  should to  be  patterns  A Procedural  Model  70  representing completing that  expectations supergoal.  t h e method  could  until A  supergoal  expectations  of a l l higher  as own  i n matching.  a supergoal schema.  computed higher  only  method i s resumed when i t i s d e d u c e d  may r e s u m e , i n t u r n , t h e methods bound t o s c h e m a t a t h a t i t s schema i n s t a n c e c a n  E a c h s u c h resumed method i s a c t i v a t e d a l s o the recognition  The  schema  recognition  once.  By a  it  higher  specifically  scheduler  i s not required.  or  i t c a n resume f i r s t  already it  have e x i s t i n g  c a n c r e a t e new  of expected  The  process  mechanism  bottom-up  generator  Conniver.  When a c o m p l e t i n g  it  is  generating  in  a  higher  of  mechanism  a supergoal  be  c a n resume  of a p p l i c a b i l i t y schemata  which  succeed,  t o match, t h e r e b y  can  may  A syntactic global  likelihood  until  scheduling  schemata which  I f none o f t h o s e  schema i n s t a n c e s  completion  backtracking  t h e methods o f t h o s e  instances.  expense of t h e e x p e c t a t i o n  No  situation.  For instance,  only  one  c a n be p a r t o f t h e  That s c h e d u l i n g  f o r each  methods i n o r d e r  than  behaves as a h e u r i s t i c  t h e methods o f t h o s e  tailored  more  network schemes i s r e q u i r e d .  superqoal  resuming  instance  of i t s  i n s t a n c e need be  resuming  schemata.  i s s u c c e s s f u l at matching.  higher  a  s i n g l e schema  of multiple  Each c o m p l e t i n g  of  sequentially  s u b g o a l s o r use o f s i m i l a r i t y  mechanism,  process.  and p r o c e e d s t o c o n t i n u e  supergoal,  recognition  by some l o w e r  be a p p l i c a b l e t o t h e r e c o g n i t i o n  A completing  succeed  resumed e x p l i c i t l y  then  saving  the  i t i s needed.  be  characterized  as  a  c o n t r a s t t o t h e top-down g e n e r a t o r s c f method m a t c h e s a h i g h e r  possible  successor  process.  superqoal, I t tours a  3: A P r o c e d u r a l  Model  71  schema h i e r a r c h y i n i n v e r t e d , bottom-up o r d e r . method's  computations  supergoal  attempts  returns  to  higher  its  method,  supergoal.  bottom-up s e a r c h  suspended  complete  to the completing  possible  3.6  are  i s clear  that  domain-specific  search  complexity  the  then  schema's  If  control  generate  T h i s mechanism i s  a  t h e next  generator  for  search.  of  machine p e r c e p t i o n must knowledge  perceptual  schemata i n a c o m p o s i t i o n 1972)  isomorphic  Methods  to  exhibit  a  between  Methods a p p l i c a b l e t o a  large  inherently  for  narrow  specific  class  task  can  achieve  c o m p r e h e n s i v e r e c o g n i t i o n scheme provisions search In  for  such  a method  for  cope  with  the  with  stereotypical  hierarchy  hierarchy  is  applicability of  search  termed.  and  power.  problems  problem.  the  {Newell.  Conversely,  accomplishment  power  and  perception  are  of  efficiency. must  a A  include  hierarchy to i n t e l l i g e n t l y  guide  process. the  purely  hierarchy capability each  for  heuristic  By i n c o r p o r a t i n g t h i s  any s p e c i f i c  engineered  utilize  to  associated  composition  tradeoff  methods h e u r i s t i c a l l y  order  h i e r a r c h y , a method  the  inefficient  in  process.  knowledge as p r o c e d u r a l methods  with  the higher  recognition.  i t will  i n s t e a d o f top-down  completing  Method H i e r a r c h i e s  It  the  while  The  schema  top-down  recognition  i s straightforward. may  be  created  model,  a  method  The methods a s s o c i a t e d  specifically  to search f o r  3: A P r o c e d u r a l Model  72  i n s t a n c e s o f t h a t schema.  The h i e r a r c h y i s r e a l i z e d  that,  schemata c a l l  i n top-down s e a r c h ,  schemata as s u b g o a l s . powerful  and  particular  subgoal.  In is  Each  specific  on t h e e f f o r t s  of subgoaling  method  to  the  straightforward.  simultaneously.  Which  direct  process?  the search a  single  system  1972)  typically  processes gueue.  method  achievement  methods  should,  at  may  a  more  of  that  hierarchy be  any g i v e n  Most bottom-up s e a r c h  top-level  <Waltz,  schemes  Multiple  of ether  applies  bottom-up s e a r c h , however, a c h i e v i n g a method  n o t so  used  level  by t h e f a c t  active instant,  schemes  method t o d r i v e t h e o p e r a t i o n  (Mackworth,  alternate  w h i c h a r e r u n and  the  1977a).  have c f the  Multiprocessing  application  of  then s u s p e n d e d a g a i n  methods  as  on t h e p r i o r i t y  T h e r e i s , however, p o o r c o o r d i n a t i o n between  alternating  methods. The  following  hierarchy supergoal of  in  bottom-up  is  search.  method can compute,  utilized  tc realize  As  been  has  methods  expectations. phase,  i t  control  to  retaining  the  After  can some access  effectively  t h e method has  either  terminate  higher to  method,  the  an e x t r a " d e g r e e  method  I t may  t o p a t t e r n s w i t h i n t h e schema  the  i t sexecution,  processor.  i t  can  then  suspend those  expectation relinquishing  remain  active,  T h i s mechanism  provides  of freedom" i n the search  relinquishes control,  a  instantiation  representing  performed  or  a method  described,  b a s e d on t h e p a r t i a l  i t s schema, a n e x t s e t o f e x p e c t a t i o n s .  other  If  mechanism  then  process.  i t i s relying 3: A P r o c e d u r a l  oc t h e Model  73  efforts its  of other  schema's  retains  satisfy  to  own  process  forced  behavior  hand, i f t h e  use i t s own  heuristic  direct  knowledge  to  to the h e u r i s t i c s  the search  of e v i d e n c e  to  each  the  search  o f h i g h e r , more  general  method,  process  as  o f p u r e top-down s e a r c h  a  subgoal,  is  r e g a r d l e s s o f t h e schema's  o r e x p e r t i s e . ft major r e a s o n  for the pathological  (Sussman S McDermott, 1972) i s  i n a p p l i c a b l e methods do n o t know when t o g u i t .  method's t e c h n i q u e s locally  on  applies  a  a  i s not  schema's  bottom-up  inappropriate,  critical.  method,  control  will  but  matches  of  Their  expectations  methods w i l l t h e n  mistake.  The e s s e n t i a l  o f when t o a p p l y decision  of success. the  soon  Evidence  the  The  anticipation  more a p p r o p r i a t e s c h e m a t a .  schema  i t  i s  made  will  those  be  supporting the choice that i s l o s t  of a d i f f e r e n t  i s some e f f i c i e n c y  I f a schema itself  discovered  thereby  is  which  correcting  d i f f e r e n c e from top-down  by  based  more a p p r o p r i a t e s c h e m a t a .  assume c c n t r o l  globally  is  a  p r o p a g a t e t o t h e methods of  the  the  search  i s that  each  method.  discovery of  evidence  d e c i s i o n d o e s n o t have t o be made l o c a l l y  Instead,  all  reethod  specialized  direct  I n b o t t o m - u p s e a r c h , however, t h e c h o i c e  this  match  e a c h schema t h e c h o i c e o f a p p l y i n g  I n top-down s e a r c h ,  applicability  that  allows  yielding  to  i t may  will  expectations.  specialized  methods.  the other  that  d i r e c t t h e d i s c o v e r y and d e d u c t i o n  mechanism  or  On  of the processor,  i t s own  This its  expectations.  control  knowledge  methods t o d i s c o v e r e v i d e n c e  method.  by  In the worst  f o r a short while.  case,  There i s  3: ft P r o c e d u r a l  ffodel  74  no c h r o n i c similar  p a t h o l o g i c a l behavior. convergence  constraint  3.7  propagation  Coordination  Since may  instance.  It  communication  attempt  accomplished  schema. schema  may  is  necessary  model, through  and  to recognize to  schemata or  the  provide  methods  same  schema  coordination  and  among  sister  methods The  to  the  method  t o every a c t i v e s i s t e r within  has  decides been  that  with  instantiation  completed,  that  of  the  p h a s e , i t i s assumed  schema i n s t a n c e  with  the  a r e no l o n g e r  suspended w i t h i n As w e l l , t h e r e hierarchy.  recognition  Such  phase.  of  this  a  that  mechanism  is  When a method b e g i n s t h e  that the e f f o r t s recognition  needed.  When  i t must communicate  method.  the completion  associated  the  is  instance  i s aware o f t h e c o n t r i b u t i o n s o f i t s s i s t e r s .  success  method  bottcm-up  by a l l methods a s s o c i a t e d  instance  are  different  t h e i r common schema i n s t a n c e .  schema  methods  his  NC.  communication  E a c h method c o n t r i b u t e s  completion  cf  methods.  s t r u c t u r e accessed  seme p a r t i c u l a r  defined  use  to recognize  attempt  among s i s t e r  this  a data  algorithm,  the  m u l t i p l e methods c a n be a c t i v e c o n c u r r e n t l y ,  more t h a n one method  is  in  (1977a) h a s n o t e d a  and C o m m u n i c a t i o n  simultaneously  In  effect  Hack-worth  of  A l l such  t h e c o m p l e t e d schema must be c o o r d i n a t i o n  of this  a l l  ether  particular  sister  methods  instance. among t h e methods c f  A number o f methods i n t h e h i e r a r c h y 3: A P r o c e d u r a l  may  a be  Model  75  simultaneously  attempting  i s  isomorphic  composition  h i e r a r c h y , when a method a t some l e v e l  lower  i s s u c c e s s f u l a t r e c o g n i z i n g a schema  t h e methods a t l o w e r  That  cooperating  instance a t that These  t o r e c o g n i z e components o f t h e now  r e c o g n i t i o n i s now c o m p l e t e and t h e s e  then  methods  concurrent  i s s e e n a s a c o o r d i n a t i o n mechanism methods.  When a schema  recognized,  a l l methods c u r r e n t l y a t t e m p t i n g  that  or  schema  Completion This  sub-schemata  was  mechanism i s r e a l i z e d  the completion generate  suspended  of  characterized  The bottom-up g e n e r a t o r  to  i n t h e method  a l s o suspended. Completion  by  t c the  schema i n s t a n c e and t o d i s c o v e r c u e s t o p r o p a g a t e i t s  recognition. are  associated  l e v e l s a r e no l o n g e r n e e d e d .  methods were a t t e m p t i n g  completed  hierarchy  their  Since  level,  method  of  schemata.  hierarchy  the  the recognition  methods  successfully  the r e c o g n i t i o n of  schema  are  suspended.  a s a bottom-up  conventions  i s composed  generator.  described  o f a l l t h e methods  On f a i l u r e ,  plausible to  above  by t h e  process.  a new  that  is  the generator  higher supergoal,  continue  the  search  of  recognition  among  suspended i s resumed  resuming for  here.,  a l lthe  that  next  supergoal.  3.8  Integration  The  presentation  concentrated the  premises  on r e a l i z i n g for  the  this  bottom-up s e a r c h model's  model  mechanisms.  has so f a r Ore  of  d e v e l o p m e n t was t h a t i t s h o u l d 3:  a Procedural  flodel  76  provide  an i n t e g r a t i o n  section  d e s c r i b e s s u c h an  In  a  using e i t h e r  search  is  recursively as  subgoal  well,  computing to  those  of  restriction  top-down  use  to  create  a  set  control  knowledge,  bottom-up When  schemata  by  making  itself,  subgoal  expectations  methods  as  methods subgcals.  observations use  of higher  may  use  either  top-down  Supergoals a  may  supergoal  method, o r u s i n g  summary,  This  described  a  its  or call  method either  heuristic  of information to  both  top-down  and  freely.  is  attempting  s c h e m a t a , i t must f i r s t  schemata t o match.  only  caller.  In  schema  an  return  o f e x p e c t a t i o n s f o r i t s schema, t h e n  completing  and  The  eventually  alternatively,  t o some o t h e r  by  attempting  recursively  t h e i r tasks.  expectations.  matching  by  technigues.  method  methods c a n be i n t e r m i x e d a  Top-down  bottom-up t e c h n i g u e s  bottom-up  achieve  manner  or  i t s task  technigues.  d i r e c t t h e d i s c o v e r y and d e d u c t i o n  i t s own  This  subgoals  f o r i t s schema, t h e n  may,  methods a s s u b g o a l s .  network  may  and  the  supergoal  search  relinquish  those  method  as  to complete  familiar  or f a i l u r e to i t s e x p l i c i t  bottom-up  satisfy  the  process  i s that  Likewise,  may  in  expectations  This  integration  attempt  bottom-up  a set of expectations  deductions.  other  may  t h e methods o f o t h e r  subgoal  satisfy  success  or  implemented  a  execute e i t h e r  method  top-down  calling  search.  integration.  t h i s model, methods may  supergoals. by  o f top-down and bottom-up  device  earlier.  to  match  the  f i n d instances of  involves  the  Part  the h e u r i s t i c  3:  of  semantic  a Procedural  Model  77  k n o w l e d g e c o n t a i n e d i n a schema's for  s e a r c h i n g t h e schema  match.  In f a c t ,  schema  ceases  the  t h e r e i s no s h a r p  process.  completion  involve  process  efficiently  aspects calculate  distinction  involves and t h e  occur  using  e x p e c t a t i o n s produced.  conceptual  than  system, i t w i l l to  facilitate  when  to the p o i n t  both  top-down  expectation/matching  of completion. a next  between  a  set of expectations, a  This distinction  computational  reasons.  be a d v a n t a g e o u s t o b l u r communication  up  that and cycle  For i n s t a n c e , i n order to method  need t o match h i g h e r s u p e r g o a l s i n o r d e r t o c o n s t r a i n of  procedures  o f an i n s t a n c e and when i t b e g i n s  O v e r l a p p i n g may  bottom-up s e a r c h t e c h n i q u e s may  cf  network t o l o o k f o r h i g h e r s c h e m a t a t o  the r e c o g n i t i o n  the completion  methods c o n s i s t s  and  is In  t h e number  made a  more  large  the d i s t i n c t i o n down  the  may  for  schema i n crder  the  schema  hierarchy.  3: fl P r o c e d u r a l  Kodel  78  CHAPTER 4: AN EXAJPLE FBQM MACHINE VISION  4.1  Perspective  This chapter of  the  presents  recognition  a d e t a i l e d example o f  model  on  example has been i m p l e m e n t e d given the  i n Appendix-C.  example w i l l The  vision  problem  recognize  from  including from  a  chosen  from  computer  as a r u n n i n g  the  as p a r t  perfect  line  representation  problem  interest. recognition major  model  characteristic  that  of  drawings  of  machine  that  the  First,  concerns  input  research  operation  o f the  There a r e three  the  tasks.  problem The  simplest  aspects  operates  vertices.  of  specific  4: An Example from  world  task  scene  S e c o n d , t h e example i s r e s t r i c t e d heuristic  polyhedra  of current  this thesis.  perception  essential  the  i s to  and a c c e p t s  connecting  to illustrate  choice.  of  The r e c o g n i z e r  task  machine  problem  class  polyhedra  vision  in  The a  o b j e c t s i s b e l i e v e d t o be t h e  captures  scope  a  developed  for this  (Mackworth,1976). its  not  I t i s presented  reasons  polyhedral  i s  is  the implementation of  world".  s c e n e s c o n s i s t i n g o f v e r t i c e s and l i n e s The  This  which  but c h a r a c t e r i s t i c  c u b e s , wedges, and p y r a m i d s . schema  task.  o f t h e d e s c r i p t i o n o f Maya.  i s a small "blocks  vision  operation  Maya program  I n t h e next chapter,  be c o v e r e d  example  a  the  to a  is of  domain analysis  enough  in  particular  Machine  Vision  79  vision  task  do  representation similar  not and  overshadow recognition.  t o an example  operation  of  systems.  This  comparison  o f t h e two  The  the  method  overall  a  operation  given  choice  model  of presentation of  (1975)  of  the  the  f o r schema  therefore,  permits  a  be t o  by  first  solution,  the  does n o t e x p l o r e  describe and  program,  the  then,  explain  by the  r e c o g n i t i o n model.  a l lthe  issues  a handle f o r t h e i r  addressed  discussion.  The P r o b l e m  The example  knowledge  of p o l y h e d r a l  as a schemata network.  composition  hierarchy  scenes of polyhedral stereotype  schema  objects The  of Figure  blocks.  4.1  representing  in this  a  named  arc  between  and i t s s u b - s c h e m a t a ,  i t s schema  polyhedral which,  in  objects. turn,  Polyhedra a r e composed  upward-pointing  relation,  arc  are  uses  the  the  simple  hierarchy concept.  composition  is  cf  relation  polygon  o f p r i m i t i v e e d g e s and the  inverse  a  Each  S c e n e s a r e composed  composed  represents  in this  to represent s t e r e o t y p i c a l  E a c h node  represents  i s represented  program  downward-directed  Each  example i s  recognition  problem's  by t h e model, i t d o e s p r o v i d e  this  of  models.  will  produced  issues  to i l l u s t r a t e  t h e program and t h e u n d e r l y i n g  A l t h o u g h t h e program  4.2  third,  example,  recognition  protocol of  of  general  And  by K u i p e r s  top-down  structure  utilizing  more  of  faces  vertices. composition  "part-of". 4: An Example  from Machine V i s i o n  80  Figure  4.1:  Scene C o m p o s i t i o n  Hierarchy  4: An Example  f r o m Machine  Vision  81  In  this  cuboids, of  example, p o l y h e d r a l  wedges,  parallelogram  parallelogram are  and  and  into  quadrilaterals,  and  multilaterals.  generic  polyhedron  represented for each  of  which,  the  schema  To  system  structure  in  knowledqe  of the  in the  finally the  triangles, Initially, procedural polyhedra to  and  force  to  an  perform of  general  mere  and  from  but  instance  recoqnize  as and  specific  hierarchy Hz  f o r those An  of of  polygon's of  multilaterals.  represented  subsequently  task  instances  and  instances  The  the  observation  is  the  subclasses  instances  for  quadrilaterals,  of  procedurally  schemata.  Likewise  taxonomic s t r u c t u r e  not  larqer  Instead,  i s represented  to  size  this  classes into  stereotype  i s recognize  the  pyramids  the  of  recoqnition.  wedqes.  cf  Polyhedra,  and  explanation  instances  sides  is  hierarchy. wedges  are  d i v i d e d i n t o t r i a n g l e s and  stereotype  to t h e  are hypothesized the  Polygons  or  of  pyramids  differentiation  composition  ,  methods,  and,  faces.  five  the  would be  parallelograms, the  that  s c h e m a s methods i s  task  face,  so would expand c o n s i d e r a b l y  division  pyramids,  methods, t h e i r  added  do  methods a t t a c h e d  cuboids,  composed  parallelograms,  polygons of  i n the  into specific  polyhedron  more t r i a n g l e  into  composed  polygon schemata i n t o s u b c l a s s e s  turn,  order  polyhedra  objects  divided i n t o cuboids,  in  paralleloqrams.  or  Notice  explicitly  example, a r e n o t  are  triangles,  and  differentiated  Cuboids are  Wedges  arbitrary  called  are  a single triangle  o b j e c t s c o n t a i n i n g two  differentiated  and  pyramids.  faces only.  faces  objects  within  of p o l y q o n s  the and  recoqnized,  they  are  schemata.  Thus  the  Example f r o m  Machine V i s i o n  82  structures  are created  hierarchical discovered compiled  data  representation  i n the input,  before  The  dynamically. of not  i s input  to  schema. is  As t h e d a t a  created  function  i s illustrated  into  four classes i n t h i s  and  I.  in  Because t h e r e  the input  organization.  contains Besides  a list  stereotype, properties procedures,  Vertex-1 AR80W, of  4.2.  variable  Vertex-i.  4.3.  "ISA" s l o t  The  instance  hierarchy.  ARROW,  FORK,  a few p r i m i t i v e v e r t e x hierarchy  uses  list  each  This  Vertices are divided  They a r e  a simple  scene  instantiated  a schema  instance  Figure  Likewise,  of  T,  instances a  simple  of i t s instances, these  stereotypes vertices. type,  the  an a t t r i b u t e i n h e r i t a n c e mechanism. F o r  inherits which,  t h e schema in  turn,  Inherited bindings,  attributes  of i t s  i n h e r i t s t h e more attributes  pattern  can  general include  d a t a b a s e s , and methods,  method h i e r a r c h i e s .  4.4a i l l u s t r a t e s Each such  evidence  and v e r t i c e s ,  fully  i s read,  hierarchy.  VERTEX.  implementing  Figure  on  of i t s i n s t a n c e s , the p r i m i t i v e input  also provides  instance,  The  vertex in  c f the  compositions  o r g a n i z i n g t h e d a t a b a s e o f v e r t i c e s by v e r t e x  hierarchy  thereby  vertex  VERTEX m a i n t a i n s ;  possible  as a set of l i n e s  the vertex  FORK, L , T, and ARROW.  all  i s based  as a p r i m i t i v e  areonly  data,  scene  scene o f Figure  f o r each  and added t o t h e  construction  begins.  t h e program  each o f which i s r e p r e s e n t e d  a on  the r e c o g n i t i o n  program i s r u n on t h e  The  vertex  (Fahlman,  a typical  contains  p r i m i t i v e vertex  a number  1975) r e p r e s e n t s 4:  the  of  named  inverse  An Example f r o m  schema, slots. instance  Machine V i s i o n  Figure  4.2:  Input  Scene  4: An Example  from Machine  Vision  84  Figure  4.3:  Vertex  Instance  4:  Hierarchy  An Example  from  Machine  Vision  85  (VERTEX-TYPE) INSTANCE  (LINE-NAME) (CORNER)  VERTEX-i  (INTEGER)  Figure  4.4a: V e r t e x  Schemata  ^P^Z— INSTANCE  (VERTEX)  (VERTEX)  (INTEGER)  Figure  4.4b:  LINE-i  Line  Schemata  4: An Example from  Machine  Vision  86  relation  between  relation  every  instance  i s automatically created  defined.  It  will  point  either  i n the  vertex  and by  its  stereotype.  Maya when t h e to  the  This  instance  FORK, 1,  T,  is  o r ARROW  schema. A  second  slot  t o an atom r e p r e s e n t i n g additional  slots  the  i n the  schema's  instance  to represent  sectors of  i m p o s e s . on  i t s immediate l o c a l e ,  the  vertex  faces,  these  The for  sectors will slots  particular  to the  picture.  the  be  the  the  is illustrated  line  a similar  in  primitive generic  line  schemata. schema  and  the  p i c t u r e , and  the  V2,  connected  i t i n the  all  of  the  instances the  program  by  input before  of those  slots  Figure  labelled  4.4b  Each l i n e has  data  picture. is  read  more  a  12,  in  the  data and  of  and  each  i s created  vertices, As  13  input  of  for  each  s t r u c t u r e of  instance  of  f o r i t s name, i t s l e n g t h labelled  a matter o f  and  An  pclygon  11,  d e p i c t s the  begins.  as  The  description  Example f r o m  7 1  the in and  convenience,  represented  hierarchical 4:  When  4.5.  the r e c o g n i t i o n process of  4.5.  ANGIE-I1-L2  schema i s an  slots  vertex  represent  given  i n Figure  used  faces.  labelled  instances  names o f t h e two  consists  or  instance  manner, a schema i n s t a n c e  input data.  Three  each  i n d i c a t e approximate angles  the  IINE  that  p a r t o f one  vertex  points  Vertex-i.  shown i n F i g u r e  slots  used t o  NAME,  f o r L - v e r t i c e s ) are plane  as  The  line  ANGIE-I2-I3 a r e  In  (two  corners  vertex..  likewise,  s e c t o r s , as  as  of the  corresponding  name,  picture  been r e c o g n i z e d  remaining  the  point  has  instance, called  schema  output of  of the  Machine V i s i o n  87 L2  For ARROW, FORK, and T-Vertices  L2  For L-Vertex  F i g u r e 4.5: V e r t e x L a b e l l i n g  Conventions  4: fin Example from  Machine  Vision  88  recognized  s c e n e composed o f  or c o n v e r s e l y ,  4. 3 A n n o t a t e d  In  a report  following  the  explanation  by  an  the  p r o t o c o l produced  of  I t may  be  p a g e s , a p r o t o c o l i s used t o The  by on  the the  useful  schema  The  a  message  to recognize object  applying  top-down o r  conduct  a  of  Figure  shown s u p e r i m p o s e d  to a  begins  on  scene,  in  schema  the  the  preceded  statements  others  the 4.6  the  are  program to  the  follow  lines  and  of the  and  created  pyramid  be  failure. recognition  input  The  forced  the  the  during  vertices  appear.  to hypothesize subgoals.  Alternatively,  the  bottom-up  must  schema has If  An  the  i t  subgoal  a  choice  of  chooses  Specifically,  with the  Example f r o m  the  SCENE  i s incorrect,  may  Later,  to  c u b e , wedge,  based o n l y  schema  In  find  mentioned  I f a hypothesis  search.  top-level  as a scene.  alternatively  SCENE  4:  the  schema  difficulties  h a v e t o c h o o s e a nex  using  data  bottom-up t e c h n i g u e s .  s c h e m a t a as  schema w i l l  sending  SCENE  data.  top-down s e a r c h ,  will  by  i n t e r p r e t the  top-down r e c o g n i t i o n model w i l l  the  All  behavior use  the  f a c e schema i n s t a n c e s  r e c o g n i t i o n process  polyhedral  and  s e n t e n c e s which a r e  program.  to  facilitate  picture.  The  order  instances,  failure.  model.  process.  r e c o g n i t i o n are the  schema  p r i n t e d i n upper c a s e a r e  commentary  recognition the  of the  a s t e r i s k and  model.  specified  Protocol  the  authors  cf  fully  cr  begin  when  that its  sufficient  Machine V i s i o n  89  Figure  4.6:  Recognition  4:  o f a Redge  An Example  from M a c h i n e  Vision  90  supporting  evidence  hypothesized  for a single  schema can c o n f i r m  hypothesis  h a s been f o u n d , t h e  i t s recognition  using  top-down  technigues.  *  METHOD: TOP-LEVEL SCHEMA EXHAUSTIVELY OBSERVES EACH VERTEX  Since  no  evidence  has y e t been d i s c o v e r e d  particular  hypothesis, thetop-level  bottom-up  search technigues  data. that  The h e u r i s t i c given  each p r i m i t i v e peripheral cues than The  interior  each  vertex  plausibly  part.  p a r t s o f both  of  higher In  triangle  they  three  scene,  beginning  a r e l e s s ambiguous  with  as  the  interpretation  consists of activating phase.  as t h e i n p u t schemata  this  Since  data,  the vertex  vertices  need  only  i t may  be  may b e component  and p a r a l l e l o g r a m f a c e s .  Vertex  sectors  vertex  the recognition  i n t h e network  example,  each  VERTEX-1  i s an ARROW v e r t e x w h i c h , i n t u r n , i s a n  the generic  contain  schema i s t h e same  The schema e x h a u s t i v e l y a c t i v a t e s  i t s completion  SCENE SCHEMA OBSERVES  Vertex-1  i n the input  vertices.  i s given  compute o f which  *  as  observation process  schema t o p e r f o r m of  (1971).  by t h i s  v e r t e x schema i n t h e  vertices  Scene schema c h o o s e s t o u s e  by making o b s e r v a t i o n s  method u s e d  by Huffman  s u p p o r t i n g any  schema. since  ARROW,  they 4:  divide  instance  FORK, and T - v e r t i c e s the  picture  plane  An Example from  Machine  Vision  91  locally are  into  three  regions.  t a k e n t o be d e f a u l t and t h e g e n e r i c  procedure  f o r performing  such vertex inverse only  inherits  instance  vertex  A  vertex  process  polygon  m a t c h i n g o f Face-1  this  FACE,  the  by Maya.  The  which  instance  vertex  point,  a  as  of  a  has  a  a  consists of  are,  vertex  a s y e t , no  matches  i s seen  o f another  a supergoal of  by  face  a c t i v a t e s a method  corner  f o r each  i n turn, creates  o f Vertex-1  as  because  different  schemata  there  the  which,  by V e r t e x - 1  schema  this  corner  vertex,  the existence  d e s c r i p t i o n o f a polygon At  Each  and need n o t i n h e r i t i t  a  Thus,  The o b s e r v a t i o n  The  incorporates  L-vertex  a  by  f o r vertices therefore  match.  schema,  Face-1.  new  locally  For t h i s f i r s t  a cue t o hypothesize  the  the  t o match p o l y g o n f a c e  as  with  t h e V e r t e x schema automatically  i s possibly  of faces t o  instance,  f o rthese v e r t i c e s .  c a n be p a r t o f more t h a n one p o l y g o n f a c e  these s e c t o r s .  generic  provides  SCHEMA: FACE-1 CONTAINING A CORNER FOR VERTEX-1  and a t t e m p t i n g  instances  is  schema  sectors  OF VERTEX-1,  The c o m p l e t i o n  finding  from  maintained  defined  each s e c t o r o f a vertex face.  method  vertex  three  hierarchy.  S E C T 0 R - L 1 - L 2  * CREATE A NEW  completion  two s e c t o r s  procedure  from t h e v e r t e x  * FOB  this  relation  having  completion  of  Vertices containing  a new FACE  instance. associated  which  i t s newly  the  promptly evolving  face.  face  has 4:  been  hypothesized  An Example from  containing  Machine  Vision  92  Vertex-1.  Face-1  mechanisms. calling  The method  (either  multilateral),  for  continue  c o u l d use  the s e a r c h  familar  then  parallelogram,  those  vertices.  The  top-down  a  of  final  vertices  polygon  each  c o u l d be composed of> and f i n a l l y  T h i s mode i s r e j e c t e d b y  for  the  by V e r t e x - 1 .  schema That  interpretation  discovered resumed schema  For t h i s  Face-1.  matching  as  a  can  these  supergoal  repeat  expectations  and  Alternatively,  this  Face-1.  to continue cycle  Later,  of  the  i f  evidence  method  TWO  is be  Face-1«s r e c o g n i t i o n .  The  computing  a t some p o i n t i n t h e c y c l e ,  *  of  will  a  new  w a i t i n g f o r some e x p e c t a t i o n t o be  to the v e r i f i c a t i o n  set  constrains the possible  expectations,  technigues  CREATE  a new  The  as a f u n c t i o n of the i n f o r m a t i o n  i s , Vertex-1  of  of  locking  s e c o n d mode o f s e a r c h u s e s a bottom-up mechanism.  expectations  by  g u a d r i l a t e r a l , or  a c t i v e method o f Face-1 c o u l d compute d y n a m i c a l l y  provided  search  particular  triangle,  p r e d i c t i n g what t y p e s  p o s s i b l e polygons  v i a one o f two  s u b - s c h e m a t a as s u b g o a l s .  t h a t would i n v o l v e h y p o t h e s i z i n g  type  the  now  t h e methods o f o t h e r  polygon, face  can  set  of  satisfied.  i t can apply  top-down  of i t s hypothesis.  PROCESSES BOUND TO EXPECTATIONS FOR L I N E - 1 - 6  AND  LINE-1-5  The method o f F a c e - 1 c r e a t e s two e x p e c t a t i o n s and new  method  associative  to  each.  retrieval  Expectations mechanism. 4:  binds  a  a r e i n d i c e s o f t h e schema  T h e s e i n d i c e s must be knowable An Example f r o m M a c h i n e  Vision  93  by  both  the  schema  schema t h a t can final  match them.  interpretation.  vertices  a r e such  vertices they  c r e a t i n g t h e e x p e c t a t i o n s and  a  t h a t can  can  be  For  this  convention. be  used  interpretation  Expectations  of  are  problem, the  lines  Since  Face-1  both  constraining  vertices  as  faces  the  connecting and  to these  information  polygon  ether  c o n s t r a i n t s cn  p a r t o f F a c e - 1 have a c c e s s as  every  any  lines,  cn  the  (Mackworth,  1975,  1977b) . After  creating  schema's method  a  set  is still  of  expectations  active.  Since the  for  the r e c o g n i t i o n of p o l y g o n s ,  the  f u r t h e r r e c o g n i t i o n of i t s own  control the  to  the  of  hierarchy? the  The  * FOE *  Control  of  its  local  of  evidence  Face-1,  SECT0B-12-L3 OF  ATTEMPT TO  schema  been c o l l e c t e d  little  recognition  from  MATCH THE  cr defer at  i s completely  appraisal  has  very  scene  choice  i s made  evidence Since  the  methods  decision  i t s technigues  apply  which  to  the  i t can  the of  heuristic,  and of  Should general  the  method  i s based  as  schema's  to  relinquish  success.  such  discovered  i t s method s u s p e n d s  designed  more  top  supporting the  the  i t s technigues  probability  been  is  activated i t .  information,  has  Face-1,  method  schema, o r  method o f V e r t e x - 1  method a p p l y  knowledge  i t can  for  how  on The much  hypothesis.  supporting  the  itself.  VEBTEX-1, EXPECTATIONS OF  r e t u r n s to Vertex-1  FACE-1  which i s s t i l l 4:  An  actively  Example f r c m  pursuing i t s  Machine  Vision  94  completion  phase. ,  T h i s t i m e , however, i t f i n d s a p o l y g o n  instance  t o match s i n c e t h e p o l y g o n i n s t a n c e  Face-1.  The match f a i l s .  because  hierarchy  face  contains  S e c t o r - L 2 - L 3 c a n n o t be p a r t o f Face-1  S e c t o r - L 1 - L 2 o f t h e same v e r t e x  i s already  part of  this  face.  * CREATE A NEW SCHEMA: FACE-2 CONTAINING  A  new  face  recognizer,  Face-2,  method a c t i v a t e d a s a s u p e r g o a l Face-1,  the  inccrporating  method  creates  i s now h y p o t h e s i z e d  o f Vertex-1. the  first  Sector-L2-L3 of Vertex-1  * CREATE TWO PROCESSES  A CCRNEB FOB VERTEX-1  and i t s  As i n t h e c a s e  corner  cf  of  Face-2 by  into i t s description.  BOUND TO EXPECTATIONS  FOR  LINE-1-2  AND  LINE-1-6  Again t h e face  schema c r e a t e s  two e x p e c t a t i o n s ,  them, and r e t u r n s c o n t r o l t o V e r t e x - 1  FOR SECTOR-L3-L1 OF VERTEX-1,  *  ATTEMPT TO MATCH THE EXPECTATIONS OF FACE-2  *  ATTEMPT TO MATCH THE EXPECTATIONS OF FACE-1 A NEW SCHEMA: FACE-3 CONTAINING  * CREATE TWO PROCESSES  methods t o  which a c t i v a t e d i t .  *  * CREATE  binds  A CORNER FOR VERTEX-1  BOUND TO EXPECTATIONS  FOR  LINE-1-5  AND  LINE-1-2  4: An Example f r o m M a c h i n e V i s i o n  95  this  Vertex-1  continues  time f o r  its  third  two  existing  matching  the  schema, F a c e - 3 , completion  for  a l l schema i n s t a n c e s In t h i s  match t h e search can  phase  as  of  expectations  recognizers  before.  searching  schemata to  Sector-L3-L1.  face  Vertex-1  the  polygon  search  of each  face  complex,  fail, has  involves only instance.  perhaps  now  and  a  at new  finished hierarchy  might p l a u s i b l y be  In  matching schemata w i t h i n the  arbitrarily  match,  Attempts  instance  which i t s s e c t o r s  example, t h i s  for higher  be  by  f o r higher  sector,  i s created  its  part.  looking  attempting general,  schema  recursively  to the  hierarchy involving  recognition.  *  SCENE SCHEMA OBSERVES  Control  has  VERTEX-2  returned  observe v e r t i c e s i n the  t o the  heuristic  Vertex-2 i s a c t i v a t e d next vertex face  will  attempt  hypotheses  of which  face  i t can  which c o n t i n u e s  ordering  to perform  to f i n d  SECT0R-L1-L2 OF  s c e n e schema  i t s completion  recognizers be  mentioned  The  t c match, t h a t  i s ,  part.  PGR  *  ATTEMPT TO  MATCH THE  EXPECTATIONS OF  FACE-3  *  ATTEMPT TO  MATCH THE  EXPECTATIONS OF  FACE-2  Vertex-2  VEBTEX-2,  BEEN MATCHED BY  has  earlier.  phase.  *  * FACE-2 HAS  to  found  VERTEX-2  Face-2 Hz  and An  matched  Example  from  one  of  its  Machine V i s i o n  96  expectations,  namely, t h a t  vertex.  method  The  activated; Two  recognized.  a clockwise  direction.  The line  comprising  the face  * VERIFY FACE-2  search  of is  enough  the  the  schema's  of  search  proceeds  from  has t e e n  evidence that  of  is  faces.  the  face  of the face  counter-clockwise  some  vertex  until  via  the  a  region  closed.  has been d i s c o v e r e d  the r e c o g n i t i o n of  by  The d i s c o v e r y  search  a  using  polygon  method t o t h e  o f two  bottom-up face  is  verification  neighbouring  vertices  t h e f a c e r e c o g n i z e r t o be enough e v i d e n c e  modes  is  a  mode.  heuristic  In g e n e r a l ,  decision  to the  made by a  methods.  * INCORPORATE THIS VERTEX  vertices  a  v e r t e x and s o on  * GET NEXT CLOCKWISE NEIGHBOUR VERTEX:  The  for recognizing  in  from bottom-up t o top-down s e a r c h  choice  expectation  periphery  ether  t h e schema a p p l i e s a top-down  considered  that  USING TOP-DOWN SEARCH  the hypothesis.  switch  with  t h e matching  One method f o l l o w s t h e p e r i p h e r y  t o the next  to conclude  likely,  to f o l l o w  direction,  connecting  When  associated  Line-1-2 with  u s e s t h e f o l l o w i n g scheme  methods a r e d e f i n e d  being in  i t  i t shares  top-down until  method  a closed  INTO  A NEW  VEBTEX-3  CORNER OF  uses a c l o c k w i s e  figure  i s formed.  FROM LINE-2-3 FACE-2  tour of As  each  An Example f r o m  neighbouring vertex  is  Machine V i s i o n  97  discovered,  i t  is  composed  description  of the polygon  discovered  during  same f a c e , t h e n into  this  continued.  this  face  instance  violate  the c r i t e r i o n  to  Because  internal  tour  they  this  completed  recognizer  description and  to  is  the  information  modularity are  is  the r e c o g n i t i o n c f the  of  have a c c e s s  for  merged  tour from  is one  and does n o t  the  instances  recognition  of  information  the  same  about  the  other.  NEIGHBOUR  VEHTEX: VERTEX-6 FROM I I N E - 3 - 6  * INCORPORATE THIS VERTEX INTO A NEW * GET NEXT CLOCKWISE  the evolving  straightforward  schemata  s t r u c t u r e o f each  * GET NEXT CLOCKWISE  i s  in  face  description  transfer  o f schema  already  corner  attempting  another  both  a  I f another  recognizer's  Note t h a t  stereotype,  face.  i t s partially  schema  model.  into  NEIGHBOUR  CORNER OF FACE-2  VERTEX: VERTEX-1 FROM LINE-1-6  * THIS VERTEX IS ALREADY CONTAINED IN FACE-2  The the Since  top-down method c o n t i n u e s  description this  vertex  method has f o u n d  of  Face-2  i s already  until  i t attempts  part of  a closed region,  * COMPARE FACE-2 TO POLYGON  to incorporate  this  vertices  t o add  face,  the polygon  the  into  Vertex-1. top-down  face.  MODEL  * COMPLETED FACE-2 I S A PARALLELOGRAM  It  i s the task  o f Face-2 t o d e c i d e  t h e type  4: An Example from  of i t s  pclygon  Machine V i s i o n  98  from  information  obtained  during  example, p a r t o f t h a t i n f o r m a t i o n each  vertex  s e c t o r i n the  this  information  parallelograms, that  to  has  an  and  manifest  are  the  * MATCH THIS FACE TO  Face-2 now internal  cue  contained  i n the  schema  beqins  polyhedron  and  general, concept  completion  can  attempt schemata  be  of  by  sendinq  and  decides that  search  the  a  piocess  schema.  POLYHEDRON RECOGNIZEES  phase  as  Part  only  to s t i m u l a t e the  of  triangles,  models  guide the  p o l y g o n s can  part  angle  of  with  this  F a c e - 2 compares  the  f a c e schema i s o f what h i q h e r hierarchy  In  the  multilaterals,  EXPECTATIONS OF  its  of  model  i n the r e c o g n i t i o n process.  example, p o l y g o n s will  size  methods a s s o c i a t e d  THE  composition  Face-2  In  i t s stereotype as  i s the  internal  quadrilaterals,  of  recognition.  face's d e s c r i p t i o n .  i t i s a parallelogram.  schema  its  a  high-level  of the concepts  in  the  a part.  In  this  be  polyhedral  r e c o q n i t i o n of  messages  kncwledqe  to  objects. particular  each  of  the  recognizers. The  completed  f a c e schema i s c h a r a c t e r i z e d as  qenerator  of  possible  higher  schemata  hierarchy.  The  algorithm  used  this  to  match a s i n g l e p o l y h e d r o n  a part. every case,  Failing polyhedron  a new  to  find  such  schema t h a t  polyhedron  by  in  of  a schema, i t w i l l i t may  recognizer U:  be  bottcm-up  the  generator  schema i n s t a n c e  a  is  composition to  which i t must attempt  part of.  In  Example f r o m  to  this  must a l s o be c r e a t e d An  attempt be  match latter  with  this  Machine V i s i o n  99  polygon  as  conceivably, there  are  i t s  first  be p a r t no  o f no e x i s t i n g  existing  matches t h e g e n e r i c  component  because  polyhedron  polyhedra  polyhedra  face  instances  i t  instance.  schema.  IS FACI-2 COMPATIBLE WITH THIS CLASS OF POLYHEDBA?  *  YES  it  will  As  polyhedron accept  shown  types  instance  the completed  by t h i s  of  instances  model.  as p a r t  of  higher  i t s own  schema, then  schema  This  stereotype. schemata.  i t will  during within  expectations  by a n o t h e r  * CEEATE  a  satisfaction  A NEW  Parallelograms  its  description.  a  knew  about  is  c f the  t o know t h e  t o match t h e e x p e c t a t i o n s  schema  and  phase. the  The  creaticn  matching  of  of of  those  procedural  between two s c h e m a t a .  SCHEMA: POLYHEDRON-1 CONTAINING  schema i n s t a n c e  valid  recognizing  schema i s c h a r a c t e r i z e d as a  are v a l i d  more  I f a schema c a n be p a r t o f some  be a b l e  process  as  modularity  I t d o e s n o t need  i t s completion  expectations  constraint  of  schema c a n a c c e p t  illustrates  A schema n e e d o n l y  requirements of other  new  face  Face-2 t o d e c i d e whether  e x a m p l e , t h e p o l y g o n schema c a n r e c o g n i z e  polyhedra.  recognition  that  analyzes  o f polygons than the polyhedron  faces  Since  t o match, Face-2  *  The  could,  faces  of polyhedra  created  and  FACE-2  i n t h i s example.  parallelogram  4: An Example f r o m  Face-2  A is  Machine V i s i o n  100  incorporated use  either  and  of  a  search,  on t h e o t h e r  what  polygon  its  recognition.  use  of particular  search  search  hypothesis schema  polygon  supporting  the polyhedron,  faces  Bottcm-up  based  new  where  can  create  f a c e s , and w a i t  In t h i s  a  on i t s  t o propagate committment  using  bottom-up  expectations  for  f o r the discovery of  example, s i n c e  a particular  to  expectations  a  a t a time,  the would  polygon  would have t o be d i s c o v e r e d  the polyhedron  t h e bottom-up  top-down  Face-2, can c r e a t e  U n l i k e top-down  such a f a c e o r f a c e s . evidence  from  faces  possible  use  further  sub-schemata a s subgoals.  Instead,  made t o a s i n g l e  mechanisms,  To  to  could  hand, would n o t r e q u i r e a commitment  hypothesis.  of  multiple  those  This recognizer  technigues  the existence  instantiation  be  bottom-up  polyhedron.  activating  particular  must  or  hypothesizing  then  partial  i t s new d e s c r i p t i o n .  top-down  recognition involve  into  there  hypothesis,  is  little  Polyhedron-1  will  mechanism.  * COMPUTE EXPECTATIONS ABOUT OTHER FACES OF POLY HEDRON-1  Polyhedra  a r e composed  common e d g e s a n d v e r t i c e s . the that For  polyhedron i t has  schema matched  of  To r e c o g n i z e  faces  connected  with  i t s own i n t e r n a l  c o n n e c t e d n e s s a s used by Guzman  based (1968).  on  by  instances of polyhedra,  compares t h e i n s t a n c e s o f p o l y g o n a l  t h i s example, t h e model i s  sharing  polygonal  model o f p o l y h e d r a .  the  notion  of  Any two p o l y g o n a l  a common edge w h i c h i s t h e shank o f an ARROW v e r t e x 4: An Example  faces  edge faces are  from M a c h i n e V i s i o n  101  part  of  the  same  object.  Other edges shared edges.  The  concept  of  two  use  of this  model  guided  i n f o r m a t i o n about (Mackworth,  by  These a r e c a l l e d faces  scheme  are called i s intended  recognition.  the i n t e r p r e t a t i o n  1977b) h a s been i g n o r e d  A  "connect"  edges.  "maybe-ccnnect"  t o demonstrate the whole  variety  of three-dimensional  of  scenes  f o r t h e sake o f s i m p l i c i t y .  * FOE LINE-1-6 OF FACE-2, * CREATE  A PROCESS BOUND TO THE CONNECT EXPECTATION:  LINE-1-6  * FOR LINE-3-6 OF FACE-2, * CREATE  A PROCESS BOUND TO THE CONNECT EXPECTATION:  Polyhedron-1 of  Face-2, b i n d i n g  edges of  of  creates  expectations  f o r each  a method t o e a c h e x p e c t a t i o n .  Face-2 a r e L i n e - 1 - 6 and Line-3-6  ARROW v e r t i c e s  LINE-3-6  " c o n n e c t " edge The  "connect"  which a r e t h e s h a n k s  1 and 3 r e s p e c t i v e l y .  * FOB LINE-2-3 OF FACE-2, *  CREATE  A  PROCESS  BOUND  TO  THE MAYBE-CONNICT  EXPECTATION:  LINE-2-3 * FOR LINE-1-2 OF FACE-2, * CREATE  A  PROCESS  BOUND  TO  THE  MAYBE-CONNECT  EXPECTATION:  LINE-1-2  Different  methods a r e bound t o " m a y b e - c o n n e c t " e x p e c t a t i o n s f o r  e a c h o t h e r edge o f F a c e - 2 . *J: An Example f r o m  Machine V i s i o n  102  After  the  expectation it  may  cues  active  phase,  attempt  to  decision,  i t may  choose  its  of  a  own  recognition  scene.  Again,  Polyhedron-1  is  the o b s e r v a t i o n  an  invalid  migrate  away  Polyhedron-1 attempt  match  will  t o match  Polyhedron-1  activating On  this  for  this  schema.  possibly  their  new,  methods  polyhedron  will  matching of  i f  a polygon  i t s methods.  interpretation.  Polyhedron-1  hypothesis  these  c f Polyhedron-1  dominate long  soon by  which  will  schemata.  If  will  instead thereby  indeed  a  this  will  method  succeed i n  thereby r e a c t i v a t i n g towards  a  i n t h e top-down model,  the  valid  t o t h e weaker method o f  f a c e i n t h e scene t h a t  the contrary,  can  catastrophically For  control  is  Thus s e a r c h i s s e e n t o c o n v e r g e To  will  i t  instead.  hand,  an e x p e c t a t i o n  but  recognizers  schema above i t i n t h e method h i e r a r c h y ,  discover  d e c i d e s to  observed  of faces  polyhedron  the  of success.  scene, c o n t r o l vertices  as  heuristic  scene  t h e wrong h y p o t h e s i s , t h e s e f a c e s  the other  Scene  is a  the input  s t i m u l a t e the r e c o g n i t i o n  h y p o t h e s i s but t h e method y i e l d s the  subsequently  choice  The  or  o f polygon f a c e s  I f Polyhedron-1  from  the e x p e c t a t i o n s of  is  other,  of v e r t i c e s  the  execution  must e s t i m a t e i t s l i k e l i h o o d  hypothesis from  and  the  However, t h e c h o i c e i s n o t c r i t i c a l . direct  has c o m p l e t e d  to terminate i t s  to s t i m u l a t e the r e c o g n i t i o n  drive  recognition  method o f P o l y h e d r o n - 1  search  valid a  process  one  bad  for  a  apply  a  time.  reasons,  Polyhedron-1  bottom-up t e c h n i q u e f o r s t i m u l a t i n g 4: An  i t s own  decides  to  recognition.  Example f r o m  Machine  Vision  103  *  METHOD:  SEARCH  FOR  OTHER FACES OF POLYHEDRON-1 BY  VERTICES OF FACE-2 THAT MAY  OBSERVING  BE PART OF MORE  THAN  ONE  FACE  This  heuristic  observes  p o l y h e d r o n c a n be p a r t both by  more p o w e r f u l  the scene  face  This  t o be p a r t o f t h i s  i s good o n l y  Sector-L1-L3  unknown  *  This  because  such  polyhedra,  i s seen t o i n c o r p o r a t e  method  of v e r t i c e s  same p o l y h e d r o n .  f o r recognizing  of this  a  is used  second  However, i t s not  scenes.  a trade-off  between  applicability.  next  remaining  of the v e r t i c e s  o f more t h a n one f a c e .  * POLYHEDRON-1 OBSERVES  The  sector  than the simple enumeration  method h i e r a r c h y  power and  each  schema and more s p e c i a l i z e d  is likely  expertise  that  vertex of  this  VERTEX-6  observed vertex  is  a  FORK  i s already  two s e c t o r s may be p a r t s  part  vertex,  Vertex-6.  of Face-2,  o f two o t h e r ,  but,  but the as  yet,  faces.  FOR SECT0B-L1-L2 OF VEBTEX-6,  * ATTEMPT TO MATCH THE EXPECTATIONS OF FACE-3 * ATTEMPT TO MATCH THE EXPECTATIONS OF FACE-1 * FACE-1 HAS BEEN MATCHED BY  Vertex-6  conducts  VERTEX-6  i t s completion Hz  phase  by  An Example from  atteupting Machine  to  Vision  104  match  the  Vertex-6 match  created  by F a c e s - 3 and 1.  be p a r t o f any i n t e r p r e t a t i o n  c f F a c e - 3 and t h a t  expectations  cannot fails.  It  previously  i s , however,  successful  expectation  o f Face-1, s p e c i f i c a l l y ,  with  vertex.  some  this is  expectation the  second  search the In  using  i s a c t i v a t e d as a supergoal vertex  discovered  level  complexity,  perhaps  mechanisms.  & subgoal  observations on  the search  to  * GET  by a  can  expectations,  this  face  touring  can  be  of  as  of  data.  arbitrary  create  expectations, a t t e m p t t o make  The o n l y  restriction  i s that i t eventually  to i t s c a l l e r .  USING TOP-DOWN SEARCH  NEXT CLOCKWISE NEIGHBOUR VERTEX: INTO  A NEW  INTO  A NEW  VERTEX-5  CGBNEB OF  NEXT CLOCKWISE NEIGHBOUR VERTEX: I S ALREADY CONTAINED IN  VERTEX-4 FROM  CORNER OF  NEXT CLOCKWISE NEIGHBOUR VERTEX:  * THIS VERTEX  simple  and then  expectations.  or f a i l u r e  * INCORPORATE THIS VERTEX * GET  level  mechanisms used by a s u b g o a l  * INCORPORATE THIS VERTEX * GET  of  b e c a u s e v e r t i c e s were g i v e n  a t any  matching those  * VERIFY FACE-1  This  i n v o l v i n g r e c u r s i v e l y t h e use o f bottom-up  those  must r e t u r n a s u c c e s s  of Vertex-6.  I n t h i s e x a m p l e , t h e top-down  i s achieved  schema i n s t a n c e s  methods  Line-1-6  shares  existence  g e n e r a l , however, g o a l d i r e c t e d s e a r c h  bind  an  f o r Face-1 a n d , a s b e f o r e , t h e  to v e r i f y the  top-down s e a r c h .  at the vertex  input  i t  matching  T h e bottom-up method t h a t had been bound t o  P o l y g o n schema a t t e m p t s instance  that  at  VERTEX-1  LINE-4-6  FACE-1 FROM LINE-4-5 FACE-1 FROM LINE-1-5  FACE-1  4: An Example f r o m  Machine V i s i o n  105  * COMPARE FACE-1 TO POLYGON HODEL * COMPLETED FACE-1 I S A PARALLELOGRAM  Face-1 vertices-1,  has  found  4,  and 5.  6,  created  with  a corner  against  the  polygon  a  closed  A description  f o r each  vertex.  as a v a l i d  Face-1 b e g i n s  by  polyhedron a  r e c o g n i z e r s having  schema  activation  EXPECTATIONS  i t s completion  parallelogram.  matched  as  is  Face-1 a  seen  supergoal as  an  opposite  i s  compared  angles,  The  and  is  algorithm,  each  scheduling  I t must  resume  processes  completing  instances  being  each  matched  successfully  This  supergoal  process  scheduling  through  some  global  schema c a n use i t s own  Processes  suggesting  find  of  process.  algorithm.  discovery of evidence  OF POLYHEDRON RECOGNIZEES  intelligent  scheduling  the  face i s  model o f p o l y g o n s .  phase.  will  Instead of a c t i v a t i n g  by  face  expectations  mechanism.  domain s p e c i f i c  polygon  of  parallelogram.  * MATCH THIS FACE TO THE  of  egual  composed  of t h i s The  schema's i n t e r n a l  f i g u r e i s a g u a d r o l a t e r a l having labelled  figure  their  are  scheduled  applicability  as  supergoals. Face-1 • w i l l existing with.  first  polyhedron  attempt  t o match t h e e x p e c t a t i o n s c f an  recognizer that i t shares  a  '•connect"  I f i t i s s u c c e s s f u l , t h e method bound t o t h e  expectation w i l l  be resumed a s a s u p e r g o a l 4:  process.  An Example f r o m  edge  polyhedron's If  Face-1  Machine V i s i o n  106  is  able  to  successfully, in  find  must not  also part  a  "connect"  i t s t a s k i s done.  sequence  recognizers  such  to  match  the  e x p e c t a t i o n and B a t c h i t  Otherwise, expectations  of  attempt  a l l polyhedron  w i t h w h i c h i t s h a r e s a " m a y b e - c o n n e c t " e d q e , and i t c r e a t e a new p o l y h e d r o n schema  o f any e x i s t i n g  recoqnizer  F a c e - 1 must  matched  i n s t a n c e i n case  interpretation.  by t h e f a c e schema,  For  each  t h e method  i t i s  polyhedron bound  t o the  matched e x p e c t a t i o n i s resumed a s a s u p e r g o a l p r o c e s s .  * ATTEMPT TO MATCH THE CONNECT EXPECTATIONS OF POLYHEDBGN-1 * TRY  LINE-U-6  * TRY LINE-1-6 *  A  CONNECT  EXPECTATION  OF  POLYHEDRON-1  HAS BEEN MATCHED BY  FACE-1  Face-1 f i n d s schema the  and a t t e m p t s t o match P o l y h e d r o n - 1 .  face  s h a r e s a " c o n n e c t " edge w i t h F a c e - 2 o f t h e p o l y h e d r o n , s o  match i s s u c c e s s f u l  •IS  This  FACE-1  and t h e p o l y h e d r o n ' s  method  i s resumed.  COMPATIBLE WITH THIS CLASS OF POLYHEDRA?  * YES  The method its  of Polyhedron-1  compares t h e p o l y g o n  i n t e r n a l model o f p o l y h e d r a .  composed accepted  of  both  trianqles  and i t s i n t e r p r e t a t i o n  In t h i s system,  and  polyhedra  paralleloqrams.  results i n  the  4: An Example f r o m  instance to are  Face-1  is  propaqation  of  Machine  Vision  107  Polyhedron-1* s r e c o g n i t i o n .  * COMPUTE TRANSITIVE  EDGE CLOSURE FOR THIS  FACE  * FOR LINE-1-5 OF FACE-1, *  CREATE  A  PROCESS  BOUND  TO  THE MAYBE-CONNECT  EXPECTATION:  LINE-1-5 *  FOR L I f l E - 4 - 5 OF FACE-1,  * CREATE A  PROCESS  BOUND  TO  THE  MAYBE-CONNECT  EXPECTATION:  LINE-4-5 *  FOR LINE-4-6 OF FACE-1,  * CREATE A PROCESS BOUND TO THE CONNECT EXPECTATION:  Polyhedron-1 description contained closure. created of  *  in  Polyhedron-1.  A t t h e same  new f a c e  completing  This i scalled  time,  f o r each remaining  schema's  the  instance  into i t s  by c o m p u t i n g w h i c h e d g e s o f Face-1 a r e e d g e s  the polyhedron.  other  incorporates  LINE-4-6  a  new  face  i t stransitive  set of  expectations  edge o f F a c e - 1 n o t c l o s e d  These edges  represent  schemata  will  be  already  the  cues  able  edge are  with  edges  by  which  t o match  this  expectations.  DOES DESCRIPTION  OF POLYHEDRON-1 SATISFY THE  COMPLETE POLYHEDRAL  CRITERIA  .FOR  A  OBJECT?  * NO  At t h i s  p o i n t , the polyhedron checks to see i f i t s i n s t a n c e 4: An Example f r o m M a c h i n e  Vision  108  is  fully  instantiated.  expectations  *  remaining  I t i s net.  METHOD: OBSERVE VERTICES THAT WILL DRIVE  Having f i n i s h e d  i t s expectation  hopefully satisfy  by  observing  be  p a r t o f some y e t  now  two  methods a r e  unrecognized of  vertices  neighbouring  faces.  through  common d a t a  Polyhedron-1. efforts decide  must of  a  be  polyhedron  OF  Polyhedron-1 a p p l i e s  which s h o u l d The  o f i t s component face.  may  Notice  the  If  instantiated  i s a bad  I t i s no  of  longer  there  Both  recognition with  each  the  instance the  may are  active.  schema  hypothesis,  this  faces that  of  ether  instance  i t s r e c o g n i t i o n , but  one  such  I t does  that  communicate  structure,  stimulate  recognition of  expectations.  c o n t r i b u t e to  a fully  suspended.  RECOGNITION  to s t i m u l a t e the  coordinated.  that either  that the  They  Both can  must be  THE  Polyhedron-1 simultaneously  observing  their  faces.  i t s own  three-line vertices  methods  phase,  vertices  r e c o g n i t i o n of neighbouring  faces w i l l  "connect"  FACES  a b c t t o m - u p method by o b s e r v i n g the  still  unsatisfied.  NEIGHBOURING  or  There are  of  their  methods  should  has  fcund,  been  other  a p p l i c a b l e to the  method  discovery  scene.  * POLYHEDRON-1 OBSERVES VERTEX-4 *  FOR  SECTOR-L1-L2 OF  * ATTEMPT TO  MATCH THE  VEBTEX-4, EXPECTATIONS OF Hz  An  FACE-3  Example f r o m  Machine V i s i o n  109  * CREATE A NEW SCHEMA: FACE-4 CONTAINING * CREATE TWO PROCESSES  A COB NEE FOR VEETEX-4  BOUND TO EXPECTATIONS  FOR  LINE-4-6  AND  LINE-3-4  The  polyhedron  a vertex another by  method f i r s t  undiscovered  match.  to  find  Only  face. existing  Face-3  represented  by  Face-3.  uncompleted  i t s description  a  instance  and u s e s t h e v e r t e x schema.  consist  methods  bound t o p a t t e r n s  case, Line-4-6  expectation  and  As  instance.  phase and r e t u r n s c o n t r o l  to  fails. region  Face-4 i s  and one c f i t s  incorporates  Vertex-4  t o c r e a t e a new s e t o f  before,  Line-3-4.  phase  recognizers  hierarchy,  T h e new r e c o g n i z e r  cf  Vertex-4 requests the  a new p o l y g o n f a c e  f o r the  this  face  result.  expectations of  part  be p a r t o f t h e b a c k g r o u n d  As  added t o t h e p o l y g o n  methods i s a c t i v a t e d .  be  r e m a i n s u n c o m p l e t e d , b u t t h e match  schema t o c r e a t e  created,  could  Vertex-4 b e g i n s i t s completion  Sector-L1-L2 o f v e r t e x - 4 cannot  into  Vertex-4 because i t i s  o f one o f i t s component f a c e s t h a t  trying  polygon  observes  these  containing  Face-4  has  expectations line  cues, i n  finished i t s  to Vertex-4.  *  FOR SECTOR-L3-L1 OF VERTEX-4,  *  ATTEMPT TO MATCH THE EXPECTATIONS OF FACE-4  * ATTEMPT TO MATCH THE EXPECTATIONS OF FACE-3 * CREATE A NEW SCHEMA: FACI-5 CONTAINING *  CREATE  TWO  PROCESSES  A CORNER FOR VERTEX-4  BOUND TO EXPECTATIONS  FOR LINE-3-4 AND  LINE-4-5 4: An Example from  Machine  Vision  110  Vertex-4  still  has  one  remaining  Sector-L3-L1.  Neither of the l i n e s  Face-4,  can they  they  Nor  are part  information  interpretation.  this  sector  sector,  can  match  match t h e e x p e c t a t i o n s o f F a c e - 3 ,  o f t h e same r e g i o n .  (possibly  of  uncommitted  There  i s not yet c o n s t r a i n i n g  p r o v i d e d by V e r t e x - 5 )  T h u s , a new  though  to link  f a c e , Face-5,  is  them t o same  created  in  the  manner d e s c r i b e d f o r F a c e - 4 . The  behaviour o f Vertex-4  generator returned face in  of  possible  t o Vertex-4,  of  which  heuristic  existing  higher supergoals.  i t  order, f i r s t  that  generates  t o be a p a r t .  pclygon  Only i f  i s characterized Each  another  a  bottcm-up  time  control i s  plausible  attempting t o a c t i v a t e  will  pclygon  As w e l l , i t g e n e r a t e s t h e s e  recognizers  fails,  as  which  i t  those  i t c a n match  generate  a  new  faces  already  successfully. polygon  face  instance.  * POLYHEDRON-1 OBSERVES  Vertex-4 control  to  observing  * FOR *  has  finished  Polyhedron-1 likely  VERTEX-6  generating  which  proceeds  vertices, this  s u p e r g o a l s and r e t u r n s with  time a c t i v a t i n g  i t s methcd  cf  Vertex-6.  SECTOR-L2-L3 OF VERTEX-6,  ATTEMPT TO MATCH THE EXPECTATIONS OF FACE-5  * ATTEMPT TO MATCH THE EXPECTATIONS OF FACE-4 * FACE-4 HAS  BEEN MATCHED BY VERTEX-6 4: An Example f r o m  Machine  Vision  111  Sector-L2-L3 part  i s  o f seme p o l y g o n  the  face.  only  sector  Vertex-6  o f Vertex-6  first  not a l r e a d y  attempts  to  match  Face-5  a s a p o s s i b l e h i g h e r s u p e r g o a l , b u t t h e match f a i l s .  attempt  a t matching  of  face.  this  Face-4 s u c c e e d s ,  * VERIFY FACE-4 USING TOP-DOWN  thereby a c t i v a t i n g  An  a method  SEARCH  * GET NEXT CLOCKWISE NEIGHBOUR VERTEX: VERTEX-3 FROM LINE-3-6 * INCORPORATE  THIS VERTEX INTO A NEW  CORNER OF FACE-4  * GET NEXT CLOCKWISE NEIGHBOUR VERTEX: VERTEX-4 * THIS VERTEX I S ALREADY  FROM LINE-3-4  CONTAINED I N FACE-4  * COMPARE FACE-4 TO POLYGON MODEL * COMPLETED FACE-4 I S A TRIANGLE  Face-4 s e a r c h e s another then closed  f o r i t s remaining v e r t i c e s  vertex, finding  confirms  that  figure  and t h a t  that  by h y p o t h e s i z i n g  v e r t e x by f o l l o w i n g  i t s component i t s type  is a  lines  Line-3-6.  and v e r t i c e s  MATCH THE CONNECT EXPECTATIONS  a  triangle.  * MATCH THIS FACE TO THE EXPECTATIONS OF POLYHEDRON *  form  It  RECOGNIZERS  OF POLYHEDRGN-1  * TRY LINE-3-6 *  A  CONNECT  EXPECTATION  OF  POLYHEDRON-1 HAS BEEN MATCHED EY  FACE-4 * I S FACE-4 COMPATIBLE *  WITH THIS CLASS OF  POLYHEDRA?  YES 4: An Example f r o m  Machine  Vision  112  Face-4  finds  polyhedron  instance  expectation the  Polyhedron-1,  of  hierarchy,  this  and  recognizer.  common " c o n n e c t " e d g e . Expectations  the  are  single  member  matches  Both  of the  a  "connect"  F a c e - 4 and F a c e - 2  share  Line-3-6. equated  with  constraints.  Line-3-6  c o n s t r a i n s t h e i n t e r p r e t a t i o n o f F a c e - 4 and Face-2 t o be p a r t o f the  same  object.  procedural throuqh  recoqnition  c o n s t r a i n t propaqation,  the  schemata  methods a t t a c h e d  network  process  where  i s  the  directed  c a n be viewed flow  of  as a  ccntrol  by t h e p r o c e d u r a l  t o t h e nodes i n t h e n e t w o r k .  * COMPUTE TRANSITIVE *  The  EDGE CLOSURE FOR THIS  FACE  FOR LINE-3-4 OF FACE-4,  * CREATE  A  PROCESS  BOUND  TO  THE  MAYBE-CONNECT  EXPECTATION:  LINE-3-4 * FOB LINE-4-6 OF FACE-4, • L I N E - 4 - 6 MATCHES A CONNECT EXPECTATION  Polyhedron-1 i n c o r p o r a t e s by  computinq  other  *  the t r a n s i t i v e  OF POLYHEDBON-1  t h e new f a c e  edqe  closure  into i t s description of  Face-4  with i t s  faces.  DOES  DESCRIPTION  OF POLYHEDBON-1  SATISFY THE CRITERIA FOR A  COMPLETE POLYHEDRAL OBJECT? * YES: POLYHEDRON-1 I S A SEDGE  4: An Example f r o m  Machine V i s i o n  113  The  addition  constrain  of  the  instance.  in  description  the  is  which i t shares against  has  been  interpretation  differentiated remaining  Face-4  and  labelled  t h e schema's i n t e r n a l  information to to  a r e no " c o n n e c t " each  face  "connect" The  new  Polyhedrcn-1  There  schema  an edge.  cf  enough  in  fully  expectations  the  with e v e r y  completed  a  schema's  other face  instance  model o f p o l y h e d r a  is  with  compared  and i s l a b e l l e d  a wedge s i n c e i t i s composed o f two p a r a l l e l o g r a m s and a  single  triangle.  *  HATCH COMPLETED POLYHEDRON-1 TO THE EXPECTATIONS OF THE  SCENE  SCHEMA The  method  completion  of  phase.  Polyhedron-1  However,  schema c u r r e n t l y a c t i v e . observing  vertices.  instrumental  in  now  i t i s not the only  T h e r e a r e two o t h e r  In  fact,  observing  these the  The  mechanism  concurrent completing method  t a s k and t h e y  methods  suspended.  is  with The  the the  achieving realized  of  concurrent  vertices  that  this  methods  methods  T h e s e methods  this within  schema  completion same  schema's  were  stimulated have  now  must be s u s p e n d e d .  schema matches a n o t h e r  performing  associated  for  its  method  other  Polyhedron-1's s u c c e s s f u l r e c o g n i t i o n . performed t h e i r  begins  completion. as  a  of  mechanism as a Maya l a n g u a g e p r i m i t i v e  schema this  among When  supergoal,  and a l l e t h e r a c t i v e  completed  implementation  coordination  are  structure  i s discussed i n the  4: An Example f r o m  the  methods  instance  ccntrol  a  next  Machine V i s i o n  1 14  chapter. In rather of  t h i s example, Polyhedron-1 deterministically.  scenes.  matched and  *  I t knows t h a t  The s c e n e schema  by  a  t h e method  performs i t s completion  completing  polyhedra  h a s an e x p e c t a t i o n  polyhedron.  o f t h e s c e n e schema  are only  waiting  The match  phase part  to  be  i s successful,  i s activated.  SCENE RECOGNIZES HAS FOUND A SCENE COMPOSED OF POLYHEDRC N-1 For  single  brevity,  polyhedral  recognition, program  i t i s assumed object.  finding  terminates  hierarchical  a scene  T h e s c e n e schema  a  scene  composed  sucessfully,  description  that  i s composed  has  completed i t s  of Pclyhedron-1.  returning  to  of a  top-level  The the  o f the scene.  4.4 C o n c l u s i o n  This operation Many  example  o f t h e i d e a s embodied by t h i s s i n g l e  these ideas  intelligence describes  a  of t h i s recognition  illustrated of  provides  high  the design  description  model i n a s c e n e a n a l y s i s  i n t h e model c o u l d example.  i s made m a n i f e s t  programming  level  The  precise  i n this thesis  l a n g u a g e c a l l e d Maya.  o f t h i s programming  only  of the  program.  be p a r t i a l l y specification  a s an  artificial  The n e x t  chapter  language.  4: An Example f r c m  Machine  Vision  115  CHAPTEJ 5:  5.1  MAYA  Introduction  Maya  is  a  multiprocessing  number o f e x t e n s i o n s the lists which  LISP  to the  language.  Maya  o f L I S P t o a new can  be  used  data  semantic  structures  for  multiple  primitive  networks.  integrating  modelled  after  An  that  that defines a  ccntrol  type  p r i m i t i v e s of  called  s c h e m a t a and Maya  defines  top-down  and  The  object  to construct specific  frame  ccntrol  bottom-up s e a r c h as  f o r c r e a t i n g and  interactive  INTERLISP  property  the  language p r o v i d e s ,  and  extensive of  and  data  f o r p a t t e r n matching  processes.  dialect  g e n e r a l i z e s t h e OBLIST and  schema-based r e p r e s e n t a t i o n s . primitives  types  to represent  s y s t e m s and  LISP  well,  scheduling  debugging  (Teitelman,  in  1974)  system i s also  provided. Although  Maya, as  developing  programming  language  has  been  recognition  model  realization  o f such  a programming technology, the  ideas  of  the  r e p r e s e n t a t i o n and  the  experimental  presented  in  this  motivation  model. process  behind  the  of  thesis.  natural  v e h i c l e with  Maya f o c u s e s  with  implementation  a model i s a programming  provides a general experimental the  language, i s concerned  on  The  the  language because i t which  to  evaluate  general questions  df  i n v o l v e d i n machine p e r c e p t i o n . 5:  Maya  116  5.2 Language  This  Overview  section  describing  provides  general  the data types d e f i n e d  fi number o f o t h e r g e n e r a l mentioned. be  a  overview  i n Maya and t h e i r  in  subseguent  sections  of  this  with LISP  must be assumed  reader  is  referred  t o Appendix-B,  Manual,  f o r d e t a i l s o f t h e v a r i o u s Maya p r i m i t i v e s  Data  programming  a  in  Maya's  chapter.  discussion.  A The  t h e Maya Language R e f e r e n c e  grammatical data  non-terminal  are r e a l i z e d  involved.  Angle  symbols  and  <FORM>  <VAR> <LIST> <TUPLE> <OBJECT> <ITEM> <PAIR>  to facilitate  Maya i s embedded i n LISP  using  LISP  forms.  Belcw i s  r e p r e s e n t a t i o n o f t h e LISP i m p l e m e n t a t i o n o f  types.  star, indicating  d a t a t y p e s o f LISP  schema-based s y s t e m s .  i t s data p r i m i t i v e s BNF  will  Types  Maya e x t e n d s t h e p r i m i t i v e  and  in this  by  a l s o be  and r e c o g n i t i o n  familiarity  5.2.1  Maya  evaluation,  f e a t u r e s of the language w i l l  I s s u e s o f schema r e p r e s e n t a t i o n  covered  of  brackets the  z e r o o r more  a r e used  asterisk  i s used  to  delimit  as the Kleene  repetitions.  — > <ATOM>  —> < V A R > —> <LIST> —> <TUPLE> —> <OBJECT> -> ?<ATOM> -> (<FORM>*) -> ( 3 <FORM>*) -> { a t O B J E C T S <TYPEXPAIR>*) -> ( S I T E M a <RESXPAIR>*) -> <AT0MXFORM> 5:  Maya  117  A form  i n Maya may  object.  I n L I S P , an  properties  and  differentiated to  as  an  by  a variable,  and  Lists  to  CDR  The of  the by  are  a question  is  desirable  the  value of  a  mark.  both  The  value  of  its  of  value  a  of  by  a  <LIST>  list  t h e CAR  tuple,  elements.  siqnificant inclusion  extensions  of o b j e c t s  L I S P atoms.  used t o form  pairs.  i t  u s e d , as i n L I S P , t o encode  property  I t can  be  networks.  A  is  the  of the  list  however, Tuples  be  <OBJECT>s  and  is  are  a  used  to  items.  defined  The  otject,  plists,  schemata, frame systems,  or frame may  be  types  usually called  or r e l a t i o n s .  considered can  t o the data  lists,  schema  o f named s l o t s  may  atom, <ATOE>, i s  and  <OB0ECT>, subsumes t h e  network  of  the p a t t e r n matchinq f u n c t i o n s .  LISP a r e the  collection  set  #  The  values  or  by atoms, whereas v a r i a b l e s a r e  function indicated  of the l i s t .  most  semantic  name o f a  In Maya, an  function calls.  of a p p l y i n q the  extensively  the  Maya d i f f e r e n t i a t e s between a l i s t ,  result  of  as  n-tuple, item,  between t h e name o f an o b j e c t and  n - t u p l e , <TOPLE>.  actual l i s t s  list,  <VAR>, b e c a u s e  atoms p r e f i x e d by  Likewise,  tuple  variable.  Names a r e r e p r e s e n t e d  represented  the  atom, v a r i a b l e ,  atom i s used b o t h a  from  distinguish  variable.  an  be  be  A node  of and  thouqht  c f as  in  semantic  a  a  a s e t o f named a t t r i b u t e / v a l u e  conveniently  represent  both  of  these  structures. An  o b j e c t i s composed  o f a LISP  list  havinq  the  prefix,  5:  Maya  118  30BJECT8, named  a  user-supplied  attributes,  different  Within  permit  the  provided <PAIR>  as  are  always  Maya,  and  an  a  of  recording the  called  the  semantic  name w i t h  matcher. enclosing  atomic  list  of  an  the  in  and  as  type.  Each  as  names  An  object.  their  with  their  their  local  matcher,  of  variable  local  item,  <ITEM>,  <PAIR>  of  a v a r i a b l e name and  used  and  the  nearest  by  new  pattern  composed o f o b j e c t s ,  object  takes  p r e f i x , SITEM2, f o l l o w e d Each  the  the  is by  I t represents  immediate c o n t e x t  top  i t s value.  items,  and  processcr  the  of  a  item  the  current  i n which t h e  a for  s t a t e s of g e n e r a t o r s the  A  value.  the  the  invocations  network node, o r  some  such  <RES>.  object.  and  a <FORM>.  names w i t h  structures  The  tuples, data  variable  generator.  having  field,  the  checking.  names  object  cf  type i n d i c a t o r i s  binding  atomic  a s s o c i a t i o n between  procedure  pattern  an  set  that  each  i . e . , they r e t u r n a set  within  internal  of  type  returns  Maya m a i n t a i n s a s t a c k number  use  a  Maya p r i m i t i v e , OEJECT, which  generators,  composed o f a L I S P l i s t  represents  objects,  supplied  its  associate  reserved  noted  extra  associate  items,  computed  processor  with  be  an  by  the  function  items  return  bindings  by  objects  definitions, In  defined  type  The  Whereas  values.  be  a  definitions.  should  objects,  associates  created  arguments  of  f u r t h e r user  object  name i s s a i d t o  It  associated  definition  i n an  i n d i c a t o r , <TYPE>, and  Maya t o t y p e c h e c k t h e  to allow  Objects  <PAIR>s.  prefixes  variables  type  and  stack  is  schema, user  is  "operating". 5;  Maya  119  A  number  of  Maya  object.  For  object.  This function  form  t o be  name The  instance,  bound t o  already  primitives  t a k e s two  enclosing  object,  definition  of a s p e c i f i e d  object.  whereas  to the  current  the  provides  of  object.  a  EEM*,  the  mechanism  LISP  property  list  because  i t a l l o w s Maya t o c o n s i d e r  OBLIST,  atom which has the  f r o n t of each  as  the  that  from  the  removes  the  entire fcr  a  replaced.  object.  A  fourth  enclosing  obtaining  c o m p a t i b l e as  o f L I S P » s SUBBs have been a l t e r e d t o a c c e p t PLISTs.  If  is  name  v a l u e the  L I S P as  at the  of  as  a  header  the  within  enclosing  a  schema.  In o r d e r t o make Maya and few  of  primitive,  returns  the  i t s definition  definition  name f r o m  SELF,  This function  pointer  the  enclosing  a t o m i c name and  enclosing  object,  the  to  a r g u m e n t s , an  t h a t name i n t h e  e x i s t s i n the  called  on  PUT* adds d e f i n i t i o n s  f u n c t i o n , GET*, r e t u r n s  primitive,  operate  functions  object.  objects  instead  recognize  This overhead i s  the  justified  a l l of LISP's database, i . e . ,  global object  properties associated  f o l l o w i n g f o r m bcund  new  possible, a  to i t s  of  i t s database.  with  i t will  Each  have  a  LISP PLIST  CDR:  (80BJECT3 3PLISTS <PAIB>*) .  For e x a m p l e , DEFUN and to  the  function be  used  enclosing  DEFINE a l w a y s add  object.  d e f i n i t i o n s local to as  one  way  This the  permits object.  to i n c o r p o r a t e  their objects  This  procedural  definitions to  contain  mechanism  will  knowledge  into  5:  Maya  schemata.  120  Maya  considers  Maya v a r i a b l e s . variables  on  LISP*s  Maya  variables  uses  a  the processor  defined  in  functions,  items  specified will  5.2.2  will  name t h a t t h e y  a s s i g n a new v a l u e  on  which  alter  are  on  to  access  These v a r i a b l e b i n d i n g s  the  the value find  scheme  PHOG e x p r e s s i o n s ,  contained  SET and SETQ,  counterparts,  deep-binding  stack.  a p p e a r i n LAMBDA e x p r e s s i o n s ,  t o be t h e s e t o f g l o b a l  stack.  The  analogous  to  of the f i r s t  the  o r as  stack.  may  variables assignment their  LISP  v a r i a b l e of t h e Otherwise,  they  t o t h e L I S P atom o f t h e same name.  Evaluation  The  evaluation  algorithm  f o r Maya d a t a  below i n p s e u d o - L I S P c o d e .  The b e h a v i o r  then  detail.  elaborated  recognized  some  Finally,  the  i s presented evaluatcr  the f u n c t i o n  is  types  by Maya a r e d e s c r i b e d .  When algorithm  in  of  types  Maya i s used  is  asked  to  evaluate  a  form, the f o l l o w i n g  (but not t h e f o l l o w i n g implementation  cf  that  algorithm): (DEFUN EVALDATE (FORM) (CCND {(ATOM FORM)(FETCH-DEFINITION-FROM-STACK FORM)) {{VARP FORM) (FETCH-VALDE-FROM-STACK FORM)) f (TDPLEP FORM) (APPLY «3 (CDB FORM)) < (OBJECTP FORM) (ERROR) ) ((ITEMP FORM) (ERROR)) ( (ATOM (CAR FORM) ) (APPLY (FETCH-FUNCTION (CAR FORM)) (CDR FORK))) (T (APPLY-LAMBEA (CAR FORM) (CDR FORM)))))  5: Maya  121  If  FORM  fetched  i s an atom, t h e n t h e d e f i n i t i o n  from  i t s first  f o u n d on t h e s t a c k , PLIST to  of  find  that  t h e L I S P atom,  fails,  enclosing  global object always that  be  definition  definition If  Note  enclosing  local  on  the  stack  o r PROG  a p p e a r a s a v a r i a b l e bound i n an i t e m In  e i t h e r case,  value the  of  the f i r s t  the variable.  local  using are of  inverse  treated  present  i n the will  although  from  stack.  found  the f i r s t  The  ways.  returned  variable  I t may be a Or  from a  i t may  generator.  i s returned  Maya f e t c h e s  as t h e  cannot  the global  find value  value.  i t i s evaluated  g u o t e mode, t h a t  as c o n s t a n t s .  i n any  I f , however, t h e p r o c e s s o r  of t h e v a r i a b l e , t h a t i s , t h e LISP FORM i s a t u p l e ,  found  expression.  binding  v a r i a b l e ' s name on t h e s t a c k ,  If  the next  i s fetched  i n two d i f f e r e n t  v a r i a b l e o f some LAMBDA  If  o b j e c t , NIL.  FORM i s a v a r i a b l e , i t s v a l u e  appear  object.  f o r e v e r y atom t h e r e  o c c u r r e n c e o f t h e v a r i a b l e ' s name on t h e may  the  attempts  f o r i t i n the global object,  may be t h e n u l l  is  within  o f t h e atcm  that  object,  an atcm, Maya  I f i t i s n o t t o be  then the d e f i n i t i o n  i s returned.  a  the f i r s t  name  I f i t i s not  global  to l o c a t e the d e f i n i t i o n  o b j e c t , and so on.  enclosing object,  from t h e  when p r e s e n t e d  within  i t attempts  that  o c c u r r e n c e on t h e s t a c k .  i ti s fetched  i t s definition  of  by t h e t u p l e  i s , atoms and p a t t e r n  The value  of a tuple  o r an i t e m ,  an ERROR  isa  evaluator variables new  tuple  i t s values. If If  FORM i s an o b j e c t the  CAR  occurs.  o f FORM i s an atom, t h e atom i s assumed t o be 5:  Maya  122  the  name o f a Maya o r L I S P f u n c t i o n .  from the  the  definition  L I S P PLIST o f t h e atom.  types If  first  recognized  more t h a n  found error  i s  o f t h e atom  used.  If  fetched  else  i s  from  of  the  t h e f i r s t one  no r e c o g n i z a b l e f u n c t i o n c a n be f o u n d , an  A d i s c u s s i o n o f the f u n c t i o n types  recognized  by  i s n o t a t o m i c and i s assumed  to  below.  a Maya LAMBDA o r QLAMEDA e x p r e s s i o n .  a p p l i e d t o t h e CDR o f FORM.  I f the  QLAMEDA  occurs.  expression,  an e r r o r  CAR  The e x p r e s s i o n is  not  a  i s then  LAMBDA  or  Representation  This for  s e c t i o n d i s c u s s e s t h e use o f Maya  language p r i m i t i v e s  i m p l e m e n t i n g s c h e m a t a n e t w o r k s and f o r r e a l i z i n g  message p a s s i n g  5.3.1  objects.  and i n t e r p r e t a t i o n .  and  stereotype  stereotype.  creates  schemata  networks  are  realized  i n Maya as  Maya d e f i n e s a mechanism f o r c o n s i d e r i n g an o b j e c t  schema  that  procedural  Schemata  Schemata  a  on t h e s t a c k ,  one f u n c t i o n by t h e same name e x i s t s ,  occurs.  i s  I f the function fetched  O t h e r w i s e , t h e CAR o f FORM  5.3  function  by Maya, i t i s a p p l i e d t o t h e CDF o f t h e f o r m .  Maya i s p r e s e n t e d  be  The  an  and t h e n  creating multiple instances  The f u n c t i o n , NEW,  incremental  when a p p l i e d t o an  copy o f t h e o b j e c t  and a s s i g n s  as  from  object, i t type, 5;  Maya  123  ^INSTANCES. the  Any  c h a n g e s made t o t h e  incremental  copy  example, a s t e r e o t y p e c o u l d be  constructed  (PUT* 'DOG This  as  of c l a s s ,  the  following expression  The  name  MAMMALIA.  defined the  and  fetching  yield  accessing  be  and  the  SEND  having the  of  "dog"  FLOYD,  in by  primitive,  f o r procedural  that  dogs  of  dog,  instance  the  dog  instance  stereotype.  r e t u r n MAMMALIA  definition that  local  i t makes  descendent  are  Fetching  to  but the  instances  c h a n g e s made t o a s t e r e o t y p e  each  the  GENERIC,  'BILL).  of  scheme a r e  and  type,  a  evaluated:  the  the  object,  indicator  instance w i l l  instance,  are  unless  instance.  SEND,  is  the  basic  traversing  message p a s s i n g  mechanisn  arcs and  in  for  semantic  interpretation.  form i s : {SEND <A1XA2>  The  then  not  schemata networks, f o r  n e t w o r k s , and Its  reflected  Maya  For  ' HAM MALI A) ) •  enclosing  an o b j e c t  attributes  inexpensive  redefined  CLASS  the  name, and  could  Advantages o f t h i s  specifically  in  object.  concept  create a s p e c i f i c  instance  NAME w i l l  immediately  the  NAME 'FLOYD OWNER  from  computationally  The  DOG  CLASS,  instance.  as  To  ownership  within the  name,  within  t o i t s own  are  (NEW  reflected  stereotype  'GENERIC NAME * DOG  name, DOG,  pointer  the  are  follows:  creates  of t h e  a reflexive  not  schema t o r e p r e s e n t  (OBJECT  expression  definition  and  instance  a r g u m e n t s , <A1> evaluates  through  . . . <An>) .  <An>, a r e  called  a message  sequence.  each of i t s arguments i n sequence r e t u r n i n g 5:  the Maya  124  evaluation  of i t s l a s t  argument, <An>, as  value  seme  yields  of  pushed  onto  environment  <Ai>  the  an  processor  for  either  object  stack  atom  i t s  value.  o r an i t e m ,  thereby  definitions  If  the  then  i ti s  augmenting  the  or v a r i a b l e  bindings  respectively. The s e g u e n c e , <A1>  through  <An>, i s an e n c o d i n g  procedure through  t h e network.  By p u s h i n g  onto  the processor  in effect  Now  the  stack,  the e v a l u a t i o n  enclosing  o f <Ai+1> i s computed  object,  perhaps  itself  some  of a  search  object,  <Ai>,  "goes t o " t h a t from  yielding  within  object. the  new  another object or  item. Knowledge may ways.  First,  atoms  defined  be r e p r e s e n t e d  i t can within  tupleibase contained could using  be  e i t h e r OBJECT objects  schema  slot  This  with  by u s i n g  schema  is  That  new  i s , a new To  access  slot  as  either  o r as p a t t e r n s  we saw  above  in a  how  atoms  by c r e a t i n g a new  object  Atom b i n d i n g s  c a n a l s o be added  SEND and PUT*. schema,  different  to  F o r e x a m p l e , t o add a  DOG:  (PUT* « V I B T U E * MANS—BEST-FBIEND)). DOG  then  definition  object  definitions  which y i e l d s pushed  becoming t h e e n c l o s i n g o b j e c t . the  declaratively  the object.  to the generic  evaluates  object  the  o r NEW.  {SEND DOG SEND f i r s t  represented  within  associated  existing new  be  i n schemata i n t h r e e  onto  an o b j e c t , the  t h e dog schema.  processor  The e v a l u a t i o n  stack,  thus  o f PUT* t h e n  adds  o f t h e atom, VIRTUE, t o t h e e n c l o s i n g i s added t o t h e schema,  slots  in  a  schema,  object.  DOG.  i t i s again  necessary to 5: Maya  125  "goto" that  schema's o b j e c t . (SEND DOG  will  first  print  Declarative associative pattern  and  may  second  VIRTUE) ,  then  also  databases defined  matching  The  (PRINT CLASS)  MAMMALIA  knowledge  F o r example, t h e f o r m :  return  be  within  realized  as  schemata.  i n schemata a r e d i s c u s s e d way  MANS-BEST-FBIENB.  Mechanisms  i n the next  knowledge c a n be r e p r e s e n t e d  using  property  o f an atom i s r e p r e s e n t e d  a s an  Since  property  that  atom.  t h a n any o t h e r properties  function  the  property,  of objects.  function  EXPB,  as  on  expected,  the  evaluating  a  property  LAMBDA e x p r e s s i o n list  the following  the  binding  I n Maya, t h e  object  definitions  is  i s no can  bound  to  different be  local  (X) X)  of  the  bound t o t h e name,  atom,  FOO.  However,  within  the object,  FOO,  associated  with  form: (SEND FOO  returns  section.  F o r example, (DEFON F00  creates,  definitions.  EXPB f u n c t i o n  for  i n schemata  procedurally list  local  patterns i n  EXPB)  o f t h e atom, EXPB,  which i s : (LAMBDA As  w e l l , a new  a particular  definition  object,  (FOO  (DEFUN FOO  *A) y i e l d s  instead  WOOF.  (X)  'WOOF)).  A but e v a l u a t i n g :  (SEND DOG yields  c a n be l o c a l l y  f o r instance:  (SEND DOG Evaluating  o f FOO  (X) X) .  (FOO »A))  Furthermore, the data s t r u c t u r e  created  by  5: Maya  126  this  example  accessed  is  itself  a  network  of  objects  which  can  be  as f o l l o w s : (SEND DOG FOO EXPB)  which  yields (LAMBDA  The t h i r d is  procedural  mechanism  f o r r e p r e s e n t i n g knowledge i n  attachment  generators f o r performing realizing in  (X) 'WOOF).  (Winoqrad, top-down  1975).  search  In and  bottom-up s e a r c h c a n be a s s o c i a t e d w i t h  tuplebases l o c a l  patterns  are  Maya's  bottom-up methods patterns.  to schemata.  with  Top-down  such  Maya,  processes  both for  tuple patterns  procedures  mechanism  for associating  a schema's  expectations,  and b o t t o m - u p methods  schemata  attached  to  top-down and  represented  as  w i l l be d i s c u s s e d i n  s e c t i o n s 5.5 and 5.6 r e s p e c t i v e l y .  5.3.2  Messages  The e v a l u a t i o n o f SEND c a n a l s o be d e f i n e d terms  of  sending  sequence, [<A1XA2>  messages.  sending  <A1>  returninq  f i n a l l y t h e v a l u e o f <An>.  sequence  i s  messaqe, An  sendinq  messaqe,  the  in  The v a l u e o f SEND a p p l i e d t o t h e  . ,. . <An>], i s r e c u r s i v e l y  the  recursively  [<A2>  value  of  the  . . . <An>],  result  and  so  of on,  T h u s , e v a l u a t i n q a messaqe t h e CAB o f t h e s e q u e n c e a  t h e CDB o f t h e s e q u e n c e . example  follows  which  illustrates  in  Maya  the  5: Maya  127  construction Maya  of  instance  primitives  example i s  In  discrimination user.  Each  possible  to i n t e r p r e t  extracted  Questions".  h i e r a r c h i e s , and  this  from  Maya  t r e e to i n t e r p r e t node  in  Although  of  a  p r o g r a m , an  the  branches of the  response.  simple  the  use  and  interpretation.  use  procedural program  of some c f messages.  to  play  a series  net  "Twenty  of r e s p o n s e s from  contains  t r e e to take  a  question  depending  is simplistic,  s t r u c t u r e s and  simple  on  the This  i n s t a n c e h i e r a r c h y i s used  t h e example  Maya network  the  plus  the  as  a  the the  user's  i t demonstrates message  passing  (DEFUN TWENTY-QUESTIONS SEXPR NIL (PRINT •"PLEASE THINK OF SOME OBJECT") (SEND TOP-NODE (ASK 20)} )  The net  t o p - l e v e l f u n c t i o n s e n d s t h e Top-Node o f a message t o ASK  20  guestions.  (DEFUN ASK SEXPR (N) (AND (ZEROP ?N) (BETUBN '"YOU (PRINT QUESTION) (SEND (EVAL (READ)) {ASK (SUB 1 ? N ) ) ) )  In  this  procedural. 20  guestions;  and  recursively  choice  of  example,  I t says: i f so,  next  the  WIN"  message  "Check t o see then  send t h i s node."  the d i s c r i m i n a t i o n  lose.  of  sent  i f we  the  to  each  have a s k e d  Otherwise,  same message A few  'TWENTY-QUESTIONS))  (minus  print  more  your  1 from  semantic net  node  N)  is than  guestion to  your  nodes o f  this  5:  Maya  program f o l l o w :  128  (PUT* 'BIN—NODE (OBJECT •NODE)) (SEND BIN-NODE {DEFUN SSK SEXPB (N) (PRINT «"I BIN ! !") ?N)) (POT* 'NODE4 (OBJECT 'NODE QUESTION ' " I S I T A SNAKE?" YES WIN-NODE NO N0DE7) ) (PUT* * NODE1 (OBJECT * NODE QUESTION *"HOW MANY LEGS DOES IT HAVE?" ZEBO NODE4 TWO NODE5 FOUR NODE6) ) (PUT* *TOP-NODE (OBJECT * NODE QUESTION »"IS I T ANIMAL, VEGETABLE, OR MINEBAI?" ANIMAL NODE1 VEGETABLE NODE2 MINERAL NODE3) )  In  the  terminate? the  recursive  On f a i l u r e ,  first  line  ASK,  how does t h e r e c u r s i o n  i s , a f t e r the  Within  the process i s quite  t h e message,  (ASK  (SUB 1 ?N) ) .  WIN-NODE  has  definition  of  i t s own i n t e r p r e t e r f o r t h i s  a l w a y s i n t e r p r e t s t h e message  T h i s example s e r v e s  as  a  to illustrate  question,  the r e c u r s i o n .  different.  WIN-NODE i s s e n t  WIN-NODE i s a l o c a l  twentieth  terminate  t h e u s e r answers " y e s " t o t h e q u e s t i o n ,  node c a l l e d  It  that  to  i n t h e body o f ASK w i l l  On s u c c e s s however, if  calls  At  NODE4,  " I s i t a snake?", a  the  function,  ASK.  p a r t i c u l a r message.  successful  a few b a s i c  end  of the  features  of  5; Maya  129  Maya. be  Through  constructed.  procedural to  t h e u s e o f PUT* and OBJECT, s e m a n t i c n e t w o r k s c a n As w e l l ,  SEND  messages between o b j e c t s .  the current  guestion  answers a r e r e s t r i c t e d  i s elicited  will  f e t c h an o b j e c t ,  SEND  pushes  evaluates  this  i nthis  recursive call  the stack.  receiving that  a  new c o n t e x t  message,  ASK,  from  send  simple  example, an answer  the  the stack,  the rest  user.  If his  and  subsequently  o f t h e messaqe, which i s  t o ASK. f u n c t i o n from  this  the  i t s name's f i r s t  t h e mechanism t o a l l o w  message t o p e r f o r m In  In t h i s  to  (READ) )  onto  This provides  message.  used  t h e n e x t node o f t h e d i s c r i m i n a t i o n t r e e .  object  SEND f e t c h e s e a c h on  be  t o atoms, t h e n t h e e x p r e s s i o n , (EVAL  the  can  i t s own l o c a l  example,  definition  when of  definition the  object  interpretationof  SIN-NODE  ASK d e f i n e d  i s sent locally  the  i s used  b e c a u s e SEND h a d p r e v i o u s l y p u s h e d WIN-NODE, i n c l u d i n g i t s l o c a l definition  o f ASK, o n t o  the stack.  S u p p o s e , however, t h a t the  program  t h e user  i s not expecting.  types  The r e s u l t  would  because  Maya w i l l  find.  F o r a random a n s w e r , t h e d e f i n i t i o n  If  fetch the f i r s t  an a t o m i c answer  we r e p l a c e t h e f o r m ,  (EVAL  (GET* and  definition  that  be u n p r e d i c t a b l e  o f t h e atom i t c a n i slikely  t o be NIL.  (READ)) i n ASK w i t h :  (READ) • (WHAT?) )  d e f i n e a new f u n c t i o n , we now have a s o l u t i o n : (DEFUN WHAT? 9EXPR NIL (PRINT '"WHAT ?") (RETURN (ASK ?N) •ASK))  5:  Ma ya  130  GET*  always  enclosing  object.  enclosing case,  fetches  (WHAT?) which  comparison  recent, 1972)  matching  (McDermott, to  & Winograd,  a s k s t h e same q u e s t i o n  matching  a  on s y n t a c t i c form.  intelligence  i n the In this  again.  primitive  level  Maya d e f i n e s  t o those provided  programming 1973).  databases,  retrieval  languages,  Maya u s e s  to  implement  over  schemata  of  a number i n most (Hewitt,  i t s pattern  1977).  the  recognition  Semantic been  matching  pointed  generators to build  systems.  may i n v o l v e a c t i v e s e a r c h  as has a l r e a d y  over  This  and d e d u c t i o n schemata  and  semantic higher (Bobrow  structures  out, another c h a r a c t e r i z a t i o n of  problem.  pattern  matcher  i n Maya i s c a l l e d  MATCH.  The form o f a  t o MATCH i s as f o l l o w s : (MATCH  Its  provides  primitives similar  from  is,  call  just  1973) ( D a v i e s ,  matching  The  argument i s e v a l u a t e d .  and as a s y n t a c t i c b a s e upon w h i c h  associative network  current  compare t u p l e s , t o p e r f o r m a s s o c i a t i v e r e t r i e v a l o f  tuple patterns processes,  the  t h e name d e f i n e d  second  pattern  artificial  matcher  to find  within  the  based o n l y  pattern  from  Hatching  Syntactic  of  I f GET* f a i l s  object,  5.4 P a t t e r n  definitions  first  w,hich  i s  <pattern><db>[ <else> J) .  argument, < p a t t e r n > , either  tuples called  another  a tuplebase.  i s matched a g a i n s t  tuple  a datum, <db>,  o r an a s s o c i a t i v e d a t a b a s e o f  The m a t c h e r ,  on a s u c c e s s f u l  match, 5: Maya  131  returns  an i t e m  composed  v a r i a b l e s assigned third  argument,  called  of the bindings  during  t h e match.  On  <else>, i s e v a l u a t e d .  a failure exit  and i s  used  o f any p a t t e r n failure,  matching  an  optional  T h i s o p t i o n a l argument i s  to  control  failure  driven  search. fin example  of pattern  matching i n  Maya  is  given  by  the  following: (HATCH *<0N !:X !:Y> »<0N B 1 TABLE> The  evaluation  returning B1  and  of t h i s  as value Y  an item  bound  fFOO), would  expression  results i n a successful  containing  t o TABLE,  the v a r i a b l e s X  I f t h e match  have been e v a l u a t e d  »(F00)).  bound  had f a i l e d ,  and r e t u r n e d  as  match  the  to  t h e form, value  of  MATCH, The i t e m a  reactivation  invocation another  from t h e p a t t e r n m a t c h e r  tag.  This  o f t h e matcher  match.  generator, for  returned  Because  tag  is  i n order  that  the pattern  MATCH p r o v i d e s  a  may a l s o  pointer  contain  to the c u r r e n t  i t may be  recalled  for  matcher i s i m p l e m e n t e d  as a  a non-deterministic  search  mechanism  tuplebases. Tuplebases are accessed  database  maintenance  structure functions methods.  Any  associated matcher  value  as  the  by  the  functions,  f o r scheduling  tuple  pattern  value  T u p l e b a s e s a r e composed  cf o f an  and  the  a  matcher, number  b o t h top-down  in  which i s i n c l u d e d  pattern  a  i n t h e item distinguished  inverted  index  of  and  tuplebase  various  may  return  control bottcm-up have  from  variable, structure  an the  "?*". which  52  Maya  132  uses  Maya  they  o b j e c t s t o r e p r e s e n t each  a r e formed  well  be  from  operated  a primitive on  with  of t h e  data type,  index.  tuplebases  Since may  as  ordinary object accessing functions.  F o r example, t o c r e a t e a new enclosing  level  tuplebase  of  assertions within  the  object: (PUT*  N o t i c e t h a t as  * ASSERTIONS  (OBJECT 0) )  many t u p l e b a s e s a s d e s i r e d may  be c r e a t e d i n  this  manner. In  o r d e r t o add  following  form  a pattern assertion  c o u l d be  5.5  Top-down  times  calls.  search  HAS  of  tuplebase:  FLEAS>  in  Maya  is  which a r e f u n c t i o n s t h a t  for a single  thought  »<PUSHKIN  this  ASSERTIONS).  Methods  Top-down generators  the  ASSERTIONS).  D0G>  t o d e l e t e a s s e r t i o n s from (PREMOVE  tuplebase,  evaluated:  (PADD «<WOOF BE Finally,  to t h i s  as  invocation.  based may  f o u r types  1.  MATCH  2.  QLAMBDA  3.  B1ST  and  D1 ST.  4.  NEXT and  FAIL.  an  the  notion  be r e c a l l e d  Alternatively,  functions that retain  There are  on  a number o f  generators  internal  of  state  may  be  between  o f g e n e r a t o r s i n Maya:  expressions  and  QEXPR f u n c t i o n s .  5:  Maya  133  The  pattern  described. combining 1973)  matching The  second  the concept  defined  E a c h QLAHBDA list.  in  has a  either  expression  expressions. MATCH,  the  generator  is  item  from  been  already  realized QLISP  by  (Davies,  tuple  i s  pattern  pattern  as  argument  against  composed  during  S Sussman,  the  1S73).  i t s argument  by m a t c h i n g a p a t t e r n i n t h e f o r m o f  the or  (McDermott  a  the  of  t a g f o r the generator.  QLAMBDAs and QEXPRs t a k e  as  match  specific  of  Q LAMBDA fts i n  of the pattern  plus  a  possible  QLAMBDA e x p r e s s i o n s  f u n c t i o n s with  optionally  ((QLAHBDA < a r g - p a t t e r n X b o d y > )  a  values.  the bindings  pattern  names by c r e a t i n g QEXPR t y p e  of  tuplebase  QLAMBDAs a l w a y s r e t u r n i t e m s  v a r i a b l e s assigned reactivation  has  expressions  CONNIVER  QLAHBDAs a r e i n v o k e d  QLAMEDA  of  HATCH,  The mechanism i s a g e n e r a l i z a t i o n o f  expression  a tuple against  given  type  o f QLAHBDA  and Maya i t e m s .  generators  function,  may be  DEFON.  one o r two a r g u m e n t s :  < p a t t e r n > [ <else> ]) o r  ( < q e x p r > < a r g - p a t t ern>[ < e l s e > ]) . The  first  pattern The  argument, <pattern>, t o be matched  against  be  a  t h e argument  s e c o n d argument, < e l s e > , i s e v a l u a t e d  fails  or  i f the  QLAMBDA e x p r e s s i o n  < E l s e > d e f a u l t s t o NIL. by  must  the  interpreter  mapped, and QLAMBDA them t o  Since  tuple list,  pattern a call  QLAHBDAs and QEXPRs  a s any o t h e r  f u n c t i o n , they  i s the  <arg-pattern>.  i fthe  evaluates  and  are  match  t o FAIL. treated  may be a p p l i e d ,  evaluated. expressions  patterns  may be s t o r e d  identical  to  their  i n tuplebases pattern  by b i n d i n g  arguments. 5:  A Maya  134  mechanism  i s thus r e a l i z e d  patterns.  Methods a r e added t o a method  (PADD  either  a  <method-base> from  top-down  tuplebase  methods  with  as f o l l o w s :  <arg-pattern><method-base><gxl>),  where < a r g - p a t t e r n > is  for associating  i s t h e p a t t e r n argument o f t h e method, QEXPR  name  or  a  QLAMBDA  i s a t u p l e b a s e o f methods.  expression,  Methods  are  <qxl> and  deleted  tuplebases i n a similar fashion: (PBEMOVE < a r g - p a t t e r n > < m e t h o d - b a s e > ) .  The t h i r d invoke  QLAMBDA  associated D1ST  type  order.  expressions  patterns.  searches  of generator  Two  in  of c a l l s  to this  D1ST w i l l  fetch  from  matching  <pattern>  value  r e t u r n e d from  with  the  addition  expression recall items. another  to  QLAMBDA  Similarly, in  and t h e n  generate  fcreadth-first  D1ST  will  are  expressions  i n depth-first  D1 ST  also  will  fails  e x p r e s s i o n matching  order.  provided.  A successful from  D1ST  I f the t a g i s l a t e r recall  the  D1ST w i l l to  QLAMBDA  continue to  generate  any  new  to search f o r  <pattern>.  a tuplebase  The form  expression  be r e t u r n e d  tag.  item.  i t  QLAMBDA  return to the tuplebase  B1ST s e a r c h e s  their  mechanisms  that f u n c t i o n .  will  another until  matching  then  <db> [ <else> T) .  of a r e a c t i v a t i o n  the generator,  and  function are:  invoke  t h e QLAMBDA  access by  t h e t u p l e b a s e , <db>, a  t h a t same QLAMBDA Then  to  tuplebases  a t u p l e b a s e o f QLAMBDA  The f o r m  to restart  used  different  (D1ST < p a t t e r n >  used  is  of t h i s  o f QLAMBDA  expressions  primitive i s : 5: Maya  135  (B 1ST B1ST  will  matches with  invoke  the  find  a  reactivation  generator  Only  i t has  methods w i l l  i t recall  reactivation and  FAIL,  respectively. Sussman and  For  a  and  McDermott  o f two  for  the  an  tag i n the  to  own  value.  will  attempt in  the  QLAMBDA  f o r a second  in  Maya  time,  includes  generators  items.  The  the  two  the  frcm  functions,  failure-driven  Conniver's  the NEXT  search  approaches,  see  TRY-NEXT,  is  a  [<else>]).  fails,  another  item.  i s resumed.  For  names o f a l l b o x e s ,  (PROG (X) {SETQ X  its  (1972).  i t e m c r e a t e d by  generator  form.  the QLAMBDA  forth.  f o r l o o p - d r i v e n and  analogous  resumed g e n e r a t o r  failure  that  arguments:  a reactivation  attached  by  expression  restarting  (NEXT <item> <Item> must be  so  of  finds  once a l l matching  defined  comparison  NEXT, which i s function  time,  for  used  as  QLAMBDA  tags returned i n t h e i r are  tag  invoked  type of generator  primitives  yielded  each s u s p e n d e d QLAMBDA  for a third  last  control  after  item  i t  i s resumed a g a i n , E1ST  tuplebase.  The  expression  r e t u r n the  matching  then each  [<else>]).  QLAMBDA  different  and  a  <db>  and  of  However, when t h i s to  first  <pattern>,  the a d d i t i o n  <pattern>  generator.  If i t finds  Otherwise,  i f no  find  a tag, the i s found  or  i n a t u p l e b a s e , TOYS, t h e  the f o l l o w i n g e x p r e s s i o n  !:B>  tag  looks  NEXT e v a l u a t e s < e l s e > , i t s o p t i o n a l  example, t o  (MATCH »<BOX  such  NEXT  TOYS *(RETURN  c o u l d be  used:  NIL))) 5:  Maya  136  LOOP (SEND ?X (PRINT ?B) ) (SETQ X (NEXT ?X *(RETURN (GO LOOP) )  Failure-driven function  i n conjunction  function control on  the  attached  of  stack  a  tag i s then ELSE  argument  which  argument.  the  argument i s f i n a l l y  for  capturing failure. is illustrated  i n Maya by  primitive,  reactivation restarted  tag.  the  the  FAIL  FAIL i s a  necessary  When t h e  item  found  generator  mechanism f o r  failpoint  function with  containing  tag i s reinvoked  evaluated, thereby  is  failpoint.  I t i s a very simple  ELSE r e t u r n s an  i n the  The  from t h a t  c r e a t e s an e x p l i c i t  The  ELSE.  s t a c k u n t i l an i t e m  search.  failpoint.,  using  c a u s e s Maya t o b e g i n d i s c a r d i n g  provides  failure-driven  bound t o t h i s  (SEND  another  i t s processor  tag  and  with  containing  function  unevaluated  i s realized  arguments t h a t  to t h i s  controlling one  no  frames from  The  of  search  NIL)))  that  crdy by  a  FAIL,  p r o v i d i n g a mechanism  mechanism i s c a l l e d  a failure  block  f o l l o w i n g example:  (ELSE • ( F A I L U R E - E X I T ) ) (MATCH »<BLOCK !:X> TOYS • (FAIL) ) (MATCH »<COLOUR ?X BLUE> TOYS » (FAIL)) (SUCCESS-EXIT))  This  program  segment  database of t o y s . the  block.  control  paths  to  find  a blue  If i t i s successful, control  Otherwise,  define a local  attempts  a failure  backtrack depending  search  exit  upon whether t h e  from  passes  i s taken.  mechanism t h a t  block  local  through  Failure  follows search  the  blocks  separate succeeds 5:  Maya  137  or  5.6  fails.  Ecttcm-up  Methods  Bottom-up s e a r c h i s r e a l i z e d Processes  consist  processes  may c o - e x i s t  associated invoked, may  with  terminate suspend  a particular The  or  Processes  may  itself  or  and a l l o t h e r  not  be  may be c r e a t e d ,  by o t h e r p r o c e s s e s .  body o f e a c h  When  aqainst  a  process  i t may v i a t h e COMPLETE  processes  associated  a process the  process c o n s i s t s  of  a  i s created, a specified  with  pattern  of  the  QLAMBDA  Suspended  processes  may be  resumed  QLAMBDA  pattern i s expression.  may be s u s p e n d e d t o p a t t e r n s i n a s p e c i f i e d  processes.  those  may  A number o f  schema.  expression.  Processes  and  schemata.  suspend  itself  procedure  matched  simultaneously  and resumed  or  v i a multiprocessinq.  semi-autonomous p r o c e d u r e s .  particular  destroyed,  function  of  of  i n Maya  tuplebase  by  matchinq  patterns. Processes  a r e c r e a t e d i n Maya v i a  which h a s t h e f o l l o w i n g  expression. present  Should  <gl>  the  match  or d e f a u l t s t o NIL.  i s  <pattern>  associated  PROCESS,  r<else>1).  a q a i n s t t h e p a t t e r n argument  w i t h t h e QLAMBDA e x p r e s s i o n process  function,  form:  (PROCESS <schema> < P a t t e r n > i s matched  the  fail,  Otherwise, as t h e body  with  <else>  i s  o f t h e QLAMBDA evaluated  a new p r o c e s s of  the  i f  i s created  process.  The  an o b j e c t , <schema>, o r i f NIL i s 5: Maya  138  specified,  with  no o b j e c t .  schemata  i s utilized  described  later,  Once until  a  by  by t h e s y s t e m  by  executing  suspended  of  or  is  suspended,  executing the l a s t  t h e EXIT  via  or  FAIL  processes  with  f u n c t i o n , COMPLETE, w h i c h i s  process i s c r e a t e d , i t s procedure  i t terminates  terminated  The a s s o c i a t i o n  form  A  body i s e x e c u t e d process  i n i t s procedure  functions.  be  body o r  Processes  t h e SUSPEND o r COMPLETE f u n c t i o n s .  p r i m i t i v e o f two a r g u m e n t s , a t u p l e ,  lay  may  be  SUSPEND i s a  < p a t t e r n > , and a t u p l e b a s e ,  <db>, a s i n d i c a t e d i n : (SUSPEND < p a t t e r n > The  current  stored  running  i n the  process  process  specified  which i n v o k e d  processes  tuplebase.  of  and  named p r o c e s s e s .  plus  cf either  an a s s o c i a t e d schema.  to a tuplebase  processes  form  adds  to  expression  tuplebases;  A suspended the  process current A  a QLAMBDA e x p r e s s i o n o r a QEXPR Suspended  processes  Named  a r e added  processes  are  as f e l l o w s  the  < p a t t e r n > , a named p r o c e s s QLAMBDA  to the  p l u s an a s s o c i a t e d schema.  (PADD < p a t t e r n X d b > (NAMED-PROCESS This  in  representing  v i a t h e SUSPEND f u n c t i o n .  added t o a t u p l e b a s e  returns  process.  types  state o f evaluation o f the process  name  Control  two  c o n s i s t s o f t h e segment o f t h e s t a c k  named p r o c e s s c o n s i s t s  .  i s s u s p e n d e d t o t h e p a t t e r n and i s  t h e now s u s p e n d e d  Maya r e c o g n i z e s suspended  <db>).  tuplebase, whose  <glXschema>) ) .  <db>,  procedure  o r a QEXPR name.  under t h e p a t t e r n , body,  <gl>,  is  a  < P a t t e r n > and t h e p a t t e r n 5: Maya  139  argument o f <ql> the  process  object. any  i s  associated  I f <schema> i s  w i t h t h e schema  I f <schema> i s NIL, t h e p r o c e s s  an  object,  represented  by t h e  i s not a s s o c i a t e d  with  schema. The  major d i f f e r e n c e s  processes only  between named p r o c e s s e s  are the following.  once f o r e a c h  invoked,  the  tuplebase. multiple  A suspended  appearance  in  p a t t e r n t o which  times  from  resulting  the  same  i n the i m p l i c i t  takes  will  control such  noticed  that  p r i m i t i v e s r e t u r n items  as  RESUME  primitives, value  be  from  sequentially  they  are  are  c f a new  resumed  <db>  form,  generate  each  process,  by  the  BESUME  <else>:  [<else>]).  also  can  and t h e n  match  i s resumed. a l l t h e top-down and b o t t c m - u p as v a l u e s .  generators.  be  I f the  t h e p r o c e s s bound t o t h e  operated  Therefore, functions In t h e c a s e  a r e bottom-up g e n e r a t o r s .  RESUME  invoked  the tuplebase.  Otherwise,  pattern i n the tuplebase  It  be  a tuplebase,  i s matched a g a i n s t t h e t u p l e b a s e , <db>.  <else> i s e v a l u a t e d .  matched  i t i s  t h r e e arguments: a p a t t e r n , <pattern>, a  (RESUME < p a t t e r n >  fails,  be resumed  When  may  in  creation  t u p l e f c a s e , <db>, and an o p t i o n a l f a i l u r e  <Pattern>  may  tuplebase.  pattern  Suspended and named p r o c e s s e s which  and s u s p e n d e d  i t was bound i s d e l e t e d from t h e  t h e p a t t e r n i s not d e l e t e d from  function  a  process  On t h e o t h e r hand, a named p r o c e s s  invocation and  must be i d e n t i c a l .  on  The i t e m by  t c resume e v e r y  c f process returned as  NEXT and FAIL t o process  matching  pattern. 5: Maya  140  A schema may active  have more t h a n  a t any one t i m e .  one o f i t s a s s o c i a t e d  The s t a c k thus  processes  associated  processes  have a common p u r p o s e ,  instance  of  successful need  to  be  mechanism  the  schema's  same  suspended.  to whit,  model.  is  A l l of  these  t h e r e c o g n i t i o n c f an  stereotype.  This  c o n t a i n a number c f  schema.  When  i n i t s recognition, the e f f o r t s  recognition  resuming  the  with  may  processes  a  schema  is  of a l l i t s processes  called  completion  in  the  The f o l l o w i n g f u n c t i o n , COMPLETE, p r o v i d e s a  f o r suspending the process  all  the  o f another  processes  specified  of  a  schema  and  schema o r s c h e m a t a ;  {COMPLETE < p a t t e r n > <db> C < e l s e > ] } . <Pattern> On  is  success,  below  matched a g a i n s t t h e t u p l e b a s e o f p r o c e s s e s ,  the c u r r e n t p r o c e s s ,  to a reactivation  matching <pattern>, This  COMPLETE t h e n  function  mechanism i n Maya f o r model.  is  realizing COMPLETE  on  top-down schema  the  assumption  and bottom-up are  schema i n s t a n c e . particular instance with  schema  that  same  described  resumes the p r o c e s s  with  has  main  aspects  The  of  the  heuristic  mechanism  is  f o r machine p e r c e p t i o n t a s k s a l l associated  the when a  concluded  are  structure  supergoals,  ultimate method that  no  longer  with  a  particular  recognition cf that associated  with  a  the r e c o g n i t i o n of i t s  a l l concurrently active  schema  control  control  hierarchies.  that  Therefore,  i s complete,  the  methods  concerned  the  supports  method s c h e d u l i n g , and method based  as  P2.  complex  recognition  tag.  P1, i s s u s p e n d e d  <db>.  methods a s s o c i a t e d  needed.  They must be 5: Maya  141  suspended. the  In order t o achieve t h i s  processor  associated P1  with  above).  to  t h e same schema a s t h e c u r r e n t p r o c e s s  (labelled  such  Finally,  p2  process  and  occurrence  i t s sub-processes  are  then  a  new  language  was  i s resumed.  Conclusion  artificial discussed  from  impossible language  perspective in  the  to completely  a  brief  programming of  recognition a  discussed.  a t u t o r i a l on  appearing  the  model.  complex c o n t r o l and  here  and  of  its  procedural  although  high-level  h e r e , a number of  presented  The  realizing  available  descriptions  overview  language.  characterize  t h a t i n t r o d u c e s new  been  reference  the  defined  the space  have  presented  intelligence  mechanisms  the  every  searches processes  T h i s c h a p t e r has  in  find  COMPLETE of  Every  suspended.  5.7  stack  result,  programming  data  salient  Maya, d e s i g n e d  t o supplement  i n a p p e n d i x - B , i s now  it is  the  structures features t o augment language  in preparation.  5:  Maya  112  CHAPTER  6.1  RJVISITEE  Perspective  In step  this final  back  and  recapitulation perspective perception. indicating  6.2  6: RECOGNITION  re-examine of  of  the  the  work  recognition  of  this  model to  a  the opportunity  i s  to  thesis. made  theory  from  of  A the  machine  a p p l i c a t i o n s f o r t h e model a r e d i s c u s s e d  some p r o m i s i n g  Perception  t h e author takes  i t s contribution  Finally,  Recognition  task.  chapter,  directions for future  research.  Revisited  has been c h a r a c t e r i z e d as an a c t i v e  Such a view  of p e r c e p t i o n  i s held  recognition  by Bobrow and W i n o g r a d  (1977) : R e a s o n i n g i s d o m i n a t e d by a p r o c e s s of recognition in which new objects and e v e n t s a r e compared t o stored sets o f expected prototypes, and i n which specialized r e a s o n i n g s t r a t e g i e s a r e keyed t o t h e s e prototypes (p.4).  This memory  process of  Experience mechanism.  a  i s more t h a n a s i m p l e stored  description  passive  of  the  retrieval thing  i s much t o o v a r i e d and complex t o depend We  are  constantly  experiencing  new  from  perceived. on  such  a  situations,  6: R e c o g n i t i o n  Revisited  143  seeing never  new  o b j e c t s , understanding  perceive exactly  more t h a n  once.  composing  new  new  sentences.  t h e same e x p e r i e n c e i n t h e  Thus,  perception  descriptions  finite  knowledge of t h e  argues  that  perceiving  a  of experience  world  (Chomsky,  an e x p e r i e n c e  a metaphor t o d e s c r i b e t h a t  is  We  probably  same  situation  generative  process,  i n terms of a s t o r e d  1957).  Jaynes  i s a process  (1976)  of a r r i v i n g  at  experience.  Generations ago we would understand thunderstorms perhaps as t h e r o a r i n g and r u m b l i n g a b o u t i n b a t t l e o f superhuman gods. We would have reduced the racket that f o l l o w s the streak of l i g h t n i n g to f a m i l i a r b a t t l e sounds, for example. Similarly today, we reduce the storm to v a r i o u s s u p p o s e d e x p e r i e n c e s w i t h f r i c t i o n , s p a r k s , vacuums, and the i m a g i n a t i o n o f b u l g e o u s b a n k s of b u r l y a i r s m a s h i n g t o g e t h e r t o make t h e n o i s e . None o f these really exist as we picture them. Our images of these events of physics are as f a r from the actuality as fighting gods. Yet they act as metaphor and t h e y f e e l f a m i l i a r and so we say we understand the thunderstorm (p.52).  Thus,  descriptions  of  p e r c e i v e the sensory  world  knowledge  world.  machine  of  perception,  emulating theory What  that  this  the  procedural  i n t e r m s of In  must  generative  f a c e s two is  we  experience  form  and  mechanisms  our  order  to  metaphorical.  The  descriptive  develop  a theory  for  specification  of a  representation  perform  of  mechanisms  and  o r g a n i z a t i o n o f memory and can  Se  stored  characterize  process.  major i s s u e s :  are  recognition. what t y p e s  recognition  on  of  that  representation? The  p s y c h o l o g i c a l g u e s t i o n o f memory  6:  organization  Recognition  is  far  Revisited  144  from  resolved.  imagery  and  There  structural Simon  i s e x p e r i m e n t a l e v i d e n c e s u p p o r t i n g both representations (Yuille,  Chase  and  better  a t remembering c h e s s  games t h a n at  board  from random b o a r d  remembering  players,  (1973) have shown t h a t  random  thus  indicating  descriptions.  on  schematic  most  positions  ficm The  approaches definite  I t seems c l e a r  predominantly perception  a  that  certainly  makes  A major a s p e c t o f t h i s  thesis  a r c much  actual  expert's  that  chess ability  of  non-chess  dependence on  structural  high-level  mechanisms  However,  chess masters  arrangements.  boards  1976).  reasoning  depends  (Pylyshyn, 1976),  although  use  of  both  imagery  and  schemata.  perception  as  an  active  is  the  process  characterization  that  knowledge o f t h e w o r l d .  The  value of a c t i v e  has  by  Einograd's  been  system, state  demonstrated  SHRDLU. of  language  the  H i s system art,  was  that  semantics  insightful  lesson  heuristic  is  systems,  The  that  f o r the  (1973)  knowledge  (1973a) n a t u r a l  language  advance  apparent  in  semantics lessen  cf  systems.  A  semantics coupled  mechanism  for  in a his  perception process.  can  be  by 6;  defining  with  Procedures  obtained in purely  argued,  more  introducing  improvement i n p e r f o r m a n c e ,  has  the  s e m a n t i c s i s more p o w e r f u l t h a n  procedural  same c a p a b i l i t y  as Hayes  heuristic  performance-based  knowledge t o g u i d e t h e  The  heuristic  procedural  search provides a  are only the v e h i c l e reason.  for  exploits  significant  system.  procedural  declarative  hypothesis-driven  a  incorporating  understanding  research  was  of  not  the  logical  deductive  Recognition Revisited  145  control  operators  within the  mechanisms p r o v i d e t h e into  the  perceptual  the  hypothesis-driven  {1973b)  b a r r i e r " t o the the  require some not  the  sensory  sclve  has  on  system  noted  attempted becomes  before  be  before  chosen any  of  a  by K u i p e r s  sensory can  fact  of a  problem.  "complexity arises Such  £rem  methods  interpretation The that  a  is  particular  interpretation  process.  for  deficiency  recognition  search  recognition  search to  by  recommend  appealing likely  confront  ambiguous e n c o d i n g data  has  and  knowledge  Its expertise  a l s o been p r o p o s e d  1975).  The  (1975) i s p r o b a b l y  o u t , h i s model a t t e m p t s  mechanism d o e s n o t highly  sufficiently  barrier  found.  heuristic the  a  to  late!  described  network  The  plausible  schemata r e p r e s e n t a t i o n s (Minsky,  top-down  knowledge  perception  correct  be  but t h e  its  to d i r e c t  Hypothesis-driven  pointed  such  guidance  mechanisms.  the  i t can  as  been  appearance  search  to hypothesize  available  comes t o o  not  machine  the  top-down  input  must  has  the  hypothesis-driven search,  schema  Again,  i n c o r p o r a t i o n of h e u r i s t i c  advancement o f t h e a r t .  dependence  system.  f c r introducing active  recognition  mechanism t o  Winograd  vehicle  logic  process.  Unfortunately,  powerful  formal  to  the r e a l  known.  problem. The  model As  was  inadeguacies  of  a failure-driven  of experience.  of  the  alternative  r e q u i r e s a methodology  t o l e r a t e l a r g e degrees  the best  avoid  to  recognition  for  similarity  hypotheses.  This  Sensory  is a  data  interpretation  of  that e x p l o i t s contexts  and  non-determinism. 6:  The  top-down  Recognition  Revisited  146  model  appeals  implicitly  to  the  tSJD.yiJSB.Iils. t h e o r y o f p e r c e p t i o n following  v e r b a l example  given  "little  (Pylyshyn, by K u i p e r s  man  i n the head" or  1973).  Consider  the  (1975):  A frame [schema] represents a certain limited domain, and hence a r a n g e o f v a r i a t i o n for objects which b e l o n g t o t h a t domain. As we saw i n t h e room s c e n a r i o , t h e f e a t u r e s o f a f r a m e may be frames i n their own r i g h t , embodying r a n g e s o f v a r i a t i o n . Cn entering a room, you are prepared for certain typical pieces of furniture. A park bench or diamond-encrusted throne would be outside the permissible range o f v a r i a t i o n i n t h i s frame. Such an anomaly may i n d i c a t e t o t h e c o r r e c t i o n mechanism t h a t a n o t h e r frame i s c a l l e d f o r (p. 1 5 9 ) .  In  this  description,  finessed  by a s s u m i n g  than  room.  a  complexity. cn  the  They a r e , i n f a c t ,  Postponing  possible contents  the  search  " a p p r o p r i a t e " schema domain-specific That  knowledge  machine  bad  was  to  mechanisms. the  hypothesis  it.  Relying  Only  recognition  search  then  will  that  of  a rccm  process  another  until  will an  schema's  to guide the r e c o g n i t i o n . One  must c o n c l u d e  i s not t h e mechanism  r e g a r d l e s s of  surmount  Upon e n t e r i n g  after  be a v a i l a b l e  a t t a c h m e n t s added t o i m p r o v e In o r d e r  not s o l v e  abdicates the r e s p o n s i b i l i t y  needed much e a r l i e r .  perception  been  p r o b l e m s o f t h e same o r d e r o f  object,  i s found.  knowledge  hypothesis-driven build  o f a room  an u n a n t i c i p a t e d one  has  t h e r c c m schema t o h a n d l e a l l o r even  process to f a i l u r e  select  problem  t o r e c o g n i z e a park bench  the problem w i l l cf  most  blindly  perception  that i t i s easier  expectations  containing  the  the  type  upon of  that  which t o auxiliary  i t s performance. this  complexity 6:  barrier,  Recognition  machine Revisited  147  perception  r e q u i r e s both  Hypothesis-driven with has  the  hypothesis  search  recoqnition  applies  to  select  supportinq methods search  likely  evidence  can  be  and  cues.  After beinq  search  methods  search  b a s e d on  Top-down  of  and  plausible  e s t a b l i s h e d as  confirm  their  via subqoalinq  c u e s i n the i n p u t data  commitment  provides  bottom-up manner.  hiqher  likely  the  the d i s c o v e r y  to sub-schemata  Bottcm-up  schemata  both and  as  these  by  by  bottom-up s e a r c h  of  search  hypotheses,  recoqnition  to d r i v e the  associated  schema o n c e a  Data-driven  hypotheses  activation  schemata attempt t o top-down  heuristic  inteqrated in a synerqistic  d r i v e s the  superqoals.  data-driven recoqnition.  of a p a r t i c u l a r  been made t o t h a t schema.  means  and  usinq  observinq. for  ether  schemata. Recently, perception. depicted of  a number o f o t h e r Mackworth  i n F i q u r e 6.1a  Roberts  iterative  (1965).  process.  models.  Models  observation. elaboration the  of  Exploration  he  this  the  qiven  has  offered  of  to  cues  verify  recoqnized  model  oriqinal  invoke their  work an  appropriate  hypotheses  hypotheses  consequences of t h e i r  cause  by the  models, r e s u l t i n q  in  cues. a  by  (1976).  results  the c y c l i c  for  m o d e l , p e r c e p t i o n i s seen a s  illustrates  which  proposed  a t t r i b u t e s to the  discovery  Successfully  F i q u r e 6.1b  expectations  which  attempt  d i s c o v e r y o f new  perception  (1977c)  In The  models have b e e n  Neisser  direct in  the  similar  cyclic Schemata  e x p l o r a t i o n of  observations  the  which 6:  model  of  represent  sensory match  world. these  Seccqnition Revisited  148  MODEL ELABORATION CUE DISCOVERY  MODEL VERIFICATION MODEL INVOCATION F i g u r e 6.1a  OBJECT  samples  modifies  SCHEMA directs  EXPLORATION  F i g u r e 6.1b  FIGURE 6.1C  6: R e c o g n i t i o n  Revisited  149  expectations  thereby  process.  Neisser  seguential  nature of  schemata o v e r  modifying the uses  perception  each  author  cue/model  hierarchy,  perception  of c u e s as  6,1c  presented the  cycle is  abstract  The  cyclic  models o f  completed, of  the  the  inherently  modification  of  c u e s i n the  a  model i s a mechanism f o r  the  model c a n  a cyclic  of  perception  seen  to  generalize  6.1a  and  path  o f cue  cycle  6.1b.  As  these and  pass through  this  schema's ascends  at the  in  discovery  recognition  one  Schemata r e c o g n i z e d  recognition  elaborated.  model be  However, when a  models.  existence  sufficiently  recursive  recognition  c u e s and  of  A p a r t i c u l a r schema may  times.  the  the  entities  Figures  follows  invocation.  hierarchy  s t r e s s the  for  neither  in this thesis.  a number o f  becomes  in  the  models, r e c o g n i t i o n schemata  to  involving  allows  illustrates  purely  model  propagating  time.,  Although  Figure  this  s c h e m a t a and  level  at  next h i g h e r  one  level  in a level  in  the  hierarchy. Despite hierarchies time goal  the i n the  (Mackworth, has  thesis  not  i s the  The  that  cycle of 1976,  the  perception  necessity has  The  major  cf completion  the  recursive  recognized  a  fully  i t  must  provides  nature of  specified return  that  cue/model for  an  such a  instance  of  success 6:  to  one  cf  this  mechanism  when a its  this  mechanism.  explicit  perception.  seme  for achieving  contribution  p r e c i s e c h a r a c t e r i z a t i o n of  notion  of  been c l e a r  1 9 7 7 c ) , a mechanism  been s p e c i f i e d .  capturing  concept,  fact  schema  for has  stereotypical or  more  Recognition  higher  Revisited  150  schemata.  I f t h e schema was  a c t i v a t e d as  schema, i t must r e t u r n i t s c o m p l e t e d Otherwise,  the  completed  bottom-up methods and an  a b s t r a c t cue  higher  schemata  Ortony for  has  schema  description has  nc e x p l i c i t  which attempts  to  activating  them a s  (1976) h a v e a d d r e s s e d  a subgoal  been  similar  higher  to that  schema.  I t then  the  using  exists  expectations  supergoals. control  a  recognized  caller.  match  by  of  Rumelhart  structure  as  and  issues  schemata. It may be helpful to think of these p r o c e s s i n g i s s u e s i n t e r m s o f a computer programming metaphor, for one can think of a schema a s b e i n g a k i n d o f procedure. P r o c e d u r e s have s u b r o u t i n e s and one can think of the a c t i v a t i o n o f a schema as b e i n g l i k e t h e i n v o c a t i o n of a p r o c e d u r e . The v a r i a b l e s o f a schema are thus analogous to the v a r i a b l e s of a procedure w h i l e the sub-schemata are analogous to t h e s u b r o u t i n e s which may be i n v o k e d frons w i t h i n i t . The a c t i v a t i o n o f s u b s c h e m a t a within a schema is l i k e the c a l l i n g - u p or i n v o c a t i o n of the s u b r o u t i n e s w i t h i n a procedure. T h i s i s the paradigm case of conceptually-driven processing. However, unlike o r d i n a r y procedure calls, in which the flow of control i s only from p r o c e d u r e t o s u b r o u t i n e , t h e flow of c o n t r o l i n a schema system operates both ways. It i s as t h o u g h a g i v e n p r o c e d u r e not o n l y c o u l d i n v o k e t h o s e p r o c e d u r e s i n which i t was i t s e l f a s u b r o u t i n e ( d a t a - d r i v e n processing}.. F i n a l l y , one must imagine these procedures as a l l operating s i m u l t a n e o u s l y (p. 46).  The  realization  programming  of  this  programming  language i s the  second  thesis.  Maya d e f i n e s e x p l i c i t  schemata  and  methods  with  subgoals  using  schemata schemata,  major  contribution  operating of  this  language p r i m i t i v e s f o r c r e a t i n g  networks, and  metaphor a s an  for  associating  f o r invoking those  conceptually-driven  search 6:  and  procedural  methods b c t h as  as  supergoals  Recognition R e v i s i t e d  151  using  data-driven  completion  aspect  scheduling of  6.3  techniques. of the  mechanism  As  recoqnition  well,  Maya  model  as  utilizes a  the  multiprocess  f o r s i m u l a t i n q the c o n c u r r e n t  application  methods.  A p p l i c a t i o n s and  The interest  issues in  recoqnition qeneral  a model  understanding.  machine  and  its  exhibits  such  are  will  semantic  of  analogous  focus  1977a).  have  such  a  Maya  reason, should  and  control  in  as  highly  the have  machine episode  in  similar  automatic  issues  ideas developed  quidance  and  in  and of this  concurrent  there. task  First, an  the  domain task  explicit  exhibited  order and  of  structure issues in  on a s p e c i f i c  a d v a n t a g e s o f i n t e g r a t e d top-down should  this  r e s e a r c h as  to  The  preferably  Second,  currently  integrated hypothesis-driven  heuristic  representation  (Mackworth,  problem  of  the f o l l o w i n g four c r i t e r i a .  a well-defined semantics,  as  to the c o n t r o l  a l s o have a p p l i c a t i o n  research  For  understanding,  deduction.  active  are  perception  problems  Issues  forward  ccncerninq  methods s h o u l d  thesis  realization  similar  recoqnition  and  Future  in  Moreover,  perception.  backward  this  language  systems are  data-driven  in  number o f r e s e a r c h a r e a s .  natural  deduction  Research  addressed  applications  vision,  model  Future  to  must  that have  conventional  by  sketch  exploit  fully  maps the  bottom-up r e c o g n i t i o n , the ambiguous 6:  input  data  Recognition Revisited  152  representation. hierarchical the  advantages  of  And  have been shown  video  task to  be  the  the  (Stallman  handwriting.  6  in  inherently  order  domain must be previous  inadequate. include  analysis  should  to  of  Sussman,  the  in  generally  recognition  Possible  1977), and  mechanisms  research  circuit the  machine accepted  i n t e r p r e t a t i o n of  electronic  have a  demonstrate  cue/model h i e r a r c h i e s  f o r which  these c r i t e r i a  images,  diagrams  problem  recursive  finally,  a a perceptual  exhibiting  the  knowledge r e p r e s e n t a t i o n  perception. as  Third,  tasks LANDSAT  schematic  understanding  of  153  BIBLIOGRAPHY  A HO A. 6 ULLMAN, J . ( 1 9 7 2 ) The T h e o r y o f P a r s i n g , T r a n s l a t i o n , and C o m p i l i n g , v o l 1 , P r e n t i c e H a l l , Englewood C l i f f s ,  W7J.7~P.32O7 BARTLETT, F.C. ( 1 9 3 2 ) Remembering, C a m b r i d g e Cambridge, England.  Oniv.  Press,  BOBROW, D.G. 5 NORMAN, C. A. ( 1 9 7 5 ) Some P r i n c i p l e s o f Mencry Schemata, i n D.G.Borrow S A . C c l l i n s ( e d s . ) . R e p r e s e n t a t i o n and U n d e r s t a n d i n g , A c a d e m i c P r e s s , New York. BOEROH, E.G. 6 RAPHAEL, B. ( 1 9 7 4 ) New Programming L a n g u a g e s f o r A. I , R e s e a r c h , Comp. S u r v e y s , v o l 6 , pp. 1 5 3 - 1 7 4 . BOBROW, D.G. & WEGBREIT, B. ( 1 9 7 3 ) A Model and S t a c k I m p l e m e n t a t i o n o f M u l t i p l e E n v i r o n m e n t s , CACM, O c t . 1 9 7 3 , vol  16,  #10,  p.591.  BOBROW, D.G. & HINOGRAD, T. ( 1 9 7 7 ) An O v e r v i e w o f KRL: A Knowledge R e p r e s e n t a t i o n L a n g u a g e , C o g n i t i v e S c i e n c e . vol 1, # 1 , J a n 1 9 7 7 . CHARNIAK, E. ( 1 9 7 5 ) O r g a n i z a t i o n and I n f e r e n c e i n a F r a m e - L i k e System o f Common Knowledge, P r o c . T h e o r e t i c a l I s s u e s i n N a t u r a l Language P r o c e s s i n g , C a m b r i d g e , Mass., J u n e 1 9 7 5 , p.46. CHASE, W. G. & SIMON, H. ( 1 9 7 3 ) P s y c h o l o g y , #4, p p . 5 5 - 8 1 . CHOMSKY, N. ( 1 9 5 7 ) co. CLOWES, M.B. ( 1 9 7 1 ) vol  2,  #1,  Perception  i n Chess,  S y n t a c t i c S t r u c t u r e s , The Hague:  On S e e i n g  pp.79-112.  Things,  Artificial  Cognitive  Moutcn and  Intelligence,  COLLINS, A. & LOFTUS, E. ( 1 9 7 5 ) A S p r e a d i n g A c t i v a t i o n T h e o r y of S e m a n t i c P r o c e s s i n g , P s y c h o l o g i c a l Review, v o l 8 2 , #5. COLLINS, A. & QUILLIAN, M.R. ( 1 9 7 2 ) How t o Make a Language U s e r , i n O r g a n i z a t i o n o f Memory. E . T u l v i n g S W.Donaldson (eds.)... A c a d e m i c P r e s s , New Y o r k . DAHL, 0 . & NYGAARD, K. ( 1 9 7 6 ) SIMDLA-An A l g o l - b a s e d L a n g u a g e , CACM, v o l 9 , S e p t . 1 9 7 6 .  Simulation  154  DAVIES, D. J . (1973) P c p l e r - 1 . 5 R e f e r e n c e M a n u a l , TPU R e p o r t # 1 , S c h o o l o f A r t i f i c i a l I n t e l l i g e n c e , D n i v . Of Edinburgh, Edinburgh, Scotland. EARLEY, J . (1970) An E f f i c i e n t C o n t e x t - F r e e P a r s i n g CACM, v o l 13, #2, Feb 1970, pp.94-102.  Algorithm,  FAHLMAN, S.E. {1975) T h e s i s P r o g r e s s R e p o r t ; A System f o r R e p r e s e n t i n g and U s i n g R e a l - W o r l d Knowledge, AIM-331, A . I . L a b , MIT, C a m b r i d g e , Mass. FEIGENBAUM, E.A. (1963) The S i m u l a t i o n o f V e r b a l L e a r n i n g B e h a v i o r , i n Computers and T h o u g h t , Feigenbaum, E.A. S Feldman, J . ( e d s . ) , M c G r a w - H i l l , New Y o r k , p.297. FILLMORE, C. (1968) The C a s e f o r C a s e , i n E.Bach 6 R . I . H a r r i s (eds.), U n i v e r s a l s i n L i n g u i s t i c Theory, Holt, Rhinehart S W i n s t o n , New Y o r k . FREUDER, E.C. (1976) A Computer System f o r V i s u a l R e c o g n i t i o n u s i n g A c t i v e Knowledge, Ph.D. T h e s i s , AI-TR-345, MIT AI L a b o r a t o r y , C a m b r i d g e , Mass. GELERNTEH, H. (1963) R e a l i z a t i o n o f a Geometry T h e o r e m - E r c v i n g Machine, i n E. A. Feigenbaum & J , F e l d m a n ( e d s . ) . C o m p u t e r s and T h o u g h t , M c G r a w - H i l l , New Y o r k . GREEN, C. (1969) A p p l i c a t i o n o f T h e o r e m - P r o v i n g t o P r o b l e m S o l v i n g , P r o c . I J C A I 1 , W a s h i n g t o n , D . C , May 1969. GUZMAN, A. (1968) Computer R e c o g n i t i o n o f T h r e e - D i m e n s i o n a l O b j e c t s i n a V i s u a l S c e n e , MAC-TR-59, P r o j e c t MAC, MIT, C a m b r i d g e , Mass. :  HAVENS, W. S. (1976) Can Frames S o l v e t h e C h i c k e n and Egg P r o b l e m ? , P r o c . F i r s t CSCSI/SCEIO N a t . C o n f . , UBC, V a n c o u v e r , Canada, August 1976. HAYES, P. J . (1973) C o m p u t a t i o n and D e d u c t i o n , P r o c . C o n f . , C z e c h o s l c v a k i a n Academy o f S c i e n c e s .  1973  MFCS  HENDRIX, G. (1975) E x p a n d i n g t h e U t i l i t y o f S e m a n t i c Networks t h r o u g h P a r t i t i o n i n g , P r o c . I J C A I 4 , T b i l i s i , G e o r g i a , USSR, S e p t . 1975, pp. 115-121. HEWITT, C. (1972) D e s c r i p t i o n and T h e o r e t i c a l A n a l y s i s ( u s i n g Schemata) o f PLANNER: A L a n g u a g e f o r P r o v i n g Theorems and M a n i p u l a t i n g M o d e l s i n a Robot, Ph.D. T h e s i s , A . I . L a b , MIT, C a m b r i d g e , Mass,  155  HEWITT, C , BISHOP, P., Z ST EI G EH, R. (1973) A U n i v e r s a l M o d u l a r ACTOR F o r m a l i s m f o r A r t i f i c i a l I n t e l l i g e n c e , I J C A I 3 , S t a n f o r d U n i v . , S t a n f o r d , C a l i f . , A u g u s t 1973. HUFFMAN, D. A. ... (1971) I m p o s s i b l e O b j e c t s as Nonsense S e n t e n c e s , i n M a c h i n e I n t e l l i g e n c e 6, B . M e l t z e r S D , M i c h i e ( e d s . ) , Edinburgh Univ. P r e s s , Edinburgh, S c o t l a n d . JAYNES, J . (1976) The O r i g i n o f C o n s c i o u s n e s s i n t h e Breakdown c f t h e B i c a m e r a l Mind, H o u g h t o n - M i f f l i n , Eoston. KAFIAN, R. (1973) A G e n e r a l S y n t a c t i c P r o c e s s o r , i n R . R u s t i n ( e d . ) , N a t u r a l Language P r o c e s s i n g , A l g o r i t h m i c P r e s s , New York. KOWALSKI, R. A. (1974) P r e d i c a t e L o g i c a s a Programming L a n g u a g e , P r o c . I F I P 7 4 , N o r t h - H o l l a n d , pp.569-574. KUIPEBS, B.J. (1975) A Frame f o r Frames: R e p r e s e n t i n g Knowledge f o r R e c o g n i t i o n , i n R e p r e s e n t a t i o n and U n d e r s t a n d i n g , D.G.Bobrow & A . C o l l i n s ( e d s . ) , A c a d e m i c P r e s s , New Y o r k . MACKWORTH, A.K. (1975) C o n s i s t e n c y i n N e t w o r k s o f R e l a t i o n s , TR-75-3, Comp. S c i e n c e D e p t . , U n i v . o f B r i t i s h C o l u m b i a , V a n c o u v e r , Canada, a l s o A r t i f i c i a l I n t e l l i g e n c e , v o l 8, #1, pp.99-118. MACKWORTH, A.K. (1976) Model D r i v e n I n t e r p r e t a t i o n i n Intelligent V i s i o n S y s t e m s , P e r c e p t i o n , v o l 5, pp.349-370.  MACKWORTH, A.K. (1977a) On R e a d i n g S k e t c h Maps, TR-77-2, D e p t . o f Computer S c i e n c e , U n i v . o f B r i t i s h C o l u m b i a , V a n c o u v e r , C a n a d a , a l s o P r o c . I J C A I - 7 7 , MIT, C a m b r i d g e , Mass., August 1977, p.598. MACKWORTH, A.K. .(1977b) How t o See a S i m p l e W o r l d , i n Machine I n t e l l i g e n c e 8, E.W.Elcock S D . M i c h i e ( e d s . ) , H a l s t e d P r e s s , New Y o r k . MACKWORTH, A.K. (1977c) V i s i o n R e s e a r c h S t r a t e g y : B l a c k Maqic, M e t a p h o r s , Mechanisms, M i n i w o r I d s , and Maps, P r o c . Workshop cn Comp. V i s i o n S y s t e m s , J u n e 1977, U. Mass, Amherst, Mass.  McCALLA, G. (1977) An A p p r o a c h t o t h e O r g a n i z a t i o n o f Knowledge f o r t h e M o d e l l i n g o f C o n v e r s a t i o n , Ph.D. T h e s i s , Comp. S c i e n c e D e p t . , U n i v . o f B r i t i s h C o l u m b i a , V a n c o u v e r , Canada.  156  MCCARTHY, J . S HAYES, P. {1969) Some P h i l o s o p h i c a l P r o b l e m s f r o m t h e S t a n d p o i n t o f A r t i f i c i a l I n t e l l i g e n c e , i n Machine I n t e l l i g e n c e ft, B . M e l t z e r 6 D . M i c h i e ( e d s . ) , E d i n b u r g h University Press, Edinburgh, Scotland. McDERMOTT, D.V. & SUSSMAN, G. (1973) Son o f CONNIVER: The CONNIVER R e f e r e n c e M a n u a l , MIT AI L a b , C a m b r i d g e , Mass. McDERMOTT, D. V. {1975) V e r y L a r g e P l a n n e r - L i k e D a t a b a s e s , MIT AI L a b , Memo 339, C a m b r i d g e , Mass., S e p t . 1975. MINKER, J . & VANDENBRUG, G . J . (1973) T h e B a r l e y A l g o r i t h m a s a P r o b l e m R e p r e s e n t a t i o n , T e c h . R e p o r t TR-247, Comp. S c i e n c e Center, Univ.of Maryland, C o l l e g e Park, Maryland. MINSKY, M. (1975) A Framework The P s y c h o l o g y c f Computer M c G r a w - h i l l , New Y o r k . NEISSER, U. (1976) C o g n i t i o n San F r a n c i s c o .  f o r R e p r e s e n t i r g Knowledge, i n V i s i o n . P.Winston ( e d . ) ,  and R e a l i t y . ,  W. H. Freeman  S co.,  NEWELL, A. & SIMON, H. (1963) GPS: A Program t h a t S i m u l a t e s Human T h o u g h t , i n Computers and T h o u g h t . E.A.Feigenbaum S J . F e l d m a n ( e d s . ) , M c G r a w - H i l l , New Y o r k , p.279. NEWELL, A. S SIMON, H. (1972) Human Problem S o l v i n g . P r e n t i c e - H a l l , E n g l e w o o d - C l i f f s , New J e r s e y . NILSSON, N. (1971) P r o b l e m SojLving Methods l £ t e l l i c e n c e , M c G r a w - H i l l , New Y o r k .  in Artificial  NORMAN, D.A., RUMELHART, D.E., e t . a l . (1975) E x p l o r a t i o n s i n C o g n i t i o n , W.H.Freeman & C o . , San F r a n c i s c o , PYIYSHYN, Z. W. (1973) What t h e M i n d ' s Eye T e l l s t h e M i n d ' s B r a i n : a C r i t i q u e o f Mental Imagery, P s v c p i o g i c a 1 B u l l e t i n . 1973, #80, pp. 1-24. PYIYSHYN, Z. W. (1976) Imagery and A r t i f i c i a l I n t e l l i g e n c e , i n W.Savage ( e d . ) , M i n n e s o t a S t u d i e s i n t h e P h i l o s o p h y o f Science, v o l I X , U n i v e r s i t y o f Minnesota Press, Minneapolis., QUILLIAN, M.R. (1968) S e m a n t i c Memory, i n S e m a n t i c I n f o r m a t i o n P r o c e s s i n g , M.Minsky ( e d . ) , MIT P r e s s , C a m b r i d g e , Mass., p.227. RAPOPOBT, A. (1963) T e c h n o l o g i c a l Models o f t h e N e r v o u s S y s t e m , i n K . f i . S a y r e & F . J . C r o s s o n ( e d s . ) . The M o d e l l i n g o f J i n d , Simon & S c h u s t e r , New Y o r k , p.25.  157  REBCH, E. & SACERDOTI, E. (1973) A P r e l i m i n a r y QLISP M a n u a l , S t a n f o r d R e s e a r c h I n s t i t u t e AI L a b , T e c h Note #81, a u g u s t  1973.  REITER, R. (1973) S e m a n t i c a l l y G u i d e d D e d u c t i v e System f o r a u t o m a t i c Theorem P r o v i n g , P r o c . I J C a i 3 , S t a n f o r d U n i v . , S t a n f o r d , C a l i f . , Aug. 1973, p.41. RIEGER, C. (1974) C o n c e p t u a l Memory: A T h e o r y and Computer Program f o r P r o c e s s i n g t h e Meaning C o n t e n t o f N a t u r a l Language U t t e r a n c e s , Ph.D. T h e s i s , AIM-233, S t a n f o r d U n i v . , Stanford, Calf. ROBERTS, L.G. (1965) Machine P e r c e p t i o n o f T h r e e - D i m e n s i c n a l O b j e c t s , i n O p t i c a l and E l e c t r o - O p t i c a l I n f o r m a t i o n 2lP££Ssinc[, J . T . T i p p e t e t . a l . (eds.) , MIT P r e s s , C a m b r i d g e , Mass.,~pp.159-197. ROBINSON, J.A. (1965) a M a c h i n e - O r i e n t e d L o g i c Based on t h e R e s o l u t i o n P r i n c i p l e , JACM, v o l 12, #1, pp.23-41. RUMELHART, D. & NORMAN, D. (1973) A c t i v e S e m a n t i c N e t w o r k s a s a Model o f Human Memory, P r o c . I J C A I 3 , S t a n f o r d U n i v . , S t a n f o r d , C a l i f . , Aug. 1973, p.450. RUMELHART, D.E. & ORTONY, A. (1976) The R e p r e s e n t a t i o n o f Knowledge i n Memory, T e c h . R e p o r t #55, C e n t e r f o r Human I n f o . P r o c e s s i n g , D e p t . o f P s y c h o l o g y , U n i v . o f C a l i f . At San Diego, La J o l l a , C a l i f . SAMUEL, A. L . (1963) Some S t u d i e s i n Machine L e a r n i n g U s i n g the Game o f C h e c k e r s , i n E.A.Eeigenbaum & J,Feldman ( e d s . ) . Computers and T h o u g h t . M c G r a w - H i l l , New Y o r k . SCHANK, R. (1975) U s i n g Knowledge t o U n d e r s t a n d , P r o c . T h e o r e t i c a l I s s u e s i n N a t u r a l Language P r o c e s s i n g , MIT, C a m b r i d g e , Mass., J u n e 1975, p. 131. SCHANK, R. & ABELSON, R. (1975) S c r i p t s , P l a n s and Knowledge, P r o c . I J C A I 4 , T b i l i s i , G e o r g i a , USSR, S e p t . 1975,  pp. 151-157.  SCHUBERT, L . (1975) E x t e n d i n g t h e E x p r e s s i v e Power o f S e m a n t i c Networks, P r o c . IJCAI4, T b i l i s i , G e o r g i a , USSR, S e p t . 1975, p.158. SLAGLE, J . R. (1971) a r t i f i c i a l I n t e l l i g e n c e : The H e u r i s t i c Programming A p p r o a c h , M c - G r a w - H i l l , New York.  158  STALLMAN, R. M. 5 SUSSHAN, G. J . (1977) F o r w a r d R e a s o n i n g and Dependency-Directed B a c k t r a c k i n g i n a System f o r Computer-Aided C i r c u i t A n a l y s i s , A r t i f i c i a l I n t e l l i g e n c e , v o l 9, #2, O c t . 1977, p.135. SUSSHAN, G. S KcDERMOTT, D. (1972) S h y C o n n i v i n g i s B e t t e r t h a n P l a n n i n g , AIM-255A, A . I . L a b , MIT, C a m b r i d g e , Mass. SDSSMAN, G.J., WINOGRAD, T., S CHARNIAK, E . (1973) MICRO-PLANNER R e f e r e n c e Manual, AI L a b memo #203A, MIT, C a m b r i d g e , Mass. TEITELMAN, W. (1974) INTERLISP R e f e r e n c e M a n u a l , X e r o x P a l o A l t o Research Center, Palo A l t o , C a l f . Van  EMDEN, H. .H. .(1977) Programming w i t h R e s o l u t i o n L o g i c , i n M a c h i n e I n t e l l i g e n c e 8, E . W . E l c o c k 8 D. M i c h i e ( e d s . ) , H a l s t e d P r e s s , New Y o r k , pp.266-299.  WALTZ, D. L . (1972) G e n e r a t i n g S e m a n t i c D e s c r i p t i o n s f r o m D r a w i n g s o f S c e n e s w i t h Shadows, Ph.D. T h e s i s , AI-TR-271, MIT, C a m b r i d g e , Mass. WINOGRAD, T. (1973a) U n der s t an d i n g N a t u r a l L a n q u a q e . A c a d e m i c P r e s s , New Y o r k . WINOGRAD, T. (1973b) B r e a k i n q t h e C o m p l e x i t y B a r r i e r ( A q a i n ) , P r o c . ACM SIGIR-SIGPLAN I n t e r f a c e M e e t i n q , Nov. 1973. WINOGRAD, T. (1975) Frame R e p r e s e n t a t i o n s a n d t h e P r o c e d u r a l - D e c l a r a t i v e C o n t r a v e r s y , i n Re p r e s e n t a t i o n and finderstanding, D.G.Bobrow 8 A . C o l l i n s ( e d s . ) . Academic P r e s s , New Y o r k , pp.185-210. . WINSTON, P. f i . (1975) - L e a r n i n g S t r u c t u r a l D e s c r i p t i o n s from Examples, i n T h e P s y c h o l o g y o f Computer V i s i o n , P.H.Winston ( e d . ) , M c G r a w - H i l l , New Y o r k . WINSTON, P. H. (1977) A r t i f i c i a l B e a d i n q , Mass.  I n t e l l i g e n c e , Addison-Wesley,  WOODS, w.A. (1970) T r a n s i t i o n Network Grammars f o r N a t u r a l Lanquaqe A n a l y s i s , CACM, v o l 13, #10, pp.591-606. WOODS, W.A. (1974) p e c u r s i v e T r a n s i t i o n Networks and t h e Earley R e c o q n i t i o n Alqorithm, unpublished workinq paper. B o l t , B e r a n e k , S Newman, C a m b r i d q e , Mass. WOODS, W.A. (1975) Whats i n a L i n k , i n R e p r e s e n t a t i o n and U n d e r s t a n d i n g , D.G.Bobrow 5 A . C o l l i n s ( e d s . ) , A c a d e m i c P r e s s , New Y o r k , pp.35-82.  YOII.LE, J . C. (1977) The R o l e o f Imagery i n Models C o g n i t i o n , J o u r n a l o f M e n t a l Imagery, 1977, #1.  160  AFP EN DIX  A  E A g L E Y l S FAJSING ILGOBITHJ  The  following  intended still  presentation  to supplement the  more f o r m a l  of  informal  treatment  is  Earley's  algorithm  is  d i s c u s s i o n of C h a p t e r 3.  provided  by  Aho  and  A  Oilman  (1972). le is  a  are  given  set  symbols, symbol  of  which on  determines generated  by  in  item,  if  and  G.  grammar, G=(P,N,K,S),  rules,  distinguished sentence,  w  is  Upper  case  and  input  in  the  The  start  algorithm  case l e t t e r s ,  sentence.  Other  composed  of  the  used  represent:  "j",  represent lower both  and  language  to  " i " ,  P  non-terminal  is  1(G),  are  a ( i ) i s used t o  forms  S  where  w=a(1)a(2) . . . a (n)  letters  the lower  indices,  set of  s y m b o l i n N.  contained  "k", the  case  and i'th  letters  terminal  and  symbols. . • algorithm  constructs parse  [A->m.q,i] 0 < i < j , i s an  . . .  N i s the  t e r m i n a l s y m b o l s , and  input  0<j<n, t h e  r=a(1)a{2) a(i*1)  a  sentential  non-terminal  An  an  the  represent  for  is  symbols,  represent  symbol  set of  whether  non-terminal "n"  production  K i s the  operates  a context-free  only  i f  a  . . . a(i) a{j)  can  sentential can  be  element  derived  be from  Appendix-A:  of the  of  parse  form,  derived m.  lists  items.  list  rAu, from  That i s , i  Earley's Parsing  I(j) with  S through  and j  Algorithm  161  bracket rule, j.  the  portion  of w d e r i v a b l e  A->mq, c a n be u s e d  w i t h w up t o p o s i t i o n  I(j),  can  be v i e w e d  m, and t h e p r o d u c t i o n  i n t h e g e n e r a t i o n o f w up  A l l items i n a parse l i s t ,  agree  from  I {j),  j.  position  represent derivations  The i t e m s  as independent  r e c o g n i z e an i n s t a n c e o f i t s own  to  which  i n a given parse  p a r s e r s , each  list,  attempting to  p r o d u c t i o n r u l e from  the  input  sentence. The  a l g o r i t h m i s i n i t i a l i z e d by f o r m i n g a p a r s e  containing  the  single  seed  item fS->.w,0].  list  As each  1(0)  new i n p u t  s y m b o l a ( j + 1)  o f w i s r e a d , t h e a l g o r i t h m g e n e r a t e s a new  parse  list  from  until  I ( j + 1)  1 ( 0 ) . . I (j) .  T h i s process continues  the l a s t  symbol  a(n) i n w i s r e a d and I (n) g e n e r a t e d ,  or  no  parse  list  w  new  contained an  i n t h e language  be  generated,  o f G.  indicating  I f , a t t h e end o f t h i s  i t e m , [S->m.,0], i s c o n t a i n e d i n I ( n ) , t h e n The  a l g o r i t h m proceeds  functions, called until  the l a s t  be empty.  and  the d e r i v a t i o n  follow.  It  the predictor,  in  P,  w or u n t i l  found  spawns  new  t o d a t e what  B->r.  was c r e a t e d t o l o c k  three  the r u l e s of G may  possibly  derivations.  I ( j ) , and B-»r  t h e n [ B - > . r , j ] i s added t o I ( j ) . j,  of  some I ( j ) i s found  derivations  o f parse l i s t  process,  and t h e c o m p l e t e r ,  parsers t o look f o r these  t h e i t e m i n d i c a t e s a t what p o s i t i o n , parser  application  the scanner,  i s not  w i s i nL(G).  F i r s t , t h e p r e d i c t o r computes f r o m  fA->m.Bq,i] i s an element  rule  by t h e c y c l i c  symbol i s r e a d from  to  If  can  until  in  The i n d e x , the  parse  a  is  a  j ,  in  new  f o r the r i g h t - h a n d - s i d e o f the r u l e ,  See F i g u r e A . I . Appendix-A:  Earley^  Parsing Algorithm  162  m •r a-;  Figure  A.1: The  Figure  A.2:  •  Predictor  The  Scanner  A  Function  Function  •  A _ a  Figure  i i+l  an  a  A,3:  The  Completer  Appendix-A:  Function  Earley's Parsing  Algorithm  163  Next, t h e s c a n n e r Ml* ')*  from  -  I<J '')« +  F  o  r  w  each  function,  generates  scanner  list  that  propagates were  sentence.  As  increments  the  then  is  next  symbol.  parse  in  I (j)  list, and  fB->ma.g,i] i s added t o I (j+1).  a (j+1)  illustrated  internal  the  contained  a l l parsers i n  expecting i s  reading  a seed i t e m f o r t h e next  [B->m.ag,i] t h a t  w=a(1) . . a ( j ) a . . a (n) The  by  to  t o appear  in  the  next  parse  next i n the input  F i g u r e A.2,  the  scanner  s t a t e o f an i t e m by moving t h e p a r s i n g  d o t cne t e r m i n a l symbol t o t h e r i g h t . The sentential rules is  completer  forms t h a t appear  performs  recognized  of I(j)  i n w.  of  left-hand-sides.  , then t h e n o n - t e r m i n a l symbol.  From I ( i ) ,  f o rnon-terminal  production  I f fA-^r, , i l A, has been  t h e g e n e r a t i n g i t e m , [B->m.Ag,k] i s  a n d [B->mA.g,k] i s added t o I ( j+ 1) .  a scanner  bottom-up r e d u c t i o n s o f  as right-hand-sides  i n P to t h e i r non-terminal  an e l e m e n t  found  function  symbols,  The c o m p l e t e r  a c t s as  a s i s shown i n F i g u r e A.3.  Appendix-A: E a r l e y ' s P a r s i n g A l g o r i t h m  164  APPENDIX B  MAYA LANGUAGE REJERENCE MANUAL  T h i s manual i s a d e s c r i p t i o n o f an A r t i f i c i a l Intelligence programming l a n g u a g e c a l l e d MAYA. Included i n t h i s language are facilities f o r performing pattern matching, primitives for constructing semantic networks and s c h e m a t a , primitives for c r e a t i n g and m a n i p u l a t i n g p r o c e s s e s , and c o n t r o l s t r u c t u r e s f o r integrating top-down and bottom-up search techniques. The l a n g u a g e i s d e s i g n e d as a d i a l e c t o f L I S P having a number o f extensions and a few r e s t r i c t i o n s . , The e x t e n s i o n s w i l l be d e s c r i b e d i n d e t a i l i n t h e f o l l o w i n g p a g e s and t h e r e s t r i c t i o n s w i l l be n o t e d a s w e l l . B.1  Relating  t o MAYA  This section explains the operation o f the i n t e r p r e t e r . Since t h i s language i s experimental, i t i s subject t o o c c a s i o n a l changes i n b e h a v i o u r . Most c h a n g e s w i l l be u p w a r d l y compatible and this document will be p r o m p t l y e d i t e d to r e f l e c t those changes. To  r u n MAYA u n d e r MTS: $RUN C S r L I S P SCARDS=CS:LGADER+*SOORCE* {RESTORE MAYA:SYSGEN)  MAYA will be for the current  started version  i n a t o p - l e v e l EAR and t h e c r e a t i o n d a t e o f t h e i n t e r p r e t e r w i l l be p r i n t e d .  The f o l l o w i n g l i s t o f f u n c t i o n s a r e t h e b a s i c mechanisms for c o n t r o l l i n g the i n t e r p r e t e r . The form o f each f u n c t i o n c a l l i s g i v e n f o l l o w e d by t h e t y p e o f t h e f u n c t i o n . EXPR, NEXPB, and FEXPR type functions c a n be used from b o t h MAYA and L I S P . Sguare b r a c k e t s i n d i c a t e o p t i o n a l arguments, and t h e a s t e r i s k i s u s e d as t h e K l e e n e s t a r i n d i c a t i n g -zero o r more r e p e t i t i o n s .  MAYA Language  Reference  165  1. (MAYA)  {EXPB}  E x e c u t e d from L I S P . a a t o p - l e v e l EAR. 2.  Initializes  the processor  (HALT [ < f o r a > ] )  and  enters  {SFSUBB}  The value o f <form> i s r e t u r n e d t o L I S P . I f no argument i s s u p p l i e d , NIL i s r e t u r n e d . HALT leaves the current invocation o f the processor intact. 3.  (RESTART <form>)  (NEXPB}  Executed from LISP. Restarts t h e i n t e r p r e t e r from t h e previous HALT. Computation proceeds with <form> s u b s t i t u t e d f o r t h e c a l l t o HALT. RESTART a n d HALT c a n be used a s a c o - r o u t i n e mechanism between HAYA and L I S P . HALT r e t u r n s a v a l u e t o LISP a t t h e p o i n t t h e i n t e r p r e t e r was c a l l e d , l e a v i n g t h e p r o c e s s i n t a c t . RESTART r e t u r n s a v a l u e t o MAYA a t t h e p o i n t t h a t t h e p r o c e s s was p r e v i o u s l y halted. 4. (SINIT)  {EXPB}  Reinitializes If evaluated returned. 5.  the processor. Meaningful only from LISP. from MAYA, a w a r n i n g i s g i v e n and NIL i s  (EAR)  {SSOBR}  Enters a READ-EVAL-PRINT loop. Since MAYA permits multiple co-existant processes, t h i s f u n c t i o n permits the user t o c r e a t e multiple READ-EVAL-PRINT loops. Reads forms from each < f i l e > . E a c h form i s MAYA EVALed. 6.  (INPILE < f i l e > * )  (aSOER}  This f u n c t i o n i s a n a l o g o u s t o DISKIN i n L I S P . There i s however no DISROOT analogue because MAYA function d e f i n i t i o n s may be l o c a l t o o b j e c t s i n t h e d a t a b a s e .  Since MAYA makes use o f both read and p r i n t macro c h a r a c t e r s , i t i s unwise f o r t h e u s e r t o p r e f i x h i s own atoms with these c h a r a c t e r s . The c h a r a c t e r s r e s e r v e d by MAYA a r € : «?",  »!",  and "S".  The " 3 " i s n o t a c t u a l l y a macro c h a r a c t e r b u t a l l MAYA i n t e r n a l names b e g i n w i t h t h i s c h a r a c t e r . I f i t i s i n c o n v e n i e n t t c abide MAYA l a n g u a g e  Reference  166  by these used. 7.  conventions,  t h e f o l l o w i n g two f u n c t i o n s  (30FF-STAT0S) Turns o f f read  8.  then  {EXPB} macro  processing.  (3ON-STAT0S) T u r n s on r e a d  nay be  {EXPB} macro  processing.  To f a c i l i t a t e c o m m u n i c a t i o n between LISP and MAYA, two prefixes are provided. From L I S P , «:<form> w i l l r e t u r n t h e MAYA v a l u e o f <form>. From MAYA, $<form> w i l l r e t u r n t h e LISP value o f <form>. F o r example, from L I S P , t$t$t$t$\t$ (FOO) w i l l return t h e L I S P v a l u e o f (FOO). Note t h a t (MAYA) i s (SINIT) followed by ^ (EAE).  B.2  The D a t a b a s e  Many of the primitive functions defined i n MAYA a r e concerned w i t h c r e a t i n g o b j e c t s , forming semantic networks from objects, searching a r c paths through these n e t w o r k s , and i n t e r p r e t i n g o b j e c t s as schemata. These functions c r e a t e and manipulate objects and t h e s c h e m a t a and nodes t h a t c a n be c r e a t e d from o b j e c t s . 9.  (OBJECT <type><pair>*)  {3FSUBR S F E Z P B )  Each < p a i r > i s o f t h e f o r m , < n a m e X f o r m > . OBJECT creates a new object o f t h e u s e r t y p e , <type>, h a v i n g f o r e a c h < p a i r > a b i n d i n g d e f i n e d between t h e name, <name>, and i t s definition, <form>. OBJECT e v a l u a t e s i t s odd a r g u m e n t s , and i t s e v e n a r g u m e n t s must be <ATOM>s. Note t h a t b o t h a MAYA and L I S P v e r s i o n o f t h i s f u n c t i o n a r e i n c l u d e d i n t h e system. Example: !  10.  (OBJECT 'NODE CLASS 'TABLE HAS-AS-PARTS (LIST 'LEGS «TOP)) (30BJECT9 NODE CLASS TABLE HAS-AS-PARTS (LEGS TOP) )  (NEW < o b j e c t > <pair>*)  J8FS0EB S FEXPR}  I f < o b j e c t > i s n o t an o b j e c t , an e r r o r occurs. NEW creates a new i n s t a n c e o f < o b j e c t > o f t y p e , SINSTARCES. MAYA Language  Reference  167  The new object consists of concatenated with <object>. form:  the bindings of <rair>s The new i n s t a n c e i s c f t h e  (S0BJECT3 3INSTANCE3 <pair>*) where f J i n d i c a t e s l i s t c o n c a t e n a t i o n . MAYA and L I S P v e r s i o n o f t h i s f u n c t i o n Example:  II  <object>,  Note t h a t both are included.  a  (POT* 'DOG (OBJECT 'GENERIC NAME 'DOG CLASS 'MAMMALIA)) « (30BJECT3 GENERIC NAME BOG CLASS MAMMALIA) _ (NEW DOG NAME •FLOYD OWNEB 'BILL) ! (30BJECT3 ^INSTANCES NAME FLOYD OHNEB BILL 30BJECTS ! GENERIC NAME DOG CLASS MAMMALIA)  11.  (OBJECTP  <thing>)  {EXPB}  I f < t h i n g > i s an o b j e c t , i t s t y p e i s r e t u r n e d . i s returned. 12. . (STEREO  <object>)  Else  NIL  { 2 S 0 E R}  If <object> i s an i n s t a n c e , i t s stereotype object i s returned. I f < c b j e c t > i s o b j e c t b u t n o t an i n s t a n c e of some o t h e r o b j e c t , < o b j e c t > i t s e l f i s returned.. E l s e NIL i s returned. 13.  (GET* <name> [ < e l s e > ] )  {8SUER E EXPB}  F e t c h e s t h e d e f i n i t i o n o f <name> f r o m w i t h i n t h e e n c l o s i n g object. Both a MAYA and a L I S P v e r s i o n a r e p r o v i d e d . If t h e r e i s no <name> d e f i n e d i n t h e e n c l o s i n g o b j e c t , <else> is evaluated. I f <else> i s n o t g i v e n , NIL i s r e t u r n e d . I f t h e r e i s no e n c l o s i n g o b j e c t on t h e s t a c k , the global o b j e c t i s t a k e n t o be t h e e n c l o s i n g o b j e c t . Examples: (GET* 'CONS) (30BJECT3 3PLIST3 SO BR *) (GET* * DFDFDGGGG " E L S E ) ! NIL _ ;NOTE: GLOBAL OBJECT HAS EVERY NAME DEFINED. Z (SEND (OBJECT 'TYPE A • ADEF) (GET* »A)) T ADEF (SEND (OBJECT 'TYPE A 'ADEF) (GET* 'B " E L S E ) ) I ELSE !  MAYA Language R e f e r e n c e  168  14.  (PUT* <name><form>)  {EXPB}  P u t s w i t h i n t h e e n c l o s i n g o b j e c t t h e b i n d i n g o f <name> t o its new d e f i n i t i o n , <form>. <Name> must be a t o m i c . Ifa previous definition existed, i t i s replaced. I f no e n c l o s i n g o b j e c t e x i s t s on t h e s t a c k , t h e b i n d i n g i s added t o t h e g l o b a l o b j e c t , i . e . , t h e CDS o f <rarae> i s s e t t o <form>. I f t h e e n c l o s i n g o b j e c t i s an i n s t a n c e o f some parent sterotype object, the stereotype object is guaranteed to remain u n a l t e r e d . PUT* r e t u r n s <form>. Examples: (PUT* • A * ADEF) ADEF A ADEF (CDE ' A)  ADEF  (: (PUT* •B (OBJECT * N O D E ) (PUT* «C »CDEF) (SELF) ) ! ( i O B J E C T S NODE C »CDEF) 8  7  15.  (aoBjECTa  NODE  C  )  «CDEF)  (BEH* <name>)  (3SUBR)  Removes the d e f i n i t i o n c f <name> from the enclosing object. I f t h e r e i s no e n c l o s i n g o b j e c t on t h e s t a c k , t h e CDR o f t h e atom, <name>, i s s e t t o NIL. I f t h e e n c l o s i n g o b j e c t i s an i n s t a n c e , i t s stereotype object remains unaltered. REM returns t h e b i n d i n g o f <name>. I f the b i n d i n g o f <name> i s n o t d e f i n e d i n t h i s o b j e c t o r within t h i s i n s t a n c e , NIL i s r e t u r n e d . Examples: T 7 ! ! !  B (©OBJECTS NODE C * CDEF) (SEND B (REM* »C) ) NIL B {^OBJECTS NODE) (REM* »B) NIL B NIL MAYA Language  Reference  169  16.  {SELF)  {SSOBB}  Returns the current enclosing object t h e r e i s no e n c l o s i n g o b j e c t , an e r r o r Examples;  from t h e s t a c k . occurs.  <:• {OBJECT * TYPE A • ADEF) (PUT* *A *NE0-ADEF) ~_ (SELF) ) ! (30BJECT3) TYPE A NEW-ADEF) (SELF) = EBEOR: NO ENCLOSING OBJECT ON  17.  (ITEM  <pair>*)  THE  If  STACK  {3S0BR}  Each pair i s o f t h e f o r m , <name><value>. ITEM c r e a t e s a new i t e m c o n t a i n i n g a new instances of each variable, <name>, having value, <value>. ITEM e v a l u a t e s i t s e v e n a r g u m e n t s , and i t s even arguments must be atoms. The new i t e m i s r e t u r n e d as v a l u e . Example: (ITEM X »XVAL Y (LIST * Y YY) ) (3ITEMS NIL X XVAL Y (YYY) ) (SETQ X »XVAL) ! X7AL (: (ITEM X »ZZZ Y ?X) I (PRINT ?Y) ?X) ! X7AL ! ZZZ !  18.  (SET <pair>*)  fSSOBR}  Each <pair> i s of the form, <nameXvalue>. SET b i n d s e a c h variable name, <name>, to i t s new v a l u e , <value>. SET e v a l u a t e s a l l i t s arguments and i t s odd arguments must evaluate to atoms. SET returns t h e v a l u e of the l a s t <pair>. 19.  (SETQ  <pair>*)  {SFSUER}  Each < p a i r > i s o f t h e f o r m , <name><value>. SETQ behaves as SET e x c e p t i t e v a l u a t e s o n l y i t s e v e n a r g u m e n t s . Both SET and SETQ search the stack looking f o r the first MAYA Language R e f e r e n c e  170  o c c u r r e n c e o f t h e v a r i a b l e , <name>. I f no v a r i a b l e e x i s t s on t h e s t a c k h a v i n g name, <name>, t h e L I S P value of the atcm, <name>, i s changed t o <value>. Note t h a t o n l y t h e v a r i a b l e , <name>, i s changed and n o t t h e d e f i n i t i o n c f t h e a t c m , <name>. SET and SETQ b i n d v a l u e s whereas POT* b i n d s definitions. 20.  (DEFUN <defn>)  fFEXPR}  DEFUN h a s been e x t e n d e d t o p e r m i t t h e d e f i n i t i o n o f 3EXPR, 3NEXPR, 3FEXPR, and QEXPR t y p e f u n c t i o n s . DEFUN may be u s e d from e i t h e r HAY A o r LISP to define any o f t h e f u n c t i o n t y p e s from both languages. DEFUN a l w a y s a d d s i t s definition, <defn>, to the enclosing object and may t h e r e f o r e be used t o p r o v i d e f u n c t i o n d e f i n i t i o n s l o c a l t o specfic objects. DEFUN h o n o r s i n s t a n c e b o u n d a r i e s . Examples: (DEFUN TEST NIL (PRINT 'OUTSIDE) T) TEST (SEND (OBJECT * CONTEXT) (DEFUN TEST NIL (PRINT 'INSIDE) NIL) (TEST)) T INSIDE ! NIL (TEST) ! OUTSIDE ! T  7  21.  (S P1 P2 . . . Pn)  fSFSUBB S FEXPR}  The t u p l e e v a l u a t o r . T h e v a l u e o f a t u p l e i s a new tuple of t h e v a l u e s o f i t s e l e m e n t s , P1, P2, . . . P n . The t u p l e e v a l u a t o r u s e s i n v e r s e gupte mode d u r i n g e v a l u a t i o n . Atoms and m a t c h e r variables a r e t r e a t e d as c o n s t a n t s , i . e . , they e v a l u a t e t o themselves. A l l other forms a r e EVALed, note that (3 P1 P2 . . . Pn) c a n be a b b r e v i a t e d u s i n g a n g l e b r a c k e t s as <P1 P2 . . . Pn>. B o t h a HA YA and a LISP version are included. Note also that angle b r a c k e t s c a n n o t be used as LISP s u p e r - p a r e n t h e s e s . Examples:  T _ ! _ T  <A B C> <A B C> <*A ( L I S T 'B »C)> <A (B C) > (SETQ Y 'YVAL) YVAL <A <B !:X> ?Y> HAYA Language  Reference  171  i  22.  <A <B  (TUPLEP  !:X> YVAL>  <thing>)  {EXPB}  Returns T i f <thing> i s a t u p l e , e l s e 23.  (VABP  returns  <thing>)  Nil. {EXPB}  R e t u r n s t h e name o f < t h i n g > i f i t i s a MAYA v a r i a b l e , nil. P a t t e r n v a r i a b l e s r e t u r n NIL. 21.  (ITEMP <thing>) Returns T i f <thing>  E.3  else  {EXPR} i s an i t e m , e l s e NIL.  Evaluation  The included executed function types:  following paragraphs describe the f u n c t i o n types i n MAYA. V a l i d L I S P f u n c t i o n s a r e a c c e p t a b l e and a r e d i r e c t l y by L I S P f o r MAYA. In addition t o LISP'S types, t h e i n t e r p r e t e r a l s o recognizes the f o l l o w i n g  SSBBR, 3FSUBR, a EXPR, 3NEXPR, 3FEXPR, and QEXPR. I f d e s i r e d , t h e i n t e r p r e t e r may be e x t e n d e d to include f u n c t i o n t y p e s as w e l l . P l e a s e s e e me f o r d e t a i l s .  ether  iSUBR's and SFSOBR's a r e t h e s y s t e m s u p p l i e d f u n c t i o n s o f MAYA. SSOBRs e v a l u a t e t h e i r a r g u m e n t s b u t aFSOBRs b i n d t h e l i s t o f u n e v a l u a t e d arguments t o t h e i r s i n g l e parameter, a s e x p e c t e d . SEXPR, 3NEXPR, and SFEXPR a r e MAYA's u s e r d e f i n e d f u n c t i o n t y p e s that a r e analogous to t h e i r LISP counterparts. QEXPB t y p e f u n c t i o n s a r e somewhat a n a l o g o u s t o t h e Q-type functions of QLISP tReboh, 1973). QEXPRs a r e implemented v i a QLAMBDA e x p r e s s i o n s and t a k e a s i n g l e t u p l e as argument. They r e t u r n a s v a l u e an i t e m r e p r e s e n t i n g t h e r e s u l t o f a p a t t e r n match between the tuple argument and t h e t u p l e pattern o f t h e QLAMBDA expression. Please see the sections on pattern matching, G e n e r a t o r s , and R e c o g n i z e r s . ,  a  The i n t e r p r e t e r u s e s t h e f o l l o w i n g f u n c t i o n t o i t s arguments:  algorithm  • I f the function i s an 3SUBB or arguments a r e e v a l u a t e d and t h e f u n c t i o n  when  applying  an 3EXPB, i t s i s applied to  MAY A l a n g u a g e  Reference  172  their  values.  * I f t h e f u n c t i o n i s an SFSOBR o r an SFEXPR, t h e n t h e function i s applied to the l i s t of unevaluated arguments. •» I f t h e f u n c t i o n i s an 3NEXPR, i t i s a p p l i e d u n e v a l u a t e d arguments.  t o the  * I f t h e f u n c t i o n i s a QEXPR, t h e t u p l e argument i s e v a l u a t e d and t h e p a t t e r n m a t c h e r c a l l e d on t h e v a l u e . I f t h e match s u c c e e d s , t h e f u n c t i o n i s a p p l i e d t o t h e result. * Else t h e f u n c t i o n i s a LISP f o r m . I f i t i s a SUES o r EXPR, t h e arguments a r e e v a l u a t e d and t h e f u n c t i o n is L I S P APPLYed t o t h e r e s u l t . I f t h e f u n c t i o n i s an N EX PR, FEXPR, NSDBR, o r FSUER, t h e n t h e form i s LISP EVALed. F u n c t i o n s which make no u s e o f t h e p a r a l l e l i s m , c o n t r o l structures, or data s t r u c t u r e s o f HAYA c a n be w r i t t e n i n LISP and e x e c u t e d from MAYA t h e r e b y g a i n i n g a c o n s i d e r a b l e increase in efficiency. W h i l e i n L I S P , a n y f o r m s d e f i n e d w i t h i n MAYA can be e v a l u a t e d v i a t h e H p r e f i x and r e f e r e n c e s t o MAYA v a r i a b l e s can fee f e t c h e d v i a t h e ? " p r e f i x . n  n  n  25.  (AVAL <form>)  (3SUBR)  MAYA e v a l u a t e s i t s argument, <form>. I f <form> i s a l i s t whose CAR i s a n atom, AVAL f e t c h e s t h e MAYA f u n c t i o n from the first d e f i n i t i o n o f t h e atom on t h e s t a c k . I f there i s no f u n c t i o n d e f i n i t i o n w i t h i n t h e f i r s t occurrence of t h e atom on t h e s t a c k , an e r r o r o c c u r s . 26.  (EVAL <form>)  {SSUER}  MAYA e v a l u a t e s i t s argument, <form>. I f <form> i s a l i s t whose CAR i s an atom, EVAL f e t c h e s t h e f u n c t i o n d e f i n i t i o n from within the g l o b a l object. T h a t i s , EVAL f e t c h e s f u n c t i o n d e f i n i t i o n from t h e P L I S T o f t h e atom. EVAL i s therefore faster than AVAL, b u t does not reccgnize function definitions local to enclosing objects. MAYA f u n c t i o n s u s e EVAL f o r e v a l u a t i o n u n l e s s o t h e r w i s e n o t e d . 27.  (SEND < A 1 X A 2 >  . . . <An>)  fSFSOBE}  SEND AVALuates each element in the seguence, < A 1 X A 2 > . . <An>, i n a l e f t - t o - r i g h t o r d e r . I f t h e value returned from <Ai> i s an o b j e c t o r an i t e m , t h e n i t i s MAYA l a n g u a g e  Reference  173  pushed onto t h e s t a c k . Next, <Ai+1> i s e v a l u a t e d i n this new environment. The f i n a l v a l u e r e t u r n e d from SEND i s t h e v a l u e o f <An>. SEND may be a b b r e v i a t e d by a single c o l o n , ":". Examples: (SEND PBINT) !  7  (aoBJECTa  apiisia  SUBB  *)  (: PBINT SOBB)  *  (SETQ NET (OBJECT 'NODE)) {: ?NET (POT* *A (OBJECT ' NODE) ) ~ (POT* ' B (OBJECT 'NODE)) ~ (POT* 'C *CDEF)) T CDEE (SEND ?NET (PBINT A) (PRINT B) (PBINT C) ) ! (aOBJECT® NODE B (©OBJECTS NODE C CDEF)) ! (30BJECT3 NODE C CDEF) ! CDEF  !  B.4  CDEF  Error Conditions  and  the  DEBUG System  T h e r e a r e two c l a s s e s o f e r r o r s t h a t can o c c u r during the execution of MAYA. They a r e e r r o r s t r a p p e d by MAYA and e r r o r s t r a p p e d by L I S P . E r r o r s t r a p p e d by MAYA c a u s e an "appropriate" e r r o r message t o be p r i n t e d and MAYA's DEBOG System t o be c a l l e d on t h e form causing the error. This form is called the Breakform. Note that there i s one e x c e p t i o n . I f the e r r o r d e t e c t e d by MAY A i s an u n d e f i n e d name o r an undefined variable occuring at t h e t o p - l e v e l of an EAB, t h e n t h e e r r o r message i s p r i n t e d b u t an i m m e d i a t e r e t u r n i s made t o the EAB. In this c a s e , t h e r e i s no f o r m t o BREAK c n .  for  The s e c o n d c l a s s o f e r r o r s c a u s e a L I S P BREAK t o be one o f t h e f o l l o w i n g r e a s o n s :  entered  • A LISP e r r o r o c c u r r e d i n a user's LISP f u n c t i o n . • An unexpected c o n d i t i o n occurred w i t h i n the i n t e r p r e t e r causing i t to abnormally terminate. • An error occurred within a MAYA EXPR, NEXPR, or FEXPR type f u n c t i o n . I f a L I S P BREAK i s e n t e r e d f o r one o f t h e above r e a s o n s , and t h e user desires to be i n s t e a d i n a MAYA BBEAK, a t r a n s f e r may be made u s i n g t h e f u n c t i o n , OOPS, d e s c r i b e d b e l o w . MAYA l a n g u a g e  Reference  174  The DEBUG System provided i n MAYA i s m o d e l l e d a f t e r t h e LISP/MTS DEBUG P a c k a g e . Most o f t h e f a c i l i t i e s i n c l u d e d i n the L I S P s y s t e m a r e p r o v i d e d i n MAYA and a f a m i l i a r i t y w i t h t h e LISP DEBUG P a c k a g e i s assumed here. MAYA's DEBUG System can be called in a number o f ways. I t c a n be c a l l e d e x p l i c i t l y on a f e r n v i a t h e f u n c t i o n s , DEBUG and BREAK, The system may be called implicitly on the body of a function via setting a Breakpoint in that function. And l a s t l y , t h e DEBUG System is c a l l e d by t h e i n t e r p r e t e r whenever a MAYA e r r o r o c c u r s . The L I S P BREAK f u n c t i o n s , BREflKF, UNBREAKF, and UNSET, have been m o d i f i e d t o work w i t h 9EXPR, and QEXPR type functions as w e l l as EXPRs. As i n LISP/MTS, E r e a k p o i n t s c a n s e t on an e n t i r e f u n c t i o n , or a form w i t h i n a f u n c t i o n . Both t y p e s may have an optional p r e d i c a t e which determines whether the break is a c k n o w l e d g e d when e n c o u n t e r e d . However, c a r e must be t a k e n w i t h the L I S P g l o b a l atoms, "?BREAKSw", "? DEBUG", and "7BRQKEN". If t h e y a r e t o be a l t e r e d o r e x a m i n e d , t h e y must be enclosed in d o u b l e q u o t e s t o p r e v e n t them from b e i n g t r e a t e d as v a r i a b l e s by MAY fl o r a l t e r n a t i v e l y , r e a d macro p r o c e s s i n g c a n be d i s a b l e d v i a 80FF-STATUS. .  To  Care must also s e t a B r e a k p o i n t on (: FR1  To  28.  negate the  (BREAKF  Breakpoint,  you  FOG)). must a g a i n  (: FR1  (UNBREAKF FOO))  (: FR1  (UNSET)).  "GOTO" t h a t o b j e c t :  or  (DEBUG <form>) C a l l s the  29.  be t a k e n w i t h l o c a l f u n c t i o n d e f i n i t i o n s . FOO w i t h i n some o b j e c t , FR1:  DEBUG System  {iFSUBF} explicitly  (BREAK <message>*)  on  <form>. (3SUBR}  EBEAK i s p r o v i d e d as a u s e r errror handler. It prints each <message> on SERROUT then c a l l s t h e DEBUG System on t h e c u r r e n t form b e i n g evaluated, i.e., in most cases BREAK i t s e l f . , 30.  (OOPS) A very useful function! from a c a t a s t r o p h i c e r r o r be entered. OOPS will  fEXPR) OOPS a l l o w s t h e u s e r t o r e c o v e r t h a t has c a u s e d a L I S P b r e a k to return c e n t r e ! t o MAYA'S Ereak MAYA Language  Reference  175  p a c k a g e w i t h t h e form t h a t was b e i n g e v a l u a t e d the time o f t h e e r r o r as the Breakform.  i n MAY.fi  at  OOPS may also be u s e d t o B r e a k on MAYA 3SUBBS and 3FS0EES by s e t t i n g a L I S P B r e a k p o i n t on t h e i n t e r n a l MAYA routine. When the LISP Break i s acknowledged, t y p i n g (OOPS) w i l l t r a n s f e r c o n t r o l back t o MAYA's Debug System with t h e MAYA 3S0EB o r aFSOER a s t h e B r e a k f o r m . 31.  (©BK)  {EXPR}  P r i n t s a p o s s i b l y long 32.  backtrace  o f the stack.  {©TRACE)  {EXPB}  Begins t h e p r i n t i n g o f a t r a c e o f the e v a l u a t i o n o f each non-atomic form. The f o r m i s p r i n t e d b e f o r e i t s body i s entered. 33.  (3UNTRACE)  {EXPB}  Turns o f f t r a c i n g . A summary follows: BK {n ]  of  the  commands  recognized  by  the  DEBOG  System  A b b r e v i a t i o n : none P r i n t s a backtrace o f the stack starting a t the s t a c k - p o i n t e r f o r l e n g t h n'» which d e f a u l t s t o 10. M  BKO [ n ]  A b b r e v i a t i o n : none P r i n t s a backtrace of a l l objects and i t e m s on t h e stack s t a r t i n g at the s t a c k p c i n t e r f o r a length of "n" which d e f a u l t s t o 10.  BKE  A b b r e v i a t i o n : none Prints a backtrace o f a l l MAYA f o r m s on t h e s t a c k s t a r t i n g from s t a c k p o i n t e r . " n " d e f a u l t s t o 10.  *  [n]  A b b r e v i a t i o n : none Prints the Breakform. Note that i n MAYA, t h e B r e a k f o r m i s n e v e r on t o p o f t h e s t a c k a t t h e t i m e t h e BREAK i s e n t e r e d .  PP Pretty-prints  A b b r e v i a t i o n : none t h e f o r m where t h e s t a c k - p o i n t e r  Pretty-prints  Abbreviation: t h e Breakform.  PP*  pcints.  none  MAYA  Language R e f e r e n c e  176  PRINT  TOP  Abbreviation: P P r i n t s t h e form where t h e s t a c k p o i n t e r  points.  A b b r e v i a t i o n : none Besets the s t a o k p o i n t e r to the top o f the s t a c k . Note t h a t s i n c e B r e a k f o r m has not been pushed onto the stack at the time t h e BREAK o c c u r s , t h e t o p c f t h e s t a c k and B r e a k f o r m do not c o i n c i d e . The t o p of the s t a c k i s a l w a y s t h e form t h a t c a l l e d B r e a k f o r m .  FIND < l o c > * Abbreviation: F F i n d s a form on t h e s t a c k and s e t s the stack-pointer to that point. Each < l c c > i s e i t h e r a number o f forms t o move t h e s t a c k p o i n t e r down t h e s t a c k o r t h e name o f a f u n c t i o n on t h e s t a c k . GO  [<loc>*3 Abbreviation: G F i n d s a form on t h e s t a c k a s i n t h e FIND command, t h e n r e s t a r t s c o m p u t a t i o n BREAKing on t h a t form. <Loc> may be o m m i t t e d .  RETURN <form> Evaluates <form> B r e a k f o r m . ,.  A b b r e v i a t i o n : BET and r e t u r n s i t as t h e v a l u e  c f the  RESTART [ < f o r m > ] A b b r e v i a t i o n : RES Restarts computation from where the stackpointer points using <form>. I f <form> is net coded, computation i s restarted u s i n g t h e p r e v i o u s f o r m on the stack. CONTINUE  A b b r e v i a t i o n : C CO Continues with Breakform. If Breakform has been p r e v i o u s l y e v a l u a t e d v i a t h e EVAL command, i t w i l l n o t be r e - e v a l u a t e d .  STEP [ n ]  Abbreviation: S Steps through the e v a l u a t i o n o f the next "n" forms g e n e r a t e s a new BREAK. " n " d e f a u l t s t o 1.  NEXT  A b b r e v i a t i o n : N NX E v a l u a t e s B r e a k f o r m and b r e a k s on t h e next form. Breakform has been p r e v i o u s l y e v a l u a t e d v i a t h e command, i t w i l l n o t be r e - e v a l u a t e d ,  EVAL Evaluates Breakform OP Causes  Abbreviation: Breakform and p r i n t s i s AVALUATEd.  E i t s value.  Abbreviation: J t h e DEBUG System t o a s c e n d one  level.  Note  and  If EVAL  that  I f there  MAYA Language R e f e r e n c e  177  i s no h i g h e r top-level. STOP  EREflR  Causes a r e t u r n  EDIT [ < l o c > * ] C a l l s EDITE on I f <loc>* is ^executed.  level,  abbreviation: to t o p - l e v e l .  NIL  is  returned  to  ||  a b b r e v i a t i o n : ED t h e form where t h e s t a c k p o i n t e r p o i n t s . coded, an implicit FIND command is  Any form typed a t DEBUG o t h e r t h e r e a b b r e v i a t i o n s w i l l be aVALed and that the DEBUG System always uses i.e., a l l function d e f i n i t i o n s are d e f i n i t i o n f o u n d on t h e s t a c k .  B.5  control  t h a n t h e above commands o r i t s value printed. Note AVAL f o r a l l e v a l u a t i o n s , fetched from the first  Input/Output  When MAYA i s r u n n i n g , a l l I/O i s p e r f o r m e d t h r o u g h b u f f e r s s e p a r a t e from t h e o n e s used by HTS/LISP. Reading is performed through 3LISPIN w i t h t h e f i l e p r e f i x c h a r a c t e r _ . Writing i s p e r f o r m e d t h r o u g h 3LISP0UT w i t h t h e f i l e p r e f i x character **!". all I/O f u n c t i o n s b e h a v e , e x c e p t f o r the c h o i c e o f I/O b u f f e r s , a s t h e y do i n L I S P . M  34.  (TPRIN1 <form> f<IO-atom>])  M  {EXPR}  P R I N T s <form> i n a t e r s e mode, p r i n t i n g descends c n l y a set number of levels into the given structure, any non-atomic structures greater than this level are r e p r e s e n t e d by an "S". I f t h e s e c o n d argument, <IO-atcm>, i s g i v e n , <form> i s w r i t t e n i n i t s b u f f e r . E l s e <fcrm> i s w r i t t e n i n 3LISP0UT. TPRIN1 r e t u r n s T. 35.  (TPRINT <form> [<IO-atom>])  {EXPR}  Same as TPRIN1 except that the b u f f e r b e f o r e and a f t e r <form> i s w r i t t e n . 36.  (TPRINT-LEVEL <n>) S e t s t h e l e v e l t o w h i c h TPBIN1 and D e f a u l t i s (TPRINT-LEVEL 2 ) .  i s emptied  both  {NEXPR} TPRINT  will  descend.  H a Y a Language R e f e r e n c e  178  B.6  Pattern  Matching  This section describes p a t t e r n element d e f i n i t i o n s 37.  t h e p a t t e r n matching p r o v i d e d i n MAYA.  functions  (MATCH < p a t t e r n > < d b > [ < e l s e > 1 )  and  {3S0BB}  < p a t t e r n > must be a t u p l e . <Db> must e v a l u a t e t o e i t h e r a t u p l e o r an o b j e c t r e p r e s e n t i n g a tuple database. See below. T h e < p a t t e r n > i s matched a g a i n s t t h e <db>. Ifa match c a n be f o u n d , MATCH r e t u r n s an i t e m containing the bindings o f any p a t t e r n variables contained i n the < p a t t e r n > p l u s a r e a c t i v a t i o n TAG. T h i s TAG i s an stack segment which permits t h e matcher t o be r e c a l l e d a g a i n from t h e p o i n t o f i t s l a s t s u c c e s s f u l match. I f <db> i s a t u p l e b a s e , t h e v a l u e a s s o c i a t e d w i t h t h e m a t c h i n g datum i s bound t o t h e v a r i a b l e , '•*««, i n t h e r e t u r n e d i t e m . I f <db> is a t u p l e , " ? * " d e f a u l t s t o T. I f MATCH f a i l s t o f i n d a match between < p a t t e r n > and <db>, <else> i s evaluated. <Else> d e f a u l t s t o NIL. Examples: _ ! !  (MATCH «<A B C> (3ITEM3 N I L * (MATCH »<A B C> NIL (MATCH *<A B C> (A)  »<A B O ) T STAGS . . . . . ) »<A B>) »<A B> * (LIST «A))  A tuple data base, c a l l e d a t u p l e b a s e , i s t h e a s s o c i a t i v e d a t a base mechanism i n MAYA. Each t u p l e b a s e i s composed o f an object having a type i n d i c a t o r o f e i t h e r "3INDEX3 o r some p o s i t i v e i n t e g e r number. Tuplebases are operated c n by t h e system functions: MATCH, NEXT, PADD, PREMOVE, PDELETE, E 1ST, D1ST, SUSPEND, BESUME, COMPLETE, e t c . The u s e r may as well o p e r a t e on t u p l e b a s e s by t r e a t i n g them a s o r d i n a r y o b j e c t s . H  Hhen MAYA i s loaded within the g l o b a l object. purposes a r e : 3TUFLE3 3METH0D3 3PB0C3  three empty t u p l e b a s e s By convention, their  for for for  are created names and  declarative patterns, g e n e r a t o r methods, and suspended p r o c e s s e s .  To create a new, empty t u p l e b a s e w i t h i n some e n c l o s i n g u n d e r t h e name, <name>, one may w r i t e :  MAYA  Language  object  Reference  179  (PUT* <name>  38.  (OBJECT 0 ) ) .  (PADD <datumXdb>|[<form> ])  (3SUBR}  The <datum>, w h i c h must be a t u p l e , i s added t o t h e t u p l e database, <db>. A s s o c i a t e d w i t h <datum> i n t h e d a t a b a s e i s t h e v a l u e o f <form>. I f <form> i s n o t c o d e d , <datum> is given t h e v a l u e , T. I f <datum> i s a l r e a d y p r e s e n t i n t h e <db> i t s v a l u e i s r e p l a c e d w i t h <form>. PADD returns t h e v a l u e o f <form>. I f <db> i s n o t a t u p l e b a s e , an e r r o r occurs. Examples: (PADD »<A B C> 3TUPLE3) T (HATCH »<A B C> 3TUPLE3) ! (SITEHS NIL * T STAG® ...-..) (PADD '<A B C> 3TUPLE3 » FFF) ! FFF (MATCH «<A B C> 3TUPLE3) !  !  39.  (3ITEM3 NIL * FFF  STAGS- . . .  (PREMOVE <datumXdb>)  )  {3SUBR}  Bemoves <datum> f r o m t h e t u p l e database, <db>. <Datum> must be a t u p l e and <db> must be a t u p l e b a s e . PEEMOVE r e t u r n s <datum> i f i t was p r e s e n t i n t h e t u p l e database. I f i t was n o t p r e s e n t NIL i s r e t u r n e d . Examples: (PADD *<S D> 3TUPLE3) <S D> (PBEHOVE »<S D> 3TUPLE3) T <S D> (HATCH »<S D> 3TDPLE3) ! NIL (PBEMOVE »<S D> 3TUPLE3) ! NIL !  40.  (PDELETE <pattern><db>[<else> ])  {3SUBB}  Hatches <pattern> against <db>. I f t h e match s u c c e e d s , PDELETE d e l e t e s t h e m a t c h i n g datum from the tuplebase, <db>, and r e t u r n s an i t e m containing the bindings of <pattern>, the v a r i a b l e , bound t o t h e v a l u e a s s o c i a t e d MAYA Language  Reference  180  with the matched datum, and a r e a c t i v a t i o n tag for PDELETE. I f t h e match f a i l s , <else> i s evaluated which d e f a u l t s t c NIL. Note t h a t PREMOVE d o e s n o t c a l l t h e p a t t e r n m a t c h e r . The datum i n the t u p l e b a s e t h a t e x a c t l y matches <pattern> syntactically, is removed. PDELETE on t h e o t h e r hand d e l e t e s t h e f i r s t datum w h i c h matches < p a t t e r n > and i t r e t u r n s a tag f o r subsequent deletions. 41.  (PDUMP <db>)  fSSDBR}  Prints a dump o f t h e p a t t e r n s from t h e t u p l e b a s e , <db>. Example: !  (PADD »<A T  B C>  and t h e i r  associated  values  STUPLES)  (PADD »<A B> ©TUPLES) I T _ (PADD »<HOOF> ©TUPLES »FLOYD) !  FLOYD (PDUMP ©TUPLE©) T <A B> = T ! <A B C> = T ! <W0CF> = FLOYD ! NIL  Patterns i n MAYA a r e r e p r e s e n t e d as t u p l e s . Each t u p l e i s composed o f p a t t e r n e l e m e n t s c a l l e d Patels. There are three types of P a t e l s : 1. P a t e l s t h a t match v a l u e s , 2. P a t e l s t h a t y i e l d v a l u e s t o be matched, 3. P a t e l s t h a t a r e r e c u r s i v e l y s u b - p a t t e r n s ,  i . e . , tuples.  The following paragraphs will explain i n some detail the d i f f e r e n t p a t t e r n elements t h a t are defined i n MAYA. Because the type-2 Patels are somewhat more s t r a i g h t f o r w a r d t h a n t h e o t h e r s , t h e y w i l l be e x p l a i n e d first. Type-2 P a t e l s a r e p a t t e r n e l e m e n t s t h a t y i e l d v a l u e s t c be matched. Type-2 P a t e l s can match Type-1 P a t e l s . They can a l s o match t y p e - 3 P a t e l s and other type-2 Patels on EQUAL, The f o l l o w i n g f o r m s a r e i n c l u d e d as t y p e - 2 P a t e l s :  MAYA Language R e f e r e n c e  181  <ATOM> <LIST> ?<var> !?<var> !-.<var> Note t h a t some o f t h e P a t e l s have prefixes. These prefixes determine t h e manner i n which t h e P a t e l s y i e l d t h e i r v a l u e s . The s e m a n t i c s o f T y p e - 2 P a t e l s a r e p r e s e n t e d below: <ATCM>  or  <LIST>  Atoms and l i s t s a r e c o n s i d e r e d c o n s t a n t s i n MAYA p a t t e r n s . Their values are themselves. T h i s f o r m a t i s sometimes c a l l e d " i n v e r s e quote mode". They yield their values immediately. Examples:  I !  (MATCH «<A (B C)> «<A (B C}>) (3ITEMS NIL * T STAGS . . . ) (MATCH «<A (B C) > »<A <B C » ) NIL  ?<var> Yields t h e c u r r e n t MAYA v a l u e o f <var>. Matches whatever i t s v a l u e w i l l match a s a c o n s t a n t . I f <var> i s not b o u n d , an e r r o r o c c u r s . Examples:  ! _ ! T !  (SETQ Y »B) B (MATCH »<A B> *<A ?Y>) (SITEMS NIL * T STAGS . . . ) (MATCH »<A ?Y> «<A C>) NIL (MATCH »<B ?Y> «<?Y ?Y>) (SITEMS NIL * T STAGS . . . )  !?<var> Matches t h e c u r r e n t m a t c h e r v a l u e o f <var> f r o m s i d e o f t h e match. I f <var> h a s n o t been bound same s i d e o f t h e match, t h e c u r r e n t match f a i l s . Examples:  ! !  t h e same on t h e  (MATCH '<!:X !?X> «<A A>) (SITEMS NIL * T X B STAGS . . .. ,) (MATCH »<A !?X> »<A A>) NIL (HATCH »<!?X »:X> «<A A>) MAYA Language  eeference  182  !  NIL  !-<<var> This p a t e l i s v a l i d o n l y on t h e <db> s i d e o f t h e match o r as a P a t e l i n a QLAMBDA e x p r e s s i o n . I t does n o t yield a v a l u e i m m e d i a t e l y but o n l y at t h e t i m e t h e match s u c c e e d s . I t t h e r e f o r e can be u s e d as a mechanism for returning a result from a method o r the datum s i d e o f a match. This p a t e l can o n l y match t y p e - 1 P a t e l s . Examples:  ! !  T  (MATCH «<!:X B> '<!-«Z !:Z>) {©ITEMS NIL * T X B STAGS . . . ) (MATCH «<!:X B> «<!--Z B>) NIL (MATCH »<A B> ><!-.Z !:Z>) NIL  Type 1 p a t e l s i n c l u d e a l l o f t h e p a t t e r n v a r i a b l e s defined i n MAYA. They match v a l u e s y i e l d e d by t h e o t h e r two p a t e l t y p e s and b i n d t h e i r v a r i a b l e names t o t h o s e v a l u e s . If the matcher succeeds, t h e b i n d i n g s o f a l l Type 1 p a t e l s on t h e p a t t e r n s i d e o f t h e match a r e composed i n t o t h e i t e m r e t u r n e d f r o m the match. MAYA p e r m i t s pattern actors (Hewitt, 1S72) to act predicates on Type 1 patels. Each p a t t e r n v a r i a b l e i s c f form: <var-prefix><atom> or < v a r - p r e f ix> (<atcmXpred>*)  as the  where <atom> i s t h e name o f t h e p a t t e r n variable, <var-prefix> restricts the types cf values t h a t t h e p a t t e r n v a r i a b l e can match, and <pred>* i s z e r o o r more f o r m s whose evaluation must be non-NIL for the match to succeed. The predicates are evaluated i n a l e f t - t o - r i g h t order. I f one of the predicates fails, t h e r e m a i n d e r a r e n o t e v a l u a t e d and t h e matcher a t t e m p t s a d i f f e r e n t match. <Atcm> i s bound t o i t s m a t c h i n g v a l u e b e f o r e the predicates are evaluated and each <pred> may reference <atom> a s a f r e e v a r i a b l e , e.g., !: (X (PRINT ?X) (F00 ?X ?Y) ) .  The  following  pattern  v a r i a b l e s are  currently included  in  MAYA: !:<var>  or  !: ( < v a r X p r e d > * ) MAYA Language  Reference  183  !*<var>  or ! * (<varXpred>*)  !:<var> H a t c h e s a s i n g l e p a t t e r n e l e m e n t which must be e i t h e r a Type-2 patel or a Type-3 patel c o n t a i n i n g no p a t t e r n variables. Examples: (HATCH «<!:X !:Y> *<A <B C » ) (SITEMS NIL * T X A Y <B C> STAGS . . . ) (SETQ Y *YVAL) T YVAL (MATCH *<!:X B> » « A ?Y> !:Z>) T (SITEMS NIL * T X »<A YVAL> STAGS . . . ) _ (MATCH »<!:X B> » « A !:Z> B>) ! NIL !  !*<var> M a t c h e s a segment c f p a t e l s o f l e n g t h z e r o o r l o n g e r . The segment must c o n t a i n no Type-1 p a t e l s . <Var> i s bound to a c o p y o f t h e segment. Examples: (HATCH «<A !*X> »<A B C>) (SITEHS NIL * T X <B C> STAGS . .-...) (HATCH »<A !*X B> »<A B>) ! (SITEMS NIL * T X <> STAGS . ... . ) (MATCH «<A !*X> '<A <B ?Y> C>) I (SITEMS NIL * T X « B YVAL> C> STAGS . . . ) (MATCH »<A !*X> '<A !:Y B>) T NIL (MATCH »<A !*X> »<A !*Y B>) ! (SITEMS NIL * T X <B> STAGS . . . ) !  Type-3 p a t e l s a r e t u p l e s , t h a t i s , r e c u r s i v e sub-patterns. Each patel i n a s u b - p a t t e r n may be e i t h e r a T y p e - 1 , T y p e - 2 , o r Type-3 p a t e l . B.7  Generators  42.  (E1ST < p a t t e r n > < d b > [ < e l s e > ])  {SSUBR}  Generates items i n d e p t h - f i r s t order, i . e . , i n a tuplebase of QLAMBDA methods, D1ST will r e c a l l t h e same QIAMBBA g e n e r a t o r r e p e a t e d l y u n t i l i t f a i l s t o r e t u r n a next i t e m . MAYA Language  Reference  184  D1ST w i l l t h e n a t t e m p t t o match a n o t h e r QLAMBDA e x p r e s s i o n in the tuplebase. < P a t t e r n > i s matched against <db>, <Pattern> must be a t u p l e and <db> must be a t u p l e b a s e o f QLAMBDA e x p r e s s i o n s c r QEXPR names. I f t h e match fails, <else> i s e v a l u a t e d w h i c h d e f a u l t s t o MIL. I f t h e match s u c c e e d s , t h e matched QLAMBDA expression i s evaluated u s i n g t h e i t e m from t h e datum s i d e o f t h e p a t t e r n match a s the a c t u a l arguments t o t h e f u n c t i o n . I f t h e QLAMBDA successfully terminates, D1ST r e t u r n s an i t e m from t h e match p l u s a r e a c t i v a t i o n tag f o r the generator. If however, the QLAMBDA terminates u n s u c c e s s f u l l y by e x e c u t i n g t h e FAIL f u n c t i o n , D 1ST will attempt to find a n o t h e r match i n <db>. Example:  ~ ~ ~ ! T  ~  Z  ~ ~ t ! ~ Z ! ! ! ! ! !  (DEFUN GENA QEXPR <A !-X> (SETQ X *A1) (POST) (SETQ X 'A 2)) GENA (PADD *<A !->X> 3METH0D3 *GEN A) GENA (PADD *<B !-»Y> 3METH0D3 » (QLAMBDA  <B  !Vjf>  (PROG (N) (SETQ N 0) LOOP (SETQ N (ADD1 ?N) Y (MKATOM « B ?N) ) (AND (EQ ?N 3 ) ( E X I T ) ) (POST) (GO LOOP) ) ) ) (QLAMBDA »<B !-Y> . .-...) (D1ST »<!:AB !:V> SMETH0D3) (3ITEMS NIL AB A V A1 5TAG3 . . .) {: (ELSE *(RETURN * DONE • : ) ) (D1ST *<!:AB !:V> 3METHOD3 ' ( F A I L ) ) (PRINT ?V) (FAIL)) A1 A2 B1 B2 B3 DONE  MAYA Language  Reference  185  43.  (B1ST <pattern><db>[<else>])  {SSUEE}  Generates items i n b r e a d t h - f i r s t order. The a r g u m e n t s and behavior c f B1ST a r e i d e n t i c a l t o D 1ST e x c e p t t h a t B1ST c a l l s o n l y once each g e n e r a t o r i n t h e s p e c i f i e d t u p l e b a s e , <db>, t h a t matches t h e p a t t e r n , < p a t t e r n > . Only a f t e r i t has c a l l e d a l l p o s s i b l e m a t c h i n g QLAMBDAs w i l l i t recall each suspended generator f o r t h e second t i m e , t h e n e a c h f o r the t h i r d time, e t c . Example:  T  ;FROM THE TUPLEBASE OF METHODS DEFINED ABOVE (B1ST »<!:AB !:V> SMETHODS) (SITEMS NIL AB A V A1 STAGS . . .) (: (ELSE *(RETURN 'DONE :)) (B1ST *<!:AB !:V> SMETBODS ' ( F A I L ) ) (PRINT ?V) (FAIL)) A1 B1 A2 B2 B3 DONE 1  ~ I ! ! ! ! ! !  44.  (EXIT)  {SSUBR}  Terminates immediately the current e n c l o s i n g generator or process. The e x i t e d g e n e r a t o r o r p r o c e s s r e t u r n s an item from the previous invoking pattern match. If i ti s a p r o c e s s a s s o c i a t e d w i t h a schema, then t h e h i g h e s t p r o c e s s on t h e s t a c k a s s o c i a t e d w i t h t h a t schema i s e x i t e d . 45.  (POST)  {SSUER}  Returns an i t e m from a g e n e r a t o r . POST i s a n a l o g o u s t o t h e AU-REVOIR f u n c t i o n o f CONNIVER. POST c a u s e s t h e f i r s t enclosing generator to return an i t e m r e p r e s e n t i n g t h e match t h a t i n v o k e d t h e g e n e r a t o r p l u s a r e a c t i v a t i o n t a g . When t h e g e n e r a t o r i s resumed, POST r e t u r n s NIL. Example: See D1ST.  The l a s t g e n e r a t o r t y p e i s used f o r r e - i n v c k i n g a g e n e r a t o r from a reactivation t a g and f o r i m p l e m e n t i n g a restricted automatic backtracking c a p a b i l i t y . MAYA Language  Reference  186  46.  (NEXT <item>r < e l s e > ])  {BSUBfi}  <Item> must be an item containing a r e a c t i v a t i o n tag. NEXT u s e s t h e t a g i n t h e i t e m t o resume t h e generator in order to seek a new match. I f the generator succeeds a g a i n , NEXT returns the new item containing the new bindings of the p a t t e r n v a r i a b l e s from the p a t t e r n s i d e p l u s a new r e a c t i v a t i o n TAG. I f t h e g e n e r a t o r f a i l s , NEXT r e t u r n s t h e e v a l u a t i o n o f <else> which d e f a u l t s t o NIL.  47.  {aSOBE}  (FAIL)  Provides a simple mechanism for realizing backtrack search. FAIL l o c a t e s the first item on the stack containing a reactivation tag. The s t a c k i s t r u n c a t e d j u s t p a s t t h e i t e m and t h e f u n c t i o n which c r e a t e d t h e i t e m is resumed. I f t h e resumed f u n c t i o n r e t u r n s a new item, computation proceeds forward again. If however, the function returns failure, FAIL evaluates itself r e c u r s i v e l y , i . e . , i t c o n t i n u e s f a i l i n g up t h e s t a c k . If FAIL encounters a generator or process marker cn t h e s t a c k , t h e g e n e r a t o r o r p r o c e s s i m m e d i a t e l y r e t u r n s NIL. 48.  (ELSE <form>) C r e a t e s an containing <form>. If encountered and  {3S0BB} explicit failpoint. ELSE returns an item a s i n g l e b i n d i n g , a r e a c t i v a t i o n t a g bound t o NEXT i s a p p l i e d t o t h e i t e m c r i f t h e i t e m is on t h e s t a c k by F A I L , <form> i s e v a l u a t e d .  B.8  Processes  Recognizers  49.  (PROCESS <schema><gl><pattern>r<else>])  {3SUER}  C r e a t e s a new p r o c e s s and b e g i n s i t s e x e c u t i o n . <Q1> must be e i t h e r a QLAMBDA expression or the name of QEXPR function. The pattern c f QLAMBDA e x p r e s s i o n i s matched a g a i n s t < p a t t e r n > w h i c h must be a tuple. If the natch succeeds, a new process i s c r e a t e d and a s s o c i a t e d w i t h <schema> which must be e i t h e r an o b j e c t o r NIL. I f NIL i s specified, t h e p r o c e s s i s n o t a s s o c i a t e d w i t h any schema. C o n t r o l i s p a s s e d t o t h e body o f the QLAMBDA expression which is used as t h e body o f t h e p r o c e s s . I f t h e match f a i l s , <else> i s e v a l u a t e d . <Else> d e f a u l t s t o NIL. When t h e p r o c e s s t e r m i n a t e s o r i s s u s p e n d e d , PROCESS r e t u r n s an i t e m from the match o f < p a t t e r n > .  MAYA l a n g u a g e  Reference  187  50. . (SUSPEND < p a t t e r n X d b > )  {3SUBR}  The c u r r e n t p r o c e s s , P1, i s s u s p e n d e d t o < p a t t e r n > i n t h e tuplebase, <db>. <Pattern> must be a t u p l e and <db> a tuplebase of processes. Control returns t o P2, t h e process which i n v o k e d P1. When resumed, SUSPEND r e t u r n s an i t e m r e p r e s e n t i n g t h e match t o < p a t t e r n > , 51.  (RESUME < p a t f e r n > < d b > [ < e l s e > ] )  {SSUBB}  Resumes suspended processes and creates new named processes. <Pattern>, which must be a t u p l e , i s matched a g a i n s t <db> w h i c h must be a t u p l e b a s e o f p r o c e s s e s . If the match fails, <else> i s e v a l u a t e d which d e f a u l t s t o NIL. I f t h e match succeeds, t h e Batched process i s resumed i f i t i s a s u s p e n d e d p r o c e s s o r a new p r o c e s s i s c r e a t e d and begun i f i t i s a named process. When t h e process returns, RESUME r e t u r n s an i t e m r e p r e s e n t i n g t h e match t o < p a t t e r n > p l u s a r e a c t i v a t i o n t a g f o r RESUME. 52.  (COMPLETE <pattern><db>[ < e l s e > ])  f SSUER}  Suspends a l l a c t i v e p r o c e s s e s associated with t h e same schema a s t h e c u r r e n t p r o c e s s , P1, t o a r e a c t i v a t i o n t a g , t h e n resumes a specified process, P2. I f P1 i s n o t associated with any schema, only P1 i s suspended. < P a t t e r n > , which must be a t u p l e , i s matched a g a i n s t <db>, which must be a tuplebase of processes. I f t h e match f a i l s , <else> i s e v a l u a t e d w h i c h d e f a u l t s t o N I L . I f t h e match s u c c e e d s , P1 i s s u s p e n d e d t o a r e a c t i v a t i o n t a g . P2 i s resumed i f i t was a s u s p e n d e d p r o c e s s o r c r e a t e d i f i t was a named p r o c e s s . , I n c l u d e d i n t h e i t e m r e t u r n e d t o t h e i n v o c a t i o n o f P2 i s the reactivation f o r P1. I f P2 terminates v i a any f u n c t i o n e x c e p t EXIT, P1 w i l l be resumed f r o m t h e COMPLETE f u n c t i o n . COMPLETE returns an item representing the match of <pattern> plus a reactivation tag f o r subsequent invocations of the function.  MaYA Language  Reference  188  APPENDIX C IIAMPLE f l S G J A J  LISTING  ;*** A POLYHEDRAL BLOCKS RECOGNIZER * * * ; H. S. HAVENS, UBC, VANCOUVER, CANADA, MAY  1977.  ;TOP-IEVEL C A L L . (DEEUN RECOGNIZE 3EXPR NIL (: SCENE ; CREATE A TOP-LEVEL PROCESS. (PROCESS (SELF) ' (QLAHBDA < !-»DESCBIPTION> (COMMENTARY •"METHOD: TOP-LEVEL RECR EXHAUSTIVE!Y OBSERVES EACH VERTEX") ;EXHAUSTIVELY OBSERVE EACH VERTEX. (MAPC • (LAM EDA (V) (: ;SIND THIS VERTEX. (AVAL ?V) (COMMENTARY '"SCENE RECR OBSERVES" ?V) ;A MESSAGE TO COMPLETE. (RESUME '<OBSEBVE-VERTEX> PROC))) ?VERTEX-LIST) ;A SCENE HAS NOT BEEN FOUND. (PRINT * FAILURE) (FAIL)) •<l:DESCRIPTION> '(RETURN NIL 'RECOGNIZE)) ;SUCCESS! ;  (BREAK  •"** SUCCESS! * * " 7DESCRIPTION)))  ; CREATE GENERIC SCHEMATA (: (PUT* 'SCENE (OBJECT •SCHEHA  NAME 'SCENE COMPOSITION 'POLYHEDRON PROC (OBJECT 0 ) ) )  ;SCENE COMPLETION PROCESS. (PADD *<SCENE-RECR !:POLY> PROC (SELF) ) )  (NAMED—PROCESS  'SCENE-COMPLETE  ;SCENE COMPLETION PROCESS. (DEFUN SCENE-CGMPLETE QEXPR <SCENE-RECR !:FCLY> (COMMENTARY •"SCENE RECOGNIZER HAS FOUND A SCENE COMPOSED OF" (: ?POLY NAME) ) (SETQ DESCRIPTION ?P0LY) (EXIT)) )  ;END OF SCENE SCHEMA. A p p e n d i x - C : Example P r o g r a m  Listing  189  (PUT* 'LINE {:  (PUT*  (OBJECT  ' VERTEX  •SCHEMA NAME  (OBJECT  * SCHEMA  ;VERTEX COMPLETION PROCESS. (PADD » < O B S E R V E - V E R T E X > PROC  'LINE)) PROC  (OBJECT  (NAMED-PROCESS  0)) )  'OBSERVE-VERTEX))  ;OBSERVATION OF A VERTEX ;DEFAULT IS 3-LINE VERTICES {DEFUN OBSERVE-VERTEX QEXPR <OBSERVE-VERTEX> (: ;SAVE POINTER TO THIS VERTEX. (ITEM S E L F ( S E L F ) ) (ELSE '(RETURN NIL ' : ) ) ;FOR EACH SECTOR OF THIS VERTEX... (GEN-SECTORS '<?SELF !:L-LINE !:R-LINE !:ANGLE !:SECTOE> (FAIL)) ; I F ALREADY OBSERVED THEN F A I L { AND (GET* ?SECTOR) (FAIL) ) (COMMENTARY •"FOR" 7 S E C T O B » " O F (: ?SELF NAME)) ;GOTO FACE FACE ;EITHER MATCH THIS SECTOR TO AN EXISTING FACE RECR... (OR ;FOR EACH FACE RECR... (MAPC • (LAMBDA (RECR) {: ?R ECR ;MATCH IT CWISE OR CCWISE (COMMENTARY '"ATTEMPT TO MATCH THE EXPECTATIONS OF" (: ?RECR NAME)) (OR (COMPLETE » < F A C E - R E C B CWISE 7R-LINE !:(FV {NEQ ?FV ? S E L F ) ) ?SELF ?L-LINE ?ANGLE ?SECTOR> CONSTRAINTS) (COMPLETE «<FACE-RECR CCWISE 7L-LINE !:(FV (NEQ ?FV ? S E I F ) ) n  7SELF  7R-LINE 7ANGLE  ?SECTOR> CONSTRAINTS) (RETUBN NIL 'LAMBDA) ) ; MATCH SUCCEEDED. Appendix-C:  Example  Proqram  Listing  190  (RET0BN »T 'MAPC) )) DUET) ;OR A NEW ONE. (: {NEW-FACE-RECR *<?SELF ?L-LINE 7R-IINE 7ANGLE ? S E C T O B » ) ) ;8ETURN FOB NEXT SECTOR. (FAIL))) )  ;END  OF  VERTEX.  ; DEFINE VERTEX TYPES. {POT* 'ARROW-VERTEX (NEW VERTEX TYPE 'ARROW)} (PUT* 'FORK-VERTEX (NEW VERTEX TYPE 'FORK)) (POT* • T-VERT EX (NEW VERTEX TYPE 'T) ) (POT* 'L-VERTEX (NEW VERTEX TYPE *L) ) (: VERTEX (POT* 'INSTANCES {LIST ARROW-VEBTEX FOBK-VEBTEX T-VERTEX L-VERTEX))) ; DEFINE FACE SCHEMA {: (POT* 'FACE (OBJECT 'SCHEMA  NAME 'FACE COMPOSITION • (VEBTEX LINE) DNET NIL NRECRS 0))  ;NEW FACE RECOGNIZER (DEFON NEW-F ACE—.RECR QEXPR <!: FIRST-VERTEX !:L-EDGE !:R-EDGE !:ANGLE !:SECTOR> {: ;CREATE AN I N I T I A L CORNER FOR THIS FACE (ITEM CORNER (OEJ1CT ' SN ET VERTEX (: ? FIRS T-VERTEX NAME) L-EDGE 7L-EDGE R-EDGE ?R-EDGE ANGLE 7ANGLE) ) ;VERTEX SECTOR IS THIS NEW CORNER. {: 7FIRST-VERTEX (POT* 7SECTOR 7CORNER) T) ;CREATE A NEW FACE RECOGNIZER {NEW FACE NAME (MKATOM '"FACE-" (ADD1 {: FACE NBECRS) ) ) CONSTRAINTS (OBJECT 0) CORNERS (LIST 7CCHNER) EDGES NIL CCW-CORNER 7COENEB CW-COBNER 7COBNER) (ITEM SELF (SELF)) (COMMENTARY *"CREATE A NEW B E C B : » NAME *"CONTAINING A p p e n d i x - C : Example Program L i s t i n g  191  A CORNER FOR" (: ?FIEST-VERTEX NAME)) {: 7CCBNEB (PUT* • PABT-O E 7SELE) T) ;CREATE 2 PROCESSES TO EXPECT VERTICES CWISE AND CCWISE ; ABOUND THIS FACE. (COMMENTARY »"CREATE TWO PROCESSES BOUND TO EXPECTATIONS FOR" 7L-EDGE '"AND" 7R-EDGE) (PROCESS 7SELF * CW-FACE-BICR '<?L-EDGE ?FIRST-VERTEX>) (PROCESS 7SELF 'CCW-FACE-RECR '< 7R-EDGE 7FIRST-VERTEX>) ;BECORD THIS RECB INSTANCE IN THE GENERIC FACE SCHEMA FACE (PUT* ' NRECRS (ADD1 NRECBS) ) (PUT* • DNET (CONS 7SELF DNET) ) ) ) (DEFUN CW-FACE-RECR QEXPR <!:EXPECT !:FIR ST-VERTEX> {: ;GET THIS SCHEMA. (ITEM S E L F (SELF) ) ;SUSPEND THIS PROCESS TO CWISE EXPECTATIONS (SUSPEND <FACE-RECR CWISE ? EXPECT ?FIRST-VERTEX ! : VERT EX !:NEXT-EXPECT !:ANGLE !:SECTOR> CONSTRAINTS) (COMMENTARY (: ?SELF NAME) '"HAS BEEN MATCHED EY" (: ?VERTEX NAME)) ;CREATE A NEW CORNER FOR THIS VERTEX. (ITEM CORNER (OEJICT * SNET PART-OF 7SELF VERTEX {: ?VERTEX NAME) R-EDGE ?EXPECT L-EDGE 7NEXT-EXPECT ANGLE ? ANGLE NEXT-CCW CW-CORNER) ) ;VERTEX SECTOR COMPRISES THIS NEW CORNER. (: 7VERTEX (PUT* 7SECT0R ?CORNER) T) ;ADD TO L I S T OF CORNERS FOR THIS FACE 7SELF (PUT* *CORNERS (CONS 7CGRNER CORNERS)) ;UPDATE LIST OF EDGES FOR THIS FACE. (PUT* * EDGES (CONS 7EXPECT EDGES) ) ;EXCHANGE CWISE AND CCWISE POINTERS. (: CW-COBNER (PUT* •NEXT-CW 7CORNER) T) (: 7CORNER (PUT* 'NEXT-CCW CW-CORNER) T) ;UPDATE CW-CORNER (: (PUT* 'CW-CORNER 7C0RNER) T) ;VERIFY THIS FACE USING TOP-DOWN SEARCH (COMMENTARY '"VERIFY" {: 7SELF NAME) ' "USING TOP-DOWN SEARCH") Appendix-C:  Example Program  Listing  192  (VERIFY-PACE  7SELF  (ADD  (:  CW-COBNER  <:  CCW-CORNER  ANGLE) ANGLE)))))  (DEFUN C C H - F A C E - R E C R QEXPR < ! : E X P E C T !:FIRST-VERTEX> {: ; G E T T H I S SCHEMA. (ITEM S E L F (SELF) ) ^SUSPEND T H I S P R O C E S S TO C C W I S E E X P E C T A T I O N S . (SUSPEND < F A C E - R ECR CCWISE ? EXPECT ?FIRST-VERTEX ! :VERTEX !:NEXT-EXPECT !:ANGLE !:SECTOR> CONSTRAINTS) (COMMENTARY (: ? S E L F NAME) * " H A S BEEN MATCHED E Y " {: ?V EBTEX NAME)) ; C R E A T E A NEW CORNER FOR T H I S F A C E . ( I T E M COBNER ( O B J E C T SNET PART-OF ? S E L F V E R T E X (: ? V E R T E X NAME) R-EDGE ?N E X T - E X P E C T L-EDGE 7EXPECT ANGLE ? A N G L E NEXT-CW CCW-CORNER) ) ; V E R T E X S E C T O R COMPRISES T H I S NEW COBNER. {: 7 V E R T E X ( P O T * 7 S E C T O R 7CORNER) T) ;ADD TO L I S T OF CORNERS FOR T H I S F A C E . ?SELF ( P O T * ' C O R N E R S (CONS 7C0RNER CORNERS) ) ; U P D A T E L I S T OF EDGES FOB T H I S F A C E . ( P O T * * EDGES (CONS 7 E X P E C T E D G E S ) ) ; E X C H A N G E CWISE AND C C W I S E POINTERS. (: C C 1 - C C B N E B ( P O T * ' N E X T - C C W 7CORNER) T) (: ?CORNER ( P U T * ' N E X T - C W CCW-CORNER) T ) ; U P D A T E CCWISE CORNER. C ( P U T * 'CCW-CORNER 7CORNER) T) ; V E R I F Y T H I S FACE; U S I N G TOP-DOWN S E A R C B . (COMMENTARY * " M E T H O D : V E R I F Y " (: 7 S E L F NAME) ' " U S I N G TOP-DOWN S E A R C H " ) ( V E R I F Y - F A C E ? S E L F (ADD {: CW-CORNER ANGLE) {: CCW-CORNER A N G L E ) ) ) ) ) 1  ; S E A R C H TOP-DOWN FOR T H E REMAINDER OF T H I S F A C E . (DEFUN V E B I F Y - F A C E S E X P B ( T H I S - F A C E E X - A N G L E ) (: ; G E T N E I G H B O R I N G CWISE V E R T E X . ( I T E M N E I G H B O f i - V E R T EX (: 7THIS-FACE CW-CORNER ( N E I G H B O R - V E B T E X L-EDGE V E R T E X ) ) ) (COMMENTARY ' " G E T NEXT C L O C K W I S E NEIGH EOS V E R T E X : "  A p p e n d i x - C : Example P r o g r a m  Listing  193  {: ?NEIGHBOR-VERTEX NAME) •"FROM" (: ?THIS-FACE CW-CORNER L-EDGE) ) ;GET FACE RECR THAT THIS CWISE SECTOR I S PART OF. ; ELSE NIL. (ITEM OTHER-FACE (: ?T HIS-FACE CW-CGRNER ?NEIGHBOR-VERTEX (GET* (: (CWISE-SECTOR L-EDGE)) *(RETURN NIL »:)) PART-OF)) (COND ;IS THIS VERTEX PART OF THIS FACE RECR? ((EQ ?THIS-FACE ?OTHER-FACE) (COMMENTARY '"THIS VERTEX I S ALREADY CONTAINED I N " (: 7THIS-FACE NAME) ) (: ;COMPLETE THE DESCRIPTION OF THIS FACE. ?THIS-FACE ;UPDATE L I S T OF EDGES. (PUT* 'EDGES (CONS (: CW-CORNER L-EDGE) EDGES) ) ;MAKE CWISE AND CCWISE RINGS. (: CW-CORNER (PUT* 'NEXT-CW CCW-CORNER) T) (: CCW-CORNER (PUT* 'NEXT-CCW CW-CORNER) T) ;TEST THE COMPLETED FACE. (COMMENTARY '"COMPARE" (: ?THIS-FACE NAME) '"TO POLYGON MODEL") (TEST-COMPLETED-FACE ?THIS-FACE ?EX-ANGLE) ;MATCH THIS FACE TO POLYHEDRON SUPERGOALS. (COMPLETE-FACE ?THIS-FACE) ) ) ;IS THIS SECTOR PART OF SOME OTHER RECR? (?OTHER-FACE (COMMENTARY ' " I T S CWISE SECTOR I S ALREADY PART OF A CORNER OF" (: ?OTHER-FACE NAME)) ;DELETE THE OTHER FACE FROM DNET OF GENERIC FACE. (: FACE (PUT* 'DNET (DELQ ?OTHER-FACE DNET)) T) INCORPORATE I T S CORNERS INTO THIS FACE. ;EXCHANGE CWISE AND CCWISE POINTERS. (: 70THER-FACE CCW-CORNER (POT* * NEXT-CCW (: ?THIS-FACE CW-CCRNEB) ) ) {: ?THIS-FACE CW-CORNER (PUT* 'NEXT-CW (: ?OTHER-FACE CCW-CORNER))) ;FOLLOW THE EDGES OF THE OTHER FACE CWISE. (COMMENTARY *"INCORPORATE THE CORNERS OF" {: ?GTHER-FACE NAME) *"INTO" (: ?THIS-FACE NAME)) (:(FOLLOW-FACE ?THIS-FACE ?EX-ANGLE))) ;EL SE THIS VERTEX HAS NOT BEEN OBSERVED EEFORE. (T (COMMENTARY •"INCORPORATE THIS VERTEX INTO A NEW CORNER OF" (: ?THIS-FACE NAME) ) (: ;CREATE A NEW CORNER FOR THIS VERTEX. ?THIS-FACE Appendix-C:  Example Program  Listing  194  7NEIGHB0B-VERTEX (ITEM COENEB (OBJECT * SNET PART-OF 7THIS-FACE VEBTEX NAME L-EDGE (: CW-CORNER (CW-LINE L-EDGE) ) B-EDGE L-EDGE ANGLE (: CW-CORNER (CW-ANGLE L - E D G E ) ) ) ) ;MAKE VERTEX POINT TO CORNER. (POT* {:(CWISE-SECTOR (: CW-CORNER L-EDGE})) 7CCRNEB) ; ADD TO THIS FACE. 7THIS-FACE (PUT* • CORNERS (CONS 7CORNER CORNERS)) ;UPDATE L I S T OF EDGES FOB THIS FACE. (PUT* * EDGES (CONS (: CW-CORNER L-EDGE) EDGES)) ;EXCHANGE CWISE AND CCWISE POINTERS. {: CW-CORNER (PUT* * NEXT-CW 7C0BNEB) T) (: 7C0RNER (PUT* ' NEXT-CCW CW-CORNER) T) ;UPDATE CWISE COBNER (: (PUT* * CW—CORNER 7CORNER) T) ;RECURSE ON THE NEXT CWISE VERTEX. (VERIFY-FACE ?THIS-FACE (ADD ?EX-ANGLE (: 7CORNEB A N G L E ) ) ) ) ) ) ) ) ;INCOBPOBATE THE NEW COR NEBS INTO THIS FACE. (DEFUN FOLLOW-FACE SEXPR (7THIS-FACE ?EX-ANGLE) (: ;GOTO CWISE CORNER OF THIS FACE. 7THIS-FACE CW-CGRNER (COND ;IS THERE A NEXT CWISE CCRNER? ({GET* • NEXT-CW) (COMMENTARY '"INCLUDE THE CORNER FOR" {: NEXT-CW VERTEX)) ;INCLUDI IN CORNERS L I S T . (: 7THIS-FACE (PUT* * CORNERS (CONS NEXT-CW COBNEBS) ) {PUT* ' EDGES (CONS L-EDGE EDGES))) iADVANCE POINTEB TO THE NEXT CWISE CORNER. (: 7THIS-FACE (PUT* 'CW-CORNEB NEXT-CW)) ; MAKE THIS COBNER POINT TO THIS FACE. (: CW-CORNER (PUT* 'PART-OF ? THIS-FACE)) ;RECURSE ON THE NEXT CORNER. (: (FOLLOW-FACB 'THIS-FACE (ADD ANGLE ? EX- ANGLE) )} ) ;VERIFY EACH CWISE VERTEX. (T(COMMENTARY '"ALL CORNERS HAVE BEEN INCLUDED") (:(VERIFY-FACE 7THIS-FACE (ADD ANGLE ? E X - A N G L E ) ) ) ) ) ) )  A p p e n d i x - C : Example Program  Listing  195  ; TEST THIS FACE AND ASSIGN I T S TYPE. {DEFUN TEST-CO MPLETED-FACE 3 EXPR (FACE EX-ANGLE) {: ?FACE ;CHECK THE SUM OF THE FACE'S EXTERIOR ANGLES. (COND ({EPSILON 10 360 ?EX-ANGLE) (PUT* 'TYPE * INSIDE-CLOSURE)) ( (EPSILON 10 -360 ?EX-ANGLE) ;DECIDE FACE'S TYPE. (SELECTQ (LENGTH EDGES) (3 (PUT* 'TYPE 'TRIANGLE)) (4 (COND ;IS FACE A PARALLELGGBAM? ({AND (EPSILON 10 (MINUS (: CW-COBNER ANGLE)) (: CCW-CCRNER NEXT-CW ANGLE) ) (EPSILON 10 (MINUS (: CCW-COBNEB ANGLE) ) (: CW-CORNER NEXT-CCW ANGLE))) (PUT* 'TYPE 'PARALLELGGBAM)) (T(PUT* 'TYPE 'QUADRALATERAL)))) (POT* 'TYPE * MULTILATERAL))) ) (COMMENTARY » " C O M P L E T E D " NAME ' " I S A" T Y P E ) ) ) ;MATCH THIS FACE TO POLYHEDRON RECRS. (DEFUN COMPLETE-FACE SEXPR (THIS-FACE) ;DELETE THIS RECR FROM DNET OF FACE RECRS. (: FACE (PUT* 'DNET (DELQ ?THIS-FACE DNET))) (COMMENTARY '"MATCH THIS FACE TO THE EXPECTATIONS OF POLYHEDRON RECOGNIZERS") {: POLYHEDRON (OR ;MATCH "CONNECT" EXPECTATIONS OF SOME POLYHEDRON RECR. (MAPC »(LAMBDA (RECR) (COMMENTARY '"MATCH THE CONNECT EXPECTATIONS OF" (: ?RECR NAME) ) (: ?RECR (ELSE • (RETURN NIL * :) ) ;GENERATE ALL CONNECT EDGES FOR THIS FACE. (GEN-EDGES '<?THIS-FACE !:EXPECT !:EDGE-TYPE> ' (FAIL) ) (OR (EQ ?EDGE-TYPE * CONNECT) (FAIL) ) (COMMENTARY '"TRY" ?EXPECT) ;MATCH THIS RECR'S EXPECTATIONS. (COMPLETE » < P O L Y H E D R O N - R E C R CONNECT ? EXPECT !:NODE ?THIS-FACE> CONSTRAINTS *(FAIL)) -.DONE. (RETURN T 'MAPC) ) ) A p p e n d i x - C : Example Program L i s t i n g  196  RECRS) ;ELSE MATCH "MAYBE-CONNECT" EXPECTATIONS OF A l l RECRS. (PROGN <MAPC * (LAMBDA (RECR) (COMMENTARY »"MATCH THE MAYBE-CONNECT EXPECTATIONS OF" (: ?HECR NAME) ) C ?RECR (ELSE * (RETURN NIL ' : ) ) ;GENERATE MAYBE CONNECT EXPECTATIONS. (GEN-EDGES •<?THIS-FACE !:EXPECT !:EDGE-TYPE> ' (FAIL) ) (OR (EQ ? E D G E - T ¥ P E •MAYBE-CONNECT)(FAIL)) (COMMENTARY •"TRY" ?EXPECT) ;MATCH THIS RECR'S EXPECTATIONS. (COMPLETE » <POLYHEDRCN-RECR MAYBE-CONNECT ?EXPECT !:NODE ?THIS-FACE> CONSTRAINTS »(FAIL)) ;DONE WITH THIS RECR. (RETURN NIL ' : ) ) ) BECRS) ;AND CREATE A NEW RECR FOR THIS FACE. (: (NEW-POLYEEDBGN-EECR 7 T H I S - F A C E ) )) ) ) ) ;GENERATES THE EDGES AND EDGE TYPES FOR A GIVEN FACE. (DEFUN GEN-EDGES QEXPR <!:FACI !-EDGE !-EDGE-TYPE> (: ?FACE ;FOR EACH EDGE IN THIS FACE... (MAPC • (LAMBDA {E) (: (AVAL ?E) (COND ( (OR (: (AVAL V1)(AND (EQ TYPE • ARROW) {EQ L 2 ? E ) } ) (: (AVAL 7 2 ) (AND (EQ TYPE »ABBOW) (EQ L 2 ? E ) ) ) ) ;THEN EDGE I S CONNECT. (SETQ EDGE ?E EDGE-TYPE 'CONNECT)) (T ;ELSE EDGE I S MAYBE-CONNECT. (SETQ EDGE ?E EDGE-TYPE •MAYBE-CGNNECT)) (POST))) EDGES) {FAIL)))  )  ;EfiD OF FACE Appendix-C:  Example Program  Listing  197  {: (PUT*  ' POLYHEDRON  (OBJECT  * SCHEMA NAME 'POLYHEDBON COMPOSITION * FACE RECRS NIL NBECRS 0 ) )  ;CREATES A NEW POLYHEDEON RECR. (DEFUN NEW-POLYHEDRON-RECR 3EXPR (FACE1) ;IS THIS FIRST FACE COMPATIBLE WITH THIS BECR'S MODEL ; OF POLYHEDRA? (OR {: POLYHEDRON (TEST-FACE-TYPE 7FACE1)) (RETURN NIL 'NEW-POLYHEDRON-RECR) ) (: ;CREATE A CONNECT NODE TC REPRESENT THIS FACE., (ITEM NODE (OBJECT 'SN ET NFACE ?FACE1 CONNECT N I L ) ) ;CBEATE A POLYHEDBON SCHEMA INSTANCE. (NEW POLYHEDBON NAME (MKATOM '"POLYHEDRON-" {: POLYHEDRON {A ED 1 NBECRS))) CONSTRAINTS (OBJECT 0) NODES (LIST ?NODE) HAYBE-NODES NIL) ; SAVE POINTER TO THIS BECB. (ITEM RECR (SELF) ) (COMMENTARY '"CREATE A NEW RECR:" NAME '"CCNTAINING" (: ?FACE1 NAME) ) (COMMENTARY *"COMPUTE EXPECTATIONS ABOUT OTHER FACES OF" NAME) ;RECORD IN THE GENERIC POLYHEDRON SCHEMA. (: POLYHEDRON (PUT* 'RECRS (CONS ?RECR RECRS) ) (PUT* • NRECRS (ADD1 NBECRS) )) ;CREATE A PROCESS BOUND TO AN EXPECTATION FOR EACH EDGE ; IN THIS FACE. (: (ELSE ' (RETURN NIL • : ) ) ;GENERATE EACH EDGE OF THIS FACE AND ITS TYPE. (: FACE (GEN-EDGES »<?FACE1 !:EDGE !:EDGE-TYPE> ' ( F A I L ) ) ) (COMMENTARY '"FOR" 7EDGE '"OF" (: ?FACE1 NAME) ) ;EITHER A CONNECT OR MAYBE-CONNECT PROCESS. (COND {(EQ ? EDGE-TYPE 'CONNECT) (PROCESS ?RECR 'ACCEPT-CONNECT-FACE »<?RECR ?EDGE ? N O D E » ) ({PROCESS ?RECR 'ACCEPT-MAYBE-CONNECT-FACE •<?BECR ?EDGE ?NODE>})) ;GO BACK FOR NEXT EDGE. (FAIL) ) ;SEARCH FOR OTHEB FACES OF THIS POLYHEDBON BY OBSERVING ; 3-LINE VERTICES OF THIS FACE. Appendix-C:  Example Program  Listing  198  (COMMENTARY '"METHOD: SEARCH EOR OTHER FACES OF" C ?RECR NAME) '"BY OBSERVING VERTICES OF") (COMMENTARY •« " {: ?FACE1 NAME) "•THAT MAY BE PART OF MORE THAN ONE FACE") 7FACE1 (MAPC ' (LAMBDA (CORNER) (: ?COR NER (AVAL VERTEX) (COND ( (MEMQ TYPE ' (ARROW FORK T) ) (COMMENTARY (: ?RECB NAME) '"OBSERVES" NAME) (RESUME '<OBSERVE-VERTEX> PROC))))) CORNERS) )) ;ACCEPTS MATCHING CONNECT FACE INTO THIS POLYHEDRAL DESCRIPTION. (DEFUN ACCEPT-CONNECT-IACE QEXPR <!:RECR !:EXPECT !:EXPECT-NODE> (COMMENTARY *"CREATE A PROCESS BOUND TO THE CONNECT EXPECTATION:" ?EXPECT) {: ?R ECR ;SUSPEND THIS PROCESS TO THIS EXPECTATION. (SUSPEND <POLYHEBRON-RECR CONNECT 7EXPECT 7EXPECT-NODE !:FACE> CONSTRAINTS) (COMMENTARY '"A CONNECT EXPECTATION OF" {: ?RECR NAME) *"HAS BEEN MATCHED BY" {: ?FACE NAME)} ;IS NEW FACE COMPATIBLE WITH THIS MODEL OF POLYHEBBA? (OR {: (TEST-FACE-TYPE ?FACE) ) ( FAIL) ) ;CREATE A NODE IN THIS RECB'S DESCRIPTION FOR THIS FACE. (ITEM NODE (OBJECT 'SNET NFACE 7FACE MAYBE-CONNECT NIL CONNECT ( L I S T 7EXPECT-NGD1) ) ) (PUT* 'NODES (CONS 7N0DE NODES)) (: 7EXPECT-NODE (PUT* 'CONNECT (CONS 7NODE CONNECT))) -.COMPUTE TRANSITIVE CLOSURE OF EDGES FOR THIS FACE. (COMMENTARY '"COMPUTE TRANSITIVE EDGE CLOSURE FOR THIS FACE") (: (ELSE * (RETURN NIL ' : ) ) ;FOR EACH OTHER EDGE IN THIS F A C E . . . (: FACE (GEN-EDGES '<?FACE !:EDGE !:EDG E-TYPE> ' ( F A I L ) ) ) ;IS I T THE PREVIOUS EXPECTATION? (AND (EQ ?EDGE ? E X P E C T ) ( F A I L ) ) (COMMENTARY • "FOR" ?EDGE »"GF" ' {: ?FACE NAME) ) ;ELSE COMPUTE CLOSURE FOR THIS EDGE. (EDGE-CLOSURE 7RECR ?EDGE ?EDGE-TYPE ?NODE) ;GET NEXT EDGE. (FAIL) ) ;MATCH MAYBE CONNECT FACES TO THESE NEH EXPECTATIONS. (MAPC * (LAMBDA (MNODE) (: (ITEM MFACE {: 7MNODE NFACE) ) (COMMENTARY *"ATTEMPT TO MATCH MAYBE-CCNNECT FACE:" (: 7MFACE NAME) '"TO THESE NEW EXPECTATIONS") Appendix-C:  Example P r o q r a m  Listing  199  (ELSE '(RETURN NIL ' : ) ) ;FOB ANY CONNECT EDGE IN THIS FACE... {: FACE {GEN-EDGES '<?MFACI !:EDGE !:EDGE-TYPE> (FAIL))) (OR {EQ ?EDGE-TYPE 'CONNECT) (FAIL) ) (COMMENTARY '"TRY" ? EDGE) ;IS THIS EDGE NOW CONNECT KITH THIS RECR? (MATCH '<POLYHEDRON-RECR CONNECT ?EDGE !:EXPECT-NODE XX> CONSTRAINTS » (FAIL) ) (COMMENTARY (: ?MFACE NAME) ' " I S CONNECT WITH" (: ?RECR NAME) ) ;THEN MOVE THIS NODE TO CONNECT L I S T . (PUT* 'NODES (CONS ?HNODE NODES)) (POT* 'MAYBE-NODES (DELQ ?MNODE MAYBE-NODES)) ;ADD CONNECT LINK TO PREVIOUS MAYBE CONNECT. (: ?EXPECT-NODE (PUT* 'CONNECT (CONS ?MNODE CONNECT) ) ) ;COMPDTE TRANSITIVE CLOSURE FOR EDGES ; OF THIS NODE. (COMMENTARY * "COMPUTE TRANSITIVE EDGE CLOSURE FOR" (: ?MFACE NAME)) (: (ELSE • (RETURN NIL ' : ) ) ;FOR EACH EDGE IN THIS FACE... (: FACE (GEN-EDGES »<?MFACE !;EDGE !:EDGE-TY PE> * (FAIL))) ;EXCEPT EDGE OF PREVIOUS MAYBE-CONNECT? (AND (EQ ? E DGE (: ?MNODE MEDGE) ) (FAIL) ) (COMMENTARY '"FOR" ?EDGE '"OF THIS FACE") ;COMPUTE CLOSURE FOR THIS EDGE. (EDGE-CLOSURE ?BECB ?EDGE ?EDGE-TYPE ?MNODE) ;GET NEXT EDGE. (FAIL)) ;FINISHED WITH THIS NODE. (RETURN NIL 'LAMBDA))) MAYBE-NODES) (COND ;DOES DESCRIPTION SATISFY POLYHEDRON MODEL? ((:(TEST-POLY ?RECB))(:(COMPLETE-POLYHEDRON ?RECR))) ;ELSE SEARCH FOR OTHER FACES OF THIS VERTEX BY ; OBSERVING 3-LINE VERTICES THAT ARE AT THE ; PERIPHERY OF THIS INCOMPLETE POLYHEDRON. (T(COMMENTARY «"METHOD: OBSERVE VERTICES THAT WILL DRIVE THE RECOGNITION OF NEIGHBORING FACES") {: (ELSE ' (RETURN NIL ':)) ;FOR EACH EXPECTATION IN THIS RECR... 1  Appendix-C:  Example Program  Listing  200  (MATCH  »<POLYHEBRON-RECR !:EDGE-TYPE !:EDGE ! :EXPECT-NODE XX> CONSTRAINTS ' (FAIL) ) (AVAL ?EBGE) ;OBSERVE EITHER VEBTEX OF EDGE I F A 3-LINE VERT C (AVAL V1) (COND { (MEMQ TYPE « (ARROW FORK T) ) {COMMENTARY {: ?R ECR NAME) '"OBSERVES" NAME) (RESUME •<OBSEBVE-VEETEX> PROC)))) {: (AVAL V2) (COND ( (MEMQ TYPE ' (ARROW FORK T) ) (COMMENTARY (: ?RECR NAME) '"OBSEBVES" NAME) (RESUME » < O B S E B V E - V E B T E X > PROC)))) ;GO BACK FOR NEXT EXPECTATION. (FAIL)))))) ; ACCEPTS MAYBE-CONNECT FACES INTO THIS RECR. {DEFUN ACCEPT-MAY8E-C0NNECT-FACE QEXPR <!:RECR !:EXPECT !:EXPECT-NODE> (COMMENTARY '"CREATE A PROCESS BOUND TO THE MAYBE-CONSECT EXPECTATION:" ?EXPECT) (: ?RECR ;SUSPEND THIS PROCESS TO THIS EXPECTATION. (SUSPEND <POLYHEDRON—RECR MAYBE-CONNECT 7EXPECT ? EX P ECT-NO D E !:FACE> CONSTRAINTS) (COMMENTARY »"A MAYBE-CGNNECT EXPECTATION OF" {: ?BECB NAME) '"HAS BEEN MATCHED EY" (: ?FACE NAME)) ;IS NEW NODE COMPATIBLE WITH MODEL OF POLYHEDRA? (OR (: {TEST-FACE-TYPE ?FACE) ) ( F A I L ) ) ;CREATE A NEW NODE FOR THIS FACE. (ITEM NODE (OBJECT * SNET NFACE ?FACE HEDGE ?EXPECT CONNECT (LIST ?EXPECT-NODE) ) ) INCORPORATE THIS NODE INTO THIS POLYHEDRON DESCRIPTION. (PUT* * MAYBE-NODES (CONS ?NODE MAYBE-NODES))))  ;COMPUTES THE TBANSITIVE CLOSURE OF CONNECT EDGES. (DEFUN EDGE-CLOSURE 3JEXPR (THIS-RECB EDGE EDGE-TYPE NEW-NODE) (: ?THIS-BECB A p p e n d i x - C : Example Program  Listing  201  (COND ;DOES EDGE MATCH EXPECTATIONS OF THIS RECR? ( ( : (PDELETE » < P G L Y H E D R O N - R E C R 7EDGE-TYPE ?EDGE !:THIS-NODE XX> CONSTRAINTS ' (RETURN NIL » :) ) (COMMENTARY ?EDGE '"MATCHES A" 7EDGE-TYPE '"EXPECTATION OF" {: 7THIS-RECR NAME}) ;EXCHANGE CONNECT LINKS BETWEEN NODES. 7THIS-N0DE (PUT* 'CONNECT (CONS 7NEW-N0DE CONNECT) ) 7NEW-NODE (PUT* * CONNECT (CONS 7THIS-NODE CONNECT)))) ; ELSE CREATE A CONNECT OR MAYBE-CONNECT PROCESS. ((EQ ?EDGE-TYPE 'CONNECT) (PROCESS 7THIS-8ECR •ACCEPT-CONNECT-FACE '<?THIS-RECR ? EDGE ?NEW-NODE>)) {(PROCESS 7THIS-RECR •ACCEPT-MAYBE-CONNECT-FACE '<?THIS-RECR ?EDGE ?NEW-NODE>)}))) ; MATCH COMPLETED POLYHEDRON TO EXPECTATIONS OF SCENE SCHEMA. (DEFUN COMPLETE-POLYHEDRON SEXPR (RECR) (COMMENTARY '"MATCH COMPLETED" (: ?RECR NAME) ' "TO THE EXPECTATIONS OF THE SCENE RECR") {: SCENE (COMPLETE «<SCENE-RECR ?RECR> PBGC • ( F A I L ) ) ) ) ;TFST FOR COMPLETED POLYHEDRON. (DEFUN TEST-POLY SEXPR (RECR) (COMMENTARY '"DOES DESCRIPTION OF" {: 7RECR NAME) '"SATISFY THE CRITERIA FOR A COMPLETE POLYHEDRAL OBJECT?") (: ?RECR ;ARE THERE NO MORE CONNECT EXPECTATIONS FOB THIS POLYHEDRON? (COND ((MATCH « < P O L Y H E D R O N - R E C R CONNECT ! : X X !:XX XX> CONSTRAINTS) (COMMENTARY »"NO") NIL) { (PBOG (NTBI) (SETQ NTBI 0) (MAPC « (LAMBDA (NODE) {: ?NODE NFACE (AND (EQ TYPE 'TRIANGLE) (SETQ NTRI (ADD1 ?NTRI) ) ) ) ) NODES) (SELECTQ ?NTRI (0 (PUT* 'TYPE 'CUBE)) (1 (PUT* 'TYPE 'WEDGE)) Appendix-C:  Example Program  Listing  202 (POT* 'TYPE 'PYRAMID)) (COMMENTARY '"YES:" NAME '"IS A" TYPE) T))))) ;IS PROPOSED FACE COMPATIBLE WITH MODEL OF ECLYHEDR A? (DEFDN TEST-FACE-TYPE 2EXPB (FACE) (COMMENTARY '"IS" {: ?FACE NAME) *"COMPATIBLE WITH THIS CLASS OF POLYHEDRA?") (COND ((MEMQ {: ?FACE TYPE) '{TRIANGLE PARALLELOGRAM)) (COMMENTARY »"YES") T) (T(COMMENTARY '"NO: REJECT THIS FACE") NIL))) ) ;END OF POLYHEDRON. ; AUXILIARY FUNCTIONS. (: VERTEX GENERATES SECTORS OF A 3-LINE VERTEX. (DEFUN GEN-SECTORS QEXPR <!: VERTEX I-.L-LINE I-.R-LINE ! -vANGLE !-SECTOR> (: 7VERTEX (SETQ L-LINE L2 R-LINE L1 ANGLE (SUB 180 ANGLE-L1-L2) SECTOR 'SECTOR-L1-L2) (POST) (SETQ L-LINE L3 R-LINE L2 ANGLE (SUB 180 ANGLE-L2-L3) SECTOR * SECTOR-L2-L 3) (POST) (SETQ L-LINE L1 R-LINE L3 ANGLE (SUB (ADD ANGLE-LV-L2 ANGLE-L2-L3) 180) SECTOR * SECTOR-L3-L1) ) ) ;RETURNS THE CWISE SECTOR NAME OF THE ENCLOSING VERTEX ; WHOSE R-LINE IS ?LINE. ;DEFAULT IS FOR 3-LINE VERTICES. (DEFUN CWISE-SECTOR SEXPR (LINE) (COND {(EQ ?LINE L1) »SECTOR-LI-L2) ({EQ ?LINE L2) ' S ECTOR-L2-L3) ( (EQ ?LINE L3) * SECTOR-L3-L 1} {(BREAK ERROR: LINE IS NOT FART OF THIS VERTEX" ?LINE) ) ) ) ;RETURNS THE CCWISE SECTOR NAME WHOSE L-LINE IS ?LINE OF Appendix-C:  Example Program  Listing  203  ; THE ENCLOSING VERTEX. (DEFUN CCWISE-SECTOR 9 EX PR (LINE) (COND {{EQ ?LINE L1) 'SECTOB-L3-L1) {{EQ ? L I N E L2) »SECTOB-L1-L2) ( (EQ ? L I N E L 3 ) ' S E C T O R - L 2 - L 3) {{BREAK »"*** ERROR: LINE IS NOT ?LINE) )))  ; R E T U R N S T H E CCW N E X T L I N E O F (DEFUN CCW-LINE SEXPR (LINE) (COND ({EQ ?LINE L1) 13) ((EQ ?LINE L2) LI) ((EQ ?LINE L3) 12) { (BREAK  »«***  LINE  IS  ; R E T U R N S T H E CW N E X T L I N E O F (DEFUN C W - I I N E SEXPR (LINE) (COND {{EQ ? L I N E 11) L2) ((EQ  ?LINE  L2)  AN  ENCLOSING  NOT AN  PART  OF  ENCLOSING  PART  OF  3-LINE  THIS  THIS  VERTEX.  VERTEX"  3-LINE  VERTEX"  ?LINE)) ) )  VERTEX.  L3)  ( (EQ ? L I N E 13) II) {(BREAK »«*** U N E  VERTEX"  ?LINE))))  (ADD A N G L E - L 1 - L 2 A N G L E - L 2 - L 3 ) •«*** LINE IS NOT P A R T O F T H I S  180)) VERTEX"  ?LINE)) ) )  (DEFUN CCH-ANGLE SEXPR (LINE) (COND ( (EQ ? L I N E L 3 ) (SUB 180 ANGLE-L2-L3) ) ((EQ ? L I N E 12) (SUB 180 ANGLE-L1-L2)) ( (EQ ? L I N E L1) (SUB {ADD A N G L E - L 2 - L 3 A N G 1 E - I 1 - L 2 ) {(BREAK '"*** L I N E IS NOT P A R T O F T H I S  180)) VERTEX"  ?IINE) )  (DEFUN C I - A N G {COND { (EQ ( (EQ {(EQ  L ? 7 ?  E SEXPR LINE L1) LINE L2) LINE L3)  (SUB {(BREAK  ;END  OF  IS  NOT  (LINE) (SUB 180 (SUB 180  PART  OF  THIS  ANGLE-L1-L2)) ANGLE-L2-L3) }  VERTEX  I-VERTEX ;GENERATES SECTORS OF A 2 - L I (DEFUN GEN-SECTORS QEXPR <!: V E R T E X ! - T L - L I N E I - R - L I N (: 7VERTEX {SETQ 1 - I I N E 12 R - I I N E 11 ANGLE (SUB 180 A SECTOR ' S ECTOR-L (POST) (SETQ L - L I N E L1  NE E  VERTEX. !-«ANG1E  !-.SECTOR>  NGLE-L1-L2) 1-L2)  Appendix-C:  Example Program  Listing  ))  204  R-IINE L2 ANGLE (SUB ANGLE-L1-L2 180) SECTOR *SECTOR-L2-L1) ) ) ; RETURNS THE CWISE SECTOR NAME WHOSE R-LINE IS 7LINE OF THE ; ENCLOSING VERTEX. ;FOR 2-LINE VERTICES. (DEFUN CWISE-SECTOR SEXPR (LINE) (COND ( (EQ 7LINE L1) »SECTOB-L1-L 2) ( (EQ 7LINE L2) •SECTOB-L2-L1) {(BREAK »"*** EBBOB: L I N E IS NOT PABT OF THIS VERTEX" 7LINE) ) ) ) ;RETURNS THE CCWISE SECTOR NAME WHOSE L-LINE IS 7LINE ; OF THE ENCLOSING VERTEX. ;FOR 2-LINE VERTICES. (DEFUN CCWISE-SECTOR 3EXPB (LINE) (COND ((EQ 7LINE L1) »SECTOR-L2-L1) {(EQ 7LINE L2) 'SECTOB-L1-L2) {(BREAK »"*** EBBOR: LINE I S NOT PABT OF THIS 7LINE) ) ) )  VERTEX"  ;EETUBNS THE CCW OR CW NEXT L I N E OF AN ENCLOSING 2-LINE VERTEX. (DEFUN CW-LINE 3EXPR (LINE) (COND ((EQ 7LINE L1) L2) {(EQ 7LINE L2) L1) {(BBEAK « « * * * LINE I S NOT PABT OF THIS VEBTEX" ? L I N E ) ) ) ) {:  (PUT* 'CCW-LINE CW-LINE) T)  (DEFUN CW—ANGLE 3EXPR (LINE) (COND {(EQ 7LINE L1) (SUB 180 ANGLE-L1-L2) ) {(EQ 7LINE L2) (SUB ANGLE-L1-L2 180)) {(BREAK »"*** LINE IS NOT PART OF THIS VERTEX"  7IINE))))  (DEFUN CCW-ANGLE 3EXPR (LINE) (COND ((EQ 7LINE L 2 ) ( S U B 180 ANGLE-L1-L2)) ({EQ 7LINE L I ) (SUB ANGLE-L 1-L2 180)) {(BREAK « « * * * LINE I S NOT PABT OF THIS VERTEX" 71INE) ) ) )  )  ;END  OF  L-VERTEX.  ; CREATE GIVEN NETWORK OF VERTICES AND L I N E S . : DEFINES VERTEX OBJECTS AND BINDS THEM TO THEIE NAMES. ; CALLS ARE OF THE FORM: (DEFINE-VEBTEX <NAME> <TYPE> <PAIB>*) (DEFUN DEFINE-VERTEX 3FEXPB (L) {: (PUT* (CAR ?L) (APPLY 'NEW (CDR ? L ) ) ) Appendix-C:  Example Program L i s t i n g  205  (POT* • NAME (CAR ?L) ) ) (SETQ VERTEX-LIST (NCONC 7VERTEX-LIST (CAR ? L ) ) (SETQ VERTEX-LIST  (LIST  (CAR  ?L))))  NIL)  ; DEFINES LINE OBJECTS AND BINDS THEM TO THEIR NAMES. ; CALLS ARE OF THE FORM: (DEFINE-LINE <NAME> <PaiR>*) (DEFUN DEFINE-LINE SFEXPR (L) {• (PUT* (CAR ?L) (aPPLY ' NEW (APPEND* * (LINE) (CDR ?L) ) ) ) (PUT* • NAME (CAR ?L) ) ) (SETQ L I N E - L I S T (NCONC 7 L I N E - L I S T (LIST (CAR ?L) ) ) ) { CAR ?!))• (SETQ L I N E - L I S T  NIL)  ;GENERATES ITEMS FROM A L I S T . (DEFUN LGEN QEXPR <!:LIST !-.EL> (MAPC * (LAMBDA (N) (SETQ EL ?N) (POST)) ? L I S T ) (FAIL)) ; RETURNS THE NEIGHBOR VERTEX OF SOME VERTEX NAME GIVEN A L I N E . (DEFUN NEIGHBOR-VERTEX SEXPR (LINE ME) (: (AVAL 7LINE) (COND {(EQ V1 ?ME) (AVAL V2)) ( (EQ V2 ?ME) (AVAL V1) ) ((BREAK *"***ERROR: LINE DOES NOT CONTAIN THIS VERTEX" 7ME)) ) ) ) ; RETURNS EPSILON I F THE ABSOLUTE SUM OF I T S 1ST ARG IS LESS THAN ; ITS 2ND THRU LAST ARG ELSE I T RETURNS NIL. ; CALLS ARE OF THE FORM: (EPSILON <EPS> <NUM>*) (DEFUN EPSILON N (PROG (TALLY) (SETQ TALLY 0) LOOP (COND ( (NEQ N 1) (SETQ TALLY (ADD TALLY (ARG N) ) N (SUB 1 N) ) (GO LOOP)) ({LESSP (ABS TALLY) (ARG 1)) T A L L Y ) ) ) ) ;PRINTS COMMENTARY. (DEFUN COMMENTARY 8FEXPR (LCOM) (OR 7CGMMENTARY-SWITCH (RETURN NIL * COMMENTARY)) (TERPRI) (MAPC * (LAMEDA (COM){PRIN1 (AVAL ?COM) ) ) 7LCOM) (TERPRI)) (SETQ COMMENTARY-SWITCH  T) Appendix-C:  Example Program  Listing  206  ; DATA FOE THIS PROBLEM: {DEFINE-VERTEX VERTEX-1 AEROl-VERTIX L1 'LINE-1-5 12 •LINE-1-6 L3 'LINE- 1-2 ANGLE-L1-L2 60 ANGLE-L2-L3 45) {DEFINE-VEBTEX VERTEX-2 L-VEBTEX L1 ' L I f l E - 1 - 2 L2 *LINE-2-3 ANGLE-11-L2 135) {DEFINE-VERTEX VERTEX-3 ARROW-VERTEX 11 «LINE-2-3 L2 *LINE-3-6 13 'LINE-3-4 ANGLE-L1-L2 45 ANGLE-L2-L3 30) (DEFINE-VERTEX VERTEX-4 ARROW-VERTEX L1 'LINE-3-4 12 'LINE-4-6 L3 'LINE-4-5 ANGLE-L1-L2 40 ANGLE-L2—L3 60) (DEFINE-VERTEX VERTEX-5 L-VERTEX 11 'LINE-4-5 12 'LINE-1-5 ANGLE-11-L2 120) (DEFINE-VEBTEX VEBTEX-6 FORK-VERTEX 11 'LINE-1-6 L2 'LINE-4-6 L3 'LINE-3-6 ANGLE-L1-L2 120 A NGLE-L2-L3 110) {DEFINE-LINE LINE-1-5 V1 * VERTEX-1 V2 'VERTEX-5 LENGTH 28) Appendix-C:  Example P r o g r a m  Listing  207  <DEFINE-LINE LINE-1-2 V1 'VERTEX-1 V2 'VERTEX-2 LENGTH 35) (DEFINE-LINE LINE-2-3 V1 •VEETEX-2 V2 'VERTEX-3 LENGTH 26) (DEFINE-IINE LINE-3-4 V1 'VERTEX-3 V2 'VERTEX-4 LENGTH 52) (DEFINE-LINE LINE-4-5 V1 'VERTEX-4 V2 * VERTEX-5 LENGTH 25) (DEFINE-LINE LINE-4-6 V1 'VERTEX-4 V2 •VERTEX-6 LENGTH 28) (DEFINE-LINE LINE-3-6 V1 'VERTEX-3 V2 'VEETEX-6 LENGTH 35) (DEFINE-LINE LINE-1-6 V1 'VERTEX-1 V2 'VERTEX-6 LENGTH 25) ; END OF DATA.  Appendix-C:  Example Program  Listing  

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0051790/manifest

Comment

Related Items