Tuesday, December 6, 2022

 

The Architecture Driven Modernization process comprises of two main steps: the Knowledge Discovery Metamodel (KDM) model extraction and metric report generation. The process can be walked through in this manner. The source code is converted into an Abstract Syntax Tree model using a Code-to-Model transformation. The Abstract Syntax Tree model is converted into a KDM model using a model-to-model transformation. The KDM model converts to a metrics model using another model-to-model transformation. Finally, a metrics report is generated from the metrics model using a model-to-text transformation.


If we take the example of a set of SQL statements converted to Pl/SQL Abstract Syntax Tree Metamodel, it will consist of definitions like RDBTableDefinition, RDBColumnDefinition and such others, primitive types which consist of RDBTableType, RDBColumnType, RDBDatabaseType and such others, statements that comprise RDBSelectStatement, RDBModifyStatement, RDBInsertStatement and such others, BinaryExpressions such as RDBSelectExpression, RDBHostVariableExpression and such others.

When the models are extracted from the GPL code, the main task is the collecting scattered information for creating the model elements from source code. The scattering occurs due to the references between the elements. When such references are explicit in the models, they are implicitly established in the source code with the use of identifiers such as the reference between a variable and its declaration. Transforming an identifier-based reference into an explicit reference involves looking for the identified element in the source code. Dedicated parsers result from this challenge. This scattering problem requires complex processing to locate the correspondences between source code and the model elements. A powerful XPath like language specially built for resolving references can help here.


If we take the example of a set of SQL statements converted to Pl/SQL Abstract Syntax Tree Metamodel, it will consist of definitions like RDBTableDefinition, RDBColumnDefinition and such others, primitive types which consist of RDBTableType, RDBColumnType, RDBDatabaseType and such others, statements that comprise RDBSelectStatement, RDBModifyStatement, RDBInsertStatement and such others, BinaryExpressions such as RDBSelectExpression, RDBHostVariableExpression and such others.

With the popularity of machine learning techniques and softmax classification, extracting domain classes according to syntax tree meta-model and semantic graphical information has become more meaningful. The two-step process of parsing to yield Abstract Syntax Tree Meta-model and restructuring to express Abstract Knowledge Discovery Model becomes enhanced with collocation and dependency information. This results in classifications at code organization units that were previously omitted. For example, code organization and call graphs can be used for such learning as shown in reference 1. The discovery of KDM and SMM can also be broken down into independent learning mechanisms with the Dependency Complexity being one of them.  

No comments:

Post a Comment