FUNCTION function_applicability

(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP238 STEP-NC
-- IN AP238 STEP-NC/AP242
FUNCTION function_applicability
      (func : maths_function_select;
       arguments : LIST [1:?] OF maths_value ) : BOOLEAN;
   LOCAL
      domain : tuple_space := convert_to_maths_function(func).domain;
      domain_types : SET OF STRING := TYPEOF(domain);
      narg : positive_integer := SIZEOF(arguments);
      arg : generic_expression;
   END_LOCAL;
      IF schema_prefix + 'PRODUCT_SPACE' IN domain_types THEN
         IF space_dimension(domain) <> narg THEN
            RETURN (FALSE);
         END_IF;
      ELSE
         IF schema_prefix + 'EXTENDED_TUPLE_SPACE' IN domain_types THEN
            IF space_dimension(domain) > narg THEN
               RETURN (FALSE);
            END_IF;
         ELSE
            RETURN (FALSE);
         END_IF;
      END_IF;
      REPEAT i := 1 TO narg;
         arg := convert_to_operand(arguments[i]);
         IF NOT has_values_space(arg) THEN
            RETURN (FALSE);
         END_IF;
         IF NOT compatible_spaces(factor_space(domain, i), values_space_of(arg)) THEN
            RETURN (FALSE);
         END_IF;
      END_REPEAT;
      RETURN (FALSE);
END_FUNCTION;

Referenced By

Defintion function_applicability is references by the following definitions:
DefinitionType
 function_application ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2020-07-28T17:02:20-04:00