home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / compiler / 1553 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  4.1 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!rutgers!faatcrl!iecc!compilers-sender
  2. From: ptb@eng.cam.ac.uk (P.T. Breuer)
  3. Newsgroups: comp.compilers
  4. Subject: re: Abstract Interpretation Query
  5. Keywords: functional, logic
  6. Message-ID: <92-09-072@comp.compilers>
  7. Date: 14 Sep 92 11:58:11 GMT
  8. References: <92-09-044@comp.compilers> <92-09-041@comp.compilers>
  9. Sender: compilers-sender@iecc.cambridge.ma.us
  10. Reply-To: P.T. Breuer <ptb@eng.cam.ac.uk>
  11. Organization: Compilers Central
  12. Lines: 81
  13. Approved: compilers@iecc.cambridge.ma.us
  14.  
  15. masticol@cadenza.rutgers.edu (Steve Masticola) writes:
  16. >vugranam@pike.ee.mcgill.ca (Vugranam Chakravarthy Sreedhar) writes:
  17. >>AI, although nice, is expensive in terms of time and space. I doubt if the
  18. >>concept is being used in any production compilers.
  19. >
  20. >I don't believe that this generalization holds. As I understand it,
  21. >abstract interpretation (please forgive me if I don't use the prejudicial
  22. >term "AI" :-) is a theoretical framework for connecting a program to an
  23. >abstraction of that program, or for generating the abstraction given some
  24. >particular information you'd like to estimate.  The abstraction is
  25. >supposed to have properties that make it nice for data flow analysis
  26. >(monotonic edge functions, etc.)
  27. >
  28. >Standard problems like reaching definitions can be cast in an abstract
  29. >interpretation framework, and it costs nothing in terms of analysis
  30. >time to do so.
  31. >
  32. > If anyone knows differently, please jump in...
  33.  
  34. I can understand hardly a word of the above, and I have written at least
  35. one paper on A-I, and probably four (it's hard to tell what is and what
  36. ain't A-I). If anyone else feels the same, here's the 2c I owe. I may not
  37. actually know what it is, but I know what I think it is:
  38.  
  39. I believe A-I is just the interpretation of a program text as something
  40. other than a program. As a type, for example. Or as a control flow graph.
  41. Fin.  That's the end of the mystery.
  42.  
  43. There are especially nice consequences for the proper treatment of
  44. recursion if the following square diagram appears anywhere:
  45.  
  46.     thing -AI---> other thing
  47.      |              |
  48.      |              |
  49.      |              |
  50.      V   -AI---> >  V
  51.    one more        yet another thing
  52.    thing
  53.  
  54.  
  55. The `'>' (in some sense) at the bottom is important.  For example, I have
  56. often used:
  57.  
  58.     seq of   ---AI--> seq of
  59.     programs          numbers
  60.     |                  |
  61.     | limit            | limit
  62.     V                  V
  63.     program  ---AI-> > number
  64.  
  65. and this diagram tells me that my A-I allows me to take limits of numbers
  66. instead of solving for limits of programs. What I get is a lower bound for
  67. the number that I would have got as the A-I of the limiting program.
  68.  
  69. In my case, the number was associated with a nontermination estimate, and
  70. the sequence of programs was a loop expanded out various numbers of times.
  71.  
  72. To make the diagrams `make sense', one has to have the right settings
  73. (computational domains, categories, or whatever you prefer as the semantic
  74. substrate) and the right conditions within that setting (here that the seq
  75. is directed and increasing in a limit-complete structure - boy, wouldn't
  76. you just love infinite programs to be meaningless?) But I don't see any
  77. need for jargon or obfuscation! Cognoscenti will see from this that I was
  78. using the lest fixed point semantics for ptograms, and therefore must have
  79. been dealing with a lazy language, but that's by and by. People who use
  80. strict semantics wil talk about `<' where I have `>', and be trying to
  81. prove finite termination, not infinite extension (I was interested in the
  82. program that never stops, because it never hangs).
  83.  
  84. Now will someone please explain to me what all this has to do with
  85. compilation? Static analysis, I can understand the connection with.
  86. Compilers no. Optimisation, yes.
  87.  
  88. Peter
  89. -----------------------------
  90. Peter T. Breuer
  91. Oxford University Computing Laboratory <ptb@uk.ac.ox.comlab>
  92. Cambridge University Engineering Department <ptb@uk.ac.cam.eng>
  93. -- 
  94. Send compilers articles to compilers@iecc.cambridge.ma.us or
  95. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  96.