let iosh_equals iosh1 iosh2 =
(*  if IH.length iosh1 = 0 && not(IH.length iosh2 = 0) ||
  IH.length iosh2 = 0 && not(IH.length iosh1 = 0)*)

  if not(IH.length iosh1 = IH.length iosh2)
  then
    (Cilmsg.debug "iosh_equals: length not same" ; false)
  else
    IH.fold (fun vid ios b ->
      if not b then b else
      try let ios2 = IH.find iosh2 vid in
      if not(IOS.compare ios ios2 = 0) then
        (Cilmsg.debug "iosh_equals: sets for vid %d not equal\n" vid ; false)
      else true
      with Not_found ->
        (Cilmsg.debug "iosh_equals: vid %d not in iosh2\n" vid ; false)) 
      iosh1 true