Search:
  • research
  • teaching
  • events
  • services
  • people
  • wiki
  • home
  • sitemap
  • contact
  • research
    • ACE
    • Condor
    • ConTraCT
      • Composition Details
      • Eclipse-Plugin
      • Publications
      • Contact
    • Cultivate
    • Darwin
    • Gilgul
    • JMangler
    • JTransformer
    • LogicAJ
    • PatchWork
    • PDT
    • SVF
    • Tailor
    • Teaching XP
    • All Publications

ConTraCT

ConTraCT is an Eclipse Plugin which allows for static composition of a refactoring chain into one equivalent refactoring.

Why Compose Refactorings?

The number of useful refactorings increases steadily. Beyond Fowler's catalog of refactorings other catalogs have been formulated:
  • refactorings in the context of JUnit Tests
  • refactoring to patterns
  • refactoring to aspects
These refactorings have in common that they are often composed from sequences of refactorings described in Fowler's catalog. Therefore, a notion of refactoring composition is needed.

How to Compose Refactorings?

A conditional transformation (CT) is a sequence of program transformations associated with a precondition that ensures their correct execution. The transformation sequence is executed on a given program only if the guarding precondition is true for that program. In the case of a refactoring the precondition ensures that the transformation is behavior preserving.

A refactoring chain is a sequence of CTs that need to be executed atomically, in order to avoid leaving the refactored program in an inconsistent state (if one of the precoditions fails in the middle of executing the sequence). Executing a CT chain means that we execute all its constituent CTs or none.

For refactoring chains ConTraCT is able to calculate one single composed refactoring that is functionally equivalent but easier to understand and more efficient. The validity of its unique precondition ensures that no failures can happen during the transformation sequence. Read more about the details of computing the joint precondition.

Why this name?

The name "ConTraCT" is an acronym for "(Con)ditional (Tra)nsformation (C)omposition (T)ool".