jContractor: Introducing design-by-contract to Java using reflective bytecode instrumentation Design by Contract is a software engineering practice that allows semantic information to be added to a class or interface to precisely specify the conditions that are required for its correct operation. The basic constructs of Design by Contract are method preconditions and postconditions, and class invariants. This paper presents a detailed design and implementation overview of jContractor, a freely available tool that allows programmers to write “contracts” as standard Java methods following an intuitive naming convention. Preconditions, postconditions, and invariants can be associated with, or inherited by, any class or interface. jContractor performs on-the-fly bytecode instrumentation to detect violation of the contract specification during a program’s execution. jContractor’s bytecode engineering technique allows it to specify and check contracts even when source code is not available. jContractor is a pure Java library providing a rich set of syntactic constructs for expressing contracts without extending the Java language or runtime environment. These constructs include support for predicate logic expressions, and referencing entry values of attributes and return values of methods. Fine grain control over the level of monitoring is possible at runtime. Since contract methods are allowed to use unconstrained Java expressions, in addition to runtime verification they can perform additional runtime monitoring, logging, and analysis

References in zbMATH (referenced in 15 articles , 1 standard article )

Showing results 1 to 15 of 15.
Sorted by year (citations)

  1. Heidegger, Phillip; Bieniusa, Annette; Thiemann, Peter: Access permission contracts for scripting languages (2012)
  2. Coronato, Antonio; de Pietro, Giuseppe: Formal design and implementation of constraints in software components (2010)
  3. Bielova, N.; Dragoni, N.; Massacci, F.; Naliuka, K.; Siahaan, I.: Matching in security-by-contract for mobile code (2009)
  4. Liang, Hui; Dong, Jin Song; Sun, Jing; Wong, W.Eric: Software monitoring through formal specification animation (2009)
  5. Chen, Feng; D’amorim, Marcelo; Rosu, Grigore: Checking and correcting behaviors of Java programs at runtime with Java-MOP. (2006)
  6. Karaorman, Murat; Abercrombie, Parker: jContractor: Introducing design-by-contract to Java using reflective bytecode instrumentation (2005)
  7. Karaorman, Murat; Freeman, Jay: Jmonitor: Java runtime event specification and monitoring library. (2005)
  8. Leavens, Gary T.; Cheon, Yoonsik; Clifton, Curtis; Ruby, Clyde; Cok, David R.: How the design of JML accommodates both runtime assertion checking and formal verification (2005)
  9. Plösch, Reinhold: Contracts, scenarios and prototypes. An integrated approach to high quality software (2004)
  10. Chen, Feng; Rosu, Grigore: Towards monitoring-oriented programming: A paradigm combining specification and implementation. (2003)
  11. McKegney, Ross; Shepard, Terry: Techniques for embedding executable specifications in software component interfaces (2003)
  12. Abercrombie, Parker; Karaorman, Murat: Jcontractor: Bytecode instrumentation techniques for implementing design by contract in java. (2002)
  13. Brörkens, Mark; Möller, Michael: Dynamic event generation for runtime checking using the JDI. (2002)
  14. Cheon, Yoonsik; Leavens, Gary T.: A simple and practical approach to unit testing: The JML and JUnit way (2002)
  15. Lamm, Ehud: Adding design by contract to the Ada language (2002)