FUNCTION dependently_instantiated

(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP203e2
-- CASE DIFF IN AP238 STEP-NC
-- IN AP203e2/AP238 STEP-NC/AP242
FUNCTION dependently_instantiated
      (set_of_input_instances : SET OF GENERIC : IGEN;
       set_of_input_types : SET OF STRING;
       previous_in_chain : LIST OF GENERIC : CGEN ) : BOOLEAN;
   LOCAL
      number_of_input_instances : INTEGER;
      number_of_referring_instances : INTEGER;
      bag_of_referring_instances : BAG OF GENERIC : IGEN := [];
      dependently_instantiated_flag : BOOLEAN;
      previous_in_chain_plus : LIST OF GENERIC : CGEN := [];
      result : BOOLEAN := FALSE;
      set_of_types : SET OF STRING := [];
   END_LOCAL;
      IF EXISTS(set_of_input_instances) THEN
         number_of_input_instances := SIZEOF(set_of_input_instances);
         set_of_input_types := set_of_input_types + 'GENERIC';
         REPEAT i := 1 TO number_of_input_instances;
            bag_of_referring_instances := USEDIN(set_of_input_instances[i], '');
            IF EXISTS(bag_of_referring_instances) THEN
               number_of_referring_instances := SIZEOF(bag_of_referring_instances);
               dependently_instantiated_flag := FALSE;
               REPEAT j := 1 TO number_of_referring_instances;
                  set_of_types := TYPEOF(bag_of_referring_instances[j]);
                  IF set_of_types <= set_of_input_types THEN
                     IF NOT (bag_of_referring_instances[j] IN previous_in_chain) THEN
                        previous_in_chain_plus := previous_in_chain + set_of_input_instances[i];
                        IF dependently_instantiated([ bag_of_referring_instances[j] ], set_of_input_types, previous_in_chain_plus) THEN
                           dependently_instantiated_flag := FALSE;
                           ESCAPE;
                        ELSE
                           SKIP;
                        END_IF;
                     END_IF;
                  ELSE
                     dependently_instantiated_flag := FALSE;
                     ESCAPE;
                  END_IF;
               END_REPEAT;
               IF NOT dependently_instantiated_flag THEN
                  RETURN (FALSE);
               END_IF;
            ELSE
               RETURN (FALSE);
            END_IF;
         END_REPEAT;
      ELSE
         RETURN (FALSE);
      END_IF;
      RETURN (FALSE);
END_FUNCTION;

Referenced By

Defintion dependently_instantiated is references by the following definitions:
DefinitionType
 validate_dependently_instantiable_entity_data_types RULE


[Top Level Definitions] [Exit]

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