Foreword may contain permission: Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights
<foreword id="_bcb6f41d-8baa-7f9c-5118-5131b7cd6377" obligation="informative">
+<title id="_41c9fad3-d4c1-eecc-4fad-f91704acc026">Foreword</title>
+<note id="_4c9dbebf-660c-1fe0-0f5b-ecad18ab11ac"> <p id="_8a662cf2-2101-56ae-5b0d-883b85f1c32b">This document is developed and published by the EXPRESS Language Foundation. All rights reserved.</p>
+</note>
+
Foreword may contain requirement: The EXPRESS Language Foundation shall not be held responsible for identifying any or all such patent rights
<foreword id="_bcb6f41d-8baa-7f9c-5118-5131b7cd6377" obligation="informative">
+<title id="_41c9fad3-d4c1-eecc-4fad-f91704acc026">Foreword</title>
+<note id="_4c9dbebf-660c-1fe0-0f5b-ecad18ab11ac"> <p id="_8a662cf2-2101-56ae-5b0d-883b85f1c32b">This document is developed and published by the EXPRESS Language Foundation. All rights reserved.</p>
+</note>
+
Introduction may contain requirement: The primary purpose of EXPRESS-Q is to bridge the gap between conceptual models (ARM) and their implementations (MIM), ensuring that data exchange between different systems maintains semantic consistency
<introduction id="_25035b03-3ac3-3b39-337c-a9bfe1ff729d" anchor="introduction" obligation="informative">
+<title id="_2b2e98d1-114a-3da4-8556-01ae0a724280">Introduction</title>
+<p id="_6720da92-414b-98bb-fb22-c20d022dec08">EXPRESS-Q is a query language designed to work with EXPRESS schemas, particularly in the context of STEP (Standard for the Exchange of Product model data) application protocols. It provides a formal mechanism for defining mappings between Application Reference Model (ARM) and Model Implementation Model (MIM) schemas, as well as specifying constraints on datasets that comply with these schemas.</p>
+
+<p id="_68b45e84-91b0-8054-9b1c-3ae9ba1f65d3">The primary purpose of EXPRESS-Q is to bridge the gap between conceptual models (ARM) and their implementations (MIM), ensuring that data exchange between different systems maintains semantic consistency. By providing a standardized way to express these mappings and constraints, EXPRESS-Q facilitates more robust and reliable data exchange in complex engineering and manufacturing environments.</p>
<clause id="_15f098db-c1b8-02c4-b49b-2a0592805390" inline-header="false" obligation="normative">
+<title id="_55f6da5f-0b02-2b51-a3c7-a0f6056a6b3a">Semantics</title>
+<p id="_8eb1049a-6605-dd70-89db-964dd855b9a4">This section describes the meaning and usage of each major construct in EXPRESS-Q.</p>
+
+<clause id="_df830fe4-59b9-7c6a-574e-117785041d4b" inline-header="false" obligation="normative">
All lists must be preceded by colon or full stop: Usage
<ul id="_44c9275d-9b40-325c-3b2e-0f772c82eb84"> <li> <p id="_fe64dbd4-296d-f281-eceb-683432efc908">Begin with “ENTITY_MAPPING” followed by the ARM entity name.</p>
+</li>
+<li> <p id="_1150e65e-1906-ae64-1b77-ff57106e4326">Include optional declarations for extensibility, AIM element, source, EXPRESS references, reference path, and alternative mappings.</p>
+</li>
+<li> <p id="_0b0cda59-9b7f-e7e4-611b-7c6c77c58856">Include attribute mappings for the entity’s attributes.</p>
All lists must be preceded by colon or full stop: Usage
<ul id="_a9bd525c-0a7c-c58f-06f9-bf70ad954e45"> <li> <p id="_b0c4775a-46e1-ba03-7c93-3259ac93c578">Specify the AIM element name as a string.</p>
+</li>
+</ul>
All lists must be preceded by colon or full stop: Usage
<ul id="_f9e66dd9-7757-fa96-a874-fd7c3e04a743"> <li> <p id="_21e2f2c5-7c6f-873d-ddeb-1428b2763054">Specify the source as a string, typically an ISO standard number.</p>
+</li>
+</ul>
All lists must be preceded by colon or full stop: Usage
<ul id="_3e6c82b2-72f9-b617-eaf4-cdb4ebd1a4ef"> <li> <p id="_0f08cec6-45c3-9821-d4d4-cd115b9f6fc0">Provide a comma-separated list of references enclosed in square brackets.</p>
+</li>
+<li> <p id="_a7e41245-434f-e782-376b-8cec0ab87982">Use an empty list “[]” if there are no references.</p>
+</li>
+</ul>
All lists must be preceded by colon or full stop: Usage
<ul id="_7bd56e6a-b891-c0f9-901d-20538647bab8"> <li> <p id="_e6d054c6-61cf-a2aa-88d4-7bed3b2a41d3">Begin with <tt>REFPATH: {</tt> and end with <tt>};</tt>.</p>
+</li>
+<li> <p id="_f7a6aea3-af79-7b55-dc99-909a3dc7a844">Each line in the content describes a step in the mapping path.</p>
+</li>
+<li> <p id="_9b65d58b-5127-dddd-52d5-2aeeb47173bb">Use indentation to indicate nested structures.</p>
All lists must be preceded by colon or full stop: Usage
<ul id="_bd361943-6f1a-f934-5f09-838e9e74e77c"> <li> <p id="_c97782a8-1d1e-937a-92a3-6fda43033ff0">Provide a comma-separated list of alternative mappings enclosed in square brackets.</p>
+</li>
+<li> <p id="_39f45cc9-90c4-d225-3684-4b36f8313488">Use an empty list “[]” if there are no alternative mappings.</p>
+</li>
+</ul>
All lists must be preceded by colon or full stop: Usage
<ul id="_7d9edcaf-f4e7-a8bb-9016-9660a74f55b1"> <li> <p id="_2243bc4f-ed11-a269-4bc7-1b516a573da5">Begin with “ATTRIBUTE_MAPPING” followed by the attribute name.</p>
+</li>
+<li> <p id="_ccb88e5f-27c6-113d-8664-29139e613bc3">Specify the ASSERTION_TO value, which indicates the corresponding MIM element or type.</p>
+</li>
+<li> <p id="_51f0665a-29d3-45ca-70e3-8b2846b5865a">Optionally include AIM_ELEMENT, SOURCE, EXPRESS_REF, and REFPATH declarations.</p>
All lists must be preceded by colon or full stop: Entity mapping validation
<ol id="_0887f4c3-db2c-fe3c-f9a3-f48262561519"> <li> <p id="_0ecedf8c-cac2-2acb-5452-568a46c56251">Each ENTITY_MAPPING shall correspond to an entity defined in the ARM schema.</p>
+</li>
+<li> <p id="_8e140049-6c61-1f8d-9f08-c969c39cc43c">The AIM_ELEMENT specified shall exist in the MIM schema.</p>
+</li>
+<li> <p id="_c5b10fa6-9819-bb63-d296-d96c8cc47dcd">The SOURCE referenced shall be a valid ISO standard or other recognized source.</p>
All lists must be preceded by colon or full stop: Attribute mapping validation
<ol id="_f27c3168-85d2-ef78-6a54-468a7559bda1"> <li> <p id="_c6665749-5331-9d78-ebc7-b2b4a8238dc3">Each ATTRIBUTE_MAPPING shall correspond to an attribute of the ARM entity being mapped.</p>
+</li>
+<li> <p id="_f0ff9b2b-71c7-7307-1df1-75a180edf31d">The ASSERTION_TO value shall be a valid type or entity in the MIM schema.</p>
+</li>
+<li> <p id="_3c2c2444-456e-dab1-3b1b-579f309af8e9">If specified, the AIM_ELEMENT shall exist in the MIM schema.</p>
All lists must be preceded by colon or full stop: Reference path validation
<ol id="_7de141cc-211b-0518-4f54-5ced28d6ed82"> <li> <p id="_6e07bf6d-3bc0-1bdf-1a37-82a01a6a0c28">All entities and attributes referenced in the REFPATH shall exist in either the ARM or MIM schema, as appropriate.</p>
+</li>
+<li> <p id="_38d83504-fc01-8bcc-bd55-177f1dd7860d">Relationships between entities (e.g., subtype, supertype) shall be consistent with the schema definitions.</p>
+</li>
+<li> <p id="_7cc8733d-f5c8-4901-ed96-d5c0e02a98da">Constraints specified in the REFPATH shall use valid attributes or functions for the entities they constrain.</p>
All lists must be preceded by colon or full stop: Overall consistency
<ol id="_4ba8a1f5-2ade-4218-b5e6-dbf90c88c93a"> <li> <p id="_f77d37ca-fbe4-f08d-bff9-a19935f1c15a">The complete set of mappings shall cover all entities and attributes in the ARM schema.</p>
+</li>
+<li> <p id="_c5f4e134-c618-a59b-8fe1-0d6f6151467f">There should be no conflicting mappings (e.g., two different mappings for the same ARM entity or attribute).</p>
+</li>
+<li> <p id="_210170da-cfba-beea-dfce-9389e94b52bc">The overall set of mappings should form a consistent and complete transformation from the ARM to the MIM schema.</p>
All lists must be preceded by colon or full stop: Parsing
<ol id="_5b338adc-297d-7ea1-e123-f5b21a23e383"> <li> <p id="_7ab71d47-eaaf-4bd3-908e-984073532cfb">Implement a lexical analyzer to tokenize the EXPRESS-Q input.</p>
+</li>
+<li> <p id="_99fb11b3-1449-333e-ae9b-8a2f7823a85a">Develop a parser based on the EBNF grammar provided in this specification.</p>
+</li>
+<li> <p id="_8055cc6e-2c54-e749-3d55-0be48fecb666">Create an abstract syntax tree (AST) or similar internal representation of the parsed EXPRESS-Q file.</p>
All lists must be preceded by colon or full stop: Schema loading
<ol id="_856615f0-3f0c-1647-4c02-2e7759850d70"> <li> <p id="_bbecbb7a-6e7b-77fa-0fc8-9259ae805ab5">Implement an EXPRESS schema parser or use an existing library to load and interpret ARM and MIM schemas.</p>
+</li>
+<li> <p id="_22259b9a-b452-4658-5664-96b3d08cca72">Create internal representations of the schemas that allow for efficient querying of entities, attributes, and relationships.</p>
+</li>
+</ol>
All lists must be preceded by colon or full stop: Reference path interpretation
<ol id="_a1711cc9-a848-4810-fd1d-30410d5548ed"> <li> <p id="_a86d6340-bf3a-11a2-5f8d-3ea4c7db1891">Implement a separate parser for the reference path syntax.</p>
+</li>
+<li> <p id="_cf883208-a76b-d9fb-a2e6-5734d6ea8fa5">Develop algorithms to traverse reference paths within the context of the loaded schemas.</p>
+</li>
+<li> <p id="_affa6278-7aec-d8c9-79b5-d2e2276f619e">Implement functions to evaluate constraints specified in reference paths.</p>
All lists must be preceded by colon or full stop: Extensibility
<ol id="_5acf938e-16c7-b844-662c-649c5ad9f97c"> <li> <p id="_ef8b2042-8f3f-465b-627e-1984274dfa0d">Design the implementation to be extensible, allowing for future enhancements to the EXPRESS-Q language.</p>
+</li>
+<li> <p id="_811549c8-5eb4-c7c2-43c3-f7aa4cc647de">Use modular design to separate concerns (e.g., parsing, schema handling, validation).</p>
+</li>
+</ol>
All lists must be preceded by colon or full stop: Integration
<ol id="_3a121c98-8c99-871d-106a-399d1fc6eece"> <li> <p id="_1e30fd28-a504-aefa-754e-b278205a5f12">Provide APIs or interfaces for integrating the EXPRESS-Q parser and validator into larger systems or workflows.</p>
+</li>
+<li> <p id="_0e017fc7-617f-11ea-286d-cca0793287d2">Consider implementing export functionality to generate reports or machine-readable representations of the validation results.</p>
+</li>
+</ol>
may contain ambiguous provision: This example shows how EXPRESS-Q can handle cases where an ARM entity might be mapped to different MIM representations based on certain conditions.
<p id="_55e3cd2b-1991-7f44-edf6-34abbcbf3934">This example shows how EXPRESS-Q can handle cases where an ARM entity might be mapped to different MIM representations based on certain conditions.</p>
<clause id="_9fe975fc-e6b4-1af8-89e1-2e1bb8c191b8" inline-header="false" obligation="normative">
+<title id="_c25ad391-aa3c-533a-46fb-5b71ac154745">Future considerations</title>
+<p id="_62ba8cbc-353a-76f6-ac96-9686963e845d">As the use of EXPRESS-Q grows and evolves, several areas may be considered for future enhancements:</p>
+
+<clause id="_c2b817e1-5bbe-c886-fc6c-4e2e06693364" inline-header="false" obligation="normative">
may contain ambiguous provision: Future versions of EXPRESS-Q might benefit from a more expressive constraint language, allowing for more complex conditions and transformations to be specified within mappings.
<p id="_d53ef69f-7270-2802-ad94-17e56df2fe72">Future versions of EXPRESS-Q might benefit from a more expressive constraint language, allowing for more complex conditions and transformations to be specified within mappings.</p>
may contain ambiguous provision: Future versions might include capabilities for defining bi-directional mappings, allowing for the generation of ARM instances from MIM data.
<p id="_9485e94e-f305-ee96-5da7-043034e6b27e">Future versions might include capabilities for defining bi-directional mappings, allowing for the generation of ARM instances from MIM data.</p>
Annex has not been cross-referenced within document
<annex id="_edc4e68c-7694-74ba-f69b-7cab359f5100" inline-header="false" obligation="informative">
+<title id="_895176c0-7012-de53-ab92-1675513bacf3">Complete EXPRESS-Q file example</title>
+<p id="_109982b6-9835-3cdf-d6aa-f9e568da7e29">This annex provides a complete example of an EXPRESS-Q file, demonstrating various features of the language in a cohesive context.</p>
+
+<sourcecode id="_92603d37-d405-4c01-1ec5-7e31e50e9c66"> <body>-- Example EXPRESS-Q file for a simplified product data model
+This document is developed and published by the EXPRESS Language
+Foundation. All rights reserved.
+
+
+
+
+
+
The EXPRESS Language Foundation, maintainer of the EXPRESS data modeling language,
+develops and maintains language standards and technologies. The work of
+preparing EXPRESS standards is carried out through technical working groups.
+Each member interested in a subject for which a working group has been
+established has the right to participate in that group. International
+organizations, both governmental and non-governmental, also take part in the
+work.
+
+
+
The procedures used to develop this document and those intended for its further
+maintenance are described in the EXPRESS Language Foundation’s documentation
+guidelines. In particular, different approval criteria are needed for different
+types of documents. This document was drafted in accordance with the EXPRESS
+Language Foundation’s editorial rules and guidelines.
+
+
+
Attention is drawn to the possibility that some of the elements of this document
+may be the subject of patent rights. The EXPRESS Language Foundation shall not
+be held responsible for identifying any or all such patent rights. Details of
+any patent rights identified during the development of the document will be in
+the Introduction.
+
+
+
Any trade name used in this document is information given for the convenience of
+users and does not constitute an endorsement.
+
+
+
For an explanation of the voluntary nature of standards and the meaning of
+EXPRESS Language Foundation specific terms and expressions related to conformity
+assessment, please refer to the Foundation’s documentation guidelines.
+
+
+
This document was prepared by the EXPRESS Language Foundation’s Technical
+Working Group.
+
+
+
EXPRESS is organized as a series of specifications, each published separately.
+The structure of EXPRESS is described in the Core Language Specification.
+
+
+
Each specification is a member of one of the following series: description
+methods, implementation methods, conformance testing methodology and framework,
+integrated generic resources, integrated application resources, application
+protocols, abstract test suites, application interpreted constructs, and
+application modules. This part is a member of the description methods series.
+
+
+
+
+
Introduction
+
+
+
EXPRESS-Q is a query language designed to work with EXPRESS schemas,
+particularly in the context of STEP (Standard for the Exchange of Product model
+data) application protocols. It provides a formal mechanism for defining
+mappings between Application Reference Model (ARM) and Model Implementation
+Model (MIM) schemas, as well as specifying constraints on datasets that comply
+with these schemas.
+
+
+
The primary purpose of EXPRESS-Q is to bridge the gap between conceptual models
+(ARM) and their implementations (MIM), ensuring that data exchange between
+different systems maintains semantic consistency. By providing a standardized
+way to express these mappings and constraints, EXPRESS-Q facilitates more robust
+and reliable data exchange in complex engineering and manufacturing
+environments.
+
+
+
+
+
Scope
+
+
+
This document specifies EXPRESS-Q, including its syntax, semantics, and usage within the context of EXPRESS schemas and STEP application protocols.
+
+
+
The specification covers:
+
+
+
+
+
The grammar and syntax of EXPRESS-Q
+
+
+
The semantics of EXPRESS-Q constructs
+
+
+
The reference path syntax used for defining detailed mappings
+
+
+
Validation rules for EXPRESS-Q files
+
+
+
Guidelines for implementing EXPRESS-Q parsers and validators
+
+
+
+
+
This specification is intended for use by software developers, data modelers,
+and systems integrators working with EXPRESS schemas and STEP application
+protocols.
+
+
+
+
+
Normative references
+
+
+
+
+
[ISO 10303-1:2024]
+
+
+
[ISO 10303-11:2004]
+
+
+
[ISO/IEC 8824-1:2008]
+
+
+
[ISO/IEC 10646:2011]
+
+
+
+
+
+
+
Terms and definitions
+
+
+
EXPRESS-Q
+
+
query language for EXPRESS schemas, used to define mappings and constraints
+between ARM and MIM schemas
+
+
+
+
+
+
EXPRESS-Q language specification
+
+
+
Overview
+
+
EXPRESS-Q is designed to work alongside EXPRESS schemas, providing a mechanism
+to define mappings between ARM and MIM schemas, as well as specifying
+constraints on datasets. The language uses a syntax similar to EXPRESS but
+introduces new constructs specific to querying and mapping.
+
+
+
An EXPRESS-Q file typically consists of one or more entity mappings, each of
+which defines how an ARM entity and its attributes correspond to MIM elements.
+These mappings can include various declarations such as extensibility, AIM
+elements, sources, EXPRESS references, reference paths, and alternative
+mappings.
+
+
+
+
EBNF grammar
+
+
The following EBNF (Extended Backus-Naur Form) grammar defines the syntax of
+EXPRESS-Q:
This grammar defines the overall structure of an EXPRESS-Q file, including
+entity mappings, attribute mappings, reference paths, including various types
+of relationships between entities and constraints, and various declarations.
+
+
+
+
Semantics
+
+
This section describes the meaning and usage of each major construct in EXPRESS-Q.
An entity mapping defines how an ARM entity corresponds to one or more MIM entities or constructs. It encapsulates all the information needed to map a single ARM entity to its MIM counterpart(s).
+
+
+
+
Usage
+
+
+
+
+
Begin with "ENTITY_MAPPING" followed by the ARM entity name.
+
+
+
Include optional declarations for extensibility, AIM element, source, EXPRESS references, reference path, and alternative mappings.
+
+
+
Include attribute mappings for the entity’s attributes.
The source declaration indicates the source (typically an ISO standard) of the MIM element, which is crucial for traceability and maintaining consistency with relevant standards.
+
+
+
+
Usage
+
+
+
+
+
Specify the source as a string, typically an ISO standard number.
The EXPRESS reference declaration lists EXPRESS references related to the mapping, used to link the mapping to specific parts of the EXPRESS schemas or other relevant documentation.
+
+
+
+
Usage
+
+
+
+
+
Provide a comma-separated list of references enclosed in square brackets.
+
+
+
Use an empty list "[]" if there are no references.
The reference path syntax in EXPRESS-Q is based on the ISO 10303 Mapping
+Specification and is used within the REFPATH sections to define precise mappings
+between ARM and MIM elements. This syntax allows for complex relationships and
+constraints to be expressed concisely.
The reference path syntax uses several symbols to express relationships and constraints. These symbols are derived from the ISO 10303 Mapping Specification:
+
+
+
+
[]
+
+
Enclosed section constrains multiple MIM elements or sections of the reference
+path required to satisfy an information requirement.
+
+
()
+
+
Enclosed section constrains multiple MIM elements or sections of the reference
+path identified as alternatives within the mapping.
+
+
{}
+
+
Enclosed section constrains the reference path to satisfy an information
+requirement.
+
+
<>
+
+
Enclosed section constrains one or more required reference paths.
+
+
||
+
+
Enclosed section constrains the supertype entity.
+
+
→
+
+
The attribute whose name precedes the symbol references the entity or select type whose name follows the symbol.
+
+
←
+
+
The entity or select type whose name precedes the symbol is referenced by the entity attribute whose name follows the symbol.
+
+
[i]
+
+
The attribute whose name precedes the symbol is an aggregate; any element of that aggregate is referred to.
+
+
[n]
+
+
The attribute whose name precedes the symbol is an ordered aggregate; member n of that aggregate is referred to.
+
+
⇒
+
+
The entity whose name precedes the symbol is a supertype of the entity whose name follows the symbol.
+
+
⇐
+
+
The entity whose name precedes the symbol is a subtype of the entity whose name follows the symbol.
+
+
=
+
+
The string, select, or enumeration type is constrained to a choice or value.
+
+
\
+
+
The reference path expression continues on the next line.
+
+
*
+
+
One or more instances of the relationship entity data type may be assembled in a relationship tree structure.
+
+
--
+
+
The text following is a comment or introduces a clause reference.
+
+
*>
+
+
The select or enumeration type whose name precedes the symbol is extended into the select or enumeration type whose name follows the symbol.
+
+
<*
+
+
The select or enumeration type whose name precedes the symbol is an extension of the select or enumeration type whose name follows the symbol.
+
+
!{}
+
+
Section enclosed by {} indicates a negative constraint placed on the mapping.
+
+
+
+
+
+
Usage and examples
+
+
The reference path syntax is used to define precise mappings between ARM and MIM
+elements. Here are some examples demonstrating various aspects of the syntax:
When validating reference paths, the following rules should be applied:
+
+
+
+
+
All referenced entities and attributes shall exist in the corresponding ARM or MIM schema.
+
+
+
The relationships between entities (supertype, subtype, attribute reference) shall be consistent with the schema definitions.
+
+
+
Constraints shall be syntactically correct and use only attributes or functions that are valid for the constrained entity.
+
+
+
Select type extensions shall be consistent with the schema definitions.
+
+
+
Aggregate references (using [i] or [n]) shall be applied only to attributes defined as aggregates in the schema.
+
+
+
Alternative mappings (using parentheses) shall all be valid according to the schema.
+
+
+
Negative constraints shall be logically consistent with the rest of the mapping and the schema definitions.
+
+
+
The overall structure of the reference path shall form a valid path through the schema, connecting the source ARM entity to the target MIM entity or attribute.
Validation of EXPRESS-Q files is crucial to ensure the correctness and consistency of mappings between ARM and MIM schemas. The following rules should be applied when validating EXPRESS-Q files.
+
+
+
+
Entity mapping validation
+
+
+
+
Each ENTITY_MAPPING shall correspond to an entity defined in the ARM schema.
+
+
+
The AIM_ELEMENT specified shall exist in the MIM schema.
+
+
+
The SOURCE referenced shall be a valid ISO standard or other recognized source.
+
+
+
All EXPRESS_REF entries shall refer to valid EXPRESS schemas.
+
+
+
The REFPATH shall form a valid path from the ARM entity to the specified AIM_ELEMENT.
+
+
+
If ALT_MAP is specified, all alternative mappings shall be valid MIM entities.
+
+
+
+
+
+
Attribute mapping validation
+
+
+
+
Each ATTRIBUTE_MAPPING shall correspond to an attribute of the ARM entity being mapped.
+
+
+
The ASSERTION_TO value shall be a valid type or entity in the MIM schema.
+
+
+
If specified, the AIM_ELEMENT shall exist in the MIM schema.
+
+
+
The REFPATH for an attribute shall form a valid path from the ARM attribute to the specified MIM element.
+
+
+
+
+
+
Reference path validation
+
+
+
+
All entities and attributes referenced in the REFPATH shall exist in either the ARM or MIM schema, as appropriate.
+
+
+
Relationships between entities (e.g., subtype, supertype) shall be consistent with the schema definitions.
+
+
+
Constraints specified in the REFPATH shall use valid attributes or functions for the entities they constrain.
+
+
+
SELECT type extensions shall be consistent with the schema definitions.
+
+
+
Aggregate references (using [i] or [n]) shall only be applied to attributes defined as aggregates in the schema.
+
+
+
+
+
+
Overall consistency
+
+
+
+
The complete set of mappings shall cover all entities and attributes in the ARM schema.
+
+
+
There should be no conflicting mappings (e.g., two different mappings for the same ARM entity or attribute).
+
+
+
The overall set of mappings should form a consistent and complete transformation from the ARM to the MIM schema.
+
+
+
+
+
+
+
+
Implementation guidelines
+
+
+
General
+
+
When implementing an EXPRESS-Q parser and validator, consider the following guidelines.
+
+
+
+
Parsing
+
+
+
+
Implement a lexical analyzer to tokenize the EXPRESS-Q input.
+
+
+
Develop a parser based on the EBNF grammar provided in this specification.
+
+
+
Create an abstract syntax tree (AST) or similar internal representation of the parsed EXPRESS-Q file.
+
+
+
+
+
+
Schema loading
+
+
+
+
Implement an EXPRESS schema parser or use an existing library to load and interpret ARM and MIM schemas.
+
+
+
Create internal representations of the schemas that allow for efficient querying of entities, attributes, and relationships.
+
+
+
+
+
+
Validation
+
+
+
+
Implement validation checks based on the rules outlined in the "Validation rules" section.
+
+
+
Perform two-pass validation:
+
+
+
+
First pass: Check syntax and basic semantic rules (e.g., entity and attribute existence).
+
+
+
Second pass: Validate complex semantic rules (e.g., consistency of reference paths).
+
+
+
+
+
+
Provide clear and informative error messages for validation failures.
+
+
+
+
+
+
Reference path interpretation
+
+
+
+
Implement a separate parser for the reference path syntax.
+
+
+
Develop algorithms to traverse reference paths within the context of the loaded schemas.
+
+
+
Implement functions to evaluate constraints specified in reference paths.
+
+
+
+
+
+
Performance considerations
+
+
+
+
Use efficient data structures (e.g., hash tables) for quick lookups of schema elements.
+
+
+
Implement caching mechanisms for frequently accessed schema information.
+
+
+
Consider parallel processing for validating multiple entity or attribute mappings simultaneously.
+
+
+
+
+
+
Extensibility
+
+
+
+
Design the implementation to be extensible, allowing for future enhancements to the EXPRESS-Q language.
+
+
+
Use modular design to separate concerns (e.g., parsing, schema handling, validation).
+
+
+
+
+
+
Integration
+
+
+
+
Provide APIs or interfaces for integrating the EXPRESS-Q parser and validator into larger systems or workflows.
+
+
+
Consider implementing export functionality to generate reports or machine-readable representations of the validation results.
+
+
+
+
+
+
+
+
Use cases and examples
+
+
+
General
+
+
This section provides examples of how EXPRESS-Q can be used in various scenarios
+related to STEP application protocols.
+
+
+
+
Use case 1: Mapping a complex product structure
+
+
In this example, we’ll demonstrate how EXPRESS-Q can be used to map a complex product structure from an ARM schema to a MIM schema.
This example demonstrates how a product with multiple components can be mapped from an ARM schema to a MIM schema using EXPRESS-Q. It shows the use of complex reference paths to navigate relationships between entities in the MIM schema.
+
+
+
+
Use case 2: Mapping with alternative representations
+
+
This example shows how EXPRESS-Q can handle cases where an ARM entity might be mapped to different MIM representations based on certain conditions.
This example demonstrates how EXPRESS-Q can handle alternative mappings for a single ARM entity. The GeometricRepresentation entity can be mapped to either a shape_representation or a tessellated_shape_representation in the MIM schema, depending on the specific requirements of the application.
+
+
+
+
+
+
Summary
+
+
+
EXPRESS-Q provides a powerful and flexible language for defining mappings between ARM and MIM schemas in the context of STEP application protocols. By offering a standardized way to express these mappings, EXPRESS-Q facilitates more robust and reliable data exchange in complex engineering and manufacturing environments.
+
+
+
Key features of EXPRESS-Q include:
+
+
+
+
+
A syntax that is familiar to users of EXPRESS, reducing the learning curve.
+
+
+
The ability to define detailed mappings between ARM and MIM entities and attributes.
+
+
+
Support for complex reference paths, allowing for navigation through intricate schema relationships.
+
+
+
Mechanisms for specifying constraints and alternative mappings.
+
+
+
Clear separation of entity and attribute mappings for improved readability and maintainability.
+
+
+
+
+
The validation rules and implementation guidelines provided in this specification aim to ensure consistent interpretation and implementation of EXPRESS-Q across different tools and systems.
+
+
+
+
+
Future considerations
+
+
+
As the use of EXPRESS-Q grows and evolves, several areas may be considered for future enhancements:
+
+
+
Extended constraint language
+
+
Future versions of EXPRESS-Q might benefit from a more expressive constraint language, allowing for more complex conditions and transformations to be specified within mappings.
+
+
+
+
Integration with other standards
+
+
Consideration should be given to how EXPRESS-Q can be integrated with other relevant standards and technologies, such as ontology languages or model transformation frameworks.
+
+
+
+
Tool support
+
+
Development of standardized libraries and tools for parsing, validating, and processing EXPRESS-Q files would greatly facilitate its adoption and use.
+
+
+
+
Reverse mapping capabilities
+
+
Future versions might include capabilities for defining bi-directional mappings, allowing for the generation of ARM instances from MIM data.
+
+
+
+
Performance optimizations
+
+
As EXPRESS-Q is used with increasingly large and complex schemas, performance optimizations in both the language design and implementation guidelines may become necessary.
+
+
+
+
+
+
Appendix A: Complete EXPRESS-Q file example
+
+
+
This annex provides a complete example of an EXPRESS-Q file, demonstrating
+various features of the language in a cohesive context.
This example demonstrates a simplified product data model, including mappings
+for products, assemblies, assembly components, and geometric representations. It
+showcases various features of EXPRESS-Q, including:
+
+
+
+
+
Entity and attribute mappings
+
+
+
Reference paths with complex relationships
+
+
+
Alternative mappings
+
+
+
Constraints within reference paths
+
+
+
Use of SELECT types (implied by the EXTENSIBLE: TRUE; in GeometricRepresentation)
+
+
+
+
+
This example is not exhaustive but provides a realistic scenario that
+illustrates how EXPRESS-Q can be used to define mappings between ARM and MIM
+schemas in a STEP application protocol context.
Foreword may contain permission: Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights
<foreword id="_bcb6f41d-8baa-7f9c-5118-5131b7cd6377" obligation="informative">
-<title id="_41c9fad3-d4c1-eecc-4fad-f91704acc026">Foreword</title>
-<note id="_4c9dbebf-660c-1fe0-0f5b-ecad18ab11ac"> <p id="_8a662cf2-2101-56ae-5b0d-883b85f1c32b">This document is developed and published by the EXPRESS Language Foundation. All rights reserved.</p>
-</note>
-
Foreword may contain requirement: The EXPRESS Language Foundation shall not be held responsible for identifying any or all such patent rights
<foreword id="_bcb6f41d-8baa-7f9c-5118-5131b7cd6377" obligation="informative">
-<title id="_41c9fad3-d4c1-eecc-4fad-f91704acc026">Foreword</title>
-<note id="_4c9dbebf-660c-1fe0-0f5b-ecad18ab11ac"> <p id="_8a662cf2-2101-56ae-5b0d-883b85f1c32b">This document is developed and published by the EXPRESS Language Foundation. All rights reserved.</p>
-</note>
-
Introduction may contain requirement: The primary purpose of EXPRESS-Q is to bridge the gap between conceptual models (ARM) and their implementations (MIM), ensuring that data exchange between different systems maintains semantic consistency
<introduction id="_25035b03-3ac3-3b39-337c-a9bfe1ff729d" anchor="introduction" obligation="informative">
-<title id="_2b2e98d1-114a-3da4-8556-01ae0a724280">Introduction</title>
-<p id="_6720da92-414b-98bb-fb22-c20d022dec08">EXPRESS-Q is a query language designed to work with EXPRESS schemas, particularly in the context of STEP (Standard for the Exchange of Product model data) application protocols. It provides a formal mechanism for defining mappings between Application Reference Model (ARM) and Model Implementation Model (MIM) schemas, as well as specifying constraints on datasets that comply with these schemas.</p>
-
-<p id="_68b45e84-91b0-8054-9b1c-3ae9ba1f65d3">The primary purpose of EXPRESS-Q is to bridge the gap between conceptual models (ARM) and their implementations (MIM), ensuring that data exchange between different systems maintains semantic consistency. By providing a standardized way to express these mappings and constraints, EXPRESS-Q facilitates more robust and reliable data exchange in complex engineering and manufacturing environments.</p>
<clause id="_15f098db-c1b8-02c4-b49b-2a0592805390" inline-header="false" obligation="normative">
-<title id="_55f6da5f-0b02-2b51-a3c7-a0f6056a6b3a">Semantics</title>
-<p id="_8eb1049a-6605-dd70-89db-964dd855b9a4">This section describes the meaning and usage of each major construct in EXPRESS-Q.</p>
-
-<clause id="_df830fe4-59b9-7c6a-574e-117785041d4b" inline-header="false" obligation="normative">
All lists must be preceded by colon or full stop: Usage
<ul id="_44c9275d-9b40-325c-3b2e-0f772c82eb84"> <li> <p id="_fe64dbd4-296d-f281-eceb-683432efc908">Begin with “ENTITY_MAPPING” followed by the ARM entity name.</p>
-</li>
-<li> <p id="_1150e65e-1906-ae64-1b77-ff57106e4326">Include optional declarations for extensibility, AIM element, source, EXPRESS references, reference path, and alternative mappings.</p>
-</li>
-<li> <p id="_0b0cda59-9b7f-e7e4-611b-7c6c77c58856">Include attribute mappings for the entity’s attributes.</p>
All lists must be preceded by colon or full stop: Usage
<ul id="_a9bd525c-0a7c-c58f-06f9-bf70ad954e45"> <li> <p id="_b0c4775a-46e1-ba03-7c93-3259ac93c578">Specify the AIM element name as a string.</p>
-</li>
-</ul>
All lists must be preceded by colon or full stop: Usage
<ul id="_f9e66dd9-7757-fa96-a874-fd7c3e04a743"> <li> <p id="_21e2f2c5-7c6f-873d-ddeb-1428b2763054">Specify the source as a string, typically an ISO standard number.</p>
-</li>
-</ul>
All lists must be preceded by colon or full stop: Usage
<ul id="_3e6c82b2-72f9-b617-eaf4-cdb4ebd1a4ef"> <li> <p id="_0f08cec6-45c3-9821-d4d4-cd115b9f6fc0">Provide a comma-separated list of references enclosed in square brackets.</p>
-</li>
-<li> <p id="_a7e41245-434f-e782-376b-8cec0ab87982">Use an empty list “[]” if there are no references.</p>
-</li>
-</ul>
All lists must be preceded by colon or full stop: Usage
<ul id="_7bd56e6a-b891-c0f9-901d-20538647bab8"> <li> <p id="_e6d054c6-61cf-a2aa-88d4-7bed3b2a41d3">Begin with <tt>REFPATH: {</tt> and end with <tt>};</tt>.</p>
-</li>
-<li> <p id="_f7a6aea3-af79-7b55-dc99-909a3dc7a844">Each line in the content describes a step in the mapping path.</p>
-</li>
-<li> <p id="_9b65d58b-5127-dddd-52d5-2aeeb47173bb">Use indentation to indicate nested structures.</p>
All lists must be preceded by colon or full stop: Usage
<ul id="_bd361943-6f1a-f934-5f09-838e9e74e77c"> <li> <p id="_c97782a8-1d1e-937a-92a3-6fda43033ff0">Provide a comma-separated list of alternative mappings enclosed in square brackets.</p>
-</li>
-<li> <p id="_39f45cc9-90c4-d225-3684-4b36f8313488">Use an empty list “[]” if there are no alternative mappings.</p>
-</li>
-</ul>
All lists must be preceded by colon or full stop: Usage
<ul id="_7d9edcaf-f4e7-a8bb-9016-9660a74f55b1"> <li> <p id="_2243bc4f-ed11-a269-4bc7-1b516a573da5">Begin with “ATTRIBUTE_MAPPING” followed by the attribute name.</p>
-</li>
-<li> <p id="_ccb88e5f-27c6-113d-8664-29139e613bc3">Specify the ASSERTION_TO value, which indicates the corresponding MIM element or type.</p>
-</li>
-<li> <p id="_51f0665a-29d3-45ca-70e3-8b2846b5865a">Optionally include AIM_ELEMENT, SOURCE, EXPRESS_REF, and REFPATH declarations.</p>
All lists must be preceded by colon or full stop: Entity mapping validation
<ol id="_0887f4c3-db2c-fe3c-f9a3-f48262561519"> <li> <p id="_0ecedf8c-cac2-2acb-5452-568a46c56251">Each ENTITY_MAPPING shall correspond to an entity defined in the ARM schema.</p>
-</li>
-<li> <p id="_8e140049-6c61-1f8d-9f08-c969c39cc43c">The AIM_ELEMENT specified shall exist in the MIM schema.</p>
-</li>
-<li> <p id="_c5b10fa6-9819-bb63-d296-d96c8cc47dcd">The SOURCE referenced shall be a valid ISO standard or other recognized source.</p>
All lists must be preceded by colon or full stop: Attribute mapping validation
<ol id="_f27c3168-85d2-ef78-6a54-468a7559bda1"> <li> <p id="_c6665749-5331-9d78-ebc7-b2b4a8238dc3">Each ATTRIBUTE_MAPPING shall correspond to an attribute of the ARM entity being mapped.</p>
-</li>
-<li> <p id="_f0ff9b2b-71c7-7307-1df1-75a180edf31d">The ASSERTION_TO value shall be a valid type or entity in the MIM schema.</p>
-</li>
-<li> <p id="_3c2c2444-456e-dab1-3b1b-579f309af8e9">If specified, the AIM_ELEMENT shall exist in the MIM schema.</p>
All lists must be preceded by colon or full stop: Reference path validation
<ol id="_7de141cc-211b-0518-4f54-5ced28d6ed82"> <li> <p id="_6e07bf6d-3bc0-1bdf-1a37-82a01a6a0c28">All entities and attributes referenced in the REFPATH shall exist in either the ARM or MIM schema, as appropriate.</p>
-</li>
-<li> <p id="_38d83504-fc01-8bcc-bd55-177f1dd7860d">Relationships between entities (e.g., subtype, supertype) shall be consistent with the schema definitions.</p>
-</li>
-<li> <p id="_7cc8733d-f5c8-4901-ed96-d5c0e02a98da">Constraints specified in the REFPATH shall use valid attributes or functions for the entities they constrain.</p>
All lists must be preceded by colon or full stop: Overall consistency
<ol id="_4ba8a1f5-2ade-4218-b5e6-dbf90c88c93a"> <li> <p id="_f77d37ca-fbe4-f08d-bff9-a19935f1c15a">The complete set of mappings shall cover all entities and attributes in the ARM schema.</p>
-</li>
-<li> <p id="_c5f4e134-c618-a59b-8fe1-0d6f6151467f">There should be no conflicting mappings (e.g., two different mappings for the same ARM entity or attribute).</p>
-</li>
-<li> <p id="_210170da-cfba-beea-dfce-9389e94b52bc">The overall set of mappings should form a consistent and complete transformation from the ARM to the MIM schema.</p>
All lists must be preceded by colon or full stop: Parsing
<ol id="_5b338adc-297d-7ea1-e123-f5b21a23e383"> <li> <p id="_7ab71d47-eaaf-4bd3-908e-984073532cfb">Implement a lexical analyzer to tokenize the EXPRESS-Q input.</p>
-</li>
-<li> <p id="_99fb11b3-1449-333e-ae9b-8a2f7823a85a">Develop a parser based on the EBNF grammar provided in this specification.</p>
-</li>
-<li> <p id="_8055cc6e-2c54-e749-3d55-0be48fecb666">Create an abstract syntax tree (AST) or similar internal representation of the parsed EXPRESS-Q file.</p>
All lists must be preceded by colon or full stop: Schema loading
<ol id="_856615f0-3f0c-1647-4c02-2e7759850d70"> <li> <p id="_bbecbb7a-6e7b-77fa-0fc8-9259ae805ab5">Implement an EXPRESS schema parser or use an existing library to load and interpret ARM and MIM schemas.</p>
-</li>
-<li> <p id="_22259b9a-b452-4658-5664-96b3d08cca72">Create internal representations of the schemas that allow for efficient querying of entities, attributes, and relationships.</p>
-</li>
-</ol>
All lists must be preceded by colon or full stop: Reference path interpretation
<ol id="_a1711cc9-a848-4810-fd1d-30410d5548ed"> <li> <p id="_a86d6340-bf3a-11a2-5f8d-3ea4c7db1891">Implement a separate parser for the reference path syntax.</p>
-</li>
-<li> <p id="_cf883208-a76b-d9fb-a2e6-5734d6ea8fa5">Develop algorithms to traverse reference paths within the context of the loaded schemas.</p>
-</li>
-<li> <p id="_affa6278-7aec-d8c9-79b5-d2e2276f619e">Implement functions to evaluate constraints specified in reference paths.</p>
All lists must be preceded by colon or full stop: Extensibility
<ol id="_5acf938e-16c7-b844-662c-649c5ad9f97c"> <li> <p id="_ef8b2042-8f3f-465b-627e-1984274dfa0d">Design the implementation to be extensible, allowing for future enhancements to the EXPRESS-Q language.</p>
-</li>
-<li> <p id="_811549c8-5eb4-c7c2-43c3-f7aa4cc647de">Use modular design to separate concerns (e.g., parsing, schema handling, validation).</p>
-</li>
-</ol>
All lists must be preceded by colon or full stop: Integration
<ol id="_3a121c98-8c99-871d-106a-399d1fc6eece"> <li> <p id="_1e30fd28-a504-aefa-754e-b278205a5f12">Provide APIs or interfaces for integrating the EXPRESS-Q parser and validator into larger systems or workflows.</p>
-</li>
-<li> <p id="_0e017fc7-617f-11ea-286d-cca0793287d2">Consider implementing export functionality to generate reports or machine-readable representations of the validation results.</p>
-</li>
-</ol>
may contain ambiguous provision: This example shows how EXPRESS-Q can handle cases where an ARM entity might be mapped to different MIM representations based on certain conditions.
<p id="_55e3cd2b-1991-7f44-edf6-34abbcbf3934">This example shows how EXPRESS-Q can handle cases where an ARM entity might be mapped to different MIM representations based on certain conditions.</p>
<clause id="_9fe975fc-e6b4-1af8-89e1-2e1bb8c191b8" inline-header="false" obligation="normative">
-<title id="_c25ad391-aa3c-533a-46fb-5b71ac154745">Future considerations</title>
-<p id="_62ba8cbc-353a-76f6-ac96-9686963e845d">As the use of EXPRESS-Q grows and evolves, several areas may be considered for future enhancements:</p>
-
-<clause id="_c2b817e1-5bbe-c886-fc6c-4e2e06693364" inline-header="false" obligation="normative">
may contain ambiguous provision: Future versions of EXPRESS-Q might benefit from a more expressive constraint language, allowing for more complex conditions and transformations to be specified within mappings.
<p id="_d53ef69f-7270-2802-ad94-17e56df2fe72">Future versions of EXPRESS-Q might benefit from a more expressive constraint language, allowing for more complex conditions and transformations to be specified within mappings.</p>
may contain ambiguous provision: Future versions might include capabilities for defining bi-directional mappings, allowing for the generation of ARM instances from MIM data.
<p id="_9485e94e-f305-ee96-5da7-043034e6b27e">Future versions might include capabilities for defining bi-directional mappings, allowing for the generation of ARM instances from MIM data.</p>
Annex has not been cross-referenced within document
<annex id="_edc4e68c-7694-74ba-f69b-7cab359f5100" inline-header="false" obligation="informative">
-<title id="_895176c0-7012-de53-ab92-1675513bacf3">Complete EXPRESS-Q file example</title>
-<p id="_109982b6-9835-3cdf-d6aa-f9e568da7e29">This annex provides a complete example of an EXPRESS-Q file, demonstrating various features of the language in a cohesive context.</p>
-
-<sourcecode id="_92603d37-d405-4c01-1ec5-7e31e50e9c66"> <body>-- Example EXPRESS-Q file for a simplified product data model
-This document is developed and published by the EXPRESS Language
-Foundation. All rights reserved.
-
-
-
-
-
-
The EXPRESS Language Foundation, maintainer of the EXPRESS data modeling language,
-develops and maintains language standards and technologies. The work of
-preparing EXPRESS standards is carried out through technical working groups.
-Each member interested in a subject for which a working group has been
-established has the right to participate in that group. International
-organizations, both governmental and non-governmental, also take part in the
-work.
-
-
-
The procedures used to develop this document and those intended for its further
-maintenance are described in the EXPRESS Language Foundation’s documentation
-guidelines. In particular, different approval criteria are needed for different
-types of documents. This document was drafted in accordance with the EXPRESS
-Language Foundation’s editorial rules and guidelines.
-
-
-
Attention is drawn to the possibility that some of the elements of this document
-may be the subject of patent rights. The EXPRESS Language Foundation shall not
-be held responsible for identifying any or all such patent rights. Details of
-any patent rights identified during the development of the document will be in
-the Introduction.
-
-
-
Any trade name used in this document is information given for the convenience of
-users and does not constitute an endorsement.
-
-
-
For an explanation of the voluntary nature of standards and the meaning of
-EXPRESS Language Foundation specific terms and expressions related to conformity
-assessment, please refer to the Foundation’s documentation guidelines.
-
-
-
This document was prepared by the EXPRESS Language Foundation’s Technical
-Working Group.
-
-
-
EXPRESS is organized as a series of specifications, each published separately.
-The structure of EXPRESS is described in the Core Language Specification.
-
-
-
Each specification is a member of one of the following series: description
-methods, implementation methods, conformance testing methodology and framework,
-integrated generic resources, integrated application resources, application
-protocols, abstract test suites, application interpreted constructs, and
-application modules. This part is a member of the description methods series.
-
-
-
-
-
Introduction
-
-
-
EXPRESS-Q is a query language designed to work with EXPRESS schemas,
-particularly in the context of STEP (Standard for the Exchange of Product model
-data) application protocols. It provides a formal mechanism for defining
-mappings between Application Reference Model (ARM) and Model Implementation
-Model (MIM) schemas, as well as specifying constraints on datasets that comply
-with these schemas.
-
-
-
The primary purpose of EXPRESS-Q is to bridge the gap between conceptual models
-(ARM) and their implementations (MIM), ensuring that data exchange between
-different systems maintains semantic consistency. By providing a standardized
-way to express these mappings and constraints, EXPRESS-Q facilitates more robust
-and reliable data exchange in complex engineering and manufacturing
-environments.
-
-
-
-
-
Scope
-
-
-
This document specifies EXPRESS-Q, including its syntax, semantics, and usage within the context of EXPRESS schemas and STEP application protocols.
-
-
-
The specification covers:
-
-
-
-
-
The grammar and syntax of EXPRESS-Q
-
-
-
The semantics of EXPRESS-Q constructs
-
-
-
The reference path syntax used for defining detailed mappings
-
-
-
Validation rules for EXPRESS-Q files
-
-
-
Guidelines for implementing EXPRESS-Q parsers and validators
-
-
-
-
-
This specification is intended for use by software developers, data modelers,
-and systems integrators working with EXPRESS schemas and STEP application
-protocols.
-
-
-
-
-
Normative references
-
-
-
-
-
[ISO 10303-1:2024]
-
-
-
[ISO 10303-11:2004]
-
-
-
[ISO/IEC 8824-1:2008]
-
-
-
[ISO/IEC 10646:2011]
-
-
-
-
-
-
-
Terms and definitions
-
-
-
EXPRESS-Q
-
-
query language for EXPRESS schemas, used to define mappings and constraints
-between ARM and MIM schemas
-
-
-
-
-
-
EXPRESS-Q language specification
-
-
-
Overview
-
-
EXPRESS-Q is designed to work alongside EXPRESS schemas, providing a mechanism
-to define mappings between ARM and MIM schemas, as well as specifying
-constraints on datasets. The language uses a syntax similar to EXPRESS but
-introduces new constructs specific to querying and mapping.
-
-
-
An EXPRESS-Q file typically consists of one or more entity mappings, each of
-which defines how an ARM entity and its attributes correspond to MIM elements.
-These mappings can include various declarations such as extensibility, AIM
-elements, sources, EXPRESS references, reference paths, and alternative
-mappings.
-
-
-
-
EBNF grammar
-
-
The following EBNF (Extended Backus-Naur Form) grammar defines the syntax of
-EXPRESS-Q:
This grammar defines the overall structure of an EXPRESS-Q file, including
-entity mappings, attribute mappings, reference paths, including various types
-of relationships between entities and constraints, and various declarations.
-
-
-
-
Semantics
-
-
This section describes the meaning and usage of each major construct in EXPRESS-Q.
An entity mapping defines how an ARM entity corresponds to one or more MIM entities or constructs. It encapsulates all the information needed to map a single ARM entity to its MIM counterpart(s).
-
-
-
-
Usage
-
-
-
-
-
Begin with "ENTITY_MAPPING" followed by the ARM entity name.
-
-
-
Include optional declarations for extensibility, AIM element, source, EXPRESS references, reference path, and alternative mappings.
-
-
-
Include attribute mappings for the entity’s attributes.
The source declaration indicates the source (typically an ISO standard) of the MIM element, which is crucial for traceability and maintaining consistency with relevant standards.
-
-
-
-
Usage
-
-
-
-
-
Specify the source as a string, typically an ISO standard number.
The EXPRESS reference declaration lists EXPRESS references related to the mapping, used to link the mapping to specific parts of the EXPRESS schemas or other relevant documentation.
-
-
-
-
Usage
-
-
-
-
-
Provide a comma-separated list of references enclosed in square brackets.
-
-
-
Use an empty list "[]" if there are no references.
The reference path syntax in EXPRESS-Q is based on the ISO 10303 Mapping
-Specification and is used within the REFPATH sections to define precise mappings
-between ARM and MIM elements. This syntax allows for complex relationships and
-constraints to be expressed concisely.
The reference path syntax uses several symbols to express relationships and constraints. These symbols are derived from the ISO 10303 Mapping Specification:
-
-
-
-
[]
-
-
Enclosed section constrains multiple MIM elements or sections of the reference
-path required to satisfy an information requirement.
-
-
()
-
-
Enclosed section constrains multiple MIM elements or sections of the reference
-path identified as alternatives within the mapping.
-
-
{}
-
-
Enclosed section constrains the reference path to satisfy an information
-requirement.
-
-
<>
-
-
Enclosed section constrains one or more required reference paths.
-
-
||
-
-
Enclosed section constrains the supertype entity.
-
-
→
-
-
The attribute whose name precedes the symbol references the entity or select type whose name follows the symbol.
-
-
←
-
-
The entity or select type whose name precedes the symbol is referenced by the entity attribute whose name follows the symbol.
-
-
[i]
-
-
The attribute whose name precedes the symbol is an aggregate; any element of that aggregate is referred to.
-
-
[n]
-
-
The attribute whose name precedes the symbol is an ordered aggregate; member n of that aggregate is referred to.
-
-
⇒
-
-
The entity whose name precedes the symbol is a supertype of the entity whose name follows the symbol.
-
-
⇐
-
-
The entity whose name precedes the symbol is a subtype of the entity whose name follows the symbol.
-
-
=
-
-
The string, select, or enumeration type is constrained to a choice or value.
-
-
\
-
-
The reference path expression continues on the next line.
-
-
*
-
-
One or more instances of the relationship entity data type may be assembled in a relationship tree structure.
-
-
--
-
-
The text following is a comment or introduces a clause reference.
-
-
*>
-
-
The select or enumeration type whose name precedes the symbol is extended into the select or enumeration type whose name follows the symbol.
-
-
<*
-
-
The select or enumeration type whose name precedes the symbol is an extension of the select or enumeration type whose name follows the symbol.
-
-
!{}
-
-
Section enclosed by {} indicates a negative constraint placed on the mapping.
-
-
-
-
-
-
Usage and examples
-
-
The reference path syntax is used to define precise mappings between ARM and MIM
-elements. Here are some examples demonstrating various aspects of the syntax:
When validating reference paths, the following rules should be applied:
-
-
-
-
-
All referenced entities and attributes shall exist in the corresponding ARM or MIM schema.
-
-
-
The relationships between entities (supertype, subtype, attribute reference) shall be consistent with the schema definitions.
-
-
-
Constraints shall be syntactically correct and use only attributes or functions that are valid for the constrained entity.
-
-
-
Select type extensions shall be consistent with the schema definitions.
-
-
-
Aggregate references (using [i] or [n]) shall be applied only to attributes defined as aggregates in the schema.
-
-
-
Alternative mappings (using parentheses) shall all be valid according to the schema.
-
-
-
Negative constraints shall be logically consistent with the rest of the mapping and the schema definitions.
-
-
-
The overall structure of the reference path shall form a valid path through the schema, connecting the source ARM entity to the target MIM entity or attribute.
Validation of EXPRESS-Q files is crucial to ensure the correctness and consistency of mappings between ARM and MIM schemas. The following rules should be applied when validating EXPRESS-Q files.
-
-
-
-
Entity mapping validation
-
-
-
-
Each ENTITY_MAPPING shall correspond to an entity defined in the ARM schema.
-
-
-
The AIM_ELEMENT specified shall exist in the MIM schema.
-
-
-
The SOURCE referenced shall be a valid ISO standard or other recognized source.
-
-
-
All EXPRESS_REF entries shall refer to valid EXPRESS schemas.
-
-
-
The REFPATH shall form a valid path from the ARM entity to the specified AIM_ELEMENT.
-
-
-
If ALT_MAP is specified, all alternative mappings shall be valid MIM entities.
-
-
-
-
-
-
Attribute mapping validation
-
-
-
-
Each ATTRIBUTE_MAPPING shall correspond to an attribute of the ARM entity being mapped.
-
-
-
The ASSERTION_TO value shall be a valid type or entity in the MIM schema.
-
-
-
If specified, the AIM_ELEMENT shall exist in the MIM schema.
-
-
-
The REFPATH for an attribute shall form a valid path from the ARM attribute to the specified MIM element.
-
-
-
-
-
-
Reference path validation
-
-
-
-
All entities and attributes referenced in the REFPATH shall exist in either the ARM or MIM schema, as appropriate.
-
-
-
Relationships between entities (e.g., subtype, supertype) shall be consistent with the schema definitions.
-
-
-
Constraints specified in the REFPATH shall use valid attributes or functions for the entities they constrain.
-
-
-
SELECT type extensions shall be consistent with the schema definitions.
-
-
-
Aggregate references (using [i] or [n]) shall only be applied to attributes defined as aggregates in the schema.
-
-
-
-
-
-
Overall consistency
-
-
-
-
The complete set of mappings shall cover all entities and attributes in the ARM schema.
-
-
-
There should be no conflicting mappings (e.g., two different mappings for the same ARM entity or attribute).
-
-
-
The overall set of mappings should form a consistent and complete transformation from the ARM to the MIM schema.
-
-
-
-
-
-
-
-
Implementation guidelines
-
-
-
General
-
-
When implementing an EXPRESS-Q parser and validator, consider the following guidelines.
-
-
-
-
Parsing
-
-
-
-
Implement a lexical analyzer to tokenize the EXPRESS-Q input.
-
-
-
Develop a parser based on the EBNF grammar provided in this specification.
-
-
-
Create an abstract syntax tree (AST) or similar internal representation of the parsed EXPRESS-Q file.
-
-
-
-
-
-
Schema loading
-
-
-
-
Implement an EXPRESS schema parser or use an existing library to load and interpret ARM and MIM schemas.
-
-
-
Create internal representations of the schemas that allow for efficient querying of entities, attributes, and relationships.
-
-
-
-
-
-
Validation
-
-
-
-
Implement validation checks based on the rules outlined in the "Validation rules" section.
-
-
-
Perform two-pass validation:
-
-
-
-
First pass: Check syntax and basic semantic rules (e.g., entity and attribute existence).
-
-
-
Second pass: Validate complex semantic rules (e.g., consistency of reference paths).
-
-
-
-
-
-
Provide clear and informative error messages for validation failures.
-
-
-
-
-
-
Reference path interpretation
-
-
-
-
Implement a separate parser for the reference path syntax.
-
-
-
Develop algorithms to traverse reference paths within the context of the loaded schemas.
-
-
-
Implement functions to evaluate constraints specified in reference paths.
-
-
-
-
-
-
Performance considerations
-
-
-
-
Use efficient data structures (e.g., hash tables) for quick lookups of schema elements.
-
-
-
Implement caching mechanisms for frequently accessed schema information.
-
-
-
Consider parallel processing for validating multiple entity or attribute mappings simultaneously.
-
-
-
-
-
-
Extensibility
-
-
-
-
Design the implementation to be extensible, allowing for future enhancements to the EXPRESS-Q language.
-
-
-
Use modular design to separate concerns (e.g., parsing, schema handling, validation).
-
-
-
-
-
-
Integration
-
-
-
-
Provide APIs or interfaces for integrating the EXPRESS-Q parser and validator into larger systems or workflows.
-
-
-
Consider implementing export functionality to generate reports or machine-readable representations of the validation results.
-
-
-
-
-
-
-
-
Use cases and examples
-
-
-
General
-
-
This section provides examples of how EXPRESS-Q can be used in various scenarios
-related to STEP application protocols.
-
-
-
-
Use case 1: Mapping a complex product structure
-
-
In this example, we’ll demonstrate how EXPRESS-Q can be used to map a complex product structure from an ARM schema to a MIM schema.
This example demonstrates how a product with multiple components can be mapped from an ARM schema to a MIM schema using EXPRESS-Q. It shows the use of complex reference paths to navigate relationships between entities in the MIM schema.
-
-
-
-
Use case 2: Mapping with alternative representations
-
-
This example shows how EXPRESS-Q can handle cases where an ARM entity might be mapped to different MIM representations based on certain conditions.
This example demonstrates how EXPRESS-Q can handle alternative mappings for a single ARM entity. The GeometricRepresentation entity can be mapped to either a shape_representation or a tessellated_shape_representation in the MIM schema, depending on the specific requirements of the application.
-
-
-
-
-
-
Summary
-
-
-
EXPRESS-Q provides a powerful and flexible language for defining mappings between ARM and MIM schemas in the context of STEP application protocols. By offering a standardized way to express these mappings, EXPRESS-Q facilitates more robust and reliable data exchange in complex engineering and manufacturing environments.
-
-
-
Key features of EXPRESS-Q include:
-
-
-
-
-
A syntax that is familiar to users of EXPRESS, reducing the learning curve.
-
-
-
The ability to define detailed mappings between ARM and MIM entities and attributes.
-
-
-
Support for complex reference paths, allowing for navigation through intricate schema relationships.
-
-
-
Mechanisms for specifying constraints and alternative mappings.
-
-
-
Clear separation of entity and attribute mappings for improved readability and maintainability.
-
-
-
-
-
The validation rules and implementation guidelines provided in this specification aim to ensure consistent interpretation and implementation of EXPRESS-Q across different tools and systems.
-
-
-
-
-
Future considerations
-
-
-
As the use of EXPRESS-Q grows and evolves, several areas may be considered for future enhancements:
-
-
-
Extended constraint language
-
-
Future versions of EXPRESS-Q might benefit from a more expressive constraint language, allowing for more complex conditions and transformations to be specified within mappings.
-
-
-
-
Integration with other standards
-
-
Consideration should be given to how EXPRESS-Q can be integrated with other relevant standards and technologies, such as ontology languages or model transformation frameworks.
-
-
-
-
Tool support
-
-
Development of standardized libraries and tools for parsing, validating, and processing EXPRESS-Q files would greatly facilitate its adoption and use.
-
-
-
-
Reverse mapping capabilities
-
-
Future versions might include capabilities for defining bi-directional mappings, allowing for the generation of ARM instances from MIM data.
-
-
-
-
Performance optimizations
-
-
As EXPRESS-Q is used with increasingly large and complex schemas, performance optimizations in both the language design and implementation guidelines may become necessary.
-
-
-
-
-
-
Appendix A: Complete EXPRESS-Q file example
-
-
-
This annex provides a complete example of an EXPRESS-Q file, demonstrating
-various features of the language in a cohesive context.
This example demonstrates a simplified product data model, including mappings
-for products, assemblies, assembly components, and geometric representations. It
-showcases various features of EXPRESS-Q, including:
-
-
-
-
-
Entity and attribute mappings
-
-
-
Reference paths with complex relationships
-
-
-
Alternative mappings
-
-
-
Constraints within reference paths
-
-
-
Use of SELECT types (implied by the EXTENSIBLE: TRUE; in GeometricRepresentation)
-
-
-
-
-
This example is not exhaustive but provides a realistic scenario that
-illustrates how EXPRESS-Q can be used to define mappings between ARM and MIM
-schemas in a STEP application protocol context.