Application module: Foundation representation ISO/TS 10303-1006:2021(E)
© ISO

Cover page
Table of contents
Copyright
Foreword
Introduction
1 Scope
2 Normative references
3 Terms, definitions and abbreviated terms
    3.1 Terms and definitions
    3.2 Abbreviated terms

4 Information requirements
   4.1 Required AM ARMs
   4.2 ARM type definition
   4.3 ARM entity definitions
   4.4 ARM function definitions
5 Module interpreted model
   5.1 Mapping specification
   5.2 MIM EXPRESS short listing

A MIM short names
B Information object registration
C ARM EXPRESS-G   EXPRESS-G
D MIM EXPRESS-G   EXPRESS-G
E Computer interpretable listings
F Change history
Bibliography
Index

4 Information requirements

This clause specifies the information requirements for the Foundation representation application module. The information requirements are specified as the Application Reference Model (ARM) of this application module.

NOTE 1  A graphical representation of the information requirements is given in Annex C.

NOTE 2  The mapping specification is specified in 5.1. It shows how the information requirements are met by using common resources and constructs defined or imported in the MIM schema of this application module.

This clause defines the information requirements to which implementations shall conform using the EXPRESS language as defined in ISO 10303-11. The following begins the Foundation_representation_arm schema and identifies the necessary external references.

EXPRESS specification:

*)
SCHEMA Foundation_representation_arm;
(*

4.1 Required AM ARMs

The following EXPRESS interface statements specify the elements imported from the ARMs of other application modules.

EXPRESS specification:

*)
USE FROM Support_resource_arm;    --  ISO/TS 10303-1800

USE FROM Value_with_unit_arm;    --  ISO/TS 10303-1054

REFERENCE FROM Support_resource_arm    --  ISO/TS 10303-1800
  (bag_to_set);
(*

NOTE 1   The schemas referenced above are specified in the following part of ISO 10303:

Support_resource_arm ISO/TS 10303-1800
Value_with_unit_arm ISO/TS 10303-1054
Support_resource_arm ISO/TS 10303-1800

NOTE 2   See Annex C, Figures C.1and C.2 for a graphical representation of this schema.

4.2 ARM type definition

This subclause specifies the ARM type for this application module. The ARM type and definition is specified below.

4.2.1 representation_or_representation_reference   EXPRESS-G

The representation_or_representation_reference type allows for the designation of the data types Representation and Representation_reference.

EXPRESS specification:

*)
TYPE representation_or_representation_reference = SELECT
   (Representation,
    Representation_reference);
END_TYPE;
(*

4.3 ARM entity definitions

This subclause specifies the ARM entities for this module. Each ARM application entity is an atomic element that embodies a unique application concept and contains attributes specifying the data elements of the entity. The ARM entities and definitions are specified below.

4.3.1 Numerical_representation_context   EXPRESS-GMapping table

A Numerical_representation_context is a type of Representation_context in which units and uncertainties may be defined. These units and uncertainties apply to the instances of Representation_item that are used in that context.

EXPRESS specification:

*)
ENTITY Numerical_representation_context
  SUBTYPE OF (Representation_context);
  units : OPTIONAL SET[1:?] OF Unit;
  accuracies : OPTIONAL SET[1:?] OF Uncertainty_with_unit;
END_ENTITY;
(*

Attribute definitions:

units: the set of Units that apply for attribute values of instances of Representation_item used in that context. The value of this attribute need not be specified.

NOTE    The units of Numerical_representation_context is only intended to provide a default unit. Its use is not intended to prevent representation items being specified with the same or different units to the context.

accuracies: the uncertainty measures that apply on attribute values of instances of Representation_item used in that context. The value of this attribute need not be specified.

4.3.2 Representation   EXPRESS-GMapping table

A Representation is a collection of one or more instances of Representation_item that are related in the specified Representation_context.

EXPRESS specification:

*)
ENTITY Representation;
  id : OPTIONAL identifier;
  name : OPTIONAL label;
  description : OPTIONAL text;
  context_of_items : Representation_context;
  items : SET[1:?] OF Representation_item;
