Century Support Part 4: Bridging generations with transformations

This guest article by Carsten Pitz is the fourth part on the subject of long-term support. In the first part Carsten describes the development of a documentation system in which second parthow the wrong start can quickly lead to problems. third part was about the human aspects.
This part now deals with a concrete concept, the transformation.
Guest article by Carsten Pitz
This and the following part are again technical in nature. The last part will deal with the topic of documentation and is rather non-technical.
We had already Part 2 In the section "An initial review", I noted that, due to unforeseeable changes in technology, an application architecture is no guarantee for 100+ years of product support. Nevertheless, as a passionate architect, I believe that an application architecture makes sense. We will understand in the course of this article that an application architecture is not only useful, but necessary for 100+ years of product support.
An application architecture is necessary for 100+ years of product support [tweetthis]An application architecture is necessary for 100+ years of product support[/tweetthis]
We are now working out how an application architecture must be designed to support 100+ years of product support.
Transformation
A change is a transformation from an existing to a new state. As abstract as this may sound at first, I believe that the transformability of the application is the key to enabling 100+ years of product support.
But what makes an application transformable? First, a short excursion: I deliberately chose the term transformation because it is a common term in mathematics. In mathematics, a transformation maps a representation of a fact into another representation.
As an example, the Fourier transformation decomposes continuous, aperiodic signals into a continuous spectrum. A representation as a function of time or location becomes a representation as a function of frequency or spatial frequency.
Nice, but how does this excursion help us? We can derive the requirements for a transformable something from mathematics. We need a formal representation for the transformable something to which a transformation rule can be applied.
In our context, this is the application architecture, from which we can generate both (1) the application itself and (2) a subsequent architecture using transformation rules.
MDSE, in medias res
And suddenly we're in the middle of MDSE (Model Driven Systems Engineering). Transformation 1 is a structure-preserving transformation and transformation 2 is a structure-changing transformation. And suddenly we are really in medias res with the MDSE.
About structure
In the discussion with Michael Jastram, it quickly became clear that we have different views on what structure is. Hence a brief explanation of my view of the term structure.
For me, the structure describes the division of behavior into functional units as well as the assignment of state to behavior. This sounds extremely complex at first, but it is not.
There are various approaches to cutting behavior into functional units, which can be classified as top-down, bottom-up and hybrid approaches. A top-down approach (e.g. FAST (Function Analysis System Technique)) generally leads to a different cut than a bottom-up approach (e.g. SOA (Service Oriented Architecture) or the usual procedure for developing HW for control computers from predefined components such as MCUs, switches, PHYs, etc.). While a top-down approach involves continuous, hierarchical refinement, a bottom-up approach involves assembling a system from (sub-)systems that are assumed to exist. One metric that, in my experience, is extremely different in both approaches is the Functional redundancy. However, the relationship graph between the entities is also fundamentally different. A strict hierarchical refinement always leads to a tree. A synthesis, on the other hand, leads to a superposition of trees, to a forest. In addition, the resulting degree of nodes is usually greater in a synthesis than in a decomposition.
In classic procedural programming (e.g. BASIC or FORTRAN 77), the entire system state is managed in global variables. With the introduction of the module concept (e.g. Modula2 or FORTRAN90), parts of the system state could be assigned to modules. A further evolutionary stage is object orientation, where objects form entities that encapsulate state and behavior. In my view, a significant difference in the assignment of state to behavior in object orientation compared to classical, structured programming and the module concept is that in object orientation, several objects (= instances) can be instantiated from a class (= template) at runtime. Each object encapsulates a part of the overall state.
As a small note: Encapsulating the partial state also implies in particular: protecting the partial state from external change. Object orientation therefore offers implicit "memory protection" and thus a means of ensuring freedom from interference via the design. This is independent of whether a realization is created from the object-oriented design model as software coded in C++ or MISRA C or as an ASIC specified in VHDL. If transformed to VHDL, the only restriction is that the instantiation of the objects must be static. As HW is static anyway, this is always the case in practice.
The fact that the relationship graphs are fundamentally different is also essential for the structure when assigning status to behavior.
Both aspects, the division of behavior into functional units and the assignment of state to behavior, determine the entities that make up the system as well as the relationships between these entities. For me, this is the structure of a system.
The structure of the system has an impact on the division of labor in the development team, configuration management, methods for error isolation, etc. But this is more of an idea for a separate article.
About Transformation
Like the term structure, the term transformation also needs to be explained in more detail, as discussions have shown. A transformation in the sense of this article series is a calculation rule with which a model is converted into another representation. Let us consider a simple summation as an example of a transformation: from an instance of a (data) model that contains several numerical values, an instance of a (data) model is created that contains exactly one numerical value, the sum. We cannot infer the summands from the sum. Accordingly, this transformation cannot be reversed.
A more complex example: We have two robot arms with a different number of degrees of freedom. We need to follow a trajectory that both robot arms can follow. The trajectory of the robot arm with fewer degrees of freedom can be transformed into a trajectory of the robot arm with more degrees of freedom. However, this transformation is not unique. The robot arm with more degrees of freedom has several possibilities to follow the trajectory. This applies not only to motion models, but to models in general. Accordingly, it is not possible to infer the underlying (source) model with a higher degree of freedom from a model derived from a model with a higher degree of freedom by means of a transformation.
For models relevant in the context of MDSE (MDA), a more abstract model has more degrees of freedom than a more concrete model. The block diagram of a control computer is more abstract than the circuit diagram (schematics). Let's assume we have a control computer with two MCUs with configurable pins. According to the block diagram, both MCUs communicate via SPI. This information cannot be reconstructed from the schematics. The circuit diagram (schematics) only contains connections between pins. It is not clear whether SPI or MII or I²C is realized via these connections.
This shows another characteristic of the transformations used in the MDSE (MDA) context. Some of these transformations cannot retain existing information and can therefore be lossy.
The transformations used in the context of MDSE (MDA) basically map a more abstract model into a more concrete representation and can also be lossy. Accordingly, these transformations are not reversible.
M2T & M2M
In the context of MDSE (MDA), M2T (model to text) and M2M (model to model) transformations are often referred to. However, this classification is purely technical. M2T and M2M only indicate whether the result is a text or a model representation (e.g. MOF). Thus, a model can be transformed into a text by means of an M2T transformation, which represents a structurally modified model in XMI format. This M2T transformation transforms a model into a structurally modified model.
... and back
But don't worry, even though MDSE has a steep learning curve, MDSE is quite manageable if a few simple basic rules are followed.
Another example
Before we get to the basic rules, a little motivation for MDSE. About 15 years ago, there was a profound change in the development of business applications. For new projects, the programming language Java was used instead of COBOL. One consequence was that the COBOL programming language became less and less popular and correspondingly few people learned the COBOL programming language. Well, you might think, then all I need is a handful of people who know both COBOL and Java and program a Java code generator for a COBOL compiler. This COBOL compiler generates Java code instead of object code. By the way, this compiler should of course also convert the COBOL source code comments into Java source code comments. A COBOL compiler of this kind is really not rocket science and there are a number of compilers of this kind (e.g. OpenCobol2Java). However, the numerous developers of these COBOL compilers have forgotten one aspect. This is why some are now using propagates a different approach.
Which aspect has been forgotten?
Along with the programming language, the methodology of software development has also changed. While COBOL codes were written according to the Structured programming method structured according to Michael A. Jackson, Java codes are structured according to the object-oriented programming (OOP) method. Although the converted COBOL codes were Java codes, they were initially difficult for Java developers to understand due to the completely different structure and could therefore only be maintained after familiarization. This aspect does not make this method a favored one.
But what is the structure of a source text?
The structure of the source code is simply the structure of the architecture of the source code.
What do structure-changing transformations do?
Accordingly, structure-changing transformations must also be taken into account. Structure-changing transformations transform the structure and therefore the architecture. Structure-changing transformations change the structure, such as the change from structured programming to object-oriented programming (OOP) mentioned above as an example.
Structure-preserving transformations, on the other hand, transform the representation. The representation in a model notation (e.g. UML/SysML) becomes a representation in a generally higher programming language (e.g. Java). The structure, the architecture, does not change with structure-preserving transformations. However, structure-preserving transformations can add content.
In anticipation of the last part, structure-preserving transformations can also be used to generate documentation from the models. This includes documentation for developers as well as documentation for users. When generating documents, structure-preserving transformations supplement the format (layout), headings or tables of contents, for example.
Design patterns & architecture
In order to change the structure of a source text, you must first change the Design pattern from the source code. Although this is possible in principle, it degenerates into a Sisyphean task due to different implementations of the same design pattern by different developers or even the same developer.
The architecture must define each design pattern as a single, reusable meta-architecture and only refer to the associated meta-architecture when using design patterns.
Meta architecture
In advance, a brief explanation of why I depict design patterns as meta-architectures. UML defines the four meta-levels M0 to M3. Starting with the reality as M0, via the model of this reality as M1, the meta-model (e.g. UML) on which the model of this reality is based as M2 and finally the meta-meta-model on which the meta-model is based, the MOF as M3.
If the UML tool supports this, my preferred approach is to extend the meta-model with the design patterns. For this I prefer a UML tool with a UML 2.x profile mechanism including full OCL support. However, no commercial UML tool that I know of offers this. Accordingly, all commercial UML tools I know of require programming against the respective proprietary internal data model. On the one hand, this is significantly more time-consuming, and on the other hand, this procedure is highly product-specific.
In line with the UML specification, I therefore call the mapping of the design patterns meta-architectures.
MDSE pays off
At least this statement applies in the context of Century Support. From a suitably constructed model, structure-preserving transformations can be used to
- the source text,
- the developer documentation and
- the user documentation
and with a structure-changing transformation
- the model into a new structure.
I believe this is incentive enough to follow the MDSE path.
The basic rules
The following three basic rules are common sense basic rules for systems engineering, regardless of the method used.
Explanation & Rationale: The title is loosely based on Albert Einstein. The simpler an architecture is, the easier it is to transform. However, the architecture must fulfill its purpose, in particular be self-contained. Accordingly, the architecture must not be simpler.
Explanation & Rationale: One and the same problem should always be solved within a model with one and the same problem solution.
However, this basic rule is not limited to design patterns. As a further example, the grouping of input data should always be carried out according to the same set of rules.
This means that only one transformation rule is required for the transformation of grouped input data.
Another advantage is that the generated artifact is always the same because the structures are always the same. In the example of input data, input masks generated from this would always have the same structure. This reduces the learning phase for users and prevents operating errors.
In addition, if a realization needs to be adapted due to an error or insufficient performance, only one transformation rule needs to be changed.
Explanation & Rationale: Quite simply: garbage in, garbage out!
What needs to be transformed?
Only the model (which also includes the interfaces) needs to be transformed. The model contains the necessary information. The transformation into a model of the next generation takes place via a transformation rule. But where should this come from? The transformation rule for the transformation of our model into the model of our successors does not even exist yet
Our next-generation successor defines the goals, requirements and structure for the next-generation model. We do not know the goals, i.e. the requirements, let alone the structure of the next generation model.
So we need a different approach.
The transformation goal: next generation model
But why do we need to know the requirements of the next generation model? We only need to enable the transformation by strictly adhering to the three basic rules.
What this means will be discussed in the next part.






