A CSP Approach for Meta Model Instantiation Adel Ferdjoukh , - - PowerPoint PPT Presentation

a csp approach for meta model instantiation
SMART_READER_LITE
LIVE PREVIEW

A CSP Approach for Meta Model Instantiation Adel Ferdjoukh , - - PowerPoint PPT Presentation

A CSP Approach for Meta Model Instantiation Adel Ferdjoukh , Anne-Elisabeth Baert, Annie Chateau, R emi Coletta and Cl ementine Nebut Montpellier, France null A CSP Approach for Meta Model Instantiation Summary 1 Model Driven Engineering


slide-1
SLIDE 1

A CSP Approach for Meta Model Instantiation

Adel Ferdjoukh, Anne-Elisabeth Baert, Annie Chateau, R´ emi Coletta and Cl´ ementine Nebut

Montpellier, France

slide-2
SLIDE 2

null

A CSP Approach for Meta Model Instantiation

Summary

1 Model Driven Engineering and Model Generation 2 Our approach: CSP for Model Generation 3 Experiments 4 Conclusion

  • 2-
slide-3
SLIDE 3

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation

Summary

1 Model Driven Engineering and Model Generation 2 Our approach: CSP for Model Generation 3 Experiments 4 Conclusion

  • 3-
slide-4
SLIDE 4

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Model Driven Engineering (MDE) A recent paradigm recommending the intensive use of structured models [?]. A model is defined by a meta model.

  • 4-
slide-5
SLIDE 5

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Models,meta models and OCL constraints

  • 5-
slide-6
SLIDE 6

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Models,meta models and OCL constraints

  • 5-
slide-7
SLIDE 7

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Models,meta models and OCL constraints

  • 5-
slide-8
SLIDE 8

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Models,meta models and OCL constraints

  • 5-
slide-9
SLIDE 9

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Models,meta models and OCL constraints

  • 5-
slide-10
SLIDE 10

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Models,meta models and OCL constraints

  • 5-
slide-11
SLIDE 11

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Model Generation

Why generating models ? Automatic validation

  • f meta models.

Obtain test data for model transformations.

  • 6-
slide-12
SLIDE 12

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Model Generation

Why generating models ? Automatic validation

  • f meta models.

Obtain test data for model transformations.

  • 6-
slide-13
SLIDE 13

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Model Generation

Why generating models ? Automatic validation

  • f meta models.

Obtain test data for model transformations.

  • 6-
slide-14
SLIDE 14

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Model Generation

Generation process expected properties Scalability: Generation process must scale to large models and meta models. Validity. Flexibility. Diversity.

  • 7-
slide-15
SLIDE 15

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Model Generation

Generation process expected properties Scalability. Validity: Models must conform to a given meta model and respect OCL constraints. Flexibility. Diversity.

  • 7-
slide-16
SLIDE 16

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Model Generation

Generation process expected properties Scalability. Validity. Flexibility: It should be easy to parameterize the generation process in order to add other constraints. Diversity.

  • 7-
slide-17
SLIDE 17

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation State of the art

Model Generation

Generation process expected properties Scalability. Validity. Flexibility. Diversity: Models should be as representative as possible of the meta model.

  • 7-
slide-18
SLIDE 18

null

A CSP Approach for Meta Model Instantiation Model Driven Engineering and Model Generation CSP for Model Generation

Using CSP to Generate Models

Existing CSP approach Cabot’s et al. CSP approach [?, ?]. So why do we choose a CSP approach ? Lack of flexibility of other approaches. CSP allows taking into account OCL constraints. Existing CSP approach does not scale.

  • 8-
slide-19
SLIDE 19

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

Summary

1 Model Driven Engineering and Model Generation 2 Our approach: CSP for Model Generation 3 Experiments 4 Conclusion

  • 9-
slide-20
SLIDE 20

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

CSP for Model Generation

  • 10-
slide-21
SLIDE 21

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

CSP for Model Generation

  • 10-
slide-22
SLIDE 22

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

CSP for Model Generation

  • 10-
slide-23
SLIDE 23

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

CSP for Model Generation

  • 10-
