A lot of progress has been made towards reverse-engineering program specification under the form of contracts. Ensuring the quality of such reverse-engineered contracts, referred to as likely invariants when using Daikon, is paramount since those contracts are used in several other contexts. One aspect that can influence the 'quality' of the reverse-engineered contracts is the configuration being used when executing Daikon. In this paper we evaluate the impact of two such configuration parameters which help the user control in two different ways how many variables of the program are considered by Daikon when inferring likely invariants. We perform a case study with a program equipped with test cases and high-level design contracts (i.e., design contracts produced before implementation) and systematically compare likely invariants reverse-engineered by Daikon to those contracts, thanks to a comparison framework we devised. Results confirm and complement previous works, whereby we show that: a good proportion of design contracts are correctly identified by Daikon as likely invariants, many design contracts are not discovered by Daikon, looking for design contract in the set of likely invariants amounts to searching for a needle in a haystack. Our experiment also allows us to suggest a cost-effective configuration when running Daikon.

Additional Metadata
Keywords case study, Daikon, design by contract, likely invariants, reverse-engineering
Persistent URL dx.doi.org/10.1109/QSIC.2014.46
Conference 14th International Conference on Quality Software, QSIC 2014
Citation
Rahman, F. (Farhana), & Labiche, Y. (2014). A comparative study of invariants generated by daikon and user-defined design contracts. Presented at the 14th International Conference on Quality Software, QSIC 2014. doi:10.1109/QSIC.2014.46