摘要: 为实现模型的自动转换,通过定义一个清晰的基于规则的模型转换框架,提出了一种基于有限状态机的模型转换方法,用有限状态机技术解决转换规则的实现问题,并定义了适合规则实现机制的形式表示法,然后结合UML 模型到SQL 模型转换的典型场景,通过一个模型转换示例说明模型转换方法的具体应用,结果表明了该方法的可行性和有效性。该方法适用于状态明显的模型之间的转换,促进了模型自动转换的应用和发展。
关键词:
模型驱动开发;模型转换规则;有限状态机
Abstract: For the implementation of viable model auto-transformation, this paper defines a clear model transformation architecture, it brings forward a finite-state-machine-based model transformation method, and then defines a formal representation to adapt the transformation rule’s execute mechanism. Combining with the special scene that UML model is transformed into SQL model, this paper adopts a model transformation example to demonstrate the actual application, the result demonstrates that the model transformation method is valid and feasible. The method can be used between models with obvious states, it promotes the application of the method auto-transformation.
Key words:
Model driven development; Model transformation rule; Finite state machine
颜玉兰,何克清,刘 进. 一种基于有限状态机的模型转换方法[J]. 计算机工程, 2006, 32(1): 93-95.
YAN Yulan, HE Keqing, LIU Jin. A Method of Model Transformation Based on Finite State Machine[J]. Computer Engineering, 2006, 32(1): 93-95.