Skip to content

COOM Profile: C-FIX

Synopsis

The COOM C-FIX profile allows for the explicit representation of fixed cardinalities for a specific element. The use of cardinality ranges, such as 2..5, will exit this language profile.

Building Blocks

Example: Shopping Bike

The product ShoppingBike offers exactly two instances of the Bag type for the front and exactly three instances of the Bag type for the rear. The constraint states, that the sizes of the two front bags need to be equal to each other.

product {
    ShoppingBike shoppingBike
}

structure ShoppingBike {
    2 Bag frontBag
    3 Bag rearBag 
}

structure Bag {
    Color color
    Size  size
}

enumeration Color { Green Blue Red }

enumeration Size {       
    small
    medium
    large
}

behavior ShoppingBike {
    require frontBag[0].size = frontBag[1].size
}