<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.eiffelroom.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>eiffelroom - Agents - Comments</title>
 <link>http://www.eiffelroom.org/tag/agents</link>
 <description>Comments for &quot;Agents&quot;</description>
 <language>en</language>
<item>
 <title>Thank you</title>
 <link>http://www.eiffelroom.org/poll/agents_are_you_still_using_or_do_you_still_have_some_code_using_the_old_syntax_for_agent_that_i#comment-368</link>
 <description>&lt;p&gt;Thank you very much. That tool works very well. Fast and accurate.&lt;/p&gt;

</description>
 <pubDate>Fri, 26 Oct 2007 00:56:00 -0700</pubDate>
 <dc:creator>zsimic</dc:creator>
 <guid isPermaLink="false">comment 368 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Tool to convert</title>
 <link>http://www.eiffelroom.org/poll/agents_are_you_still_using_or_do_you_still_have_some_code_using_the_old_syntax_for_agent_that_i#comment-365</link>
 <description>&lt;p&gt;I&#039;ve put a tool at &lt;a href=&quot;http://eiffelstudio.origo.ethz.ch/download&quot;&gt;http://eiffelstudio.origo.ethz.ch/download&lt;/a&gt; to update your classes to the new syntax.&lt;/p&gt;

</description>
 <pubDate>Fri, 19 Oct 2007 14:12:06 -0700</pubDate>
 <dc:creator>manus_eiffel</dc:creator>
 <guid isPermaLink="false">comment 365 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Yes</title>
 <link>http://www.eiffelroom.org/poll/agents_are_you_still_using_or_do_you_still_have_some_code_using_the_old_syntax_for_agent_that_i#comment-360</link>
 <description>&lt;p&gt;Voted &#039;yes&#039; because I do have lots of code using ~, but I think it would be very easy to get rid of all those ~ notations quickly and painlessly.&lt;/p&gt;

</description>
 <pubDate>Wed, 17 Oct 2007 22:26:02 -0700</pubDate>
 <dc:creator>zsimic</dc:creator>
 <guid isPermaLink="false">comment 360 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Exposing pre/postconditions of agent</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/correctness_conditions_2_for_calling_an_agent#comment-316</link>
 <description>&lt;p&gt;I disagree with the point that opposes exposing the preconditions and postconditions of agents.  It seems to me like the only way to get complete specifications of higher order routines (somewhat related to higher order functions).  In simpler terms, the postcondition function of agents may be used in postconditions of routines that receive agents as parameters (directly or indirectly) to describe the work in terms of the given agent.&lt;/p&gt;

&lt;p&gt;If I bring the problem in a functional context, we can see what could be desirable for Eiffel.  I&#039;ll use a lisp-like syntax and presume a design by contract macro set to make my example.  Let specify the map function (for non-lispers: this function applies a given function to every elements of a list and returns a list containing the results).&lt;/p&gt;

&lt;p&gt;&lt;pre class=&quot;geshifilter&quot;&gt;(def-dbc-function (map f list)
  (require
    (not (null? f)))
  (deferred)
  (ensure
    (implies (not (null? list)) 
              (equal? result 
                      (cons (f (car list))
                            (map f (cdr list)))))
    (implies (null? list)
              (null? result))))&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;We can see a parallel with iterators in Eiffel.  The main problem is that we cannot specify a procedure like do_all as we did map since it applies a procedure object and we do not know what we may call the frame of the operation.  I think that&#039;s why no easy definition comes up for the postcondition feature of routines.&lt;/p&gt;

&lt;p&gt;The only alternative is to write the loop as the implementation and the specification and then freeze the implementation.  This is not quite convenient because there may be reasons to redefine it.&lt;/p&gt;

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

</description>
 <pubDate>Thu, 02 Aug 2007 10:59:44 -0700</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 316 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>sometimes it&#039;s just a rubbish API</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/wrapper_generation_for_agent_calls#comment-218</link>
 <description>&lt;p&gt;I&#039;m not sure GUIs require a lot of these wrappers more than anything else, given a proper API. The poster child of wrapper agent in UI is the &#039;button clicked&#039; usage pattern in EiffelVision where you have to give an agent taking 1827 parameters which are irrelevant to a button click. The correct API should take a parameterless procedure agent -- this is not incompatible with also having a fine grained API with more info for more sophisticated usage pattern of the mouse events, indeed the simple case can be implemented with a wrapper agent, but once and inside EiffelVision, rather than a lot everywhere in client ccode.&lt;/p&gt;

&lt;p&gt;This does ring an alarm bell when the motivation for a language change is a defect in a library that can easily be fixed in the existing language, though I guess there remains some defensible use cases for dealing with wrapper agents.&lt;/p&gt;

