Inferring visual contracts from Java programs
journal contributionposted on 2018-10-16, 15:34 authored by Abdullah Alshanqiti, Reiko Heckel, Timo Kehrer
Visual contracts model the operation of components or services by pre- and post-conditions formalised as graph transformation rules. They provide a precise intuitive notation to support testing, understanding and analysis of software. Their detailed specification of internal data states and transformations, referred to as deep behavioural modelling, is an error-prone activity. In this paper we propose a dynamic approach to reverse engineering visual contracts from Java based on tracing the execution of Java operations. The resulting contracts give an accurate description of the observed object transformations, their effects and preconditions in terms of object structures, parameter and attribute values, and their generalised specification by universally quantified (multi) objects, patterns, and invariants. While this paper focusses on the fundamental technique rather than a particular application, we explore potential uses in our evaluation, including in program understanding, review of test reports and debugging.
CitationAutomated Software Engineering, 2018, 25 (4), pp 745–784
Author affiliation/Organisation/COLLEGE OF SCIENCE AND ENGINEERING/Department of Informatics
- AM (Accepted Manuscript)