home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.eiffel
- Path: sparky!uunet!walter!geoff
- From: geoff@flash.bellcore.com (Geoffrey Clemm)
- Subject: Re: creation
- In-Reply-To: mbk@lyapunov.ucsd.edu's message of 20 Jan 1993 21:33:08 GMT
- Message-ID: <GEOFF.93Jan21212720@wodehouse.flash.bellcore.com>
- Sender: news@walter.bellcore.com
- Nntp-Posting-Host: wodehouse.bellcore.com
- Organization: Bellcore
- References: <175@eiffel.eiffel.com> <1jkgekINNa4i@network.ucsd.edu>
- Date: 21 Jan 93 21:27:20
- Lines: 28
-
- In article <1jkgekINNa4i@network.ucsd.edu> mbk@lyapunov.ucsd.edu (Matt Kennel) writes:
- ram@eiffel.com (Raphael Manfredi) writes:
- : I think there are some situations where a creation procedure may require a
- : postcondition, completing the assertions coming from the invariant. For
- : instance, assume you are creating an object representing a Finite State
- : Automaton (FSA). You may want to have two or three creation procedures
- : to make sure the FSA is put in one of its "begining" states. The postcondition
- : would express that the FSA is indeed in the correct state.
-
- I have a basic question here.
-
- How are postconditions useful? It seems that they express little
- beyond the correct functioning of a class feature.
-
- I thought Raphael was very clear in his answer. If you have several creation
- procedures, each of which initialize the FSA into a *specific* *distinct*
- state, then you would like to have a post-condition stating the characteristics
- of that state. The post-conditions on each of the creation procedures could
- significantly differ, to the extent that the distinct initial states differ.
-
- Having an invariant that says you are in one of the legal states is worthless
- if you need to be in a specific initial state.
-
- Cheers,
-
- Geoff
- --
- geoff@bellcore.com
-