</description>
 <pubDate>Mon, 30 Apr 2007 07:27:51 -0700</pubDate>
 <dc:creator>nenieorg</dc:creator>
 <guid isPermaLink="false">comment 218 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Something like this may be needed, but there&#039;s inline agents</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/wrapper_generation_for_agent_calls#comment-217</link>
 <description>&lt;p&gt;I agree that something like this would make life easier; many people have noted that the plain ? works only if you keep arguments in the order of the original.&lt;/p&gt;

&lt;p&gt;I tend to like the ?n notation; the only immediate concern, barring further analysis, is that the semantics of the plain ? is not so obvious any more.&lt;/p&gt;

&lt;p&gt;I think you can achieve the result almost as simply with inline agents, so I am not sure how critical this is. But it&#039;s definitely worth exploring.&lt;/p&gt;

</description>
 <pubDate>Thu, 26 Apr 2007 08:36:28 -0700</pubDate>
 <dc:creator>bmeyer</dc:creator>
 <guid isPermaLink="false">comment 217 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Interesting</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/wrapper_generation_for_agent_calls#comment-216</link>
 <description>&lt;p&gt;That look&#039;s quite interesting, especially with GUI there are quite a lot of those wrappers and I think this would be a good way to simplify things.&lt;/p&gt;

</description>
 <pubDate>Thu, 26 Apr 2007 08:12:45 -0700</pubDate>
 <dc:creator>patrickr</dc:creator>
 <guid isPermaLink="false">comment 216 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Wiki</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/win_win_win#comment-191</link>
 <description>&lt;p&gt;I know about it, and have contributed at least one page, and several comments. But I thought this was better as a blog entry.&lt;/p&gt;

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

</description>
 <pubDate>Thu, 12 Apr 2007 15:01:15 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 191 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>wiki wiki web</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/win_win_win#comment-190</link>
 <description>&lt;p&gt;Hey Colin,&lt;/p&gt;

&lt;p&gt;Did you know that we have developer wiki: &lt;a href=&quot;http://eiffelsoftware.origo.ethz.ch/index.php/Main_Page&quot;&gt;http://eiffelsoftware.origo.ethz.ch/index.php/Main_Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some of your ideas would really fit good in there.&lt;/p&gt;

&lt;p&gt;-- mTn-_-|&lt;/p&gt;

</description>
 <pubDate>Thu, 12 Apr 2007 12:22:36 -0700</pubDate>
 <dc:creator>mtn</dc:creator>
 <guid isPermaLink="false">comment 190 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Agent Contracts</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/correctness_conditions_2_for_calling_an_agent#comment-189</link>
 <description>&lt;p&gt;I agree that exposing and then explicitly checking pre/postconditions is not desirable, at least not as a general solution to agent contracts.  Here are some thoughts on a possible form of a solution.&lt;/p&gt;

&lt;p&gt;We have code that wants to call a feature that is bound at runtime.  We may statically specify the type of feature (query or function) and the number, order, and type of open arguments that this feature must have.&lt;/p&gt;

&lt;p&gt;However, we cannot statically guarantee to the client that binds a feature and gives it to our code anything more about those arguments.  Neither can we describe what we expect from the feature.&lt;/p&gt;

&lt;p&gt;So, we can currently write that we want the following entity:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;to_call: &lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+PROCEDURE&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;PROCEDURE&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#91;&lt;/span&gt;TARGET_TYPE, &lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+TUPLE&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;TUPLE&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#91;&lt;/span&gt;argument_1: TYPE_1; ...&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;But, perhaps we want to write something more like&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;to_call: agent_interface prototype&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;(using &#039;agent_interface&#039; as a keyword) for a feature `prototype&#039; defined as:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;prototype&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;argument_1: TYPE_1; ...&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #008000; font-style: italic;&quot;&gt;-- Defines the contract of an agent&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &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; &amp;nbsp;precondition_1: ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000060;&quot;&gt;agent_interface&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;ensure&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;precondition_2: ...&lt;br /&gt;
&amp;nbsp; &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;The assignment&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;to_call := &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;agent&lt;/span&gt; implementation&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;would require the feature `implementation&#039; to effect `prototype&#039; as if `prototype&#039; were a feature inherited as deferred. That is, `implementation&#039; would have to &lt;ul&gt;
    &lt;li&gt; Be a procedure with arguments that conform to the arguments of `prototype&#039; (as is currently required)&lt;/li&gt;
    &lt;li&gt; Use assertion extensions (that is, &#039;require else&#039; and &#039;ensure then&#039;)&lt;/li&gt;
    &lt;li&gt; Have a combined precondition and combined postcondition (like a redeclaration of a feature)&lt;/li&gt;
&lt;/ul&gt;

&lt;/p&gt;

&lt;p&gt;Additionally, I think there are some more details such as feature calls with `Current&#039; as the target probably cannot or should not be allowed in the assertions of the interface.&lt;/p&gt;

