Design by contract (DbC) prescribes that software designers should define formal, precise and verifiable interface specifications for software components, which extend the ordinary definition of abstract data types with preconditions, postconditions and invariants.
1
vote
0answers
74 views
Is there any static analyzer for code contracts for Java 1.6?
I have used Java Modeling Language (JML) with its runtime assertion checker jml4c for writing code contracts in java. However, it would have been great to have a static checker in place as well that ...
3
votes
2answers
153 views
Why is design by contract considered an alternative to the pseudo programming process?
Right now I'm reading Code Complete by Steve McConnell and in chapter 9 he talks about the Pseudo Programming Process (PPP).
From what I've understood, the PPP is a way of programming in which the ...
4
votes
2answers
378 views
Options for programming by contract in Java
I am working on a project (which includes JavaEE web apps and JavaSE apps) that has grown from a single developer to a team of three, and issues of readability and robustness are starting to emerge.
...
5
votes
3answers
482 views
Checking preconditions or not
I've been wanting to find a solid answer to the question of whether or not to have runtime checks to validate input for the purposes of ensuring a client has stuck to their end of the agreement in ...
14
votes
10answers
2k views
Should a method validate its parameters?
Say you are designing a Square root method sqrt. Do you prefer to validate the parameter passed is not a negative number or do you leave it up to the caller to make sure the param passed is valid. How ...