Mechanism: Source Transformations

Intent

Source transformations, like binary transformations, rewrite portions of an application to introduce new functionality. The difference is that source transformations operate on the source code whereas binary transformations operate at the object or machine code.

Also Known As

Source patch files.

Motivation

A scenario that illustrates a problem and how the different elements of the mechanism solve the problem. The scenario will help you understand the more abstract description of the mechanism below.

Applicability

What are the situations in which the mechanism can be applied? What are examples of poor designs that the mechansim can address? How can you recognize these situations?

Participants

The elements participating in the mechanism and their responsibilities.

Collaborations

How the participants collaborate to carry out their responsibilities.

Consequences

Source transformations have the following benefits:

  1. They are composable.
  2. They act as application-level behavior mix-ins.
  3. They simplify analysis.

Source transformations have the following limitations:

  1. They require access to source code.
  2. They confound debugging.

Implementation

What pitfalls, hints, or techniques should you be aware of when implementing the mechanism? Are there language-specific issues?

  1. Description of Bullet

Known Uses

Jack C. Wileden's PolySpin and JavaSpin are examples of the source transformation mechanism. Refine is a second example.

Related Mechanisms

?


Back to the Adaptation home page. This page maintained by Peyman Oreizy (peymano at ics.uci.edu). Last updated on .