&lt;p&gt;An example following the previously provided DRAWABLE/SHAPE example:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;to_do: agent_interface draw_shape&lt;br /&gt;
&lt;br /&gt;
draw_shape&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;drawable: DRAWABLE; a_shape: SHAPE&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #008000; font-style: italic;&quot;&gt;-- Draw a shape on the given target.&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &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; &amp;nbsp;a_shape_not_void: a_shape /= &lt;span style=&quot;color: #800080;&quot;&gt;Void&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #603000;&quot;&gt;visible&lt;/span&gt;: drawable.&lt;span style=&quot;color: #000060;&quot;&gt;is_visible&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;deferred&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &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;
usage:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;drawable: DRAWABLE&lt;br /&gt;
&amp;nbsp; &amp;nbsp;a_tower: SHAPE&lt;br /&gt;
&amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #000060;&quot;&gt;to_do&lt;/span&gt; := &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;agent&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#123;&lt;/span&gt;DRAWABLE&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#125;&lt;/span&gt;.&lt;span style=&quot;color: #000060;&quot;&gt;draw&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;to_do.&lt;span style=&quot;color: #000060;&quot;&gt;call&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#91;&lt;/span&gt;drawable, a_tower&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;EDIT: corrected example usage&lt;/p&gt;

</description>
 <pubDate>Thu, 12 Apr 2007 05:52:43 -0700</pubDate>
 <dc:creator>harrah</dc:creator>
 <guid isPermaLink="false">comment 189 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>removing dynamic postconditions mitigates the problem but...</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/correctness_conditions_2_for_calling_an_agent#comment-188</link>
 <description>&lt;p&gt;You can escape old and state issues by not having postconditions in the ROUTINE interface. There&#039;s no use case I can think of for checking postcondition explicitly at runtime (a failed postcondition can only be a bug), while there&#039;s a use case for checking some preconditions as part of establishing the client fulfills its side of the contract and takes remedial action otherwise.&lt;/p&gt;

&lt;p&gt;Although even there is does get a bit fuzzy in that the only preconditions a client should be entitled to check is the preconditions which are part of the _static_ agent interface, for instance let&#039;s say we have a classic Eiffel pattern:&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;deferred&lt;/span&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;class&lt;/span&gt; DRAWABLE&lt;br /&gt;
&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; is_visible: &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #008000; font-style: italic;&quot;&gt;-- Is drawable target ready to receive instructions?&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;deferred&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;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; draw &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;a_shape: SHAPE&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;is&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #008000; font-style: italic;&quot;&gt;-- Draw a shape on some target.&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;require&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a_shape_not_void: a_shape /= &lt;span style=&quot;color: #800080;&quot;&gt;Void&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #603000;&quot;&gt;visible&lt;/span&gt;: is_visible&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;deferred&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;
&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;which you would use as such:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;drawable: DRAWABLE&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;if&lt;/span&gt; drawable.&lt;span style=&quot;color: #000060;&quot;&gt;is_visible&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;drawable.&lt;span style=&quot;color: #000060;&quot;&gt;draw&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;a_tower&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&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;In agentified Eiffel the same pattern becomes:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter eiffel&quot; style=&quot;font-family: monospace;&quot;&gt;drawable: &lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+ROUTINE&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;ROUTINE&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+ANY&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;ANY&lt;/span&gt;&lt;/a&gt;, &lt;a href=&quot;http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+TUPLE&amp;btnI=I%27m+Feeling+Lucky&quot;&gt;&lt;span style=&quot;color: #800000&quot;&gt;TUPLE&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#91;&lt;/span&gt;SHAPE&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #008000; font-style: italic;&quot;&gt;-- (1) generic preconditions checking&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;if&lt;/span&gt; drawable.&lt;span style=&quot;color: #000060;&quot;&gt;preconditions_holds&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#91;&lt;/span&gt;a_tower&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&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; drawable.&lt;span style=&quot;color: #000060;&quot;&gt;call&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#91;&lt;/span&gt;a_tower&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#93;&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; &amp;nbsp; &lt;span style=&quot;color: #008000; font-style: italic;&quot;&gt;-- or (2) tagged preconditions checking&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0600FF; font-weight: bold;&quot;&gt;if&lt;/span&gt; drawable.&lt;span style=&quot;color: #000060;&quot;&gt;precondition_holds&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0080A0;&quot;&gt;&amp;quot;is_visible&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#91;&lt;/span&gt;a_tower&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#41;&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; drawable.&lt;span style=&quot;color: #000060;&quot;&gt;call&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#91;&lt;/span&gt;a_tower&lt;span style=&quot;color: #FF0000;&quot;&gt;&amp;#93;&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;/div&gt;    Both patterns suffer from problems. (1) is checking too much, leaking debug code into non-debug execution flow. This illustrate the major drawback of exposing preconditions, it leaks the internal programming language plumbing inside the program. I think it has been a great strength of Eiffel to have fairly limited reflection facilities, so that you don&#039;t have &amp;quot;bits of compilers&amp;quot; leaking into programs, both conceptually and as part of the runtime footprint. This stuff is moving in the wrong direction.&lt;/p&gt;

