1 **template** SCMAModel **main context**

![0_image_0.png](0_image_0.png)

2 : e l em e n t s ; 3

![0_image_1.png](0_image_1.png)

![0_image_2.png](0_image_2.png)

Fig. 10. **Linking the grammar and the metamodel of** s-COMMA **with TCS.**
Several ATL transformations are used to check source models. We transform a source CP model to a model conform to the metamodel Problem defined in the ATL zoo3. A Problem **model corresponds to a set of** Problem **elements. This**
concept is only composed of three features:

- severity **is an attribute with an enumerated type which possible values are:**
error, warning and critic.

- location **is a string used to store le location of the problem in the source**
file.

- description **is a string used to defined a relevant message to descibe the**
problem.
Multiple ATL rules have been implemented to check models. Here is an extract of the list of properties to check:

- **Some type checking on expressions. Operands must have a consistent type**
with the operator. For instance, an equality operator may operate on arithmetic expressions.

- The consistency of variable domains : they must be based on constant expressions and interval domains must have a lower bound smaller than the upper bound.

- **No composition or inheritance loops in** s-COMMA.

## 5.3 Chaining Model Transformations

After the injection step or before the extraction step, models have to be transformed with respect to our pivot metamodel. All the refactoring steps presented in Section 4.2 are clearly not necessary in a transformation chain. Indeed, it clearly depends on the modeling structures of the source and target CP languages. The idea is to use most of constructs supported by the target language to have a target model close, in terms of constructs, to our source model. For 3 http://www.eclipse.org/m2m/atl/atlTransformations/\#KM32Problem