Application module: Expression ISO/TS 10303-1342:2014-02(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 entity 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 Expression 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 Expression_arm schema and identifies the necessary external references.

The Expression module represents expression itself. It can represent a numeric, boolean and a string expression.

EXPRESS specification:

*)
SCHEMA Expression_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 Generic_expression_arm;    --  ISO/TS 10303-1341

USE FROM Numeric_expression_arm;    --  ISO/TS 10303-1526

REFERENCE FROM Numeric_expression_arm    --  ISO/TS 10303-1526
  (Is_int_expr);
(*

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

Generic_expression_arm ISO/TS 10303-1341
Numeric_expression_arm ISO/TS 10303-1526
Numeric_expression_arm ISO/TS 10303-1526

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

4.2 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.2.1 Concat_expression   EXPRESS-GMapping table

A Concat_expression is a type of String_expression and Multiple_arity_generic_expression . It carries the semantics of the concatenation ('+') operator defined in ISO 10303-11, on the STRING data type defined in ISO 10303-11.

NOTE    The Concat_expression operator accepts at least two String_expression as operands and evaluates to a string value resulting from the concatenation of all the elements of the operands list. These elements are concatenated in the list order.

EXPRESS specification:

*)
ENTITY Concat_expression
  SUBTYPE OF (String_expression, Multiple_arity_generic_expression);
  SELF\Multiple_arity_generic_expression.operands : LIST[2:?] OF String_expression;