&lt;p&gt;(2) suffers a variant of the same problem, in that while semantically equivalent to the classic Eiffel pattern, it has also leaked compiler stuff into runtime, with some drawbacks for example the tag is a string, so there will be no compilation time error if is_visible is renamed etc, or if there&#039;s a typo in the first place, and the compiler cannot, or painfully, dead code away the &#039;debug&#039; contracts that are always true in a correct program (and that damage extend to all routines with the same signature that are agent targets, and their descendants!). Also code analysis or automated verification becomes a harder problem.&lt;/p&gt;

</description>
 <pubDate>Wed, 11 Apr 2007 04:23:32 -0700</pubDate>
 <dc:creator>nenieorg</dc:creator>
 <guid isPermaLink="false">comment 188 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>I think its not only about</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/correctness_conditions_2_for_calling_an_agent#comment-179</link>
 <description>&lt;p&gt;I think its not only about the preservation. If you ask a routine whether a postcondition is satisfied, wich prestate and which poststate are you referring to? What is the meaning of `r.preconditions_hold ([1,2,3])&#039;? Does it ask whether some past execution satisfied the postcondition, the last one, or maybe a hypthesized one?&lt;/p&gt;

&lt;p&gt;I am not completely clear on it either, but at the moment the only thing that makes sense to me is to ask either:&lt;/p&gt;

&lt;p&gt;1) Given this set of arguments, this prestate and this poststate, does the postcondition hold?&lt;/p&gt;

&lt;p&gt;2) For the last execution of this agent, did the postcondition hold?&lt;/p&gt;

&lt;p&gt;I think 1) is very tricky to implement. (What is a prestate and what is a poststate?) 2) is easier to implement, in fact it can be as simple as a variable. But in the end I am not sure about its usefulness, after all if the last execution failed I would have noticed because an exception was thrown. Btw, for 2) you don&#039;t need arguments either.&lt;/p&gt;

&lt;p&gt;Andreas&lt;/p&gt;

</description>
 <pubDate>Mon, 02 Apr 2007 06:13:46 -0700</pubDate>
 <dc:creator>aleitner</dc:creator>
 <guid isPermaLink="false">comment 179 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Transmitting old values</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/correctness_conditions_2_for_calling_an_agent#comment-178</link>
 <description>&lt;p&gt;As usual, I answered too quickly, before thinking.&lt;/p&gt;

&lt;p&gt;I now see that preservation of old values across the call might be tricky (or not possible, for an implementation in Eiffel code). Colin Adams&lt;/p&gt;

</description>
 <pubDate>Mon, 02 Apr 2007 02:16:51 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 178 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Calling the implementation</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/correctness_conditions_2_for_calling_an_agent#comment-177</link>
 <description>&lt;p&gt;By &amp;quot;calling the implementation&amp;quot;, do you mean the implementation of the body or of the postcondition code?&lt;/p&gt;

&lt;p&gt;I don&#039;t see where the difficulty lies. It works in workbench mode.&lt;/p&gt;

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

</description>
 <pubDate>Mon, 02 Apr 2007 02:02:26 -0700</pubDate>
 <dc:creator>colin-adams</dc:creator>
 <guid isPermaLink="false">comment 177 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Maybe I am missing</title>
 <link>http://www.eiffelroom.org/blog/colin_adams/correctness_conditions_2_for_calling_an_agent#comment-176</link>
 <description>&lt;p&gt;Maybe I am missing something, but I still don&#039;t see how `postcondition_holds&#039; can be implemented without calling the actual implementation? Or should the postcondition just be evaluated on the current state + arguments? If so, how can a `postcondition_holds&#039; ever ealuate to True for a postcondition like `count = old count + 1&#039;?&lt;/p&gt;

</description>
 <pubDate>Mon, 02 Apr 2007 01:32:17 -0700</pubDate>
 <dc:creator>aleitner</dc:creator>
 <guid isPermaLink="false">comment 176 at http://www.eiffelroom.org</guid>
</item>
</channel>
</rss>
