contracts of FILE promise too much ...

5 messages Options
Embed this post
Permalink
helmut.brandl

contracts of FILE promise too much ...

Reply Threaded More More options
Print post
Permalink
Hello all,

it seems to me that the contracts of features of FILE promise too much.

E.g. open_read has the postcondition is_open_read.

How can that postcondition assured? It is possible that the file does
not exist, the user might not have permissions to read it etc.

Any opinions?

Helmut

The Eiffel Compiler: http://tecomp.sourceforge.net


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
freeelks-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freeelks-devel
Emmanuel Stapf

Re: contracts of FILE promise too much ...

Reply Threaded More More options
Print post
Permalink
> it seems to me that the contracts of features of FILE promise too much.

Indeed.
 
> E.g. open_read has the postcondition is_open_read.
>
> How can that postcondition assured? It is possible that the file does
> not exist, the user might not have permissions to read it etc.
>
> Any opinions?

We are not changing them because it will break so much code. The idea is that we
will eventually create a new hierarchy of IO_MEDIUM like classes, but because gobo
has introduced the proper classes the incentive is not very high.

Regards,
Manu


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
freeelks-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freeelks-devel
------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------  
Peter Gummer-2

Re: contracts of FILE promise too much ...

Reply Threaded More More options
Print post
Permalink
Emmanuel Stapf [ES] wrote:
> We are not changing them because it will break so much code. The idea is that we
> will eventually create a new hierarchy of IO_MEDIUM like classes, but because gobo
> has introduced the proper classes the incentive is not very high.
>  


This appears to be a case where it makes sense for a Gobo class to move
into FreeELKS. I'm not sure how the Gobo developers would feel about
that, but if the Gobo classes are better then it seems right that they
should be standard.

Now would be a good time to do such radical things. Of the three
compilers (EiffelStudio, Gobo and tecomp), presumably only the
EiffelStudio compiler has a significant amount of code reliant on FILE
at this point in time. Could FILE move out of FreeELKS? EiffelStudio
might move FILE into its base/ise cluster. Not much code would break
then, would it?

I haven't analysed what other dependencies might also have to move or be
rewritten, however. Maybe it's too much work.

- Peter


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
freeelks-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freeelks-devel
Emmanuel Stapf

Re: contracts of FILE promise too much ...

Reply Threaded More More options
Print post
Permalink
The issue is `io' in ANY.

Manu

> -----Original Message-----
> From: Peter Gummer [mailto:[hidden email]]
> Sent: Saturday, October 11, 2008 9:14 PM
> To: [hidden email]
> Subject: Re: [freeelks-devel] contracts of FILE promise too much ...
>
> Emmanuel Stapf [ES] wrote:
> > We are not changing them because it will break so much code. The idea
> is that we
> > will eventually create a new hierarchy of IO_MEDIUM like classes, but
> because gobo
> > has introduced the proper classes the incentive is not very high.
> >
>
>
> This appears to be a case where it makes sense for a Gobo class to move
> into FreeELKS. I'm not sure how the Gobo developers would feel about
> that, but if the Gobo classes are better then it seems right that they
> should be standard.
>
> Now would be a good time to do such radical things. Of the three
> compilers (EiffelStudio, Gobo and tecomp), presumably only the
> EiffelStudio compiler has a significant amount of code reliant on FILE
> at this point in time. Could FILE move out of FreeELKS? EiffelStudio
> might move FILE into its base/ise cluster. Not much code would break
> then, would it?
>
> I haven't analysed what other dependencies might also have to move or be
> rewritten, however. Maybe it's too much work.
>
> - Peter
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> freeelks-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/freeelks-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
freeelks-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freeelks-devel
------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------  
helmut.brandl

Re: contracts of FILE promise too much ...

Reply Threaded More More options
Print post
Permalink
Emmanuel Stapf [ES] wrote:
> The issue is `io' in ANY.
>  
Which should not be a feature of ANY in the first place.

Helmut
The Eiffel Compiler: http://tecomp.sourceforge.net


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
freeelks-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freeelks-devel