FUNCTION is_int_expr

(* SCHEMA FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF; *)
 
FUNCTION is_int_expr(arg : numeric_expression) : BOOLEAN;
LOCAL
  i : INTEGER;
END_LOCAL;
  IF 'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.INT_LITERAL' IN 
  TYPEOF(arg) THEN
    RETURN (TRUE);
  END_IF;
  IF 'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.REAL_LITERAL' IN 
  TYPEOF(arg) THEN
    RETURN (FALSE);
  END_IF;
  IF 'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.INT_NUMERIC_VARIABLE'
   IN TYPEOF(arg) THEN
    RETURN (TRUE);
  END_IF;
  IF 
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.REAL_NUMERIC_VARIABLE' 
  IN TYPEOF(arg) THEN
    RETURN (FALSE);
  END_IF;
  IF 'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.ABS_FUNCTION' IN 
  TYPEOF(arg) THEN
    RETURN (is_int_expr(arg\unary_numeric_expression.operand));
  END_IF;
  IF 'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.MINUS_FUNCTION' IN 
  TYPEOF(arg) THEN
    RETURN (is_int_expr(arg\unary_numeric_expression.operand));
  END_IF;
  IF ('FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.SIN_FUNCTION' IN 
  TYPEOF(arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.COS_FUNCTION' IN TYPEOF(
  arg)) OR ('FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.TAN_FUNCTION' 
  IN TYPEOF(arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.ASIN_FUNCTION' IN TYPEOF
  (arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.ACOS_FUNCTION' IN TYPEOF
  (arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.ATAN_FUNCTION' IN TYPEOF
  (arg)) OR ('FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.EXP_FUNCTION'
   IN TYPEOF(arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.LOG_FUNCTION' IN TYPEOF(
  arg)) OR ('FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.LOG2_FUNCTION'
   IN TYPEOF(arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.LOG10_FUNCTION' IN 
  TYPEOF(arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.SQUARE_ROOT_FUNCTION' IN
   TYPEOF(arg)) THEN
    RETURN (FALSE);
  END_IF;
  IF ('FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.PLUS_EXPRESSION' IN 
  TYPEOF(arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.MULT_EXPRESSION' IN 
  TYPEOF(arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.MAXIMUM_FUNCTION' IN 
  TYPEOF(arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.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 ('FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.MINUS_EXPRESSION' IN
   TYPEOF(arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.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 ('FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.DIV_EXPRESSION' IN 
  TYPEOF(arg)) OR (
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.MOD_EXPRESSION' IN 
  TYPEOF(arg)) THEN
    RETURN (TRUE);
  END_IF;
  IF 'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.SLASH_EXPRESSION' IN 
  TYPEOF(arg) THEN
    RETURN (FALSE);
  END_IF;
  IF 'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.LENGTH_FUNCTION' IN 
  TYPEOF(arg) THEN
    RETURN (TRUE);
  END_IF;
  IF 'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.VALUE_FUNCTION' IN 
  TYPEOF(arg) THEN
    IF 'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.INT_VALUE_FUNCTION'
     IN TYPEOF(arg) THEN
      RETURN (TRUE);
    ELSE
      RETURN (FALSE);
    END_IF;
  END_IF;
  IF 
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.INTEGER_DEFINED_FUNCTION'
   IN TYPEOF(arg) THEN
    RETURN (TRUE);
  END_IF;
  IF 
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.REAL_DEFINED_FUNCTION' 
  IN TYPEOF(arg) THEN
    RETURN (FALSE);
  END_IF;
  IF 
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.BOOLEAN_DEFINED_FUNCTION'
   IN TYPEOF(arg) THEN
    RETURN (FALSE);
  END_IF;
  IF 
  'FUNCTIONAL_DATA_AND_SCHEMATIC_REPRESENTATION_MIM_LF.STRING_DEFINED_FUNCTION'
   IN TYPEOF(arg) THEN
    RETURN (FALSE);
  END_IF;
  RETURN (FALSE);
END_FUNCTION;

Referenced By

Defintion is_int_expr is references by the following definitions:
DefinitionType
 index_expression ENTITY
 numeric_expression ENTITY
 odd_function ENTITY
 substring_expression ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2014-04-15T12:41:39-04:00