RULE global_id_is_unique

(* SCHEMA ship_moulded_form_schema; *)
  RULE global_id_is_unique FOR (applied_identification_assignment);

    LOCAL
      violation : LOGICAL := FALSE;
      set_1     : SET OF applied_identification_assignment := [];
      bag_2     : BAG OF STRING := [];
    END_LOCAL;
    set_1 := QUERY ( i <* applied_identification_assignment | (i.role.name 
        = 'globally unambiguous identifier') );
    REPEAT i := 1 TO HIINDEX(set_1) BY 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; -- global_id_is_unique

[Top Level Definitions] [Exit]

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