Re: substitution principle and contract



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



.



Relevant Pages

  • Re: Changing OS Question
    ... In the negotiation courses I took way back, ... disagreement with the contract terms. ... agreement from Micro$oft as part of THEIR contract with Microsoft. ... lawyers and others modify a contract draft to meet the needs of BOTH ...
    (alt.sys.pc-clone.dell)
  • Re: Changing OS Question
    ... What you are talking about here is the time-honored process of negotiation. ... Without both parties, there is no ... only a unilateral disagreement with the contract terms. ... others modify a contract draft to meet the needs of BOTH parties simply does not ...
    (alt.sys.pc-clone.dell)
  • Re: cloning Iterators?
    ... in read-only fashion. ... CloneableIterator -- that removeand the other methods that ... contract to support those methods. ...
    (comp.lang.java.programmer)
  • Re: First Avoid Coding
    ... > keeping my contract if anybody can go in and modify ... > does too - but the contract may now be invalid since ... I think DbC works well with collective code ownership. ...
    (comp.object)
  • DbC & TDD: Fizzing Fusion or Flat Fizzle? [2/2]
    ... an invariant is a general clause which ... information: the contract. ... The short form retains headers and assertions of exported features, ... exception handling -- handling abnormal cases. ...
    (comp.object)