DocumentCode :
2379158
Title :
Refactoring with contracts
Author :
Goldstein, Maayan ; Feldman, Yishai A. ; Tyszberowicz, Shmuel
Author_Institution :
Sch. of Comput. Sci., Tel Aviv Univ.
fYear :
2006
fDate :
23-28 July 2006
Lastpage :
64
Abstract :
Design by contract is a practical methodology for developing code together with its specification. The contract consists of class invariants and method pre-and 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
Keywords :
contracts; formal specification; object-oriented programming; program compilers; software reusability; Eclipse; Java expressions; code refactoring; contract modifications; design by contract; development environments; internal unit specifications; rename method; Computer languages; Computer science; Contracts; Design methodology; Educational institutions; Java; Runtime;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Agile Conference, 2006
Conference_Location :
Minneapolis, MN
Print_ISBN :
0-7695-2562-8
Type :
conf
DOI :
10.1109/AGILE.2006.44
Filename :
1667563
Link To Document :
بازگشت