Application module: Extended measure representation | ISO/TS 10303-1106:2014-02(E) © ISO |
This clause specifies the EXPRESS schema derived from the mapping table. It uses elements from the common resources or from other application modules and defines the EXPRESS constructs that are specific to this part of ISO 10303.
This clause constitutes the Module Interpreted Module (MIM) of the application module.
This clause also specifies the modifications that apply to the constructs imported from the common resources.
The following restrictions apply to the use, in this schema, of constructs defined in common resources or in application modules:
*)
SCHEMA Extended_measure_representation_mim;
USE FROM
Qualified_measure_mim;
--
ISO/TS 10303-1782
USE FROM
representation_schema
--
ISO 10303-43
(compound_item_definition,
compound_representation_item,
list_representation_item,
set_representation_item);
REFERENCE FROM
support_resource_schema
--
ISO 10303-41
(type_check_function);
(*
NOTE 1 The schemas referenced above are specified in the following part of ISO 10303:
Qualified_measure_mim ISO/TS 10303-1782 representation_schema ISO 10303-43 support_resource_schema ISO 10303-41
NOTE 2 See Annex D, Figures D.1and D.2 for a graphical representation of this schema.
This subclause specifies the MIM entity for this module. The MIM entity and definition is specified below.
EXPRESS specification:
*)
ENTITY value_range
SUBTYPE OF (compound_representation_item);
WHERE
WR1: ( 'REPRESENTATION_SCHEMA.'+ 'SET_REPRESENTATION_ITEM' IN TYPEOF ( item_element ) ) AND value_range_wr1 ( item_element
);
WR2: value_range_wr2 ( item_element );
WR3: value_range_wr3 ( item_element );
END_ENTITY;
(*
Formal propositions:
WR1: The value_range shall have a set_representation_item as its item_element. This set_representation_item shall contain exactly two items of the same type in its set. These items shall be either instances of measure_representation_item or of value_representation_item.
WR2: One of the representation_items in the set specified by item_element shall have a name of 'upper limit', and the other a name of 'lower limit'.
WR3: If the set specified by item_element consists of measure_representation_items, then these shall point to the same instance of named_unit or derived_unit as their respective unit_component.
This subclause specifies the MIM functions for this module. The MIM functions and definitions are specified below.
NOTE This function realizes the first local rule of value_range.
EXPRESS specification:
*)
FUNCTION value_range_wr1 (agg : compound_item_definition) : BOOLEAN;
BEGIN IF (SIZEOF(agg) = 2) AND ((SIZEOF(QUERY (i1 <* agg | ( 'QUALIFIED_MEASURE_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF (i1)))) = 2) OR (SIZEOF(QUERY (i2 <* agg | ( 'REPRESENTATION_SCHEMA.VALUE_REPRESENTATION_ITEM' IN TYPEOF (i2)))) = 2)) THEN RETURN(TRUE); ELSE RETURN(FALSE); END_IF; END;
END_FUNCTION;
(*
Argument definitions:
agg: the AGGREGATE of representation_items which are tested.
NOTE This function realizes the second local rule of value_range.
EXPRESS specification:
*)
FUNCTION value_range_wr2 (agg : compound_item_definition) : BOOLEAN;
BEGIN IF ((SIZEOF(QUERY (i <* agg | (i\representation_item.name = 'upper limit'))) = 1) AND (SIZEOF(QUERY (i <* agg | (i\representation_item.name = 'lower limit'))) = 1)) THEN RETURN(TRUE); ELSE RETURN(FALSE); END_IF; END;
END_FUNCTION;
(*
Argument definitions:
agg: the AGGREGATE of representation_items which are tested.
NOTE This function realizes the third local rule of value_range.
EXPRESS specification:
*)
FUNCTION value_range_wr3 (agg : compound_item_definition) : BOOLEAN;
BEGIN IF (SIZEOF(QUERY(i1 <* agg | ('QUALIFIED_MEASURE_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF (i1)) AND (SIZEOF (QUERY (i2 <* agg | ('QUALIFIED_MEASURE_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF (i2)) AND (i1 :<>: i2) AND (i1\measure_with_unit.unit_component :=: i2\measure_with_unit.unit_component))) = 1))) = 2) THEN RETURN (TRUE); ELSE RETURN (FALSE); END_IF; END;
END_FUNCTION;
(*
Argument definitions:
agg: the AGGREGATE of representation_items which are tested.
This subclause specifies the MIM rule for this module. The MIM rule and definition is specified below.
EXPRESS specification:
*)
RULE subtype_exclusiveness_representation_item FOR
(representation_item);
WHERE
WR1: SIZEOF(QUERY (cri <* representation_item |
NOT (type_check_function(cri,['QUALIFIED_MEASURE_SCHEMA.MEASURE_REPRESENTATION_ITEM',
'REPRESENTATION_SCHEMA.VALUE_REPRESENTATION_ITEM',
'REPRESENTATION_SCHEMA.COMPOUND_REPRESENTATION_ITEM'] , 3)))) = 0;
END_RULE;
(*
Argument definitions:
representation_item : the set of all instances of representation_item.
Formal propositions:
WR1: Each instance of measure_representation_item, value_representation_item or compound_representation_item shall not be simultaneously an instance of these other subtypes of representation_item.
*)
END_SCHEMA; -- Extended_measure_representation_mim
(*
© ISO 2014 — All rights reserved