Skip to content
Snippets Groups Projects
Commit bc0ce693 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[wp] collect code behaviors

parent 40c243f9
No related branches found
No related tags found
No related merge requests found
......@@ -275,6 +275,18 @@ let get_call_contract ?smoking kf =
let g = smoke kf ~id:"dead_call" ~unreachable:s () in
{ cc with contract_smoke = [ g ] }
(* -------------------------------------------------------------------------- *)
(* --- Code Contracts --- *)
(* -------------------------------------------------------------------------- *)
let get_code_behaviors stmt =
Annotations.fold_code_annot
(fun _emitter ca cs ->
match ca.annot_content with
| AStmtSpec(fors,spec) -> (fors,spec) :: cs
| _ -> cs
) stmt []
(* -------------------------------------------------------------------------- *)
(* --- Code Assertions --- *)
(* -------------------------------------------------------------------------- *)
......
......@@ -53,6 +53,12 @@ val get_preconditions : goal:bool -> kernel_function -> pred_info list
val get_complete_behaviors : kernel_function -> pred_info list
val get_disjoint_behaviors : kernel_function -> pred_info list
(* -------------------------------------------------------------------------- *)
(* --- Property Accessors : Code Behaviors --- *)
(* -------------------------------------------------------------------------- *)
val get_code_behaviors : stmt -> (string list * funspec) list
(* -------------------------------------------------------------------------- *)
(* --- Property Accessors : Assertions --- *)
(* -------------------------------------------------------------------------- *)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment