Validity rule VLEC

4 messages Options
Embed this post
Permalink
Martin Piskernig

Validity rule VLEC

Reply Threaded More More options
Print post
Permalink
Hi!

I have this little test class:

---
expanded class COLOR
feature
   c:COLOR
end
---

which results in a compilation error with "ISE EiffelStudio version 6.5.7.9743
GPL Edition - linux-x86-64":
---
Error code: VLEC

Error: cycle in expanded client relation.
What to do: make sure that class is not expanded client of any class
  which is its direct or indirect expanded client.

Class: COLOR
Name of class involved in cycle: COLOR
---

However, I can not find VLEC in ECMA-367. So my question is: Has the validity
rule been dropped and is the provided code valid by the Eiffel standard (and
so EiffelStudio has just not been updated to the standard here) or has it
been renamed or merged with another validity error?

Regards,
Martin
Emmanuel Stapf

RE: Validity rule VLEC

Reply Threaded More More options
Print post
Permalink
> However, I can not find VLEC in ECMA-367. So my question is: Has the
> validity
> rule been dropped and is the provided code valid by the Eiffel standard
> (and
> so EiffelStudio has just not been updated to the standard here) or has it
> been renamed or merged with another validity error?

This is an ETL validity rule that we have kept for the time being as to permit
better optimization of expanded classes at runtime. The standard is more flexible.

Regards,
Manu

------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------  
Colin LeMahieu

Re: Validity rule VLEC

Reply Threaded More More options
Print post
Permalink
Out of curiosity, how does one implement a self-referencing expanded
classes?  This seems not possible.

On Wed, Aug 12, 2009 at 10:27 AM, Emmanuel Stapf [ES] <[hidden email]>wrote:

>
>
> > However, I can not find VLEC in ECMA-367. So my question is: Has the
> > validity
> > rule been dropped and is the provided code valid by the Eiffel standard
> > (and
> > so EiffelStudio has just not been updated to the standard here) or has it
> > been renamed or merged with another validity error?
>
> This is an ETL validity rule that we have kept for the time being as to
> permit
> better optimization of expanded classes at runtime. The standard is more
> flexible.
>
> Regards,
> Manu
>
>  
>


[Non-text portions of this message have been removed]

Emmanuel Stapf

RE: Validity rule VLEC

Reply Threaded More More options
Print post
Permalink
> Out of curiosity, how does one implement a self-referencing expanded
> classes?  This seems not possible.

Because in ECMA expanded simply means objects with copy semantics, there is no
constraint in saying that it cannot be a reference. Thus the field color in the
COLOR expanded class would be allocated as a reference with copy semantics and
treated as such at runtime.

Regards,
Manu

------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------