<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.eiffelroom.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>eiffelroom - total correctness - Comments</title>
 <link>http://www.eiffelroom.com/tag/total_correctness</link>
 <description>Comments for &quot;total correctness&quot;</description>
 <language>en</language>
<item>
 <title>Modularity vs Correctness</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-417</link>
 <description>&lt;p&gt;I&#039;m not sure that modularity necessarily has to be sacrificed to avoid cyclic call graphs but if it had, I&#039;m not sure that the solution &amp;quot;leaving modularity alone&amp;quot; would be the evident winner.&lt;/p&gt;

&lt;p&gt;For now, I&#039;d be interested in sketching up a descent solution.  I think that we both agree that the routine variant idea is a good one and may play an import role in the future solution.  The point where we our opinions diverge, however, is when asking if the variant is sufficient.  I&#039;m convinced that it is not.  The critics you opposed my solution may apply to a solution only constituted of routine variants.  In truth, if, by default, every routine is not reentrant, adding some classes (possibly a library) to a system that was correct can also break it.  In this case, however, it will only be found through testing.  Thanks to Eiffel assertion monitoring, the error may be found very quickly but the conclusion may be something like: &amp;quot;Well!  It seems that library ABC from supplier X and library DEF from Y cannot be used together without severe constraints&amp;quot;.&lt;/p&gt;

&lt;p&gt;For that, adding a static constraint may be necessary.  One such constraint may be to disallow qualified call to reentrant routines.  That way, any cycle allowed would be contained in a single class and its ancestry.  All other cycles, those involving several classes, would be illegal.  The cycle detection, however, would still have the ability to break a correct system for which a correct class has been added but the rejection would prevent real bugs.  To get around the inconvenient rejection when introducing a new library in a project, it may be necessary to add overrides to the project.&lt;/p&gt;

&lt;p&gt;Of course, it does not help if the project is a library.  For that case having something like B&#039;s refinement could be useful.  Everything referring to the refined class would use the refinement, instead.  Contrarily to the overrides, already supported by EiffelStudio, the refinement could inherit the features of the refined class and redefine what features it wants to.&lt;/p&gt;

&lt;p&gt;One of the important points I&#039;m trying to make here is that allowing arbitrary calls is decreasing modularity because it may create a tight coupling between unrelated pieces of software.  I think this is something to be avoided but the best way to restrict the least possible amount of calls is not obvious.&lt;/p&gt;

&lt;p&gt;I&#039;m eager to see what you think of this.&lt;/p&gt;

&lt;p&gt;Simon Hudon&lt;/p&gt;

</description>
 <pubDate>Sat, 29 Dec 2007 00:34:16 -0800</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 417 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Not giving up!</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-404</link>
 <description>&lt;p&gt;Well I have tried several answers to your comment but I have discarded them all.  I think we can agree that this is not an easy problem.  I&#039;m still thinking of several solutions but I will have more time to write some descent reply after my term has come to an end.&lt;/p&gt;

&lt;p&gt;I think that the next step of the debate is agreeing on some properties of the acceptable solutions.&lt;/p&gt;

&lt;p&gt;Simon&lt;/p&gt;

</description>
 <pubDate>Thu, 06 Dec 2007 23:11:50 -0800</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 404 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Non-modularity - never !</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-399</link>
 <description>&lt;p&gt;A verification on the basis of &amp;quot;all descendant versions&amp;quot; is inherently non-modular. It can break the verification of a correct full system just by adding a class.&lt;/p&gt;

&lt;p&gt;You are not alone with your suggestion to solve certain problems with Eiffel in a non-modular way. Bertrand himself has suggested non-modular reasoning for a number of problems, most prominently avoiding CAT calls.&lt;/p&gt;

&lt;p&gt;I disagree that non-modular reasoning is a valid option. We would sacrifice reuse and the ability to modify the code (Open/Closed principle).&lt;/p&gt;

</description>
 <pubDate>Mon, 03 Dec 2007 02:33:57 -0800</pubDate>
 <dc:creator>schoelle</dc:creator>
 <guid isPermaLink="false">comment 399 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Ah yes, of course!  Maybe I</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-398</link>
 <description>&lt;p&gt;Ah yes, of course!  Maybe I didn&#039;t use the right word but I was thinking of a generalized transitive closure.  What I mean by that is that, if, at some point in the closure the feature foo is called, we include all the features it calls plus the feature all its descendant versions call.&lt;/p&gt;

&lt;p&gt;It may seem at little futile because a simple change to the hierarchy of the supplier invalidates the assumption on which the client feature has been written.  But if the change in the hierarchy is in the same system, which seems very probable, writing a descendant version of foo will require the same precautions.  So, when writing a feature that would create a cycle could always it would always be possible realize the problem created.&lt;/p&gt;

&lt;p&gt;I think that there should be some supplementary tool that would reveal the possible cycle unasked because it is all too frequent to write a routine without checking all the specifications of its client routines.&lt;/p&gt;

&lt;p&gt;Simon&lt;/p&gt;

