home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / eiffel / 1093 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  5.1 KB

  1. Path: sparky!uunet!pipex!unipalm!uknet!mucs!cs.man.ac.uk!mod
  2. From: mod@cs.man.ac.uk (Michael O'Docherty (CAG ra))
  3. Newsgroups: comp.lang.eiffel
  4. Subject: Re: system-level validity
  5. Message-ID: <mod.714907485@cs.man.ac.uk>
  6. Date: 27 Aug 92 09:24:45 GMT
  7. References: <mod.714411318@cs.man.ac.uk> <714585601snx@holon.demon.co.uk>
  8. Sender: news@cs.man.ac.uk
  9. Lines: 129
  10.  
  11. I apologise to those people who have already read this message but I think
  12. I distributed it to `man' (ie. Manchester) rather than `world'. It's a reply
  13. to Trevor Nash's message, which in turn was a reply to an earlier message
  14. of mine asking whether ISE 3.0 checks system-level validity. I'm assuming
  15. the initial post made it to everyone.
  16.  
  17.  
  18. >Subject: Re: system-level validity
  19. >References: <mod.714411318@cs.man.ac.uk> <714585601snx@holon.demon.co.uk>
  20.  
  21. tcn@holon.demon.co.uk (Trevor Nash) writes:
  22.  
  23.  
  24. >In article <mod.714411318@cs.man.ac.uk> mod@cs.man.ac.uk writes:
  25.  
  26. >>    "Does ISE Eiffel 3.0 perform system-level validity checking?"
  27.  
  28. >Fair question, but poorly phrased:
  29.  
  30. Just because a question is not as complete as you want it doesn't mean it's
  31. poorly phrased ;-)
  32.  
  33. >having read the definition of system
  34. >validity in Eiffel The Language,
  35.  
  36. Surprisingly enough, I've read it too. In fact it's because of statements like
  37.  
  38.     "Of course, to guarantee the type-safety of a system, you must
  39.      check [class-level and system-level validity]"
  40.  
  41. without an accompanying opinion on whether it *should* be done, which prompted
  42. my initial question.
  43.  
  44. >why pick on ISE - I'd like to hear what Sig have to say.
  45.  
  46. Because we have a maintenance contract with ISE.
  47.  
  48. >In particular it is important to know what the compiler does with programs
  49. >which are system invalid
  50.  
  51. Exactly! I just want to know up front. ISE's glossy for Eiffel 3 states that
  52. the melting ice tecnology
  53.  
  54.     "Performs class-level type checking and guarantees type security"
  55.  
  56. If you ask me (and you did) the second half of this statement is a blatant
  57. contradiction of the first.
  58.  
  59. >> I only ask because I strongly believe that 3.0 vendors should be up
  60. >> front about this very important issue; after all, is a compiler that
  61. >> only performs 99% of the possible static checking any long term use,
  62. >> especially when Eiffel is trumpeted as robust?
  63.  
  64. >Come on Mike, this is a bit OTT isnt it?
  65.  
  66. No.
  67.  
  68. >Eiffel claims to be more robust
  69. >than most other languages, not that it is impossible to write an incorrect
  70. >Eiffel program.
  71.  
  72. I quote from "Static Typing for Eiffel", B. Meyer, 1989: (Eiffel 2.3 release
  73. notes):
  74.  
  75.     "...the *goal* of Eiffel typing in a complete yet simple
  76.     way:
  77.         Type safety constraint: An Eiffel system is said to be type-
  78.         safe if for any routine application x.r(a), and for any
  79.         dynamic types DX and DA that x and a may take *during the
  80.         execution of a system, DX includes and exports a routine
  81.         corresponding to r*, with a formal argument declared of a
  82.         type which is an ancestor of DA."
  83.  
  84. (the emphases are mine!). Is the goal still the same?
  85.  
  86. >I wonder how many real errors you expect to find with the
  87. >system-level checks that are not trapped by the class-level checks?
  88.  
  89. Believe it or not, system-level validity found me, not the other way round. I
  90. accidentally found myself applying a feature to an object which didn't have it.
  91. ISE Eiffel 2.3 seg-faulted at run-time (clearly unacceptable) and Eiffel/S
  92. (first PC release) caught it at run-time (a bit better).
  93.  
  94. I quote from the same source:
  95.  
  96.     "...This explains why fixing the type rules and the corresponding type
  97.     checking performed by the compiler has not been a top priority. *But of
  98.     course the loopholes must eventually be closed*"
  99.  
  100. Have they been closed? Will they be closed? Has the position changed?
  101.  
  102. >do you realise that a system-invalid program is not necessarily incorrect?
  103.  
  104. Perhaps just a wee bit patronising, Trev?
  105.  
  106. >You seem to view the question of system validity as if it was simply a 
  107. >further type-check that the compiler writer has chosen not to implement.  
  108. >Its actually much more complicated than this:
  109.  
  110. You're doing it again.
  111.  
  112. It *is*  simply a further type check and it's not
  113. difficult (ETL 364-367).
  114. It may well be time consuming. IMHO it should
  115. be a separate EiffelBuild option. Those who don't care about full type-safety
  116. can leave it off, (but I bet you'll switch it on when you get a run-time type
  117. failure!). I would probably use it as part of the validation process before
  118. release.
  119.  
  120. >Which of these solutions conform to the standard defined by ETL, and thus
  121. >earn the name Eiffel?
  122.  
  123. ETL defines the language, not the implementation. This can be frustrating. As
  124. an example consider evaluation of boolean expressions in C and Pascal. I
  125. believe the C standard says compilers will cause them to be evaluated left to
  126. right and may finish evaluation as soon as a result is obvious; I also seem to
  127. remember that the Pascal standard states that no assumption can be made about
  128. evaluation order or unvisited clauses. I'd appreciate a definite stand on
  129. what implementations *must* and *should* do in ETL version 2 and in the eventual
  130. language definition.
  131.  
  132. Surely ISE are prepared to say something about this issue, and Sig?
  133.  
  134.  
  135. So much for my brave attempt to keep things brief with my last message.
  136.  
  137. Mike
  138.  
  139. Internet: mod@cs.man.ac.uk, wet string: (+44) 061 223 1301 ext. 2343
  140.