AP scope  |  AP module  |  AP contents  |  AP index
Application module: Expression ISO/TS 10303-1342:2005(E)
© ISO

Cover page
Table of contents
Copyright
Foreword
Introduction
1 Scope
2 Normative references
3 Terms, definitions and abbreviations

4 Information requirements
   4.1 Required AM ARM
   4.2 ARM entity definitions
   4.3 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
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.

The following EXPRESS specification 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 ARM

The following EXPRESS interface statement specifies the elements imported from the ARM of another application module.

EXPRESS specification:

*)
USE FROM Generic_expression_arm;    --  ISO/TS 10303-1341
(*

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

Generic_expression_arm ISO/TS 10303-1341

NOTE 2   See Annex C, Figures C.1, C.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9, C.10, C.11and C.12 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 And_expression   EXPRESS-GMapping table

An And_expression is a type of Multiple_arity_boolean_expression. It carries the semantics of the 'AND' operator defined in ISO 10303-11 and uses its associativity property to handle multiple arity.

NOTE    The AND operator requires at least two Boolean expressions and evaluates to a Boolean value that is the conjunction of the two operands.

EXPRESS specification:

*)
ENTITY And_expression
  SUBTYPE OF (Multiple_arity_boolean_expression);
END_ENTITY;
(*

4.2.2 Binary_boolean_expression   EXPRESS-GMapping table

A Binary_boolean_expression is a type of Boolean_expression and Binary_generic_expression. It shall be one of a Xor_expression or an Equals_expression. It is a binary operator of which the range is the BOOLEAN data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Binary_boolean_expression
  ABSTRACT SUPERTYPE OF (ONEOF (Xor_expression,
                                Equals_expression))
  SUBTYPE OF (Boolean_expression, Binary_generic_expression);
END_ENTITY;
(*

4.2.3 Binary_function_call   EXPRESS-GMapping table

A Binary_function_call is a type of Binary_numeric_expression. It is a binary operator on NUMBER data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Binary_function_call
  ABSTRACT SUPERTYPE OF (Atan_function)
  SUBTYPE OF (Binary_numeric_expression);
END_ENTITY;
(*

4.2.4 Binary_numeric_expression   EXPRESS-GMapping table

A Binary_numeric_expression is a type of Numeric_expression and Binary_generic_expression. It shall be a subtype of either a Minus_expression, a Div_expression, a Mod_expression, a Slash_expression, a Power_expression and a Binary_function_call. It is a binary operator of which the range is the BOOLEAN data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Binary_numeric_expression
  ABSTRACT SUPERTYPE OF (ONEOF (Minus_expression,
                                Div_expression,
                                Mod_expression,
                                Slash_expression,
                                Power_expression,
                                Binary_function_call))
  SUBTYPE OF (Numeric_expression, Binary_generic_expression);
  SELF\Binary_generic_expression.operands : LIST[2:2] OF Numeric_expression;
END_ENTITY;
(*

Attribute definitions:

operands: a list containing the two parameters of the binary operator.

4.2.5 Boolean_defined_function   EXPRESS-GMapping table

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

EXPRESS specification:

*)
ENTITY Boolean_defined_function
  ABSTRACT SUPERTYPE
  SUBTYPE OF (Defined_function, Boolean_expression);
END_ENTITY;
(*

4.2.6 Boolean_expression   EXPRESS-GMapping table

A Boolean_expression is a type of Expression. It shall be one of a Simple_boolean_expression, an Unary_boolean_expression, a Binary_boolean_expression, a Multiple_arity_boolean_expression, a Comparison_expression, an Interval_expression or a Boolean_defined_function. A Boolean_expression is an Expression for which the range is the BOOLEAN data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Boolean_expression
  ABSTRACT SUPERTYPE OF (ONEOF (Simple_boolean_expression,
                                Unary_boolean_expression,
                                Binary_boolean_expression,
                                Multiple_arity_boolean_expression,
                                Comparison_expression,
                                Interval_expression,
                                Boolean_defined_function))
  SUBTYPE OF (Expression);
END_ENTITY;
(*

4.2.7 Boolean_literal   EXPRESS-GMapping table

A Boolean_literal is a type of Simple_boolean_expression and Generic_literal. It is an EXPRESS BOOLEAN literal.

NOTE    The EXPRESS Boolean data type has as its domain the set containing the two literals TRUE and FALSE.

EXPRESS specification:

*)
ENTITY Boolean_literal
  SUBTYPE OF (Simple_boolean_expression, Generic_literal);
  the_value : BOOLEAN;
END_ENTITY;
(*

Attribute definitions:

the_value: a BOOLEAN literal value.

NOTE    The EXPRESS Boolean data type has as its domain the set containing the two literals TRUE and FALSE.

4.2.8 Boolean_variable   EXPRESS-GMapping table

A Boolean_variable is a type of Simple_boolean_expression and Variable. It is a variable that stands for a Boolean value.

EXPRESS specification:

*)
ENTITY Boolean_variable
  SUBTYPE OF (Simple_boolean_expression, Variable);
END_ENTITY;
(*

4.2.9 Comparison_equal   EXPRESS-GMapping table

A Comparison_equal is a type of Comparison_expression carries the semantics of the value equal ('=') operator defined in ISO 10303-11 restricted to the NUMBER, BOOLEAN and STRING EXPRESS data types. Both operands shall have the same data type.

NOTE    The Comparison_equal evaluates to TRUE if the two operands evaluate to the same value.

EXPRESS specification:

*)
ENTITY Comparison_equal
  SUBTYPE OF (Comparison_expression);
END_ENTITY;
(*

4.2.10 Comparison_expression   EXPRESS-GMapping table

A Comparison_expression is a type of Boolean_expression and a Binary_generic_expression. It shall be one of a Comparison_equal, a Comparison_greater, a Comparison_greater_equal, a Comparison_less, a Comparison_less_equal, a Comparison_not_equal or a Like_expression. The Comparison_expression expressions carry the semantics of the different value comparison operators defined in ISO 10303-11 restricted to the NUMBER, BOOLEAN and STRING EXPRESS data types. Both operands shall have the same data type.

EXPRESS specification:

*)
ENTITY Comparison_expression
  ABSTRACT SUPERTYPE OF (ONEOF (Comparison_equal,
                                Comparison_greater,
                                Comparison_greater_equal,
                                Comparison_less,
                                Comparison_less_equal,
                                Comparison_not_equal,
                                Like_expression))
  SUBTYPE OF (Boolean_expression, Binary_generic_expression);
  SELF\Binary_generic_expression.operands : LIST[2:2] OF Expression;
WHERE
  WR1: (('NUMERIC_EXPRESSION_ARM.NUMERIC_EXPRESSION' IN TYPEOF(SELF\Binary_generic_expression.operands[1])) AND('NUMERIC_EXPRESSION_ARM.NUMERIC_EXPRESSION' IN TYPEOF(SELF\Binary_generic_expression.operands[2]))) OR(('BOOLEAN_EXPRESSION_ARM.BOOLEAN_EXPRESSION' IN TYPEOF(SELF\Binary_generic_expression.operands[1])) AND('BOOLEAN_EXPRESSION_ARM.BOOLEAN_EXPRESSION' IN TYPEOF(SELF\Binary_generic_expression.operands[2]))) OR(('STRING_EXPRESSION_ARM.STRING_EXPRESSION' IN TYPEOF(SELF\Binary_generic_expression.operands[1])) AND('STRING_EXPRESSION_ARM.STRING_EXPRESSION' IN TYPEOF(SELF\Binary_generic_expression.operands[2])));
END_ENTITY;
(*

Attribute definitions:

operands: a list of Generic_expressions that contains the expressions to be compared.

Formal propositions:

WR1: the operands of the Comparison_expression shall be of compatible in type.

4.2.11 Comparison_greater   EXPRESS-GMapping table

A Comparison_greater is a type of Comparison_expression. It carries the semantics of the greater than ('>') operator defined in of ISO 10303-11 restricted to the NUMBER, BOOLEAN and STRING EXPRESS data types. Both operands shall have the same data type.The Comparison_greater evaluates to TRUE if the first operand evaluates to a value greater than the second operand. The relevant orders are:

EXPRESS specification:

*)
ENTITY Comparison_greater
  SUBTYPE OF (Comparison_expression);
END_ENTITY;
(*

4.2.12 Comparison_greater_equal   EXPRESS-GMapping table

A Comparison_greater_equal is a type of Comparison_expression. It carries the semantics of the greater than or equal ('>=') operator defined in of ISO 10303-11 restricted to the NUMBER, BOOLEAN and STRING EXPRESS data types. Both operands shall have the same data type.The Comparison_greater_equal evaluates to TRUE if the first operand evaluates to a value greater than or equal to the second operand. The relevant orders are:

EXPRESS specification:

*)
ENTITY Comparison_greater_equal
  SUBTYPE OF (Comparison_expression);
END_ENTITY;
(*

4.2.13 Comparison_less   EXPRESS-GMapping table

A Comparison_less is a type of Comparison_expression. It carries the semantics of the less than ('<') operator defined in ISO 10303-11 restricted to the NUMBER, BOOLEAN and STRING EXPRESS data types. Both operands shall have the same data type.The Comparison_less evaluates to TRUE if the first operand evaluates to a value less than the second operand. The relevant orders are:

EXPRESS specification:

*)
ENTITY Comparison_less
  SUBTYPE OF (Comparison_expression);
END_ENTITY;
(*

4.2.14 Comparison_less_equal   EXPRESS-GMapping table

A Comparison_less_equal is a type of Comparison_expression. It carries the semantics of the EXPRESS less than or equal ('<=') operator defined in ISO 10303-11 restricted to the NUMBER, BOOLEAN and STRING EXPRESS data types. Both operands shall have the same data type.The Comparison_less_equal evaluates to TRUE if the first operand evaluates to a value less than or equal to the second operand. The relevant orders are:

EXPRESS specification:

*)
ENTITY Comparison_less_equal
  SUBTYPE OF (Comparison_expression);
END_ENTITY;
(*

4.2.15 Comparison_not_equal   EXPRESS-GMapping table

A Comparison_not_equal is a type of Comparison_expression. It carries the semantics of the value not equal ('<>') operator defined in ISO 10303-11 restricted to the NUMBER, BOOLEAN and STRING EXPRESS data types. Both operands shall have the same data type.The Comparison_not_equal evaluates to TRUE if the first operand evaluates to a value different from the second operand. The relevant orders are:

EXPRESS specification:

*)
ENTITY Comparison_not_equal
  SUBTYPE OF (Comparison_expression);
END_ENTITY;
(*

4.2.16 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. The Concat_expression operator accepts at least two as operands and evaluates to a string value resulting from the concatenation of all the elements of the 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.17 Defined_function   EXPRESS-GMapping table

A Defined_function is a type of one of Numeric_defined_function or String_defined_function or Boolean_defined_function and or Sql_mappable_defined_function. It is a (strongly typed) function intended to be subtyped in the information models that use the
[warning:]Error ER-8: The express_ref linkend
     ISO13584_expressions_schema:ir_express:ISO13584_expressions_schema
     is incorrectly specified.
     The schema does not exist.
    Note linkend is case sensitive.

ISO13584_expressions_schema.

EXPRESS specification:

*)
ENTITY Defined_function
  ABSTRACT SUPERTYPE ;
END_ENTITY;
(*

4.2.18 Div_expression   EXPRESS-GMapping table

A Div_expression is a type of Binary_numeric_expression. It carries the semantics of the EXPRESS 'DIV' operator, defined in ISO 10303-11, on NUMBER data type.The Div_expression is an expression which evaluates to the integer division of its operands. In the ISO13584_expressions_schema, all these operands shall evaluate to a number in the number data type domain. The result is an integer number. If either operand is of data type REAL, it is truncated to an INTEGER before the operation, i.e. any fractional part is lost.

EXPRESS specification:

*)
ENTITY Div_expression
  SUBTYPE OF (Binary_numeric_expression);
END_ENTITY;
(*

4.2.19 Equals_expression   EXPRESS-GMapping table

An Equals_expression is a type of Binary_boolean_expression. It carries the semantics of the ':=:' instance equal operator defined in ISO 10303-11, the domain of which is entities of data type Generic_expression. The entity instance equality operator accepts two compatible instance values that are and evaluates to a Boolean value. In the context of the ISO13584_expressions_schema the two s instance values are compatible either if their data types are the same, or if one data type is a subtype of the other one.

EXPRESS specification:

*)
ENTITY Equals_expression
  SUBTYPE OF (Binary_boolean_expression);
END_ENTITY;
(*

4.2.20 Expression   EXPRESS-GMapping table

An Expression is a type of Generic_expression. It shall be a supertype of either a Numeric_expression, or a Boolean_expression or a String_expression. It is restricted to numeric, boolean, string or any other suitable domain of values.

EXPRESS specification:

*)
ENTITY Expression
  ABSTRACT SUPERTYPE OF (ONEOF (Numeric_expression,
                                Boolean_expression,
                                String_expression))
  SUBTYPE OF (Generic_expression);
END_ENTITY;
(*

4.2.21 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.22 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.The Index_expression string operator takes two operands, the string value (represented by the attribute) being indexed by the index specification (represented by the attribute). The resulting string value is the character at position the value of the 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 ('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.23 Int_literal   EXPRESS-GMapping table

An Int_literal is a type of Literal_number. It is an EXPRESS INTEGER literal.An EXPRESS INTEGER literal represents an integer VALUE that is composed of one or more digits.

EXPRESS specification:

*)
ENTITY Int_literal
  SUBTYPE OF (Literal_number);
  SELF\Literal_number.the_value : INTEGER;
END_ENTITY;
(*

Attribute definitions:

the_value: an INTEGER literal value.

4.2.24 Int_numeric_variable   EXPRESS-GMapping table

An Int_numeric_variable is a type of Numeric_variable. It is a variable that stands for an integer value.

EXPRESS specification:

*)
ENTITY Int_numeric_variable
  SUBTYPE OF (Numeric_variable);
END_ENTITY;
(*

4.2.25 Interval_expression   EXPRESS-GMapping table

An Interval_expression is a type of Boolean_expression and Multiple_arity_generic_expression. It carries the semantics of the interval expression defined in ISO 10303-11 restricted to the NUMBER, BOOLEAN and STRING EXPRESS data types. Both operands shall have the same data type.An Interval_expression expression tests whether or not a value falls within a given interval. It evaluates to TRUE if < = < = . The relevant orders are:

EXPRESS specification:

*)
ENTITY Interval_expression
  SUBTYPE OF (Boolean_expression, Multiple_arity_generic_expression);
DERIVE
  interval_low : Generic_expression := SELF\Multiple_arity_generic_expression.operands[1];
  interval_item : Generic_expression := SELF\Multiple_arity_generic_expression.operands[2];
  interval_high : Generic_expression := SELF\Multiple_arity_generic_expression.operands[3];
WHERE
  WR1: ('EXPRESSION_ARM.EXPRESSION' IN TYPEOF(interval_low)) AND ('EXPRESSION_ARM.EXPRESSION' IN TYPEOF(interval_item)) AND ('EXPRESSION_ARM.EXPRESSION' IN TYPEOF(interval_high));
  WR2: (('EXPRESSION_ARM.STRING_EXPRESSION' IN TYPEOF (SELF.Interval_low)) AND ('EXPRESSION_ARM.STRING_EXPRESSION' IN TYPEOF (SELF.Interval_high)) AND ('EXPRESSION_ARM.STRING_EXPRESSION' IN TYPEOF (SELF.Interval_item))) OR(('EXPRESSION_ARM.STRING_EXPRESSION' IN TYPEOF(SELF.Interval_low)) AND ('EXPRESSION_ARM.NUMERIC_EXPRESSION' IN TYPEOF(SELF.Interval_item)) AND ('EXPRESSION_ARM.NUMERIC_EXPRESSION' IN TYPEOF(SELF.Interval_high)));
END_ENTITY;
(*

Attribute definitions:

interval_low: the interval_low operand of the interval expression (see 12.2.4 of ISO 10303-11).

interval_item: the interval_item operand of the interval expression (see 12.2.4 of ISO 10303-11).

interval_high: the interval_high operand of the interval expression (see 12.2.4 of ISO 10303-11).

Formal propositions:

WR1: the data type of the operands shall be Expression.

WR2: the types of the Expression to be compared in the Interval_expression shall evaluates to comparable Expression.

4.2.26 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.27 Literal_number   EXPRESS-GMapping table

A Literal_number is a type of Simple_numeric_expression and Generic_literal. It shall be a subtype of either an Int_literal and Real_literal. It is an EXPRESS NUMBER literal . A Literal_number may be either an integer literal or a real literal.The EXPRESS NUMBER data type has the numeric values as domain

EXPRESS specification:

*)
ENTITY Literal_number
  ABSTRACT SUPERTYPE OF (ONEOF (Int_literal,
                                Real_literal))
  SUBTYPE OF (Simple_numeric_expression, Generic_literal);
  the_value : NUMBER;
END_ENTITY;
(*

Attribute definitions:

the_value: a NUMBER literal value.

4.2.28 Minus_expression   EXPRESS-GMapping table

A Minus_expression is a type of Numeric_expression. It carries the semantics of the '-' operator, defined in ISO 10303-11, on NUMBER data type.The Minus_expression is an expression which evaluates to the difference of its operands. In the ISO13584_expressions_schema, all these operands shall evaluate to a number in the number data type domain.

EXPRESS specification:

*)
ENTITY Minus_expression
  SUBTYPE OF (Binary_numeric_expression);
END_ENTITY;
(*

4.2.29 Mod_expression   EXPRESS-GMapping table

A Mod_expression is a type of Binary_numeric_expression. It carries the semantics of the EXPRESS 'MOD' operator, defined in ISO 10303-11, on NUMBER data type.The Mod_expression is an expression which evaluates to the first argument value modulo operation of the second argument value. Its operands shall evaluate to a number in the number data type domain. The result is an integer number. If either operand is of data type REAL, it is truncated to an INTEGER before the operation, i.e. any fractional part is lost.

EXPRESS specification:

*)
ENTITY Mod_expression
  SUBTYPE OF (Binary_numeric_expression);
END_ENTITY;
(*

4.2.30 Mult_expression   EXPRESS-GMapping table

A Mult_expression is a type of Multiple_arity_numeric_expression. It carries the semantics of the '*' operator, defined in ISO 10303-11, on NUMBER data type.The Mult_expression is an expression which evaluates to the difference of its operands. In the ISO13584_expressions_schema, all these operands shall evaluate to a number in the number data type domain.

EXPRESS specification:

*)
ENTITY Mult_expression
  SUBTYPE OF (Multiple_arity_numeric_expression);
END_ENTITY;
(*

4.2.31 Multiple_arity_boolean_expression   EXPRESS-GMapping table

A Multiple_arity_boolean_expression is a type of Boolean_expression and Multiple_arity_generic_expression. It shall be one of And_expression or an Or_expression. It is a multiple-arity operator for which the range is the same as the EXPRESS BOOLEAN data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Multiple_arity_boolean_expression
  ABSTRACT SUPERTYPE OF (ONEOF (And_expression,
                                Or_expression))
  SUBTYPE OF (Boolean_expression, Multiple_arity_generic_expression);
  SELF\Multiple_arity_generic_expression.operands : LIST[2:?] OF Boolean_expression;
END_ENTITY;
(*

Attribute definitions:

operands: the occurrences of Boolean_expression that represents the parameters of the m-arity operator.

4.2.32 Multiple_arity_function_call   EXPRESS-GMapping table

A Multiple_arity_function_call is a type of Multiple_arity_numeric_expression. It shall be a subtype of either a Maximum_function and Minimum_function. It is a multiple-arity operator on NUMBER data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Multiple_arity_function_call
  ABSTRACT SUPERTYPE
  SUBTYPE OF (Multiple_arity_numeric_expression);
END_ENTITY;
(*

4.2.33 Multiple_arity_numeric_expression   EXPRESS-GMapping table

A Multiple_arity_numeric_expression is a type of Numeric_expression and Multiple_arity_generic_expression. It shall be a subtype of either a Plus_expression, Mult_expression and Multiple_arity_function_call. A Multiple_arity_numeric_expression is a multiple arity operator whose range is the NUMBER data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Multiple_arity_numeric_expression
  ABSTRACT SUPERTYPE OF (ONEOF (Plus_expression,
                                Mult_expression,
                                Multiple_arity_function_call))
  SUBTYPE OF (Numeric_expression, Multiple_arity_generic_expression);
  SELF\Multiple_arity_generic_expression.operands : LIST[2:?] OF Numeric_expression;
END_ENTITY;
(*

Attribute definitions:

operands: a list containing the parameters of the multiple arity operator. The length of this list is equal to the arity of the operator.

4.2.34 Not_expression   EXPRESS-GMapping table

A Not_expression is a type of Unary_boolean_expression. It carries the semantics of the 'NOT' on Boolean data type operator defined in ISO 10303-11.The NOT operator requires one Boolean operand and evaluates to a Boolean value.

EXPRESS specification:

*)
ENTITY Not_expression
  SUBTYPE OF (Unary_boolean_expression);
  SELF\Unary_generic_expression.operand : Boolean_expression;
END_ENTITY;
(*

Attribute definitions:

operand: the Boolean_expression that represents the operand of the 'NOT' operator.

4.2.35 Numeric_expression   EXPRESS-GMapping table

A Numeric_expression is a type of Expression. It shall be a subtype of either a Simple_numeric_expression, Unary_numeric_expression, Binary_numeric_expression, Multiple_arity_numeric_expression, Length_function and Value_function. A Numeric_expression is an expression of which the range is the NUMBER data type defined in 8.1.1 of ISO 10303-11.

EXPRESS specification:

*)
ENTITY Numeric_expression
  ABSTRACT SUPERTYPE
  SUBTYPE OF (Expression);
DERIVE
  is_int : BOOLEAN := Is_int_expr (SELF);
  sql_mappable : BOOLEAN := Is_sql_mappable (SELF);
END_ENTITY;
(*

Attribute definitions:

is_int: a Boolean attribute that indicates if an expression evaluates to integer or not.

sql_mappable: a Boolean attribute that indicates if an expression is mappable to the SQL, defined in ISO/IEC 9075:1992, query language.

4.2.36 Numeric_variable   EXPRESS-GMapping table

A Numeric_variable is a type of Simple_numeric_expression and Variable. It shall be a subtype of either an Int_numeric_variable, or a Real_numeric_variable or a String_expression. It is a variable that stands for a number value.

EXPRESS specification:

*)
ENTITY Numeric_variable
  SUPERTYPE OF (ONEOF (Int_numeric_variable,
                       Real_numeric_variable))
  SUBTYPE OF (Simple_numeric_expression, Variable);
WHERE
  WR1: ('EXPRESSION_ARM.INT_NUMERIC_VARIABLE' IN TYPEOF(SELF)) OR('EXPRESSION_ARM.REAL_NUMERIC_VARIABLE' IN TYPEOF(SELF));
END_ENTITY;
(*

Formal propositions:

WR1: A Numeric_variable can only be a real variable or an integer variable.

4.2.37 Or_expression   EXPRESS-GMapping table

An Or_expression is a type of Multiple_arity_boolean_expression entity carries the semantics of the 'OR' operator defined in ISO 10303-11 and uses its associativity property to handle multiple arity.

NOTE    The OR operator requires at least two Boolean expressions and evaluates to a Boolean value that is the inclusive disjunction of the two operands.

EXPRESS specification:

*)
ENTITY Or_expression
  SUBTYPE OF (Multiple_arity_boolean_expression);
END_ENTITY;
(*

4.2.38 Plus_expression   EXPRESS-GMapping table

A Plus_expression is a type of Multiple_arity_numeric_expression. It carries the semantics of the '+' operator, defined in ISO 10303-11, on NUMBER data type.The Plus_expression is an expression which evaluates to the sum of all its operands. In the ISO13584_expressions_schema, all these operands shall evaluate to a number in the number data type domain.

EXPRESS specification:

*)
ENTITY Plus_expression
  SUBTYPE OF (Multiple_arity_numeric_expression);
END_ENTITY;
(*

4.2.39 Power_expression   EXPRESS-GMapping table

A Power_expression is a type of Binary_numeric_expression. It carries the semantics of the EXPRESS '**' operator, defined in ISO 10303-11, on NUMBER data typeThe Power_expression is an expression which evaluates to the first argument value modulo operation of the second argument value. Its operands shall evaluate to a number in the number data type domain. The result is an integer number. If either operand is of data type REAL, it is truncated to an INTEGER before the operation, i.e. any fractional part is lost.

EXPRESS specification:

*)
ENTITY Power_expression
  SUBTYPE OF (Binary_numeric_expression);
END_ENTITY;
(*

4.2.40 Real_literal   EXPRESS-GMapping table

A Real_literal is a type of Literal_number. It is an EXPRESS REAL literal.

NOTE    An EXPRESS REAL literal represents a real VALUE that is composed of a mantissa and an optional exponent; the mantissa shall include a decimal point.

EXPRESS specification:

*)
ENTITY Real_literal
  SUBTYPE OF (Literal_number);
  SELF\Literal_number.the_value : REAL;
END_ENTITY;
(*

Attribute definitions:

the_value: a REAL literal value.

4.2.41 Real_numeric_variable   EXPRESS-GMapping table

A Real_numeric_variable is a type of Numeric_variable. It is a variable that stands for a real value.

EXPRESS specification:

*)
ENTITY Real_numeric_variable
  SUBTYPE OF (Numeric_variable);
END_ENTITY;
(*

4.2.42 Simple_boolean_expression   EXPRESS-GMapping table

A Simple_boolean_expression is a type of Boolean_expression and Simple_generic_expression. It shall be one of a Boolean_literal, or a Boolean_variable and it is an unary operator for which the range is BOOLEAN, such a data type being defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Simple_boolean_expression
  ABSTRACT SUPERTYPE OF (ONEOF (Boolean_literal,
                                Boolean_variable))
  SUBTYPE OF (Boolean_expression, Simple_generic_expression);
END_ENTITY;
(*

4.2.43 Simple_numeric_expression   EXPRESS-GMapping table

A Simple_numeric_expression is a type of Numeric_expression and Simple_generic_expression. It shall be a subtype of either a Literal_number and Numeric_variable. It is either a numeric literal or a numeric variable.

EXPRESS specification:

*)
ENTITY Simple_numeric_expression
  ABSTRACT SUPERTYPE OF (ONEOF (Literal_number,
                                Numeric_variable))
  SUBTYPE OF (Numeric_expression, Simple_generic_expression);
END_ENTITY;
(*

4.2.44 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.45 Slash_expression   EXPRESS-GMapping table

A Slash_expression is a type of Binary_numeric_expression. It carries the semantics of the EXPRESS '/' operator, defined in ISO 10303-11, on NUMBER data type.The Slash_expression is an expression which evaluates to the first argument value modulo operation of the second argument value. Its operands shall evaluate to a number in the number data type domain. The result is an integer number. If either operand is of data type REAL, it is truncated to an INTEGER before the operation, i.e. any fractional part is lost.

EXPRESS specification:

*)
ENTITY Slash_expression
  SUBTYPE OF (Binary_numeric_expression);
END_ENTITY;
(*

4.2.46 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
[warning:]Error ER-8: The express_ref linkend
     ISO13584_expressions_schema:ir_express:ISO13584_expressions_schema
     is incorrectly specified.
     The schema does not exist.
    Note linkend is case sensitive.

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.47 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.48 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.49 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.50 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.51 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.The Substring_expression string operator takes three operands, the string value (represented by the attribute) being indexed by the index specification (represented by the and attributes). The Substring_expression evaluates to a string value of length ( - + 1). The resulting string value is equivalent to the sequence of characters at position through .

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.

4.2.52 Unary_boolean_expression   EXPRESS-GMapping table

A Unary_boolean_expression is a type of Boolean_expression and Unary_generic_expression. It shall be one of a Not_expression, or an Odd_function. It is an unary operator for which the range is the BOOLEAN data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Unary_boolean_expression
  ABSTRACT SUPERTYPE
  SUBTYPE OF (Boolean_expression, Unary_generic_expression);
END_ENTITY;
(*

4.2.53 Unary_numeric_expression   EXPRESS-GMapping table

A Unary_numeric_expression is a type of Numeric_expression and Unary_generic_expression. It shall be a subtype of Unary_function_call. It is an unary operator whose range is the NUMBER data type defined in ISO 10303-11.

EXPRESS specification:

*)
ENTITY Unary_numeric_expression
  ABSTRACT SUPERTYPE OF (Unary_function_call)
  SUBTYPE OF (Numeric_expression, Unary_generic_expression);
  SELF\Unary_generic_expression.operand : Numeric_expression;
END_ENTITY;
(*

Attribute definitions:

operand: a Numeric_expression that represents the parameter of the unary operator.

4.2.54 Xor_expression   EXPRESS-GMapping table

A Xor_expression is a type of Binary_boolean_expression. It carries the semantics of the 'XOR' operator defined in ISO 10303-11.

NOTE    The XOR operator requires two Boolean operands and evaluates to a Boolean value that is the exclusive disjunction of the two operands.

EXPRESS specification:

*)
ENTITY Xor_expression
  SUBTYPE OF (Binary_boolean_expression);
  SELF\Binary_generic_expression.operands : LIST[2:2] OF Boolean_expression;
END_ENTITY;
(*

Attribute definitions:

operands: the two Binary_boolean_expression operands of the XOR operator that shall be Binary_boolean_expression.

4.3 ARM function definitions

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

4.3.1 Is_sql_mappable

The Is_sql_mappable function checks if the acyclic graph that represents an expression only contains elements that are mappable to SQL, defined in ISO/IEC 9075:1992.

EXPRESS specification:

*)
FUNCTION Is_sql_mappable (arg : expression) :BOOLEAN;
LOCAL
i: INTEGER;
END_LOCAL;
IF 'EXPRESSION_ARM.SIMPLE_NUMERIC_EXPRESSION'
IN TYPEOF (arg)
THEN
RETURN (TRUE);
END_IF;
IF 'EXPRESSION_ARM.SQL_MAPPABLE_DEFINED_FUNCTION'
IN TYPEOF (arg)
THEN
RETURN (TRUE);
END_IF;
IF 'EXPRESSION_ARM.MINUS_FUNCTION' IN TYPEOF(arg)
THEN
RETURN (Is_sql_mappable(arg\Unary_numeric_expression.operand));
END_IF;
IF ('EXPRESSION_ARM.ABS_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.SIN_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.COS_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.TAN_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.ASIN_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.ACOS_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.ATAN_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.EXP_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.LOG_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.LOG2_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.LOG10_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.SQUARE_ROOT_FUNCTION'
IN TYPEOF(arg))
OR ('EXPRESSION_ARM.VALUE_FUNCTION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.LENGTH_FUNCTION'
IN TYPEOF(arg))
THEN
RETURN (FALSE);
END_IF;
IF ('EXPRESSION_ARM.PLUS_EXPRESSION' IN TYPEOF(arg))
OR('EXPRESSION_ARM.MULT_EXPRESSION' IN TYPEOF(arg))
OR('EXPRESSION_ARM.MAXIMUM_FUNCTION'
IN TYPEOF(arg))
OR('EXPRESSION_ARM.MAXIMUM_FUNCTION'
IN TYPEOF(arg))
THEN
REPEAT i :=1 TO SIZEOF (
arg\Multiple_arity_numeric_expression.operands);
IF NOT Is_sql_mappable(
arg\Multiple_arity_numeric_expression.operands[i])
THEN
RETURN (FALSE);
END_IF;
END_REPEAT;
RETURN (TRUE);
END_IF;
IF ('EXPRESSION_ARM.MINUS_EXPRESSION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.SLASH_EXPRESSION' IN
TYPEOF(arg))
THEN
RETURN (Is_sql_mappable(
arg\Binary_numeric_expression.operands[1])
AND Is_sql_mappable(arg\Binary_numeric_expression.operands[2]));
END_IF;
IF ('EXPRESSION_ARM.DIV_EXPRESSION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.MOD_EXPRESSION' IN TYPEOF(arg))
OR('EXPRESSION_ARM.POWER_EXPRESSION'
IN TYPEOF(arg))
THEN
RETURN (FALSE);
END_IF;
IF 'EXPRESSION_ARM.SIMPLE_BOOLEAN_EXPRESSION'
IN TYPEOF (arg)
THEN
RETURN (TRUE);
END_IF;
IF 'EXPRESSION_ARM.NOT_EXPRESSION' IN TYPEOF (arg)
THEN
RETURN (Is_sql_mappable (arg\UNARY_GENERIC_EXPRESSION.OPERAND));
END_IF;
IF ('EXPRESSION_ARM.ODD_FUNCTION'IN TYPEOF (arg))
OR ('EXPRESSION_ARM.XOR_EXPRESSION'
IN TYPEOF (arg))
THEN
RETURN (FALSE);
END_IF;
IF ('EXPRESSION_ARM.AND_EXPRESSION' IN TYPEOF (arg))
OR ('EXPRESSION_ARM.OR_EXPRESSION' IN TYPEOF (arg))
THEN
REPEAT i:=1 TO SIZEOF (
arg\MULTIPLE_ARITY_BOOLEAN_EXPRESSION.OPERANDS);
IF NOT Is_sql_mappable (
arg\MULTIPLE_ARITY_BOOLEAN_EXPRESSION.OPERANDS[i])
THEN
RETURN (FALSE);
END_IF;
END_REPEAT;
RETURN (TRUE);
END_IF;
IF 'EXPRESSION_ARM.EQUALS_EXPRESSION' IN TYPEOF (arg)
THEN
RETURN(Is_sql_mappable (
arg\Binary_generic_expression.OPERANDS [1])
AND Is_sql_mappable(
arg\Binary_generic_expression.OPERANDS [2]));
END_IF;
IF	('EXPRESSION_ARM.COMPARISON_EQUAL' IN TYPEOF (arg))
OR ('EXPRESSION_ARM.COMPARISON_GREATER'
IN TYPEOF (arg))
OR ('EXPRESSION_ARM.COMPARISON_GREATER_EQUAL'
IN TYPEOF (arg))
OR ('EXPRESSION_ARM.COMPARISON_LESS'
IN TYPEOF (arg))
OR ('EXPRESSION_ARM.COMPARISON_LESS_EQUAL'
IN TYPEOF (arg))
OR ('EXPRESSION_ARM.COMPARISON_NOT_EQUAL'
IN TYPEOF (arg))
OR ('EXPRESSION_ARM.LIKE_EXPRESSION'
IN TYPEOF (arg))
THEN
RETURN (Is_sql_mappable (arg\COMPARISON_EXPRESSION.OPERANDS[1])
AND Is_sql_mappable (arg\COMPARISON_EXPRESSION.OPERANDS[2]));
END_IF;
IF 'EXPRESSION_ARM.INTERVAL_EXPRESSION' IN TYPEOF(arg)
THEN
RETURN (Is_sql_mappable(arg\Interval_expression.interval_low)
AND Is_sql_mappable(arg\Interval_expression.interval_high)
AND Is_sql_mappable(arg\Interval_expression.interval_item));
END_IF;
IF ('NUMERIC_FUNCTION_ARM.NUMERIC_DEFINED_FUNCTION'
IN TYPEOF(arg))
OR ('EXPRESSION_ARM.BOOLEAN_DEFINED_FUNCTION'
IN TYPEOF(arg))
OR ('EXPRESSION_ARM.STRING_DEFINED_FUNCTION'
IN TYPEOF(arg))
THEN
RETURN (FALSE) ;
END_IF;
IF 'EXPRESSION_ARM.SIMPLE_STRING_EXPRESSION'
IN TYPEOF(ARG)
THEN
RETURN (TRUE);
END_IF;
IF 	('EXPRESSION_ARM.INDEX_EXPRESSION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.SUBSTRING_EXPRESSION'
IN TYPEOF(arg))
OR ('EXPRESSION_ARM.CONCAT_EXPRESSION'
IN TYPEOF(arg))
OR ('EXPRESSION_ARM.FORMAT_FUNCTION'
IN TYPEOF(arg))
THEN
RETURN (FALSE);
END_IF;
RETURN (FALSE);
                          
END_FUNCTION;
(*

Argument definitions:

arg: an Expression.

4.3.2 Is_int_expr

The Is_int_expr function checks if a syntactically correct expression evaluates to an integer value or not.

EXPRESS specification:

*)
FUNCTION Is_int_expr (arg : Numeric_expression) :BOOLEAN;
LOCAL
i: INTEGER;
END_LOCAL;
IF 'EXPRESSION_ARM.INT_LITERAL' IN TYPEOF(arg)
THEN
RETURN (TRUE);
END_IF;
IF 'EXPRESSION_ARM.REAL_LITERAL' IN TYPEOF(arg)
THEN
RETURN (FALSE);
END_IF;
IF 'EXPRESSION_ARM.INT_NUMERIC_VARIABLE' IN TYPEOF(arg)
THEN
RETURN (TRUE);
END_IF;
IF 'EXPRESSION_ARM.REAL_NUMERIC_VARIABLE' IN TYPEOF(arg)
THEN
RETURN (FALSE);
END_IF;
IF 'NUMERIC_FUNCTION_ARM.ABS_FUNCTION' IN TYPEOF(arg)
THEN
RETURN (Is_int_expr(arg\Unary_numeric_expression.operand));
END_IF;
IF 'NUMERIC_FUNCTION.MINUS_FUNCTION' IN TYPEOF(arg)
THEN
RETURN (Is_int_expr(arg\Unary_numeric_expression.operand));
END_IF;
IF ('NUMERIC_FUNCTION_ARM.SIN_FUNCTION' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.COS_FUNCTION' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.TAN_FUNCTION' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.ASIN_FUNCTION' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.ACOS_FUNCTION' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.Atan_function' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.EXP_FUNCTION' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.LOG_FUNCTION' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.LOG2_FUNCTION' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.LOG10_FUNCTION' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.SQUARE_ROOT_FUNCTION'
IN TYPEOF(arg))
THEN
RETURN (FALSE);
END_IF;
IF 	('EXPRESSION_ARM.PLUS_EXPRESSION' IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.MULT_EXPRESSION'
IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.MAXIMUM_FUNCTION'
IN TYPEOF(arg))
OR ('NUMERIC_FUNCTION_ARM.MINIMUM_FUNCTION'
IN TYPEOF(arg))
THEN
REPEAT i :=1 TO SIZEOF (
arg\Multiple_arity_numeric_expression.operands);
IF NOT
Is_int_expr(arg\Multiple_arity_numeric_expression.operands[i])
THEN
RETURN (FALSE);
END_IF;
END_REPEAT;
RETURN (TRUE);
END_IF;
IF 	('EXPRESSION_ARM.MINUS_EXPRESSION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.POWER_EXPRESSION'
IN TYPEOF(arg))
THEN
RETURN (Is_int_expr(arg\Binary_numeric_expression.operands[1])
AND Is_int_expr(arg\Binary_numeric_expression.operands[2]));
END_IF;
IF	('EXPRESSION_ARM.DIV_EXPRESSION' IN TYPEOF(arg))
OR ('EXPRESSION_ARM.MOD_EXPRESSION' IN TYPEOF(arg))
THEN
RETURN(TRUE);
END_IF;
IF 'EXPRESSION_ARM.SLASH_EXPRESSION' IN TYPEOF(arg)
THEN
RETURN (FALSE);
END_IF;
IF 'NUMERIC_FUNCTION_ARM.LENGTH_FUNCTION' IN TYPEOF(arg)
THEN
RETURN (TRUE);
END_IF;
IF 'NUMERIC_FUNCTION_ARM.VALUE_FUNCTION' IN TYPEOF(arg)
THEN
IF 'NUMERIC_FUNCTION_ARM.INT_VALUE_FUNCTION'
IN TYPEOF(arg)
THEN
RETURN (TRUE);
ELSE
RETURN (FALSE);
END_IF;
END_IF;
IF 'NUMERIC_FUNCTION_ARM.INTEGER_DEFINED_FUNCTION'
IN TYPEOF(arg)
THEN
RETURN(TRUE) ;
END_IF;
IF'NUMERIC_FUNCTION_ARM.REAL_DEFINED_FUNCTION' IN TYPEOF(arg)
THEN
RETURN(FALSE) ;
END_IF ;
IF 'EXPRESSION_ARM.BOOLEAN_DEFINED_FUNCTION'
IN TYPEOF(arg)
THEN
RETURN(FALSE) ;
END_IF ;
IF 'EXPRESSION_ARM.STRING_DEFINED_FUNCTION'
IN TYPEOF(arg)
THEN
RETURN (FALSE) ;
END_IF ;
RETURN (FALSE);
                          
END_FUNCTION;
(*

Argument definitions:

arg: it is a Numeric_expression.



*)
END_SCHEMA;  -- Expression_arm
(*


© ISO 2005 — All rights reserved