Contracts describe an agreement between the writer and the user of a class. Their use enhances programmer productivity and program reliability, especially in library code. Handshake provides contracts for Java classes and interfaces in the form of class invariants and method pre- and postconditions. Using Handshake, a programmer can add contracts to classes and interfaces without needing access to their source code, without changing the class files, and without changing the JVM implementation. Unlike existing implementations of contracts for Java, Handshake intercepts the VM''s file operations and modifies classes on the fly without requiring any modification to the JVM itself. By using a dynamic link library interposed between the VM and the operating system, the system is relatively simple to port to a new OS and works with a variety of JVM implementations. The system imposes very little overhead other than the time required to evaluate the contract''s boolean expressions themselves.
Cited By
- Hirschfeld R, Perscheid M, Schubert C and Appeltauer M Dynamic contract layers Proceedings of the 2010 ACM Symposium on Applied Computing, (2169-2175)
- Moiseev R, Hayashi S and Saeki M Generating Assertion Code from OCL Proceedings of the 12th International Conference on Model Driven Engineering Languages and Systems, (650-664)
- Strickland T and Felleisen M Nested and dynamic contract boundaries Proceedings of the 21st international conference on Implementation and application of functional languages, (141-158)
- Dimoulas C, Pucella R and Felleisen M Future contracts Proceedings of the 11th ACM SIGPLAN conference on Principles and practice of declarative programming, (195-206)
- Chen C, Cheng Y and Hsieh C (2018). Contract Specification in Java, IEICE - Transactions on Information and Systems, E91-D:11, (2685-2692), Online publication date: 1-Nov-2008.
- Agostinho S, Moreira A and Guerreiro P Contracts for aspect-oriented design Proceedings of the 2008 AOSD workshop on Software engineering properties of languages and aspect technologies, (1-6)
- Froihofer L, Glos G, Osrael J and Goeschka K Overview and Evaluation of Constraint Validation Approaches in Java Proceedings of the 29th international conference on Software Engineering, (313-322)
- Karaorman M and Abercrombie P (2018). jContractor, Formal Methods in System Design, 27:3, (275-312), Online publication date: 1-Nov-2005.
- Leavens G, Cheon Y, Clifton C, Ruby C and Cok D (2005). How the design of JML accommodates both runtime assertion checking and formal verification, Science of Computer Programming, 55:1-3, (185-208), Online publication date: 1-Mar-2005.
- Smeets N and Steegmans E A methodology for writing class contracts Proceedings of the 31st international conference on Theory and Practice of Computer Science, (418-422)
- Edwards S, Sitaraman M, Weide B and Hollingsworth J (2004). Contract-Checking Wrappers for C++ Classes, IEEE Transactions on Software Engineering, 30:11, (794-810), Online publication date: 1-Nov-2004.
- Kuliamin V, Petrenko A, Kossatchev A and Burdonov I (2019). The UniTesK Approach to Designing Test Suites, Programming and Computing Software, 29:6, (310-322), Online publication date: 1-Nov-2003.
- Barnett M and Schulte W (2003). Runtime verification of .NET contracts, Journal of Systems and Software, 65:3, (199-208), Online publication date: 15-Mar-2003.
- Findler R and Felleisen M (2019). Contract Soundness for object-oriented languages, ACM SIGPLAN Notices, 36:11, (1-15), Online publication date: 1-Nov-2001.
- Findler R and Felleisen M Contract Soundness for object-oriented languages Proceedings of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (1-15)
- Findler R, Latendresse M and Felleisen M Behavioral contracts and behavioral subtyping Proceedings of the 8th European software engineering conference held jointly with 9th ACM SIGSOFT international symposium on Foundations of software engineering, (229-236)
- Findler R, Latendresse M and Felleisen M (2019). Behavioral contracts and behavioral subtyping, ACM SIGSOFT Software Engineering Notes, 26:5, (229-236), Online publication date: 1-Sep-2001.
Recommendations
Adding Examples into Java Documents
ASE '09: Proceedings of the 24th IEEE/ACM International Conference on Automated Software EngineeringCode examples play an important role to explain the usage of Application Programming Interfaces (APIs), but most API documents do not provide sufficient code examples. For example, for the JDK 5 documents (JavaDocs), only 2% of APIs have code examples. ...