Coupled Software Transformations — Extended
Coupled Software Transformations — Extended
复制标题
耦合软件转换——扩展
DOI:
10.1007/978-3-540-72524-4_74
复制
发表时间:
2007
期刊:
影响因子:
56.9
通讯作者:
R. Lämmel
中科院分区:
文献类型:
--
作者:
R. Lämmel
We identify the category of coupled software transformations, which comprises transformation scenarios involving two or more artifacts that are coupled in the following sense: transformation at one end necessitates reconciling transformations at other ends such that global consistency is reestablished. We describe the essence of coupled transformations. We substantiate that coupled transformation problems are widespread and diverse. 1. Definition of the subject matter Everyone is used to two common categories of software transformations: type-preserving transformations (also called rephrasing in [15], but other terms are around as well) vs. type-changing transformations (mostly called translations in the literature). We use the term type as a placeholder for format, grammar, schema, language, meta-model, and others. (Here, we do not necessarily restrict ourselves to context-free structure.) A type-preserving transformation asserts the same type for input and output. For instance, program optimisers and program normalisers are of that kind. A type-changing transformation maps data according to one type to data according to another type. For instance, language compilers, application generators, and PIM-to-PSM transformations in MDA are of that kind. Many transformation scenarios are of a more complex shape. Most notably, one often ends up wanting coupled transformations — the subject of this paper. By this, we mean that ... ... two or more artifacts of potentially different types are involved, while transformation at one end necessitates reconciling transformations at other ends such that global consistency is reestablished. We note that any kind of coupled transformation problem must instantiate the notion of consistency for the involved kinds of artifacts. A coupled transformation starts from and finishes with a consistent conglomeration of artifacts. Any kind of coupled transformation problem must also instantiate the notion of reconciliation, which defines how transformations of one artifact affect all the other artifacts. We emphasise that we use the term software transformation rather than the more restrictive term program transformation. That is, we do not restrict ourselves to the transformation of source code. Hence, transformations of data, nonexecutable specifications, grammars, meta-models, documentation, and other artifacts are included. We also emphasise that we do not restrict ourselves to information-preserving (or semantics-preserving) transformations because enhancements or reductions should be included as well. For instance, evolutionary transformations require such generality; see the various transformation properties for (rule-based) programs in [19]. 2. An example related to software evolution Consider an information system that uses a relational database for data management, and all functionality is implemented in 2nd – 4th generation languages (“2–4GLs”). We are faced with artifacts such as the following: the relational model, which is implemented as the database schema in the database; 4GL forms for user-interface components; 4GL reports; SQL or PL/SQL fragments that contribute to 4GL sources; embedded SQL code in the 2–3GL code; 2– 3GL programs with data structures that rehash some of the relational model. There are various evolution scenarios that call for coupled transformations. For instance, we might face a change request that is phrased as a modification at the level of the database schema. This primary modification must be completed by a database instance mapping. Furthermore, all the 2–4GL code is likely to require modification as well. So we have to adapt SQL and PL/SQL snippets, we have to adapt embedded SQL code, and even native 2–4GL code because of the way it commits to the database schema. All these adaptations are coupled. Consistency is here about the use of the same relational model in the different code artifacts. So this is definitely a coupled transformation problem. It is a different question whether or not one succeeds to provide an effective implementation of the scenario, which would need to include an operational reconciliation for all the code artifacts relative to an evolving database schema. 3. The purpose of this text The general category of coupled software transformations has not been identified previously — even though specific transformation techniques do exist, and quite some amount of related research is being pursued; see, e.g., [5, 11, 26, 29, 22, 17, 10]. So giving finally a name to this category is perhaps useful as such. We go further than that: in Sec. 4, we will describe the essence of coupled transformations. Coupled transformation problems are ubiquitous; they are encountered in various disciplines of computer science, e.g., in language processing, generative programming, automated software engineering, software re-engineering, model-driven architecture, and database re-engineering. In Sec. 5, we will enumerate some problem domains in which coupled transformations are relevant. The understanding of coupling differs radically for these domains. 4. The essence of coupled transformations Without loss of generality, we will consider reconciliation for two artifacts. Let and be the types of the artifacts. We assume a consistency relation on and . We are given two concrete artifacts and such that holds. We consider a type-preserving transformation on , denoted by , and we apply this transformation to such that we obtain . Then, the reconciliation issue is about determining a suitable such that holds. We summarise selected reconciliation options in Fig. 1; continuous arrows visualise transformations; dashed arrows visualise consistency claims. The first option in the figure, no reconciliation, is merely there to provide a good starting point for the discussion. If is known to be restricted such that is changed without challenging consistency, then we can just keep — as is. For instance, using SQL’s data manipulation language on a database instance does not affect the underlying database schema. So this sort of restricted instance transformation does not trigger a schema transformation. Clearly, the inverted situation, where the database schema is transformed, is not covered by this trivial option. The second option in the figure, degenerated reconciliation, is still trivial. We assume that the concrete artifacts of type are derivable from the concrete artifacts of type Trivial option: no reconciliation