Re: substitution principle and contract
- From: "H. S. Lahman" <h.lahman@xxxxxxxxxxx>
- Date: Sun, 25 Sep 2005 16:53:37 GMT
Responding to Johansson...
It says "Of course, for a contract to be redefined the precondition and postcondition cannot both remain the same."
The precondition and postcondition define the contract from the client's perspective. So if one changes either condition, one has a new contract. Conversely, to change the contract one must modify the pre/postconditions.
[Technically the author's statement is not quite correct because it does not include invariant conditions. Conceivably one could change only the invariant to produce a new contract and, conversely, one could create a new contract by modifying the invariant without touching the pre/postconditions. However, in practice that would be exceedingly rare.]
************* There is nothing wrong with me that could not be cured by a capful of Drano.
H. S. Lahman hsl@xxxxxxxxxxxxxxxxx Pathfinder Solutions -- Put MDA to Work http://www.pathfindermda.com blog: http://pathfinderpeople.blogs.com/hslahman (888)OOA-PATH
.
- References:
- substitution principle and contract
- From: Tony Johansson
- substitution principle and contract
- Prev by Date: Re: Interface complexity problem in game
- Next by Date: Re: A question about substitution principle
- Previous by thread: substitution principle and contract
- Index(es):
Relevant Pages
|