END_ENTITY;
(*

Attribute definitions:

operands: the String_expression to be concatenated.

4.2.2 Format_function   EXPRESS-GMapping table

A Format_function is a type of String_expression and Binary_generic_expression. It carries the semantics of the FORMAT function defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Format_function
  SUBTYPE OF (String_expression, Binary_generic_expression);
DERIVE
  value_to_format : Generic_expression := SELF\Binary_generic_expression.operands[1];
  format_string : Generic_expression := SELF\Binary_generic_expression.operands[2];
WHERE
  WR1: (('EXPRESSION_ARM.NUMERIC_EXPRESSION') IN TYPEOF(value_to_format)) AND (('EXPRESSION_ARM.STRING_EXPRESSION') IN TYPEOF(format_string));
END_ENTITY;
(*

Attribute definitions:

value_to_format: the Numeric_expression to be formatted.

format_string: the formatting commands that defines the appearance of the result.

Formal propositions:

WR1: the value_to_format shall be a Numeric_expression and the format_string shall be a String_expression.

4.2.3 Index_expression   EXPRESS-GMapping table

An Index_expression is a type of String_expression and Binary_generic_expression. It carries the semantics of the string indexing operator ('[]') defined in ISO 10303-11.

NOTE    The Index_expression string operator takes two operands, the string value (represented by the operand attribute) being indexed by the index specification (represented by the index attribute). The resulting string value is the character at position the value of the index operator.

EXPRESS specification:

*)
ENTITY Index_expression
  SUBTYPE OF (String_expression, Binary_generic_expression);
DERIVE
  operand : Generic_expression := SELF\Binary_generic_expression.operands[1];
  index : Generic_expression := SELF\Binary_generic_expression.operands[2];
WHERE
  WR1: ('EXPRESSION_ARM.STRING_EXPRESSION' IN TYPEOF(operand)) AND ('NUMERIC_EXPRESSION_ARM.NUMERIC_EXPRESSION' IN TYPEOF(index));
  WR2: Is_int_expr (index);
END_ENTITY;
(*

Attribute definitions:

operand: the String_expression that represents the STRING.

index: the integer Numeric_expression that indicates the index value.

Formal propositions:

WR1: the first operand shall be a String_expression and the second operand shall be a Numeric_expression.

WR2: the position described by the index operand shall be an integer value.

4.2.4 Like_expression   EXPRESS-GMapping table

A Like_expression is a type of Comparison_expression. It carries the semantics of the LIKE string matching operator defined in ISO 10303-11. The first operand is the target string. The second operand is the pattern string. The special characters (often called "wild cards") in the pattern string are defined in ISO 10303-11

EXPRESS specification:

*)
ENTITY Like_expression
  SUBTYPE OF (Comparison_expression);
WHERE
  WR1: ('EXPRESSION_ARM.STRING_EXPRESSION' IN TYPEOF(SELF\Comparison_expression.operands[1])) AND ('EXPRESSION_ARM.STRING_EXPRESSION' IN TYPEOF(SELF\Comparison_expression.operands[2]));
END_ENTITY;
(*

Formal propositions:

WR1: the operand list shall contain two Generic_expressions instances that are String_expression.

4.2.5 Simple_string_expression   EXPRESS-GMapping table

A Simple_string_expression is a type of Expression and is an unary operator of whose range is EXPRESS STRING data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Simple_string_expression
  ABSTRACT SUPERTYPE OF (ONEOF (String_literal,
                                String_variable))
  SUBTYPE OF (String_expression, Simple_generic_expression);
END_ENTITY;
(*

4.2.6 Sql_mappable_defined_function   EXPRESS-GMapping table

A Sql_mappable_defined_function is a type of Defined_function. It is a function intended to be subtyped in the information models that use the ISO13584_expressions_schema to specify that some Generic_expression is mappable onto SQL, defined in ISO/IEC 9075:1992.

EXPRESS specification:

*)
ENTITY Sql_mappable_defined_function
  ABSTRACT SUPERTYPE
  SUBTYPE OF (Defined_function);
END_ENTITY;
(*

4.2.7 String_defined_function   EXPRESS-GMapping table

A String_defined_function is a type of Defined_function and String_expression. It is any application-defined operator of which the range is the STRING data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY String_defined_function
  ABSTRACT SUPERTYPE
  SUBTYPE OF (Defined_function, String_expression);
END_ENTITY;
(*

4.2.8 String_expression   EXPRESS-GMapping table

A String_expression is a type of Expression and whose range is the EXPRESS STRING data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY String_expression
  ABSTRACT SUPERTYPE OF (ONEOF (Simple_string_expression,
                                Index_expression,
                                Substring_expression,
                                Concat_expression,
                                Format_function,
                                String_defined_function))
  SUBTYPE OF (Expression);
END_ENTITY;
(*

4.2.9 String_literal   EXPRESS-GMapping table

A String_literal is a type of Simple_string_expression and Generic_literal. It is an EXPRESS STRING literal.

NOTE    The EXPRESS STRING data type has as its domain sequences of characters.

EXPRESS specification:

*)
ENTITY String_literal
  SUBTYPE OF (Simple_string_expression, Generic_literal);
  the_value : STRING;
END_ENTITY;
(*

Attribute definitions:

the_value: a STRING literal value.

4.2.10 String_variable   EXPRESS-GMapping table

A String_variable is a type of Simple_string_expression and Variable. It is a variable that stands for a STRING value.

EXPRESS specification:

*)
ENTITY String_variable
  SUBTYPE OF (Simple_string_expression, Variable);
END_ENTITY;
(*

4.2.11 Substring_expression   EXPRESS-GMapping table

A Substring_expression is a type of String_expression and Multiple_arity_generic_expression. It carries the semantics of the EXPRESS substring indexing operator ('[:]') defined in ISO 10303-11.

NOTE    The Substring_expression string operator takes three operands, the string value (represented by the operand attribute) being indexed by the index specification (represented by the index1 and index2 attributes). The Substring_expression evaluates to a string value of length (index2 - index1 + 1). The resulting string value is equivalent to the sequence of characters at position index1through index2.

EXPRESS specification:

*)
ENTITY Substring_expression
  SUBTYPE OF (String_expression, Multiple_arity_generic_expression);
DERIVE
  operand : Generic_expression := SELF\Multiple_arity_generic_expression.operands[1];
  index1 : Generic_expression := SELF\Multiple_arity_generic_expression.operands[2];
  index2 : Generic_expression := SELF\Multiple_arity_generic_expression.operands[3];
WHERE
  WR1: ('EXPRESSION_ARM.STRING_EXPRESSION' IN TYPEOF(operand)) AND ('EXPRESSION_ARM.NUMERIC_EXPRESSION' IN TYPEOF(index1)) AND ('EXPRESSION_ARM.NUMERIC_EXPRESSION' IN TYPEOF(index2));
  WR2: SIZEOF(SELF\Multiple_arity_generic_expression.operands)=3;
  WR3: Is_int_expr (index1);
  WR4: Is_int_expr (index2);
END_ENTITY;
(*

Attribute definitions:

operand: the String_expression from which a substring is extracted.

index1: the Numeric_expression that indicates the low bound of the substring in operand.

index2: the Numeric_expression that indicates the high bound of the substring in operand.

Formal propositions:

WR1: operand shall be a String_expression, index1 and index2 shall be a Numeric_expression.

WR2: the Substring_expression operands LIST shall contain three elements.

WR3: the index1 shall evaluate to an INTEGER value.

WR4: the index2 shall evaluate to an INTEGER value.



*)
END_SCHEMA;  -- Expression_arm
(*


© ISO 2014 — All rights reserved