Constraints: Global Invariants

Introduction

This clause documents constraints that represent global invariants, i.e. constraints that cannot be assigned to a single class.

In contrast, a class invariant is a constraint that must be true for all instances of a class at any time. They are documented as part of the class specification.

Constraints for Referables and Identifiables

Constraint AASd-117: idShort of non-identifiable Referables not being a direct child of a SubmodelElementList shall be specified.

Note: in other words (AASd-117), idShort is mandatory for all Referables except for referables being direct childs of SubmodelElementLists and for all Identifiables.

Constraint AASd-022: idShort of non-identifiable referables within the same name space shall be unique (case-sensitive).

Note: AASd-022 also means that idShorts of referables shall be matched sensitive to the case.

Constraints for Qualifiers

Constraint AASd-021: Every qualifiable shall only have one qualifier with the same Qualifier/valueType.

Constraint AASd-119: If any Qualifier/kind value of a Qualifiable/qualifier is equal to TemplateQualifier and the qualified element inherits from "hasKind", the qualified element shall be of kind Template (HasKind/kind = "Template").

Constraint AASd-129: If any Qualifier/kind value of a SubmodelElement/qualifier (attribute qualifier inherited via Qualifiable) is equal to TemplateQualifier, the submodel element shall be part of a submodel template, i.e. a Submodel with Submodel/kind (attribute kind inherited via HasKind) value equal to Template.

Constraints for Extensions

Constraint AASd-077: The name of an extension (Extension/name) within HasExtensions shall be unique.

Constraint AASd-116: "globalAssetId" (case-insensitive) is a reserved key for SpecificAssetId/name with the semantics as defined in https://admin-shell.io/aas/3/1/AssetInformation/globalAssetId.

Note: AASd-116 is important to enable a generic search across global and specific asset IDs (e.g. in IDTA-01002-3-0 discovery operations like GetAllAssetLinksById). In the future the constraint might become more strict in stating that the name "globalAssetId" shall not be used as SpecificAssetId/name.

Constraints for Types

Constraint AASd-130: An attribute with data type "string" shall be restricted to the characters as defined in XML Schema 1.0, i.e. the string shall consist of these characters only: ^[\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u00010000-\u0010FFFF]*$.

Constraint AASd-130 ensures that encoding and interoperability between different serializations is possible. See https://www.w3.org/TR/xml/#charsets for more information on XML Schema 1.0 string handling.

Therefore, we need to restrict an attribute of data type 'string' to the characters that can be represented in any exchange format and language. Otherwise, strings in other formats such as JSON could not be converted to XML.

The string contains only valid Unicode characters in the range of encoded in UTF-16 format. The character set of XML includes (given as numerical code points and/or ranges in Unicode):

  • 0x09: ASCII horizontal tab,

  • 0x0A: ASCII linefeed (newline),

  • 0x0D: ASCII carriage return.

  • 0x20: ASCII space,

  • 0x20 - 0xD7FF: all the characters of the Basic Multilingual Plane, and

  • 0x00010000-0x0010FFFF: all the characters beyond the Basic Multilingual Plane (e.g., emoticons).

This leads to the following regular expression:

^[\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u00010000-\u0010FFFF]*$

Where:

^: asserts the start of the string.

[\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u00010000-\u0010FFFF]: defines a character class that allows various Unicode characters, with the following elements:

  • \x09: ASCII horizontal tab.

  • \x0A: ASCII linefeed (newline). \x0D: ASCII carriage return.

  • \x20: ASCII space. -: Represents a range. \uD7FF: The upper limit of the Basic Multilingual Plane (BMP) in UTF-16.

  • \uE000-\uFFFD: Represents the range of characters from the start of the supplementary planes up to the last valid Unicode character (excluding surrogate pairs).

  • \u00010000-\u0010FFFF: Represents the range of valid surrogate pairs used for characters beyond the BMP.

  • *: Allows for zero or more occurrences of the characters within the character class.

  • $: Asserts the end of the string.