Changes between Version 1 and Version 2 of Ticket #5628, comment 2


Ignore:
Timestamp:
2019-09-09T17:30:34Z (5 years ago)
Author:
Francesco Casella

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5628, comment 2

    v1 v2  
    1 The {{{connectorSizing}}} annotation (see Section 18.7 of the Specification) is meant to automatize the following scenario:
     1The {{{connectorSizing}}} annotation (see Section 18.7 of the Specification) was primarily meant to automatize the following scenario:
    22- a component {{{m}}} has a array of connectors {{{c[N]}}}
    33- the size of the array {{{N}}} is an Integer parameter with the {{{connectorSizing = true}}} annotation
    4 - when you graphically connect {{{m.c}}} to a ''scalar'' connector, the parameter is {{{N}}} is automatically increased by one, and a connection to the corresponding scalar element is generated
     4- when you graphically connect {{{m.c}}} to a ''scalar'' connector, the parameter is {{{N}}} is automatically increased by one, and a connection to the corresponding scalar element is generated.
    55
    6 When connecting {{{m.c}}} to another connector ''array'' {{{m2.c}}}, this mechanism should obviously not be used, and a simple {{{connect(m.c, m2.c)}}} statement should be generated (case 2), unless also the size of {{{m2.c}}} is a parameter with the {{{connectorSizing = true}}} annotation, see Rule 1 in 18.7.
     6However, one may also have array-array connections. In general, the normative text says
     7  a tool may set the parameter value in a modifier automatically, if used as dimension size of a vector of connectors
    78
    8 When connecting {{{m.c}}} to an expandable connector, OMEdit doesn't know the type of the other connector, because the other connector is implicitly defined by the connect statement. In this case, I would suggest that a pop-up window shows up, asking whether one wants to connect to a scalar connector on the expandable connector (in which case the {{{connectorSizing}}} mechanism should be used), or to an array connector on the expandable connector, in which case a connect statement between two array connectors should be generated.
     9So, in the case 2. described above, I would say that the wanted behaviour is that one first drags the {{{And}}} component (which has default {{{nu = 0}}}), then, when graphically connecting the input {{{and.u}}} to the output of {{{booleanExpression.y}}}, one should first be asked if the two entire arrays should be connected, or rather some of their individual components.
     10
     11In the first case, {{{nu}}} should automatically be set to {{{3}}}, which is the size of the other connector, and a {{{connect(booleanExpression1.y, and1.u)}}} statement should be added.
     12
     13In the second case, one should select which individual array element to pick on the non-connectorSize'd connector, while the standard connectorSizing mechanism should be used on {{{and.u}}}.
     14
     15When connecting {{{m.c}}} to an expandable connector, OMEdit doesn't know the type of the other connector, because the other connector is implicitly defined by the connect statement. This may be a problem, because there is not enough information available to infer the size of the parameter with {{{connectorSizing = true}}} ({{{and.nu}}}, in this case).
     16
     17In this case, I would also suggest to ask first if one wants to connect a scalar element or the entire array connector {{{and.u}}} to a connector on the expandable connector. In the first case, the standard {{{connectorSizing}}} mechanism is applied. In the other case, the pop-up window should probably also ask for the value of the {{{connectorSizing=true}}} parameter ({{{nu}}}), because the size of the other connector is not available locally when using an expandable connector.
    918
    1019It would be nice to get this for 1.14.0, so that the newly introduced feature is correct.