Re: documentation versus contract



On 06-06-2010 08:49, Stefan Ram wrote:
What do you deem to be the difference between the documentation
and the contract of an interface?

Sure, sometimes the documentation is written in English and
the contract in math, so:

documentation: Please note that counter() always is positiv.

contract: counter()> 0.

But this distinction, based on the language, is superficially.

If we strip the documentation of an interface from all
superfluous comments and verbose tutorial-style
introductions, and include everything that should be
documented, what we get is the contract of this interface?

Java does not support true contracts in the language itself.

So we have to rely on a description in English.

English is good enough for most practical purposes.

Do you need something more formal, then there are
other languages that supplies that (typical a language
describing the requirements and some subset of Ada
for implementation).

Arne
.



Relevant Pages

  • Re: documentation versus contract
    ... and the contract of an interface? ... documentation: Please note that counteralways is positiv. ... If we strip the documentation of an interface from all ... Returns an array containing all of the elements in this collection. ...
    (comp.lang.java.programmer)
  • Re: documentation versus contract
    ... and the contract of an interface? ... the contract in math, so: ... documentation: Please note that counteralways is positiv. ... If we strip the documentation of an interface from all ...
    (comp.lang.java.programmer)
  • Re: Restriction in interface
    ... An interface and its documentation specify a contract to ... to implement behavior consistently with the demands of the contract. ... that is an excellent reason to seperate implementation details ...
    (comp.lang.java.programmer)
  • Re: documentation versus contract
    ... and the contract of an interface? ... documentation: Please note that counteralways is positiv. ... If we strip the documentation of an interface from all ... Some parts of the contract can be expressed in Java, ...
    (comp.lang.java.programmer)
  • Re: LaTeX for documentations in large projects
    ... The college hires don't yet know enough for that to work, ... babble as badly as the English majors, ... you couldn't be awarded a high school diploma ... documents happens in the design (and documentation) phases. ...
    (sci.electronics.design)