Model Transformation Development Using Automated Requirements Analysis, Metamodel Matching, and Transformation by Example

作者是KCL的Kevin Lano。

Abstraction

In this article, we address how the production of model transformations (MT) can be accelerated by automation of transformation synthesis from requirements, examples, and metamodels. We introduce a synthesis process based on metamodel matching, correspondence patterns between metamodels, and completeness and consistency analysis of matches. We describe how the limitations of metamodel matching can be addressed by combining matching with automated requirements analysis and model transformation by example (MTBE) techniques.
We show that in practical examples a large percentage of required transformation functionality can usually be constructed automatically, thus potentially reducing development effort. We also evaluate the efficiency of synthesised transformations.
Our novel contributions are:

  • The concept of correspondence patterns between metamodels of a transformation.
  • Requirements analysis of transformations using natural language processing (NLP) and machine learning (ML).
  • Symbolic MTBE using “predictive specification” to infer transformations from examples.
  • Transformation generation in multiple MT languages and in Java, from an abstract intermediate language.

Introduction

Model Transformations (MT)是MDE的关键要素。大型手动转换成本高管理难[9] [49]。元模型匹配技术[1] [17] [31]

四个困难:1、匹配方法只能找到一种转换,但实际上有多种;2、穷举搜索复杂度高;3、无法检测源和目标的关系;4、通常只处理单一语言转换的场景。

  • (i) many different transformations may be possible between two given metamodels, and a matching approach typically only detects a single transformation;
  • (ii) exhaustive search for possible matches becomes infeasible even for cases of moderate size (around 25 to 30 metaclasses in the combined metamodels);
  • (iii) detailed functional relationships between source and target data, such as applications of specific numeric or string functions, cannot normally be detected;
  • (iv) the process is usually directed to and optimised for producing transformations in a single MT language.

MTBE(Transformation by example)处理1-3的问题,使用$\mathcal{T}\mathcal{L}$[48]处理4的问题。

Transformation synthesis process.

图展示了整体流程。其中$\tau _{re}\tau _{mm}\tau _{cc}\tau _{f}$是映射的三个中间量。

研究问题:

  • RQ1 : To what extent can automated metamodel matching be combined with interactive enhancement of matchings to accurately capture the mapping rules of an intended transformation?匹配的程度
  • RQ2 : Can automated requirements analysis using NLP/ML and MTBE techniques improve the accuracy of the approach compared to stand-alone metamodel matching?本文的NLP+MTBE技术能否提高准确性
  • RQ3 : Can the combined approach engineer transformations with appropriate correspondence and design patterns?
  • RQ4 : Can the combined approach produce efficiently executable transformations?

Illustrative Example: Gantt2CPM

本文用到的一个例子:甘特图到CPM网络。介绍了该MT的原则。

Scope and bcakground

Scope of the Approach

对于M2M问题,根据[55]进行分类:

  • (General) migration 抽象层级相同但元模型不同
  • Evolution migration 一个元模型版本变更
  • Refinement 高抽象层级向低抽象层级映射
  • Abstaction 低抽象层级向高抽象层级映射
  • Code generation 从设计规范模型生成代码
  • Semantic mapping 将源模型映射到有形式化语义的模型
  • Bidirectional(Bx) 双向映射,支持模型同步和变更传播
  • Refactoring 单个模型转换

$\mathcal{T}\mathcal{L}$ Transformation Repersentation

使用$\mathcal{T}\mathcal{L}$语法描述转换过程。包括集合的划分、符号标识、每个环节的输入输出和$\tau _{re}\tau _{mm}\tau _{cc}\tau _{f}$符号对应的环节。

Natural Language Processing and Machine Learning

介绍了NLP的主要技术类型和划分词义的种类和机器学习的基本概念。

Automated MT Requierments Analysis

如果转换过程存在自然语言需求声明,原则上可以应用NLP技术提取有关转换预期映射的一些信息,有助于元模型匹配。

Automated Requirements Analysis Using NLP

使用NLP对Gantt2CPM案例进行需求分析。
首先使用Stanford POS tagger标记需求语句中的词类型,然后构建语法树。创建了CART决策树作为分类器,对需求语句中的关键词类型进行识别。

Tool Support for MT Requirements Analysis

在工具中如何使用的说明。

Metamodel Correspondence Patterns

这篇文章太长太难,还没看完,先记到这里……

Occurrence of Correspondence Patterns in Practice

Catalogue of Correspondence Patterns

Correspondence Patterns in Gantt2CPM

Tool Support for Recognising Correspondence Patterns

Metamodel Matching Techniques

Metamodel Matching Concepts

Similarity Measures for Metamodel Matching

Metamodel Matching for the Gantt2CPM Case

Tool Support for Metamodel Matching

Transformation Correction and Enhancement

Completeness and Consistency Analysis

Specification Enhancement for the Gantt2CPM Case

MTBE Using Perdictive Specification

Empirical Study of Transformation Mappings and Conditions

Correction and Extension of Transformations using MTBE

MTBEfortheGantt2CPMCase

Tool Support for MTBE

Transformation Synthesis

Synthesis of UML-RSDS and Java

Transformation Synthesis for the Gantt2CPM Case

Tool Support for Transformation Synthesis

Evaluation

RQ1:Correspondence Recognition

RQ2:Contributions of Automated Requirements Analysis and MTBE

RQ3:Transformation Design

RQ4:Transformation Efficiency

Threats to Validity

Threats to Internal Validity

Threats to External Validity

Threats to Construct Validity

Threats to Content Validity

Threats to Conclusion Validity

Automated Requirements Engineering

MTBE Approaches

Correspondence Patterns

Metamodel Matching Approaches

Summary

Limitations and Future Work

Conclusions

个人总结

参考文献
[9]L. Burgueno, J. Cabot, and S. Gerard. 2019. The future of model transformation languages: an open community discussion J. Obj. Technol. 1–11. Retrieved from www.jot.fm/issues/issue_2019_03/article7.pdf.
[49]K. Lano, Q. Xue, and S. Kolahdouz-Rahimi. 2020. Agile Specification of Code Generators for Model-Driven Engineering. In Proceedings of ICSEA 2020. IARIA, 9–15.
[1]L. Addazi, A. Cicchetti, J. D. Rocco, D. D. Ruscio, L. Iovino, and A. Pierantonio. 2016. Semantic-based model matching with emfcompare, me workshop, models. CEUR-WS 1706, 40–49.
[17]S. Fang and K. Lano. Extracting correspondences from metamodels using metamodel matching. In STAF 2019. Retrieved from CEUR-WS.org/vol-2405/02_paper.pdf.
[31]M. Kessentini, A. Ouni, P. Langer, M. Wimmer, and S. Bechikh. 2014. Search-based metamodel matching with structural and syntactic measures. Journal of Software and Systems 97, 2014 (2014), 1–14.
[48]K. Lano, S. Fang, and S. Kolahdouz-Rahimi. TL: An abstract specification language for bidirectional transformations. MODELS’20 Comp. Proc. 77 (2020), 1–10.