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.