let name_of_prop_id p = match p.p_kind , p.p_prop with
| PKProp , Property.IPAssigns (_kf, (Kstmt s), _, _) ->
"stmt_assigns_" ^ string_of_int s.sid
| PKProp , p -> id_prop_txt p
| PKPropLoop , Property.IPAssigns (_kf, (Kstmt s), _, _) ->
"loop_assigns_" ^ string_of_int s.sid
| PKPropLoop , p -> id_prop_txt p
| PKEstablished , p -> id_prop_txt p ^ "_established"
| PKPreserved , p -> id_prop_txt p ^ "_preserved"
| PKVarDecr , p -> id_prop_txt p ^ "_decrease"
| PKVarPos , p -> id_prop_txt p ^ "_positive"
| PKAFctOut , Property.IPFrom _ -> "normal_from"
| PKAFctExit , Property.IPFrom _ -> "exit_from"
| PKAFctOut , _ -> "normal_assigns"
| PKAFctExit , _ -> "exit_assigns"
| PKPre(kf,stmt,p) , _ ->
let pid = match p with
| Property.IPCodeAnnot(_,_,p) -> p.annot_id
| Property.IPPredicate(_,_,_,p) -> p.ip_id
| property -> Wp_parameters.fatal "No precondition id for @[%a@]"
Property.pretty property
in
Printf.sprintf "pre%d_%s_s%d" pid (Kernel_function.get_name kf) stmt.sid