home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / pop / 175 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  2.7 KB

  1. Path: sparky!uunet!noc.near.net!nic.umass.edu!dime!roo.cs.umass.edu!pop
  2. From: pop@cs.umass.edu ( Robin Popplestone )
  3. Newsgroups: comp.lang.pop
  4. Subject: Dynamic lists
  5. Message-ID: <57979@dime.cs.umass.edu>
  6. Date: 23 Dec 92 18:46:18 GMT
  7. Sender: news@dime.cs.umass.edu
  8. Organization: University of Massachusetts, Amherst
  9. Lines: 42
  10. Originator: pop@roo.cs.umass.edu
  11.  
  12. [I must get our news machine mounted, so that I can use the POP reader...]
  13.  
  14. Steve K. [it  was I  think] suggested  a more  efficient implementation  of
  15. dynamic lists could  be obtained by  having a separate  record to hold  the
  16. generating function. That would seem to be a good idea, since dynamic lists
  17. should be  used  abstractly.  The  only occasion  recently  when  I  recall
  18. actually looking  at  the structure  of  a dynamic  list  is in  the  error
  19. reporting mechanism of parse_gen. Error  reporting is of course always  the
  20. trouble spot where abstractions  break down etc.  What the error  reporting
  21. mechanism needs to do is to potter along the expanded dynamic list until it
  22. finds the unexpanded part,  which is where the  parser must have failed  to
  23. find a parse. However, the  code I have written  would actually work OK  if
  24. the suggestion  of  a  separate  terminating  record  were  adopted.  But a
  25. predicate to recognise whether you  are looking at a completely  unexpanded
  26. dynamic list would be a help.
  27.  
  28.  
  29. As to why in the  first place we used a  list cell for the termination  - I
  30. don't recall any alternative being discussed, and indeed we might not  even
  31. have implemented general records at the time the problem came up. I seem to
  32. recall that we tried to do something to respond to noises that Peter Landin
  33. was making in 1967  about streams needing to  be respectable things  with a
  34. stable denotation, and came  up with dynamic lists.  I wasn't aware at  the
  35. time of any perceived need for a general laziness.
  36.  
  37. Re. Steve's suggestion of using the 'extra' tag combination (1 out of 8  in
  38. the original POP-2 implementation, 1 out of 4 in POPLOG) This would seem to
  39. be  a  good  idea,  apart  from  the  apparently  unavoidable  inefficiency
  40. introduced into recognisers (which he pointed out). I can't  think of any
  41. way  out of this -  zoos are bad news  I think. If  there is  to be any
  42. spatial separation,  modern consensus is towards separating generations
  43. rather than types.
  44.  
  45.  
  46. One hack that has been tried  in the persistent language community (and  as
  47. Steve observes, one might regard persistence as a delayed read from backing
  48. store) has  been  to  force a  page-fault  when  such a  delayed  beast  is
  49. encountered. However, with current  operating systems, this probably  works
  50. better for persistence  (where you  are going to  have wait  quite a  while
  51. anyway) than for general laziness.
  52.  
  53. Robin.
  54.