Towards Dynamic Reverse Engineering Visual Contracts from Java
DOI:
https://doi.org/10.14279/tuj.eceasst.67.940Abstract
Visual contracts provide a concise and intuitive representation of preand postconditions for operations in object-oriented or component-based systems, which can be used for documentation, testing, or simulation. However, defining visual contracts to correctly describe the behaviour of existing classes or components requires a deep understanding of their data model and behaviour.
We propose an approach to automatically extract instantiated versions of visual contracts, or contract instances, by observing the changes an operation performs on the objects in a system. We describe and evaluate the approach and tool to extract contract instances using the case study of Java-based DOM implementation NanoXML.