let security_highlighter buffer loc ~start ~stop = 
  match loc with
  | PStmt (_,s) -> 
      let f = ForwardHighlighterState.get () in
      if List.exists (fun k -> k.sid=s.sid) f then begin
        let tag = make_tag buffer"forward" [`BACKGROUND "orange" ] in
        apply_tag buffer tag start stop end;
      let i = IndirectBackwardHighlighterState.get () in
      if List.exists (fun k -> k.sid=s.sid) i then begin
        let tag = make_tag buffer"indirect_backward" [`BACKGROUND  "cyan" ] in
        apply_tag buffer tag start stop end;
      let d = DirectHighlighterState.get () in
      if List.exists (fun k -> k.sid=s.sid) d then begin
        let tag = make_tag buffer"direct" [`BACKGROUND  "green" ] in
        apply_tag buffer tag start stop end
  | PVDecl _ | PTermLval _ | PLval _ | PCodeAnnot _ | PGlobal _ -> ()