</description>
 <pubDate>Sun, 02 Dec 2007 08:43:39 -0800</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 398 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Polymorphism</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-397</link>
 <description>&lt;p&gt;To answer you last question: Non-opaque implementations are a problem, because you actually never know which code is executed when a feature is called, as the implementation may be replaced by a new one in a subtype. If you do not know which code is actually executed, there is no point in revealing details of the implementation.&lt;/p&gt;

</description>
 <pubDate>Sun, 02 Dec 2007 07:24:43 -0800</pubDate>
 <dc:creator>schoelle</dc:creator>
 <guid isPermaLink="false">comment 397 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>It does violate the opacity</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-396</link>
 <description>&lt;p&gt;It does violate the opacity of the implementation of a feature but, otherwise, knowing that a feature is not reentrant is not sufficient to implement another feature and know that it will not cause recursive calls, as in your example.&lt;/p&gt;

&lt;p&gt;But I do agree that we should avoid or at least minimize exposing part of the implementation.  To minimize it, I think we could come up with a set of rules (like the one I posted) that would filter some features.  Some other rules could based, for example, on the target of the call, we may provably not be the same as the caller.&lt;/p&gt;

&lt;p&gt;The problem may also be approached in another way: the compiler may issue an error or a warning to tell that some non-reentrant features may be in a cycle in the call graph.  Whether or not it is an error depends on the certainty that the compiler can have about a recursive call.  The little problem about that solution is that one cannot foresee the error when he develops a feature unless he could have the ability to see (through documentation tools) if his feature may eventually be called (in a suspicious way, one may add) by his supplier.&lt;/p&gt;

&lt;p&gt;I&#039;m not sure if I understand your point correctly: why do you say that compromising the opacity of a feature&#039;s implementation would result into deep problems with polymorphism and substitutivity?&lt;/p&gt;

&lt;p&gt;Simon&lt;/p&gt;

</description>
 <pubDate>Sat, 01 Dec 2007 15:46:51 -0800</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 396 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>It seems to be a fundamental</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-395</link>
 <description>&lt;p&gt;It seems to be a fundamental specification problem to prove total correctness for object-oriented programs, not only for Eiffel. I do not have a solution.&lt;/p&gt;

&lt;p&gt;I think there is something missing here, and I do not know what it is. Specifying something like a feature variant might be the right approach, but for me the implementation of a feature should be totally opaque, and the client has to only rely on the specification of the feature (which - if I understand correctly - you would want to violate by intersecting the closure of all possible feature calls in the body of a routine). Otherwise we get into deep problems with polymorphism and substitutivity.&lt;/p&gt;

</description>
 <pubDate>Sat, 01 Dec 2007 13:29:27 -0800</pubDate>
 <dc:creator>schoelle</dc:creator>
 <guid isPermaLink="false">comment 395 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Total correctness</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-394</link>
 <description>&lt;p&gt;Even if the variant was part of the interface, there would be a something missing:  if you don&#039;t know the transitive closure of the routine called (in terms of the call graph), you may not be aware that calling it would make it reentrant.  If we make the variant part of the interface, we may also want to show part of its transitive closure.  I say part of the transitive closure because nobody may be interested in knowing that &lt;code class=&quot;geshifilter eiffel&quot;&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#123;&lt;/span&gt;INTEGER_32_REF&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#125;&lt;/span&gt;.&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;infix&lt;/span&gt; &lt;span style=&quot;color: #0080A0;&quot;&gt;&amp;quot;+&amp;quot;&lt;/span&gt;&lt;/code&gt; is called ... except for those who inherit &lt;code class=&quot;geshifilter eiffel&quot;&gt;INTEGER_32_REF&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is why it seems good for the documentation tools to show only the intersection of the transitive closure of the documented feature with the routine set of some class of interest, one that is being developed.&lt;/p&gt;

&lt;p&gt;But the import point is that documenting the variant of a routine would still be insufficient.&lt;/p&gt;

&lt;p&gt;What do you think?&lt;/p&gt;

&lt;p&gt;Simon&lt;/p&gt;

