Refactoring with contracts

被引:2
|
作者
Goldstein, Maayan [1 ]
Feldman, Yishai A. [2 ]
Tyszberowicz, Shmuel [3 ]
机构
[1] Tel Aviv Univ, Sch Comp Sci, IL-69978 Tel Aviv, Israel
[2] Interdisciplinary Ctr, Efi Arazi Sch Comp Sci, Herzliyya, Israel
[3] Acad Coll Tel Aviv Yaffo, Sch Comp Sci, Tel Aviv, Israel
来源
基金
以色列科学基金会;
关键词
D O I
10.1109/AGILE.2006.44
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:53 / +
页数:2
相关论文
共 50 条
  • [1] An Abstract Interpretation Framework for Refactoring with Application to Extract Methods with Contracts
    Cousot, Patrick
    Cousot, Radhia
    Logozzo, Francesco
    Barnett, Michael
    [J]. ACM SIGPLAN NOTICES, 2012, 47 (10) : 213 - 232
  • [2] Synthesis-Powered Optimization of Smart Contracts via Data Type Refactoring
    Chen, Yanju
    Wang, Yuepeng
    Goyal, Maruth
    Dong, James
    Feng, Yu
    Dillig, Isil
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2022, 6 (OOPSLA):
  • [3] "Refactoring" Refactoring
    Waguespack, Leslie J.
    Babb, Jeffry S.
    Yates, David J.
    [J]. PROCEEDINGS OF THE 50TH ANNUAL HAWAII INTERNATIONAL CONFERENCE ON SYSTEM SCIENCES, 2017, : 4665 - 4674
  • [4] Refactoring
    Fowler, M
    [J]. ICSE 2002: PROCEEDINGS OF THE 24TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, 2002, : 701 - 701
  • [5] Refactoring
    Ralf Reißing
    [J]. Informatik-Spektrum, 1999, 22 (3) : 210 - 211
  • [6] Refactoring
    Fowler, M
    [J]. TECHNOLOGY OF OBJECT-ORIENTED LANGUAGES AND SYSTEMS - TOOLS 34, PROCEEDINGS, 2000, : 437 - 437
  • [7] Refactoring as a Lifeline: Lessons Learned from Refactoring
    Abdel-Hamid, Amr Noaman
    [J]. 2013 AGILE CONFERENCE (AGILE), 2013, : 129 - 136
  • [8] Refactoring Inspection Support for Manual Refactoring Edits
    Alves, Everton L. G.
    Song, Myoungkyu
    Massoni, Tiago
    Machado, Patricia D. L.
    Kim, Miryung
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2018, 44 (04) : 365 - 383
  • [9] Refactoring Graphs: Assessing Refactoring over Time
    Brito, Aline
    Hora, Andre
    Valente, Marco Tulio
    [J]. PROCEEDINGS OF THE 2020 IEEE 27TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER '20), 2020, : 367 - 377
  • [10] Manual Refactoring Changes with Automated Refactoring Validation
    Ge, Xi
    Murphy-Hill, Emerson
    [J]. 36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014), 2014, : 1095 - 1105