AGILE 2006 (AGILE'06) Refactoring with Contracts Minneapolis, Minnesota July 23-July 28 ISBN: 0-7695-2562-8
DOI Bookmark: http://doi.ieeecomputersociety.org/10.1109/AGILE.2006.44
Design by contract is a practical methodology for developing code together with its specification. The contract consists of class invariants and method preand postconditions. As the code is refactored, specifications of internal units change with the code. There are mutual influences between the code and the contract. The assertions that constitute the contract are Java expressions; refactorings such as Rename Method must change these assertions as well as the code. The contract has methodological implications, which serve as preconditions on some refactorings; these must be checked before performing those refactorings. In addition, some contract modifications follow from certain refactorings, and can be done automatically. Development environments that support design by contract must take these influences into account. We report on the implementation in Eclipse of several refactorings that involve both code and contract. These show how contracts are modified in response to code changes, how contracts prevent certain changes, and how new contracts are computed for newly-generated methods and classes.
Citation:
Maayan Goldstein, Yishai A. Feldman, Shmuel Tyszberowicz, "Refactoring with Contracts," agile, pp.53-64, AGILE 2006 (AGILE'06), 2006 Usage of this product signifies your acceptance of the Terms of Use. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||