slide-24
SLIDE 24

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

CSP for Model Generation

  • 10-
slide-25
SLIDE 25

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

CSP for Model Generation

  • 10-
slide-26
SLIDE 26

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

First step: Meta Model to CSP transformation

  • 11-
slide-27
SLIDE 27

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

Elements of a meta model

  • 12-
slide-28
SLIDE 28

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

Elements of a meta model

  • 12-
slide-29
SLIDE 29

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation

Elements of a meta model

  • 12-
slide-30
SLIDE 30

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Class Modelling

Classes modelling

Class Instances One variable per instance. Domains including 0 for non-instantiated elements. Contiguous domains to distinguish between different classes. Root class has only one instance. Features One variable per each instance feature. Constraints Gcc on all classes instances to make all variables different except when it is 0.

  • 13-
slide-31
SLIDE 31

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Class Modelling

Classes modelling: Example

n instance variables. (D(Arc) = [0, 1, . . . , n]) n feature variables (Weight). (D(Weight) = [−100, 100]) Gcc( [variables], [values], [0, . . . , 0], [m, 1, . . . , 1])

  • 14-
slide-32
SLIDE 32

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Class Modelling

Classes modelling: Example

n instance variables. (D(Arc) = [0, 1, . . . , n]) n feature variables (Weight). (D(Weight) = [−100, 100]) Gcc( [variables], [values], [0, . . . , 0], [m, 1, . . . , 1])

  • 14-
slide-33
SLIDE 33

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Class Modelling

Classes modelling: Example

n instance variables. (D(Arc) = [0, 1, . . . , n]) n feature variables (Weight). (D(Weight) = [−100, 100]) Gcc( [variables], [values], [0, . . . , 0], [m, 1, . . . , 1])

  • 14-
slide-34
SLIDE 34

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Class Modelling

Classes modelling: Example

n instance variables. (D(Arc) = [0, 1, . . . , n]) n feature variables (Weight). (D(Weight) = [−100, 100]) Gcc( [variables], [values], [0, . . . , 0], [m, 1, . . . , 1])

  • 14-
slide-35
SLIDE 35

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Reference Modelling

Reference Modelling

Variables Let r(source → target) a reference between two classes source and target. Pointer variables from source to target. D(r) = D(target). Constraints One Gcc constraint on root class of the meta model. One constraint: source = 0 → Reference = 0.

  • 15-
slide-36
SLIDE 36

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Reference Modelling

Reference Modelling: Example

”pointer” variables from Place to Arc. (D(outgoing) = D(Arc)) One Gcc constraint on meta model root class references. One constraint: Place = 0 → outgoing = 0.

  • 16-
slide-37
SLIDE 37

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Reference Modelling

Reference Modelling: Example

”pointer” variables from Place to Arc. (D(outgoing) = D(Arc)) One Gcc constraint on meta model root class references. One constraint: Place = 0 → outgoing = 0.

  • 16-
slide-38
SLIDE 38

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Reference Modelling

Reference Modelling: Example

”pointer” variables from Place to Arc. (D(outgoing) = D(Arc)) One Gcc constraint on meta model root class references. One constraint: Place = 0 → outgoing = 0.

  • 16-
slide-39
SLIDE 39

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Reference Modelling

Reference Modelling: Example

”pointer” variables from Place to Arc. (D(outgoing) = D(Arc)) One Gcc constraint on meta model root class references. One constraint: Place = 0 → outgoing = 0.

  • 16-
slide-40
SLIDE 40

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation OCL modelling

Second step: OCL to CSP transformation

  • 17-
slide-41
SLIDE 41

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation OCL modelling

OCL constraints modelling

OCL constraints OCL (Object Constraints Language) is a formal language based on predicates logic [?]. Express constraints on meta models elements. Widespread OCL constructions are treated in our solution. Treatment of references as pointers makes modelling of OCL constraints easier.

  • 18-
slide-42
SLIDE 42

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation OCL modelling

OCL constraints modelling

