aas-core-works / aas-core-meta

Provide formalized meta-models for Asset Administration Shell (AAS).
Other
9 stars 3 forks source link

Ambiguity of Constraint AASd-131 related to XOR vs OR #278

Closed mristin closed 1 year ago

mristin commented 1 year ago

This is an issue originally raised by @chborntraeger at https://github.com/aas-core-works/aas-core3.0-typescript/issues/9. As it is not related to TypeScript, we move it here.

The original text of the issue:

In the validation of the AssetInformation the message 'Constraint AASd-131: Either the global asset ID shall be defined or at least one specific asset ID.' is triggered, even if the globalAssetId is set and additionally specificAssetIds are set. However, according to the definition of the management shell, specificAssetIds are simply optional. So the message should not occur if both globalAssetId and secificAssetIDs are set. Definition for specific asset ids in IDTA-Spec: "Additional domain-specific, typically proprietary identifier for the asset like serial number, manufacturer part ID, customer part IDs, etc"

We understood the text of the constraint to mean an exclusive or (XOR):

https://github.com/aas-core-works/aas-core-meta/blob/396c850c18ca9a7abc9d512ca13c54a287b3f8c0/aas_core_meta/v3.py#L2160-L2172

@s-heppner @sebbader-sap Do you have any thoughts how this should be resolved? Should we file a finding with the IDTA?

@chborntraeger thanks again for raising the issue!

sebbader-sap commented 1 year ago

Hi Marko, the constraint describes an inclusive or, even though using the term "either". It shall be read in the sense that "at least one entry of globalAssetId or specificAssetId must be there (while globalAssetId is preferred)."

I understand that the formulation of the constraint ("Either ... or ... ") is misleading, especially regarding how computer scientists distinguish inclusive and exclusive or :-). So, yes, let's find a better fitting formulation for the next AAS metamodel minor release.