模型转换主要用于模型的演化、求精以及重构.模型转换需要遵循一定的约束规则以保持模型的某些特性.模型演化通常要求保持已有的接口;模型重构则必须保证重构前后的软件具有相同的外部行为特性.为了严格证明某个模型转换规则是否满足这些约束,特性保持约束必须形式化地加以描述.为了实现证明过程的自动化,需要总结通用的证明过程并给出实现算法.提出了一种基于图转换的特性保持约束描述机制,将模型演化与重构中的转换规则以及特性保持约束都描述为图转换规则.借助图转换的冲突检测机制,给出了严格证明转换规则是否满足特性保持约束的算法.
Model transformations are heavily used in model evolution, refinement and refactorings. Model transformations are carried out against certain constraints to preserve certain properties of the models. During model evolution, model transformations should preserve system interfaces; during model refactoring, model transformations should preserve system behaviors. In order to prove that a software transformation satisfies transformation constraints, constraints should be formalized first. And in order to automate the proof, the process of the proof should be universal to be sup.ported by algorithms. This paper proposes an approach for formalizing transformation constraints with graph productions. With the formalized constraints and software transformation rules, an algorithm is also proposed based on critical pair analyzing technologies to automatically prove whether a transformation rule satisfies a transformation constraint or not. The proposed approach is validated with a motivating example used throughout the paper.