<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0" xml:base="http://www.eiffelroom.org">
<channel>
 <title>eiffelroom</title>
 <link>http://www.eiffelroom.org</link>
 <description>Welcome to Eiffelroom! Enjoy it and contribute your own articles, libraries or
tools.</description>
 <language>en</language>
<feedburner:info uri="eiffelroom" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://www.eiffelroom.org/rss.xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://www.eiffelroom.org/rss.xml" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Fwww.eiffelroom.org%2Frss.xml" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
 <title>My three Eiffelwishes, part 3: readable types</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/T3AlMuQT6SA/460</link>
 <description>&lt;p&gt;In a previous blog entry, I related how I modified my code to split classes in two parts, separating commands and queries. In the conclusion I was suggesting that Eiffel could be extended to provide support for this. I will now formalize the language extension, and demonstrate how to use it to write even more solid code.
&lt;/p&gt;
&lt;table id="toc" class="toc" summary="Contents"&gt;&lt;tr&gt;&lt;td&gt;&lt;div id="toctitle"&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;/div&gt;
&lt;div id="tocbody"&gt;
&lt;ul&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Introduction"&gt;&lt;span class="tocnumber"&gt;1&lt;/span&gt; &lt;span class="toctext"&gt;Introduction&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#First_approach"&gt;&lt;span class="tocnumber"&gt;2&lt;/span&gt; &lt;span class="toctext"&gt;First approach&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Another_approach:_types_that_are_only_readable"&gt;&lt;span class="tocnumber"&gt;3&lt;/span&gt; &lt;span class="toctext"&gt;Another approach: types that are only readable&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Formal_rules"&gt;&lt;span class="tocnumber"&gt;4&lt;/span&gt; &lt;span class="toctext"&gt;Formal rules&lt;/span&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Readable_features"&gt;&lt;span class="tocnumber"&gt;4.1&lt;/span&gt; &lt;span class="toctext"&gt;Readable features&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Readable_types"&gt;&lt;span class="tocnumber"&gt;4.2&lt;/span&gt; &lt;span class="toctext"&gt;Readable types&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Anchored_types"&gt;&lt;span class="tocnumber"&gt;4.3&lt;/span&gt; &lt;span class="toctext"&gt;Anchored types&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Inheriting_as_readable"&gt;&lt;span class="tocnumber"&gt;4.4&lt;/span&gt; &lt;span class="toctext"&gt;Inheriting as readable&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Generic_constraints"&gt;&lt;span class="tocnumber"&gt;4.5&lt;/span&gt; &lt;span class="toctext"&gt;Generic constraints&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Conversion"&gt;&lt;span class="tocnumber"&gt;4.6&lt;/span&gt; &lt;span class="toctext"&gt;Conversion&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Call_restrictions"&gt;&lt;span class="tocnumber"&gt;4.7&lt;/span&gt; &lt;span class="toctext"&gt;Call restrictions&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Assignment"&gt;&lt;span class="tocnumber"&gt;4.8&lt;/span&gt; &lt;span class="toctext"&gt;Assignment&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Conformance"&gt;&lt;span class="tocnumber"&gt;4.9&lt;/span&gt; &lt;span class="toctext"&gt;Conformance&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Redefinition_of_a_readable_feature"&gt;&lt;span class="tocnumber"&gt;4.10&lt;/span&gt; &lt;span class="toctext"&gt;Redefinition of a readable feature&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Error_messages"&gt;&lt;span class="tocnumber"&gt;4.11&lt;/span&gt; &lt;span class="toctext"&gt;Error messages&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#The_choice_of_readable"&gt;&lt;span class="tocnumber"&gt;5&lt;/span&gt; &lt;span class="toctext"&gt;The choice of readable&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Application_to_manifest_strings"&gt;&lt;span class="tocnumber"&gt;6&lt;/span&gt; &lt;span class="toctext"&gt;Application to manifest strings&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Improper_uses_of_readable_types"&gt;&lt;span class="tocnumber"&gt;7&lt;/span&gt; &lt;span class="toctext"&gt;Improper uses of readable types&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Implementation"&gt;&lt;span class="tocnumber"&gt;8&lt;/span&gt; &lt;span class="toctext"&gt;Implementation&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;a name="Introduction"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Introduction&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The Command-Query Separation (CQS) principle states that features of a class should be either commands, that may modify the state of an object but do not return a result, or queries that return a result but don't modify the object. When classes are designed with CQS in mind, assertions are easier to write by simply calling only features that return a result. This guarantees that a program will produce the same output whether assertions are turned on or off: they don't change the state of objects.
&lt;/p&gt;&lt;p&gt;The situation becomes more complicated when assertions are called with parameters. They must call only queries on the object being probed, but also on the parameters.
&lt;/p&gt;&lt;p&gt;Therefore, for CQS to work properly, every class must follow this principle. The burden, for the programmer, is that each call must then be verified manually. In particular, if a query changes the state of one of its parameters, this state must be restored before the query returns the result. It is easy, in these conditions, to make mistakes.
&lt;/p&gt;&lt;p&gt;Eiffel doesn't force programmers to follow CQS, but doesn't assist them in that task either. A feature that modifies one of its parameters and returns a result is a valid feature, by the language rules.
&lt;/p&gt;
&lt;a name="First_approach"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;First approach&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Let's introduce a new &lt;span style="color: blue"&gt;query&lt;/span&gt; keyword, to mark features as queries (and therefore, features without it as commands). The syntax would be the following:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;query&lt;/span&gt; feature_name (parameters_list): return_type&lt;br /&gt;
body...end&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;&lt;p&gt;A feature marked with the &lt;span style="color: blue"&gt;query&lt;/span&gt; keyword would have to follow some rules:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Only make unqualified calls to features that are also marked as queries.
&lt;/li&gt;&lt;li&gt; Only make qualified calls to features that are also marked as queries, unless it applies to a local target.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The first restriction is severe since it forces us to change legacy code to add the &lt;span style="color: blue"&gt;query&lt;/span&gt; keyword in all classes. This can be alleviated if we trust libraries to follow CQS, and assume all features returning a result are queries.
&lt;/p&gt;&lt;p&gt;This approach has some drawbacks:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; The code of the feature can make an alias to one of the parameters, then call commands on the alias. The example below demonstrates this problem.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;query&lt;/span&gt; some_feature (p: SOME_CLASS): ANY&lt;br /&gt;
&lt;span style="color: blue"&gt;local&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;param_alias: &lt;span style="color: blue"&gt;like&lt;/span&gt; p&lt;br /&gt;
&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;param_alias&amp;nbsp;:= p&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;param_alias.some_command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; It should be possible to call commands on a parameter, if the object referenced by the parameter is restored to its previous state before the feature returns a result. Forbidding calls to commands is too restrictive.
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Another_approach:_types_that_are_only_readable"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Another approach: types that are only readable&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;A better option is to provide a finer grain of control over which feature is a query, and when calls are restricted to queries. This is a two steps process:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Mark features of a class that are queries as such.
&lt;/li&gt;&lt;li&gt; Mark types for any target (including &lt;span style="color: blue"&gt;Current&lt;/span&gt;) to accept only calls to queries, when appropriate.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;For this purpose, &lt;span style="color: blue"&gt;query&lt;/span&gt; is abandoned, and I'll use &lt;span style="color: blue"&gt;readable&lt;/span&gt; instead. This choice is discussed later in the post.
&lt;/p&gt;&lt;p&gt;Here is a quick example of how it works, the syntax and rules are formalized in the next sections.
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;A&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;readable&lt;/span&gt; some_query: SOME_TYPE&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;some_command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CLIENT&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test (p: &lt;span style="color: blue"&gt;readable&lt;/span&gt; A)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;local&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x: A&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t: SOME_TYPE&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t&amp;nbsp;:= p.some_query&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t&amp;nbsp;:= x.some_query&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;p.some_command &lt;span style="color: green"&gt;-- Compiler error: only features marked with readable can be called on p&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x.some_command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;&lt;p&gt;In this example, the parameter &lt;font face="courier new"&gt;p&lt;/font&gt; is of a type that has the &lt;span style="color: blue"&gt;readable&lt;/span&gt; tag. Only attributes, and features marked as readable, are available to &lt;font face="courier new"&gt;p&lt;/font&gt;. &lt;font face="courier new"&gt;x&lt;/font&gt; doesn't have this tag, and therefore all features of &lt;font face="courier new"&gt;A&lt;/font&gt; can be called on the object referenced by &lt;font face="courier new"&gt;x&lt;/font&gt;. Obviously, the assignment &lt;font face="courier new"&gt;x&amp;nbsp;:= p&lt;/font&gt; would work around the restriction, so this assignment will be forbidden by the new rules detailed below.
&lt;/p&gt;&lt;p&gt;Note that contrary to the first approach using the &lt;span style="color: blue"&gt;query&lt;/span&gt; keyword, the &lt;font face="courier new"&gt;some_query&lt;/font&gt; feature can do whatever it wants with the object, including change its state. This possibility allows for instance the creation of a data cache, to make next calls to the feature faster. 
&lt;/p&gt;
&lt;a name="Formal_rules"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Formal rules&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;I introduce a new keyword: &lt;span style="color: blue"&gt;readable&lt;/span&gt;. This keyword is used in two different contexts: readable features and readable types.
&lt;/p&gt;
&lt;a name="Readable_features"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Readable features&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;The BNF syntax for feature declarations is modified as follow:
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Feature_declaration&lt;/span&gt;: [&lt;span style="color: blue"&gt;readable&lt;/span&gt;] &lt;span style="color: green"&gt;New_feature_list&lt;/span&gt; &lt;span style="color: green"&gt;Declaration_body&lt;/span&gt;
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;New_feature_list&lt;/span&gt;: {&lt;span style="color: green"&gt;New_feature&lt;/span&gt; "," …}+
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;New_feature&lt;/span&gt;: [&lt;span style="color: blue"&gt;frozen&lt;/span&gt;] &lt;span style="color: green"&gt;Extended_feature_name&lt;/span&gt;
&lt;/p&gt;&lt;p&gt;In this context, all feature names (some can be frozen) refer to a single feature, and this feature has the optional &lt;span style="color: blue"&gt;readable&lt;/span&gt; mark. This mark will be checked if the target of a call has only restricted access to the class the feature belongs to.
&lt;/p&gt;
&lt;a name="Readable_types"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Readable types&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Everywhere a construct is declared with a type, the type declaration is modified as follow:
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Type&lt;/span&gt;: &lt;span style="color: green"&gt;Readable_Type&lt;/span&gt; | &lt;span style="color: green"&gt;Anchored&lt;/span&gt;
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Anchored&lt;/span&gt;:  [&lt;span style="color: green"&gt;Attachment_mark&lt;/span&gt;] &lt;span style="color: blue"&gt;like&lt;/span&gt; [&lt;span style="color: blue"&gt;readable&lt;/span&gt;] &lt;span style="color: green"&gt;Anchor&lt;/span&gt;
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Readable_Type&lt;/span&gt;: [&lt;span style="color: blue"&gt;readable&lt;/span&gt;] &lt;span style="color: green"&gt;Type_With_Access&lt;/span&gt;
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Type_With_Access&lt;/span&gt;: &lt;span style="color: green"&gt;Class_or_tuple_type&lt;/span&gt; | &lt;span style="color: green"&gt;Formal_generic_name&lt;/span&gt;
&lt;/p&gt;&lt;p&gt;These rules allow the following use of &lt;span style="color: blue"&gt;readable&lt;/span&gt;:
&lt;font face="courier new"&gt;
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; x: &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; x: &lt;span style="color: blue"&gt;readable&lt;/span&gt; ARRAY[INTEGER]&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; x: ARRAY[&lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING]&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; x: TUPLE[r_str: &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING; str: STRING]&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; x: &lt;span style="color: blue"&gt;readable&lt;/span&gt; TUPLE[INTEGER; &lt;span style="color: blue"&gt;readable&lt;/span&gt; BOOLEAN]&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; x(r_str: &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING) &lt;span style="color: blue"&gt;do&lt;/span&gt;...&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; x(a,b,c: INTEGER; str: &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING): &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING &lt;span style="color: blue"&gt;do&lt;/span&gt;...&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; &lt;span style="color: blue"&gt;inspect&lt;/span&gt; x &lt;span style="color: blue"&gt;when&lt;/span&gt; {STRING} ...&lt;span style="color: blue"&gt;when&lt;/span&gt; {&lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING} ... &lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; x&amp;nbsp;:= &lt;span style="color: blue"&gt;create&lt;/span&gt; {&lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING}.make_empty&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; &lt;span style="color: blue"&gt;create&lt;/span&gt; {&lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING} x.make_empty&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; &lt;span style="color: blue"&gt;if&lt;/span&gt; &lt;span style="color: blue"&gt;attached&lt;/span&gt; {&lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING} x &lt;span style="color: blue"&gt;as&lt;/span&gt; r_str &lt;span style="color: blue"&gt;then&lt;/span&gt;...&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; &lt;span style="color: blue"&gt;agent&lt;/span&gt; f({STRING}?, {&lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING}?)&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; x&amp;nbsp;:= {&lt;span style="color: blue"&gt;readable&lt;/span&gt; INTEGER}.min_value&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; x: &lt;span style="color: blue"&gt;like&lt;/span&gt; &lt;span style="color: blue"&gt;readable&lt;/span&gt; feature_name&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; x: &lt;span style="color: blue"&gt;like&lt;/span&gt; &lt;span style="color: blue"&gt;readable&lt;/span&gt; &lt;span style="color: blue"&gt;Current&lt;/span&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;/font&gt;
&lt;/p&gt;&lt;p&gt;In the non-object call &lt;font face="courier new"&gt;{&lt;span style="color: blue"&gt;readable&lt;/span&gt; INTEGER}.min_value&lt;/font&gt;, there is no object which state can be modified, so in practice there is no difference between &lt;font face="courier new"&gt;{&lt;span style="color: blue"&gt;readable&lt;/span&gt; INTEGER}.min_value&lt;/font&gt; and &lt;font face="courier new"&gt;{INTEGER}.min_value&lt;/font&gt;, if one is a valid (or invalid) call, the other is too.
&lt;/p&gt;
&lt;a name="Anchored_types"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Anchored types&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;With the rules from the previous section, the syntax &lt;font face="courier new"&gt;x: &lt;span style="color: blue"&gt;readable&lt;/span&gt; &lt;span style="color: blue"&gt;like&lt;/span&gt; feature_name&lt;/font&gt; is not permitted.
&lt;/p&gt;&lt;p&gt;If &lt;font face="courier new"&gt;x&lt;/font&gt; is declared as &lt;font face="courier new"&gt;x: &lt;span style="color: blue"&gt;like&lt;/span&gt; &lt;span style="color: blue"&gt;readable&lt;/span&gt; feature_name&lt;/font&gt; and &lt;font face="courier new"&gt;feature_name&lt;/font&gt;'s type is already readable, a warning is issued. This is because &lt;font face="courier new"&gt;feature_name&lt;/font&gt; can only be redefined in a type that is also readable (see the conformance section below).
&lt;/p&gt;
&lt;a name="Inheriting_as_readable"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Inheriting as readable&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;The inherit clause of a class is modified as follow:
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Inherit_clause&lt;/span&gt;: &lt;span style="color: blue"&gt;inherit&lt;/span&gt; [&lt;span style="color: green"&gt;Non_conformance&lt;/span&gt;] &lt;span style="color: green"&gt;Parent_list&lt;/span&gt;
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Parent_list&lt;/span&gt;: {&lt;span style="color: green"&gt;Parent&lt;/span&gt; ";" …}+
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Parent&lt;/span&gt;: [&lt;span style="color: blue"&gt;readable&lt;/span&gt;] &lt;span style="color: green"&gt;Class_type&lt;/span&gt; [&lt;span style="color: green"&gt;Feature_adaptation&lt;/span&gt;]
&lt;/p&gt;&lt;p&gt;A parent class inherited as readable will not make commands available to the child class. More specifically, the only features available to unqualified calls in the parent class are:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Features that are marked with &lt;span style="color: blue"&gt;readable&lt;/span&gt;
&lt;/li&gt;&lt;li&gt; Attributes
&lt;/li&gt;&lt;li&gt; Features listed in the create clause. These are included so the parent can initialize properly.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Note that nothing prevents a feature in the descendant to call one of the creation features of the parent. It's the responsibility of the programmer to call them only the context of an object creation.
&lt;/p&gt;&lt;p&gt;Conformance rules will be updated accordingly (see the corresponding section).
&lt;/p&gt;
&lt;a name="Generic_constraints"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Generic constraints&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;The declaration of formal generics isn't modified, but use the new declaration of types:
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Multiple_constraint&lt;/span&gt;: "{" &lt;span style="color: green"&gt;Constraint_list&lt;/span&gt; "}"
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Constraint_list&lt;/span&gt;: {&lt;span style="color: green"&gt;Single_constraint&lt;/span&gt; "," …}+
&lt;/p&gt;&lt;p&gt;&lt;span style="color: green"&gt;Single_constraint&lt;/span&gt;: &lt;span style="color: green"&gt;Type&lt;/span&gt; [&lt;span style="color: green"&gt;Renaming&lt;/span&gt;]
&lt;/p&gt;&lt;p&gt;It is therefore possible to write the following:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt; A[G-&amp;gt;&lt;span style="color: blue"&gt;readable&lt;/span&gt; ANY]&lt;br /&gt;
&lt;br /&gt;
x: A[&lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING]&lt;br /&gt;
x: A[STRING] &lt;span style="color: green"&gt;-- This shouldn't compile&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;
&lt;a name="Conversion"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Conversion&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Conversion clauses can be used to convert to and from readable types, with a separate feature for the type tagged as readable if desired. For instance, we can have:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;A&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;create&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;make_from_string,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;make_from_readable_string&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;convert&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;make_from_string({STRING}),&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;make_from_readable_string({&lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING}),&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;to_string: {STRING},&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;to_readable_string: {&lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING}&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;make_from_string(s: STRING) &lt;span style="color: blue"&gt;do&lt;/span&gt;...&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;make_from_readable_string(s: &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING) &lt;span style="color: blue"&gt;do&lt;/span&gt;...&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;readable&lt;/span&gt; to_string: STRING &lt;span style="color: blue"&gt;do&lt;/span&gt;...&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;readable&lt;/span&gt; to_readable_string: &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING &lt;span style="color: blue"&gt;do&lt;/span&gt;...&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;&lt;p&gt;Most classes will just use the version with a readable input, since they typically don't modify the object being converted. In this example, I marked to_string and to_readable_string as readable, since they are queries.
&lt;/p&gt;
&lt;a name="Call_restrictions"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Call restrictions&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;In qualified or unqualified calls, there is always a target of some type T. Sometimes this type is explicit, and sometimes it's inferred using many rules, but in the end there is always a type T. This type may or may not have the &lt;span style="color: blue"&gt;readable&lt;/span&gt; tag. If it doesn't, all usual rules apply to decide if the call is valid, like the export status of the called feature for instance.
&lt;/p&gt;&lt;p&gt;If the type T is tagged as readable, there are additional checks to make before the call can be considered valid:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; The feature is marked as readable
&lt;/li&gt;&lt;li&gt; The feature is an attribute
&lt;/li&gt;&lt;li&gt; The call is a creation instruction (or expression)
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The later case is needed to allow the creation of objects that have been declared as readable, without making the code uselessly complicated. For instance, we can always write the following:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;local&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x: &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING&lt;br /&gt;
&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;create&lt;/span&gt; {STRING} x.make_empty&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;&lt;p&gt;But it's just easier to use &lt;font face="courier new"&gt;&lt;span style="color: blue"&gt;create&lt;/span&gt; x.make_empty&lt;/font&gt;.
&lt;/p&gt;
&lt;a name="Assignment"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Assignment&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Assigning a new value to an attribute can be a regular assignment, a tuple field assignment, a conversion or the call to an assigner. The last two cases are handled with the call restriction rules described above.
&lt;/p&gt;&lt;p&gt;The case of a regular attachment, for reference types, is a simple conformance check, described in the next section. For expanded types, assigning to a readable entity is invalid.
&lt;/p&gt;&lt;p&gt;For tuples, assigning a field of a readable tuple is invalid. Consider the code below:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
x: TUPLE[s: &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING]&lt;br /&gt;
y: &lt;span style="color: blue"&gt;readable&lt;/span&gt; TUPLE[s: STRING]&lt;br /&gt;
&lt;br /&gt;
x.s&amp;nbsp;:= &lt;span style="color: purple"&gt;""&lt;/span&gt; &lt;span style="color: green"&gt;-- Valid, STRING conforms to readable STRING&lt;/span&gt;&lt;br /&gt;
y.s&amp;nbsp;:= &lt;span style="color: purple"&gt;""&lt;/span&gt; &lt;span style="color: green"&gt;-- Invalid, y is readable&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;
&lt;a name="Conformance"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Conformance&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;The check of conformance between two types must be extended to handle differences in the &lt;span style="color: blue"&gt;readable&lt;/span&gt; tag. This can be seen as an extra dimension in the description of classes and type. The rules are simple:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; T conforms to &lt;span style="color: blue"&gt;readable&lt;/span&gt; T, that is if &lt;font face="courier new"&gt;x&lt;/font&gt; is of type &lt;span style="color: blue"&gt;readable&lt;/span&gt; T, and &lt;font face="courier new"&gt;y&lt;/font&gt; of type T, &lt;font face="courier new"&gt;x&amp;nbsp;:= y&lt;/font&gt; is valid.
&lt;/li&gt;&lt;li&gt; &lt;span style="color: blue"&gt;readable&lt;/span&gt; T doesn't conform to T. Some languages may allow it, like C++ with the const_cast operator, but in my experience there is always a way to redesign the code to remove the need for this.
&lt;/li&gt;&lt;li&gt; If class B is a descendant of the base class A, but with the &lt;span style="color: blue"&gt;inherit&lt;/span&gt; &lt;span style="color: blue"&gt;readable&lt;/span&gt; A clause, &lt;span style="color: blue"&gt;readable&lt;/span&gt; B conforms to &lt;span style="color: blue"&gt;readable&lt;/span&gt; A, but B doesn't. Neither conform to A.
&lt;/li&gt;&lt;li&gt; If G is a generic parameter with a readable constraint, only readable types conform to the constraint.
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Redefinition_of_a_readable_feature"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Redefinition of a readable feature&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;If a feature is marked as readable, all redefinitions in descendants must also be readable. The reasoning is that, since the feature is a query, it should remain a query even if the implementation changes in descendants. Remember, readable features can still change the state of the object, it's only a mark to identify the feature as a query, and it doesn't put any constraints on the redefined versions.
&lt;/p&gt;
&lt;a name="Error_messages"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Error messages&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Along with the introduction of the concept of readable features and types, I created a new category of specific error messages, VURE. They correspond to the following errors:
&lt;/p&gt;&lt;p&gt;VURE1&lt;br /&gt;
Calling a feature without the readable mark on a target of a readable type.&lt;br /&gt;
Details:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Enclosing feature name
&lt;/li&gt;&lt;li&gt; Called feature name
&lt;/li&gt;&lt;li&gt; Type name (readable)
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;VURE2&lt;br /&gt;
Renaming, changing the export status, redefining, undefining, selecting and otherwise using a feature when the parent class is inherited as readable, and the feature doesn't have the readable mark.&lt;br /&gt;
(This replaces VHRC, VLEL, VDRS, VDUS, VMSS, VEEN since it's a special case of these validity rules)&lt;br /&gt;
Details: same as the replaced error.
&lt;/p&gt;&lt;p&gt;VURE3&lt;br /&gt;
A formal generic parameter is constrained to be a readable type, but the actual type is not readable.&lt;br /&gt;
(This replaces VTGD2 since it's a special case of constrained genericity rules)&lt;br /&gt;
Details: same as the replaced error.
&lt;/p&gt;&lt;p&gt;VURE4&lt;br /&gt;
Assignment to a target of readable expanded type&lt;br /&gt;
(This covers the case of assigning the field of a readable tuple as well)&lt;br /&gt;
Details:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Enclosing feature name
&lt;/li&gt;&lt;li&gt; Target of the assignment
&lt;/li&gt;&lt;li&gt; Type name (readable)
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;VURE5&lt;br /&gt;
A readable type doesn't conform to a non-readable type&lt;br /&gt;
(This replaces VNCC since it's a special case of conformance rules)&lt;br /&gt;
Details: same as the replaced error.
&lt;/p&gt;&lt;p&gt;VURE6&lt;br /&gt;
A readable feature is redefined but the redefinition doesn't have a readable mark&lt;br /&gt;
(This replaces VDRD since it's a special case of redefinition rules)&lt;br /&gt;
Details: same as the replaced error.
&lt;/p&gt;
&lt;a name="The_choice_of_readable"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;The choice of readable&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;I chose to use only one keyword, when it facts it's used for two separate concepts:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Readable features, making a feature as a query
&lt;/li&gt;&lt;li&gt; readable types, an attribute of types used for additional validity rules.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Ideally, I should have kept the &lt;span style="color: blue"&gt;query&lt;/span&gt; keyword for features, and the &lt;span style="color: blue"&gt;readable&lt;/span&gt; keyword for types. In my first example, the code would look like this:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;A&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;query&lt;/span&gt; some_query: SOME_TYPE&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;some_command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CLIENT&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test (p: &lt;span style="color: blue"&gt;readable&lt;/span&gt; A)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;local&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x: A&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t: SOME_TYPE&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;&lt;p&gt;I think it makes more sense to mark queries with the &lt;span style="color: blue"&gt;query&lt;/span&gt; keyword, and types that can only be used to read the state of an object with &lt;span style="color: blue"&gt;readable&lt;/span&gt;. A counter argument is that, since both concepts are related, it makes sense to use just one keyword for both, and &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING seems a better choice than &lt;span style="color: blue"&gt;query&lt;/span&gt; STRING.
&lt;/p&gt;&lt;p&gt;There is of course the fact that the number of keywords and reserved identifiers should be kept to a minimum. And finally, since legacy code will sometimes use them and therefore must be updated, it's better to just have one identifier name to change. On this subject, I found that &lt;span style="color: blue"&gt;readable&lt;/span&gt; is used as an identifier in some classes of EiffelStudio, but replacing it with a different name wasn't too much of an effort.
&lt;/p&gt;
&lt;a name="Application_to_manifest_strings"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Application to manifest strings&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;A special case that could use the concept of readable types is the basic type STRING. In Eiffel, it is possible to modify manifest strings after creation:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;local&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s: STRING&lt;br /&gt;
&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s&amp;nbsp;:= &lt;span style="color: purple"&gt;"Hello"&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s.append(&lt;span style="color: purple"&gt;", world"&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s.print &lt;span style="color: green"&gt;-- Prints "Hello, world"&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;&lt;p&gt;Some consider this behavior as normal and expected, while others point out that manifest strings look like constants. A solution to reconcile both views could be the offer the option to have manifest string be of type &lt;span style="color: blue"&gt;readable&lt;/span&gt; STRING. This way, programmers that want to deal with constants can set the option and write:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;local&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s: STRING&lt;br /&gt;
&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;create&lt;/span&gt; s.make_empty&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s.append(&lt;span style="color: purple"&gt;"Hello"&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s.append(&lt;span style="color: purple"&gt;", world"&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s.print&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;
&lt;a name="Improper_uses_of_readable_types"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Improper uses of readable types&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The concept of readable types doesn't make all programs foolproof. If a class A make one of the objects of class B it references available to clients,  even if A is readable the B object can be modified. Consider this example:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;B&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;some_command&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;A&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;readable&lt;/span&gt; some_query: B&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CLIENT&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;local&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a: &lt;span style="color: blue"&gt;readable&lt;/span&gt; A&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b: B&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b&amp;nbsp;:= a.some_query&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b.some_command &lt;span style="color: green"&gt;-- Valid since b is of type B, not readable B.&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;&lt;p&gt;We shouldn't change the design of readable types to force some_query in the example above to return a &lt;span style="color: blue"&gt;readable&lt;/span&gt; B. Perhaps A is some factory, and some_query is designed to build new objects, intended to be fully modifiable the client.
&lt;/p&gt;&lt;p&gt;The workaround is to change the code slightly and handle both cases:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;A&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;readable&lt;/span&gt; some_query_readable: &lt;span style="color: blue"&gt;readable&lt;/span&gt; B&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Result&amp;nbsp;:= some_query&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;some_query: B&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;class&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CLIENT&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;feature&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;local&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a: &lt;span style="color: blue"&gt;readable&lt;/span&gt; A&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b: &lt;span style="color: blue"&gt;readable&lt;/span&gt; B&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;do&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b&amp;nbsp;:= a.some_query_readable&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue"&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;&lt;p&gt;Notice how &lt;font face="courier new"&gt;some_query&lt;/font&gt; lost the &lt;span style="color: blue"&gt;readable&lt;/span&gt; tag. It is now only available to clients with unrestricted access. The other version &lt;font face="courier new"&gt;some_query_readable&lt;/font&gt; returns a readable type, as expected, and is therefore safe.
&lt;/p&gt;&lt;p&gt;This pattern is probably pretty common, and leads to some code duplication. If there was a way for the designer of A to indicate that &lt;font face="courier new"&gt;some_query&lt;/font&gt; should return a &lt;span style="color: blue"&gt;readable&lt;/span&gt; B if called on a &lt;span style="color: blue"&gt;readable&lt;/span&gt; A object, all this code should be unnecessary.
&lt;/p&gt;&lt;p&gt;I didn't find a satisfactory syntax without introducing a new keyword. I believe it could be done reusing the &lt;span style="color: blue"&gt;like&lt;/span&gt; keyword:
&lt;/p&gt;&lt;p&gt;&lt;font face="courier new"&gt;
&lt;span style="color: blue"&gt;readable&lt;/span&gt; some_query_readable: B &lt;span style="color: blue"&gt;readable&lt;/span&gt; &lt;span style="color: blue"&gt;like&lt;/span&gt; &lt;span style="color: blue"&gt;Current&lt;/span&gt;&lt;br /&gt;
&lt;/font&gt;
&lt;/p&gt;&lt;p&gt;But that's some verbose and confusing English!
&lt;/p&gt;
&lt;a name="Implementation"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Implementation&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;I have started implementing these changes, based on version 6.6.8.3873 of EiffelStudio (the current official release). Unfortunately, the compiler code is quite complex, and my time limited. I can offer a partial implementation, basically everything that can emit a VURE1 and VURE4 error code, with the exception of the &lt;span style="color: blue"&gt;like&lt;/span&gt; &lt;span style="color: blue"&gt;readable&lt;/span&gt; &lt;span style="color: green"&gt;Feature_Name&lt;/span&gt; syntax.
&lt;/p&gt;&lt;p&gt;It's available for the 32-bits Windows platform at &lt;a href="http://www.filefactory.com/file/b2bh3cc/n/ec.zip" class="external free" title="http://www.filefactory.com/file/b2bh3cc/n/ec.zip"&gt;http://www.filefactory.com/file/b2bh3cc/n/ec.zip&lt;/a&gt; (for a week). Other platforms available on request, if I can fix the compilation issues I ran into lately and that I fixed for Windows.
&lt;/p&gt;&lt;p&gt;If time allows, I hope to realize a complete implementation, although this partial version is sufficient for my own needs.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/T3AlMuQT6SA" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/460#comments</comments>
 <category domain="http://www.eiffelroom.org/taxonomy/term/449">language design</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/483">readable</category>
 <category domain="http://www.eiffelroom.org/tag/types">types</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/460</wfw:commentRss>
 <pubDate>Wed, 28 Jul 2010 00:35:44 +0000</pubDate>
 <dc:creator>dlebansais</dc:creator>
 <guid isPermaLink="false">460 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/460</feedburner:origLink></item>
<item>
 <title>Another Eiffelwish: A cluster concept with restricted visibility (to avoid name clashes).</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/yunVm0NcwUY/457</link>
 <description>&lt;p&gt;The Eiffel language in its current definition has no concept
of namespaces. However in large programs using many
libraries name clashes (i.e. two classes having the same
name) become more and more probable.
&lt;/p&gt;&lt;p&gt;Different Eiffel compilers have resolved the name clashes
with different strategies. This is not satisfactory because
it is not portable. Therefore the Eiffel language should be
extended to resolve potential name clashes of class names in
a manner which is independant from the used compiler.
&lt;/p&gt;&lt;p&gt;The following paper contains a proposal for a cluster
concept which is capable of handling and resolving class
name clashes. All the mechanisms described below are
extensions to the Eiffel language. I.e. with that extensions
the Eiffel language is capable of handling and resolving
name clashes within the language (without the use of some
compiler specific configuration files).
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
The basic concepts are views and clusters. Each class
belongs to exactly one cluster and has exactly a view of
classes which it can use. This makes it possible that a
class does not see all classes of the universe but only a
limited set of classes. Furthermore views have the
possibility to rename some of the classes. A class rename is
local to a view.
&lt;/p&gt;&lt;p&gt;Fully qualified names for classes are introduced as a last
resort to resolve name clashes.
&lt;/p&gt;&lt;p&gt;Having a standardized way to express used clusters within
Eiffel, it is possible to simplify small programs as a side
effect. Complete Eiffel programs can be contained within one
file with all the needed (usually very little to none)
cluster information. A "Hello world" program becomes the
trivial `do print("Hello world%N") end' without any
definition of a root class nor a root procedure and without
any necessary configuration file.
&lt;/p&gt;&lt;p&gt;Therefore the cluster concept makes Eiffel more scalable in
both directions: for small programs and for large programs.
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
Read the detailed paper at &lt;a href="http://tecomp.sourceforge.net/index.php?file=doc/papers/lang/cluster.txt" class="external free" title="http://tecomp.sourceforge.net/index.php?file=doc/papers/lang/cluster.txt"&gt;http://tecomp.sourceforge.net/index.php?file=doc/papers/lang/cluster.txt&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/yunVm0NcwUY" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/457#comments</comments>
 <category domain="http://www.eiffelroom.org/taxonomy/term/505">class name clash</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/503">cluster</category>
 <category domain="http://www.eiffelroom.org/tag/eiffel">Eiffel</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/504">namespace</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/457</wfw:commentRss>
 <pubDate>Tue, 20 Jul 2010 15:12:25 +0000</pubDate>
 <dc:creator>helmut.brandl</dc:creator>
 <guid isPermaLink="false">457 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/457</feedburner:origLink></item>
<item>
 <title>Proofs for Eiffel SW</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/a5TTZvuEEYc/455</link>
 <description>&lt;p&gt;The following paper describes a proof engine for the Eiffel language.
&lt;/p&gt;&lt;p&gt;The proof engine allows the verification of the assertions of Eiffel code. Some language extensions are introduced to express proofs of assertions. Within the proofs the user can enter proof commands and the proof engine can verify the correct use of the proof commands.
&lt;/p&gt;&lt;p&gt;Modularization techniques are introduced to the keep the proofs small and expressive.
&lt;/p&gt;&lt;p&gt;The proof engine has some improved features to do the burdensome work for the user. It is expected that the developer enters the key assertions and proves them and the proof engine can verify the routines using the key assertions.
&lt;/p&gt;&lt;p&gt;In the first chapter the basic concepts are explained.
&lt;/p&gt;&lt;p&gt;The second chapter introduces the commands of the proof engine.
&lt;/p&gt;&lt;p&gt;The third chapter shows how basic properties of boolean expression can be proved with the proof engine.
&lt;/p&gt;&lt;p&gt;The forth chapter applies the proof engine to assertions within the class INTEGER
&lt;/p&gt;&lt;p&gt;The fifth chapter shows how routines can be proved.
&lt;/p&gt;&lt;p&gt;Find the detailed paper at &lt;a href="http://tecomp.sourceforge.net" class="external free" title="http://tecomp.sourceforge.net"&gt;http://tecomp.sourceforge.net&lt;/a&gt; -&amp;gt; white papers -&amp;gt; verification -&amp;gt; proof engine
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/a5TTZvuEEYc" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/455#comments</comments>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/455</wfw:commentRss>
 <pubDate>Wed, 07 Jul 2010 18:42:40 +0000</pubDate>
 <dc:creator>helmut.brandl</dc:creator>
 <guid isPermaLink="false">455 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/455</feedburner:origLink></item>
<item>
 <title>BALIGN - A multi-functional batch sequence alignment tool</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/b0vfooTBytQ/454</link>
 <description>&lt;p&gt;BALIGN is a multi-functional batch sequence alignment tool. It has been used in several bioinformatics applications by &lt;a href="http://www.bioinformatics.itu.edu.tr/" class="external text" title="http://www.bioinformatics.itu.edu.tr/"&gt;İTÜ Computer Engineering Bioinformatics Group&lt;/a&gt;, but its abilities are not limited to biological sequences. Any type of sequence with an ASCII representation and a scoring matrix can be handled by BALIGN. The source code contains generic aligner classes which can be used separately.
&lt;/p&gt;
&lt;table id="toc" class="toc" summary="Contents"&gt;&lt;tr&gt;&lt;td&gt;&lt;div id="toctitle"&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;/div&gt;
&lt;div id="tocbody"&gt;
&lt;ul&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Download"&gt;&lt;span class="tocnumber"&gt;1&lt;/span&gt; &lt;span class="toctext"&gt;Download&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Citation"&gt;&lt;span class="tocnumber"&gt;2&lt;/span&gt; &lt;span class="toctext"&gt;Citation&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Features"&gt;&lt;span class="tocnumber"&gt;3&lt;/span&gt; &lt;span class="toctext"&gt;Features&lt;/span&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Sequence_Alignment"&gt;&lt;span class="tocnumber"&gt;3.1&lt;/span&gt; &lt;span class="toctext"&gt;Sequence Alignment&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Transition_Probability"&gt;&lt;span class="tocnumber"&gt;3.2&lt;/span&gt; &lt;span class="toctext"&gt;Transition Probability&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Compound_Sequence_Alignment_and_Compound_Transition_Probability"&gt;&lt;span class="tocnumber"&gt;3.3&lt;/span&gt; &lt;span class="toctext"&gt;Compound Sequence Alignment and Compound Transition Probability&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Contact"&gt;&lt;span class="tocnumber"&gt;4&lt;/span&gt; &lt;span class="toctext"&gt;Contact&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;a name="Download"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt; Download &lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;You can download BALIGN &lt;a href="https://sourceforge.net/projects/balign/" class="external text" title="https://sourceforge.net/projects/balign/"&gt;here&lt;/a&gt;. There is also an online bioinformatics toolkit including BALIGN for biological sequences &lt;a href="http://160.75.26.175/bioinfo/tools/" class="external text" title="http://160.75.26.175/bioinfo/tools/"&gt;here&lt;/a&gt;. For example scoring matrices to be used in BALIGN, refer &lt;a href="http://sourceforge.net/projects/balign/files/dat/scoring-matrices.zip/download" class="external text" title="http://sourceforge.net/projects/balign/files/dat/scoring-matrices.zip/download"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;a name="Citation"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt; Citation &lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;If you use BALIGN in your research, please cite the following article: 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Aygün, E.; Oommen, B. &amp;amp; Cataltepe, Z. Peptide classification using optimal and information theoretic syntactic modeling Pattern Recognition, Elsevier, 2010
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Features"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt; Features &lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Here is an incomplete list of features that has been implemented in BALIGN so far.
&lt;/p&gt;
&lt;a name="Sequence_Alignment"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt; Sequence Alignment &lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Using BALIGN, you can compute pairwise alignments for given lists of sequences. It can perform both global and local alignment with affine gap penalties, and it can produce bit score, conservation score and percent identity matrices. For more information please see: 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Needleman, S. &amp;amp; Wunsch, C. A general method applicable to the search for similarities in the amino acid sequence of two proteins J. Mol. Biol, 1970, 48, 443-453
&lt;/li&gt;&lt;li&gt; Smith, T. &amp;amp; Waterman, M. Identification of common molecular subsequences J. Mol. Bwl, 1981, 147, 195-197
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Transition_Probability"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt; Transition Probability &lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Sequence transition probability computation is a fairly new and robust method of sequence comparison. It is formalized by Oommen and Kashyap in 1998 and applied to the peptide classification problem successfully by Aygün, Oommen and Cataltepe in 2009. You can use BALIGN to compute logarithmic transition probability matrices for given lists of sequences. For more information please see: 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Oommen, B. &amp;amp; Kashyap, R. A formal theory for optimal and information theoretic syntactic pattern recognition Pattern Recognition, Elsevier, 1998, 31, 1159-1177
&lt;/li&gt;&lt;li&gt; Aygün, E.; Oommen, B. &amp;amp; Cataltepe, Z. Peptide classification using optimal and information theoretic syntactic modeling Pattern Recognition, Elsevier, 2010
&lt;/li&gt;&lt;li&gt; Aygün, E.; Oommen, B. &amp;amp; Cataltepe, Z. On utilizing optimal and information theoretic syntactic modeling for peptide classification Pattern Recognition in Bioinformatics, IAPR, 2009
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Compound_Sequence_Alignment_and_Compound_Transition_Probability"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt; Compound Sequence Alignment and Compound Transition Probability &lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;In 2000, Wallqvist et al. showed that aligning amino acid sequences along with secondary structures increases the classification performance significantly. Compound versions of alignment score and transition probability algorithms let you combine primary structure and secondary structure information in a single computation to generate more informative similarity scores. For more information please see: 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Wallqvist, A.; Fukunishi, Y.; Murphy, L.; Fadel, A. &amp;amp; Levy, R. Iterative sequence/secondary structure search for protein homologs: comparison with amino acid sequence alignments and application to fold recognition in genome databases. Bioinformatics, Oxford, 2000, 16, 988
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Contact"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt; Contact &lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;BALIGN is implemented by &lt;a href="http://www2.itu.edu.tr/~aygunes/" class="external text" title="http://www2.itu.edu.tr/~aygunes/"&gt;Eser Aygün&lt;/a&gt;.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/b0vfooTBytQ" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/454#comments</comments>
 <category domain="http://www.eiffelroom.org/taxonomy/term/502">batch</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/494">global alignment</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/501">kashyap</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/495">local alignment</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/496">needleman</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/500">oommen</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/492">sequence alignment</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/493">sequence analysis</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/498">smith</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/499">waterman</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/497">wunsch</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/454</wfw:commentRss>
 <pubDate>Thu, 01 Jul 2010 10:23:17 +0000</pubDate>
 <dc:creator>eser.aygun</dc:creator>
 <guid isPermaLink="false">454 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/454</feedburner:origLink></item>
<item>
 <title>BALIGN</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/1_5SQ-V4Ri8/453</link>
 <description>&lt;div class="field field-type-text field-field-short-description"&gt;
      &lt;div class="field-label"&gt;Short Description:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    Multi-functional batch sequence aligner incorporating Needleman-Wunsch, Smith-Waterman and Oommen-Kashyap algorithms along with compound alignment of secondary sequences.        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;BALIGN is a multi-functional batch sequence alignment tool. It has been used in several bioinformatics applications by &lt;a href="http://www.bioinformatics.itu.edu.tr/" class="external text" title="http://www.bioinformatics.itu.edu.tr/"&gt;İTÜ Computer Engineering Bioinformatics Group&lt;/a&gt;, but its abilities are not limited to biological sequences. Any type of sequence with an ASCII representation and a scoring matrix can be handled by BALIGN. The source code contains generic aligner classes which can be used separately.
&lt;/p&gt;
&lt;table id="toc" class="toc" summary="Contents"&gt;&lt;tr&gt;&lt;td&gt;&lt;div id="toctitle"&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;/div&gt;
&lt;div id="tocbody"&gt;
&lt;ul&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Download"&gt;&lt;span class="tocnumber"&gt;1&lt;/span&gt; &lt;span class="toctext"&gt;Download&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Citation"&gt;&lt;span class="tocnumber"&gt;2&lt;/span&gt; &lt;span class="toctext"&gt;Citation&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Features"&gt;&lt;span class="tocnumber"&gt;3&lt;/span&gt; &lt;span class="toctext"&gt;Features&lt;/span&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Sequence_Alignment"&gt;&lt;span class="tocnumber"&gt;3.1&lt;/span&gt; &lt;span class="toctext"&gt;Sequence Alignment&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Transition_Probability"&gt;&lt;span class="tocnumber"&gt;3.2&lt;/span&gt; &lt;span class="toctext"&gt;Transition Probability&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Compound_Sequence_Alignment_and_Compound_Transition_Probability"&gt;&lt;span class="tocnumber"&gt;3.3&lt;/span&gt; &lt;span class="toctext"&gt;Compound Sequence Alignment and Compound Transition Probability&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Contact"&gt;&lt;span class="tocnumber"&gt;4&lt;/span&gt; &lt;span class="toctext"&gt;Contact&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;a name="Download"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt; Download &lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;You can download BALIGN &lt;a href="https://sourceforge.net/projects/balign/" class="external text" title="https://sourceforge.net/projects/balign/"&gt;here&lt;/a&gt;. There is also an online bioinformatics toolkit including BALIGN for biological sequences &lt;a href="http://160.75.26.175/bioinfo/tools/" class="external text" title="http://160.75.26.175/bioinfo/tools/"&gt;here&lt;/a&gt;. For example scoring matrices to be used in BALIGN, refer &lt;a href="http://sourceforge.net/projects/balign/files/dat/scoring-matrices.zip/download" class="external text" title="http://sourceforge.net/projects/balign/files/dat/scoring-matrices.zip/download"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;a name="Citation"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt; Citation &lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;If you use BALIGN in your research, please cite the following article: 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Aygün, E.; Oommen, B. &amp;amp; Cataltepe, Z. Peptide classification using optimal and information theoretic syntactic modeling Pattern Recognition, Elsevier, 2010
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Features"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt; Features &lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Here is an incomplete list of features that has been implemented in BALIGN so far.
&lt;/p&gt;
&lt;a name="Sequence_Alignment"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt; Sequence Alignment &lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Using BALIGN, you can compute pairwise alignments for given lists of sequences. It can perform both global and local alignment with affine gap penalties, and it can produce bit score, conservation score and percent identity matrices. For more information please see: 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Needleman, S. &amp;amp; Wunsch, C. A general method applicable to the search for similarities in the amino acid sequence of two proteins J. Mol. Biol, 1970, 48, 443-453
&lt;/li&gt;&lt;li&gt; Smith, T. &amp;amp; Waterman, M. Identification of common molecular subsequences J. Mol. Bwl, 1981, 147, 195-197
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Transition_Probability"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt; Transition Probability &lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Sequence transition probability computation is a fairly new and robust method of sequence comparison. It is formalized by Oommen and Kashyap in 1998 and applied to the peptide classification problem successfully by Aygün, Oommen and Cataltepe in 2009. You can use BALIGN to compute logarithmic transition probability matrices for given lists of sequences. For more information please see: 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Oommen, B. &amp;amp; Kashyap, R. A formal theory for optimal and information theoretic syntactic pattern recognition Pattern Recognition, Elsevier, 1998, 31, 1159-1177
&lt;/li&gt;&lt;li&gt; Aygün, E.; Oommen, B. &amp;amp; Cataltepe, Z. Peptide classification using optimal and information theoretic syntactic modeling Pattern Recognition, Elsevier, 2010
&lt;/li&gt;&lt;li&gt; Aygün, E.; Oommen, B. &amp;amp; Cataltepe, Z. On utilizing optimal and information theoretic syntactic modeling for peptide classification Pattern Recognition in Bioinformatics, IAPR, 2009
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Compound_Sequence_Alignment_and_Compound_Transition_Probability"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt; Compound Sequence Alignment and Compound Transition Probability &lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;In 2000, Wallqvist et al. showed that aligning amino acid sequences along with secondary structures increases the classification performance significantly. Compound versions of alignment score and transition probability algorithms let you combine primary structure and secondary structure information in a single computation to generate more informative similarity scores. For more information please see: 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Wallqvist, A.; Fukunishi, Y.; Murphy, L.; Fadel, A. &amp;amp; Levy, R. Iterative sequence/secondary structure search for protein homologs: comparison with amino acid sequence alignments and application to fold recognition in genome databases. Bioinformatics, Oxford, 2000, 16, 988
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Contact"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt; Contact &lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;BALIGN is implemented by &lt;a href="http://www2.itu.edu.tr/~aygunes/" class="external text" title="http://www2.itu.edu.tr/~aygunes/"&gt;Eser Aygün&lt;/a&gt;.
&lt;/p&gt;&lt;fieldset class="fieldgroup group-dependencies"&gt;&lt;div class="field field-type-nodereference field-field-dependencies"&gt;
      &lt;div class="field-label"&gt;Dependencies:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="/library/eiffelbase"&gt;EiffelBase&lt;/a&gt;        &lt;/div&gt;
              &lt;div class="field-item even"&gt;
                    &lt;a href="/library/gobo_eiffel_structure"&gt;Gobo Eiffel Structure&lt;/a&gt;        &lt;/div&gt;
              &lt;div class="field-item odd"&gt;
                    &lt;a href="/library/eiffeltime"&gt;EiffelTime&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;fieldset class="fieldgroup group-links"&gt;&lt;div class="field field-type-link field-field-url"&gt;
      &lt;div class="field-label"&gt;URL:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="http://balign.sourceforge.net/"&gt;http://balign.sourceforge.net/&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;div class="field field-type-link field-field-download"&gt;
      &lt;div class="field-label"&gt;Download:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="https://sourceforge.net/projects/balign/"&gt;https://sourceforge.net/projects/balign/&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;div class="field field-type-link field-field-documentation"&gt;
      &lt;div class="field-label"&gt;Documentation:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="http://balign.sourceforge.net/"&gt;http://balign.sourceforge.net/&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/1_5SQ-V4Ri8" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/453#comments</comments>
 <category domain="http://www.eiffelroom.org/taxonomy/term/502">batch</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/494">global alignment</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/501">kashyap</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/495">local alignment</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/496">needleman</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/500">oommen</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/492">sequence alignment</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/493">sequence analysis</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/498">smith</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/499">waterman</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/497">wunsch</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/4">Linux</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/5">Mac</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/6">Windows</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/106">Gnu General Public License (GPL)</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/453</wfw:commentRss>
 <pubDate>Thu, 01 Jul 2010 10:18:45 +0000</pubDate>
 <dc:creator>eser.aygun</dc:creator>
 <guid isPermaLink="false">453 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/453</feedburner:origLink></item>
<item>
 <title>My three Eiffelwishes, part 2: Unicode</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/h-aZMNdWFV4/452</link>
 <description>&lt;p&gt;If English is your primary language, you've probably never used characters from a foreign language in Eiffel source files. Perhaps you'll be interested in this little experiment then: create a classic "Hello, world" program and run it, then replace the string with its translation in, say, arabic, and run it again.
&lt;/p&gt;&lt;p&gt;The classic "Hello, world" program:
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/447" class="image" title="Image:HelloWorld-English"&gt;&lt;img alt="Image:HelloWorld-English" src="/files/images/hw1.png" border="0" width="331" height="341" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;Running the program:
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/448" class="image" title="Image:HelloWorld-English-Running"&gt;&lt;img alt="Image:HelloWorld-English-Running" src="/files/images/hw0.png" border="0" width="370" height="90" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;The modifed program with a translated string:
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/449" class="image" title="Image:HelloWorld-Arabic"&gt;&lt;img alt="Image:HelloWorld-Arabic" src="/files/images/hw2.png" border="0" width="363" height="344" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;Running the modified program:
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/450" class="image" title="Image:HelloWorld-Arabic-Running"&gt;&lt;img alt="Image:HelloWorld-Arabic-Running" src="/files/images/hw3.png" border="0" width="370" height="90" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;As you can see, the result is not exactly the expected one. The reason is simple: EiffelStudio doesn't store characters as unicode, but rather in ASCII format. What you see in the modified text code is a display artifact, and not the string as stored in the source file. Just close and reopen the class text to make this clear. Arabic characters have been lost.
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/451" class="image" title="Image:HelloWorld-QuestionMarks"&gt;&lt;img alt="Image:HelloWorld-QuestionMarks" src="/files/images/hw4.png" border="0" width="357" height="352" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;table id="toc" class="toc" summary="Contents"&gt;&lt;tr&gt;&lt;td&gt;&lt;div id="toctitle"&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;/div&gt;
&lt;div id="tocbody"&gt;
&lt;ul&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Unicode"&gt;&lt;span class="tocnumber"&gt;1&lt;/span&gt; &lt;span class="toctext"&gt;Unicode&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Benefits_of_unicode"&gt;&lt;span class="tocnumber"&gt;2&lt;/span&gt; &lt;span class="toctext"&gt;Benefits of unicode&lt;/span&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Comments"&gt;&lt;span class="tocnumber"&gt;2.1&lt;/span&gt; &lt;span class="toctext"&gt;Comments&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Translated_strings"&gt;&lt;span class="tocnumber"&gt;2.2&lt;/span&gt; &lt;span class="toctext"&gt;Translated strings&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Operators"&gt;&lt;span class="tocnumber"&gt;2.3&lt;/span&gt; &lt;span class="toctext"&gt;Operators&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Existing_support"&gt;&lt;span class="tocnumber"&gt;3&lt;/span&gt; &lt;span class="toctext"&gt;Existing support&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Solutions"&gt;&lt;span class="tocnumber"&gt;4&lt;/span&gt; &lt;span class="toctext"&gt;Solutions&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;a name="Unicode"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Unicode&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Unicode" class="external text" title="http://en.wikipedia.org/wiki/Unicode"&gt;Unicode&lt;/a&gt; is a standard for storing and manipulating characters from pretty much all languages around the world, including ancient languages that appear only in old texts. The first version of the standard was published in 1991.
&lt;/p&gt;&lt;p&gt;Unicode isn't a file format. To store unicode text, an editor has several options, but ASCII isn't one of them and for this reason editors that manipulate ASCII files will not read or write unicode text correctly. This is what's happening with EiffelStudio.
&lt;/p&gt;
&lt;a name="Benefits_of_unicode"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Benefits of unicode&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;If EiffelStudio could fully support unicode, there would be several benefits for programmers.
&lt;/p&gt;
&lt;a name="Comments"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Comments&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;A comment written with characters that don't belong to the ASCII set can be stored and read properly by people using the same language, however it becomes unreadable for foreign reader. This is because these characters are encoded in a format that depends on the language used (if you're unfamiliar with the concept of code page, have a look at &lt;a href="http://en.wikipedia.org/wiki/Code_page" class="external text" title="http://en.wikipedia.org/wiki/Code_page"&gt;this article&lt;/a&gt; on Wikipedia).
Unicode source files would not have this problem, all comments would be readable regardless of the default language chosen by the reader.
&lt;/p&gt;
&lt;a name="Translated_strings"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Translated strings&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Many programs offer a choice between languages to use when installing or executing. This makes them more accessible to users unfamiliar with English. There is unfortunately no easy way to write strings and their translated versions in Eiffel program. For instance, programs targetting windows must create resource (.rc) files that aren't directly usable, and these .rc files aren't unicode.
Unicode source files would offer the possibility to directly create and initialize localized strings, assuming proper classes become available to support that.
&lt;/p&gt;
&lt;a name="Operators"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Operators&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Free operators could be single unicode characters, like ∑ or ∩. Existing character combinations could be better displayed with a single unicode character:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; ← instead of&amp;nbsp;:=
&lt;/li&gt;&lt;li&gt; «&amp;nbsp;and&amp;nbsp;» instead of "[ and ]" (the most commonly used manifest string markers)
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Existing_support"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Existing support&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;EiffelStudio already includes classes to manipulate unicode strings, in the "encoding" library. However, each programmer must implement the code to read and write files in one of the unicode formats, convert the string and then use it.
In practice, it's not hard to write applications that are properly localized, and use unicode strings. But it could be easier with direct support of unicode in the source code.
&lt;/p&gt;
&lt;a name="Solutions"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Solutions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;A simple mechanism could be use to allow unicode characters in source files while remaining backward compatible. Currently, each file can be considered as using an informal code page that depends on the language used by the programmer, in strings and comments. By adding a note associated to the class, this code page can be made explicit:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;note&lt;/span&gt;
	&lt;span style="color: #008000; font-style: italic;"&gt;-- Comments and strings are in French.&lt;/span&gt;
	code_page&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;span style="color: #0080A0;"&gt;&amp;quot;fr-FR&amp;quot;&lt;/span&gt;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	SOME_CLASS&lt;/pre&gt;&lt;/div&gt;
This can be done automatically with tools.
&lt;/p&gt;&lt;p&gt;One of the code page can be &lt;a href="http://en.wikipedia.org/wiki/Utf-8" class="external text" title="http://en.wikipedia.org/wiki/Utf-8"&gt;UTF-8&lt;/a&gt;. This format allows encoding of any unicode character while remaining compatible with most of the ASCII characters. A source file encoded using UTF-8 with only English strings and comments will be identical to its ASCII counterpart.
Then EiffelStudio can have a setting indicating which code page to use by default, one of them being UTF-8. This enables everyone to keep their source code unchanged, or move to UTF-8 while keeping their old code unchanged if they add the note.
&lt;/p&gt;&lt;p&gt;With this mechanism, new source files containing strings and comment in UTF-8 are compatible with versions of EiffelStudio not supporting unicode, old source files remain compatible with new versions of EiffelStudio, and if old/new files are mixed, they can all be displayed correctly thanks to the note clause.
&lt;/p&gt;&lt;p&gt;There remains the problem of free operators and other symbols used in the language. A solution to this problem consists of encoding unicode characters using valid characters for free operators, for instance:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Encoding ← with&amp;nbsp;:=
&lt;/li&gt;&lt;li&gt; Encoding «&amp;nbsp;with "[ and&amp;nbsp;» with ]"
&lt;/li&gt;&lt;li&gt; Encoding ∑ with |+|
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Since the set of ASCII characters for free operators is limited, if we don't want long sequences it would be a good idea to restrict unicode characters usable for free operators  in a first implementation, then specify how they are encoded. If this becomes a standard, then every sequence of characters used for free operators today can be displayed using its unicode counterpart. I believe the Eiffel community is small enough to agree on a common representation of unicode free operators, and to modify existing source code to make them look better if they want to.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/h-aZMNdWFV4" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/452#comments</comments>
 <category domain="http://www.eiffelroom.org/tag/unicode">Unicode</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/452</wfw:commentRss>
 <pubDate>Tue, 29 Jun 2010 12:06:47 +0000</pubDate>
 <dc:creator>dlebansais</dc:creator>
 <guid isPermaLink="false">452 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/452</feedburner:origLink></item>
<item>
 <title>Eiffel Arbitrary Precision Number Library</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/ZVoyhPm53Dw/446</link>
 <description>&lt;div class="field field-type-text field-field-short-description"&gt;
      &lt;div class="field-label"&gt;Short Description:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    A pure-Eiffel arbitrary precision integer library based on GMP.        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;fieldset class="fieldgroup group-dependencies"&gt;&lt;div class="field field-type-nodereference field-field-dependencies"&gt;
      &lt;div class="field-label"&gt;Dependencies:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="/library/eiffelbase"&gt;EiffelBase&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;fieldset class="fieldgroup group-links"&gt;&lt;div class="field field-type-link field-field-url"&gt;
      &lt;div class="field-label"&gt;URL:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="http://code.google.com/p/eapml/"&gt;http://code.google.com/p/eapml/&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;div class="field field-type-link field-field-download"&gt;
      &lt;div class="field-label"&gt;Download:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="http://eapml.googlecode.com/files/eapml.7z"&gt;http://eapml.googlecode.com/files/eapml.7z&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;div class="field field-type-link field-field-documentation"&gt;
      &lt;div class="field-label"&gt;Documentation:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="http://code.google.com/p/eapml/wiki/FAQ"&gt;http://code.google.com/p/eapml/wiki/FAQ&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/ZVoyhPm53Dw" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/446#comments</comments>
 <category domain="http://www.eiffelroom.org/taxonomy/term/491">Eiffel bignumber</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/4">Linux</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/5">Mac</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/6">Windows</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/108">BSD License</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/446</wfw:commentRss>
 <pubDate>Thu, 17 Jun 2010 16:46:37 +0000</pubDate>
 <dc:creator>clemahieu</dc:creator>
 <guid isPermaLink="false">446 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/446</feedburner:origLink></item>
<item>
 <title>My three Eiffelwishes, part 1: enums</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/kFtYE6Oh1BA/445</link>
 <description>&lt;p&gt;For people that routinely switch between programming languages like me, it's temping to try to get the best of all and mix language features. The most common example (and likely the most researched) being to add assertions to C++ or C# classes, for instance.
&lt;/p&gt;&lt;p&gt;While working on Eiffel code, I repeatedly found that my code could be simpler, and better, if I had access to some features of C-like languages. Today I'd like to talk about one of them: enumerations.
&lt;/p&gt;
&lt;table id="toc" class="toc" summary="Contents"&gt;&lt;tr&gt;&lt;td&gt;&lt;div id="toctitle"&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;/div&gt;
&lt;div id="tocbody"&gt;
&lt;ul&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Previous_work"&gt;&lt;span class="tocnumber"&gt;1&lt;/span&gt; &lt;span class="toctext"&gt;Previous work&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#What.27s_an_enum.3F"&gt;&lt;span class="tocnumber"&gt;2&lt;/span&gt; &lt;span class="toctext"&gt;What's an enum?&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Expectations"&gt;&lt;span class="tocnumber"&gt;3&lt;/span&gt; &lt;span class="toctext"&gt;Expectations&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Inheritance"&gt;&lt;span class="tocnumber"&gt;4&lt;/span&gt; &lt;span class="toctext"&gt;Inheritance&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#The_new_syntax"&gt;&lt;span class="tocnumber"&gt;5&lt;/span&gt; &lt;span class="toctext"&gt;The new syntax&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Creation"&gt;&lt;span class="tocnumber"&gt;6&lt;/span&gt; &lt;span class="toctext"&gt;Creation&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Conclusion"&gt;&lt;span class="tocnumber"&gt;7&lt;/span&gt; &lt;span class="toctext"&gt;Conclusion&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;a name="Previous_work"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Previous work&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;There is an article on enums and how to implement them with the current design of Eiffel at &lt;a href="http://dev.eiffel.com/Enums_in_Eiffel" class="external text" title="http://dev.eiffel.com/Enums_in_Eiffel"&gt;this page&lt;/a&gt;. While the code could use some improvement with the recent addition of void safety and CAPs, it's a start. In particular, it introduces the necessary features that type-safety and invariants require.
It doesn't, however, provide a good solution if the goal is to have simpler code. The &lt;b&gt;ENUM&lt;/b&gt; class, for instance, expects a generic parameter, and some code is duplicated. Moreover, the author doesn't investigate improvements that would require a change in the language.
&lt;/p&gt;
&lt;a name="What.27s_an_enum.3F"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;What's an enum?&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;An enumeration can be defined as a set of named entities, sometimes associated to a known numerical value. Typical examples are &lt;i&gt;club&lt;/i&gt;, &lt;i&gt;diamond&lt;/i&gt;, &lt;i&gt;heart&lt;/i&gt; and &lt;i&gt;spade&lt;/i&gt;, each a playing card suit, or &lt;i&gt;jack&lt;/i&gt;, &lt;i&gt;queen&lt;/i&gt;, &lt;i&gt;king&lt;/i&gt; and &lt;i&gt;ace&lt;/i&gt;, associated to values 1, 2, 3 and 4 respectively (some readers might have recognized common values used in contract bridge).
&lt;/p&gt;&lt;p&gt;An enumeration is a type. And, therefore, eventually a class. Following examples above, we could consider classes &lt;b&gt;SUIT&lt;/b&gt; and &lt;b&gt;HONOUR&lt;/b&gt;, and it would allow us to write code such as:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	PLAYING_CARD
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt;
	suit&lt;span style="color: #600000;"&gt;:&lt;/span&gt; SUIT
	honour&lt;span style="color: #600000;"&gt;:&lt;/span&gt; HONOUR
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;The definition and behavior of &lt;b&gt;SUIT&lt;/b&gt; and &lt;b&gt;HONOUR&lt;/b&gt; is the purpose of this post.
&lt;/p&gt;
&lt;a name="Expectations"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Expectations&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;How should we use enums and how do they make code simpler? It should be possible to use them in place of numerical constants.
&lt;/p&gt;&lt;p&gt;In conditional statements:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;if&lt;/span&gt; suit &lt;span style="color: #600000;"&gt;=&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;SUIT&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;.&lt;span style="color: #000060;"&gt;club&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;then&lt;/span&gt;
...
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
In inspect statements:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;inspect&lt;/span&gt; suit
&lt;span style="color: #0600FF; font-weight: bold;"&gt;when&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;SUIT&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;.&lt;span style="color: #000060;"&gt;club&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;then&lt;/span&gt;
...
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
And, of course, assignments:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;suit &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;SUIT&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;.&lt;span style="color: #000060;"&gt;club&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;Note that, in the code above, no actual numerical value is expected. For all we know, the internal representation of {SUIT}.club is a reference and it varies from one execution of the program to the other. Also, while assigning an enum value with an associated constant to a numerical type is possible, the other way around is prohibited.
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;i&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
i &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; honour
honour &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; i &lt;span style="color: #008000; font-style: italic;"&gt;-- Prohibited&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;It is debatable whether an enum type should have a default initialization value, like other base types do. For some enums there might be an obvious candidate, but for our &lt;b&gt;SUIT&lt;/b&gt; example none of the 4 values stands above others.
&lt;/p&gt;&lt;p&gt;There is however an important property of enums that can be used or ignored without interfering with the program: values can be ordered, typically in the order they appear in the definition of the enum class. In practice, this would mean that &lt;b&gt;SUIT&lt;/b&gt; and &lt;b&gt;HONOUR&lt;/b&gt; inherit from &lt;b&gt;COMPARABLE&lt;/b&gt;, and that the following statements are valid:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;if&lt;/span&gt; honour &lt;span style="color: #600000;"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;HONOUR&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;.&lt;span style="color: #000060;"&gt;ace&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;then&lt;/span&gt; ... &lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inspect&lt;/span&gt; honour
&lt;span style="color: #0600FF; font-weight: bold;"&gt;when&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;HONOUR&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;.&lt;span style="color: #000060;"&gt;jack&lt;/span&gt;..&lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;HONOUR&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;.&lt;span style="color: #000060;"&gt;king&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;then&lt;/span&gt;
...
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;It should be possible to enumerate through values as well. For the purpose of displaying their names, or associated constants for instance. The code below shows how to achieve that:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;across&lt;/span&gt; suit.&lt;span style="color: #000060;"&gt;items&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; value
&lt;span style="color: #0600FF; font-weight: bold;"&gt;loop&lt;/span&gt;
	print&lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;value.&lt;span style="color: #000060;"&gt;item&lt;/span&gt;.&lt;span style="color: #000060;"&gt;out&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Print the value name&lt;/span&gt;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;Last but not least, an attribute of an enum type can only be assigned one of the values in the enum declaration, and at any time it cannot contain anything else than these values. This will be the default class invariant.
&lt;/p&gt;&lt;p&gt;The question remains whether enums should have implicit numeric constants associated to each values. Such constants are needed when:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; The program is connected to external components, like C code where enum values are fixed, known constants
&lt;/li&gt;&lt;li&gt; &lt;i&gt;out&lt;/i&gt;, &lt;i&gt;print&lt;/i&gt; etc. feature are called for enum attributes, to obtain printable representations
&lt;/li&gt;&lt;li&gt; Values are associated to specific constants for a purpose, in &lt;b&gt;HONOUR&lt;/b&gt; for instance where constants represent a number of points to use during a bid.
&lt;/li&gt;&lt;li&gt; Attributes of enum type are serialized
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Perhaps the best approach is to leave the specification of the constants open, and just require that the internal representation of enum values be consistent with the cases listed above. At worst, it means that when interfacing with other languages, the compiler must require all values to have explicit associated constants. It would however be preferable to have a smarter compiler, capable of assigning the proper constants to enum values depending on the language it interfaces with.
&lt;/p&gt;&lt;p&gt;In any case, if the value is associated to a numerical constant, this constant should be available to code through conversion.
&lt;/p&gt;
&lt;a name="Inheritance"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Inheritance&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Like any class in Eiffel, an enum can have descendants, and these should be able to redefine features, but also add, remove or rename values. The standard syntax can be used to rename or remove values, however the case of addition must be carefully considered, since it can break the order defined by the parent.
&lt;/p&gt;&lt;p&gt;Descendants can also add attributes. What is the semantic, then, of an assignment like suit&amp;nbsp;:= {SUIT}.club, or the honour &amp;lt; {HONOUR}.ace expression? The simple answer is that {SUIT}.club and {HONOUR}.ace are objects of type SUIT and HONOUR, and these classes must have either default values, or redefine &lt;b&gt;default_create&lt;/b&gt; such that {SUIT}.club and {HONOUR}.ace can be created by the compiler.
&lt;/p&gt;&lt;p&gt;In the case of the honour &amp;lt; {HONOUR}.ace expression, if is_less is not redefined, then &lt;b&gt;HONOUR&lt;/b&gt; is partially ordered around its enum values, and other attributes are ignored during expression evaluation.
&lt;/p&gt;
&lt;a name="The_new_syntax"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;The new syntax&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;It is now time to describe my new suggested syntax, and see how it fits into Eiffel.
&lt;/p&gt;&lt;p&gt;First of all, all user-defined enums can inherit from the system &lt;b&gt;ENUM&lt;/b&gt; class, inheriting itself from &lt;b&gt;COMPARABLE&lt;/b&gt; and equipped with built-in features to ensure that values are kept ordered, to enforce the invariant, and provide representations for names and associated constants.
&lt;/p&gt;&lt;p&gt;The &lt;b&gt;ENUM&lt;/b&gt; class would have the following contract:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;expanded&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	ENUM
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+comparable&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;COMPARABLE&lt;/span&gt;&lt;/a&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;redefine&lt;/span&gt;
			is_less
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+hashable&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;HASHABLE&lt;/span&gt;&lt;/a&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;undefine&lt;/span&gt;
			is_equal
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;redefine&lt;/span&gt;
			hash_code
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Implementation of deferred&lt;/span&gt;
&amp;nbsp;
	is_less &lt;span style="color: #0600FF; font-weight: bold;"&gt;alias&lt;/span&gt; &lt;span style="color: #0080A0;"&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;other&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;like&lt;/span&gt; &lt;span style="color: #800080;"&gt;Current&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+boolean&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;BOOLEAN&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;external&lt;/span&gt;
		&lt;span style="color: #0080A0;"&gt;&amp;quot;built_in&amp;quot;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	hash_code&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;external&lt;/span&gt;
		&lt;span style="color: #0080A0;"&gt;&amp;quot;built_in&amp;quot;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Set&lt;/span&gt;
&amp;nbsp;
	items&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+list&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;LIST&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;like&lt;/span&gt; &lt;span style="color: #800080;"&gt;Current&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#93;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;external&lt;/span&gt;
		&lt;span style="color: #0080A0;"&gt;&amp;quot;built_in&amp;quot;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;invariant&lt;/span&gt;
	&lt;span style="color: #008000; font-style: italic;"&gt;-- Consistency is enforced by the compiler&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;The &lt;b&gt;ENUM&lt;/b&gt; class is simply an enum with no values, and each user-defined enum simply add new values thanks to an additional clause in the inheritance part:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	SUIT
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	ENUM
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;unique&lt;/span&gt;
			club, diamond, heart, spade
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;And voilà!
&lt;/p&gt;&lt;p&gt;Values order is the order of declaration in the &lt;b&gt;unique&lt;/b&gt; clause. Everything else is provided by the &lt;b&gt;ENUM&lt;/b&gt; class and fairly simple new rules for handling enum values in various part of the language: expressions, the inspect statement, conversions, assignment and so on.
&lt;/p&gt;&lt;p&gt;Values can be given an associated numerical constant:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	HONOUR
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	ENUM
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;unique&lt;/span&gt;
			jack &lt;span style="color: #600000;"&gt;=&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;1&lt;/span&gt;, queen &lt;span style="color: #600000;"&gt;=&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;2&lt;/span&gt;, king &lt;span style="color: #600000;"&gt;=&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;3&lt;/span&gt;, ace &lt;span style="color: #600000;"&gt;=&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;4&lt;/span&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;Descendants can add values to an existing set:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	POWER_CARD
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	ENUM
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;unique&lt;/span&gt;
			joker &lt;span style="color: #600000;"&gt;=&lt;/span&gt; 0
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
	HONOUR
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;In this example, the value order in the &lt;b&gt;POWER_CARD&lt;/b&gt; enum class is: &lt;i&gt;joker&lt;/i&gt;, then all values from &lt;b&gt;HONOUR&lt;/b&gt;. To make the new &lt;i&gt;joker&lt;/i&gt; card the last value, change the order of inherited classes declaration:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	POWER_CARD
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	HONOUR
	ENUM
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;unique&lt;/span&gt;
			joker &lt;span style="color: #600000;"&gt;=&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;5&lt;/span&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;Since &lt;b&gt;HONOUR&lt;/b&gt; inherits from &lt;b&gt;ENUM&lt;/b&gt;, the above declaration could be made even simpler:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	HONOUR
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;unique&lt;/span&gt;
			joker &lt;span style="color: #600000;"&gt;=&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;5&lt;/span&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;It is interesting to note that the compiler should make sure that the declaration order is compatible with the natural order of associated constants, and that numerical constants are preserved by inheritance. For instance, the following declaration should be prohibited:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	HONOUR
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;unique&lt;/span&gt;
			joker &lt;span style="color: #600000;"&gt;=&lt;/span&gt; 0
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;Other languages may allow enums to have unordered constants, but my personal feeling is that it's a recipe for disaster, and the symptom of a design error.
&lt;/p&gt;&lt;p&gt;The &lt;b&gt;unique&lt;/b&gt; clause can be used in conjunction with other clauses in the inheritance part of the class declaration:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	JOKE_CARD
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	HONOUR
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			jack &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; jack_the_mischevious,
			queen &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; queen_the_sad,
			king &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; king_the_deceived,
			ace &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; ace_for_nothing,
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;unique&lt;/span&gt;
			joker_smiling_face
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;redefine&lt;/span&gt;
			is_less
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt;
&amp;nbsp;
	is_less &lt;span style="color: #0600FF; font-weight: bold;"&gt;alias&lt;/span&gt; &lt;span style="color: #0080A0;"&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;other&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;like&lt;/span&gt; &lt;span style="color: #800080;"&gt;Current&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+boolean&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;BOOLEAN&lt;/span&gt;&lt;/a&gt;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Reverse the order and make the joker the less powerful card&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;Result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;not&lt;/span&gt; &lt;span style="color: #800080;"&gt;Precursor&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;other&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;a name="Creation"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Creation&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;With this syntax, no creation procedure can be written that can initialize the value. Therefore, either enumeration types are initialized to a standardized default value, like the first value, or they are not initialized at all until client classes assign them a value. The later behavior is similar to references in a void-safe environment.
&lt;/p&gt;&lt;p&gt;What if the enum class has other attributes? A &lt;b&gt;default_create&lt;/b&gt; redefinition can handle this case, as the example below demonstrates:
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	SUIT
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	ENUM
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;unique&lt;/span&gt;
			club, diamond, heart, spade
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;redefine&lt;/span&gt;
			default_create
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	default_create
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Initialization&lt;/span&gt;
&amp;nbsp;
	default_create
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		manufacturer &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; &lt;span style="color: #0080A0;"&gt;&amp;quot;none&amp;quot;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Status&lt;/span&gt;
&amp;nbsp;
	manufacturer&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
Here, the assignment suit&amp;nbsp;:= {SUIT}.club still makes sense and will reset all additional attributes of 'suit' to their default value, i.e. manufacturer to "none".
&lt;/p&gt;
&lt;a name="Conclusion"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Conclusion&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;I think enumeration types are a much needed feature in Eiffel. It allows simpler, easier to read code. I suggested a syntax that makes both the declaration and use of enums a simple task. While I haven't tested an actual implementation of the new &lt;b&gt;unique&lt;/b&gt; clause, I hope something similar will make it in the language, eventually.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/kFtYE6Oh1BA" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/445#comments</comments>
 <category domain="http://www.eiffelroom.org/taxonomy/term/470">class</category>
 <category domain="http://www.eiffelroom.org/tag/eiffel">Eiffel</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/489">enumeration</category>
 <category domain="http://www.eiffelroom.org/tag/inheritance">inheritance</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/490">unique</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/445</wfw:commentRss>
 <pubDate>Sun, 13 Jun 2010 13:04:14 +0000</pubDate>
 <dc:creator>dlebansais</dc:creator>
 <guid isPermaLink="false">445 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/445</feedburner:origLink></item>
<item>
 <title>eMPC</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/izAaqVvFOSs/444</link>
 <description>&lt;div class="field field-type-text field-field-short-description"&gt;
      &lt;div class="field-label"&gt;Short Description:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    Eiffel interface to the &amp;quot;C&amp;quot; MPC library        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Eiffel interface to the "C" MPC library.  This library requires you to build GMP(&lt;a href="http://gmplib.org/" class="external free" title="http://gmplib.org/"&gt;http://gmplib.org/&lt;/a&gt;), MPFR(&lt;a href="http://www.mpfr.org/" class="external free" title="http://www.mpfr.org/"&gt;http://www.mpfr.org/&lt;/a&gt;) and MPC(&lt;a href="http://www.multiprecision.org/" class="external free" title="http://www.multiprecision.org/"&gt;http://www.multiprecision.org/&lt;/a&gt;).  It depends on eGMP and eMPFR.
&lt;/p&gt;&lt;p&gt;To build on Windows I recommend MSYS.  To build on 64-bit Windows I recommend MSYS and MinGW64.  In the project settings dialog I needed to include the file "C:\MinGW_64\lib\gcc\x86_64-w64-mingw32\4.4.5\libgcc.a".
&lt;/p&gt;&lt;fieldset class="fieldgroup group-dependencies"&gt;&lt;div class="field field-type-nodereference field-field-dependencies"&gt;
      &lt;div class="field-label"&gt;Dependencies:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="/node/442"&gt;eGMP&lt;/a&gt;        &lt;/div&gt;
              &lt;div class="field-item even"&gt;
                    &lt;a href="/node/443"&gt;eMPFR&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/izAaqVvFOSs" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/444#comments</comments>
 <category domain="http://www.eiffelroom.org/taxonomy/term/4">Linux</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/5">Mac</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/6">Windows</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/111">Public Domain</category>
 
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/444</wfw:commentRss>
 <pubDate>Fri, 11 Jun 2010 22:48:07 +0000</pubDate>
 <dc:creator>saunders</dc:creator>
 <guid isPermaLink="false">444 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/444</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/Eiffelroom/~5/snRGDeRo8Rs/eMPC_4.7z" length="10597" type="application/x-7z-compressed" /><feedburner:origEnclosureLink>http://www.eiffelroom.org/files/eMPC_4.7z</feedburner:origEnclosureLink></item>
<item>
 <title>eMPFR</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/FoNXmx6YK6U/443</link>
 <description>&lt;div class="field field-type-text field-field-short-description"&gt;
      &lt;div class="field-label"&gt;Short Description:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    Eiffel interface to &amp;quot;C&amp;quot; MPFR        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Eiffel interface to the "C" MPFR library.  Contains a class MPFR_FUNCTIONS that gives a direct interface to the "C" functions.  Class MPFR inherits from NUMERIC.  To build this library you will need to build GMP(&lt;a href="http://gmplib.org/" class="external free" title="http://gmplib.org/"&gt;http://gmplib.org/&lt;/a&gt;) and MPFR(&lt;a href="http://www.mpfr.org/" class="external free" title="http://www.mpfr.org/"&gt;http://www.mpfr.org/&lt;/a&gt;) and this library depends on eGMP.
&lt;/p&gt;&lt;p&gt;To build on Windows I recomend MSYS.  For 64-bit I recomend MSYS and MinGW64.  When I built this library on Windows 7 64-bit I had to include this in my project settings - C:\MinGW_64\lib\gcc\x86_64-w64-mingw32\4.4.5\libgcc.a under Advanced-&amp;gt;Externals in the Project Settings dialog of EiffelStudio.
&lt;/p&gt;&lt;fieldset class="fieldgroup group-dependencies"&gt;&lt;div class="field field-type-nodereference field-field-dependencies"&gt;
      &lt;div class="field-label"&gt;Dependencies:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="/node/442"&gt;eGMP&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/FoNXmx6YK6U" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/443#comments</comments>
 <category domain="http://www.eiffelroom.org/taxonomy/term/488">MPFR</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/486">multiple precision</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/4">Linux</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/5">Mac</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/6">Windows</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/111">Public Domain</category>
 
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/443</wfw:commentRss>
 <pubDate>Fri, 11 Jun 2010 22:37:47 +0000</pubDate>
 <dc:creator>saunders</dc:creator>
 <guid isPermaLink="false">443 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/443</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/Eiffelroom/~5/rzDvZrjHsR0/eMPFR_3.7z" length="21380" type="application/x-7z-compressed" /><feedburner:origEnclosureLink>http://www.eiffelroom.org/files/eMPFR_3.7z</feedburner:origEnclosureLink></item>
<item>
 <title>eGMP</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/S3gJbPWLbQs/442</link>
 <description>&lt;div class="field field-type-text field-field-short-description"&gt;
      &lt;div class="field-label"&gt;Short Description:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    Eiffel interface to &amp;quot;C&amp;quot; GMP        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This library is very similar to Multiple Precision also published here.  The current version is based on GMP 5.0.1 and you will need to build this library for yourself in order to use this.  You can acquire GMP from &lt;a href="http://gmplib.org/" class="external free" title="http://gmplib.org/"&gt;http://gmplib.org/&lt;/a&gt;.  I have done little testing on this version yet but most of the classes are identical to the ones in Multiple Precision.  If you have used Multiple Precision there is a small likelihood that any code based on that library will break on this one.  Keep in mind that it might.  Multiple Precision had classes MPFR and MPC which are not present in this one.  In the future I intend to create eMPFR and eMPC as seperate libraries.  MPFR is supposed to make a new release soon and I am waiting till that is available before I create those libraries.  The Multiple Precision library was based on MPIR which is not strictly compatible with GMP and I desired that.  This was my motivation for creating this library.
&lt;/p&gt;&lt;p&gt;To build on Windows I recomend MSYS. For 64-bit I recomend MSYS and MinGW64.
&lt;/p&gt;&lt;fieldset class="fieldgroup group-dependencies"&gt;&lt;div class="field field-type-nodereference field-field-dependencies"&gt;
      &lt;div class="field-label"&gt;Dependencies:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;a href="/library/eiffelbase"&gt;EiffelBase&lt;/a&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/S3gJbPWLbQs" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/442#comments</comments>
 <category domain="http://www.eiffelroom.org/taxonomy/term/487">arbitrary precision arithmetic</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/485">GMP</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/486">multiple precision</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/4">Linux</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/5">Mac</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/6">Windows</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/111">Public Domain</category>
 
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/442</wfw:commentRss>
 <pubDate>Fri, 04 Jun 2010 07:20:50 +0000</pubDate>
 <dc:creator>saunders</dc:creator>
 <guid isPermaLink="false">442 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/442</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/Eiffelroom/~5/hV14_5sSgFE/eGMP_8.7z" length="23896" type="application/x-7z-compressed" /><feedburner:origEnclosureLink>http://www.eiffelroom.org/files/eGMP_8.7z</feedburner:origEnclosureLink></item>
<item>
 <title>Moving to a readable/writable model</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/s3DkHIBTibA/441</link>
 <description>&lt;table id="toc" class="toc" summary="Contents"&gt;&lt;tr&gt;&lt;td&gt;&lt;div id="toctitle"&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;/div&gt;
&lt;div id="tocbody"&gt;
&lt;ul&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Introduction"&gt;&lt;span class="tocnumber"&gt;1&lt;/span&gt; &lt;span class="toctext"&gt;Introduction&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Starting_with_an_example"&gt;&lt;span class="tocnumber"&gt;2&lt;/span&gt; &lt;span class="toctext"&gt;Starting with an example&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Splitting_the_class"&gt;&lt;span class="tocnumber"&gt;3&lt;/span&gt; &lt;span class="toctext"&gt;Splitting the class&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Refining_the_model"&gt;&lt;span class="tocnumber"&gt;4&lt;/span&gt; &lt;span class="toctext"&gt;Refining the model&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Inheritance"&gt;&lt;span class="tocnumber"&gt;5&lt;/span&gt; &lt;span class="toctext"&gt;Inheritance&lt;/span&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Single_inheritance"&gt;&lt;span class="tocnumber"&gt;5.1&lt;/span&gt; &lt;span class="toctext"&gt;Single inheritance&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Multiple_inheritance"&gt;&lt;span class="tocnumber"&gt;5.2&lt;/span&gt; &lt;span class="toctext"&gt;Multiple inheritance&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-2"&gt;&lt;a href="#Creation_of_readable_objects"&gt;&lt;span class="tocnumber"&gt;5.3&lt;/span&gt; &lt;span class="toctext"&gt;Creation of readable objects&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Deferred_and_once_routines"&gt;&lt;span class="tocnumber"&gt;6&lt;/span&gt; &lt;span class="toctext"&gt;Deferred and once routines&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Generics"&gt;&lt;span class="tocnumber"&gt;7&lt;/span&gt; &lt;span class="toctext"&gt;Generics&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Conclusion"&gt;&lt;span class="tocnumber"&gt;8&lt;/span&gt; &lt;span class="toctext"&gt;Conclusion&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;a name="Introduction"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Introduction&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Work a long time on your code, and you will have countless opportunities to experiment with software design. Today, I'd like to describe how I moved some classes to a new model for separating queries and commands.
&lt;/p&gt;&lt;p&gt;The need for this came to me because of complex assertions. It turns out that if the code called during assertions evaluation involves a large number of classes and features, it becomes difficult to ensure that it doesn't have side effects. My first approach was to verify the state of my objects dynamically and ensure it wasn't modified. Lately, I moved to a more static approach whereby classes involved during assertions evaluation only contain queries. It is this work I present here. The tradeoffs are mentioned in the conclusion section.
&lt;/p&gt;
&lt;a name="Starting_with_an_example"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Starting with an example&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;I will begin with a SAMPLE class, containing some queries and commands.
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	SAMPLE
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Initialization&lt;/span&gt;
&amp;nbsp;
	make
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		expanded_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; 0
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt; reference_attribute.&lt;span style="color: #000060;"&gt;make_empty&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Queries&lt;/span&gt;
&amp;nbsp;
	expanded_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; expanded_attribute
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	reference_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; reference_attribute
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Commands&lt;/span&gt;
&amp;nbsp;
	change_expanded &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;new_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		expanded_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; new_value
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	change_reference &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;new_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		reference_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; new_value
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Implementation&lt;/span&gt;
&amp;nbsp;
	expanded_attribute&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
	reference_attribute&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;This is close to the most basic example of a class with queries and commands. I separated expanded and reference types to demonstrate how a query can indirectly allow side effects to happen during execution. Here, a client class can call the &lt;b&gt;reference_value&lt;/b&gt; feature to obtain access to &lt;b&gt;reference_attribute&lt;/b&gt; and modify it. In the case of the &lt;b&gt;expanded_value&lt;/b&gt; feature, the object is copied and can't produce side-effects.
&lt;/p&gt;&lt;p&gt;The new model consists of splitting SAMPLE in two classes, SAMPLE and READABLE_SAMPLE.
&lt;/p&gt;
&lt;a name="Splitting_the_class"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Splitting the class&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Let's see how we can do it on the sample code. All queries that can't produce side effects are moved to READABLE_SAMPLE, remaining features stay in SAMPLE. Finally SAMPLE inherits from READABLE_SAMPLE to produce a class that behaves identically to the old version.
Creation functions can't be considered as producing side affects, but they can be called by clients if their export status is not {NONE}, and in that case are commands. This problem is easily fixed by setting the export status to {NONE} in READABLE_SAMPLE, and to the value it should have in the SAMPLE class.
&lt;/p&gt;&lt;p&gt;Here is a first draft of the new code.
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	READABLE_SAMPLE
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Initialization&lt;/span&gt;
&amp;nbsp;
	make
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		expanded_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; 0
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt; reference_attribute.&lt;span style="color: #000060;"&gt;make_empty&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Queries&lt;/span&gt;
&amp;nbsp;
	expanded_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; expanded_attribute
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	reference_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; reference_attribute
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Implementation&lt;/span&gt;
&amp;nbsp;
	expanded_attribute&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
	reference_attribute&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	SAMPLE
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	READABLE_SAMPLE
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			make
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Commands&lt;/span&gt;
&amp;nbsp;
	change_expanded &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;new_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		expanded_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; new_value
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	change_reference &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;new_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		reference_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; new_value
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;This first approach allows us to pass references to READABLE_SAMPLE objects when we don't want clients to be able to modify the object. It has some flaws, one of them already mentioned.
&lt;/p&gt;
&lt;ol&gt;&lt;li&gt; It does nothing about commands inherited from ANY, most notably &lt;b&gt;copy&lt;/b&gt;.
&lt;/li&gt;&lt;li&gt; The object can be modified if a client calls &lt;b&gt;reference_value&lt;/b&gt; to get a reference to &lt;b&gt;reference_attribute&lt;/b&gt;.
&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Before we refine the model, let's see an example of code that takes advantage of it.
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	SOME_CLIENT
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt;
&amp;nbsp;
	create_new_sample&lt;span style="color: #600000;"&gt;:&lt;/span&gt; SAMPLE
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt; &lt;span style="color: #800080;"&gt;result&lt;/span&gt;.&lt;span style="color: #000060;"&gt;make&lt;/span&gt;
&amp;nbsp;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Do some stuff with the new object...&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;ensure&lt;/span&gt;
		is_valid&lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #800080;"&gt;result&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	is_valid &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;a_sample&lt;span style="color: #600000;"&gt;:&lt;/span&gt; READABLE_SAMPLE&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+boolean&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;BOOLEAN&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Perform queries on 'a_sample'&lt;/span&gt;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Commands are statically rejected here&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;In &lt;b&gt;is_valid&lt;/b&gt; only queries can be called, and if &lt;b&gt;a_sample&lt;/b&gt; is passed to other routines, they will also be unable to call commands. Actually, this is not entirely true. Since the object is in fact a SAMPLE object, a client routine could obtain a reference to the object as SAMPLE from the reference to READABLE_SAMPLE with a Certified Attachment Pattern (CAP). Consider the code below:
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;	is_valid &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;a_sample&lt;span style="color: #600000;"&gt;:&lt;/span&gt; READABLE_SAMPLE&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+boolean&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;BOOLEAN&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;attached&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;SAMPLE&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; a_sample &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; a_writable_sample &lt;span style="color: #0600FF; font-weight: bold;"&gt;then&lt;/span&gt;
			&lt;span style="color: #008000; font-style: italic;"&gt;-- Call commands on a_writable_sample here, and therefore modify the state of the object.&lt;/span&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;There is nothing we can do about this other than performing a copy of the object into a new READABLE_SAMPLE object. But this hurts performance, and the new model becomes useless since we could have kept the SAMPLE class as is, with all side-effects happening in the copy. We will assume that the writer of the code respects the intent of the new model and doesn't do such an horrible thing!
&lt;/p&gt;
&lt;a name="Refining_the_model"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Refining the model&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The case of the &lt;b&gt;copy&lt;/b&gt; feature is typical and we will meet it again when we consider descendants of SAMPLE. Here is a feature that should not be in READABLE_SAMPLE and yet must be in SAMPLE. The solution to this problem is two-fold:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; We change the export status of &lt;b&gt;copy&lt;/b&gt; so that clients cannot call it. The export status to {ANY} will be reinstated in SAMPLE.
&lt;/li&gt;&lt;li&gt; As an additional precaution, we rename &lt;b&gt;copy&lt;/b&gt; into a new name intended to discourage descendants of READABLE_SAMPLE from using it.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Indeed, any class inheriting from READABLE_SAMPLE could call &lt;b&gt;copy&lt;/b&gt;. By changing its name, we make sure that descendant classes know what they doing. The correct name can be reused in SAMPLE the same way it is exported.
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	READABLE_SAMPLE
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Initialization&lt;/span&gt;
&amp;nbsp;
	make
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		expanded_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; 0
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt; reference_attribute.&lt;span style="color: #000060;"&gt;make_empty&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Queries&lt;/span&gt;
&amp;nbsp;
	expanded_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; expanded_attribute
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	reference_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; reference_attribute
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Implementation&lt;/span&gt;
&amp;nbsp;
	expanded_attribute&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
	reference_attribute&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	SAMPLE
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	READABLE_SAMPLE
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			forbidden_copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			make, copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Commands&lt;/span&gt;
&amp;nbsp;
	change_expanded &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;new_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		expanded_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; new_value
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	change_reference &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;new_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		reference_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; new_value
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;This is how we handle the first problem. But what about the second? We have two options:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Return a copy of &lt;b&gt;reference_attribute&lt;/b&gt; instead of a direct reference to it. This is at the cost of performance and should be avoided when possible.
&lt;/li&gt;&lt;li&gt; If &lt;b&gt;reference_attribute&lt;/b&gt; is of a type that has a corresponding READABLE_ counterpart, return the read-only type in READABLE_SAMPLE, and the full type in a redefined version of the query in SAMPLE.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Fortunately for us, STRING is already implemented like that since it inherits (in its latest incarnation) from READABLE_STRING, or more accurately from the corresponding sized variant.
The solution is therefore to have 2 versions of &lt;b&gt;reference_value&lt;/b&gt; with different return type. We can take advantage of it to make both versions available in SAMPLE, since returning a read-only version makes sense even for the modifiable class. But in this case they must have different names. This is easily obtained with renaming, as the reader can see below:
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	READABLE_SAMPLE
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Initialization&lt;/span&gt;
&amp;nbsp;
	make
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		expanded_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; 0
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt; reference_attribute.&lt;span style="color: #000060;"&gt;make_empty&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Queries&lt;/span&gt;
&amp;nbsp;
	expanded_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; expanded_attribute
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	reference_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; READABLE_STRING
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; reference_attribute
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Implementation&lt;/span&gt;
&amp;nbsp;
	expanded_attribute&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
	reference_attribute&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	SAMPLE
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	READABLE_SAMPLE
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			forbidden_copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; copy,
			reference_value &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; readable_reference_value
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			make, copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Queries&lt;/span&gt;
&amp;nbsp;
	reference_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; reference_attribute
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Commands&lt;/span&gt;
&amp;nbsp;
	change_expanded &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;new_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		expanded_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; new_value
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	change_reference &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;new_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+string&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;STRING&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		reference_attribute &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; new_value
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;Here, a client of SAMPLE can obtain either full access to &lt;b&gt;reference_attribute&lt;/b&gt; by calling &lt;b&gt;reference_value&lt;/b&gt;, or read-only access by calling &lt;b&gt;readable_reference_value&lt;/b&gt;. A client of READABLE_SAMPLE could only get the read-only reference with a call to &lt;b&gt;reference_value&lt;/b&gt;. Hence the semantic of this feature is preserved.
&lt;/p&gt;&lt;p&gt;The sample class doesn't have an invariant, because they didn't create any problem for me. I just moved all invariants to the readable version of the splitted classes.
&lt;/p&gt;
&lt;a name="Inheritance"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Inheritance&lt;/span&gt;&lt;/h2&gt;
&lt;a name="Single_inheritance"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Single inheritance&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Things can be formalized when a descendant inherits from a parent and both can be splitted. Let's call PARENT and READABLE_PARENT the classes to inherit from, CHILD and READABLE_CHILD the descendants.
The inheritance scheme is CHILD -&amp;gt; READABLE_CHILD -&amp;gt; PARENT -&amp;gt; READABLE_PARENT. What we need is to make commands and queries that can lead to side-effects coming from PARENT unavailable to clients of READABLE_CHILD.
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; In READABLE_CHILD
&lt;ul&gt;&lt;li&gt; Commands are renamed as &lt;b&gt;forbidden_&amp;lt;command name&amp;gt;&lt;/b&gt; and their export status changed to {NONE}.
&lt;/li&gt;&lt;li&gt; Queries allowing side effects have a &lt;b&gt;readable_&amp;lt;query name&amp;gt;&lt;/b&gt; version. We rename &lt;b&gt;&amp;lt;query name&amp;gt;&lt;/b&gt; to &lt;b&gt;forbidden_&amp;lt;query name&amp;gt;&lt;/b&gt; and &lt;b&gt;readable_&amp;lt;query name&amp;gt;&lt;/b&gt; to &lt;b&gt;&amp;lt;query name&amp;gt;&lt;/b&gt;. Similarly to commands, we also change their export status.
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;&lt;li&gt; In CHILD
&lt;ul&gt;&lt;li&gt; We reinstate commands with their original name and export status.
&lt;/li&gt;&lt;li&gt; We rename queries again (and change export) to the &lt;b&gt;readable_&amp;lt;query name&amp;gt;&lt;/b&gt; and &lt;b&gt;&amp;lt;query name&amp;gt;&lt;/b&gt; versions.
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The resulting code, quite complicated, is listed below. SAMPLE and READABLE_SAMPLE are used to demonstrate queries that return a read-only version of an object to avoid side-effects.
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	READABLE_PARENT
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Initialization&lt;/span&gt;
&amp;nbsp;
	make
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Create the object&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt;
&amp;nbsp;
	query1&lt;span style="color: #600000;"&gt;:&lt;/span&gt; READABLE_SAMPLE
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Create a read-only version of a SAMPLE object&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	query2&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+integer&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;INTEGER&lt;/span&gt;&lt;/a&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Return an expanded object. This query won't need any redefinition.&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	PARENT
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	READABLE_PARENT
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			forbidden_copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; copy,
			query1 &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; readable_query1
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt;
&amp;nbsp;
	command
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Perfoms some command&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt;
&amp;nbsp;
	query1&lt;span style="color: #600000;"&gt;:&lt;/span&gt; SAMPLE
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Return a writable version of the sample object.&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	READABLE_CHILD
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	PARENT
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; forbidden_copy,
			command &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; forbidden_command,
			query1 &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; forbidden_query1,
			readable_query1 &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; query1
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			forbidden_copy, forbidden_command, forbidden_query1
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	CHILD
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	READABLE_CHILD
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			forbidden_copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; copy,
			forbidden_command &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; command,
			query1 &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; readable_query1,
			forbidden_query1 &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; query1
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			copy, command, query1
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;As long as all classes follow this model, assertions can be coded using only the READABLE_xxx version of classes as parameters.
&lt;/p&gt;&lt;p&gt;In one occasion, almost the entire code of a class was dedicated to creating the object. This forced me to put all code in the readable version of the class. If no other class than SAMPLE inherits from READABLE_SAMPLE, then it's not much of a problem. Otherwise, the solution consists of implementing these features directly with the &lt;b&gt;forbidden_&lt;/b&gt; prefix and export to {NONE}.
&lt;/p&gt;
&lt;a name="Multiple_inheritance"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Multiple inheritance&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;The case of multiple inheritance is slightly more complicated, but the rules are identical. In one case I had to merge different versions of &lt;b&gt;copy&lt;/b&gt;. Taking the example of the PARENT and CHILD classes again, here is the corresponding code.
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	READABLE_CHILD
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	FIRST_PARENT
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;redefine&lt;/span&gt;
			forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
	SECOND_PARENT
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;redefine&lt;/span&gt;
			forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
	forbidden_copy &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;other&lt;span style="color: #600000;"&gt;:&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;like&lt;/span&gt; &lt;span style="color: #800080;"&gt;current&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;precursor&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;FIRST_PARENT&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;other&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;precursor&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;SECOND_PARENT&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;other&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	CHILD
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	READABLE_CHILD
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			forbidden_copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;a name="Creation_of_readable_objects"&gt;&lt;/a&gt;&lt;h3&gt; &lt;span class="mw-headline"&gt;Creation of readable objects&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;In my sample code, READABLE_SAMPLE is a class with a create clause. That is, READABLE_SAMPLE objects can be created, and for them no command can be called ever. They represent constant objects with a state fixed at creation.
It turned out to be a problem in my code, because of anchor types and result types that are sometimes tied to the readable version of SAMPLE. For instance, if a query returns a READABLE_SAMPLE object destined to be stored and modified later, there will be no actually modification possible if the  object was created with a code like &lt;span class="geshifilter"&gt;&lt;code class="eiffel geshifilter-eiffel"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt; &lt;span style="color: #800080;"&gt;Result&lt;/span&gt;.&lt;span style="color: #000060;"&gt;make&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;.
To solve this issue, and make sure that all non-constant objects are properly created, I proceeded in three steps:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; I made all readable versions of classes &lt;b&gt;deferred&lt;/b&gt; and removed their create clause.
&lt;/li&gt;&lt;li&gt; I recompiled and fixed all errors by changing code like &lt;span class="geshifilter"&gt;&lt;code class="eiffel geshifilter-eiffel"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt; &lt;span style="color: #800080;"&gt;Result&lt;/span&gt;.&lt;span style="color: #000060;"&gt;make&lt;/span&gt;&lt;/code&gt;&lt;/span&gt; to &lt;span class="geshifilter"&gt;&lt;code class="eiffel geshifilter-eiffel"&gt;&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;SAMPLE&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;.&lt;span style="color: #000060;"&gt;make&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;
&lt;/li&gt;&lt;li&gt; I made all readable versions normal classes again (i.e. not deferred anymore) and reinstated the create clauses.
&lt;/li&gt;&lt;/ul&gt;
&lt;a name="Deferred_and_once_routines"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Deferred and once routines&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Deferred routines can be a problem if they are commands. This is because they should be implemented in the writable version of the class, which means the readable version must be declared as deferred and therefore cannot have creation procedures.
The solution I found was to declare the deferred command in the readable version of the class, but with an empty body and with export {NONE}. Then I redefine it with the appropriate implementation in the writable version.
&lt;/p&gt;&lt;p&gt;Once routines are easier to manage. They create a problem because there must not be two versions of the once routine. For instance, if &lt;b&gt;once_fcn&lt;/b&gt; is the routine name, we must not end up with &lt;b&gt;readable_once_fcn&lt;/b&gt; too, otherwise it could be executed twice. This case happens only if the once routine is a function returning a reference to a writable object, and to a read-only object for the &lt;b&gt;readable_once_fcn&lt;/b&gt; case. The solution consists of moving the code to a third &lt;b&gt;implementation_once_fcn&lt;/b&gt; once function, belonging to the readable version of the class of course. &lt;b&gt;once_fcn&lt;/b&gt; and &lt;b&gt;readable_once_fcn&lt;/b&gt; can then be separate routines returning the appropriate object type, since they call a once function themselves.
&lt;/p&gt;&lt;p&gt;Here is a more comprehensive example:
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	READABLE_SAMPLE
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Initialization&lt;/span&gt;
&amp;nbsp;
	make
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Some init&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Queries&lt;/span&gt;
&amp;nbsp;
	once_fcn&lt;span style="color: #600000;"&gt;:&lt;/span&gt; READABLE_CHILD
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;once&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; implementation_once_fcn
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Implementation&lt;/span&gt;
&amp;nbsp;
	implementation_once_fcn&lt;span style="color: #600000;"&gt;:&lt;/span&gt; CHILD
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;once&lt;/span&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt; &lt;span style="color: #800080;"&gt;result&lt;/span&gt;.&lt;span style="color: #000060;"&gt;make&lt;/span&gt;
		&lt;span style="color: #008000; font-style: italic;"&gt;-- Do stuff here&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	SAMPLE
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	READABLE_SAMPLE
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			forbidden_copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; copy,
			once_fcn &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; readable_once_fcn
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			make, copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Queries&lt;/span&gt;
&amp;nbsp;
	once_fcn&lt;span style="color: #600000;"&gt;:&lt;/span&gt; CHILD
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;once&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; implementation_once_fcn
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;The idea of moving the code to a third function makes sense for all functions, and not only if they are "once", for the purpose of avoiding code replication. However, most of the time I didn't do it because the resulting code was more complicated and harder to understand.
&lt;/p&gt;
&lt;a name="Generics"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Generics&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;When the sample class is parameterized with generic classes like in SAMPLE[G], I needed to access the readable version of G. There is unfortunaly no easy way to do that, so eventually I resorted to recode SAMPLE[G] as SAMPLE[READABLE_G, G-&amp;gt;READABLE_G]. Here, the intended purpose is to have G being a direct descendant of READABLE_G but this is not something that can be enforced.
For generic parameters that are not splitted, I could use the class twice like in SAMPLE[INTEGER, INTEGER], since a class always conforms to itself. This works with expanded classes, or classes that only have queries, but not with most classes coming from libraries.
&lt;/p&gt;&lt;p&gt;Unfortunately, EiffelStudio doesn't fully implement the SAMPLE[READABLE_G, G-&amp;gt;READABLE_G] syntax. G isn't considered conforming to READABLE_G when checking constraints. Let's make it more clear with an example:
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	READABLE_SAMPLE&lt;span style="color: #FF0000;"&gt;&amp;#91;&lt;/span&gt;READABLE_G, G&lt;span style="color: #600000;"&gt;-&amp;gt;&lt;/span&gt;READABLE_G&lt;span style="color: #FF0000;"&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			forbidden_copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make_from_other
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Initialization&lt;/span&gt;
&amp;nbsp;
	make_from_other &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;other&lt;span style="color: #600000;"&gt;:&lt;/span&gt; READABLE_G&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		other_ref &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; other
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Queries&lt;/span&gt;
&amp;nbsp;
	object_ref&lt;span style="color: #600000;"&gt;:&lt;/span&gt; READABLE_G
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;Result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; other_ref
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+none&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;NONE&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Implementation&lt;/span&gt;
&amp;nbsp;
	other_ref&lt;span style="color: #600000;"&gt;:&lt;/span&gt; READABLE_G
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;class&lt;/span&gt;
	SAMPLE&lt;span style="color: #FF0000;"&gt;&amp;#91;&lt;/span&gt;READABLE_G, G&lt;span style="color: #600000;"&gt;-&amp;gt;&lt;/span&gt;READABLE_G&lt;span style="color: #FF0000;"&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;inherit&lt;/span&gt;
	READABLE_SAMPLE&lt;span style="color: #FF0000;"&gt;&amp;#91;&lt;/span&gt;READABLE_G, G&lt;span style="color: #FF0000;"&gt;&amp;#93;&lt;/span&gt;
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;rename&lt;/span&gt;
			forbidden_copy &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;export&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#123;&lt;/span&gt;&lt;a href="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+any&amp;amp;btnI=I%27m+Feeling+Lucky"&gt;&lt;span style="color: #800000"&gt;ANY&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #FF0000;"&gt;&amp;#125;&lt;/span&gt;
			make_from_other, copy
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;redefine&lt;/span&gt;
			object_ref
		&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;create&lt;/span&gt;
	make_from_other
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Queries&lt;/span&gt;
&amp;nbsp;
	object_ref&lt;span style="color: #600000;"&gt;:&lt;/span&gt; G
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		&lt;span style="color: #800080;"&gt;Result&lt;/span&gt; &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; other_ref
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;feature&lt;/span&gt; &lt;span style="color: #008000; font-style: italic;"&gt;-- Commands&lt;/span&gt;
&amp;nbsp;
	change_reference &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;new_value&lt;span style="color: #600000;"&gt;:&lt;/span&gt; G&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;do&lt;/span&gt;
		other_ref &lt;span style="color: #600000;"&gt;:=&lt;/span&gt; new_value
	&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;Here G is not recognized as a descendant of READABLE_G and this code won't compile.
&lt;/p&gt;&lt;p&gt;I worked around this issue with a hack in the compiler, until better support for this kind of constraint is added to the language.
&lt;/p&gt;
&lt;a name="Conclusion"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Conclusion&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;I demonstrated how I changed my code to move to a read/write, read-only class model. The change was necessary to write complex code to be used during assertions evaluation. Another, easier way to obtain the same result is to execute the assertion code on a copy of the program state, since it guarantees (within some limits) that there will be no side-effects on the core of the program. The tradeoff is to exchange simpler code for poor performance.
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; The new model forced me to duplicate almost all classes.
&lt;/li&gt;&lt;li&gt; All class headers can easily be cluttered with a lot of rename and export clauses.
&lt;/li&gt;&lt;li&gt; Class names are longer, and if they use generics, a lot longer.
&lt;/li&gt;&lt;li&gt; Renaming a feature &lt;b&gt;forbidden_&amp;lt;feature name&amp;gt;&lt;/b&gt; is not a proper protection against using the feature
&lt;/li&gt;&lt;li&gt; This doesn't work well with libraries. I ended up rewriting several of the basic structure classes.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;On this subject, things can be automated since I've been following a small set of rules. If the language had support for this model, the code would look a lot more simpler.
For instance, introducing a new keyword 'readable', here is what the compiler could do:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Split all classes in two, 'readable SAMPLE' being an alias to READABLE_SAMPLE.
&lt;/li&gt;&lt;li&gt; Move all queries to the readable version of the class. To indicate which feature is a query, just put 'readable' in front of the feature name.
&lt;/li&gt;&lt;li&gt; For duplicated queries (&lt;b&gt;&amp;lt;feature name&amp;gt;&lt;/b&gt; and &lt;b&gt;readable_&amp;lt;feature name&amp;gt;&lt;/b&gt;) make the readable version available with 'readable &amp;lt;feature name&amp;gt;'
&lt;/li&gt;&lt;li&gt; Hide commands instead of renaming them to &lt;b&gt;forbidden_&amp;lt;command name&amp;gt;&lt;/b&gt;.
&lt;/li&gt;&lt;li&gt; If G is a generic, Make 'readable G' an alias for READABLE_G and take SAMPLE[G] to mean SAMPLE[readable G, G-&amp;gt;readable G].
&lt;/li&gt;&lt;li&gt; Provide default yet unavailable versions of deferred features that are commands, so a readable class can be created. Code once functions to be called once even if they have two versions.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;This would need to be better formalized of course. Perhaps I'll play with the compiler to try it one day. I'll live with the modified code for now.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/s3DkHIBTibA" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/441#comments</comments>
 <category domain="http://www.eiffelroom.org/taxonomy/term/484">assertions</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/470">class</category>
 <category domain="http://www.eiffelroom.org/tag/cqs">CQS</category>
 <category domain="http://www.eiffelroom.org/taxonomy/term/483">readable</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/441</wfw:commentRss>
 <pubDate>Thu, 03 Jun 2010 22:04:13 +0000</pubDate>
 <dc:creator>dlebansais</dc:creator>
 <guid isPermaLink="false">441 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/441</feedburner:origLink></item>
<item>
 <title>How should we compute the result of DATE.is_leap_year?</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/oI6-3RESqQ4/440</link>
 <description>&lt;div class="poll"&gt;
  
&lt;div class="text"&gt;Using Gregorian calendar even for date older than 1582&lt;/div&gt;
&lt;div class="bar"&gt;
  &lt;div style="width: 67%;" class="foreground"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="percent"&gt;
  67% (4 votes)
&lt;/div&gt;

&lt;div class="text"&gt;Using Julian calendar for dates up to 1582, and then Gregorian calendar&lt;/div&gt;
&lt;div class="bar"&gt;
  &lt;div style="width: 17%;" class="foreground"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="percent"&gt;
  17% (1 vote)
&lt;/div&gt;

&lt;div class="text"&gt;Remove `is_leap_year&amp;#039; from date and adds some calendar classes&lt;/div&gt;
&lt;div class="bar"&gt;
  &lt;div style="width: 17%;" class="foreground"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="percent"&gt;
  17% (1 vote)
&lt;/div&gt;
  &lt;div class="total"&gt;
    Total votes: 6  &lt;/div&gt;
  &lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/oI6-3RESqQ4" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/440#comments</comments>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/440</wfw:commentRss>
 <pubDate>Tue, 01 Jun 2010 19:30:11 +0000</pubDate>
 <dc:creator>manus_eiffel</dc:creator>
 <guid isPermaLink="false">440 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/440</feedburner:origLink></item>
<item>
 <title>Recompiling EiffelStudio on Windows</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/vgwWkXClRtI/439</link>
 <description>&lt;p&gt;Recently I found an issue with EiffelStudio and some .NET assemblies. I decided to rebuild my own version of the Eiffel compiler to implement a quick workaround. I succeeded but had to overcome some small issues, so in this post I will provide a detailed guide on how to proceed.
&lt;/p&gt;&lt;p&gt;I won't cover the case of operating systems other than Windows, and will focus on Windows Vista, although almost everything applies to Windows XP as well.
&lt;/p&gt;&lt;p&gt;There is a page at dev.eiffel.com &lt;a href="http://dev.eiffel.com/Compiling_EiffelStudio" class="external autonumber" title="http://dev.eiffel.com/Compiling_EiffelStudio"&gt;[1]&lt;/a&gt; describing the procedure. If my way doesn't work for you, please follow instructions from that page, it should be up to date.
&lt;/p&gt;
&lt;table id="toc" class="toc" summary="Contents"&gt;&lt;tr&gt;&lt;td&gt;&lt;div id="toctitle"&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;/div&gt;
&lt;div id="tocbody"&gt;
&lt;ul&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Importing_the_source_code"&gt;&lt;span class="tocnumber"&gt;1&lt;/span&gt; &lt;span class="toctext"&gt;Importing the source code&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Preparing_the_building_process"&gt;&lt;span class="tocnumber"&gt;2&lt;/span&gt; &lt;span class="toctext"&gt;Preparing the building process&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Building_the_compiler"&gt;&lt;span class="tocnumber"&gt;3&lt;/span&gt; &lt;span class="toctext"&gt;Building the compiler&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="toclevel-1"&gt;&lt;a href="#Staying_up_to_date"&gt;&lt;span class="tocnumber"&gt;4&lt;/span&gt; &lt;span class="toctext"&gt;Staying up to date&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;a name="Importing_the_source_code"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Importing the source code&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The source code of most of EiffelStudio is available as web pages at svn.origo.ethz.ch &lt;a href="http://svn.origo.ethz.ch/viewvc/eiffelstudio/trunk/" class="external autonumber" title="http://svn.origo.ethz.ch/viewvc/eiffelstudio/trunk/"&gt;[2]&lt;/a&gt;, and through CVS (Concurrent Versioning System) as well. Using a CVS client is the easy way if you have one installed. If not, I suggest to use TortoiseSVN, by doing the following:
&lt;/p&gt;&lt;p&gt;Go to &lt;a href="http://tortoisesvn.tigris.org/" class="external free" title="http://tortoisesvn.tigris.org/"&gt;http://tortoisesvn.tigris.org/&lt;/a&gt;, click the Dowload button, then pick the version corresponding to your version of Windows. I chose the 32-bit version.
&lt;/p&gt;
&lt;center&gt;
&lt;p&gt;&lt;a href="/node/427" class="image" title="Image:TortoiseSVN download page"&gt;&lt;img alt="Image:TortoiseSVN download page" src="/files/images/svn0_0.png" border="0" width="811" height="174" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;Install TortoiseSVN
&lt;/p&gt;
&lt;center&gt;
&lt;p&gt;&lt;a href="/node/428" class="image" title="Image:TortoiseSVN installation"&gt;&lt;img alt="Image:TortoiseSVN installation" src="/files/images/svn1.png" border="0" width="509" height="396" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;Reboot Windows, if the installation program asks you to.
&lt;/p&gt;
&lt;center&gt;
&lt;p&gt;&lt;a href="/node/429" class="image" title="Image:TortoiseSVN reboot"&gt;&lt;img alt="Image:TortoiseSVN reboot" src="/files/images/svn4.png" border="0" width="376" height="176" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;Once a CVS client is available, you will need to choose a folder where to download the source code. EiffelStudio developers recommend to choose a name of the form xxdev where xx is the major and minor version of EiffelStudio. For instance, 66dev for version 6.6. From experience, this is only good if you want to maintain several branches of the code simultaneously, but our case all we want is the latest version. Therefore, another name like 'EiffelStudioSource' is probably better suited. This is the name I will use throughout the rest of this guide.
&lt;/p&gt;&lt;p&gt;&lt;b&gt;Wherever you put the source file, make sure the full path to this folder doesn't contain any space&lt;/b&gt;. For instance, 'EiffelStudio Source' doesn't work.
&lt;/p&gt;&lt;p&gt;Open the explorer, go to where this folder will be created, right-click the base folder and select 'SVN Checkouts...'
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/430" class="image" title="Image:TortoiseSVN checkout"&gt;&lt;img alt="Image:TortoiseSVN checkout" src="/files/images/svn5.png" border="0" width="322" height="61" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;Fill the url line exactly as below, and the folder line as you want. You can use the default values for other options in the dialog box. Here is the base url that you can copy-paste: &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;https://svn.eiffel.com/eiffelstudio/trunk&lt;/code&gt;&lt;/span&gt; (don't forget to add /Src).
&lt;/p&gt;
&lt;center&gt;
&lt;p&gt;&lt;a href="/node/431" class="image" title="Image:EiffelStudio checkout"&gt;&lt;img alt="Image:EiffelStudio checkout" src="/files/images/svn6.png" border="0" width="468" height="361" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;If you run into the following error, it's up to you to accept or reject the invalid certificate.
&lt;/p&gt;
&lt;center&gt;
&lt;p&gt;&lt;a href="/node/432" class="image" title="Image:EiffelStudio certificate error"&gt;&lt;img alt="Image:EiffelStudio certificate error" src="/files/images/svn7.png" border="0" width="422" height="127" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;There will be 4 checkouts to perform. Here is the mapping to use. Note that the /Src folder isn't mapped the same way as the other 3.
&lt;/p&gt;
&lt;table class="wikitable"&gt;

&lt;tr&gt;
&lt;th&gt; Url
&lt;/th&gt;&lt;th&gt; Folder
&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;a href="https://svn.eiffel.com/eiffelstudio/trunk/Src" class="external free" title="https://svn.eiffel.com/eiffelstudio/trunk/Src"&gt;https://svn.eiffel.com/eiffelstudio/trunk/Src&lt;/a&gt;
&lt;/td&gt;&lt;td&gt; C:\Users\dlebansais\Documents\EiffelStudioSource
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;a href="https://svn.eiffel.com/eiffelstudio/trunk/Delivery" class="external free" title="https://svn.eiffel.com/eiffelstudio/trunk/Delivery"&gt;https://svn.eiffel.com/eiffelstudio/trunk/Delivery&lt;/a&gt;
&lt;/td&gt;&lt;td&gt; C:\Users\dlebansais\Documents\EiffelStudioSource\Delivery
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;a href="https://svn.eiffel.com/eiffelstudio/trunk/Documentation" class="external free" title="https://svn.eiffel.com/eiffelstudio/trunk/Documentation"&gt;https://svn.eiffel.com/eiffelstudio/trunk/Documentation&lt;/a&gt;
&lt;/td&gt;&lt;td&gt; C:\Users\dlebansais\Documents\EiffelStudioSource\Documentation
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;a href="https://svn.eiffel.com/eiffelstudio/trunk/free_add_ons" class="external free" title="https://svn.eiffel.com/eiffelstudio/trunk/free_add_ons"&gt;https://svn.eiffel.com/eiffelstudio/trunk/free_add_ons&lt;/a&gt;
&lt;/td&gt;&lt;td&gt; C:\Users\dlebansais\Documents\EiffelStudioSource\free_add_ons
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;The entire download process takes about an hour.
&lt;/p&gt;
&lt;a name="Preparing_the_building_process"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Preparing the building process&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Since I'm assuming you have EiffelStudio installed already, you must have a C compiler installed as well. However, as far as I know the Eiffel compiler source code is built with Visual Studio 2005. I used Visual Studio 2008, if you don't have one of them you will probably have to install Visual Studio. For this purpose, Microsoft offers a free version called Visual Studio Express, but I didn't try it.
&lt;/p&gt;&lt;p&gt;To prepare the building process, you need to set two environment variables. This is done from the Control Panel, choose the System icon and on the left of the dialog box click &lt;i&gt;Advanced system settings&lt;/i&gt;.
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/434" class="image" title="Image:System Ctrl Panel - Vista"&gt;&lt;img alt="Image:System Ctrl Panel - Vista" src="/files/images/svn8.png" border="0" width="816" height="293" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;Click the &lt;i&gt;Environment Variables&lt;/i&gt; button to pop the dialog used to manage environment variables.
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/435" class="image" title="Image:System - Advanced Parameters - Vista"&gt;&lt;img alt="Image:System - Advanced Parameters - Vista" src="/files/images/svn9.png" border="0" width="420" height="472" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;In the section dedicated to user variables (the top section), click &lt;i&gt;New...&lt;/i&gt; and enter the following:
&lt;/p&gt;&lt;p&gt;Name: EIFFEL_SRC
Value: The name of the folder where the source code was downloaded, in my case C:\Users\dlebansais\Documents\EiffelStudioSource.
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/436" class="image" title="Image:New Environment Variable - Vista"&gt;&lt;img alt="Image:New Environment Variable - Vista" src="/files/images/svn10.png" border="0" width="357" height="151" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;b&gt;Create another environment variable called ISE_LIBRARY and give it the same value&lt;/b&gt;. If you forget to do that, the building process can go pretty far but eventually will fail.
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;a name="Building_the_compiler"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Building the compiler&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Now, what the official instructions don't tell you, is that you need to launch a specific command prompt. To find it, click the start button and navigate through the  'All programs' menu to find the Visual Studio group. Under this menu is the Visual Studio Tools group, that countains the Visual Studio Command Prompt. Open it.
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/437" class="image" title="Image:MSVC2008 Command Prompt Menu"&gt;&lt;img alt="Image:MSVC2008 Command Prompt Menu" src="/files/images/svn11.png" border="0" width="299" height="217" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;This will automatically setup the environment required to run the C compiler.
&lt;/p&gt;&lt;p&gt;Now, type
&lt;div class="geshifilter"&gt;&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;cd %EIFFEL_SRC%
cd C
configure win32 m&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;This is assuming you want to build the 32-bit version of the compiler, of course. Otherwise, type 'configure win64 m'.
&lt;/p&gt;&lt;p&gt;This command starts the build of all C files required by Eiffel source files. Once done, just close the command prompt. From now on, we will run tools coming from EiffelStudio, so launch the command prompt that the EiffelStudio installation provides, you can find it the same way you found the Visual Studio prompt.
&lt;/p&gt;&lt;p&gt;If launching this prompt generate a few error messages, you will need to fix your EiffelStudio installation (I reported this bug and it should be fixed if you installed recently). You need to modify the following file: &amp;lt;EiifelStudio path in program Files&amp;gt;\studio\config\windows\esvars.bat
&lt;/p&gt;&lt;p&gt;Change
&lt;/p&gt;&lt;p&gt;set RegKeyPath=HKEY_LOCAL_MACHINE\SOFTWARE\ISE\Eiffel65
&lt;/p&gt;&lt;p&gt;to become
&lt;/p&gt;&lt;p&gt;set RegKeyPath=HKEY_LOCAL_MACHINE\SOFTWARE\ISE\&lt;b&gt;Eiffel66&lt;/b&gt;
&lt;/p&gt;&lt;p&gt;With this fix, the EiffelStudio command prompt should now start flawlessly. Type the following:
&lt;div class="geshifilter"&gt;&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;cd %EIFFEL_SRC%\library\net\Clib
finish_freezing -library
cd %EIFFEL_SRC%\library\vision2\Clib
finish_freezing -library
cd %EIFFEL_SRC%\library\wel\Clib
finish_freezing -library
cd %EIFFEL_SRC%\library\cURL\Clib
finish_freezing -library
cd %EIFFEL_SRC%/C_library/zlib
finish_freezing -library
cd %EIFFEL_SRC%/C_library/libpng
finish_freezing -library
cd %EIFFEL_SRC%/framework/cli_writer/Clib
finish_freezing -library
cd %EIFFEL_SRC%/framework/cli_debugger/Clib
finish_freezing -library&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;Until now, we have compiled C and C++ files. We are now ready build the compiler from Eiffel source files. Before this final step, you need to choose which version of the compiler you want, and if you want to finalize it. To choose the compiler version, you can pick one of these arguments for the -target option:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; batch
&lt;/li&gt;&lt;li&gt; bench_windows
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;This will compile either the command-line version or the studio version of the compiler. There are actually two possibilities for the studio version, either &lt;i&gt;bench&lt;/i&gt; or &lt;i&gt;bench_windows&lt;/i&gt;. I'm not sure what the difference is, and so far &lt;i&gt;bench_windows&lt;/i&gt; has worked for me.
&lt;/p&gt;&lt;p&gt;To build a finalized version, simply add -finalize to the command.
&lt;/p&gt;&lt;p&gt;If like me you plan to rebuild the compiler regularly, when source files are updated, you can create your own batch file, with these lines:
&lt;/p&gt;&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;@echo off
cd &amp;quot;%ISE_EIFFEL%\studio\config\windows&amp;quot;
call esvars.bat
cd %EIFFEL_SRC%\Eiffel\Ace
ec -config ec.ecf -target bench_windows -c_compile -finalize&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;&lt;a href="/node/438" class="image" title="Image:EiffelStudio box while rebuilding"&gt;&lt;img alt="Image:EiffelStudio box while rebuilding" src="/files/images/svn12.png" border="0" width="677" height="340" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;The file you have built is&amp;nbsp;%EIFFEL_SRC%\Eiffel\Ace\EIFGENs\bench_windows\F_code\ec.exe
&lt;/p&gt;
&lt;a name="Staying_up_to_date"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Staying up to date&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Every time a developer updates a source file, you can get the change with your SVN client. In the case of TortoiseSVN, simply open the explorer, find the 'EiffelStudioSource' folder, right-click and choose 'SVN Update'.
This will automatically download all modified files.
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/vgwWkXClRtI" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/439#comments</comments>
 <category domain="http://www.eiffelroom.org/tag/eiffelstudio">EiffelStudio</category>
 <category domain="http://www.eiffelroom.org/tag/compilation">compilation</category>
 <category domain="http://www.eiffelroom.org/tag/windows">windows</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/439</wfw:commentRss>
 <pubDate>Mon, 31 May 2010 20:13:11 +0000</pubDate>
 <dc:creator>dlebansais</dc:creator>
 <guid isPermaLink="false">439 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/439</feedburner:origLink></item>
<item>
 <title>EiffelStudio 6.6 released</title>
 <link>http://feedproxy.google.com/~r/Eiffelroom/~3/7ylXLAIxEHQ/433</link>
 <description>&lt;p&gt;We are pleased to announce the availability of EiffelStudio 6.6. It can be downloaded at &lt;a href="http://www.eiffel.com/downloads" class="external free" title="http://www.eiffel.com/downloads"&gt;http://www.eiffel.com/downloads&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;The release notes are available at &lt;a href="http://docs.eiffel.com/book/eiffelstudio/release-notes-eiffelstudio-66" class="external free" title="http://docs.eiffel.com/book/eiffelstudio/release-notes-eiffelstudio-66"&gt;http://docs.eiffel.com/book/eiffelstudio/release-notes-eiffelstudio-66&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;To me this release brings even more stability and some new language features which I'll highlight below:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Some incremental bugs that usually affects large and complex recompilation have been addressed.
&lt;/li&gt;&lt;li&gt; Our multithreaded runtime has been rewritten to be even more portable and to guarantee the same behavior of mutexes across platforms (before mutexes were recursive on Windows but not on our other platforms, now it is always recursive).
&lt;/li&gt;&lt;li&gt; We have introduced once per object and the new once syntax (&lt;span class="geshifilter"&gt;&lt;code class="eiffel geshifilter-eiffel"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;once&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0080A0;"&gt;&amp;quot;PROCESS&amp;quot;&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt; or &lt;span class="geshifilter"&gt;&lt;code class="eiffel geshifilter-eiffel"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;once&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0080A0;"&gt;&amp;quot;THREAD&amp;quot;&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt; or &lt;span class="geshifilter"&gt;&lt;code class="eiffel geshifilter-eiffel"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;once&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0080A0;"&gt;&amp;quot;OBJECT&amp;quot;&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;#41;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;).
&lt;/li&gt;&lt;li&gt; We have introduced the new check instructions to simplify the writing of void-safe code:
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="eiffel geshifilter-eiffel" style="font-family:monospace;"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;check&lt;/span&gt; &lt;span style="color: #0600FF; font-weight: bold;"&gt;attached&lt;/span&gt; expression &lt;span style="color: #0600FF; font-weight: bold;"&gt;as&lt;/span&gt; e &lt;span style="color: #0600FF; font-weight: bold;"&gt;then&lt;/span&gt;
	e.&lt;span style="color: #000060;"&gt;do_something&lt;/span&gt;
&lt;span style="color: #0600FF; font-weight: bold;"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
when clearly something should be attached but the context is not strong enough for the compiler to guarantee it. If at runtime this was not true a check violation will be raised.
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; We have introduced this not yet adopted feature of the ECMA specification that has been requested by some Eiffel users for many years. The name is not yet decided, so far we have two attempted names: RAT (Remote Anchorted Types) or QAT (Qualified Anchored Types). It basically let you write a type declaration using &lt;span class="geshifilter"&gt;&lt;code class="eiffel geshifilter-eiffel"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;like&lt;/span&gt;&lt;/code&gt;&lt;/span&gt; with not just a feature name but with an expression, that is to say &lt;span class="geshifilter"&gt;&lt;code class="eiffel geshifilter-eiffel"&gt;&lt;span style="color: #0600FF; font-weight: bold;"&gt;like&lt;/span&gt; a.&lt;span style="color: #000060;"&gt;b&lt;/span&gt;.&lt;span style="color: #000060;"&gt;c&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;. This is very practical to reduce the number of copy/paste in types and let you evolve your software easily by only changing a type at one place, instead of at many places (think of changing all your declarations of LINKED_LIST into ARRAYED_LIST in your code).
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Tell me more about your experience using EiffelStudio 6.6 and what you are planning on doing with it. In the meantime, Happy Eiffeling!
&lt;/p&gt;&lt;p&gt;Manu 
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Eiffelroom/~4/7ylXLAIxEHQ" height="1" width="1"/&gt;</description>
 <comments>http://www.eiffelroom.org/node/433#comments</comments>
 <category domain="http://www.eiffelroom.org/tag/eiffelstudio">EiffelStudio</category>
 <category domain="http://www.eiffelroom.org/tag/release">release</category>
 <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.eiffelroom.org/crss/node/433</wfw:commentRss>
 <pubDate>Sat, 29 May 2010 16:44:35 +0000</pubDate>
 <dc:creator>manus_eiffel</dc:creator>
 <guid isPermaLink="false">433 at http://www.eiffelroom.org</guid>
<feedburner:origLink>http://www.eiffelroom.org/node/433</feedburner:origLink></item>
</channel>
</rss>