WHERE
  WR1: EXISTS(name) OR (TYPEOF(SELF\Representation) <> TYPEOF(SELF));
END_ENTITY;
(*

Attribute definitions:

id: the identifier for the Representation. The value of this attribute need not be specified.

name: the words by which the Representation is known.

EXAMPLE    The name of a Representation may be the name of a CAD model.

description: the text that provides further information about the Representation. The value of this attribute need not be specified.

context_of_items: the Representation_context that specifies the context of the Representation.

items: the set of Representation_item instances directly included in the Representation.

Formal propositions:

WR1: If SELF is exact instance of Representation, then name shall be provided.

4.3.3 Representation_context   EXPRESS-GMapping table

A Representation_context is a context in which instances of Representation_item are related.

EXPRESS specification:

*)
ENTITY Representation_context;
  id : identifier;
  kind : text;
INVERSE
  representations_in_context : SET[1:?] OF Representation FOR context_of_items;
END_ENTITY;
(*

Attribute definitions:

id: the identifier for the Representation_context.

kind: the text that describes the type of the context.

EXAMPLE 1   'numeric values' is an example of kind of Representation_context.

EXAMPLE 2   '2D space' or '3D space' are examples of kind which can be used for geometric representation contexts.

representations_in_context: the set of instances of Representation that share the Representation_context. This set shall contain at least one element.

4.3.4 Representation_context_reference   EXPRESS-GMapping table

A Representation_context_reference is an identification based reference to a Representation_context.

EXPRESS specification:

*)
ENTITY Representation_context_reference;
  context_identifier : identifier;
INVERSE
  representations_in_context : SET[1:?] OF Representation_reference FOR context_of_items;
END_ENTITY;
(*

Attribute definitions:

context_identifier: the identifier that distinguishes the Representation_context_reference.

representations_in_context: the instances of Representation_reference that refer to the Representation_context_reference.

4.3.5 Representation_item   EXPRESS-GMapping table

A Representation_item is an element of representation.

A Representation_item shall be in the set of items of one or more instances of Representation or it shall belong to one or more instances of Representation, being referred to, directly or indirectly, by items of these instances of Representation.

NOTE    this constraint is formally represented in the Express specification of the resource entity that corresponds to Representation_item in the MIM schema.

Only specializations of Representation_item can be instantiated.

EXPRESS specification:

*)
ENTITY Representation_item
  ABSTRACT SUPERTYPE ;
  name : OPTIONAL label;
END_ENTITY;
(*

Attribute definitions:

name: the words by which the Representation_item is known.

EXAMPLE    The name of a geometric Representation_item may be its element tag in the originating CAD system.

Informal propositions:

IP1: the Representation_item shall be used directly or indirectly, in at least a Representation.

4.3.6 Representation_item_relationship   EXPRESS-GMapping table

A Representation_item_relationship is a relationship between two Representation_items.

EXPRESS specification:

*)
ENTITY Representation_item_relationship;
  name : label;
  description : OPTIONAL text;
  relating_representation_item : Representation_item;
  related_representation_item : Representation_item;
END_ENTITY;
(*

Attribute definitions:

name: the words by which the Representation_item_relationship is known.

description: the text that provides further information about the relationship.

relating_representation_item: one of the instances of Representation_item that is a part of the relationship.

related_representation_item: the other instance of Representation_item that is a part of the relationship. If one element of the relationship is the dependent upon the other, this attribute shall be the dependent one.

4.3.7 Representation_reference   EXPRESS-GMapping table

A Representation_reference is an identification based reference to a Representation.

EXPRESS specification:

*)
ENTITY Representation_reference;
  id : identifier;
  context_of_items : Representation_context_reference;
