RULE floating_position_compound_representation_with_name

(* SCHEMA Ship_arrangement_schema; *)


   RULE floating_position_compound_representation_with_name FOR (applied_classification_assignment );
   LOCAL
      c_a_set : SET OF applied_classification_assignment := [];
      t1_set : SET OF compound_representation_item := [];
      t2_set : SET OF representation_item := [];
      arg_list : LIST OF STRING := [ 'moulded form displacement', 'draught at amidships', 'length of waterline', 'breadth of waterline', 'angle of trim', 'angle of heel' ];
      violation : LOGICAL := FALSE;
   END_LOCAL;
      c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'floating position');
      REPEAT i := 1 TO HIINDEX(c_a_set);
         REPEAT j := 1 TO HIINDEX(c_a_set[i].items);
            t1_set := t1_set + c_a_set[i].items[j];
         END_REPEAT;
      END_REPEAT;
      REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation;
         REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation;
            t2_set := t1_set[i].item_element;
            violation := SIZEOF(QUERY (items <* t2_set| (items.name = arg_list[j]))) <> 1;
         END_REPEAT;
      END_REPEAT;
   WHERE
      WR1:
         NOT violation;
   END_RULE;

[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:16:37-04:00