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

[wp] suppress useless code

parent 38a48ece
No related branches found
No related tags found
No related merge requests found
......@@ -295,7 +295,7 @@ module CodeAssertions = WpContext.StaticGenerator(CodeKey)
type data = code_assertions
let name = "Wp.CfgAnnot.CodeAssertions"
let compile (kf,stmt) =
let labels = NormAtLabels.labels_assert_before ~kf stmt in
let labels = NormAtLabels.labels_assert ~kf stmt in
let normalize_pred p = NormAtLabels.preproc_annot labels p in
reverse_code_assertions @@
Annotations.fold_code_annot
......
......@@ -181,15 +181,10 @@ let labels_stmt_assigns_l ~kf s l_post = function
(* --- User Assertions in Functions Code --- *)
(* -------------------------------------------------------------------------- *)
let labels_assert_before ~kf s = function
let labels_assert ~kf s = function
| BuiltinLabel Here -> Clabels.stmt s
| l -> labels_fct ~kf ~at:s l
let labels_assert_after ~kf s l_post = function
| BuiltinLabel Old -> Clabels.stmt s
| BuiltinLabel Here as l -> option l l_post
| l -> labels_fct ~kf ~at:s l
let labels_loop s = function
(* In invariant preservation/establishment, LoopCurrent is Here. *)
| BuiltinLabel (Here | LoopCurrent) -> Clabels.here
......
......@@ -32,8 +32,7 @@ val labels_empty : label_mapping
val labels_fct_pre : label_mapping
val labels_fct_post : label_mapping
val labels_fct_assigns : label_mapping
val labels_assert_before : kf:kernel_function -> stmt -> label_mapping
val labels_assert_after : kf:kernel_function -> stmt -> c_label option -> label_mapping
val labels_assert : kf:kernel_function -> stmt -> label_mapping
val labels_loop : stmt -> label_mapping
val labels_stmt_pre : kf:kernel_function -> stmt -> label_mapping
val labels_stmt_post : kf:kernel_function -> stmt -> label_mapping
......
......@@ -268,7 +268,7 @@ let add_prop_call_post acc kind called_kf bhv tkind ~assumes post =
let add_prop_assert acc kind kf s ca p =
let id = WpPropId.mk_assert_id kf s ca in
let labels = NormAtLabels.labels_assert_before ~kf s in
let labels = NormAtLabels.labels_assert ~kf s in
let p = normalize id labels p in
add_prop acc kind id p
......
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