The C-SAW project is a DARPA supported effort that is being conducted by members of the Software Composition and Modeling Laboratory (SOFTCOM) at the University of Alabama at Birmingham (UAB). This project is in collaboration with the Institute for Software Integrated Systems (ISIS) at Vanderbilt University. The following is a brief overview of the project goals.
Aspect Model Weaving
In system modeling, constraints may be specified throughout the nodes of a model to stipulate design criteria and limit design alternatives. We have discovered that a lack of support for separation of concerns with respect to constraints can pose a difficulty when creating domain-specific models. The scattering of constraints throughout various levels of a model makes it hard to maintain and reason about their effects and purpose.
In conventional system modeling tools, any change to the intention of a global property requires visiting and modifying each constraint, for every context, representing the property. This requires the modeler to “drill-down” (i.e., traverse the hierarchy by recursively opening, with the mouse, each sub-model), manually, to many locations of the model. It is common for system models to contain thousands of different modeling elements with hierarchies that are ten or more levels deep. The interdependent nature of each constraint makes change maintenance a daunting task for anything but a simple model. The benefits of a single model representation of a product family are nullified because the “Parnasian” objectives of changeability, comprehensibility, and independent development are sacrificed in the presence of crosscutting constraints.
To provide better support for exploring design alternatives in the presence of crosscutting model properties, we have applied an aspect-oriented approach to modeling. The C-SAW weaver framework serves as a generalized transformation engine for manipulating models. C-SAW is a plug-in for the Generic Modeling Environment (GME). When C-SAW is invoked from the GME toolbar, the user is asked to provide a set of files that specify modeling aspects that describe the location and behavior of the transformation to be performed on the model. The result of model weaving is a new model that contains adaptations that are spread across the model hierarchy. These adaptations can be undone and new concerns can be weaved from simply selecting different model aspects. The concept of a model weaver can be used in many ways beyond the application of constraints. For example, a weaver can be used to distribute any system property endemic to a specific domain across the hierarchy of a model. A weaver can also be used to instrument structural changes within the model according to the dictates of some higher-level requirement that represents a crosscutting concern.
Model Driven Program Transformation
The most popular model-driven approach is the Object Management Group’s initiation of the Model-Driven Architecture (MDA), which separates application domain logic from the underlying execution platform (please see http://www.omg.org/mda/). The overwhelming majority of early MDA efforts are of the translational, or synthesis style. That is, new software artifacts are being generated whole-scale from properties that are refined from platform-independent models, down to platform-specific models, eventually leading to code.
Yet, there are literally several hundred billion lines of legacy code in production use. To apply model-based techniques to such systems, it is beneficial to have an approach that is also transformational (i.e., one that actually modifies the source code representation) in order to add features to an existing code base. There are two primary factors that make it difficult to achieve true transformation of legacy source code from models:
· The translators that convert the models into other artifacts would have to possess the ability to parse the underlying source. Thus, complex parsers must be built into the model translator. If a goal of the modeling environment is to achieve language-independence, then a new parser must be integrated into the model translator for each language that is to be supported. This is very time consuming, if not unfeasible.
· Even if a mature parser is constructed for the underlying source, it is then necessary to provide a transformation engine to perform the adaptations to the source that are specified in the model. This also is a laborious task.
We observe that the two difficulties enumerated above can be ameliorated by harnessing the power of a program transformation system and integrating it within a tool chain that provides the supporting parsers and transformation engine. We have conducted initial experimentation into a synergistic technique that unites model-integrated computing with a commercially available program transformation engine.
Two-Level Aspect Weaving
The concept of aspect model weaving, when combined with the idea of model driven program transformation, provides a powerful technology for rapidly transforming legacy systems from high-level properties described in models. The goal is to have small changes at the modeling level trigger very large transformations at the source level. This can be achieved by applying aspect-oriented techniques and program transformation concepts. At one level, model transformations allow alternative design configurations to be explored using an aspect weaver targeted for modeling tools. From generative programming techniques, the models can be used to generate program transformation rules to adapt legacy source on a wide-scale.
Availability
There are several papers that have been written to describe the approach. The C-SAW weaver itself also is available for download. If you are not interested in downloading the actual weaver, but would like to see a demo of the project, there are several video demos available in numerous formats.
Explanation of the Name: The C-SAW project name is derived from the realization that a crosscutting saw, or c-saw, cuts across the grain of wood. Similarly, our aspect model weaver assists in distributing properties that cut across the hierarchy of a model.