FUNCTION all_members_of_es

(* SCHEMA step_merged_ap_schema; *)
-- IN AP242
FUNCTION all_members_of_es
      (sv : SET OF maths_value;
       es : elementary_space_enumerators ) : LOGICAL;
   CONSTANT
      base_types : SET OF STRING := [ 'NUMBER', 'COMPLEX_NUMBER_LITERAL', 'REAL', 'INTEGER', 'LOGICAL', 'BOOLEAN', 'STRING', 'BINARY', 'MATHS_SPACE', 'MATHS_FUNCTION', 'LIST', 'ELEMENTARY_SPACE_ENUMERATORS', 'ORDERING_TYPE', 'LOWER_UPPER', 'SYMMETRY_TYPE', 'ELEMENTARY_FUNCTION_ENUMERATORS', 'OPEN_CLOSED', 'SPACE_CONSTRAINT_TYPE', 'REPACKAGE_OPTIONS', 'EXTENSION_OPTIONS' ];
   END_CONSTANT;
   LOCAL
      v : maths_value;
      key_type : STRING := '';
      types : SET OF STRING;
      ge : generic_expression;
      cum : LOGICAL := TRUE;
      vspc : maths_space;
   END_LOCAL;
      IF NOT EXISTS(sv) OR NOT EXISTS(es) THEN
         RETURN (FALSE);
      END_IF;
      CASE es OF
         es_numbers :
               key_type := 'NUMBER';
         es_complex_numbers :
               key_type := 'COMPLEX_NUMBER_LITERAL';
         es_reals :
               key_type := 'REAL';
         es_integers :
               key_type := 'INTEGER';
         es_logicals :
               key_type := 'LOGICAL';
         es_booleans :
               key_type := 'BOOLEAN';
         es_strings :
               key_type := 'STRING';
         es_binarys :
               key_type := 'BINARY';
         es_maths_spaces :
               key_type := 'MATHS_SPACE';
         es_maths_functions :
               key_type := 'MATHS_FUNCTION';
         es_generics :
               RETURN (TRUE);
      END_CASE;
      REPEAT i := 1 TO SIZEOF(sv) BY 1;
         IF NOT EXISTS(sv[i]) THEN
            RETURN (FALSE);
         END_IF;
         v := simplify_maths_value(sv[i]);
         types := stripped_typeof(v);
         IF key_type IN types THEN
            SKIP;
         END_IF;
         IF (es = es_numbers) AND ('COMPLEX_NUMBER_LITERAL' IN types) THEN
            SKIP;
         END_IF;
         IF SIZEOF(base_types * types) > 0 THEN
            RETURN (FALSE);
         END_IF;
         ge := v;
         IF has_values_space(ge) THEN
            vspc := values_space_of(ge);
            IF NOT subspace_of_es(vspc, es) THEN
               IF NOT compatible_spaces(vspc, make_elementary_space(es)) THEN
                  RETURN (FALSE);
               END_IF;
               cum := UNKNOWN;
            END_IF;
         ELSE
            cum := UNKNOWN;
         END_IF;
         IF cum = FALSE THEN
            RETURN (FALSE);
         END_IF;
      END_REPEAT;
      RETURN (cum);
END_FUNCTION;

Referenced By

Defintion all_members_of_es is references by the following definitions:
DefinitionType
 subspace_of_es FUNCTION


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2017-01-19T11:17:24-05:00