</description>
 <pubDate>Sat, 01 Dec 2007 11:44:46 -0800</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 394 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>CATcall detection</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-393</link>
 <description>&lt;p&gt;Because the postcondition suffers from a catcall for your implementation. So it will be detected at compile time by the catcall detection mechanism (such as GEC&#039;s dynamic type set algorithm). Colin Adams&lt;/p&gt;

</description>
 <pubDate>Sat, 01 Dec 2007 06:34:56 -0800</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 393 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Measure</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-392</link>
 <description>&lt;p&gt;Looks like a good approach, very similar to the use of measures for recursive methods in Spec#.&lt;/p&gt;

&lt;p&gt;Still, I disagree that this does not need to become part of the interface. Look again at the code: The static type of the target for the calls is SET, and I have to rely on the interface specification of SET to check total correctness. If SET does not make any commitment on the measure, then I am missing important information for verification.&lt;/p&gt;

</description>
 <pubDate>Sat, 01 Dec 2007 00:52:44 -0800</pubDate>
 <dc:creator>schoelle</dc:creator>
 <guid isPermaLink="false">comment 392 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>I do not understand</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-391</link>
 <description>&lt;p&gt;Hi Colin, I do not understand how your proposal solves the problem of a stack overflow created by infinite recursion that I have described. The added contracts do not help.&lt;/p&gt;

</description>
 <pubDate>Sat, 01 Dec 2007 00:48:30 -0800</pubDate>
 <dc:creator>schoelle</dc:creator>
 <guid isPermaLink="false">comment 391 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Eiffel is not yet a formal</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-390</link>
 <description>&lt;p&gt;Eiffel is not yet a formal specification language so I think we could &amp;quot;blame&amp;quot; this for the fact that such bugs can appear.&lt;/p&gt;

&lt;p&gt;In this case, I think a simple extension of DbC might do the trick.  It&#039;s a generalization of the variant to recursive (or mutually recursive) routines.  We might want to add a variant after the precondition so that, if the control reenters a routine, the quantity must have decreased compared to the next passage.&lt;/p&gt;

&lt;p&gt;It could look like this:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;gcd &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;i, j: &lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+INTEGER&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;INTEGER&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;: &lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+INTEGER&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;INTEGER&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;is&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;require&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i &amp;gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;and&lt;/span&gt; j &amp;gt;= &lt;span style=&quot;color: #FF0000;&quot;&gt;0&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;variant&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;if&lt;/span&gt; j = &lt;span style=&quot;color: #FF0000;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;then&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #800080;&quot;&gt;Result&lt;/span&gt; := i&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #800080;&quot;&gt;Result&lt;/span&gt; := gcd &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;j, i \\ j&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;I would put the default routine variant to 0 so that routines may not be reentrant unless specified otherwise.&lt;/p&gt;

&lt;p&gt;This notation would not even have to appear in the contract view since it is related to the recursive nature of the implementation.&lt;/p&gt;

&lt;p&gt;Wouldn&#039;t that be an interesting feature?&lt;/p&gt;

&lt;p&gt;Simon&lt;/p&gt;

</description>
 <pubDate>Fri, 30 Nov 2007 11:25:44 -0800</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 390 at http://www.eiffelroom.com</guid>
</item>
<item>
 <title>Bernd is to blame!</title>
 <link>http://www.eiffelroom.com/blog/schoelle/a_nice_bug#comment-389</link>
 <description>&lt;p&gt;The easiest question answer is who is to blame - you are! :-)&lt;/p&gt;

&lt;p&gt;Second - which bug? there is the bug you are showing, and then there is this one:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;local&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; sa: SET_A&lt;br /&gt;
&amp;nbsp; sb: SET_B&lt;br /&gt;
&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;create&lt;/span&gt; sa&lt;br /&gt;
&amp;nbsp;r := sa.&lt;span style=&quot;color: #000060;&quot;&gt;is_superset_of&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;sb&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;OK. That&#039;s just me being myself. I know you are using ECMA notation with attached status as the default.&lt;/p&gt;

&lt;p&gt;For a more serious answer to your question, I don&#039;t believe this is impossible to solve by DbC.&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;class&lt;/span&gt; SET_A&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;feature&lt;/span&gt; &lt;span style=&quot;color: #008000; font-style: italic;&quot;&gt;-- Relations&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; is_superset_of &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;x: !&lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+SET&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;SET&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+BOOLEAN&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;BOOLEAN&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;is&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #008000; font-style: italic;&quot;&gt;-- Some implementation&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;ensure&lt;/span&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;then&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;inverse: &lt;span style=&quot;color: #800080;&quot;&gt;Result&lt;/span&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;implies&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #800080;&quot;&gt;Current&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#125;&lt;/span&gt; x.&lt;span style=&quot;color: #000060;&quot;&gt;is_subset_of&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #800080;&quot;&gt;Current&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; is_subset_of &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;x: !&lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+SET&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;SET&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+BOOLEAN&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;BOOLEAN&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;is&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #800080;&quot;&gt;Result&lt;/span&gt; := x.&lt;span style=&quot;color: #000060;&quot;&gt;is_superset_of&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #800080;&quot;&gt;Current&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;ensure&lt;/span&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;then&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;inverse: &lt;span style=&quot;color: #800080;&quot;&gt;Result&lt;/span&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;implies&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #800080;&quot;&gt;Current&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#125;&lt;/span&gt; x.&lt;span style=&quot;color: #000060;&quot;&gt;is_superset_of&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #800080;&quot;&gt;Current&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;I don&#039;t suppose this is legal ECMA-compliant notation, and perhaps there isn&#039;t such a notation available at the moment, but I don&#039;t think that that can be laid at the door of DbC - rather we just need some extensions.&lt;/p&gt;

&lt;p&gt;In case it isn&#039;t clear, the intention of my notation here is to say that the implementation of the class specified must be used when evaluating the postcondition. This will imply a conversion mechanism from the type of x to the type of Current for the purposes of the evaluation.&lt;/p&gt;

&lt;p&gt;Colin Adams&lt;/p&gt;

</description>
 <pubDate>Fri, 30 Nov 2007 06:10:21 -0800</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 389 at http://www.eiffelroom.com</guid>
</item>
</channel>
</rss>
