skip to main content
Adding Contracts to Java with HandshakeDecember 1998
1998 Technical Report
Publisher:
  • University of California at Santa Barbara
  • Computer Science Dept. College of Engineering Santa Barbara, CA
  • United States
Published:09 December 1998
Reflects downloads up to 25 Dec 2024Bibliometrics
Skip Abstract Section
Abstract

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

  1. ACM
    Hirschfeld R, Perscheid M, Schubert C and Appeltauer M Dynamic contract layers Proceedings of the 2010 ACM Symposium on Applied Computing, (2169-2175)
  2. 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)
  3. 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)
  4. ACM
    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)
  5. 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.
  6. ACM
    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)
  7. 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)
  8. Karaorman M and Abercrombie P (2018). jContractor, Formal Methods in System Design, 27:3, (275-312), Online publication date: 1-Nov-2005.
  9. 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.
  10. 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)
  11. 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.
  12. 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.
  13. 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.
  14. ACM
    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.
  15. ACM
    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)
  16. ACM
    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)
  17. ACM
    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.
Contributors
  • University of Aberdeen

Recommendations