let extend_logic_language () =
Options.feedback ~level:3 "adding built-in security annotations";
if not (Logic_env.is_logic_type security_name) then begin
Logic_env.add_builtin_logic_type security_name security_type
end;
if not (Logic_env.is_logic_function Model.state_name) then begin
Logic_builtin.add
{ bl_name = Model.state_name; bl_type = Some (Ltype (security_type,[]));
bl_profile = [("x", Lvar "a")]; bl_params = [ "a" ];
bl_labels = [];
}
end;
let annotations =
let lattice =
if not (Options.LogicAnnotation.is_default ()) then
Options.LogicAnnotation.get ()
else
Options.Lattice.get ()
in
match lattice with
| "weak" -> Weak.possible_annotations
| "medium" -> Medium.possible_annotations
| "strong" -> Strong.possible_annotations
| _ -> raise_invalid_lattice ()
in
last_annotations := annotations;
List.iter add_annotation annotations