The C-SAW project was sponsored by NSF (2005-2007). Initial support (2002-2005) was provided by DARPA. The research was 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 (Dr. Aniruddha Gokhale) and the University of Connecticut (Dr. Swapna Gokhale). The following is a brief overview of the project goals.
Please note: This work was performed at UAB. The PI (Jeff Gray) has moved to the University of Alabama (in Tuscaloosa).
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. Transformations in C-SAW are specified in the Embedded Constraint Language (ECL). 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.
Video 3 demonstrates the idea of aspect weaving at the modeling level.
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.
Video 1 demonstrates the idea of model-driven program transformation without C-SAW.
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.
Video 2 demonstrates the idea of two-level aspect weaving.
Model Scalability through Replicators
In Model-Driven Engineering, it is often desirable to evaluate different design alternatives as they relate to scalability issues of the modeled system. A typical approach to address scalability is to create a base model that captures the key elements and their relationships. A collection of base models can be adorned with necessary information to characterize a specific scalability concern as it relates to how the base modeling elements are replicated and connected together. In current modeling practice, replication is usually accomplished by scaling the base model manually. This is a time-consuming process that represents a source of error, especially when there are deep interactions between model components. As an alternative to the manual process, this C-SAW supports the idea of automated model replication through a model transformation process that expands the number of elements from the base model and makes the correct connections among the generated modeling elements. Replication has been performed on case studies taken from models supporting different domains.
Videos 4 and 5 illustrate the concept of model replication using C-SAW.
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.