RULE global_id_is_unique

(* SCHEMA Ship_arrangement_schema; *)


   RULE global_id_is_unique FOR (applied_identification_assignment );
   LOCAL
      set_1 : SET OF applied_identification_assignment := [];
      bag_2 : BAG OF STRING := [];
      violation : LOGICAL := FALSE;
   END_LOCAL;
      set_1 := QUERY (i <* applied_identification_assignment| i.role.NAME = 'globally unambiguous identifier');
      REPEAT i := 1 TO HIINDEX(set_1);
         bag_2 := bag_2 + [ set_1[i].assigned_id ];
      END_REPEAT;
      violation := SIZEOF(QUERY (i <* set_1| (SIZEOF(i.items) = 1))) <> SIZEOF(set_1);
   WHERE
      WR1:
         VALUE_UNIQUE(bag_2);
      wr2:
         NOT violation;
   END_RULE;

[Top Level Definitions] [Exit]

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