Hi all,

There has recently been some discussion about the possibility of 
changing the semantics of component imports to be both more consistent 
and easier to implement.

The current semantics are, to quote from the specification:


        9.5.2  Treatment of imported components

    * Imported components become named instances in the current model.
      [ Imported components are treated as templates from which to
      create instances in the current model. ]


What this means is that if you import the same component twice, you have 
two separate copies / instances of the component in the model.

However, this creates an internal inconsistency with the next bullet 
point under 9.5.2:

    * For each |<cellml:import>| element in the current model, CellML
      processing software must include each CellML component listed and
      the connections between them.

because it is entirely unclear what connections are added when the same 
component is imported twice in the same model element, or when 
components with encapsulation relationships between them exist.

This problem can easily be repaired by changing import semantics to 
being those of having one copy of the imported model, and then picking 
components from that model to further expose to the importing model. 
Components are not copied / used as templates, but instead are merely 
allowed to be referenced in the importing model under a different name 
(and the mathematics in them and the components encapsulated under them 
become significant).

The following restriction is needed to ensure that this makes sense:
  Definition: Components A and B are 'related by encapsulation' if A is 
the same component as B, or if A is in the encapsulated set of B, or if 
B is in the encapsulated set of A.

New entry under
  * An import element may not contain any pair of components which are 
related by encapsulation.

Please send any comments you have about this proposed changed to 

Best regards,
Andrew Miller

cellml-discussion mailing list

Reply via email to