Master of Science (MS)
Programmers are now developing large and complex software systems, so it’s important to have software that is consistent, efficient, and robust. Programming contracts allow developers to specify preconditions, postconditions, and invariants in order to more easily identify programming errors. The design by contract principle  was first used in the Eiffel programming language , and has since been extended to libraries in many other languages. The purpose of my project is to design a programming contract library for Java. The library supports a set of preconditions, postconditions, and invariants that are specified in Java annotations. It incorporates contract checking for objects of classes following the bean notation . The library also supports checking for user-defined functions as contract conditions. This feature allows the user to check for complex contract conditions. In addition to these, the library supports contracts using lambdas in Java 8 , which to our knowledge has not been done in previous works on Java contracts. While the results show us that enabling contracts lowers the performance of the system, especially when lambda contracts are used, we also demonstrate how careful design can significantly reduce the overhead.
Rajkumar, Neha, "Designing a Programming Contract Library for Java" (2015). Master's Projects. 426.