Software models are not just great for learning
about software, but they are essential to software modernization, which usually
consists of three steps: reverse engineering, restructuring and forward
engineering. When extracted from legacy
software, models are easier to transform to a different architecture such as
microservices. This activity could be performed by tools to bridge grammarware
and model-driven technical spaces. Such dedicated parsers could also come with
a query language that eases the retrieval of scattered information in syntax
trees. It could also incorporate extensibility and grammar reuse mechanisms.
Model driven software development raises the
level of abstraction and automation in the construction of software. Although
commonly used for building new software systems, models also have the potential
to evolve existing systems. They help to reduce the software evolution costs
and improve the quality of the artifacts. Migration and modernization can both
benefit from model driven approaches. A set of standard metamodels have been
popularized by solutions and tools which represent the information normally
managed in modernization tasks. This is true for language-to-language
migrations as well where the first step is to extract models from the
application code written in source language. Similarly, in a modernization
effort, models could be extracted from schemas to improve the data quality.
When these initial models are obtained, transformations can then be applied to
generate higher level abstraction models followed by generation of artifacts
such as code in another language or an improved data schema. Other operations
on models such as model comparisons and synchronizations can also be applied.
The relationship between pairs of concepts
grammar or program and metamodel or model is an example of a bridge between two
different technical spaces specifically grammarware and modelware. Dedicated
parsers are implemented to obtain models from code conforming to a grammar.
These parsers perform model generation tasks in addition to code parsing.
First, a syntax tree is created from the source code by static analysis and
then this syntax tree is traversed to obtain the information needed to create
the model elements. This is a complex task which requires both collecting
scattered information and resolving references in the syntax tree.
Model transformations are classified into three
categories which include text to model transformations which obtain models from
existing source code; model-to-model transformations whose input and output are
models; and models-to-text transformations, which generate software artifacts
from a source model. When a model transformation language is designed, two key
design choices are how to express the mappings between source and target
elements and how to navigate through the source artifact. The former involves
binding, and the latter involves querying.
Certain improvements can be imagined with the use
of 1) reuse mechanisms at rule-level 2) a new kind of rule for dealing with
expressions efficiently, and 3) an extensibility mechanism to add new
operators. New functionalities could also target expressiveness, usability, and
performance.
No comments:
Post a Comment