Advanced management of interfaces with multiple cardinality
The problem here is that an interface with a multiple cardinality in Fractal ADL represents in fact 0 or more interfaces. The number of interfaces effectively represented depends on bindings. When you bind a interface that involes a multiple interface you specify the name of the interface generally suffixed with a number 0,1,..., the number of interfaces effectively created are the number of interfaces present in bindings having a different suffix. For example if we declare a interface with a multiple cardinality of name 'i', at runtime the interface 'i' doesn't exist. When we declare a binding for example a internal and a external interface of name i1 will be created.
Let's take a look a the following configuration:
+---------------------------------------------------+ |A | | +---------------------+ +----+ | | |B | +---f|-| F | | | | +----+ | / +----+ | | | | D |-|d---+ | / | | | +----+ \ | / +----+ | | | +--|-|-|b-+-------g|-| G | | | | +----+ / | \ +----+ | | | | E |-|e---+ | \ | | | +----+ | \ +----+ | | +---------------------+ +---h|-| H | | | +----+ | +---------------------------------------------------+
Currently with F4E in the graphical viewer, if you bind the interface 'f' to the interface 'b' it creates a binding with a client name equal to 'b' (). The user has to modify the name after the creation to suffix it with the appropriate number for example . It is the same policy if you bind D.d to this.b in the component B.
Ideally F4E could calculate and automaticaly set the right suffix, but there are number of difficulty to resolve technically and from a user interface point of view. The main idea is to calculate the suffix number from the existing bindings and increment it. For example if we create f->b then g->b then h->b, F4E could automatically add the suffix to the client name and we could obtain f->b0 g->b1 h->b2. This simple solution implies to resolve other non trivial problems: -if the user suppress one binding we can have to change the client name of other bindings; for example if we suppress g->b1, h->b2 should be updated to b->b1, but we have also to find and update potential bindings in the component B which use the internal interface b2, and the other definition or component which extend the A definition and that have bindings containing b2. -how the user bind the wanted internal interface 'b' in the component B ? currently the user bind d->b and after modify the name to add the wanted suffix for example b1. If the user want to bind directly d to b1 graphically it is not possible because there is no graphical object that uniquely represents b1. One solution to create a binding from d to b1 having an unique path between d and g via b1 could be to select the 3 interfaces d,b,and g and to click on a button that could create the binding d->b1. The method will be to firstly find the unique binding between g and b then find the prefix used by this binding and finaly use it to create the binding d->b.