home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / compiler / 1278 < prev    next >
Encoding:
Text File  |  1992-07-29  |  4.1 KB  |  90 lines

  1. Newsgroups: comp.compilers
  2. Path: sparky!uunet!gatech!news.byu.edu!eff!world!iecc!compilers-sender
  3. From: ridoux@irisa.fr (Olivier Ridoux)
  4. Subject: Re: Pros and cons of high-level intermediate languages
  5. Reply-To: ridoux@irisa.fr (Olivier Ridoux)
  6. Organization: IRISA, Rennes (Fr)
  7. Date: Mon, 27 Jul 1992 09:00:11 GMT
  8. Approved: compilers@iecc.cambridge.ma.us
  9. Message-ID: <92-07-099@comp.compilers>
  10. References: <92-07-086@comp.compilers>
  11. Keywords: C, storage
  12. Sender: compilers-sender@iecc.cambridge.ma.us
  13. Lines: 75
  14.  
  15. acha@CS.CMU.EDU (Anurag Acharya):
  16. > Olivier.Ridoux@irisa.fr (Olivier Ridoux)
  17. > writes about something called abstract memory that solves problems relating
  18. > to GC as well as tail recursion.
  19. > I would like to know more about "abstract memory" and how it solves these
  20. > problems.
  21.  
  22. Our research on the implementation of logic programming languages has been
  23. focused on memory management.  We isolated its basic requirements and
  24. packaged them first in hardware, second in a software library.  A first
  25. generation of the software packaging was only an emulator of the hardware.
  26. Current generation is "pure" software and could not be translated into
  27. hardware easily.  This memory is called MALI (Memoire Adaptee au Langages
  28. Indeterministes - Memory for non-deterministic languages).  It is merely a
  29. store for an abstract data-type.
  30.  
  31. The basic idea of the hardware may help understanding the general
  32. architecture of an application using MALI.  It is an extension board for
  33. PC-like computers.  The program and the interpreter (or generated code)
  34. are stored and runned on the PC.  Every run-time storage is delegated to
  35. the MALI board which runs a garbage collector as a parallel background
  36. task.  Every time the interpreter wants to create or consult an object it
  37. asks politely to MALI which suspends the GC task and replies to the
  38. interpreter.  More parallelism can be achieved when an answer can be
  39. returned before all the house-keeping is done.  Result: the latency of the
  40. MALI board was smaller than the write/read cycle of the PC.  In software,
  41. the idea is the same though we get rid of parallelism.
  42.  
  43. Back to Anurag's question.
  44.  
  45. The memory is abstract in the sense that it implements an abstract
  46. data-type.  A fundamental point is that the memory management is packaged
  47. in the memory.  The job of the MM is to compute an optimal representation
  48. of the data-type.  It is optimal with respect to the theory of the
  49. data-type.  
  50.  
  51. The game of using an abstract memory for implementing a language is to
  52. design an iterative operational semantics for the language and to map the
  53. variable of the iteration (the state) on the abstract-data type.  It may
  54. be that the MM is no more optimal because of the new theory added by the
  55. mapping.  That is why different classes of languages need different kinds
  56. of abstract memory.  However, one should strive to find abstract memories
  57. that encompass wide classes of language (e.g.  MALI for sequential
  58. depth-first search logic programming).
  59.  
  60. The GC problem is solved because the scheme only uses C for bounded
  61. dynamic allocation.  MALI is used for every unbounded dynamic allocation:
  62. mainly, continuations.  Tail-recursion is solved because there is no
  63. recursion in the C part.  In fact, there is no tail-recursion either since
  64. the scheme is continuation based.
  65.  
  66. The positive fact of using an abstract memory is that with a minimal care
  67. it solves the MM problem.
  68.  
  69. The negative fact is that generality has a cost.  E.g. to map something
  70. that is more or less a procedure call onto the abstract memory is probably
  71. more costly than to map it on a C procedure call.  The mere dialog with
  72. the abstract memory may cost some procedure call.  We are trying to make
  73. the connection with MALI as light are possible, but it is still too heavy.
  74.  
  75. A software version of MALI (MALIv06) is available on ftp:
  76.          ftp.irisa.fr
  77.          cd maliv06 
  78. It contains a tutorial and reference manual in DVI format.  The
  79. tutorial gives the implementation of a simple intermediary machine for
  80. executing Prolog.
  81.  
  82. Hoping it helps,
  83.  
  84. Olivier Ridoux
  85. -- 
  86. Send compilers articles to compilers@iecc.cambridge.ma.us or
  87. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  88.