Figures
Figure 1 - Implementing an Application ProtocolTables
Table E.1 - A summary, by example, of the EXPRESS to UML mapping
ISO (the International Organization for Standardization) is a worldwide federation of national standards bodies (ISO member bodies). The work of preparing International Standards is normally carried out through ISO technical committees. Each member body interested in a subject for which a technical committee has been established has the right to be represented on that committee. International organizations, governmental and non-governmental, in liaison with ISO, also take part in the work. ISO collaborates closely with the International Electrotechnical Commission (IEC) on all matters of electrotechnical standardization.
The main task of technical committees is to prepare International Standards. Draft International Standards adopted by the technical committees are circulated to the member bodies for voting. Publication as an International Standard requires approval by at least 75% of the member bodies casting a vote.
In other circumstances, particularly when there is an urgent market requirement for such documents, a technical committee may decide to publish other types of normative documents:
An ISO/PAS or ISO/TS is reviewed every three years with a view to deciding whether it can be transformed into an International Standard
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. ISO shall not be held responsible for identifying any or all such patent rights.
ISO/TS 10303-25 was prepared by Technical Committee 184, Industrial automation systems and integration, Subcommittee SC4, Industrial data.
This International Standard is organized as a series of parts, each published separately. The parts of ISO 10303 fall into one of the following series: description methods, integrated resources, application interpreted constructs, application protocols, abstract test suites, implementation methods, and conformance testing. The series are described in ISO 10303-1.
A complete list of parts of ISO 10303 is available from the Internet:
<http://www.tc184-sc4.org/titles/STEP_Titles.htm>.
This part of ISO 10303 is a member of the implementation methods series.
Annex A forms an integral part of this part of ISO 10303. Annexes B, C, D, E, F and G are for information only.
ISO 10303 is an International Standard for the computer-interpretable representation of product information and for the exchange of product data. The objective is to provide a neutral mechanism capable of describing products throughout their life cycle. This mechanism is suitable not only for neutral file exchange, but also as a basis for implementing and sharing product databases, and as a basis for archiving.
This part of ISO 10303 is a member of the implementation methods series. This part of ISO 10303 specifies a binding of the EXPRESS language into XMI.
The Object Management Group (OMG) has standardized the XML Metadata Interchange specification (XMI) that integrates the OMG Unified Modeling Language (UML), the OMG Meta-Object Facility (MOF) and the World Wide Web Consortium (W3C) Extensible Markup Language (XML) [2] standards. XMI is a mechanism for the interchange of metadata between UML-based modeling tools and MOF-based metadata repositories. OMG has also standardized an XMI compliant interchange format for the UML thus specifying a lexical representation of UML models based on a standardized metamodel of the UML. That lexical representation includes, among other things, the ability to interchange data type information, class information (or entities), groupings of classes providing namespaces for the classes (or schemas), associations between classes and inheritance between classes (or subtypes).
This part of ISO 10303 specifies a mapping of EXPRESS constructs to the UML metamodel. Because the XMI standard specifies the XML representation of UML metamodel constructs, standardizing the mapping of EXPRESS constructs into UML constructs supports the XMI representation of EXPRESS schemas. EXPRESS schemas, being data specifications, are mapped into the UML metamodel concepts that appear in UML Static Structure Diagrams. This part of ISO 10303 does not map all EXPRESS constructs to the UML metamodel, because that metamodel does not support all of the corresponding EXPRESS concepts. The specified mapping is a one-way mapping from EXPRESS into the UML Interchange Metamodel. These limitations make the mapping unsuitable for the general interchange of EXPRESS schemas and UML models for information modelling purposes.
Readers of this part of ISO 10303 require detailed knowledge of the EXPRESS Edition 1 language and the OMG UML 1.5 language.
Figure 1 shows one use case for this part of ISO 10303 - that of implementing an ISO 10303 Application Protocol. The actors in the use cases are:
Figure 1 — Implementing an Application Protocol
Figure 2 shows the concept behind this part of ISO 10303. It's purpose is to enable the use of UML-based software development tools when the initial data model is written using the EXPRESS language.
Figure 2 — The concepts behind the EXPRESS to XMI Binding
This part of ISO 10303 specifies a mapping of EXPRESS constructs into the UML Interchange Metamodel for the purposes of exchange conforming to the XMI standard. The specified mapping is a one-way mapping from EXPRESS into the UML Interchange Metamodel. These limitations make the mapping unsuitable for the general interchange of EXPRESS schemas and UML models for information modelling purposes.
NOTE In general, exchange conforming to the XMI standard is the exchange of UML model (i.e. schema) information between UML-based software system modeling tools, UML meta-data repositories or other such applications.
The following are within the scope of this part of ISO 10303:
The following are outside the scope of this part of ISO 10303:
NOTE The majority of the constructs that are not mapped are "rules" (local rules, global rules, and some subtype constraints) and constructs that can only be used in rules. Although the OMG Object Constraint Language (OCL) is intended for a similar purpose in UML models, only a few of the EXPRESS concepts used in rules have exact OCL equivalents.
The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.
ISO/IEC 8824-1:2002, Information technology - Abstract Syntax Notation One (ASN.1) - Part 1: Specification of basic notation.
ISO 10303-1:1994, Industrial automation systems and integration - Product data representation and exchange - Part 1: Overview and fundamental principles.
ISO 10303-11:1994, Industrial automation systems and integration - Product data representation and exchange - Part 11: Description methods: The EXPRESS language reference manual.
ISO/TS 10303-28:2003, Industrial automation systems and integration - Product data representation and exchange - Part 28: Implementation methods: XML representations of EXPRESS schemas and data.
OMG Unified Modeling Language Specification Version 1.5, Object Management Group Document formal/2003-03-01, March 2003 [cited 2004-02-11]. Available from World Wide Web: < http://www.omg.org/cgi-bin/doc?formal/03-03-01>.
OMG XML Metadata Interchange (XMI) Specification Version 1.2, Object Management Group Document formal/2002-01-01, January 2002 [cited 2004-02-11]. Available from World Wide Web: < http://www.omg.org/cgi-bin/doc?formal/2002-01-01>.
OMG XML Metadata Interchange (XMI) Specification Version 2.0, Object Management Group Document formal/2003-05-02, May 2003 [cited 2004-02-11]. Available from World Wide Web: < http://www.omg.org/cgi-bin/doc?formal/2003-05-02>.
Meta Object Facility (MOF) Specification Version 1.4,. Object Management Group formal/2002-04-03, April 2002 [cited 2004-02-11]. Available from the World Wide Web: < http://www.omg.org/cgi-bin/doc?formal/2002-04-03>.
For the purpose of this part of ISO 10303, the following terms defined in ISO 10303-1 apply.
For the purpose of this part of ISO 10303, the following definitions apply:
the EXPRESS schema, possibly including EXPRESS interface specifications, that defines the scope of the mapping into UML
For the purpose of this part of ISO 10303, the following abbreviations apply.
AP | Application Protocol |
DTD | Document Type Definition |
IDL | Interface Definition Language |
MOF | Meta-Object Facility |
OCL | Object Constraint Language |
OMG | Object Management Group |
UDS | UML declaration set |
XMI | XML Meta-data Interchange |
XML | Extensible Markup Language |
The mappings from EXPRESS into the metamodel of UML are into UML Static Structure (i.e. Class) Diagram concepts. Any reference to a UML concept is a reference to the definition of that concept as specified in OMG Unified Modeling Language Specification Version 1.5, March 2003. The UML 1.5 specification includes the UML Interchange Metamodel and it is that metamodel of UML upon which the mappings specified in this part of ISO 10303 are based.
NOTE In all areas where the concepts in previous versions of the UML, Version 1.3 [3] and Version 1.4 [4], are equivalent to those specified in UML Version 1.5, the mappings specified in this part of ISO 10303 may be applied.
In order to produce a conforming XMI representation the UML 1.5 UML Interchange Metamodel is used in conjunction with the rules defined in an XMI specification to generate a standard format by which UML models may be interchanged. Two methods for XML document production are defined in the XMI standard: 1) Production by Package Extent and 2) Production by Object Containment. A conforming pre-processor shall use the Production by Package Extent method (see XMI 1.2 Section 5.3.3 and Section 6).
A conforming pre-processor shall accept as input at least one of:
A conforming pre-processor shall accept as input a method for specifying each of the following:
A conforming pre-processor shall generate an XML exchange document supporting one or more of the XMI-compliant UML formats based on the mappings specified in this part of ISO 10303.
NOTE Figure 3 shows the standards involved in a pre-processor conforming to this part of ISO 10303.
Figure 3 — The standards involved in a conforming implementation
An XML exchange document shall conform to this part of ISO 10303 if:
This clause defines the mappings of EXPRESS structures into the UML Interchange Metamodel (see UML 1.4 Section 5). In the remainder of this clause, the convention used is that the EXPRESS concept being mapped is specified and the corresponding UML concepts are identified. The set of UML concepts that would result from the mapping of a particular set of EXPRESS concepts is referred to as the UML declaration set (UDS). A valid EXPRESS schema as input is required.
NOTE Figure 4 is an EXPRESS-G diagram of portions of the UML Interchange Metamodel. Each UML Class is represented as an EXPRESS entity data type. Each UML Generalization is represented as an EXPRESS SUBTYPE relationship. UML Attributes other than those related to naming are omitted for brevity. Each UML Association is represented as an EXPRESS explicit attribute without including an inverse attribute to represent the second end of the UML Association. The complete EXPRESS schema upon which this figure is based appears in Annex C and the relevant portions of the UML Interchange Metamodel appear in Annex D.
Figure 4 — An EXPRESS-G diagram of portions of the UML Interchange Metamodel
A mapping of the following EXPRESS concepts into UML is not specified in this part of ISO 10303 and therefore no representation of these EXPRESS concepts need appear in the UDS:
NOTE 1 The majority of the constructs that are not mapped are "rules" (local rules, global rules, and some subtype constraints) and constructs that can only be used in rules. Although the OMG Object Constraint Language (OCL) is intended for a similar purpose in UML models, only a few of the EXPRESS concepts used in rules have exact OCL equivalents.
NOTE 2 The contructs that are not mapped to UML are mainly those not represented in EXPRESS-G diagrams.
The UML 1.4 Specification defines two relevant mechanisms within which declarations appear, a UML Model and a UML Package. A UML Model "captures a view of a physical system", is "defined by its purpose and abstraction level (for example, an analysis model, a design model, an implementation model)" and "is a complete description of the physical system". A UML Package is "used within a Model to group ModelElements".
EXPRESS is a data specification language. In EXPRESS, a schema defines a domain and also defines a partition within which declarations appear. For the purposes of this part of ISO 10303, a single schema must be chosen to provide the context for the implementation. With respect to data specification, the set of schemas visible to that context schema define the complete set of types available.
Based on the key concepts in UML, EXPRESS and this part of ISO 10303 the following grouping and partitioning is required.
Any XML element in the UDS that has an XML attribute named "visibility" representing the concept of UML visibility, shall have that XML attribute value set to "public".
The UML representations of the EXPRESS simple types shall appear in the UDS within the same UML Namespace as the UML representation of EXPRESS schema declarations.
NOTE 1 EXPRESS simple types are not declared within a schema but are universal.
This part of ISO 10303 specifies two options for the mapping of EXPRESS simple data types. All EXPRESS simple data types for a particular mapping shall be mapped using the same option.
One option is that all EXPRESS simple data types shall mapped to UML Classes. The name of the UML Class shall be the name of the EXPRESS simple data type with the first letter in upper case and all other letters in lower case. The UML Class shall have a UML Stereotype "<<primitive>>" applied. All UML AssociationEnds associated with the UML Class shall have its UML navigability set to "true".
The second options is that the EXPRESS simple data types shall be mapped as specified in the remainder of this subclause.
The EXPRESS INTEGER data type shall be mapped into the UML Integer data type.
The EXPRESS STRING data type shall be mapped into the UML String data type.
The EXPRESS BOOLEAN data type shall be mapped into the UML Boolean data type.
The EXPRESS LOGICAL data type shall be mapped into a UML Enumeration data type whose name shall be "Logical" and whose UML EnumerationLiterals shall be "false", "true" and "unknown". The UML Stereotype "<<enumeration>>" shall be applied.
The EXPRESS BINARY data type shall be mapped into a UML DataType whose name shall be "Binary".
NOTE 2 Neither UML nor MOF have a built-in datatype corresponding to BINARY. In CORBA implementations, this might map to the Octet built-in data type.
The EXPRESS NUMBER and EXPRESS REAL data types shall be mapped into a UML DataType whose name shall be "Double". The domain of this data type shall be equivalent with the MOF 1.4 Primitive Datatype named "Double".
NOTE 3 UML has no built-in datatype corresponding to REAL or NUMBER so the MOF Double data type is used.
A particular EXPRESS schema is the context for any mapping - call this the context schema. Only the context schema and EXPRESS schemas visible to that EXPRESS schema by means of the EXPRESS interface specification need be considered in any particular mapping. For each EXPRESS schema declaration visible to the context schema and for the context schema, a UML Package shall appear in the UDS. The UML ModelElement.name of the UML Package shall be the name of the EXPRESS schema with the first letter in upper case and all other letters in lower case.
In the remainder of this clause, the phrase "in the context of the mapping" includes only those EXPRESS constructs implicitly or explicitly interfaced into the context schema.
For each EXPRESS USE FROM or REFERENCE FROM of an entire schema in the context of the mapping, a UML ElementImport shall appear in the UDS. The UML ElementImport.importedlElement shall be set to reference the UML Package representing the interfaced schema. The UML ElementImport.package shall be set to reference the UML Package representing the interfacing schema.
For each mapped EXPRESS non-schema construct specifically named in an EXPRESS USE FROM or REFERENCE FROM in the context of a mapping, a UML ElementImport shall appear in the UDS. The UML ElementImport.importedElement shall be set to reference the UML construct representing the interfaced EXPRESS construct. The UML ElementImport.package shall be set to reference the UML Package representing the interfacing EXPRESS schema. If the EXPRESS construct is renamed using the EXPRESS "AS" keyword, the UML ElementImport.alias shall be set to the new name as specified with the EXPRESS "AS" keyword with the first letter in upper case and all other letters in lower case.
For all cases of a UML ElementImport appearing in the UDS, the UML ElementImport.visibility shall be set to "public".
UML constructs representing EXPRESS constructs explicitly or implicitly interfaced into the context EXPRESS schema shall appear in the UDS in the UML Package representing the EXPRESS schema within which they are declared.
In addition to the UML constructs representing EXPRESS constructs visible in the context schema, UML constructs representing EXPRESS constructs not visible in the context schema may be included in the UDS and if present, shall be mapped according to this part of ISO 10303."
For each UML construct in the UDS, the corresponding UML Association relating the UML ModelElement and its UML Namespace shall appear in the UDS. In that UML Association, the UML ModelElement.namespace shall be set to be a reference to the UML Package representing the EXPRESS schema in which the element is declared and the UML Namespace.ownedElement shall include a reference to the UML construct representing the EXPRESS construct declared in the schema.
For each EXPRESS entity data type in the context of the mapping, a UML Class shall appear in the UDS. The UML ModelElement.name of that UML Class shall be the name of the EXPRESS entity data type it represents with the first letter in upper case and other letters in lower case. If the EXPRESS data type is an EXPRESS ABSTRACT SUPERTYPE, the UML GeneralizableElement.isAbstract attribute of the UML Class shall be set to "true", otherwise it shall be set to "false". The UML GeneralizableElement.isLeaf and .isRoot attributes of the UML Class shall be set to "false" in all UML Classes representing EXPRESS entity data types.
For each EXPRESS SUBTYPE declaration in an EXPRESS entity data type in the context of the mapping, a UML Generalization shall appear in the UDS. The UML Generalization.discriminator shall be set to the empty string.
A UML Association between the UML Generalization and the UML Class representing the EXPRESS subtype shall appear in the UDS. The UML AssociationEnd named "child" shall refer to the UML Class representing the EXPRESS subtype and the UML AssociationEnd named "generalization" shall be refer to the UML Class representing the EXPRESS supertype.
A UML Association between the UML Generalization and the UML Class representing the EXPRESS supertype shall appear in the UDS. The UML AssociationEnd named "parent" shall refer to the UML Class representing the EXPRESS subtype and the UML AssociationEnd named "specialization" shall refer to the UML Class representing the EXPRESS subtype.
For each EXPRESS entity data type visible in the context of the mapping that has subtypes visible in the context of the mapping and within which no SUPERTYPE constraint is specified, a UML "overlapping" constraint shall appear in the UDS. For each EXPRESS entity data type that is a subtype of the EXPRESS entity data type within which no SUPERTYPE constraint is specified, the UML Generalization representing that EXPRESS subtype relationship shall be included in the UML "overlapping" constraint created for the EXPRESS supertype.
NOTE The UML overlapping constraint is equivalent to EXPRESS ANDOR. This is necessary as UML disjoint, the equivalent of EXPRESS ONE OF, is the default in UML.
For each EXPRESS entity data type visible in the context of the mapping that has subtypes visible in the context of the mapping and every subtype appears in a single SUPERTYPE ONEOF constraint, a UML "disjoint" constraint shall appear in the UDS. For each EXPRESS entity data type that is a subtype of the EXPRESS entity data type appearing in the SUPERTYPE ONEOF constraint, the UML Generalization representing that EXPRESS subtype relationship shall be included in the UML "disjoint" constraint created for the EXPRESS SUPERTYPE ONEOF constraint.
For each EXPRESS explicit attribute of an entity type in the context of the mapping, either a UML Attribute or a UML Association shall appear in the UDS. The UML ModelElement.name of the UML Attribute or UML Association shall be the name of the EXPRESS attribute all in lower case.
If the EXPRESS attribute is a redeclaration of an inherited attribute, it shall not be repeated in the mapping of the subtype. In the case that the redeclaration is a specialization of the entity type in a supertype/subtype graph, an Object Constraint Language expression shall appear in the UDS. The UML Constraint.name shall be "redeclared-" concatenated with the express attribute name all in lower case. The UML Constraint.body shall have the form:
context <classname> inv <constraintname> : self . <attributename> -> forAll (
oclIsTypeOf ( <subclassname> ))
where:
For a UML Attribute representing an EXPRESS explicit attribute, the UML Feature.owner shall be set to reference the UML Class representing the EXPRESS entity data type. No initial value shall be set for the UML Attribute.
For a UML Association representing an EXPRESS explicit attribute, the UML AssociationEnds navigability shall be set as follows:
If the EXPRESS explicit attribute is declared to be optional and is represented by a UML Attribute, the multiplicity of the UML Attribute shall be "0..1".
If the EXPRESS explicit attribute is declared to be optional and is represented by a UML Association, the lower bound of the multiplicity of the UML AssociationEnd shall be "0" at the end related to the UML Classifier representing the domain of the explicit attribute.
The remainder of the mapping for EXPRESS explicit attributes is dependent on the domain of the attribute and is specified in the following subclauses.
For each EXPRESS explicit attribute whose domain is an EXPRESS simple data type or an EXPRESS enumeration data type, a single-valued UML Attribute shall appear in the UDS. The UML StructuralFeature.type of that UML Attribute shall refer to the UML representation of that domain (see 5.3 and 5.9.1).
For each EXPRESS explicit attribute whose domain is one of the following, a UML Association and two related UML AssociationEnds shall appear in the UDS:
One UML AssociationEnd shall reference the UML Class representing the EXPRESS named type and shall have its UML ModelElement.name set to be the name of the EXPRESS explicit attribute all in lower case. If the domain is a single named type, the multiplicity of that UML AssociationEnd shall be set to be "1..1" if the explicit attribute is mandatory and "0..1" if optional. If the domain is a SET or LIST OF UNIQUE data type, the multiplicity of the UML Association shall be set to reflect the cardinality of the SET or LIST OF UNIQUE data type unless the explicit attribute is optional. In that case, the lower bound shall be set to "0". In the case that the EXPRESS aggregation data type is a LIST OF UNIQUE data type, the UML AssociationEnd referencing the UML representation of the EXPRESS named data type shall have its AssociationEnd.ordering set to "ordered".
The other UML AssociationEnd shall reference the UML Class representing the EXPRESS entity data type within which the EXPRESS explicit attribute is declared. The multiplicity of that UML AssociationEnd shall be set to "0..* unless the EXPRESS explicit attribute has a corresponding inverse attribute in which case it shall be set to reflect the bounds of the inverse attribute. If the EXPRESS attribute has a corresponding inverse attribute, the UML ModelElement.name of the UML AssociationEnd shall be the name of the EXPRESS inverse attribute all in lower case. If no corresponding EXPRESS inverse attribute is defined, the UML ModelElement.name may be the name of the EXPRESS explicit attribute, in lower case, prefixed by the string 'reverse-of-' or may be omitted.
For each EXPRESS explicit attribute whose domain is an EXPRESS BAG data type or non-unique LIST data type whose base type is an EXPRESS named type, a multi-valued UML Attribute shall appear in the UDS. The UML StructuralFeature.type of that UML Attribute shall refer to the UML Class that represents the EXPRESS named type. The multiplicity of the UML StructuralFeature shall be set to reflect the cardinality of the BAG or non-unique LIST data type unless the explicit attribute is optional. In that case, the lower bound shall be set to "0". In the case of a non-unique LIST, the UML StructuralFeature.ordering shall be set to "ordered".
For each EXPRESS explicit attribute whose domain is an aggregation data type other than a SET, BAG or LIST of named type, a UML Association shall appear in the UDS representing the EXPRESS explicit attribute. The UML Association shall have two UML AssociationEnds, one referencing the UML representation of the EXPRESS entity type with the aggregation data type as an attribute domain and a second referencing the UML representation of the base type of the EXPRESS aggregation data type (see 5.10). The multiplicity of the UML Association shall be set to "1..1" on the UML AssociationEnds related to the UML Class representing the EXPRESS entity type unless the explicit attribute is optional. In that case, the lower bound shall be set to "0". The multiplicity of the UML Association shall be set to "0..*" on the UML AssociationEnd related to the domain of the explicit attribute.
For each EXPRESS derived attribute of an EXPRESS ENTITY in the context of the mapping, a UML Operation of the UML Class representing the ENTITY shall appear in the UDS. The UML ModelElement.name of the UML Operation shall be the name of the EXPRESS derived attribute all in lower case. The UML BehavioralFeature.isQuery attribute shall be set to 'true'. A single UML Parameter associated with the UML Operation shall appear in the UDS representing domain type of the EXPRESS derived attribute. The UML Parameter.kind shall be set to 'return'. The UML Parameter.parameter association shall reference the UML Operation representing the EXPRESS derived attribute. The UML Parameter.type association shall reference the UML Class or UML DataType representing the domain of the EXPRESS derived attribute.
The three kinds of EXPRESS defined type are each mapped into different constructs in UML. EXPRESS enumeration data types have a direct correspondence with UML Enumerations. However, the other EXPRESS defined types are mapped into UML Classes.
For each EXPRESS enumeration data type in the context of the mapping, a UML Enumeration shall appear in the UDS. The UML ModelElement.name of the UML Enumeration shall be the name of the EXPRESS enumeration data type with the first letter in upper case and other letters in lower case. The UML EnumerationLiterals shall be set to be the EXPRESS enumeration ids, all in lower case, in the same order they are defined in the EXPRESS enumeration data type. The UML Enumeration shall have the UML Stereotype "<<enumeration>>" applied.
For each EXPRESS select data type in the context of the mapping, a UML Class shall appear in the UDS. The UML ModelElement.name shall be the name of the EXPRESS select data type with the first letter in upper case and other letters in lower case. For each EXPRESS named type in the select list that is in the context of the mapping, a UML aggregation Association, that is not a composite aggregation, shall appear in the UDS. The UML Association.name shall be set to be "selection_of". The UML Association shall have exactly two connection UML AssociationEnds. The UML AssociationEnd.aggregation shall be set to be "aggregate" on the end referencing the UML Class representing the EXPRESS select data type and the UML AssociationEnd.aggregation shall be set to be "none" on the end referencing the UML Class representing the EXPRESS select list item. A UML XOR constraint shall apply to the set of UML Associations between the UML Class representing the EXPRESS select data type and the UML Classes representing the items in the EXPRESS select list.
For each EXPRESS defined data type that is not a constructed data type, a UML Class shall appear in the UDS representing the defined data type. The UML ModelElement.name of the UML Class representing the EXPRESS defined data type shall be the name of the EXPRESS defined data type with the first letter in upper case and other letters in lower case. A UML Generalization shall appear in the UDS relating the UML representation of the defined type and its underlying type. The UML Generalization.discriminator shall be set to the empty string. A UML Association between the UML GeneralizableElement representing the defined data type and the UML Generalization shall appear, with the UML Generalization role labelled "child" and the UML GeneralizableElement end labelled "specialization". A UML Association between the UML GeneralizableElement representing the underlying type and the UML Generalization shall appear, with the UML Generalization role labelled "parent" and the UML GeneralizableElement end labelled "generalization". One of the following rules shall be applied to determine the "parent" in the UML Generalization:
The EXPRESS language supports aggregation data types for which there is no direct equivalent in UML. For this reason even though EXPRESS aggregation data types have similar structures, they do not all result in the same structures when mapped to UML. Each usage of EXPRESS aggregations types is addressed in this part of ISO 10303 as follows.
NOTE Relationships in EXPRESS are defined using attributes, not using a separate construct as is possible in UML using an Association. In EXPRESS, multiple relationships are defined by the base type of the EXPRESS attribute being an EXPRESS aggregation data type. In UML, Associations between UML Classifiers are mathematical sets that support multiple relationship but that allow no duplicates (see D.2). For these reasons, the only case where an EXPRESS aggregation data type construct is mapped into UML Associations is that of EXPRESS explicit attributes whose domain is an EXPRESS SET type or LIST OF UNIQUE type with a base type that is an EXPRESS named data type (see 5.7.2). The other EXPRESS aggregation data types are not mapped into UML Associations and therefore the fact that they may represent a relationship in the EXPRESS schema is less evident in the resulting UML.
For all usages of EXPRESS aggregation data types other than those specified in 5.7.2 and 5.7.3, one or more UML Classes shall appear in the UDS representing the EXPRESS aggregation data type. The remainder of this subclause specifies the details of those UML Classes and other related UML constructs that shall appear in the UDS.
If the base type of the EXPRESS aggregation data type is an EXPRESS aggregation data type (or any further nesting of EXPRESS aggregation data types), it shall be represented as two or more UML Classes.
A UML Class representing the most nested of the EXPRESS aggregation data types, for which the base type is not another EXPRESS aggregation data type, shall appear in the UDS represented as specified in 5.10.2.
A UML Class representing each level of nesting of the EXPRESS aggregation data types shall appear in the UDS. The UML ModelElement.name of each of these UML Classes shall be the concatenation of the following:
For each pair of UML Classes representing an EXPRESS aggregation data type (or single level of nesting in a multiply nested aggregation data type) either a UML aggregation Association or a multivalued UML Attribute shall appear in the UDS as specified in 5.10.3.
If the base type of the EXPRESS aggregation data type is not an EXPRESS aggregation data type, it shall be represented by a single UML Class. The UML ModelElement.name of that UML Class shall be the concatenation of the following:
NOTE See 5.7.2 and 5.7.3 for mappings of EXPRESS explicit attributes with base types that are SET, LIST and BAG OF named type.
For each EXPRESS aggregation data type that is a BAG , ARRAY or non-unique LIST type, a UML multivalued Attribute shall appear in the UML Class representing the EXPRESS aggregation data type. The UML Attribute.name shall be "elements". That UML Attribute shall be set to reference the UML Class representing the base type of the EXPRESS aggregation data type. For EXPRESS BAG or LIST types, the multiplicity of the UML Attribute shall be set to reflect the cardinality of the EXPRESS aggregation data type. For EXPRESS ARRAY types, the multiplicity of the UML Attribute shall be set to reflect the number of elements in the EXPRESS aggregation data type. If the UML Attribute represents an EXPRESS ARRAY or non-unique LIST type, the UML StructuralFeature.ordering shall be set to "ordered".
For each EXPRESS aggregation data type that is a SET or LIST OF UNIQUE type, a UML shared aggregation Association shall appear in the UDS with the UML Association.name set to be "aggregation_of". The UML Association shall have exactly two connection UML AssociationEnds. The UML AssociationEnd.aggregation referencing the UML Class representing the EXPRESS aggregation data type being set to "aggregate". The UML AssociationEnd.aggregation referencing the UML Class representing the base type of the EXPRESS aggregation data type being set to "none". The multiplicity of the UML AssociationEnd shall be set to reflect the cardinality of the EXPRESS aggregation data type. In the case that the EXPRESS aggregation data type is an ARRAY type or a LIST OF UNIQUE type, the UML AssociationEnd referencing the UML representation of the base type of the EXPRESS aggregation data type shall have its UML AssociationEnd.ordering set to "ordered".
To provide for unambiguous identification of an information object in an open system, the object identifier
{ iso standard 10303 part(25) version (1)}
is assigned to this part of ISO 10303. The meaning of this value is defined in ISO/IEC 8824-1, and is described in ISO 10303-1.
This annex contains example EXPRESS schemas, DTDs, UML diagrams and XMI files.
The OMG has published several XMI-conforming DTDs for the interchange of UML models. Examples of these DTDs follow:
These DTDs support the entire UML language and therefore contain many declaratation not used by the mapping specified in this part of ISO 10303.
Annex E contains a summary by example of the mapping defined in this part of ISO 10303. The EXPRESS fragments in Annex E were taken from the following three schemas. The context_schema interfaces the s2_schema and s3_schema.
An example XMI 1.2 file contains representations the majority of the constructs found in these three schemas.
NOTE The following are not included because the UML tool creating the XMI file did not support every construct:
SCHEMA context_schema;
-- this schema is the context schema
REFERENCE FROM s2_schema;
USE FROM s3_schema (entity1 AS renentity1);
TYPE type1 = SELECT (entity1,type2);
END_TYPE;
TYPE type2 = ENUMERATION OF (red, white);
END_TYPE;
TYPE type3 = STRING;
END_TYPE;
TYPE type4 = LIST OF STRING;
END_TYPE;
ENTITY entity2 ABSTRACT SUPERTYPE;
a5 : LIST OF type1;
a6 : LIST OF UNIQUE entity4;
a7 : REAL;
DERIVE
da1 : REAL := 2.4*a7;
END_ENTITY;
ENTITY entity1
SUPERTYPE OF (ONEOF(entity4, entity5))
SUBTYPE OF (entity2);
a11 : SET OF entity10;
END_ENTITY;
ENTITY entity4
SUBTYPE OF (entity1);
a2 : entity5;
a8 : LIST OF STRING;
a12 : type4;
a13 : renentity1;
END_ENTITY;
ENTITY entity5
SUBTYPE OF (entity1);
INVERSE
ia1 : SET[1:?] OF entity4 FOR a2;
END_ENTITY;
END_SCHEMA;
SCHEMA s2_schema;
-- this schema gets referenced by context_schema
ENTITY entity10;
a1 : INTEGER;
END_ENTITY;
END_SCHEMA;
SCHEMA s3_schema;
-- part of this schema gets used by context_schema
ENTITY entity1;
a7 : SET OF STRING;
END_ENTITY;
ENTITY e99;
a99 : STRING;
END_ENTITY;
END_SCHEMA;
The following EXPRESS is a subset of the schema that could result in Figure B.1.
SCHEMA mr_smiths_garden;
ENTITY garden;
has_bed : bed;
END_ENTITY;
ENTITY bed;
has_plants : SET[0:?] OF plant;
INVERSE
the_garden : SET[0:?] OF garden FOR has_bed;
END_ENTITY;
ENTITY plant;
name : STRING;
END_ENTITY;
END_SCHEMA;
Figure B.1 — A UML class diagram showing only the declarations from mr_smiths_garden in the context of mr_jones_garden
The following is the corresponding XMI 1.0 file based on UML 1.3. The UML representations of the EXPRESS identifiers and data types have been made bold to assist in reading the data. The xmi.id XML attribute is the XMI identifier for each XML element. The xmi.idref XML attribute represents a reference to the XML element with the xmi.id having the same value. The xmi.idrefs are hyperlinked to assist in navigating the data.
<?xml version="1.0" encoding="UTF-8"?>
<XMI xmi.version="1.0">
<XMI.header>
<XMI.documentation>
<XMI.exporter>Novosoft UML Library</XMI.exporter>
<XMI.exporterVersion>0.4.19</XMI.exporterVersion>
</XMI.documentation>
<XMI.metamodel xmi.name="UML" xmi.version="1.3"/>
</XMI.header>
<XMI.content>
<Model_Management.Package xmi.id="xmi.1" xmi.uuid="-63-14-84-52-2d157f:e7cc2f1fc0:-7fff">
<Foundation.Core.ModelElement.name>Mr_smiths_garden</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Namespace.ownedElement>
<Foundation.Core.Class xmi.id="xmi.2" xmi.uuid="-63-14-84-52-2d157f:e7cc2f1fc0:-7ffe">
<Foundation.Core.ModelElement.name>Garden</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.Class>
<Foundation.Core.Class xmi.id="xmi.3" xmi.uuid="-63-14-84-52-2d157f:e7cc2f1fc0:-7ffc">
<Foundation.Core.ModelElement.name>Bed</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.Class>
<Foundation.Core.Class xmi.id="xmi.4" xmi.uuid="-63-14-84-52-2d157f:e7cc2f1fc0:-7ffb">
<Foundation.Core.ModelElement.name>Plant</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.Class.isActive xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Classifier.feature>
<Foundation.Core.Attribute xmi.id="xmi.5">
<Foundation.Core.ModelElement.name>name</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.visibility xmi.value="public"/>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.Feature.ownerScope xmi.value="instance"/>
<Foundation.Core.Feature.owner>
<Foundation.Core.Classifier xmi.idref="xmi.4"/>
</Foundation.Core.Feature.owner>
<Foundation.Core.StructuralFeature.type>
<Foundation.Core.Classifier xmi.idref="xmi.7"/>
</Foundation.Core.StructuralFeature.type>
</Foundation.Core.Attribute>
</Foundation.Core.Classifier.feature>
</Foundation.Core.Class>
<Foundation.Core.Association xmi.id="xmi.8" xmi.uuid="-63-14-84-52-2d157f:e7cc2f1fc0:-7ffa">
<Foundation.Core.ModelElement.name>has_bed</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Association.connection>
<Foundation.Core.AssociationEnd xmi.id="xmi.9">
<Foundation.Core.ModelElement.name>the_garden</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.id="xmi.10">
<Foundation.Data_Types.Multiplicity.range>
<Foundation.Data_Types.MultiplicityRange xmi.id="xmi.11">
<Foundation.Data_Types.MultiplicityRange.lower>0</Foundation.Data_Types.MultiplicityRange.lower>
<Foundation.Data_Types.MultiplicityRange.upper>-1</Foundation.Data_Types.MultiplicityRange.upper>
</Foundation.Data_Types.MultiplicityRange>
</Foundation.Data_Types.Multiplicity.range>
</Foundation.Data_Types.Multiplicity>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.8"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.2"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
<Foundation.Core.AssociationEnd xmi.id="xmi.12">
<Foundation.Core.ModelElement.name>has_bed</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.id="xmi.13">
<Foundation.Data_Types.Multiplicity.range>
<Foundation.Data_Types.MultiplicityRange xmi.id="xmi.14">
<Foundation.Data_Types.MultiplicityRange.lower>1</Foundation.Data_Types.MultiplicityRange.lower>
<Foundation.Data_Types.MultiplicityRange.upper>1</Foundation.Data_Types.MultiplicityRange.upper>
</Foundation.Data_Types.MultiplicityRange>
</Foundation.Data_Types.Multiplicity.range>
</Foundation.Data_Types.Multiplicity>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.8"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.3"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
</Foundation.Core.Association.connection>
</Foundation.Core.Association>
<Foundation.Core.Association xmi.id="xmi.28" xmi.uuid="-63-14-84-52-2d157f:e7cc2f1fc0:-7fea">
<Foundation.Core.ModelElement.name>has_plants</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
<Foundation.Core.Association.connection>
<Foundation.Core.AssociationEnd xmi.id="xmi.29">
<Foundation.Core.ModelElement.name>reverse-of-has_plants</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.id="xmi.30">
<Foundation.Data_Types.Multiplicity.range>
<Foundation.Data_Types.MultiplicityRange xmi.id="xmi.31">
<Foundation.Data_Types.MultiplicityRange.lower>0</Foundation.Data_Types.MultiplicityRange.lower>
<Foundation.Data_Types.MultiplicityRange.upper>-1</Foundation.Data_Types.MultiplicityRange.upper>
</Foundation.Data_Types.MultiplicityRange>
</Foundation.Data_Types.Multiplicity.range>
</Foundation.Data_Types.Multiplicity>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.3"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.4"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
<Foundation.Core.AssociationEnd xmi.id="xmi.32">
<Foundation.Core.ModelElement.name>has_plants</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.AssociationEnd.isNavigable xmi.value="true"/>
<Foundation.Core.AssociationEnd.aggregation xmi.value="none"/>
<Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Data_Types.Multiplicity xmi.id="xmi.33">
<Foundation.Data_Types.Multiplicity.range>
<Foundation.Data_Types.MultiplicityRange xmi.id="xmi.34">
<Foundation.Data_Types.MultiplicityRange.lower>0</Foundation.Data_Types.MultiplicityRange.lower>
<Foundation.Data_Types.MultiplicityRange.upper>-1</Foundation.Data_Types.MultiplicityRange.upper>
</Foundation.Data_Types.MultiplicityRange>
</Foundation.Data_Types.Multiplicity.range>
</Foundation.Data_Types.Multiplicity>
</Foundation.Core.AssociationEnd.multiplicity>
<Foundation.Core.AssociationEnd.association>
<Foundation.Core.Association xmi.idref="xmi.28"/>
</Foundation.Core.AssociationEnd.association>
<Foundation.Core.AssociationEnd.type>
<Foundation.Core.Classifier xmi.idref="xmi.4"/>
</Foundation.Core.AssociationEnd.type>
</Foundation.Core.AssociationEnd>
</Foundation.Core.Association.connection>
</Foundation.Core.Association>
<Foundation.Core.DataType xmi.id="xmi.7">
<Foundation.Core.ModelElement.name>String</Foundation.Core.ModelElement.name>
<Foundation.Core.ModelElement.isSpecification xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isRoot xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isLeaf xmi.value="false"/>
<Foundation.Core.GeneralizableElement.isAbstract xmi.value="false"/>
<Foundation.Core.ModelElement.namespace>
<Foundation.Core.Namespace xmi.idref="xmi.1"/>
</Foundation.Core.ModelElement.namespace>
</Foundation.Core.DataType>
</Foundation.Core.Namespace.ownedElement>
</Model_Management.Package>
</XMI.content>
</XMI>
The following EXPRESS fragment containing SET and LIST OF UNIQUE data types whose base type is a named type could result in the UML diagram in Figure B.2.
TYPE t = SELECT ( entity1, entity2 );
END_TYPE;
ENTITY entity1;
END_ENTITY;
ENTITY entity2;
a1 : SET[1:4] OF entity1; -- UML maps to Association named a1
a2 : LIST[0:?] OF UNIQUE t; -- maps to UML Association named a2
END_ENTITY;
The following EXPRESS fragment containing a LIST data type whose base type is a named type could result in the UML diagram in Figure B.3.
TYPE t = SELECT ( entity1, entity2 );
END_TYPE;
ENTITY entity1;
END_ENTITY;
ENTITY entity2;
a3 : LIST[0:?] OF t; -- maps to UML Attribute named a3
END_ENTITY;
Figure B.3 — An example UML diagram showing the UML Attribute mapped from LIST
The following EXPRESS fragment containing a LIST data type whose base type is a named type could result in the UML diagram in Figure B.4.
TYPE t = SELECT ( entity1, entity2 );
END_TYPE;
TYPE ag = LIST OF UNIQUE entity1; -- maps to UML Class List-of-entity1
END_TYPE;
ENTITY entity1;
END_ENTITY;
ENTITY entity2;
a4 : ARRAY[1:2] OF ARRAY[1:2] OF t; -- maps to UML Classes Array-of-array-of-t and Array-of-t
a5 : SET OF STRING; -- maps to UML Class Set-of-string
a6 : ARRAY[1:4] OF INTEGER; -- maps to UML Class Array-of-integer
END_ENTITY;
Figure B.4 — An example UML diagram showing the UML Classes mapped from EXPRESS aggregation data types
The following EXPRESS fragment containing a SUBTYPE declaration and an enumeration data type could result in the UML diagram in Figure B.5 and the XMI file annotated in Figure B.6.
TYPE fish_type = ENUMERATION OF ( ... );
END_TYPE;
ENTITY pond;
END_ENTITY;
ENTITY fish_pond;
SUBTYPE OF (pond);
fish : SET[1:?] OF fish_type;
END_ENTITY;
Figure B.5 — An example UML diagram showing the UML Classes mapped from an EXPRESS SUBTYPE declaration
Figure B.6 — An example UML 1.3, XMI 1.0 file resulting from an EXPRESS SUBTYPE declaration
The following EXPRESS fragment containing a select data type could result in the UML diagram in Figure B.7.
ENTITY person;
END_ENTITY;
ENTITY organization;
END_ENTITY;
TYPE person_or_organization = SELECT( person, organization );
END_TYPE;
Figure B.7 — An example UML diagram showing the UML Classes mapped from an EXPRESS select data type
The following EXPRESS fragment containing two EXPRESS defined data type could result in the UML diagram in Figure B.8.
TYPE any_int = INTEGER;
END_TYPE;
TYPE positive_int = any_int;
WHERE
greater_than_zero : SELF > 0;
END_TYPE;
Figure B.8 — An example UML diagram showing the UML Classes resulting from an EXPRESS defined type
The following EXPRESS fragment containing an EXPRESS derived attribute could result in the UML diagram in Figure B.9.
ENTITY Something;
DERIVE
b : Another := ... ;
END_ENTITY;
Figure B.9 — An examples UML diagram showing the UML Operation resulting from an EXPRESS derived attribute
Following is an EXPRESS schema that represents the relevant portions of the UML Interchange Metamodel as specified in the UML 1.4 Specification. The UML contructs are represented in EXPRESS as follows:
(* An EXPRESS representation of portions of the UML Interchange Metamodel *) (* specified in UML 1.4 *) (* Note that several EXPRESS identifiers are prefixed with the string UML. Those identifiers required a change in name as the name in the UML Interchange Metamodel due to a restriction in EXPRESS (e.g. was an EXPRESS reserved word). *) SCHEMA iso_10303_25_representation_of_uml_interchange_metamodel; TYPE AggregationKind = ENUMERATION OF (none, UML_aggregate, composite); END_TYPE; -- AggregationKind TYPE CallConcurrencyKind = ENUMERATION OF (sequential, guarded, concurrent); END_TYPE; -- CallConcurrencyKind TYPE ChangeableKind = ENUMERATION OF (changeable, frozen, addonly); END_TYPE; -- ChangeableKind TYPE Name = STRING; END_TYPE; -- Name TYPE OrderingKind = ENUMERATION OF (unordered, ordered, sorted); END_TYPE; -- OrderingKind TYPE ParameterDirectionKind = ENUMERATION OF (out); END_TYPE; -- ParameterDirectionKind TYPE ScopeKind = ENUMERATION OF (instance, UML_classifier); END_TYPE; -- ScopeKind TYPE VisibilityKind = ENUMERATION OF (public, protected, private); END_TYPE; -- VisibilityKind ENTITY Association SUBTYPE OF (Relationship, GeneralizableElement); connection : LIST [2:?] OF AssociationEnd; END_ENTITY; -- Association ENTITY AssociationEnd SUBTYPE OF (ModelElement); isNavigable : BOOLEAN; ordering : OrderingKind; aggregation : AggregationKind; targetScope : ScopeKind; multiplicity : Multiplicity; changeability : ChangeableKind; UML_type : Classifier; INVERSE of_association : Association FOR connection; END_ENTITY; -- AssociationEnd ENTITY Attribute SUBTYPE OF (StructuralFeature); END_ENTITY; -- Attribute ENTITY BehavioralFeature ABSTRACT SUPERTYPE OF (ONEOF (Operation)) SUBTYPE OF (Feature); isQuery : BOOLEAN; INVERSE has : SET[0:?] OF Parameter FOR behavioralFeature; END_ENTITY; -- BehavioralFeature ENTITY Class SUBTYPE OF (Classifier); isActive : BOOLEAN; END_ENTITY; -- Class ENTITY Classifier ABSTRACT SUPERTYPE OF (ONEOF (Class, Datatype)) SUBTYPE OF (GeneralizableElement, Namespace); INVERSE typeof_AssociationEnd : SET[0:?] OF AssociationEnd FOR UML_type; typeof_Parameter : SET[0:?] OF Parameter FOR UML_type; typeof_StructuralFeature : SET[0:?] OF StructuralFeature FOR UML_type; owns : SET[0:?] OF Feature FOR owner; END_ENTITY; -- Classifier ENTITY Datatype SUBTYPE OF (Classifier); END_ENTITY; -- Datatype ENTITY Element ABSTRACT SUPERTYPE OF (ONEOF (ModelElement)); END_ENTITY; -- Element ENTITY ElementImport; visibility : VisibilityKind; UML_alias : Name; importedElement : ModelElement; package : Package; END_ENTITY; -- ElementImport ENTITY Feature ABSTRACT SUPERTYPE OF (ONEOF (StructuralFeature, BehavioralFeature)) SUBTYPE OF (ModelElement); ownerScope : ScopeKind; owner : Classifier; END_ENTITY; -- Feature ENTITY GeneralizableElement ABSTRACT SUPERTYPE OF (ONEOF (Classifier, Association, Package)) SUBTYPE OF (ModelElement); isRoot : BOOLEAN; isLeaf : BOOLEAN; isAbstract : BOOLEAN; INVERSE parents : SET[0:?] OF Generalization FOR child; children : SET[0:?] OF Generalization FOR parent; END_ENTITY; -- GeneralizableElement ENTITY Generalization SUBTYPE OF (Relationship); discriminator : Name; parent : GeneralizableElement; child : GeneralizableElement; END_ENTITY; -- Generalization ENTITY ModelElement ABSTRACT SUPERTYPE OF (ONEOF (Feature, Namespace, GeneralizableElement, Parameter, AssociationEnd, Relationship)) SUBTYPE OF (Element); name : Name; visibility : VisibilityKind; isSpecification : BOOLEAN; namespace : Namespace; INVERSE imported_by : SET[0:?] OF ElementImport FOR importedElement; END_ENTITY; -- ModelElement ENTITY Multiplicity; range : Multiplicityrange; INVERSE size_of : SET[0:?] OF StructuralFeature FOR multiplicity; END_ENTITY; -- Multiplicity ENTITY Multiplicityrange; lower : INTEGER; upper : INTEGER; INVERSE range_of : SET[1:?] OF Multiplicity FOR range; END_ENTITY; -- Multiplicityrange ENTITY Namespace ABSTRACT SUPERTYPE OF (ONEOF (Classifier, Package)) SUBTYPE OF (ModelElement); INVERSE elements : SET[0:?] OF ModelElement FOR namespace; END_ENTITY; -- Namespace ENTITY Operation SUBTYPE OF (BehavioralFeature); concurrency : CallConcurrencyKind; isRoot : BOOLEAN; isLeaf : BOOLEAN; isAbstract : BOOLEAN; specification : STRING; END_ENTITY; -- Operation ENTITY Package SUPERTYPE OF (ONEOF (UML_Model)) SUBTYPE OF (Namespace, GeneralizableElement); INVERSE imports : BAG[0:?] OF ElementImport FOR package; END_ENTITY; -- Package ENTITY Parameter SUBTYPE OF (ModelElement); UML_type : Classifier; kind : ParameterDirectionKind; behavioralFeature : BehavioralFeature; END_ENTITY; -- Parameter ENTITY Relationship ABSTRACT SUPERTYPE OF (ONEOF (Generalization, Association)) SUBTYPE OF (ModelElement); END_ENTITY; -- Relationship ENTITY StructuralFeature ABSTRACT SUPERTYPE OF (ONEOF (Attribute)) SUBTYPE OF (Feature); multiplicity : Multiplicity; changeability : ChangeableKind; targetScope : ScopeKind; ordering : OrderingKind; UML_type : Classifier; END_ENTITY; -- StructuralFeature ENTITY UML_Model SUBTYPE OF (Package); END_ENTITY; -- UML_Model END_SCHEMA; -- iso_10303_25_representation_of_uml_interchange_metamodel
This annex contains diagrams and text excerpts from the OMG Unified Modeling Language Specification Version 1.4 (the UML 1.4 Specification) for the purpose of aiding in understanding the mapping of EXPRESS into the UML Interchange Metamodel. These excerpts are reproduced with the permission of OMG. Please see the OMG copyright.
Readers unfamiliar with the UML Interchange Metamodel should read the overview taken from the UML 1.4 Specification, Section 5.1.
Figure D.1 is the highest level UML Interchange Metamodel diagram. Most aspects on this diagram are used in the EXPRESS to UML Interchange Metamodel mapping. EXPRESS entity data type is mapped into UML Class, EXPRESS schema is mapped into a subclass of UML Namespace, some EXPRESS explicit attributes are mapped in UML Attribute and EXPRESS subtype is mapped into UML Generalization.
Figure D.1 — UML 1.4 specification Figure 5-2 Core Package - Backbone
Figure D.2 is the UML Interchange Metamodel diagram on relationships. Most aspects on this diagram are used in the EXPRESS to UML Interchange Metamodel mapping with the exception of UML Flow and UML AssociationClass. EXPRESS has no equivalent concept for UML Association or UML AssociationEnd. However, some EXPRESS attributes that have a domain of EXPRESS named types are mapped into UML Associations.
Figure D.2 — UML 1.4 specification Figure 5-3 Core Package - Relationships
Figure D.3 is the UML Interchange Metamodel diagram on classifiers. Only UML Class, UML Datatype and UML Enumeration are used in the EXPRESS to UML Interchange Metamodel mapping.
Figure D.3 — UML 1.4 specification Figure 5-5 Core Package - Classifiers
Figure D.4 is the UML Interchange Metamodel diagram on model management. Most aspects on this diagram are used in the EXPRESS to UML Interchange Metamodel mapping with the exception of UML Subsystem. UML Model management plays a similar role to EXPRESS schemas related via the EXPRESS interface specification.
Figure D.4 — UML 1.4 specification Figure 5-21 Model Management
The following text was taken directly from the UML 1.4 specification Section 2.5.2 on UML Association.
An association defines a semantic relationship between classifiers. The instances of an association are a set of tuples relating instances of the classifiers. Each tuple value may appear at most once.
In the metamodel, an Association is a declaration of a semantic relationship between Classifiers, such as Classes. An Association has at least two AssociationEnds. Each end is connected to a Classifier - the same Classifier may be connected to more than one AssociationEnd in the same Association. The Association represents a set of connections among instances of the Classifiers. An instance of an Association is a Link, which is a tuple of Instances drawn from the corresponding Classifiers.
name
The name of the Association which, in combination with its associated Classifiers, must be unique within the enclosing namespace (usually a Package).
connection
An Association consists of at least two AssociationEnds, each of which represents a connection of the association to a Classifier. Each AssociationEnd specifies a set of properties that must be fulfilled for the relationship to be valid. The bulk of the structure of an Association is defined by its AssociationEnds. The classifiers belonging to the association are related to the AssociationEnds by the participant rolename association.
implicit
The «implicit» stereotype is applied to an association, specifying that the association is not manifest, but rather is only conceptual.
xor
The {xor} constraint is applied to a set of associations, specifying that over that set, exactly one is manifest for each associated instance. Xor is an exclusive or (not inclusive or) constraint.
persistence
Persistence denotes the permanence of the state of the association, marking it as transitory (its state is destroyed when the instance is destroyed) or persistent (its state is not destroyed when the instance is destroyed).
Association is a GeneralizableElement. The following elements are inherited by a child Association.
connection
The child must have the same number of ends as the parent. Each participant class must be a descendant of the participant class in the same position in the parent. If the Association is an AssociationClass, its class properties (attributes, operations, etc.) are inherited. Various other properties are subject to change in the child. This specification is likely to be further clarified in UML 2.0.
isRoot
isLeaf
isAbstract
Not inheritable by their very nature, but they define the generalization structure.
name
Each model element has a unique name.
Table E.1 contains a summary of the mapping from EXPRESS to UML using fragments from the example EXPRESS schemas in B.2 and the resulting UML. An example XMI 1.2 file contains representations the majority of the constructs found in the example schemas.
NOTE The following are not included because the UML tool creating the XMI file did not support every construct:
EXPRESS fragment | Resulting UML 1.4 Interchange Metamodel fragment |
SCHEMA context_schema; | UML Package where the UML ModelElement.name is 'Context_schema' defined within the UML Model representing the data view of the system |
SCHEMA context_schema; USE FROM s2_schema; SCHEMA s2_schema; |
|
SCHEMA context_schema; REFERENCE FROM s2_schema; SCHEMA s2_schema; |
REFERENCE FROM results in the same UML as USE FROM |
SCHEMA context_schema; USE FROM s3_schema (entity1 AS renentity1); SCHEMA s3_schema; |
|
SCHEMA context_schema; ENTITY entity2; ENTITY entity1 SUBTYPE OF (entity2); |
|
SCHEMA context_schema; ENTITY entity2 ABSTRACT SUPERTYPE; |
UML Class where the UML Class.name is 'Entity2' and the namespace of the UML Class is the UML Package named 'Context_schema'. The UML Class isAbstract attribute is set to 'true' |
In ENTITY entity1, SUPERTYPE OF (ONEOF ( entity4, entity5) |
When 'entity4' and 'entity5' are the only subtypes of 'entity1', then a UML disjoint constraint on all UML Classes representing an EXPRESS entity type that is a subtype of 'entity1' |
TYPE type1 = SELECT (entity1,type2); |
|
TYPE type2 = ENUMERATION OF ( red, white); | UML Enumeration where UML Enumeration.name is 'Type2' with UML EnumerationLiterals named 'red' and 'white' |
TYPE type3 = STRING |
When the underlying type of a defined type is not a SELECT type or ENUMERATION type
|
ENTITY entity10; a1 : INTEGER; |
|
ENTITY entity5; ENTITY entity4; a2 : entity5; |
|
ENTITY entity5; INVERSE ia1 : SET[1:?] OF entity4 FOR a2; ENTITY entity4; a2 : entity5; |
|
ENTITY entity2; a5 : LIST OF type1; |
|
ENTITY entity4; ENTITY entity2; a6 : LIST OF UNIQUE entity4; |
|
ENTITY entity10; ENTITY entity1; a11 : SET OF entity10; |
|
ENTITY entity1; a7 : SET OF STRING; |
|
ENTITY entity4; a8 : LIST OF STRING; |
|
TYPE type4 = LIST OF STRING; |
|
ENTITY entity2; DERIVE da1 : REAL := ... |
|
Table E.1 — A summary, by example, of the EXPRESS to UML mapping
For each major construct in the EXPRESS language, the following list refers to the clauses in this part of ISO 10303 that specify the mapping:
For each explicit attribute domain construct in the EXPRESS language, the following list refers to the clauses in this part of ISO 10303 that specify the mapping:
This annex contains discussions concerning the relationship of the EXPRESS language and other OMG and XML-related standards and activities.
The OMG Meta-Object Facility is described as follows in the MOF Specification Version 1.4, Section 2:
'The UML and MOF are based on a conceptual layered metamodel architecture, where elements in a given conceptual layer describe elements in the next layer down. For example,
Thus, the UML metamodel can be described an "instance-of" the MOF metametamodel, and a UML model can be described as an "instance-of" the UML metamodel. However, these entities need not necessarily exist in the same domain of representation types and values1. This approach is sometimes referred to as loose metamodeling.'
'The central theme of the MOF approach to metadata management is extensibility. The aim is to provide a framework that supports any kind of metadata, and that allows new kinds to be added as required. In order to achieve this, the MOF has a layered metadata architecture that is based on the classical four layer metamodeling architecture popular within standards communities such as ISO and CDIF. The key feature of both the classical and MOF metadata architectures is the meta-metamodeling layer that ties together the metamodels and models.'
'The MOF metadata architecture1, illustrated by the example in Figure 2-2, ...'
Figure F.1 - MOF 1.4 Specification Figure 2-2 MOF Metadata Architecture
XMI is based on MOF and an XMI document is capable of containing all four layers of this architecture. As a next step in developing and standardizing the relationship between EXPRESS and OMG standards, a definition of EXPRESS at the M2 layer of the architecture using MOF at the M3 layer would result in being able to use MOF compliant repositories to manage the EXPRESS language and EXPRESS schemas directly, without mapping them to UML. The EXPRESS schemas would be managed at the M1 layer. XMI would be capable of exchanging these three layers between MOF/XMI compliant repositories. It should be noted that this activity would be the first standardization of a meta-model of the EXPRESS language. ISO 10303-22 has a data dictionary for EXPRESS schemas in an data access interface environment that could be used as input to the development of an EXPRESS meta-model using MOF.
If EXPRESS schemas can be managed at the M1 layer of this architecture, then EXPRESS entity instances can be managed at the M0 layer. Therefore, the result of a standardized mapping of EXPRESS into MOF would be a capability to exchange EXPRESS entity instances, EXPRESS schemas, the MOF meta-model of EXPRESS and MOF itself all in a single XMI document. As not all layers are required to exist in any particular XMI document, this would enable XMI-compliant schema and data exchange using XML in a manner similar to that defined in ISO 10303-28 XML representation of EXPRESS schemas and data. The form would be most similar to the schema interchange and late binding capabilities of ISO 10303-28. Standardizing the MOF representation of EXPRESS should be investigated as a potential a priority for the next edition of this part of ISO 10303.
As specified in 5.1, several EXPRESS constructs are out of scope for the defined mapping. Two of the major areas not included are: 1)supertype constraints and 2) rules and expressions. The OMG has defined a constraint language for UML called the Object Constraint Language (OCL). In future editions of this part of ISO 10303, it might be possible to include a mapping from the EXPRESS constraint language into OCL. Defining this translation is likely to be a large, research task. However, at this point in time no detailed study of the compatibility between these languages has been undertaken and, therefore, such a translation is not yet ready for standardization.
This annex contains discussions concerning usage scenarios in which implementations of this part of ISO 10303 might be used.
One potential usage scenario for this part of ISO 10303 is the implementation of an Application Protocol (AP) using UML-driven, automated software development tools. The steps involved in this scenario include the following.
In the case that the AP implementation is a data exchange application, then the UML model completed in the UML tool describes the internal workings of the software system. It may be that this use of UML in AP development is invisible to the users of the implementation who only see the ISO 10303-21 files that are read and written by the implementation. One benefit of using automated tools such as those described in this scenario is the improved quality of the system when implemented. As the UML model of the software system is driven initially by the EXPRESS schema itself, it is likely to have fewer errors with respect to reflecting the EXPRESS constructs. Figure 1 shows a use case for such a system.
A second potential usage scenario for this part of ISO 10303 is the case where an implementation will be based on a relational database and where information requirements have been modeled by different teams, one using UML and the other using EXPRESS. Some UML-based software modeling tools can automatically generate relational databases and an application programming interface providing access to the database. In this case, the following steps would be part of the scenario of integrating the two modeling paradigms at the level of the relational database.
Figure G.1 shows how this integration scenario might work.
Figure G.1 — An integrated EXPRESS and UML database
The scenario of integrating information models in EXPRESS with those in UML is not limited to relational database generation.
[1] Meta Object Facility Specification Version 1.3. Object Management Group formal/2000-04-03 [cited 2003-02-22]. Available from the World Wide Web: < http://www.omg.org/cgi-bin/doc?formal/00-04-03>.
[2] Extensible Markup Language (XML) 1.0 (Second Edition). World Wide Web Consortium Recommendation 6 October 2000 [cited 2003-02-22]. Available from World Wide Web: < http://www.w3.org/TR/REC-xml>.
[3] OMG Unified Modeling Language Specification Version 1.3, Object Management Group Document formal/00-03-01, First Edition, March 2000 [cited 2003-01-28]. Available from World Wide Web: < http://www.omg.org/cgi-bin/doc?formal/00-03-01>.
[4] OMG Unified Modeling Language Specification Version 1.4, Object Management Group Document formal/01-09-67, September 2001 [cited 2004-02-11]. Available from World Wide Web: < http://www.omg.org/cgi-bin/doc?formal/01-09-67>.
[5] OMG XML Metadata Interchange (XMI) Specification Version 1.1, Object Management Group Document formal/2000-11-02, November 2000 [cited 2003-01-28]. Available from World Wide Web: < http://www.omg.org/cgi-bin/doc?formal/00-11-02>.
[6] OMG XML Metadata Interchange (XMI) Specification Version 1.0, Object Management Group Document formal/2000-06-01, June 2000 [cited 2003-01-28]. Available from World Wide Web: < http://www.omg.org/cgi-bin/doc?formal/00-06-01>.
[7] SC4 Supplementary directives - Rules for the structure and drafting of SC4 standards for industrial data. ISO TC184/SC4 N1217, 2001-11-01.