Information Technology Reference
In-Depth Information
the restrictions defined by the properties A and D of the
constraint1 . The validation of a binding model against a
constraint model implies that every existing binding satisfies
one constraint in the constraint model.
We validate existing bindings in a binding model
automatically against a set of OCL-type sentences that
we generate from each constraint in a constraint model.
For example, if the feature involved in the constraint
C =[ $metaConcept , $feature , [ $fineMin , $fineMax ],D] is
a grouped or solitary feature, we generate the sentence
in Listing 5.1. The dollar symbol $ denotes variables
and the operator aCollection->between(a,b) is
equivalent to the expression (aCollection->size() a)
&& (aCollection->size() b) . Listing 5.2 presents
the particular sentence generated for the constraint =
[ Window , Automatic Windows , [0..1], D], where D =
bindings- > select(b | b.elementName==“mainRoomW1”)- >
between(0,0). In this case, D specifies that there cannot exist
any binding where the mainRoomW1 is involved.
1
2 Context Configuration inv:
b
3
indings−>select(b | b.feature.name=$feature and
b. metaConceptName=$metaConcept)−>between( $fineMin,fineMax$) and $D$;
4
Listing 5.1. Example of a generated OCL-type sentence
1
2
3
4
5
Context Configuration inv:
bindings−>select(b | b.feature.name= " Automatic Windows "
and b . metaConceptName= " Window " )−>between(0,1)
and bindings−>select(b | b.elementName= " mainRoomW1 " )−>between(0,0);
Listing 5.2. Example of a generated OCL-type sentence
ForthegenerationofOCLsentences,wehavecreatedmodel-
to-text transformation rules. These transformation rules
generate Check expressions. Check is a language included
 
Search WWH ::




Custom Search