END_ENTITY;
(*

Attribute definitions:

id: the identifier that distinguishes the Representation_reference.

context_of_items: the Representation_context_reference in which the items are related to form a Representation_reference of some concept.

4.3.8 Representation_relationship   EXPRESS-GMapping table

A Representation_relationship is an association between two instances of Representation.

EXPRESS specification:

*)
ENTITY Representation_relationship;
  relation_type : OPTIONAL label;
  description : OPTIONAL text;
  rep_1 : Representation;
  rep_2 : Representation;
WHERE
  WR1: EXISTS(relation_type) OR (TYPEOF(SELF\Representation_relationship) <> TYPEOF(SELF));
  WR2: EXISTS(description) OR (TYPEOF(SELF\Representation_relationship) <> TYPEOF(SELF));
END_ENTITY;
(*

Attribute definitions:

relation_type: the string that specifies the type of the relationship.

Where applicable, the following values shall be used:

description: the text that provides further information about the relationship.

rep_1: one of the instances of Representation that is a part of the relationship.

rep_2: the other instance of Representation that is a part of the relationship. If one element of the relationship is the dependent upon the other, this attribute shall be the dependent one.

Formal propositions:

WR1: If SELF is exact instance of Representation_relationship, then relation_type shall be provided.

WR2: If SELF is exact instance of Representation_relationship, then description shall be provided.

4.3.9 String_representation_item   EXPRESS-GMapping table

A String_representation_item is a type of Representation_item that specifies a text.

EXPRESS specification:

*)
ENTITY String_representation_item
  SUBTYPE OF (Representation_item);
  string_value : STRING;
END_ENTITY;
(*

Attribute definitions:

string_value: the string that is the element of representation.

4.4 ARM function definitions

This subclause specifies the ARM functions for this module. The ARM functions and definitions are specified below.

4.4.1 item_in_context

The function item_in_context determines if a Representation_item is related to a Representation_context. The function returns TRUE if the item argument is related by a Representation to the input cntxt argument. Function item_in_context returns FALSE otherwise. The type of the function is BOOLEAN.

A Representation_item is related to a Representation_context if it is:

NOTE 1   The second condition is a recursive check allowing for a Representation_item to be related to a Representation_context by being part of a tree of related instances of Representation_item. The tree is rooted in an entity that is related to a Representation_context by fulfilling the first or second condition.

NOTE 2   The function item_in_context only determines if an item is related to a specific Representation_context. The relationship of the item to some other Representation_context is not determined.

EXPRESS specification:

*)
FUNCTION item_in_context (item : Representation_item; cntxt : Representation_context) : BOOLEAN;
LOCAL
      y : BAG OF Representation_item;
    END_LOCAL;
    -- If there is one or more representation using both the item
    -- and cntxt return true.
    IF SIZEOF(USEDIN(item,'FOUNDATION_REPRESENTATION_ARM.REPRESENTATION.ITEMS')
      * cntxt.representations_in_context) > 0 THEN
      RETURN (TRUE);
      -- Determine the bag of representation_items that reference
      -- item
      ELSE y := QUERY(z <* USEDIN (item , '') |
             'FOUNDATION_REPRESENTATION_ARM.REPRESENTATION_ITEM' IN TYPEOF(z));
        -- Ensure that the bag is not empty
        IF SIZEOF(y) > 0 THEN
        -- For each element in the bag
        REPEAT i := 1 TO HIINDEX(y);
          -- Check to see it is an item in the input cntxt.
          IF item_in_context(y[i], cntxt) THEN
            RETURN (TRUE);
          END_IF;
        END_REPEAT;
      END_IF;
    END_IF;
    -- Return false when all possible branches have been checked
    -- with no success.
    RETURN (FALSE);