OCL constraints OCL (Object Constraints Language) is a formal language based on predicates logic [?]. Express constraints on meta models elements. Widespread OCL constructions are treated in our solution. Treatment of references as pointers makes modelling of OCL constraints easier.

  • 18-
slide-43
SLIDE 43

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation OCL modelling

OCL constraints modelling

OCL constraints OCL (Object Constraints Language) is a formal language based on predicates logic [?]. Express constraints on meta models elements. Widespread OCL constructions are treated in our solution. Treatment of references as pointers makes modelling of OCL constraints easier.

  • 18-
slide-44
SLIDE 44

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation OCL modelling

OCL constraints modelling

OCL constraints OCL (Object Constraints Language) is a formal language based on predicates logic [?]. Express constraints on meta models elements. Widespread OCL constructions are treated in our solution. Treatment of references as pointers makes modelling of OCL constraints easier.

  • 18-
slide-45
SLIDE 45

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation OCL modelling

OCL constraint about class feature

CSP model Limit the domain of the variable representing the feature. Apply the boolean expression of the OCL constraint on previous domain values to obtain the new domain. Consequence ... No new CSP variables created. No new CSP constraints created. Only domains treatment.

  • 19-
slide-46
SLIDE 46

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation OCL modelling

OCL constraint about class feature

CSP model Limit the domain of the variable representing the feature. Apply the boolean expression of the OCL constraint on previous domain values to obtain the new domain. Consequence ... No new CSP variables created. No new CSP constraints created. Only domains treatment.

  • 19-
slide-47
SLIDE 47

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation OCL modelling

OCL constraint modelling: Example

D(marking) = [−100, 100] D(marking) = [0, 100]

Neither variables nor constraints created.

  • 20-
slide-48
SLIDE 48

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation OCL modelling

OCL constraint modelling: Example

D(marking) = [−100, 100] D(marking) = [0, 100]

Neither variables nor constraints created.

  • 20-
slide-49
SLIDE 49

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation OCL modelling

OCL constraint modelling: Example

D(marking) = [−100, 100] D(marking) = [0, 100]

Neither variables nor constraints created.

  • 20-
slide-50
SLIDE 50

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Improvements provided by our solution

Improvements provided by our solution I

Solution of Cabot et al. Use of list variables to distinguish instance variables of different classes. Our solution A set of variables with contiguous domains is used to differentiate between classes.

Reminder Cabot and al. are the authors of an existing CSP approach.

  • 21-
slide-51
SLIDE 51

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Improvements provided by our solution

Improvements provided by our solution II

Solution of Cabot et al. Absence of global constraints. Our solution The use of some global constraints as Gcc reduces the number of constraints.

  • 22-
slide-52
SLIDE 52

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Improvements provided by our solution

Improvements provided by our solution III

Solution of Cabot et al. A reference is considered as a couple of two variables. Our solution It is is considered as a pointer from source class to target class. Thus, we reduce the number of variables and make OCL treatment easier.

  • 23-
slide-53
SLIDE 53

null

A CSP Approach for Meta Model Instantiation Our approach: CSP for Model Generation Improvements provided by our solution

Improvements provided by our solution IV

Solution of Cabot et al. Systematic and brutal OCL to CSP transformation. Our solution Transformation adapted for each kind of OCL constraints. For instance, we just limit domains for the easiest OCL constraints.

  • 24-
slide-54
SLIDE 54

null

A CSP Approach for Meta Model Instantiation Experiments

Summary

1 Model Driven Engineering and Model Generation 2 Our approach: CSP for Model Generation 3 Experiments 4 Conclusion

  • 25-
slide-55
SLIDE 55

null

A CSP Approach for Meta Model Instantiation Experiments

Experiments purposes

Used Meta models Petri nets meta model: 4 classes [5]. Entities and relationships: 5 classes

[6].

B language meta model: 34 classes [?]. Sad meta model: 40 classes [?]. Experiments purposes Compare our solution results with those of Cabot et al. Verify the scaling of the solution. Show that it is possible to generate models containing an important number of elements.

  • 26-
slide-56
SLIDE 56

null

A CSP Approach for Meta Model Instantiation Experiments

Experiments I

1

