RULE valid_product_definition_for_class_moulded_form

(* SCHEMA step_ship_schema; *)
-- ONLY IN AP216
RULE valid_product_definition_for_class_moulded_form FOR (
             applied_classification_assignment, applied_group_assignment);

    LOCAL
      violation : LOGICAL := FALSE;
      t1_set    : SET OF product_definition := [];
      violate1  : LOGICAL;
      violate2  : LOGICAL;
      c_a_set   : SET OF applied_classification_assignment := [];
      gr_ass    : SET OF applied_group_assignment := [];
      groups    : SET OF group := [];
    END_LOCAL;
    c_a_set := QUERY ( i <* applied_classification_assignment | (i.
        assigned_class.name = 'ship moulded form') );
    REPEAT i := 1 TO HIINDEX(c_a_set) BY 1;
      REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1;
        t1_set := t1_set + c_a_set[i].items[j];
      END_REPEAT;
    END_REPEAT;
    gr_ass := QUERY ( i <* applied_group_assignment | (i.role.name =
        'equivalence') );
    REPEAT i := 1 TO HIINDEX(gr_ass) BY 1;
      REPEAT j := 1 TO HIINDEX(gr_ass[i].items) BY 1;
        IF gr_ass[i].items[j] IN t1_set THEN
          groups := groups + gr_ass[i].assigned_group;
        END_IF;
      END_REPEAT;
    END_REPEAT;
    gr_ass := QUERY ( i <* applied_group_assignment | ((SIZEOF(i.items) <>
         0) AND (i.role.name = 'item structure') AND (i.assigned_group IN
        groups)) );
    REPEAT i := 1 TO HIINDEX(gr_ass) BY 1 WHILE NOT violation;
      REPEAT j := 1 TO HIINDEX(gr_ass[i].items) BY 1 WHILE NOT violation;
        violate1 := VALUE_IN(which_class(gr_ass[i].items[j]),
            'moulded form');
        violate2 := VALUE_IN(which_class(gr_ass[i].items[j]),
            'moulded form relationship');
        violation := NOT (violate1 OR violate2);
      END_REPEAT;
    END_REPEAT;

  WHERE
    wr1: (NOT violation);

END_RULE;

[Top Level Definitions] [Exit]

Generated by STEP ToolsTM EXPRESS to HTML Converter
on 2007-09-24T12:42:22-04:00