Design By Contract
1 Prerequisite
- Assertions 101
2 Design by Contract
- ../OODesign/design-by-contract.html
- ../OODesign/meyer-design-by-contract-1992-markedUp.pdf Bertrand Meyer's full paper with marked up areas by me.
- Design-by-Contract Webinar by Bertrand Meyer, Professor of Software Engineering, ETH Zurich; ACM Fellow; September 17, 2015
- ./JML/jmldbc-2006-markedUp.pdf Design-by-Contract ./JML/jmldbc.pdf
- http://google-opensource.blogspot.com/2011/02/contracts-for-java.html February 4, 2011
3 Class Invariants
- Consider only the public methods
- Their entry- exit- assertions
- Rewrite, if nec, using and's (conjunctions) (at the top level)
- The common portion across all the above is the class invariant
- Strongest Possible
4 References
- Bertrand Meyer. Applying "Design by Contract". IEEE Computer, 25(10):40–51, October 1992. http://se.ethz.ch/~meyer/publications/computer/contract.pdf Also in his book "Object-Oriented Software Construction". Bertrand Meyer's article marked-up by pmateti Required Reading.
- Design-by-Contract Webinar by Bertrand Meyer, Professor of Software Engineering, ETH Zurich; ACM Fellow; September 17, 2015
- Robert Bruce Findler, Mario Latendresse, and Matthias Felleisen. Behavioral Contracts and Behavioral Subtyping. In Proceedings of ESEC/FSE-9, 229-236. http://www.ccs.neu.edu/scheme/pubs/fse01-flf.pdf 2001 Recommended Reading.