Resolution 8 times quicker than existing solution.

CSP variables number reduced. Efficient treatment of class references.

5 10 15 20 25 30 10 20 30 40 50 60 70 80 90 100 Resolution duration - CPU time Class instances Cabot et al. Ferdjoukh et al.

Experiments made on Entities and Relationships meta models.

  • 27-
slide-57
SLIDE 57

null

A CSP Approach for Meta Model Instantiation Experiments

Experiments II

2 Good scaling (both models and meta models).

Not a lot of constraints. Use of Global Constraints like Gcc.

Meta model #Classes Petri nets 4

  • Enti. and Relat.

5 B language 34 Sad 40

50 100 150 200 250 300 350 400 450 100 200 300 400 500 600 700 800 Resolution duration - CPU time Global number of instances B language Sad Petri nets Relashionships and entities

  • 28-
slide-58
SLIDE 58

null

A CSP Approach for Meta Model Instantiation Conclusion

Summary

1 Model Driven Engineering and Model Generation 2 Our approach: CSP for Model Generation 3 Experiments 4 Conclusion

  • 29-
slide-59
SLIDE 59

null

A CSP Approach for Meta Model Instantiation Conclusion

Conclusion

Model Generation An important issue in MDE. CSP approach to solve this problem. Taking into account OCL constraints. Results The experiments show that our solution is more efficient than existing solution. It scales well as size of generated models or meta models increases.

  • 30-
slide-60
SLIDE 60

null

A CSP Approach for Meta Model Instantiation Conclusion

Future works

Improve scaling Do reification of implication constraints. Break symmetries on references. OCL constraints Model all OCL constructions.

  • 31-
slide-61
SLIDE 61

null

A CSP Approach for Meta Model Instantiation Conclusion

Future works: Solutions Diversity

  • 32-
slide-62
SLIDE 62

null

A CSP Approach for Meta Model Instantiation Conclusion

Tanemirt-nwen

  • 33-
slide-63
SLIDE 63

null

A CSP Approach for Meta Model Instantiation Appendices

References I

  • 1-
slide-64
SLIDE 64

null

A CSP Approach for Meta Model Instantiation Appendices

Several model generation paradigms

Model Generation approaches Sen and al. : Alloy [?, ?]. Ehrig and al. : Graph grammar [?]. Mougenot and al. : Random graph generation [?]. Cabot and al. : CSP [?, ?]. So why do we choose a CSP approach ? Lack of flexibility of other approaches. Other approaches do not take into account OCL constraints. The existing CSP approach is not efficient.

  • 2-
slide-65
SLIDE 65

null

A CSP Approach for Meta Model Instantiation Appendices

  • 3-
slide-66
SLIDE 66

null

A CSP Approach for Meta Model Instantiation Appendices

Reference Navigation OCL constraint

Modelling easier because of pointers. Apply treatment to all variables respecting the equality. In the paper, generalized to n references.

  • 4-
slide-67
SLIDE 67

null

A CSP Approach for Meta Model Instantiation Appendices

Reference Navigation OCL constraint

Modelling easier because of pointers. Apply treatment to all variables respecting the equality. In the paper, generalized to n references.

  • 4-
slide-68
SLIDE 68

null

A CSP Approach for Meta Model Instantiation Appendices

Reference Navigation OCL constraint

Modelling easier because of pointers. Apply treatment to all variables respecting the equality. In the paper, generalized to n references.

  • 4-
slide-69
SLIDE 69

null

A CSP Approach for Meta Model Instantiation Appendices

Implementation

[?].

  • 5-
slide-70
SLIDE 70

null

A CSP Approach for Meta Model Instantiation Appendices

Implementation

[?].

  • 5-
slide-71
SLIDE 71

null

A CSP Approach for Meta Model Instantiation Appendices

Implementation

[?].

  • 5-
slide-72
SLIDE 72

null

A CSP Approach for Meta Model Instantiation Appendices

Implementation

[?].

  • 5-
slide-73
SLIDE 73

null

A CSP Approach for Meta Model Instantiation Appendices

Entities and relationships meta model

*

  • 6-