I know the following:
- OCL is a constraint language that to specify constraints on my class diagram models
- I know, that in the OMG world for class diagrams there are 3 levels of models: M1 (model), M2 (meta-mode), M3 (meta-meta model)
- M3: defines what a class diagram is and what it consists of
- M2: Is the meta-model of my problem/domain (e.g.: meta-model of a shelf that contains books)
- M3: is the model instance (e.g: a Shelf that contains two specific books)
What i would like to know:
- Is there a a common meta-model for class diagrams and OCL; basically something that defines the relationship between model elements and constraints
- I suppose it should somehow be defined at M1 level
I am asking because:
- I would like to define a meta-model for a constraint language (lightweight OCL) that would allow for me to reason about my model elements (books on the shelf).
- How would i connect the meta-models of my domain and of my constraint language?