let search_security_requirements () =
if Security_Annotations.is_empty () then begin
Options.feedback ~level:3 "searching security annotations";
let is_security_annotation = function
| User a ->
(match a.annot_content with
| AAssert (_behav,p,_) -> is_security_predicate p
| AStmtSpec { spec_requires = l } ->
List.exists
(is_security_predicate $ Logic_const.pred_of_id_pred) l
| APragma _
| AInvariant _
| AVariant _ | AAssigns _
-> false)
| AI _ ->
false
in
Annotations.iter
(fun s annotations ->
if
Value.is_reachable_stmt s
&& List.exists
(function Before a | After a -> is_security_annotation a)
!annotations
then
Security_Annotations.add s);
Globals.Functions.iter
(fun kf ->
if has_security_requirement kf then
List.iter
(fun (_, callsites) ->
List.iter Security_Annotations.add callsites)
(!Value.callers kf));
end