Model-Driven Development approach became popular in past years. Domain-specific profiles are defined for various domains and tools are used to transform models using these profiles to source code artifacts. However, rules need to be defined for the profile elements usage so the transformation can be eective and reliable. This paper deals with an approach of expressing these rules using spe- cial type of metamodel with UML class diagrams with the stereotypes defined in the profile - we call them constraint diagrams. Each class in this metamodel represent all classes in the model with the same stereo- type. Using stereotyped associations, we can link classes with dierent stereotypes and restrict the usage of such stereotype only to relations between specific stereotyped classes in the model. OCL constraints can be generated from the constraint diagram to enable validation of the model according to the rules in the metamodel. This paper deals with the description of the constraint diagram creation and OCL constraints generation.
['Zdenek Rybola', 'Karel Richta']
Using OCL in Model Validation According to Stereotypes.