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 _
| PBehavior _ | PPredicate _ | PAssigns _
| PPost_cond _| PAssumes _| PDisjoint_behaviors _| PComplete_behaviors _
| PTerminates _| PVariant _| PRequires _ -> ()