END_FUNCTION;
(*

Argument definitions:

item: the Representation_item checked for relationship in cntxt. This is input to the function.

cntxt: the Representation_context for which relationship to item is determined. This is input to the function.

4.4.2 using_items

The function using_items returns the set of instances of Representation_item that reference a Representation_item directly or indirectly.

EXPRESS specification:

*)
FUNCTION using_items (item : Representation_item; checked_items : SET[0:?] OF Representation_item) : SET[0:?] OF Representation_item;
LOCAL
      new_check_items    : SET OF Representation_item;
      result_items       : SET OF Representation_item;
      next_items         : SET OF Representation_item;
    END_LOCAL;
    result_items := [];
    new_check_items := checked_items + item;
    -- Find the set of representation_items or founded_items
    -- in which item is used directly.
    next_items := QUERY(z <* bag_to_set( USEDIN(item , '')) |
      ('FOUNDATION_REPRESENTATION_ARM.REPRESENTATION_ITEM' IN TYPEOF(z)));
    -- If the set of next_items is not empty;
    IF SIZEOF(next_items) > 0 THEN
      -- For each element in the set, find the using_items recursively
      REPEAT i := 1 TO HIINDEX(next_items);
        -- Check for loop in data model, i.e. one of the next_items
        -- occurred earlier in the set of check_items;
        IF NOT(next_items[i] IN new_check_items) THEN
          result_items := result_items + next_items[i] +
                          using_items(next_items[i],new_check_items);
        END_IF;
      END_REPEAT;
    END_IF;
    -- return the set of representation_items or founded_items
    -- in which the input item is used directly and indirectly.
    RETURN (result_items);
END_FUNCTION;
(*

Argument definitions:

item: the Representation_item for which the referencing instances of Representation_item are determined. This is input to the function.

checked_items: the set of instances of Representation_item that have been checked already in order to ensure termination of the recursive function. This is input to the function.

4.4.3 using_representations

The function using_representations returns the set of Representations in which a Representation_item is used.

A Representation_item is used in a Representation if it is:

NOTE    The second condition is the check allowing for a Representation_item to be used in a Representation by being part of a tree of related Representation_items. The tree is rooted in an entity used in a Representation by fulfilling the first condition.

A Representation_item is used in a Representation if it is referenced directly, or indirectly, by a Representation_item in the set of items of the Representation.

EXPRESS specification:

*)
FUNCTION using_representations (item : Representation_item) : SET[0:?] OF Representation;
LOCAL
      results            : SET OF Representation;
      result_bag         : BAG OF Representation;
      intermediate_items : SET OF Representation_item;
    END_LOCAL;
    -- Find the representations in which the item is used and add to the
    -- results set.
    results := [];
    result_bag := USEDIN(item,'FOUNDATION_REPRESENTATION_ARM.REPRESENTATION.ITEMS');
    IF SIZEOF(result_bag) > 0 THEN
      REPEAT i := 1 TO HIINDEX(result_bag);
        results := results + result_bag[i];
      END_REPEAT;
    END_IF;
    -- Find all representation_items or founded_items
    -- by which item is referenced directly or indirectly.
    intermediate_items := using_items(item,[]);
    -- If the set of intermediate items is not empty;
    IF SIZEOF(intermediate_items) > 0 THEN
      -- For each element in the set, add the
      -- representations of that element.
      REPEAT i := 1 TO HIINDEX(intermediate_items);
        result_bag := USEDIN(intermediate_items[i],
                      'FOUNDATION_REPRESENTATION_ARM.REPRESENTATION.ITEMS');
        IF SIZEOF(result_bag) > 0 THEN
          REPEAT j := 1 TO HIINDEX(result_bag);
            results := results + result_bag[j];
          END_REPEAT;
        END_IF;
      END_REPEAT;
    END_IF;
    -- Return the set of representation in which the input item is
    -- used directly and indirectly (through intervening
    -- representation_items or founded items).
    RETURN (results);
END_FUNCTION;
(*

Argument definitions:

item: the Representation_item for which using instances of Representation are determined. This is input to the function.



*)
END_SCHEMA;  -- Foundation_representation_arm
(*


© ISO 2021 — All rights reserved