SynBioDex / SBOL-specification

The Synthetic Biology Open Language (SBOL)
http://sbolstandard.org
14 stars 9 forks source link

Rule 10902 #480

Closed goksel closed 1 year ago

goksel commented 2 years ago

Can we double check if this validation rule is correct. The UML diagram does not seem to indicate the parent-child relationships between ComponentReferences. Other related rules are 10901 and 10903.

"If the parent of the ComponentReference is another ComponentReference, then inChildOf MUST be a 39 SubComponent of the Component linked as instanceOf the parent’s inChildOf SubComponent."

jakebeal commented 2 years ago

The UML diagrams don't directly indicate parent/child relationships, only indirectly in our interpretation of typical cases.

The rules basically say that you have to be referring to a subcomponent in the system you give as context. These relations are specified in Section 6.4.1.2 ComponentReference, but I think they will be clearer with diagrams.

The first diagram illustrates the rules that pertain to one layer deep component references The second diagram illustrates the rules that pertain to more than one layer deep component references.

component-references-1 component-references-2

cjmyers commented 2 years ago

It is tricky, but it actually makes sense. This is how you refer to nested subComponents.

jamesscottbrown commented 2 years ago

Is this a correct rephrasing of the confusing sentence:

If C is a ComponentReference, and its parent P is also a ComponentReference, and C' is an instanceOf C, and P' is an instanceOf P, then C' must be an inChildOf P'.

tcmitchell commented 2 years ago

@jamesscottbrown that's good, and I'm still thrown off by what it means for a ComponentReference to have a "parent". I think we should say something like "isReferredTo by" instead of "parent". Or begin with the so-called parent by saying, "If C is a ComponentReference, and C refersTo a ComponentReference C', ...." Or we make explicit in some other way that the parent-child relationship is via the refersTo property in the context of this rule.

jakebeal commented 2 years ago

@jamesscottbrown Yes, I agree with that.

@tcmitchell I think it can work to change it to focus on the "parent" instead of the child. "If ComponentReference R1 has refersTo ComponentReference R2 inChildOf an instanceOf Component C1, then the R1 inChildOf must be an instanceOf a SubComponent S of C1."