EMF Based Validation Methods of the Static Semantics of Models
Li Haibing, Ning Zhu, Lei Yonglin, Xiaobo Li, Zhu Yifan · 2015
A metamodel is a description language of models. To address the problem that validation rules of the SMP2 metamodel haven't been implemented by XML Schema, a method to enhance the accuracy of the model by adding static semantics to the SMP2 metamodel is proposed. Supposing to use Java language or OCL for constraints definition and use EMF for the validation of static semantics of SMP2 metamodel, two methods to validate static semantics of models based on Eclipse modelling framework, namely EMF Ecore validation and EMF validation framework extension, are analyzed in this paper. Java language and OCL are employed to implement constraints definition. Constraints specified formally based on OCL are executed via an OCL engine. On the basis of both validation methods, SMP2 metamodel constraints are to be described, modeled and validated using EMF validation methods.